@liduchuan/atlas-loop 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -2
- package/SKILL.md +61 -0
- package/assets/viewer-shell.html +1911 -0
- package/bin/atlas-loop.mjs +99 -0
- package/package.json +52 -4
- package/references/schema.md +122 -0
- package/scripts/build_atlas.mjs +261 -0
- package/scripts/verify_atlas.mjs +316 -0
- package/template/app.jsx +1339 -0
- package/template/build-shell.mjs +82 -0
- package/template/dev-server.mjs +177 -0
- package/template/sample-data.json +253 -0
- package/template/styles.css +1188 -0
|
@@ -0,0 +1,1911 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="__ATLAS_HTML_LANG__">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="theme-color" content="#fafafa" />
|
|
7
|
+
<title>__ATLAS_HTML_TITLE__</title>
|
|
8
|
+
<style>/* this gets exported as style.css and can be used for the default theming */
|
|
9
|
+
/* these are the necessary styles for React/Svelte Flow, they get used by base.css and style.css */
|
|
10
|
+
.react-flow {
|
|
11
|
+
direction: ltr;
|
|
12
|
+
|
|
13
|
+
--xy-edge-stroke-default: #b1b1b7;
|
|
14
|
+
--xy-edge-stroke-width-default: 1;
|
|
15
|
+
--xy-edge-stroke-selected-default: #555;
|
|
16
|
+
|
|
17
|
+
--xy-connectionline-stroke-default: #b1b1b7;
|
|
18
|
+
--xy-connectionline-stroke-width-default: 1;
|
|
19
|
+
|
|
20
|
+
--xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);
|
|
21
|
+
|
|
22
|
+
--xy-minimap-background-color-default: #fff;
|
|
23
|
+
--xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);
|
|
24
|
+
--xy-minimap-mask-stroke-color-default: transparent;
|
|
25
|
+
--xy-minimap-mask-stroke-width-default: 1;
|
|
26
|
+
--xy-minimap-node-background-color-default: #e2e2e2;
|
|
27
|
+
--xy-minimap-node-stroke-color-default: transparent;
|
|
28
|
+
--xy-minimap-node-stroke-width-default: 2;
|
|
29
|
+
|
|
30
|
+
--xy-background-color-default: transparent;
|
|
31
|
+
--xy-background-pattern-dots-color-default: #91919a;
|
|
32
|
+
--xy-background-pattern-lines-color-default: #eee;
|
|
33
|
+
--xy-background-pattern-cross-color-default: #e2e2e2;
|
|
34
|
+
background-color: var(--xy-background-color, var(--xy-background-color-default));
|
|
35
|
+
--xy-node-color-default: inherit;
|
|
36
|
+
--xy-node-border-default: 1px solid #1a192b;
|
|
37
|
+
--xy-node-background-color-default: #fff;
|
|
38
|
+
--xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
|
|
39
|
+
--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
|
|
40
|
+
--xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;
|
|
41
|
+
--xy-node-border-radius-default: 3px;
|
|
42
|
+
|
|
43
|
+
--xy-handle-background-color-default: #1a192b;
|
|
44
|
+
--xy-handle-border-color-default: #fff;
|
|
45
|
+
|
|
46
|
+
--xy-selection-background-color-default: rgba(0, 89, 220, 0.08);
|
|
47
|
+
--xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);
|
|
48
|
+
|
|
49
|
+
--xy-controls-button-background-color-default: #fefefe;
|
|
50
|
+
--xy-controls-button-background-color-hover-default: #f4f4f4;
|
|
51
|
+
--xy-controls-button-color-default: inherit;
|
|
52
|
+
--xy-controls-button-color-hover-default: inherit;
|
|
53
|
+
--xy-controls-button-border-color-default: #eee;
|
|
54
|
+
--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);
|
|
55
|
+
|
|
56
|
+
--xy-edge-label-background-color-default: #ffffff;
|
|
57
|
+
--xy-edge-label-color-default: inherit;
|
|
58
|
+
--xy-resize-background-color-default: #3367d9;
|
|
59
|
+
}
|
|
60
|
+
.react-flow.dark {
|
|
61
|
+
--xy-edge-stroke-default: #3e3e3e;
|
|
62
|
+
--xy-edge-stroke-width-default: 1;
|
|
63
|
+
--xy-edge-stroke-selected-default: #727272;
|
|
64
|
+
|
|
65
|
+
--xy-connectionline-stroke-default: #b1b1b7;
|
|
66
|
+
--xy-connectionline-stroke-width-default: 1;
|
|
67
|
+
|
|
68
|
+
--xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);
|
|
69
|
+
|
|
70
|
+
--xy-minimap-background-color-default: #141414;
|
|
71
|
+
--xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);
|
|
72
|
+
--xy-minimap-mask-stroke-color-default: transparent;
|
|
73
|
+
--xy-minimap-mask-stroke-width-default: 1;
|
|
74
|
+
--xy-minimap-node-background-color-default: #2b2b2b;
|
|
75
|
+
--xy-minimap-node-stroke-color-default: transparent;
|
|
76
|
+
--xy-minimap-node-stroke-width-default: 2;
|
|
77
|
+
|
|
78
|
+
--xy-background-color-default: #141414;
|
|
79
|
+
--xy-background-pattern-dots-color-default: #555;
|
|
80
|
+
--xy-background-pattern-lines-color-default: #333;
|
|
81
|
+
--xy-background-pattern-cross-color-default: #333;
|
|
82
|
+
--xy-node-color-default: #f8f8f8;
|
|
83
|
+
--xy-node-border-default: 1px solid #3c3c3c;
|
|
84
|
+
--xy-node-background-color-default: #1e1e1e;
|
|
85
|
+
--xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
|
|
86
|
+
--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);
|
|
87
|
+
--xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;
|
|
88
|
+
|
|
89
|
+
--xy-handle-background-color-default: #bebebe;
|
|
90
|
+
--xy-handle-border-color-default: #1e1e1e;
|
|
91
|
+
|
|
92
|
+
--xy-selection-background-color-default: rgba(200, 200, 220, 0.08);
|
|
93
|
+
--xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);
|
|
94
|
+
|
|
95
|
+
--xy-controls-button-background-color-default: #2b2b2b;
|
|
96
|
+
--xy-controls-button-background-color-hover-default: #3e3e3e;
|
|
97
|
+
--xy-controls-button-color-default: #f8f8f8;
|
|
98
|
+
--xy-controls-button-color-hover-default: #fff;
|
|
99
|
+
--xy-controls-button-border-color-default: #5b5b5b;
|
|
100
|
+
--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);
|
|
101
|
+
|
|
102
|
+
--xy-edge-label-background-color-default: #141414;
|
|
103
|
+
--xy-edge-label-color-default: #f8f8f8;
|
|
104
|
+
}
|
|
105
|
+
.react-flow__background {
|
|
106
|
+
background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));
|
|
107
|
+
pointer-events: none;
|
|
108
|
+
z-index: -1;
|
|
109
|
+
}
|
|
110
|
+
.react-flow__container {
|
|
111
|
+
position: absolute;
|
|
112
|
+
width: 100%;
|
|
113
|
+
height: 100%;
|
|
114
|
+
top: 0;
|
|
115
|
+
left: 0;
|
|
116
|
+
}
|
|
117
|
+
.react-flow__pane {
|
|
118
|
+
z-index: 1;
|
|
119
|
+
touch-action: none;
|
|
120
|
+
}
|
|
121
|
+
.react-flow__pane.draggable {
|
|
122
|
+
cursor: grab;
|
|
123
|
+
}
|
|
124
|
+
.react-flow__pane.dragging {
|
|
125
|
+
cursor: grabbing;
|
|
126
|
+
}
|
|
127
|
+
.react-flow__pane.selection {
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
}
|
|
130
|
+
.react-flow__viewport {
|
|
131
|
+
transform-origin: 0 0;
|
|
132
|
+
z-index: 2;
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
}
|
|
135
|
+
.react-flow__renderer {
|
|
136
|
+
z-index: 4;
|
|
137
|
+
}
|
|
138
|
+
.react-flow__selection {
|
|
139
|
+
z-index: 6;
|
|
140
|
+
}
|
|
141
|
+
.react-flow__nodesselection-rect:focus,
|
|
142
|
+
.react-flow__nodesselection-rect:focus-visible {
|
|
143
|
+
outline: none;
|
|
144
|
+
}
|
|
145
|
+
.react-flow__edge-path {
|
|
146
|
+
stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
|
|
147
|
+
stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));
|
|
148
|
+
fill: none;
|
|
149
|
+
}
|
|
150
|
+
.react-flow__connection-path {
|
|
151
|
+
stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));
|
|
152
|
+
stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));
|
|
153
|
+
fill: none;
|
|
154
|
+
}
|
|
155
|
+
.react-flow .react-flow__edges {
|
|
156
|
+
position: absolute;
|
|
157
|
+
}
|
|
158
|
+
.react-flow .react-flow__edges svg {
|
|
159
|
+
overflow: visible;
|
|
160
|
+
position: absolute;
|
|
161
|
+
pointer-events: none;
|
|
162
|
+
}
|
|
163
|
+
.react-flow__edge {
|
|
164
|
+
pointer-events: visibleStroke;
|
|
165
|
+
}
|
|
166
|
+
.react-flow__edge.selectable {
|
|
167
|
+
cursor: pointer;
|
|
168
|
+
}
|
|
169
|
+
.react-flow__edge.animated path {
|
|
170
|
+
stroke-dasharray: 5;
|
|
171
|
+
animation: dashdraw 0.5s linear infinite;
|
|
172
|
+
}
|
|
173
|
+
.react-flow__edge.animated path.react-flow__edge-interaction {
|
|
174
|
+
stroke-dasharray: none;
|
|
175
|
+
animation: none;
|
|
176
|
+
}
|
|
177
|
+
.react-flow__edge.inactive {
|
|
178
|
+
pointer-events: none;
|
|
179
|
+
}
|
|
180
|
+
.react-flow__edge.selected,
|
|
181
|
+
.react-flow__edge:focus,
|
|
182
|
+
.react-flow__edge:focus-visible {
|
|
183
|
+
outline: none;
|
|
184
|
+
}
|
|
185
|
+
.react-flow__edge.selected .react-flow__edge-path,
|
|
186
|
+
.react-flow__edge.selectable:focus .react-flow__edge-path,
|
|
187
|
+
.react-flow__edge.selectable:focus-visible .react-flow__edge-path {
|
|
188
|
+
stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));
|
|
189
|
+
}
|
|
190
|
+
.react-flow__edge-textwrapper {
|
|
191
|
+
pointer-events: all;
|
|
192
|
+
}
|
|
193
|
+
.react-flow__edge .react-flow__edge-text {
|
|
194
|
+
pointer-events: none;
|
|
195
|
+
-webkit-user-select: none;
|
|
196
|
+
-moz-user-select: none;
|
|
197
|
+
user-select: none;
|
|
198
|
+
}
|
|
199
|
+
/* Arrowhead marker styles - use CSS custom properties as default */
|
|
200
|
+
.react-flow__arrowhead polyline {
|
|
201
|
+
stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
|
|
202
|
+
}
|
|
203
|
+
.react-flow__arrowhead polyline.arrowclosed {
|
|
204
|
+
fill: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
|
|
205
|
+
}
|
|
206
|
+
.react-flow__connection {
|
|
207
|
+
pointer-events: none;
|
|
208
|
+
}
|
|
209
|
+
.react-flow__connection .animated {
|
|
210
|
+
stroke-dasharray: 5;
|
|
211
|
+
animation: dashdraw 0.5s linear infinite;
|
|
212
|
+
}
|
|
213
|
+
svg.react-flow__connectionline {
|
|
214
|
+
z-index: 1001;
|
|
215
|
+
overflow: visible;
|
|
216
|
+
position: absolute;
|
|
217
|
+
}
|
|
218
|
+
.react-flow__nodes {
|
|
219
|
+
pointer-events: none;
|
|
220
|
+
transform-origin: 0 0;
|
|
221
|
+
}
|
|
222
|
+
.react-flow__node {
|
|
223
|
+
position: absolute;
|
|
224
|
+
-webkit-user-select: none;
|
|
225
|
+
-moz-user-select: none;
|
|
226
|
+
user-select: none;
|
|
227
|
+
pointer-events: all;
|
|
228
|
+
transform-origin: 0 0;
|
|
229
|
+
box-sizing: border-box;
|
|
230
|
+
cursor: default;
|
|
231
|
+
}
|
|
232
|
+
.react-flow__node.selectable {
|
|
233
|
+
cursor: pointer;
|
|
234
|
+
}
|
|
235
|
+
.react-flow__node.draggable {
|
|
236
|
+
cursor: grab;
|
|
237
|
+
pointer-events: all;
|
|
238
|
+
}
|
|
239
|
+
.react-flow__node.draggable.dragging {
|
|
240
|
+
cursor: grabbing;
|
|
241
|
+
}
|
|
242
|
+
.react-flow__nodesselection {
|
|
243
|
+
z-index: 3;
|
|
244
|
+
transform-origin: left top;
|
|
245
|
+
pointer-events: none;
|
|
246
|
+
}
|
|
247
|
+
.react-flow__nodesselection-rect {
|
|
248
|
+
position: absolute;
|
|
249
|
+
pointer-events: all;
|
|
250
|
+
cursor: grab;
|
|
251
|
+
}
|
|
252
|
+
.react-flow__handle {
|
|
253
|
+
position: absolute;
|
|
254
|
+
pointer-events: none;
|
|
255
|
+
min-width: 5px;
|
|
256
|
+
min-height: 5px;
|
|
257
|
+
width: 6px;
|
|
258
|
+
height: 6px;
|
|
259
|
+
background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));
|
|
260
|
+
border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));
|
|
261
|
+
border-radius: 100%;
|
|
262
|
+
}
|
|
263
|
+
.react-flow__handle.connectingfrom {
|
|
264
|
+
pointer-events: all;
|
|
265
|
+
}
|
|
266
|
+
.react-flow__handle.connectionindicator {
|
|
267
|
+
pointer-events: all;
|
|
268
|
+
cursor: crosshair;
|
|
269
|
+
}
|
|
270
|
+
.react-flow__handle-bottom {
|
|
271
|
+
top: auto;
|
|
272
|
+
left: 50%;
|
|
273
|
+
bottom: 0;
|
|
274
|
+
transform: translate(-50%, 50%);
|
|
275
|
+
}
|
|
276
|
+
.react-flow__handle-top {
|
|
277
|
+
top: 0;
|
|
278
|
+
left: 50%;
|
|
279
|
+
transform: translate(-50%, -50%);
|
|
280
|
+
}
|
|
281
|
+
.react-flow__handle-left {
|
|
282
|
+
top: 50%;
|
|
283
|
+
left: 0;
|
|
284
|
+
transform: translate(-50%, -50%);
|
|
285
|
+
}
|
|
286
|
+
.react-flow__handle-right {
|
|
287
|
+
top: 50%;
|
|
288
|
+
right: 0;
|
|
289
|
+
transform: translate(50%, -50%);
|
|
290
|
+
}
|
|
291
|
+
.react-flow__edgeupdater {
|
|
292
|
+
cursor: move;
|
|
293
|
+
pointer-events: all;
|
|
294
|
+
}
|
|
295
|
+
.react-flow__pane.selection .react-flow__panel {
|
|
296
|
+
pointer-events: none;
|
|
297
|
+
}
|
|
298
|
+
.react-flow__panel {
|
|
299
|
+
position: absolute;
|
|
300
|
+
z-index: 5;
|
|
301
|
+
margin: 15px;
|
|
302
|
+
}
|
|
303
|
+
.react-flow__panel.top {
|
|
304
|
+
top: 0;
|
|
305
|
+
}
|
|
306
|
+
.react-flow__panel.bottom {
|
|
307
|
+
bottom: 0;
|
|
308
|
+
}
|
|
309
|
+
.react-flow__panel.top.center, .react-flow__panel.bottom.center {
|
|
310
|
+
left: 50%;
|
|
311
|
+
transform: translateX(-15px) translateX(-50%);
|
|
312
|
+
}
|
|
313
|
+
.react-flow__panel.left {
|
|
314
|
+
left: 0;
|
|
315
|
+
}
|
|
316
|
+
.react-flow__panel.right {
|
|
317
|
+
right: 0;
|
|
318
|
+
}
|
|
319
|
+
.react-flow__panel.left.center, .react-flow__panel.right.center {
|
|
320
|
+
top: 50%;
|
|
321
|
+
transform: translateY(-15px) translateY(-50%);
|
|
322
|
+
}
|
|
323
|
+
.react-flow__attribution {
|
|
324
|
+
font-size: 10px;
|
|
325
|
+
background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));
|
|
326
|
+
padding: 2px 3px;
|
|
327
|
+
margin: 0;
|
|
328
|
+
}
|
|
329
|
+
.react-flow__attribution a {
|
|
330
|
+
text-decoration: none;
|
|
331
|
+
color: #999;
|
|
332
|
+
}
|
|
333
|
+
@keyframes dashdraw {
|
|
334
|
+
from {
|
|
335
|
+
stroke-dashoffset: 10;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
.react-flow__edgelabel-renderer {
|
|
339
|
+
position: absolute;
|
|
340
|
+
width: 100%;
|
|
341
|
+
height: 100%;
|
|
342
|
+
pointer-events: none;
|
|
343
|
+
-webkit-user-select: none;
|
|
344
|
+
-moz-user-select: none;
|
|
345
|
+
user-select: none;
|
|
346
|
+
left: 0;
|
|
347
|
+
top: 0;
|
|
348
|
+
}
|
|
349
|
+
.react-flow__viewport-portal {
|
|
350
|
+
position: absolute;
|
|
351
|
+
width: 100%;
|
|
352
|
+
height: 100%;
|
|
353
|
+
left: 0;
|
|
354
|
+
top: 0;
|
|
355
|
+
-webkit-user-select: none;
|
|
356
|
+
-moz-user-select: none;
|
|
357
|
+
user-select: none;
|
|
358
|
+
}
|
|
359
|
+
.react-flow__minimap {
|
|
360
|
+
background: var(
|
|
361
|
+
--xy-minimap-background-color-props,
|
|
362
|
+
var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
.react-flow__minimap-svg {
|
|
366
|
+
display: block;
|
|
367
|
+
}
|
|
368
|
+
.react-flow__minimap-mask {
|
|
369
|
+
fill: var(
|
|
370
|
+
--xy-minimap-mask-background-color-props,
|
|
371
|
+
var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))
|
|
372
|
+
);
|
|
373
|
+
stroke: var(
|
|
374
|
+
--xy-minimap-mask-stroke-color-props,
|
|
375
|
+
var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))
|
|
376
|
+
);
|
|
377
|
+
stroke-width: var(
|
|
378
|
+
--xy-minimap-mask-stroke-width-props,
|
|
379
|
+
var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
.react-flow__minimap-node {
|
|
383
|
+
fill: var(
|
|
384
|
+
--xy-minimap-node-background-color-props,
|
|
385
|
+
var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))
|
|
386
|
+
);
|
|
387
|
+
stroke: var(
|
|
388
|
+
--xy-minimap-node-stroke-color-props,
|
|
389
|
+
var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))
|
|
390
|
+
);
|
|
391
|
+
stroke-width: var(
|
|
392
|
+
--xy-minimap-node-stroke-width-props,
|
|
393
|
+
var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))
|
|
394
|
+
);
|
|
395
|
+
}
|
|
396
|
+
.react-flow__background-pattern.dots {
|
|
397
|
+
fill: var(
|
|
398
|
+
--xy-background-pattern-color-props,
|
|
399
|
+
var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
.react-flow__background-pattern.lines {
|
|
403
|
+
stroke: var(
|
|
404
|
+
--xy-background-pattern-color-props,
|
|
405
|
+
var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
.react-flow__background-pattern.cross {
|
|
409
|
+
stroke: var(
|
|
410
|
+
--xy-background-pattern-color-props,
|
|
411
|
+
var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
.react-flow__controls {
|
|
415
|
+
display: flex;
|
|
416
|
+
flex-direction: column;
|
|
417
|
+
box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));
|
|
418
|
+
}
|
|
419
|
+
.react-flow__controls.horizontal {
|
|
420
|
+
flex-direction: row;
|
|
421
|
+
}
|
|
422
|
+
.react-flow__controls-button {
|
|
423
|
+
display: flex;
|
|
424
|
+
justify-content: center;
|
|
425
|
+
align-items: center;
|
|
426
|
+
height: 26px;
|
|
427
|
+
width: 26px;
|
|
428
|
+
padding: 4px;
|
|
429
|
+
border: none;
|
|
430
|
+
background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));
|
|
431
|
+
border-bottom: 1px solid
|
|
432
|
+
var(
|
|
433
|
+
--xy-controls-button-border-color-props,
|
|
434
|
+
var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
|
|
435
|
+
);
|
|
436
|
+
color: var(
|
|
437
|
+
--xy-controls-button-color-props,
|
|
438
|
+
var(--xy-controls-button-color, var(--xy-controls-button-color-default))
|
|
439
|
+
);
|
|
440
|
+
cursor: pointer;
|
|
441
|
+
-webkit-user-select: none;
|
|
442
|
+
-moz-user-select: none;
|
|
443
|
+
user-select: none;
|
|
444
|
+
}
|
|
445
|
+
.react-flow__controls-button svg {
|
|
446
|
+
width: 100%;
|
|
447
|
+
max-width: 12px;
|
|
448
|
+
max-height: 12px;
|
|
449
|
+
fill: currentColor;
|
|
450
|
+
}
|
|
451
|
+
.react-flow__edge.updating .react-flow__edge-path {
|
|
452
|
+
stroke: #777;
|
|
453
|
+
}
|
|
454
|
+
.react-flow__edge-text {
|
|
455
|
+
font-size: 10px;
|
|
456
|
+
}
|
|
457
|
+
.react-flow__node.selectable:focus,
|
|
458
|
+
.react-flow__node.selectable:focus-visible {
|
|
459
|
+
outline: none;
|
|
460
|
+
}
|
|
461
|
+
.react-flow__node-input,
|
|
462
|
+
.react-flow__node-default,
|
|
463
|
+
.react-flow__node-output,
|
|
464
|
+
.react-flow__node-group {
|
|
465
|
+
padding: 10px;
|
|
466
|
+
border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));
|
|
467
|
+
width: 150px;
|
|
468
|
+
font-size: 12px;
|
|
469
|
+
color: var(--xy-node-color, var(--xy-node-color-default));
|
|
470
|
+
text-align: center;
|
|
471
|
+
border: var(--xy-node-border, var(--xy-node-border-default));
|
|
472
|
+
background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));
|
|
473
|
+
}
|
|
474
|
+
.react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {
|
|
475
|
+
box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));
|
|
476
|
+
}
|
|
477
|
+
.react-flow__node-input.selectable.selected,
|
|
478
|
+
.react-flow__node-input.selectable:focus,
|
|
479
|
+
.react-flow__node-input.selectable:focus-visible,
|
|
480
|
+
.react-flow__node-default.selectable.selected,
|
|
481
|
+
.react-flow__node-default.selectable:focus,
|
|
482
|
+
.react-flow__node-default.selectable:focus-visible,
|
|
483
|
+
.react-flow__node-output.selectable.selected,
|
|
484
|
+
.react-flow__node-output.selectable:focus,
|
|
485
|
+
.react-flow__node-output.selectable:focus-visible,
|
|
486
|
+
.react-flow__node-group.selectable.selected,
|
|
487
|
+
.react-flow__node-group.selectable:focus,
|
|
488
|
+
.react-flow__node-group.selectable:focus-visible {
|
|
489
|
+
box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));
|
|
490
|
+
}
|
|
491
|
+
.react-flow__node-group {
|
|
492
|
+
background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));
|
|
493
|
+
}
|
|
494
|
+
.react-flow__nodesselection-rect,
|
|
495
|
+
.react-flow__selection {
|
|
496
|
+
background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));
|
|
497
|
+
border: var(--xy-selection-border, var(--xy-selection-border-default));
|
|
498
|
+
}
|
|
499
|
+
.react-flow__nodesselection-rect:focus,
|
|
500
|
+
.react-flow__nodesselection-rect:focus-visible,
|
|
501
|
+
.react-flow__selection:focus,
|
|
502
|
+
.react-flow__selection:focus-visible {
|
|
503
|
+
outline: none;
|
|
504
|
+
}
|
|
505
|
+
.react-flow__controls-button:hover {
|
|
506
|
+
background: var(
|
|
507
|
+
--xy-controls-button-background-color-hover-props,
|
|
508
|
+
var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))
|
|
509
|
+
);
|
|
510
|
+
color: var(
|
|
511
|
+
--xy-controls-button-color-hover-props,
|
|
512
|
+
var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
.react-flow__controls-button:disabled {
|
|
516
|
+
pointer-events: none;
|
|
517
|
+
}
|
|
518
|
+
.react-flow__controls-button:disabled svg {
|
|
519
|
+
fill-opacity: 0.4;
|
|
520
|
+
}
|
|
521
|
+
.react-flow__controls-button:last-child {
|
|
522
|
+
border-bottom: none;
|
|
523
|
+
}
|
|
524
|
+
.react-flow__controls.horizontal .react-flow__controls-button {
|
|
525
|
+
border-bottom: none;
|
|
526
|
+
border-right: 1px solid
|
|
527
|
+
var(
|
|
528
|
+
--xy-controls-button-border-color-props,
|
|
529
|
+
var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
|
|
530
|
+
);
|
|
531
|
+
}
|
|
532
|
+
.react-flow__controls.horizontal .react-flow__controls-button:last-child {
|
|
533
|
+
border-right: none;
|
|
534
|
+
}
|
|
535
|
+
.react-flow__resize-control {
|
|
536
|
+
position: absolute;
|
|
537
|
+
}
|
|
538
|
+
.react-flow__resize-control.left,
|
|
539
|
+
.react-flow__resize-control.right {
|
|
540
|
+
cursor: ew-resize;
|
|
541
|
+
}
|
|
542
|
+
.react-flow__resize-control.top,
|
|
543
|
+
.react-flow__resize-control.bottom {
|
|
544
|
+
cursor: ns-resize;
|
|
545
|
+
}
|
|
546
|
+
.react-flow__resize-control.top.left,
|
|
547
|
+
.react-flow__resize-control.bottom.right {
|
|
548
|
+
cursor: nwse-resize;
|
|
549
|
+
}
|
|
550
|
+
.react-flow__resize-control.bottom.left,
|
|
551
|
+
.react-flow__resize-control.top.right {
|
|
552
|
+
cursor: nesw-resize;
|
|
553
|
+
}
|
|
554
|
+
/* handle styles */
|
|
555
|
+
.react-flow__resize-control.handle {
|
|
556
|
+
width: 5px;
|
|
557
|
+
height: 5px;
|
|
558
|
+
border: 1px solid #fff;
|
|
559
|
+
border-radius: 1px;
|
|
560
|
+
background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
|
|
561
|
+
translate: -50% -50%;
|
|
562
|
+
}
|
|
563
|
+
.react-flow__resize-control.handle.left {
|
|
564
|
+
left: 0;
|
|
565
|
+
top: 50%;
|
|
566
|
+
}
|
|
567
|
+
.react-flow__resize-control.handle.right {
|
|
568
|
+
left: 100%;
|
|
569
|
+
top: 50%;
|
|
570
|
+
}
|
|
571
|
+
.react-flow__resize-control.handle.top {
|
|
572
|
+
left: 50%;
|
|
573
|
+
top: 0;
|
|
574
|
+
}
|
|
575
|
+
.react-flow__resize-control.handle.bottom {
|
|
576
|
+
left: 50%;
|
|
577
|
+
top: 100%;
|
|
578
|
+
}
|
|
579
|
+
.react-flow__resize-control.handle.top.left {
|
|
580
|
+
left: 0;
|
|
581
|
+
}
|
|
582
|
+
.react-flow__resize-control.handle.bottom.left {
|
|
583
|
+
left: 0;
|
|
584
|
+
}
|
|
585
|
+
.react-flow__resize-control.handle.top.right {
|
|
586
|
+
left: 100%;
|
|
587
|
+
}
|
|
588
|
+
.react-flow__resize-control.handle.bottom.right {
|
|
589
|
+
left: 100%;
|
|
590
|
+
}
|
|
591
|
+
/* line styles */
|
|
592
|
+
.react-flow__resize-control.line {
|
|
593
|
+
border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
|
|
594
|
+
border-width: 0;
|
|
595
|
+
border-style: solid;
|
|
596
|
+
}
|
|
597
|
+
.react-flow__resize-control.line.left,
|
|
598
|
+
.react-flow__resize-control.line.right {
|
|
599
|
+
width: 1px;
|
|
600
|
+
transform: translate(-50%, 0);
|
|
601
|
+
top: 0;
|
|
602
|
+
height: 100%;
|
|
603
|
+
}
|
|
604
|
+
.react-flow__resize-control.line.left {
|
|
605
|
+
left: 0;
|
|
606
|
+
border-left-width: 1px;
|
|
607
|
+
}
|
|
608
|
+
.react-flow__resize-control.line.right {
|
|
609
|
+
left: 100%;
|
|
610
|
+
border-right-width: 1px;
|
|
611
|
+
}
|
|
612
|
+
.react-flow__resize-control.line.top,
|
|
613
|
+
.react-flow__resize-control.line.bottom {
|
|
614
|
+
height: 1px;
|
|
615
|
+
transform: translate(0, -50%);
|
|
616
|
+
left: 0;
|
|
617
|
+
width: 100%;
|
|
618
|
+
}
|
|
619
|
+
.react-flow__resize-control.line.top {
|
|
620
|
+
top: 0;
|
|
621
|
+
border-top-width: 1px;
|
|
622
|
+
}
|
|
623
|
+
.react-flow__resize-control.line.bottom {
|
|
624
|
+
border-bottom-width: 1px;
|
|
625
|
+
top: 100%;
|
|
626
|
+
}
|
|
627
|
+
.react-flow__edge-textbg {
|
|
628
|
+
fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));
|
|
629
|
+
}
|
|
630
|
+
.react-flow__edge-text {
|
|
631
|
+
fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
:root {
|
|
635
|
+
--bg-canvas: #fafafa;
|
|
636
|
+
--bg-surface: #ffffff;
|
|
637
|
+
--bg-subtle: #f4f4f5;
|
|
638
|
+
--bg-hover: #e4e4e7;
|
|
639
|
+
--bg-active: #18181b;
|
|
640
|
+
--text-primary: #09090b;
|
|
641
|
+
--text-secondary: #52525b;
|
|
642
|
+
--text-muted: #71717a;
|
|
643
|
+
--text-inverse: #fafafa;
|
|
644
|
+
--border-subtle: #e4e4e7;
|
|
645
|
+
--border-strong: #d4d4d8;
|
|
646
|
+
--border-focus: #18181b;
|
|
647
|
+
--accent-warn-bg: #fafaf9;
|
|
648
|
+
--accent-warn-border: #d6d3d1;
|
|
649
|
+
--accent-warn-text: #78716c;
|
|
650
|
+
--accent-ok-dot: #15803d;
|
|
651
|
+
--accent-warn-dot: #b45309;
|
|
652
|
+
--shadow-xs: 0 1px 2px rgba(9, 9, 11, 0.04);
|
|
653
|
+
--shadow-sm: 0 2px 8px rgba(9, 9, 11, 0.06);
|
|
654
|
+
--shadow-md: 0 12px 32px rgba(9, 9, 11, 0.12);
|
|
655
|
+
--radius-sm: 6px;
|
|
656
|
+
--radius-md: 8px;
|
|
657
|
+
--radius-lg: 10px;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
*,
|
|
661
|
+
*::before,
|
|
662
|
+
*::after {
|
|
663
|
+
box-sizing: border-box;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
@media (pointer: fine) {
|
|
667
|
+
html {
|
|
668
|
+
overscroll-behavior: none;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
html,
|
|
673
|
+
body,
|
|
674
|
+
#root {
|
|
675
|
+
margin: 0;
|
|
676
|
+
padding: 0;
|
|
677
|
+
width: 100%;
|
|
678
|
+
height: 100%;
|
|
679
|
+
overflow: hidden;
|
|
680
|
+
font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
|
681
|
+
font-size: 13px;
|
|
682
|
+
line-height: 1.5;
|
|
683
|
+
color: var(--text-primary);
|
|
684
|
+
background-color: var(--bg-canvas);
|
|
685
|
+
-webkit-font-smoothing: antialiased;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.sr-only {
|
|
689
|
+
position: absolute;
|
|
690
|
+
width: 1px;
|
|
691
|
+
height: 1px;
|
|
692
|
+
padding: 0;
|
|
693
|
+
margin: -1px;
|
|
694
|
+
overflow: hidden;
|
|
695
|
+
clip: rect(0, 0, 0, 0);
|
|
696
|
+
white-space: nowrap;
|
|
697
|
+
border: 0;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
.atlas-skip-link {
|
|
701
|
+
position: absolute;
|
|
702
|
+
top: -48px;
|
|
703
|
+
left: 12px;
|
|
704
|
+
z-index: 999;
|
|
705
|
+
padding: 6px 12px;
|
|
706
|
+
background: var(--bg-active);
|
|
707
|
+
color: var(--text-inverse);
|
|
708
|
+
border-radius: var(--radius-sm);
|
|
709
|
+
text-decoration: none;
|
|
710
|
+
font-weight: 500;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.atlas-skip-link:focus-visible {
|
|
714
|
+
top: 12px;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
button,
|
|
718
|
+
a,
|
|
719
|
+
input {
|
|
720
|
+
font-family: inherit;
|
|
721
|
+
touch-action: manipulation;
|
|
722
|
+
-webkit-tap-highlight-color: transparent;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
button:focus-visible,
|
|
726
|
+
a:focus-visible,
|
|
727
|
+
input:focus-visible {
|
|
728
|
+
outline: 2px solid var(--border-focus);
|
|
729
|
+
outline-offset: 2px;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.atlas-shell-root {
|
|
733
|
+
display: flex;
|
|
734
|
+
flex-direction: column;
|
|
735
|
+
width: 100%;
|
|
736
|
+
height: 100%;
|
|
737
|
+
padding-top: env(safe-area-inset-top);
|
|
738
|
+
padding-bottom: env(safe-area-inset-bottom);
|
|
739
|
+
padding-left: env(safe-area-inset-left);
|
|
740
|
+
padding-right: env(safe-area-inset-right);
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
/* Top Header */
|
|
744
|
+
.atlas-topbar {
|
|
745
|
+
display: flex;
|
|
746
|
+
justify-content: space-between;
|
|
747
|
+
align-items: center;
|
|
748
|
+
gap: 16px;
|
|
749
|
+
padding: 10px 20px;
|
|
750
|
+
background: var(--bg-surface);
|
|
751
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
752
|
+
flex-shrink: 0;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
.atlas-topbar-left {
|
|
756
|
+
min-width: 0;
|
|
757
|
+
flex: 1;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.atlas-top-badges {
|
|
761
|
+
display: flex;
|
|
762
|
+
align-items: center;
|
|
763
|
+
gap: 6px;
|
|
764
|
+
margin-bottom: 2px;
|
|
765
|
+
flex-wrap: wrap;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
.atlas-parent-link {
|
|
769
|
+
display: inline-flex;
|
|
770
|
+
align-items: center;
|
|
771
|
+
gap: 4px;
|
|
772
|
+
font-size: 11.5px;
|
|
773
|
+
font-weight: 500;
|
|
774
|
+
color: var(--text-primary);
|
|
775
|
+
background: var(--bg-subtle);
|
|
776
|
+
border: 1px solid var(--border-subtle);
|
|
777
|
+
padding: 1px 8px;
|
|
778
|
+
border-radius: var(--radius-sm);
|
|
779
|
+
text-decoration: none;
|
|
780
|
+
transition: background-color 140ms ease, border-color 140ms ease;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
.atlas-parent-link:hover {
|
|
784
|
+
background: var(--bg-hover);
|
|
785
|
+
border-color: var(--border-strong);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
.atlas-subject-badge,
|
|
789
|
+
.atlas-level-badge {
|
|
790
|
+
font-size: 11px;
|
|
791
|
+
font-weight: 500;
|
|
792
|
+
color: var(--text-secondary);
|
|
793
|
+
background: var(--bg-subtle);
|
|
794
|
+
border: 1px solid var(--border-subtle);
|
|
795
|
+
padding: 1px 7px;
|
|
796
|
+
border-radius: var(--radius-sm);
|
|
797
|
+
font-variant-numeric: tabular-nums;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
.atlas-title-row {
|
|
801
|
+
display: flex;
|
|
802
|
+
align-items: baseline;
|
|
803
|
+
gap: 10px;
|
|
804
|
+
flex-wrap: wrap;
|
|
805
|
+
min-width: 0;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
.atlas-main-title {
|
|
809
|
+
margin: 0;
|
|
810
|
+
font-size: 15px;
|
|
811
|
+
font-weight: 600;
|
|
812
|
+
letter-spacing: -0.01em;
|
|
813
|
+
line-height: 1.35;
|
|
814
|
+
text-wrap: balance;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
.atlas-subtitle {
|
|
818
|
+
margin: 0;
|
|
819
|
+
font-size: 12px;
|
|
820
|
+
color: var(--text-muted);
|
|
821
|
+
text-wrap: pretty;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
.atlas-topbar-right {
|
|
825
|
+
display: flex;
|
|
826
|
+
align-items: center;
|
|
827
|
+
gap: 8px;
|
|
828
|
+
flex-shrink: 0;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.atlas-model-pill {
|
|
832
|
+
font-size: 11.5px;
|
|
833
|
+
font-weight: 500;
|
|
834
|
+
color: var(--text-secondary);
|
|
835
|
+
background: var(--bg-subtle);
|
|
836
|
+
border: 1px solid var(--border-subtle);
|
|
837
|
+
padding: 4px 9px;
|
|
838
|
+
border-radius: var(--radius-sm);
|
|
839
|
+
font-variant-numeric: tabular-nums;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
.atlas-scope-btn {
|
|
843
|
+
font-size: 11.5px;
|
|
844
|
+
font-weight: 500;
|
|
845
|
+
color: var(--text-primary);
|
|
846
|
+
background: var(--bg-surface);
|
|
847
|
+
border: 1px solid var(--border-strong);
|
|
848
|
+
padding: 4px 9px;
|
|
849
|
+
border-radius: var(--radius-sm);
|
|
850
|
+
cursor: pointer;
|
|
851
|
+
font-variant-numeric: tabular-nums;
|
|
852
|
+
transition: background-color 140ms ease, border-color 140ms ease;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
.atlas-scope-btn:hover {
|
|
856
|
+
background: var(--bg-subtle);
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
/* Toolbar */
|
|
860
|
+
.atlas-toolbar-row {
|
|
861
|
+
display: flex;
|
|
862
|
+
justify-content: space-between;
|
|
863
|
+
align-items: center;
|
|
864
|
+
gap: 12px;
|
|
865
|
+
padding: 7px 20px;
|
|
866
|
+
background: var(--bg-surface);
|
|
867
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
868
|
+
flex-shrink: 0;
|
|
869
|
+
flex-wrap: wrap;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
.atlas-streams-bar {
|
|
873
|
+
display: flex;
|
|
874
|
+
align-items: center;
|
|
875
|
+
gap: 6px;
|
|
876
|
+
flex-wrap: wrap;
|
|
877
|
+
min-width: 0;
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.atlas-stream-pill-group {
|
|
881
|
+
display: inline-flex;
|
|
882
|
+
align-items: center;
|
|
883
|
+
border: 1px solid var(--border-subtle);
|
|
884
|
+
border-radius: var(--radius-sm);
|
|
885
|
+
background: var(--bg-surface);
|
|
886
|
+
overflow: hidden;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
.atlas-stream-pill-group.active {
|
|
890
|
+
border-color: var(--bg-active);
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
.atlas-stream-pill {
|
|
894
|
+
font-size: 12px;
|
|
895
|
+
font-weight: 500;
|
|
896
|
+
padding: 4px 10px;
|
|
897
|
+
border: 1px solid var(--border-subtle);
|
|
898
|
+
border-radius: var(--radius-sm);
|
|
899
|
+
background: var(--bg-surface);
|
|
900
|
+
color: var(--text-secondary);
|
|
901
|
+
cursor: pointer;
|
|
902
|
+
transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
.atlas-stream-pill-group .atlas-stream-pill {
|
|
906
|
+
border: none;
|
|
907
|
+
border-radius: 0;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.atlas-stream-pill:hover {
|
|
911
|
+
background: var(--bg-subtle);
|
|
912
|
+
color: var(--text-primary);
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
.atlas-stream-pill.active {
|
|
916
|
+
background: var(--bg-active);
|
|
917
|
+
color: var(--text-inverse);
|
|
918
|
+
border-color: var(--bg-active);
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
.atlas-stream-help-btn {
|
|
922
|
+
width: 24px;
|
|
923
|
+
height: 26px;
|
|
924
|
+
border: none;
|
|
925
|
+
border-left: 1px solid var(--border-subtle);
|
|
926
|
+
background: var(--bg-subtle);
|
|
927
|
+
color: var(--text-secondary);
|
|
928
|
+
font-weight: 600;
|
|
929
|
+
font-size: 11.5px;
|
|
930
|
+
cursor: pointer;
|
|
931
|
+
display: inline-flex;
|
|
932
|
+
align-items: center;
|
|
933
|
+
justify-content: center;
|
|
934
|
+
transition: background-color 140ms ease, color 140ms ease;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.atlas-stream-help-btn:hover {
|
|
938
|
+
background: var(--bg-hover);
|
|
939
|
+
color: var(--text-primary);
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
.atlas-controls-group {
|
|
943
|
+
display: flex;
|
|
944
|
+
align-items: center;
|
|
945
|
+
gap: 8px;
|
|
946
|
+
flex-wrap: wrap;
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
.atlas-search-box {
|
|
950
|
+
position: relative;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
.atlas-search-field {
|
|
954
|
+
display: flex;
|
|
955
|
+
align-items: center;
|
|
956
|
+
gap: 6px;
|
|
957
|
+
padding: 0 9px;
|
|
958
|
+
height: 28px;
|
|
959
|
+
border: 1px solid var(--border-subtle);
|
|
960
|
+
border-radius: var(--radius-sm);
|
|
961
|
+
background: var(--bg-canvas);
|
|
962
|
+
transition: border-color 140ms ease, background-color 140ms ease;
|
|
963
|
+
}
|
|
964
|
+
|
|
965
|
+
.atlas-search-field:focus-within {
|
|
966
|
+
background: var(--bg-surface);
|
|
967
|
+
border-color: var(--border-focus);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
.atlas-search-icon {
|
|
971
|
+
color: var(--text-muted);
|
|
972
|
+
flex-shrink: 0;
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
.atlas-search-input {
|
|
976
|
+
width: 210px;
|
|
977
|
+
border: none;
|
|
978
|
+
background: transparent;
|
|
979
|
+
font-size: 12px;
|
|
980
|
+
color: var(--text-primary);
|
|
981
|
+
padding: 0;
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
.atlas-search-input:focus {
|
|
985
|
+
outline: none;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.atlas-search-input::placeholder {
|
|
989
|
+
color: var(--text-muted);
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
.atlas-search-dropdown {
|
|
993
|
+
position: absolute;
|
|
994
|
+
top: calc(100% + 4px);
|
|
995
|
+
right: 0;
|
|
996
|
+
width: 320px;
|
|
997
|
+
max-height: 300px;
|
|
998
|
+
overflow-y: auto;
|
|
999
|
+
overscroll-behavior: contain;
|
|
1000
|
+
background: var(--bg-surface);
|
|
1001
|
+
border: 1px solid var(--border-strong);
|
|
1002
|
+
border-radius: var(--radius-md);
|
|
1003
|
+
box-shadow: var(--shadow-md);
|
|
1004
|
+
z-index: 60;
|
|
1005
|
+
padding: 4px;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
.atlas-search-item {
|
|
1009
|
+
display: block;
|
|
1010
|
+
width: 100%;
|
|
1011
|
+
text-align: left;
|
|
1012
|
+
padding: 6px 8px;
|
|
1013
|
+
border: none;
|
|
1014
|
+
background: transparent;
|
|
1015
|
+
border-radius: var(--radius-sm);
|
|
1016
|
+
cursor: pointer;
|
|
1017
|
+
transition: background-color 120ms ease;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.atlas-search-item:hover {
|
|
1021
|
+
background: var(--bg-subtle);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
.atlas-search-item-title {
|
|
1025
|
+
font-size: 12px;
|
|
1026
|
+
font-weight: 600;
|
|
1027
|
+
color: var(--text-primary);
|
|
1028
|
+
display: flex;
|
|
1029
|
+
align-items: center;
|
|
1030
|
+
gap: 6px;
|
|
1031
|
+
min-width: 0;
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
.atlas-search-item-sub {
|
|
1035
|
+
font-size: 11px;
|
|
1036
|
+
color: var(--text-muted);
|
|
1037
|
+
margin-top: 2px;
|
|
1038
|
+
overflow: hidden;
|
|
1039
|
+
text-overflow: ellipsis;
|
|
1040
|
+
white-space: nowrap;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.atlas-search-empty {
|
|
1044
|
+
padding: 10px;
|
|
1045
|
+
font-size: 12px;
|
|
1046
|
+
color: var(--text-muted);
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
.atlas-canvas-btns {
|
|
1050
|
+
display: inline-flex;
|
|
1051
|
+
align-items: center;
|
|
1052
|
+
gap: 4px;
|
|
1053
|
+
flex-wrap: wrap;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
.atlas-ctrl-btn {
|
|
1057
|
+
display: inline-flex;
|
|
1058
|
+
align-items: center;
|
|
1059
|
+
gap: 5px;
|
|
1060
|
+
height: 28px;
|
|
1061
|
+
padding: 0 9px;
|
|
1062
|
+
font-size: 12px;
|
|
1063
|
+
font-weight: 500;
|
|
1064
|
+
background: var(--bg-surface);
|
|
1065
|
+
color: var(--text-secondary);
|
|
1066
|
+
border: 1px solid var(--border-subtle);
|
|
1067
|
+
border-radius: var(--radius-sm);
|
|
1068
|
+
cursor: pointer;
|
|
1069
|
+
transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
.atlas-ctrl-btn:hover {
|
|
1073
|
+
background: var(--bg-subtle);
|
|
1074
|
+
color: var(--text-primary);
|
|
1075
|
+
border-color: var(--border-strong);
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
.atlas-ctrl-btn.locked,
|
|
1079
|
+
.atlas-ctrl-btn.active {
|
|
1080
|
+
background: var(--bg-active);
|
|
1081
|
+
color: var(--text-inverse);
|
|
1082
|
+
border-color: var(--bg-active);
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
/* Recommended Learning Path */
|
|
1086
|
+
.atlas-reading-bar {
|
|
1087
|
+
display: flex;
|
|
1088
|
+
align-items: center;
|
|
1089
|
+
gap: 8px;
|
|
1090
|
+
padding: 6px 20px;
|
|
1091
|
+
background: var(--bg-canvas);
|
|
1092
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
1093
|
+
overflow-x: auto;
|
|
1094
|
+
flex-shrink: 0;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.atlas-reading-label {
|
|
1098
|
+
font-size: 11.5px;
|
|
1099
|
+
font-weight: 500;
|
|
1100
|
+
color: var(--text-muted);
|
|
1101
|
+
white-space: nowrap;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
.atlas-reading-steps {
|
|
1105
|
+
display: flex;
|
|
1106
|
+
align-items: center;
|
|
1107
|
+
gap: 4px;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
.atlas-step-chip {
|
|
1111
|
+
display: inline-flex;
|
|
1112
|
+
align-items: center;
|
|
1113
|
+
gap: 5px;
|
|
1114
|
+
font-size: 11.5px;
|
|
1115
|
+
font-weight: 500;
|
|
1116
|
+
padding: 2px 8px;
|
|
1117
|
+
border-radius: var(--radius-sm);
|
|
1118
|
+
border: 1px solid transparent;
|
|
1119
|
+
background: transparent;
|
|
1120
|
+
color: var(--text-secondary);
|
|
1121
|
+
cursor: pointer;
|
|
1122
|
+
white-space: nowrap;
|
|
1123
|
+
font-variant-numeric: tabular-nums;
|
|
1124
|
+
transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
.atlas-step-chip:hover {
|
|
1128
|
+
background: var(--bg-surface);
|
|
1129
|
+
border-color: var(--border-subtle);
|
|
1130
|
+
color: var(--text-primary);
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
.atlas-step-chip.active {
|
|
1134
|
+
background: var(--bg-surface);
|
|
1135
|
+
border-color: var(--border-focus);
|
|
1136
|
+
color: var(--text-primary);
|
|
1137
|
+
font-weight: 600;
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
|
+
.atlas-step-num {
|
|
1141
|
+
display: inline-flex;
|
|
1142
|
+
align-items: center;
|
|
1143
|
+
justify-content: center;
|
|
1144
|
+
min-width: 16px;
|
|
1145
|
+
height: 16px;
|
|
1146
|
+
padding: 0 4px;
|
|
1147
|
+
border-radius: 4px;
|
|
1148
|
+
background: var(--bg-subtle);
|
|
1149
|
+
color: var(--text-secondary);
|
|
1150
|
+
font-size: 10.5px;
|
|
1151
|
+
font-weight: 600;
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
.atlas-step-chip.active .atlas-step-num {
|
|
1155
|
+
background: var(--bg-active);
|
|
1156
|
+
color: var(--text-inverse);
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
/* Workspace & Canvas */
|
|
1160
|
+
.atlas-main-workspace {
|
|
1161
|
+
flex: 1;
|
|
1162
|
+
min-height: 0;
|
|
1163
|
+
display: flex;
|
|
1164
|
+
position: relative;
|
|
1165
|
+
width: 100%;
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.atlas-canvas-container {
|
|
1169
|
+
flex: 1;
|
|
1170
|
+
height: 100%;
|
|
1171
|
+
min-height: 400px;
|
|
1172
|
+
position: relative;
|
|
1173
|
+
background: var(--bg-canvas);
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/* Node Card — Restrained Architectural Style */
|
|
1177
|
+
.react-flow__node-atlasNode {
|
|
1178
|
+
border-radius: var(--radius-lg) !important;
|
|
1179
|
+
box-shadow: none !important;
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
.react-flow__node-atlasNode:focus,
|
|
1183
|
+
.react-flow__node-atlasNode:focus-visible {
|
|
1184
|
+
outline: none !important;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
.react-flow__node-atlasNode:focus-visible .atlas-node {
|
|
1188
|
+
outline: 2px solid var(--border-focus);
|
|
1189
|
+
outline-offset: 2px;
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
.atlas-node {
|
|
1193
|
+
background: var(--bg-surface);
|
|
1194
|
+
border: 1px solid var(--border-subtle);
|
|
1195
|
+
border-radius: var(--radius-lg);
|
|
1196
|
+
padding: 11px 13px;
|
|
1197
|
+
box-shadow: var(--shadow-xs);
|
|
1198
|
+
display: flex;
|
|
1199
|
+
flex-direction: column;
|
|
1200
|
+
gap: 6px;
|
|
1201
|
+
position: relative;
|
|
1202
|
+
transition: border-color 140ms ease, box-shadow 140ms ease;
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
.atlas-node:hover {
|
|
1206
|
+
border-color: var(--border-strong);
|
|
1207
|
+
box-shadow: var(--shadow-sm);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
.atlas-node-sub {
|
|
1211
|
+
background: var(--bg-canvas);
|
|
1212
|
+
border-style: dashed;
|
|
1213
|
+
border-color: var(--border-strong);
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
.atlas-node-selected {
|
|
1217
|
+
border-color: var(--border-focus) !important;
|
|
1218
|
+
box-shadow: 0 0 0 1px var(--border-focus), var(--shadow-sm) !important;
|
|
1219
|
+
}
|
|
1220
|
+
|
|
1221
|
+
.atlas-handle {
|
|
1222
|
+
width: 6px !important;
|
|
1223
|
+
height: 6px !important;
|
|
1224
|
+
background: var(--border-strong) !important;
|
|
1225
|
+
border: 1px solid var(--bg-surface) !important;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
.atlas-node-header {
|
|
1229
|
+
display: flex;
|
|
1230
|
+
justify-content: space-between;
|
|
1231
|
+
align-items: center;
|
|
1232
|
+
gap: 6px;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
.atlas-node-badges {
|
|
1236
|
+
display: flex;
|
|
1237
|
+
align-items: center;
|
|
1238
|
+
gap: 5px;
|
|
1239
|
+
flex-wrap: wrap;
|
|
1240
|
+
min-width: 0;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
.atlas-role-badge {
|
|
1244
|
+
display: inline-flex;
|
|
1245
|
+
align-items: center;
|
|
1246
|
+
gap: 5px;
|
|
1247
|
+
font-size: 10.5px;
|
|
1248
|
+
font-weight: 500;
|
|
1249
|
+
color: var(--text-secondary);
|
|
1250
|
+
background: var(--bg-subtle);
|
|
1251
|
+
border: 1px solid var(--border-subtle);
|
|
1252
|
+
padding: 1px 6px;
|
|
1253
|
+
border-radius: 4px;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.atlas-role-dot {
|
|
1257
|
+
width: 6px;
|
|
1258
|
+
height: 6px;
|
|
1259
|
+
border-radius: 50%;
|
|
1260
|
+
flex-shrink: 0;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
.atlas-sub-pill {
|
|
1264
|
+
font-size: 10px;
|
|
1265
|
+
font-weight: 500;
|
|
1266
|
+
padding: 1px 5px;
|
|
1267
|
+
border-radius: 4px;
|
|
1268
|
+
background: var(--bg-subtle);
|
|
1269
|
+
color: var(--text-muted);
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
.atlas-unverified-pill {
|
|
1273
|
+
font-size: 10px;
|
|
1274
|
+
font-weight: 500;
|
|
1275
|
+
padding: 1px 5px;
|
|
1276
|
+
border-radius: 4px;
|
|
1277
|
+
background: var(--accent-warn-bg);
|
|
1278
|
+
color: var(--accent-warn-text);
|
|
1279
|
+
border: 1px dashed var(--accent-warn-border);
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
.atlas-help-wrap {
|
|
1283
|
+
position: relative;
|
|
1284
|
+
flex-shrink: 0;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
.atlas-help-btn {
|
|
1288
|
+
width: 20px;
|
|
1289
|
+
height: 20px;
|
|
1290
|
+
border-radius: 50%;
|
|
1291
|
+
border: 1px solid var(--border-strong);
|
|
1292
|
+
background: var(--bg-surface);
|
|
1293
|
+
color: var(--text-secondary);
|
|
1294
|
+
font-size: 11.5px;
|
|
1295
|
+
font-weight: 600;
|
|
1296
|
+
line-height: 1;
|
|
1297
|
+
display: inline-flex;
|
|
1298
|
+
align-items: center;
|
|
1299
|
+
justify-content: center;
|
|
1300
|
+
cursor: pointer;
|
|
1301
|
+
transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
.atlas-help-btn:hover {
|
|
1305
|
+
background: var(--bg-active);
|
|
1306
|
+
border-color: var(--bg-active);
|
|
1307
|
+
color: var(--text-inverse);
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
.atlas-help-tooltip {
|
|
1311
|
+
position: absolute;
|
|
1312
|
+
bottom: calc(100% + 7px);
|
|
1313
|
+
right: 0;
|
|
1314
|
+
width: 224px;
|
|
1315
|
+
padding: 7px 9px;
|
|
1316
|
+
background: var(--bg-active);
|
|
1317
|
+
color: var(--text-inverse);
|
|
1318
|
+
font-size: 11px;
|
|
1319
|
+
line-height: 1.45;
|
|
1320
|
+
border-radius: var(--radius-sm);
|
|
1321
|
+
box-shadow: var(--shadow-md);
|
|
1322
|
+
z-index: 100;
|
|
1323
|
+
pointer-events: none;
|
|
1324
|
+
text-wrap: pretty;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
.atlas-node-body {
|
|
1328
|
+
display: block;
|
|
1329
|
+
width: 100%;
|
|
1330
|
+
padding: 0;
|
|
1331
|
+
margin: 0;
|
|
1332
|
+
text-align: left;
|
|
1333
|
+
color: inherit;
|
|
1334
|
+
min-width: 0;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
.atlas-node-title {
|
|
1338
|
+
font-size: 13px;
|
|
1339
|
+
font-weight: 600;
|
|
1340
|
+
color: var(--text-primary);
|
|
1341
|
+
line-height: 1.38;
|
|
1342
|
+
overflow-wrap: break-word;
|
|
1343
|
+
text-wrap: balance;
|
|
1344
|
+
}
|
|
1345
|
+
|
|
1346
|
+
.atlas-node-summary {
|
|
1347
|
+
margin-top: 3px;
|
|
1348
|
+
font-size: 11.5px;
|
|
1349
|
+
color: var(--text-muted);
|
|
1350
|
+
line-height: 1.45;
|
|
1351
|
+
display: -webkit-box;
|
|
1352
|
+
-webkit-line-clamp: 2;
|
|
1353
|
+
-webkit-box-orient: vertical;
|
|
1354
|
+
overflow: hidden;
|
|
1355
|
+
overflow-wrap: break-word;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
.atlas-node-footer {
|
|
1359
|
+
display: flex;
|
|
1360
|
+
justify-content: space-between;
|
|
1361
|
+
align-items: center;
|
|
1362
|
+
margin-top: 2px;
|
|
1363
|
+
padding-top: 6px;
|
|
1364
|
+
border-top: 1px solid var(--border-subtle);
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
.atlas-expand-btn {
|
|
1368
|
+
font-size: 11px;
|
|
1369
|
+
font-weight: 500;
|
|
1370
|
+
padding: 2px 7px;
|
|
1371
|
+
border-radius: 4px;
|
|
1372
|
+
border: 1px solid var(--border-subtle);
|
|
1373
|
+
background: var(--bg-subtle);
|
|
1374
|
+
color: var(--text-secondary);
|
|
1375
|
+
cursor: pointer;
|
|
1376
|
+
font-variant-numeric: tabular-nums;
|
|
1377
|
+
transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
.atlas-expand-btn:hover {
|
|
1381
|
+
background: var(--bg-hover);
|
|
1382
|
+
color: var(--text-primary);
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
.atlas-expand-btn.active {
|
|
1386
|
+
background: var(--bg-active);
|
|
1387
|
+
border-color: var(--bg-active);
|
|
1388
|
+
color: var(--text-inverse);
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
.atlas-anchor-count {
|
|
1392
|
+
font-size: 10.5px;
|
|
1393
|
+
font-weight: 500;
|
|
1394
|
+
color: var(--text-muted);
|
|
1395
|
+
font-variant-numeric: tabular-nums;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
/* Legend */
|
|
1399
|
+
.atlas-legend-card {
|
|
1400
|
+
position: absolute;
|
|
1401
|
+
top: 12px;
|
|
1402
|
+
left: 12px;
|
|
1403
|
+
background: rgba(255, 255, 255, 0.96);
|
|
1404
|
+
border: 1px solid var(--border-subtle);
|
|
1405
|
+
border-radius: var(--radius-md);
|
|
1406
|
+
padding: 10px 12px;
|
|
1407
|
+
box-shadow: var(--shadow-sm);
|
|
1408
|
+
z-index: 20;
|
|
1409
|
+
display: flex;
|
|
1410
|
+
flex-direction: column;
|
|
1411
|
+
gap: 5px;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
.atlas-legend-row {
|
|
1415
|
+
display: flex;
|
|
1416
|
+
align-items: center;
|
|
1417
|
+
gap: 8px;
|
|
1418
|
+
font-size: 11.5px;
|
|
1419
|
+
color: var(--text-secondary);
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
.atlas-legend-swatch {
|
|
1423
|
+
width: 7px;
|
|
1424
|
+
height: 7px;
|
|
1425
|
+
border-radius: 50%;
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
/* Right Inspector Drawer */
|
|
1429
|
+
.atlas-inspector {
|
|
1430
|
+
width: 380px;
|
|
1431
|
+
max-width: 44vw;
|
|
1432
|
+
height: 100%;
|
|
1433
|
+
overflow-y: auto;
|
|
1434
|
+
overflow-x: hidden;
|
|
1435
|
+
overscroll-behavior: contain;
|
|
1436
|
+
background: var(--bg-surface);
|
|
1437
|
+
border-left: 1px solid var(--border-subtle);
|
|
1438
|
+
padding: 16px 18px;
|
|
1439
|
+
flex-shrink: 0;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
.atlas-inspector-head {
|
|
1443
|
+
display: flex;
|
|
1444
|
+
justify-content: space-between;
|
|
1445
|
+
align-items: flex-start;
|
|
1446
|
+
gap: 10px;
|
|
1447
|
+
margin-bottom: 10px;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
.atlas-inspector-head-text {
|
|
1451
|
+
min-width: 0;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
.atlas-inspector-parent {
|
|
1455
|
+
font-size: 11px;
|
|
1456
|
+
color: var(--text-muted);
|
|
1457
|
+
margin-bottom: 2px;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
.atlas-inspector-title {
|
|
1461
|
+
margin: 0;
|
|
1462
|
+
font-size: 15px;
|
|
1463
|
+
font-weight: 600;
|
|
1464
|
+
line-height: 1.35;
|
|
1465
|
+
text-wrap: balance;
|
|
1466
|
+
overflow-wrap: break-word;
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
.atlas-icon-close {
|
|
1470
|
+
padding: 4px 8px;
|
|
1471
|
+
font-size: 11.5px;
|
|
1472
|
+
font-weight: 500;
|
|
1473
|
+
color: var(--text-secondary);
|
|
1474
|
+
border: 1px solid var(--border-subtle);
|
|
1475
|
+
border-radius: var(--radius-sm);
|
|
1476
|
+
background: var(--bg-surface);
|
|
1477
|
+
cursor: pointer;
|
|
1478
|
+
flex-shrink: 0;
|
|
1479
|
+
transition: background-color 140ms ease, color 140ms ease;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
.atlas-icon-close:hover {
|
|
1483
|
+
background: var(--bg-subtle);
|
|
1484
|
+
color: var(--text-primary);
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
.atlas-conf-badge {
|
|
1488
|
+
display: inline-flex;
|
|
1489
|
+
align-items: center;
|
|
1490
|
+
gap: 5px;
|
|
1491
|
+
font-size: 11px;
|
|
1492
|
+
font-weight: 500;
|
|
1493
|
+
padding: 2px 7px;
|
|
1494
|
+
border-radius: 4px;
|
|
1495
|
+
background: var(--bg-subtle);
|
|
1496
|
+
color: var(--text-secondary);
|
|
1497
|
+
border: 1px solid var(--border-subtle);
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
.atlas-unverified-note {
|
|
1501
|
+
margin: 6px 0 0 0;
|
|
1502
|
+
font-size: 12px;
|
|
1503
|
+
color: var(--text-secondary);
|
|
1504
|
+
background: var(--bg-subtle);
|
|
1505
|
+
border-left: 2px solid var(--accent-warn-dot);
|
|
1506
|
+
padding: 6px 9px;
|
|
1507
|
+
border-radius: 0 4px 4px 0;
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
.atlas-sec {
|
|
1511
|
+
margin-top: 14px;
|
|
1512
|
+
padding-top: 12px;
|
|
1513
|
+
border-top: 1px solid var(--border-subtle);
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
.atlas-sec h4 {
|
|
1517
|
+
margin: 0 0 5px 0;
|
|
1518
|
+
font-size: 11.5px;
|
|
1519
|
+
font-weight: 600;
|
|
1520
|
+
color: var(--text-muted);
|
|
1521
|
+
letter-spacing: 0.01em;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
.atlas-sec p,
|
|
1525
|
+
.atlas-kv {
|
|
1526
|
+
margin: 0;
|
|
1527
|
+
font-size: 12.5px;
|
|
1528
|
+
line-height: 1.58;
|
|
1529
|
+
color: var(--text-primary);
|
|
1530
|
+
overflow-wrap: break-word;
|
|
1531
|
+
text-wrap: pretty;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
.atlas-kv + .atlas-kv {
|
|
1535
|
+
margin-top: 6px;
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
.atlas-watchout-box {
|
|
1539
|
+
background: var(--bg-canvas);
|
|
1540
|
+
border: 1px solid var(--border-subtle);
|
|
1541
|
+
border-radius: var(--radius-sm);
|
|
1542
|
+
padding: 9px 11px;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
.atlas-anchor-list {
|
|
1546
|
+
display: flex;
|
|
1547
|
+
flex-direction: column;
|
|
1548
|
+
gap: 8px;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
.atlas-anchor-card {
|
|
1552
|
+
border: 1px solid var(--border-subtle);
|
|
1553
|
+
border-radius: var(--radius-sm);
|
|
1554
|
+
padding: 9px 10px;
|
|
1555
|
+
background: var(--bg-canvas);
|
|
1556
|
+
min-width: 0;
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
.atlas-anchor-label {
|
|
1560
|
+
font-size: 11.5px;
|
|
1561
|
+
font-weight: 600;
|
|
1562
|
+
color: var(--text-primary);
|
|
1563
|
+
margin-bottom: 4px;
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
.atlas-anchor-editor code {
|
|
1567
|
+
display: block;
|
|
1568
|
+
font-size: 11.5px;
|
|
1569
|
+
color: var(--text-secondary);
|
|
1570
|
+
word-break: break-all;
|
|
1571
|
+
margin-bottom: 6px;
|
|
1572
|
+
font-variant-numeric: tabular-nums;
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
.atlas-editor-btn {
|
|
1576
|
+
display: inline-flex;
|
|
1577
|
+
align-items: center;
|
|
1578
|
+
padding: 4px 9px;
|
|
1579
|
+
font-size: 11.5px;
|
|
1580
|
+
font-weight: 500;
|
|
1581
|
+
background: var(--bg-active);
|
|
1582
|
+
color: var(--text-inverse);
|
|
1583
|
+
border-radius: var(--radius-sm);
|
|
1584
|
+
text-decoration: none;
|
|
1585
|
+
transition: opacity 140ms ease;
|
|
1586
|
+
}
|
|
1587
|
+
|
|
1588
|
+
.atlas-editor-btn:hover {
|
|
1589
|
+
opacity: 0.88;
|
|
1590
|
+
}
|
|
1591
|
+
|
|
1592
|
+
.atlas-editor-hint {
|
|
1593
|
+
margin-top: 5px;
|
|
1594
|
+
font-size: 11px;
|
|
1595
|
+
color: var(--text-muted);
|
|
1596
|
+
}
|
|
1597
|
+
|
|
1598
|
+
.atlas-anchor-snippet pre {
|
|
1599
|
+
margin: 4px 0 6px 0;
|
|
1600
|
+
padding: 8px 10px;
|
|
1601
|
+
background: var(--bg-surface);
|
|
1602
|
+
color: var(--text-primary);
|
|
1603
|
+
border: 1px solid var(--border-subtle);
|
|
1604
|
+
border-radius: var(--radius-sm);
|
|
1605
|
+
font-size: 11.5px;
|
|
1606
|
+
overflow-x: auto;
|
|
1607
|
+
white-space: pre-wrap;
|
|
1608
|
+
word-break: break-word;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
.atlas-ext-link {
|
|
1612
|
+
font-size: 12px;
|
|
1613
|
+
color: var(--text-primary);
|
|
1614
|
+
text-decoration: underline;
|
|
1615
|
+
text-underline-offset: 2px;
|
|
1616
|
+
word-break: break-all;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.atlas-source-cite {
|
|
1620
|
+
font-size: 12px;
|
|
1621
|
+
color: var(--text-secondary);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
.atlas-open-dive-btn {
|
|
1625
|
+
width: 100%;
|
|
1626
|
+
padding: 8px 12px;
|
|
1627
|
+
font-size: 12px;
|
|
1628
|
+
font-weight: 500;
|
|
1629
|
+
color: var(--text-primary);
|
|
1630
|
+
background: var(--bg-subtle);
|
|
1631
|
+
border: 1px solid var(--border-strong);
|
|
1632
|
+
border-radius: var(--radius-sm);
|
|
1633
|
+
cursor: pointer;
|
|
1634
|
+
transition: background-color 140ms ease, border-color 140ms ease;
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
.atlas-open-dive-btn:hover {
|
|
1638
|
+
background: var(--bg-hover);
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
/* Modal */
|
|
1642
|
+
.atlas-modal-backdrop {
|
|
1643
|
+
position: fixed;
|
|
1644
|
+
inset: 0;
|
|
1645
|
+
background: rgba(9, 9, 11, 0.36);
|
|
1646
|
+
display: flex;
|
|
1647
|
+
align-items: center;
|
|
1648
|
+
justify-content: center;
|
|
1649
|
+
z-index: 200;
|
|
1650
|
+
padding: 24px;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
.atlas-modal {
|
|
1654
|
+
width: 660px;
|
|
1655
|
+
max-width: 92vw;
|
|
1656
|
+
max-height: 82vh;
|
|
1657
|
+
background: var(--bg-surface);
|
|
1658
|
+
border: 1px solid var(--border-subtle);
|
|
1659
|
+
border-radius: var(--radius-lg);
|
|
1660
|
+
box-shadow: var(--shadow-md);
|
|
1661
|
+
display: flex;
|
|
1662
|
+
flex-direction: column;
|
|
1663
|
+
overflow: hidden;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
.atlas-modal-header {
|
|
1667
|
+
display: flex;
|
|
1668
|
+
justify-content: space-between;
|
|
1669
|
+
align-items: flex-start;
|
|
1670
|
+
gap: 12px;
|
|
1671
|
+
padding: 14px 18px;
|
|
1672
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
.atlas-modal-kicker {
|
|
1676
|
+
font-size: 11px;
|
|
1677
|
+
font-weight: 500;
|
|
1678
|
+
color: var(--text-muted);
|
|
1679
|
+
margin-bottom: 2px;
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
.atlas-modal-title {
|
|
1683
|
+
margin: 0;
|
|
1684
|
+
font-size: 15px;
|
|
1685
|
+
font-weight: 600;
|
|
1686
|
+
text-wrap: balance;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
.atlas-modal-tabs {
|
|
1690
|
+
display: flex;
|
|
1691
|
+
gap: 6px;
|
|
1692
|
+
padding: 8px 18px;
|
|
1693
|
+
background: var(--bg-canvas);
|
|
1694
|
+
border-bottom: 1px solid var(--border-subtle);
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
.atlas-tab-btn {
|
|
1698
|
+
padding: 5px 11px;
|
|
1699
|
+
font-size: 12px;
|
|
1700
|
+
font-weight: 500;
|
|
1701
|
+
border-radius: var(--radius-sm);
|
|
1702
|
+
border: 1px solid transparent;
|
|
1703
|
+
background: transparent;
|
|
1704
|
+
color: var(--text-secondary);
|
|
1705
|
+
cursor: pointer;
|
|
1706
|
+
font-variant-numeric: tabular-nums;
|
|
1707
|
+
transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
.atlas-tab-btn:hover {
|
|
1711
|
+
color: var(--text-primary);
|
|
1712
|
+
background: var(--bg-subtle);
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
.atlas-tab-btn.active {
|
|
1716
|
+
background: var(--bg-surface);
|
|
1717
|
+
border-color: var(--border-strong);
|
|
1718
|
+
color: var(--text-primary);
|
|
1719
|
+
box-shadow: var(--shadow-xs);
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
.atlas-modal-body {
|
|
1723
|
+
padding: 16px 18px;
|
|
1724
|
+
overflow-y: auto;
|
|
1725
|
+
overscroll-behavior: contain;
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
.atlas-prompt-list {
|
|
1729
|
+
display: flex;
|
|
1730
|
+
flex-direction: column;
|
|
1731
|
+
gap: 12px;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
.atlas-prompt-card {
|
|
1735
|
+
border: 1px solid var(--border-subtle);
|
|
1736
|
+
border-radius: var(--radius-md);
|
|
1737
|
+
padding: 12px 14px;
|
|
1738
|
+
background: var(--bg-canvas);
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
.atlas-prompt-card-head {
|
|
1742
|
+
display: flex;
|
|
1743
|
+
justify-content: space-between;
|
|
1744
|
+
align-items: center;
|
|
1745
|
+
gap: 10px;
|
|
1746
|
+
margin-bottom: 8px;
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
.atlas-prompt-pre {
|
|
1750
|
+
margin: 0;
|
|
1751
|
+
padding: 10px 12px;
|
|
1752
|
+
background: var(--bg-surface);
|
|
1753
|
+
border: 1px solid var(--border-subtle);
|
|
1754
|
+
border-radius: var(--radius-sm);
|
|
1755
|
+
font-size: 12px;
|
|
1756
|
+
line-height: 1.58;
|
|
1757
|
+
white-space: pre-wrap;
|
|
1758
|
+
word-break: break-word;
|
|
1759
|
+
color: var(--text-primary);
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
.atlas-copy-btn {
|
|
1763
|
+
padding: 4px 10px;
|
|
1764
|
+
font-size: 11.5px;
|
|
1765
|
+
font-weight: 500;
|
|
1766
|
+
border-radius: var(--radius-sm);
|
|
1767
|
+
border: 1px solid var(--bg-active);
|
|
1768
|
+
background: var(--bg-active);
|
|
1769
|
+
color: var(--text-inverse);
|
|
1770
|
+
cursor: pointer;
|
|
1771
|
+
white-space: nowrap;
|
|
1772
|
+
transition: opacity 140ms ease, background-color 140ms ease, border-color 140ms ease;
|
|
1773
|
+
}
|
|
1774
|
+
|
|
1775
|
+
.atlas-copy-btn:hover {
|
|
1776
|
+
opacity: 0.88;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
.atlas-copy-btn.small {
|
|
1780
|
+
padding: 3px 8px;
|
|
1781
|
+
font-size: 11px;
|
|
1782
|
+
background: var(--bg-surface);
|
|
1783
|
+
color: var(--text-primary);
|
|
1784
|
+
border-color: var(--border-strong);
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
.atlas-copy-btn.copied {
|
|
1788
|
+
background: var(--accent-ok-dot);
|
|
1789
|
+
border-color: var(--accent-ok-dot);
|
|
1790
|
+
color: var(--text-inverse);
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
.atlas-hint-p {
|
|
1794
|
+
margin: 0 0 10px 0;
|
|
1795
|
+
font-size: 12px;
|
|
1796
|
+
color: var(--text-secondary);
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
/* React Flow Overrides for Clean Restraint */
|
|
1800
|
+
.react-flow__edge-textbg {
|
|
1801
|
+
rx: 4;
|
|
1802
|
+
ry: 4;
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
.react-flow__minimap {
|
|
1806
|
+
background-color: var(--bg-surface) !important;
|
|
1807
|
+
border: 1px solid var(--border-subtle) !important;
|
|
1808
|
+
border-radius: var(--radius-md) !important;
|
|
1809
|
+
box-shadow: var(--shadow-xs) !important;
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1813
|
+
*,
|
|
1814
|
+
*::before,
|
|
1815
|
+
*::after {
|
|
1816
|
+
animation-duration: 0.01ms !important;
|
|
1817
|
+
animation-iteration-count: 1 !important;
|
|
1818
|
+
transition-duration: 0.01ms !important;
|
|
1819
|
+
scroll-behavior: auto !important;
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
</style>
|
|
1823
|
+
</head>
|
|
1824
|
+
<body>
|
|
1825
|
+
<div id="root"></div>
|
|
1826
|
+
<script id="atlas-data-json" type="application/json">__ATLAS_DATA_JSON__</script>
|
|
1827
|
+
<script>(()=>{var rE=Object.create;var ua=Object.defineProperty;var oE=Object.getOwnPropertyDescriptor;var iE=Object.getOwnPropertyNames;var sE=Object.getPrototypeOf,lE=Object.prototype.hasOwnProperty;var aE=(e,t,n)=>t in e?ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var uE=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of iE(t))!lE.call(e,o)&&o!==n&&ua(e,o,{get:()=>t[o],enumerable:!(r=oE(t,o))||r.enumerable});return e};var Dt=(e,t,n)=>(n=e!=null?rE(sE(e)):{},uE(t||!e||!e.__esModule?ua(n,"default",{value:e,enumerable:!0}):n,e));var ke=(e,t,n)=>aE(e,typeof t!="symbol"?t+"":t,n);var zf=K(le=>{"use strict";var xo=Symbol.for("react.element"),cE=Symbol.for("react.portal"),dE=Symbol.for("react.fragment"),fE=Symbol.for("react.strict_mode"),hE=Symbol.for("react.profiler"),pE=Symbol.for("react.provider"),gE=Symbol.for("react.context"),mE=Symbol.for("react.forward_ref"),yE=Symbol.for("react.suspense"),vE=Symbol.for("react.memo"),wE=Symbol.for("react.lazy"),_f=Symbol.iterator;function xE(e){return e===null||typeof e!="object"?null:(e=_f&&e[_f]||e["@@iterator"],typeof e=="function"?e:null)}var bf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Mf=Object.assign,If={};function kr(e,t,n){this.props=e,this.context=t,this.refs=If,this.updater=n||bf}kr.prototype.isReactComponent={};kr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};kr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pf(){}Pf.prototype=kr.prototype;function da(e,t,n){this.props=e,this.context=t,this.refs=If,this.updater=n||bf}var fa=da.prototype=new Pf;fa.constructor=da;Mf(fa,kr.prototype);fa.isPureReactComponent=!0;var Nf=Array.isArray,Of=Object.prototype.hasOwnProperty,ha={current:null},Tf={key:!0,ref:!0,__self:!0,__source:!0};function Df(e,t,n){var r,o={},i=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(i=""+t.key),t)Of.call(t,r)&&!Tf.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var a=Array(l),u=0;u<l;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:xo,type:e,key:i,ref:s,props:o,_owner:ha.current}}function EE(e,t){return{$$typeof:xo,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function pa(e){return typeof e=="object"&&e!==null&&e.$$typeof===xo}function SE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Cf=/\/+/g;function ca(e,t){return typeof e=="object"&&e!==null&&e.key!=null?SE(""+e.key):t.toString(36)}function Ri(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case xo:case cE:s=!0}}if(s)return s=e,o=o(s),e=r===""?"."+ca(s,0):r,Nf(o)?(n="",e!=null&&(n=e.replace(Cf,"$&/")+"/"),Ri(o,t,n,"",function(u){return u})):o!=null&&(pa(o)&&(o=EE(o,n+(!o.key||s&&s.key===o.key?"":(""+o.key).replace(Cf,"$&/")+"/")+e)),t.push(o)),1;if(s=0,r=r===""?".":r+":",Nf(e))for(var l=0;l<e.length;l++){i=e[l];var a=r+ca(i,l);s+=Ri(i,t,n,a,o)}else if(a=xE(e),typeof a=="function")for(e=a.call(e),l=0;!(i=e.next()).done;)i=i.value,a=r+ca(i,l++),s+=Ri(i,t,n,a,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function Ai(e,t,n){if(e==null)return e;var r=[],o=0;return Ri(e,r,"","",function(i){return t.call(n,i,o++)}),r}function kE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ve={current:null},$i={transition:null},_E={ReactCurrentDispatcher:Ve,ReactCurrentBatchConfig:$i,ReactCurrentOwner:ha};function Lf(){throw Error("act(...) is not supported in production builds of React.")}le.Children={map:Ai,forEach:function(e,t,n){Ai(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ai(e,function(){t++}),t},toArray:function(e){return Ai(e,function(t){return t})||[]},only:function(e){if(!pa(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Component=kr;le.Fragment=dE;le.Profiler=hE;le.PureComponent=da;le.StrictMode=fE;le.Suspense=yE;le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_E;le.act=Lf;le.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Mf({},e.props),o=e.key,i=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,s=ha.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(a in t)Of.call(t,a)&&!Tf.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&l!==void 0?l[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){l=Array(a);for(var u=0;u<a;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:xo,type:e.type,key:o,ref:i,props:r,_owner:s}};le.createContext=function(e){return e={$$typeof:gE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:pE,_context:e},e.Consumer=e};le.createElement=Df;le.createFactory=function(e){var t=Df.bind(null,e);return t.type=e,t};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:mE,render:e}};le.isValidElement=pa;le.lazy=function(e){return{$$typeof:wE,_payload:{_status:-1,_result:e},_init:kE}};le.memo=function(e,t){return{$$typeof:vE,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=$i.transition;$i.transition={};try{e()}finally{$i.transition=t}};le.unstable_act=Lf;le.useCallback=function(e,t){return Ve.current.useCallback(e,t)};le.useContext=function(e){return Ve.current.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e){return Ve.current.useDeferredValue(e)};le.useEffect=function(e,t){return Ve.current.useEffect(e,t)};le.useId=function(){return Ve.current.useId()};le.useImperativeHandle=function(e,t,n){return Ve.current.useImperativeHandle(e,t,n)};le.useInsertionEffect=function(e,t){return Ve.current.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return Ve.current.useLayoutEffect(e,t)};le.useMemo=function(e,t){return Ve.current.useMemo(e,t)};le.useReducer=function(e,t,n){return Ve.current.useReducer(e,t,n)};le.useRef=function(e){return Ve.current.useRef(e)};le.useState=function(e){return Ve.current.useState(e)};le.useSyncExternalStore=function(e,t,n){return Ve.current.useSyncExternalStore(e,t,n)};le.useTransition=function(){return Ve.current.useTransition()};le.version="18.3.1"});var hn=K((KT,Af)=>{"use strict";Af.exports=zf()});var Yf=K(de=>{"use strict";function va(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<Bi(o,t))e[r]=t,e[n]=o,n=r;else break e}}function xt(e){return e.length===0?null:e[0]}function Fi(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,l=e[s],a=s+1,u=e[a];if(0>Bi(l,n))a<o&&0>Bi(u,l)?(e[r]=u,e[a]=n,r=a):(e[r]=l,e[s]=n,r=s);else if(a<o&&0>Bi(u,n))e[r]=u,e[a]=n,r=a;else break e}}return t}function Bi(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(Rf=performance,de.unstable_now=function(){return Rf.now()}):(ga=Date,$f=ga.now(),de.unstable_now=function(){return ga.now()-$f});var Rf,ga,$f,Lt=[],pn=[],NE=1,lt=null,Ae=3,Vi=!1,Yn=!1,So=!1,Ff=typeof setTimeout=="function"?setTimeout:null,Vf=typeof clearTimeout=="function"?clearTimeout:null,Bf=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function wa(e){for(var t=xt(pn);t!==null;){if(t.callback===null)Fi(pn);else if(t.startTime<=e)Fi(pn),t.sortIndex=t.expirationTime,va(Lt,t);else break;t=xt(pn)}}function xa(e){if(So=!1,wa(e),!Yn)if(xt(Lt)!==null)Yn=!0,Sa(Ea);else{var t=xt(pn);t!==null&&ka(xa,t.startTime-e)}}function Ea(e,t){Yn=!1,So&&(So=!1,Vf(ko),ko=-1),Vi=!0;var n=Ae;try{for(wa(t),lt=xt(Lt);lt!==null&&(!(lt.expirationTime>t)||e&&!Uf());){var r=lt.callback;if(typeof r=="function"){lt.callback=null,Ae=lt.priorityLevel;var o=r(lt.expirationTime<=t);t=de.unstable_now(),typeof o=="function"?lt.callback=o:lt===xt(Lt)&&Fi(Lt),wa(t)}else Fi(Lt);lt=xt(Lt)}if(lt!==null)var i=!0;else{var s=xt(pn);s!==null&&ka(xa,s.startTime-t),i=!1}return i}finally{lt=null,Ae=n,Vi=!1}}var ji=!1,Hi=null,ko=-1,jf=5,Wf=-1;function Uf(){return!(de.unstable_now()-Wf<jf)}function ma(){if(Hi!==null){var e=de.unstable_now();Wf=e;var t=!0;try{t=Hi(!0,e)}finally{t?Eo():(ji=!1,Hi=null)}}else ji=!1}var Eo;typeof Bf=="function"?Eo=function(){Bf(ma)}:typeof MessageChannel<"u"?(ya=new MessageChannel,Hf=ya.port2,ya.port1.onmessage=ma,Eo=function(){Hf.postMessage(null)}):Eo=function(){Ff(ma,0)};var ya,Hf;function Sa(e){Hi=e,ji||(ji=!0,Eo())}function ka(e,t){ko=Ff(function(){e(de.unstable_now())},t)}de.unstable_IdlePriority=5;de.unstable_ImmediatePriority=1;de.unstable_LowPriority=4;de.unstable_NormalPriority=3;de.unstable_Profiling=null;de.unstable_UserBlockingPriority=2;de.unstable_cancelCallback=function(e){e.callback=null};de.unstable_continueExecution=function(){Yn||Vi||(Yn=!0,Sa(Ea))};de.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):jf=0<e?Math.floor(1e3/e):5};de.unstable_getCurrentPriorityLevel=function(){return Ae};de.unstable_getFirstCallbackNode=function(){return xt(Lt)};de.unstable_next=function(e){switch(Ae){case 1:case 2:case 3:var t=3;break;default:t=Ae}var n=Ae;Ae=t;try{return e()}finally{Ae=n}};de.unstable_pauseExecution=function(){};de.unstable_requestPaint=function(){};de.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Ae;Ae=e;try{return t()}finally{Ae=n}};de.unstable_scheduleCallback=function(e,t,n){var r=de.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return o=n+o,e={id:NE++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,va(pn,e),xt(Lt)===null&&e===xt(pn)&&(So?(Vf(ko),ko=-1):So=!0,ka(xa,n-r))):(e.sortIndex=o,va(Lt,e),Yn||Vi||(Yn=!0,Sa(Ea))),e};de.unstable_shouldYield=Uf;de.unstable_wrapCallback=function(e){var t=Ae;return function(){var n=Ae;Ae=t;try{return e.apply(this,arguments)}finally{Ae=n}}}});var Xf=K((e3,qf)=>{"use strict";qf.exports=Yf()});var Kg=K(ot=>{"use strict";var CE=hn(),nt=Xf();function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var tp=new Set,Uo={};function ir(e,t){Wr(e,t),Wr(e+"Capture",t)}function Wr(e,t){for(Uo[e]=t,e=0;e<t.length;e++)tp.add(t[e])}var en=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ya=Object.prototype.hasOwnProperty,bE=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Gf={},Zf={};function ME(e){return Ya.call(Zf,e)?!0:Ya.call(Gf,e)?!1:bE.test(e)?Zf[e]=!0:(Gf[e]=!0,!1)}function IE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function PE(e,t,n,r){if(t===null||typeof t>"u"||IE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ue(e,t,n,r,o,i,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=s}var ze={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ze[e]=new Ue(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ze[t]=new Ue(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ze[e]=new Ue(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ze[e]=new Ue(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ze[e]=new Ue(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ze[e]=new Ue(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ze[e]=new Ue(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ze[e]=new Ue(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ze[e]=new Ue(e,5,!1,e.toLowerCase(),null,!1,!1)});var $u=/[\-:]([a-z])/g;function Bu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace($u,Bu);ze[t]=new Ue(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace($u,Bu);ze[t]=new Ue(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace($u,Bu);ze[t]=new Ue(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ze[e]=new Ue(e,1,!1,e.toLowerCase(),null,!1,!1)});ze.xlinkHref=new Ue("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ze[e]=new Ue(e,1,!1,e.toLowerCase(),null,!0,!0)});function Hu(e,t,n,r){var o=ze.hasOwnProperty(t)?ze[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(PE(t,n,o,r)&&(n=null),r||o===null?ME(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var on=CE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Wi=Symbol.for("react.element"),Cr=Symbol.for("react.portal"),br=Symbol.for("react.fragment"),Fu=Symbol.for("react.strict_mode"),qa=Symbol.for("react.profiler"),np=Symbol.for("react.provider"),rp=Symbol.for("react.context"),Vu=Symbol.for("react.forward_ref"),Xa=Symbol.for("react.suspense"),Ga=Symbol.for("react.suspense_list"),ju=Symbol.for("react.memo"),mn=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var op=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var Qf=Symbol.iterator;function _o(e){return e===null||typeof e!="object"?null:(e=Qf&&e[Qf]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Object.assign,_a;function To(e){if(_a===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);_a=t&&t[1]||""}return`
|
|
1828
|
+
`+_a+e}var Na=!1;function Ca(e,t){if(!e||Na)return"";Na=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
|
|
1829
|
+
`),i=r.stack.split(`
|
|
1830
|
+
`),s=o.length-1,l=i.length-1;1<=s&&0<=l&&o[s]!==i[l];)l--;for(;1<=s&&0<=l;s--,l--)if(o[s]!==i[l]){if(s!==1||l!==1)do if(s--,l--,0>l||o[s]!==i[l]){var a=`
|
|
1831
|
+
`+o[s].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=s&&0<=l);break}}}finally{Na=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?To(e):""}function OE(e){switch(e.tag){case 5:return To(e.type);case 16:return To("Lazy");case 13:return To("Suspense");case 19:return To("SuspenseList");case 0:case 2:case 15:return e=Ca(e.type,!1),e;case 11:return e=Ca(e.type.render,!1),e;case 1:return e=Ca(e.type,!0),e;default:return""}}function Za(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case br:return"Fragment";case Cr:return"Portal";case qa:return"Profiler";case Fu:return"StrictMode";case Xa:return"Suspense";case Ga:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case rp:return(e.displayName||"Context")+".Consumer";case np:return(e._context.displayName||"Context")+".Provider";case Vu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ju:return t=e.displayName||null,t!==null?t:Za(e.type)||"Memo";case mn:t=e._payload,e=e._init;try{return Za(e(t))}catch{}}return null}function TE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Za(t);case 8:return t===Fu?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Pn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ip(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function DE(e){var t=ip(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){r=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ui(e){e._valueTracker||(e._valueTracker=DE(e))}function sp(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ip(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ws(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Qa(e,t){var n=t.checked;return xe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Kf(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Pn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lp(e,t){t=t.checked,t!=null&&Hu(e,"checked",t,!1)}function Ka(e,t){lp(e,t);var n=Pn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ja(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ja(e,t.type,Pn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jf(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ja(e,t,n){(t!=="number"||ws(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Do=Array.isArray;function $r(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Pn(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function eu(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return xe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function eh(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(j(92));if(Do(n)){if(1<n.length)throw Error(j(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Pn(n)}}function ap(e,t){var n=Pn(t.value),r=Pn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function th(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function up(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function tu(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?up(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Yi,cp=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Yi=Yi||document.createElement("div"),Yi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Yi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Yo(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ao={animationIterationCount:!0,aspectRatio:!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,gridArea:!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},LE=["Webkit","ms","Moz","O"];Object.keys(Ao).forEach(function(e){LE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ao[t]=Ao[e]})});function dp(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ao.hasOwnProperty(e)&&Ao[e]?(""+t).trim():t+"px"}function fp(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=dp(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var zE=xe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nu(e,t){if(t){if(zE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function ru(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ou=null;function Wu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var iu=null,Br=null,Hr=null;function nh(e){if(e=ci(e)){if(typeof iu!="function")throw Error(j(280));var t=e.stateNode;t&&(t=qs(t),iu(e.stateNode,e.type,t))}}function hp(e){Br?Hr?Hr.push(e):Hr=[e]:Br=e}function pp(){if(Br){var e=Br,t=Hr;if(Hr=Br=null,nh(e),t)for(e=0;e<t.length;e++)nh(t[e])}}function gp(e,t){return e(t)}function mp(){}var ba=!1;function yp(e,t,n){if(ba)return e(t,n);ba=!0;try{return gp(e,t,n)}finally{ba=!1,(Br!==null||Hr!==null)&&(mp(),pp())}}function qo(e,t){var n=e.stateNode;if(n===null)return null;var r=qs(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(j(231,t,typeof n));return n}var su=!1;if(en)try{_r={},Object.defineProperty(_r,"passive",{get:function(){su=!0}}),window.addEventListener("test",_r,_r),window.removeEventListener("test",_r,_r)}catch{su=!1}var _r;function AE(e,t,n,r,o,i,s,l,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Ro=!1,xs=null,Es=!1,lu=null,RE={onError:function(e){Ro=!0,xs=e}};function $E(e,t,n,r,o,i,s,l,a){Ro=!1,xs=null,AE.apply(RE,arguments)}function BE(e,t,n,r,o,i,s,l,a){if($E.apply(this,arguments),Ro){if(Ro){var u=xs;Ro=!1,xs=null}else throw Error(j(198));Es||(Es=!0,lu=u)}}function sr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function vp(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function rh(e){if(sr(e)!==e)throw Error(j(188))}function HE(e){var t=e.alternate;if(!t){if(t=sr(e),t===null)throw Error(j(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return rh(o),e;if(i===r)return rh(o),t;i=i.sibling}throw Error(j(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s)throw Error(j(189))}}if(n.alternate!==r)throw Error(j(190))}if(n.tag!==3)throw Error(j(188));return n.stateNode.current===n?e:t}function wp(e){return e=HE(e),e!==null?xp(e):null}function xp(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=xp(e);if(t!==null)return t;e=e.sibling}return null}var Ep=nt.unstable_scheduleCallback,oh=nt.unstable_cancelCallback,FE=nt.unstable_shouldYield,VE=nt.unstable_requestPaint,_e=nt.unstable_now,jE=nt.unstable_getCurrentPriorityLevel,Uu=nt.unstable_ImmediatePriority,Sp=nt.unstable_UserBlockingPriority,Ss=nt.unstable_NormalPriority,WE=nt.unstable_LowPriority,kp=nt.unstable_IdlePriority,js=null,$t=null;function UE(e){if($t&&typeof $t.onCommitFiberRoot=="function")try{$t.onCommitFiberRoot(js,e,void 0,(e.current.flags&128)===128)}catch{}}var Nt=Math.clz32?Math.clz32:XE,YE=Math.log,qE=Math.LN2;function XE(e){return e>>>=0,e===0?32:31-(YE(e)/qE|0)|0}var qi=64,Xi=4194304;function Lo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ks(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,s=n&268435455;if(s!==0){var l=s&~o;l!==0?r=Lo(l):(i&=s,i!==0&&(r=Lo(i)))}else s=n&~o,s!==0?r=Lo(s):i!==0&&(r=Lo(i));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Nt(t),o=1<<n,r|=e[n],t&=~o;return r}function GE(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ZE(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var s=31-Nt(i),l=1<<s,a=o[s];a===-1?((l&n)===0||(l&r)!==0)&&(o[s]=GE(l,t)):a<=t&&(e.expiredLanes|=l),i&=~l}}function au(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _p(){var e=qi;return qi<<=1,(qi&4194240)===0&&(qi=64),e}function Ma(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ai(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function QE(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Nt(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Yu(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nt(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var ce=0;function Np(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Cp,qu,bp,Mp,Ip,uu=!1,Gi=[],Sn=null,kn=null,_n=null,Xo=new Map,Go=new Map,vn=[],KE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ih(e,t){switch(e){case"focusin":case"focusout":Sn=null;break;case"dragenter":case"dragleave":kn=null;break;case"mouseover":case"mouseout":_n=null;break;case"pointerover":case"pointerout":Xo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Go.delete(t.pointerId)}}function No(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=ci(t),t!==null&&qu(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function JE(e,t,n,r,o){switch(t){case"focusin":return Sn=No(Sn,e,t,n,r,o),!0;case"dragenter":return kn=No(kn,e,t,n,r,o),!0;case"mouseover":return _n=No(_n,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Xo.set(i,No(Xo.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Go.set(i,No(Go.get(i)||null,e,t,n,r,o)),!0}return!1}function Pp(e){var t=Gn(e.target);if(t!==null){var n=sr(t);if(n!==null){if(t=n.tag,t===13){if(t=vp(n),t!==null){e.blockedOn=t,Ip(e.priority,function(){bp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function us(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=cu(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);ou=r,n.target.dispatchEvent(r),ou=null}else return t=ci(n),t!==null&&qu(t),e.blockedOn=n,!1;t.shift()}return!0}function sh(e,t,n){us(e)&&n.delete(t)}function eS(){uu=!1,Sn!==null&&us(Sn)&&(Sn=null),kn!==null&&us(kn)&&(kn=null),_n!==null&&us(_n)&&(_n=null),Xo.forEach(sh),Go.forEach(sh)}function Co(e,t){e.blockedOn===t&&(e.blockedOn=null,uu||(uu=!0,nt.unstable_scheduleCallback(nt.unstable_NormalPriority,eS)))}function Zo(e){function t(o){return Co(o,e)}if(0<Gi.length){Co(Gi[0],e);for(var n=1;n<Gi.length;n++){var r=Gi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Sn!==null&&Co(Sn,e),kn!==null&&Co(kn,e),_n!==null&&Co(_n,e),Xo.forEach(t),Go.forEach(t),n=0;n<vn.length;n++)r=vn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<vn.length&&(n=vn[0],n.blockedOn===null);)Pp(n),n.blockedOn===null&&vn.shift()}var Fr=on.ReactCurrentBatchConfig,_s=!0;function tS(e,t,n,r){var o=ce,i=Fr.transition;Fr.transition=null;try{ce=1,Xu(e,t,n,r)}finally{ce=o,Fr.transition=i}}function nS(e,t,n,r){var o=ce,i=Fr.transition;Fr.transition=null;try{ce=4,Xu(e,t,n,r)}finally{ce=o,Fr.transition=i}}function Xu(e,t,n,r){if(_s){var o=cu(e,t,n,r);if(o===null)za(e,t,r,Ns,n),ih(e,r);else if(JE(o,e,t,n,r))r.stopPropagation();else if(ih(e,r),t&4&&-1<KE.indexOf(e)){for(;o!==null;){var i=ci(o);if(i!==null&&Cp(i),i=cu(e,t,n,r),i===null&&za(e,t,r,Ns,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else za(e,t,r,null,n)}}var Ns=null;function cu(e,t,n,r){if(Ns=null,e=Wu(r),e=Gn(e),e!==null)if(t=sr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=vp(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Ns=e,null}function Op(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(jE()){case Uu:return 1;case Sp:return 4;case Ss:case WE:return 16;case kp:return 536870912;default:return 16}default:return 16}}var xn=null,Gu=null,cs=null;function Tp(){if(cs)return cs;var e,t=Gu,n=t.length,r,o="value"in xn?xn.value:xn.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return cs=o.slice(e,1<r?1-r:void 0)}function ds(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Zi(){return!0}function lh(){return!1}function rt(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Zi:lh,this.isPropagationStopped=lh,this}return xe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Zi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zi)},persist:function(){},isPersistent:Zi}),t}var Qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zu=rt(Qr),ui=xe({},Qr,{view:0,detail:0}),rS=rt(ui),Ia,Pa,bo,Ws=xe({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==bo&&(bo&&e.type==="mousemove"?(Ia=e.screenX-bo.screenX,Pa=e.screenY-bo.screenY):Pa=Ia=0,bo=e),Ia)},movementY:function(e){return"movementY"in e?e.movementY:Pa}}),ah=rt(Ws),oS=xe({},Ws,{dataTransfer:0}),iS=rt(oS),sS=xe({},ui,{relatedTarget:0}),Oa=rt(sS),lS=xe({},Qr,{animationName:0,elapsedTime:0,pseudoElement:0}),aS=rt(lS),uS=xe({},Qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cS=rt(uS),dS=xe({},Qr,{data:0}),uh=rt(dS),fS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hS={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},pS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pS[e])?!!t[e]:!1}function Qu(){return gS}var mS=xe({},ui,{key:function(e){if(e.key){var t=fS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ds(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?hS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qu,charCode:function(e){return e.type==="keypress"?ds(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ds(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),yS=rt(mS),vS=xe({},Ws,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ch=rt(vS),wS=xe({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qu}),xS=rt(wS),ES=xe({},Qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),SS=rt(ES),kS=xe({},Ws,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),_S=rt(kS),NS=[9,13,27,32],Ku=en&&"CompositionEvent"in window,$o=null;en&&"documentMode"in document&&($o=document.documentMode);var CS=en&&"TextEvent"in window&&!$o,Dp=en&&(!Ku||$o&&8<$o&&11>=$o),dh=" ",fh=!1;function Lp(e,t){switch(e){case"keyup":return NS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Mr=!1;function bS(e,t){switch(e){case"compositionend":return zp(t);case"keypress":return t.which!==32?null:(fh=!0,dh);case"textInput":return e=t.data,e===dh&&fh?null:e;default:return null}}function MS(e,t){if(Mr)return e==="compositionend"||!Ku&&Lp(e,t)?(e=Tp(),cs=Gu=xn=null,Mr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Dp&&t.locale!=="ko"?null:t.data;default:return null}}var IS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function hh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!IS[e.type]:t==="textarea"}function Ap(e,t,n,r){hp(r),t=Cs(t,"onChange"),0<t.length&&(n=new Zu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Bo=null,Qo=null;function PS(e){qp(e,0)}function Us(e){var t=Or(e);if(sp(t))return e}function OS(e,t){if(e==="change")return t}var Rp=!1;en&&(en?(Ki="oninput"in document,Ki||(Ta=document.createElement("div"),Ta.setAttribute("oninput","return;"),Ki=typeof Ta.oninput=="function"),Qi=Ki):Qi=!1,Rp=Qi&&(!document.documentMode||9<document.documentMode));var Qi,Ki,Ta;function ph(){Bo&&(Bo.detachEvent("onpropertychange",$p),Qo=Bo=null)}function $p(e){if(e.propertyName==="value"&&Us(Qo)){var t=[];Ap(t,Qo,e,Wu(e)),yp(PS,t)}}function TS(e,t,n){e==="focusin"?(ph(),Bo=t,Qo=n,Bo.attachEvent("onpropertychange",$p)):e==="focusout"&&ph()}function DS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Us(Qo)}function LS(e,t){if(e==="click")return Us(t)}function zS(e,t){if(e==="input"||e==="change")return Us(t)}function AS(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bt=typeof Object.is=="function"?Object.is:AS;function Ko(e,t){if(bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Ya.call(t,o)||!bt(e[o],t[o]))return!1}return!0}function gh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function mh(e,t){var n=gh(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=gh(n)}}function Bp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hp(){for(var e=window,t=ws();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ws(e.document)}return t}function Ju(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function RS(e){var t=Hp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Bp(n.ownerDocument.documentElement,n)){if(r!==null&&Ju(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=mh(n,i);var s=mh(n,r);o&&s&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var $S=en&&"documentMode"in document&&11>=document.documentMode,Ir=null,du=null,Ho=null,fu=!1;function yh(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;fu||Ir==null||Ir!==ws(r)||(r=Ir,"selectionStart"in r&&Ju(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ho&&Ko(Ho,r)||(Ho=r,r=Cs(du,"onSelect"),0<r.length&&(t=new Zu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ir)))}function Ji(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pr={animationend:Ji("Animation","AnimationEnd"),animationiteration:Ji("Animation","AnimationIteration"),animationstart:Ji("Animation","AnimationStart"),transitionend:Ji("Transition","TransitionEnd")},Da={},Fp={};en&&(Fp=document.createElement("div").style,"AnimationEvent"in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),"TransitionEvent"in window||delete Pr.transitionend.transition);function Ys(e){if(Da[e])return Da[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fp)return Da[e]=t[n];return e}var Vp=Ys("animationend"),jp=Ys("animationiteration"),Wp=Ys("animationstart"),Up=Ys("transitionend"),Yp=new Map,vh="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Tn(e,t){Yp.set(e,t),ir(t,[e])}for(es=0;es<vh.length;es++)ts=vh[es],wh=ts.toLowerCase(),xh=ts[0].toUpperCase()+ts.slice(1),Tn(wh,"on"+xh);var ts,wh,xh,es;Tn(Vp,"onAnimationEnd");Tn(jp,"onAnimationIteration");Tn(Wp,"onAnimationStart");Tn("dblclick","onDoubleClick");Tn("focusin","onFocus");Tn("focusout","onBlur");Tn(Up,"onTransitionEnd");Wr("onMouseEnter",["mouseout","mouseover"]);Wr("onMouseLeave",["mouseout","mouseover"]);Wr("onPointerEnter",["pointerout","pointerover"]);Wr("onPointerLeave",["pointerout","pointerover"]);ir("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ir("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ir("onBeforeInput",["compositionend","keypress","textInput","paste"]);ir("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ir("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ir("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),BS=new Set("cancel close invalid load scroll toggle".split(" ").concat(zo));function Eh(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,BE(r,t,void 0,e),e.currentTarget=null}function qp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var l=r[s],a=l.instance,u=l.currentTarget;if(l=l.listener,a!==i&&o.isPropagationStopped())break e;Eh(o,l,u),i=a}else for(s=0;s<r.length;s++){if(l=r[s],a=l.instance,u=l.currentTarget,l=l.listener,a!==i&&o.isPropagationStopped())break e;Eh(o,l,u),i=a}}}if(Es)throw e=lu,Es=!1,lu=null,e}function he(e,t){var n=t[yu];n===void 0&&(n=t[yu]=new Set);var r=e+"__bubble";n.has(r)||(Xp(t,e,2,!1),n.add(r))}function La(e,t,n){var r=0;t&&(r|=4),Xp(n,e,r,t)}var ns="_reactListening"+Math.random().toString(36).slice(2);function Jo(e){if(!e[ns]){e[ns]=!0,tp.forEach(function(n){n!=="selectionchange"&&(BS.has(n)||La(n,!1,e),La(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ns]||(t[ns]=!0,La("selectionchange",!1,t))}}function Xp(e,t,n,r){switch(Op(t)){case 1:var o=tS;break;case 4:o=nS;break;default:o=Xu}n=o.bind(null,t,n,e),o=void 0,!su||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function za(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var l=r.stateNode.containerInfo;if(l===o||l.nodeType===8&&l.parentNode===o)break;if(s===4)for(s=r.return;s!==null;){var a=s.tag;if((a===3||a===4)&&(a=s.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;s=s.return}for(;l!==null;){if(s=Gn(l),s===null)return;if(a=s.tag,a===5||a===6){r=i=s;continue e}l=l.parentNode}}r=r.return}yp(function(){var u=i,c=Wu(n),f=[];e:{var d=Yp.get(e);if(d!==void 0){var h=Zu,m=e;switch(e){case"keypress":if(ds(n)===0)break e;case"keydown":case"keyup":h=yS;break;case"focusin":m="focus",h=Oa;break;case"focusout":m="blur",h=Oa;break;case"beforeblur":case"afterblur":h=Oa;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ah;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=iS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=xS;break;case Vp:case jp:case Wp:h=aS;break;case Up:h=SS;break;case"scroll":h=rS;break;case"wheel":h=_S;break;case"copy":case"cut":case"paste":h=cS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=ch}var w=(t&4)!==0,x=!w&&e==="scroll",g=w?d!==null?d+"Capture":null:d;w=[];for(var y=u,p;y!==null;){p=y;var v=p.stateNode;if(p.tag===5&&v!==null&&(p=v,g!==null&&(v=qo(y,g),v!=null&&w.push(ei(y,v,p)))),x)break;y=y.return}0<w.length&&(d=new h(d,m,null,n,c),f.push({event:d,listeners:w}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==ou&&(m=n.relatedTarget||n.fromElement)&&(Gn(m)||m[tn]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(m=n.relatedTarget||n.toElement,h=u,m=m?Gn(m):null,m!==null&&(x=sr(m),m!==x||m.tag!==5&&m.tag!==6)&&(m=null)):(h=null,m=u),h!==m)){if(w=ah,v="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(w=ch,v="onPointerLeave",g="onPointerEnter",y="pointer"),x=h==null?d:Or(h),p=m==null?d:Or(m),d=new w(v,y+"leave",h,n,c),d.target=x,d.relatedTarget=p,v=null,Gn(c)===u&&(w=new w(g,y+"enter",m,n,c),w.target=p,w.relatedTarget=x,v=w),x=v,h&&m)t:{for(w=h,g=m,y=0,p=w;p;p=Nr(p))y++;for(p=0,v=g;v;v=Nr(v))p++;for(;0<y-p;)w=Nr(w),y--;for(;0<p-y;)g=Nr(g),p--;for(;y--;){if(w===g||g!==null&&w===g.alternate)break t;w=Nr(w),g=Nr(g)}w=null}else w=null;h!==null&&Sh(f,d,h,w,!1),m!==null&&x!==null&&Sh(f,x,m,w,!0)}}e:{if(d=u?Or(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var k=OS;else if(hh(d))if(Rp)k=zS;else{k=DS;var S=TS}else(h=d.nodeName)&&h.toLowerCase()==="input"&&(d.type==="checkbox"||d.type==="radio")&&(k=LS);if(k&&(k=k(e,u))){Ap(f,k,n,c);break e}S&&S(e,d,u),e==="focusout"&&(S=d._wrapperState)&&S.controlled&&d.type==="number"&&Ja(d,"number",d.value)}switch(S=u?Or(u):window,e){case"focusin":(hh(S)||S.contentEditable==="true")&&(Ir=S,du=u,Ho=null);break;case"focusout":Ho=du=Ir=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,yh(f,n,c);break;case"selectionchange":if($S)break;case"keydown":case"keyup":yh(f,n,c)}var _;if(Ku)e:{switch(e){case"compositionstart":var N="onCompositionStart";break e;case"compositionend":N="onCompositionEnd";break e;case"compositionupdate":N="onCompositionUpdate";break e}N=void 0}else Mr?Lp(e,n)&&(N="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(N="onCompositionStart");N&&(Dp&&n.locale!=="ko"&&(Mr||N!=="onCompositionStart"?N==="onCompositionEnd"&&Mr&&(_=Tp()):(xn=c,Gu="value"in xn?xn.value:xn.textContent,Mr=!0)),S=Cs(u,N),0<S.length&&(N=new uh(N,e,null,n,c),f.push({event:N,listeners:S}),_?N.data=_:(_=zp(n),_!==null&&(N.data=_)))),(_=CS?bS(e,n):MS(e,n))&&(u=Cs(u,"onBeforeInput"),0<u.length&&(c=new uh("onBeforeInput","beforeinput",null,n,c),f.push({event:c,listeners:u}),c.data=_))}qp(f,t)})}function ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Cs(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=qo(e,n),i!=null&&r.unshift(ei(e,i,o)),i=qo(e,t),i!=null&&r.push(ei(e,i,o))),e=e.return}return r}function Nr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Sh(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var l=n,a=l.alternate,u=l.stateNode;if(a!==null&&a===r)break;l.tag===5&&u!==null&&(l=u,o?(a=qo(n,i),a!=null&&s.unshift(ei(n,a,l))):o||(a=qo(n,i),a!=null&&s.push(ei(n,a,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var HS=/\r\n?/g,FS=/\u0000|\uFFFD/g;function kh(e){return(typeof e=="string"?e:""+e).replace(HS,`
|
|
1832
|
+
`).replace(FS,"")}function rs(e,t,n){if(t=kh(t),kh(e)!==t&&n)throw Error(j(425))}function bs(){}var hu=null,pu=null;function gu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var mu=typeof setTimeout=="function"?setTimeout:void 0,VS=typeof clearTimeout=="function"?clearTimeout:void 0,_h=typeof Promise=="function"?Promise:void 0,jS=typeof queueMicrotask=="function"?queueMicrotask:typeof _h<"u"?function(e){return _h.resolve(null).then(e).catch(WS)}:mu;function WS(e){setTimeout(function(){throw e})}function Aa(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Zo(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Zo(t)}function Nn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Nh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Kr=Math.random().toString(36).slice(2),Rt="__reactFiber$"+Kr,ti="__reactProps$"+Kr,tn="__reactContainer$"+Kr,yu="__reactEvents$"+Kr,US="__reactListeners$"+Kr,YS="__reactHandles$"+Kr;function Gn(e){var t=e[Rt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[tn]||n[Rt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Nh(e);e!==null;){if(n=e[Rt])return n;e=Nh(e)}return t}e=n,n=e.parentNode}return null}function ci(e){return e=e[Rt]||e[tn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Or(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function qs(e){return e[ti]||null}var vu=[],Tr=-1;function Dn(e){return{current:e}}function pe(e){0>Tr||(e.current=vu[Tr],vu[Tr]=null,Tr--)}function fe(e,t){Tr++,vu[Tr]=e.current,e.current=t}var On={},He=Dn(On),Xe=Dn(!1),er=On;function Ur(e,t){var n=e.type.contextTypes;if(!n)return On;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Ge(e){return e=e.childContextTypes,e!=null}function Ms(){pe(Xe),pe(He)}function Ch(e,t,n){if(He.current!==On)throw Error(j(168));fe(He,t),fe(Xe,n)}function Gp(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(j(108,TE(e)||"Unknown",o));return xe({},n,r)}function Is(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||On,er=He.current,fe(He,e),fe(Xe,Xe.current),!0}function bh(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=Gp(e,t,er),r.__reactInternalMemoizedMergedChildContext=e,pe(Xe),pe(He),fe(He,e)):pe(Xe),fe(Xe,n)}var Zt=null,Xs=!1,Ra=!1;function Zp(e){Zt===null?Zt=[e]:Zt.push(e)}function qS(e){Xs=!0,Zp(e)}function Ln(){if(!Ra&&Zt!==null){Ra=!0;var e=0,t=ce;try{var n=Zt;for(ce=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Zt=null,Xs=!1}catch(o){throw Zt!==null&&(Zt=Zt.slice(e+1)),Ep(Uu,Ln),o}finally{ce=t,Ra=!1}}return null}var Dr=[],Lr=0,Ps=null,Os=0,at=[],ut=0,tr=null,Qt=1,Kt="";function qn(e,t){Dr[Lr++]=Os,Dr[Lr++]=Ps,Ps=e,Os=t}function Qp(e,t,n){at[ut++]=Qt,at[ut++]=Kt,at[ut++]=tr,tr=e;var r=Qt;e=Kt;var o=32-Nt(r)-1;r&=~(1<<o),n+=1;var i=32-Nt(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Qt=1<<32-Nt(t)+o|n<<o|r,Kt=i+e}else Qt=1<<i|n<<o|r,Kt=e}function ec(e){e.return!==null&&(qn(e,1),Qp(e,1,0))}function tc(e){for(;e===Ps;)Ps=Dr[--Lr],Dr[Lr]=null,Os=Dr[--Lr],Dr[Lr]=null;for(;e===tr;)tr=at[--ut],at[ut]=null,Kt=at[--ut],at[ut]=null,Qt=at[--ut],at[ut]=null}var tt=null,et=null,me=!1,_t=null;function Kp(e,t){var n=ct(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Mh(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,tt=e,et=Nn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,tt=e,et=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=tr!==null?{id:Qt,overflow:Kt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ct(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,tt=e,et=null,!0):!1;default:return!1}}function wu(e){return(e.mode&1)!==0&&(e.flags&128)===0}function xu(e){if(me){var t=et;if(t){var n=t;if(!Mh(e,t)){if(wu(e))throw Error(j(418));t=Nn(n.nextSibling);var r=tt;t&&Mh(e,t)?Kp(r,n):(e.flags=e.flags&-4097|2,me=!1,tt=e)}}else{if(wu(e))throw Error(j(418));e.flags=e.flags&-4097|2,me=!1,tt=e}}}function Ih(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;tt=e}function os(e){if(e!==tt)return!1;if(!me)return Ih(e),me=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!gu(e.type,e.memoizedProps)),t&&(t=et)){if(wu(e))throw Jp(),Error(j(418));for(;t;)Kp(e,t),t=Nn(t.nextSibling)}if(Ih(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){et=Nn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}et=null}}else et=tt?Nn(e.stateNode.nextSibling):null;return!0}function Jp(){for(var e=et;e;)e=Nn(e.nextSibling)}function Yr(){et=tt=null,me=!1}function nc(e){_t===null?_t=[e]:_t.push(e)}var XS=on.ReactCurrentBatchConfig;function Mo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(j(309));var r=n.stateNode}if(!r)throw Error(j(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(s){var l=o.refs;s===null?delete l[i]:l[i]=s},t._stringRef=i,t)}if(typeof e!="string")throw Error(j(284));if(!n._owner)throw Error(j(290,e))}return e}function is(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ph(e){var t=e._init;return t(e._payload)}function eg(e){function t(g,y){if(e){var p=g.deletions;p===null?(g.deletions=[y],g.flags|=16):p.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g,y){for(g=new Map;y!==null;)y.key!==null?g.set(y.key,y):g.set(y.index,y),y=y.sibling;return g}function o(g,y){return g=In(g,y),g.index=0,g.sibling=null,g}function i(g,y,p){return g.index=p,e?(p=g.alternate,p!==null?(p=p.index,p<y?(g.flags|=2,y):p):(g.flags|=2,y)):(g.flags|=1048576,y)}function s(g){return e&&g.alternate===null&&(g.flags|=2),g}function l(g,y,p,v){return y===null||y.tag!==6?(y=Wa(p,g.mode,v),y.return=g,y):(y=o(y,p),y.return=g,y)}function a(g,y,p,v){var k=p.type;return k===br?c(g,y,p.props.children,v,p.key):y!==null&&(y.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===mn&&Ph(k)===y.type)?(v=o(y,p.props),v.ref=Mo(g,y,p),v.return=g,v):(v=vs(p.type,p.key,p.props,null,g.mode,v),v.ref=Mo(g,y,p),v.return=g,v)}function u(g,y,p,v){return y===null||y.tag!==4||y.stateNode.containerInfo!==p.containerInfo||y.stateNode.implementation!==p.implementation?(y=Ua(p,g.mode,v),y.return=g,y):(y=o(y,p.children||[]),y.return=g,y)}function c(g,y,p,v,k){return y===null||y.tag!==7?(y=Jn(p,g.mode,v,k),y.return=g,y):(y=o(y,p),y.return=g,y)}function f(g,y,p){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Wa(""+y,g.mode,p),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Wi:return p=vs(y.type,y.key,y.props,null,g.mode,p),p.ref=Mo(g,null,y),p.return=g,p;case Cr:return y=Ua(y,g.mode,p),y.return=g,y;case mn:var v=y._init;return f(g,v(y._payload),p)}if(Do(y)||_o(y))return y=Jn(y,g.mode,p,null),y.return=g,y;is(g,y)}return null}function d(g,y,p,v){var k=y!==null?y.key:null;if(typeof p=="string"&&p!==""||typeof p=="number")return k!==null?null:l(g,y,""+p,v);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Wi:return p.key===k?a(g,y,p,v):null;case Cr:return p.key===k?u(g,y,p,v):null;case mn:return k=p._init,d(g,y,k(p._payload),v)}if(Do(p)||_o(p))return k!==null?null:c(g,y,p,v,null);is(g,p)}return null}function h(g,y,p,v,k){if(typeof v=="string"&&v!==""||typeof v=="number")return g=g.get(p)||null,l(y,g,""+v,k);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Wi:return g=g.get(v.key===null?p:v.key)||null,a(y,g,v,k);case Cr:return g=g.get(v.key===null?p:v.key)||null,u(y,g,v,k);case mn:var S=v._init;return h(g,y,p,S(v._payload),k)}if(Do(v)||_o(v))return g=g.get(p)||null,c(y,g,v,k,null);is(y,v)}return null}function m(g,y,p,v){for(var k=null,S=null,_=y,N=y=0,M=null;_!==null&&N<p.length;N++){_.index>N?(M=_,_=null):M=_.sibling;var A=d(g,_,p[N],v);if(A===null){_===null&&(_=M);break}e&&_&&A.alternate===null&&t(g,_),y=i(A,y,N),S===null?k=A:S.sibling=A,S=A,_=M}if(N===p.length)return n(g,_),me&&qn(g,N),k;if(_===null){for(;N<p.length;N++)_=f(g,p[N],v),_!==null&&(y=i(_,y,N),S===null?k=_:S.sibling=_,S=_);return me&&qn(g,N),k}for(_=r(g,_);N<p.length;N++)M=h(_,g,N,p[N],v),M!==null&&(e&&M.alternate!==null&&_.delete(M.key===null?N:M.key),y=i(M,y,N),S===null?k=M:S.sibling=M,S=M);return e&&_.forEach(function(R){return t(g,R)}),me&&qn(g,N),k}function w(g,y,p,v){var k=_o(p);if(typeof k!="function")throw Error(j(150));if(p=k.call(p),p==null)throw Error(j(151));for(var S=k=null,_=y,N=y=0,M=null,A=p.next();_!==null&&!A.done;N++,A=p.next()){_.index>N?(M=_,_=null):M=_.sibling;var R=d(g,_,A.value,v);if(R===null){_===null&&(_=M);break}e&&_&&R.alternate===null&&t(g,_),y=i(R,y,N),S===null?k=R:S.sibling=R,S=R,_=M}if(A.done)return n(g,_),me&&qn(g,N),k;if(_===null){for(;!A.done;N++,A=p.next())A=f(g,A.value,v),A!==null&&(y=i(A,y,N),S===null?k=A:S.sibling=A,S=A);return me&&qn(g,N),k}for(_=r(g,_);!A.done;N++,A=p.next())A=h(_,g,N,A.value,v),A!==null&&(e&&A.alternate!==null&&_.delete(A.key===null?N:A.key),y=i(A,y,N),S===null?k=A:S.sibling=A,S=A);return e&&_.forEach(function(V){return t(g,V)}),me&&qn(g,N),k}function x(g,y,p,v){if(typeof p=="object"&&p!==null&&p.type===br&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Wi:e:{for(var k=p.key,S=y;S!==null;){if(S.key===k){if(k=p.type,k===br){if(S.tag===7){n(g,S.sibling),y=o(S,p.props.children),y.return=g,g=y;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===mn&&Ph(k)===S.type){n(g,S.sibling),y=o(S,p.props),y.ref=Mo(g,S,p),y.return=g,g=y;break e}n(g,S);break}else t(g,S);S=S.sibling}p.type===br?(y=Jn(p.props.children,g.mode,v,p.key),y.return=g,g=y):(v=vs(p.type,p.key,p.props,null,g.mode,v),v.ref=Mo(g,y,p),v.return=g,g=v)}return s(g);case Cr:e:{for(S=p.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===p.containerInfo&&y.stateNode.implementation===p.implementation){n(g,y.sibling),y=o(y,p.children||[]),y.return=g,g=y;break e}else{n(g,y);break}else t(g,y);y=y.sibling}y=Ua(p,g.mode,v),y.return=g,g=y}return s(g);case mn:return S=p._init,x(g,y,S(p._payload),v)}if(Do(p))return m(g,y,p,v);if(_o(p))return w(g,y,p,v);is(g,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,y!==null&&y.tag===6?(n(g,y.sibling),y=o(y,p),y.return=g,g=y):(n(g,y),y=Wa(p,g.mode,v),y.return=g,g=y),s(g)):n(g,y)}return x}var qr=eg(!0),tg=eg(!1),Ts=Dn(null),Ds=null,zr=null,rc=null;function oc(){rc=zr=Ds=null}function ic(e){var t=Ts.current;pe(Ts),e._currentValue=t}function Eu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Vr(e,t){Ds=e,rc=zr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(qe=!0),e.firstContext=null)}function ft(e){var t=e._currentValue;if(rc!==e)if(e={context:e,memoizedValue:t,next:null},zr===null){if(Ds===null)throw Error(j(308));zr=e,Ds.dependencies={lanes:0,firstContext:e}}else zr=zr.next=e;return t}var Zn=null;function sc(e){Zn===null?Zn=[e]:Zn.push(e)}function ng(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,sc(t)):(n.next=o.next,o.next=n),t.interleaved=n,nn(e,r)}function nn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var yn=!1;function lc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rg(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Jt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Cn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ae&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,nn(e,n)}return o=r.interleaved,o===null?(t.next=t,sc(r)):(t.next=o.next,o.next=t),r.interleaved=t,nn(e,n)}function fs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yu(e,n)}}function Oh(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ls(e,t,n,r){var o=e.updateQueue;yn=!1;var i=o.firstBaseUpdate,s=o.lastBaseUpdate,l=o.shared.pending;if(l!==null){o.shared.pending=null;var a=l,u=a.next;a.next=null,s===null?i=u:s.next=u,s=a;var c=e.alternate;c!==null&&(c=c.updateQueue,l=c.lastBaseUpdate,l!==s&&(l===null?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=a))}if(i!==null){var f=o.baseState;s=0,c=u=a=null,l=i;do{var d=l.lane,h=l.eventTime;if((r&d)===d){c!==null&&(c=c.next={eventTime:h,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,w=l;switch(d=t,h=n,w.tag){case 1:if(m=w.payload,typeof m=="function"){f=m.call(h,f,d);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=w.payload,d=typeof m=="function"?m.call(h,f,d):m,d==null)break e;f=xe({},f,d);break e;case 2:yn=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[l]:d.push(l))}else h={eventTime:h,lane:d,tag:l.tag,payload:l.payload,callback:l.callback,next:null},c===null?(u=c=h,a=f):c=c.next=h,s|=d;if(l=l.next,l===null){if(l=o.shared.pending,l===null)break;d=l,l=d.next,d.next=null,o.lastBaseUpdate=d,o.shared.pending=null}}while(!0);if(c===null&&(a=f),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do s|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);rr|=s,e.lanes=s,e.memoizedState=f}}function Th(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(j(191,o));o.call(r)}}}var di={},Bt=Dn(di),ni=Dn(di),ri=Dn(di);function Qn(e){if(e===di)throw Error(j(174));return e}function ac(e,t){switch(fe(ri,t),fe(ni,e),fe(Bt,di),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:tu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=tu(t,e)}pe(Bt),fe(Bt,t)}function Xr(){pe(Bt),pe(ni),pe(ri)}function og(e){Qn(ri.current);var t=Qn(Bt.current),n=tu(t,e.type);t!==n&&(fe(ni,e),fe(Bt,n))}function uc(e){ni.current===e&&(pe(Bt),pe(ni))}var ve=Dn(0);function zs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $a=[];function cc(){for(var e=0;e<$a.length;e++)$a[e]._workInProgressVersionPrimary=null;$a.length=0}var hs=on.ReactCurrentDispatcher,Ba=on.ReactCurrentBatchConfig,nr=0,we=null,be=null,Ie=null,As=!1,Fo=!1,oi=0,GS=0;function Re(){throw Error(j(321))}function dc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!bt(e[n],t[n]))return!1;return!0}function fc(e,t,n,r,o,i){if(nr=i,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hs.current=e===null||e.memoizedState===null?JS:ek,e=n(r,o),Fo){i=0;do{if(Fo=!1,oi=0,25<=i)throw Error(j(301));i+=1,Ie=be=null,t.updateQueue=null,hs.current=tk,e=n(r,o)}while(Fo)}if(hs.current=Rs,t=be!==null&&be.next!==null,nr=0,Ie=be=we=null,As=!1,t)throw Error(j(300));return e}function hc(){var e=oi!==0;return oi=0,e}function At(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?we.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function ht(){if(be===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=Ie===null?we.memoizedState:Ie.next;if(t!==null)Ie=t,be=e;else{if(e===null)throw Error(j(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},Ie===null?we.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function ii(e,t){return typeof t=="function"?t(e):t}function Ha(e){var t=ht(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=be,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var l=s=null,a=null,u=i;do{var c=u.lane;if((nr&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(l=a=f,s=r):a=a.next=f,we.lanes|=c,rr|=c}u=u.next}while(u!==null&&u!==i);a===null?s=r:a.next=l,bt(r,t.memoizedState)||(qe=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,we.lanes|=i,rr|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Fa(e){var t=ht(),n=t.queue;if(n===null)throw Error(j(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);bt(i,t.memoizedState)||(qe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ig(){}function sg(e,t){var n=we,r=ht(),o=t(),i=!bt(r.memoizedState,o);if(i&&(r.memoizedState=o,qe=!0),r=r.queue,pc(ug.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ie!==null&&Ie.memoizedState.tag&1){if(n.flags|=2048,si(9,ag.bind(null,n,r,o,t),void 0,null),Pe===null)throw Error(j(349));(nr&30)!==0||lg(n,t,o)}return o}function lg(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ag(e,t,n,r){t.value=n,t.getSnapshot=r,cg(t)&&dg(e)}function ug(e,t,n){return n(function(){cg(t)&&dg(e)})}function cg(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!bt(e,n)}catch{return!0}}function dg(e){var t=nn(e,1);t!==null&&Ct(t,e,1,-1)}function Dh(e){var t=At();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ii,lastRenderedState:e},t.queue=e,e=e.dispatch=KS.bind(null,we,e),[t.memoizedState,e]}function si(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=we.updateQueue,t===null?(t={lastEffect:null,stores:null},we.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function fg(){return ht().memoizedState}function ps(e,t,n,r){var o=At();we.flags|=e,o.memoizedState=si(1|t,n,void 0,r===void 0?null:r)}function Gs(e,t,n,r){var o=ht();r=r===void 0?null:r;var i=void 0;if(be!==null){var s=be.memoizedState;if(i=s.destroy,r!==null&&dc(r,s.deps)){o.memoizedState=si(t,n,i,r);return}}we.flags|=e,o.memoizedState=si(1|t,n,i,r)}function Lh(e,t){return ps(8390656,8,e,t)}function pc(e,t){return Gs(2048,8,e,t)}function hg(e,t){return Gs(4,2,e,t)}function pg(e,t){return Gs(4,4,e,t)}function gg(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function mg(e,t,n){return n=n!=null?n.concat([e]):null,Gs(4,4,gg.bind(null,t,e),n)}function gc(){}function yg(e,t){var n=ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vg(e,t){var n=ht();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&dc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function wg(e,t,n){return(nr&21)===0?(e.baseState&&(e.baseState=!1,qe=!0),e.memoizedState=n):(bt(n,t)||(n=_p(),we.lanes|=n,rr|=n,e.baseState=!0),t)}function ZS(e,t){var n=ce;ce=n!==0&&4>n?n:4,e(!0);var r=Ba.transition;Ba.transition={};try{e(!1),t()}finally{ce=n,Ba.transition=r}}function xg(){return ht().memoizedState}function QS(e,t,n){var r=Mn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Eg(e))Sg(t,n);else if(n=ng(e,t,n,r),n!==null){var o=We();Ct(n,e,r,o),kg(n,t,r)}}function KS(e,t,n){var r=Mn(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Eg(e))Sg(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(o.hasEagerState=!0,o.eagerState=l,bt(l,s)){var a=t.interleaved;a===null?(o.next=o,sc(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=ng(e,t,o,r),n!==null&&(o=We(),Ct(n,e,r,o),kg(n,t,r))}}function Eg(e){var t=e.alternate;return e===we||t!==null&&t===we}function Sg(e,t){Fo=As=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kg(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Yu(e,n)}}var Rs={readContext:ft,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},JS={readContext:ft,useCallback:function(e,t){return At().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:Lh,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ps(4194308,4,gg.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return ps(4,2,e,t)},useMemo:function(e,t){var n=At();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=At();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=QS.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=At();return e={current:e},t.memoizedState=e},useState:Dh,useDebugValue:gc,useDeferredValue:function(e){return At().memoizedState=e},useTransition:function(){var e=Dh(!1),t=e[0];return e=ZS.bind(null,e[1]),At().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=we,o=At();if(me){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Pe===null)throw Error(j(349));(nr&30)!==0||lg(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Lh(ug.bind(null,r,i,e),[e]),r.flags|=2048,si(9,ag.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=At(),t=Pe.identifierPrefix;if(me){var n=Kt,r=Qt;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=oi++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=GS++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ek={readContext:ft,useCallback:yg,useContext:ft,useEffect:pc,useImperativeHandle:mg,useInsertionEffect:hg,useLayoutEffect:pg,useMemo:vg,useReducer:Ha,useRef:fg,useState:function(){return Ha(ii)},useDebugValue:gc,useDeferredValue:function(e){var t=ht();return wg(t,be.memoizedState,e)},useTransition:function(){var e=Ha(ii)[0],t=ht().memoizedState;return[e,t]},useMutableSource:ig,useSyncExternalStore:sg,useId:xg,unstable_isNewReconciler:!1},tk={readContext:ft,useCallback:yg,useContext:ft,useEffect:pc,useImperativeHandle:mg,useInsertionEffect:hg,useLayoutEffect:pg,useMemo:vg,useReducer:Fa,useRef:fg,useState:function(){return Fa(ii)},useDebugValue:gc,useDeferredValue:function(e){var t=ht();return be===null?t.memoizedState=e:wg(t,be.memoizedState,e)},useTransition:function(){var e=Fa(ii)[0],t=ht().memoizedState;return[e,t]},useMutableSource:ig,useSyncExternalStore:sg,useId:xg,unstable_isNewReconciler:!1};function St(e,t){if(e&&e.defaultProps){t=xe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Su(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:xe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zs={isMounted:function(e){return(e=e._reactInternals)?sr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=We(),o=Mn(e),i=Jt(r,o);i.payload=t,n!=null&&(i.callback=n),t=Cn(e,i,o),t!==null&&(Ct(t,e,o,r),fs(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=We(),o=Mn(e),i=Jt(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Cn(e,i,o),t!==null&&(Ct(t,e,o,r),fs(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=We(),r=Mn(e),o=Jt(n,r);o.tag=2,t!=null&&(o.callback=t),t=Cn(e,o,r),t!==null&&(Ct(t,e,r,n),fs(t,e,r))}};function zh(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Ko(n,r)||!Ko(o,i):!0}function _g(e,t,n){var r=!1,o=On,i=t.contextType;return typeof i=="object"&&i!==null?i=ft(i):(o=Ge(t)?er:He.current,r=t.contextTypes,i=(r=r!=null)?Ur(e,o):On),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ah(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Zs.enqueueReplaceState(t,t.state,null)}function ku(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs={},lc(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=ft(i):(i=Ge(t)?er:He.current,o.context=Ur(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Su(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Zs.enqueueReplaceState(o,o.state,null),Ls(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function Gr(e,t){try{var n="",r=t;do n+=OE(r),r=r.return;while(r);var o=n}catch(i){o=`
|
|
1833
|
+
Error generating stack: `+i.message+`
|
|
1834
|
+
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function Va(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function _u(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var nk=typeof WeakMap=="function"?WeakMap:Map;function Ng(e,t,n){n=Jt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Bs||(Bs=!0,Lu=r),_u(e,t)},n}function Cg(e,t,n){n=Jt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){_u(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){_u(e,t),typeof r!="function"&&(bn===null?bn=new Set([this]):bn.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Rh(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new nk;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=mk.bind(null,e,t,n),t.then(e,e))}function $h(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Bh(e,t,n,r,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Jt(-1,1),t.tag=2,Cn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var rk=on.ReactCurrentOwner,qe=!1;function je(e,t,n,r){t.child=e===null?tg(t,null,n,r):qr(t,e.child,n,r)}function Hh(e,t,n,r,o){n=n.render;var i=t.ref;return Vr(t,o),r=fc(e,t,n,r,i,o),n=hc(),e!==null&&!qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rn(e,t,o)):(me&&n&&ec(t),t.flags|=1,je(e,t,r,o),t.child)}function Fh(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!kc(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,bg(e,t,i,r,o)):(e=vs(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,(e.lanes&o)===0){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ko,n(s,r)&&e.ref===t.ref)return rn(e,t,o)}return t.flags|=1,e=In(i,r),e.ref=t.ref,e.return=t,t.child=e}function bg(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Ko(i,r)&&e.ref===t.ref)if(qe=!1,t.pendingProps=r=i,(e.lanes&o)!==0)(e.flags&131072)!==0&&(qe=!0);else return t.lanes=e.lanes,rn(e,t,o)}return Nu(e,t,n,r,o)}function Mg(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},fe(Rr,Je),Je|=n;else{if((n&1073741824)===0)return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,fe(Rr,Je),Je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,fe(Rr,Je),Je|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,fe(Rr,Je),Je|=r;return je(e,t,o,n),t.child}function Ig(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Nu(e,t,n,r,o){var i=Ge(n)?er:He.current;return i=Ur(t,i),Vr(t,o),n=fc(e,t,n,r,i,o),r=hc(),e!==null&&!qe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,rn(e,t,o)):(me&&r&&ec(t),t.flags|=1,je(e,t,n,o),t.child)}function Vh(e,t,n,r,o){if(Ge(n)){var i=!0;Is(t)}else i=!1;if(Vr(t,o),t.stateNode===null)gs(e,t),_g(t,n,r),ku(t,n,r,o),r=!0;else if(e===null){var s=t.stateNode,l=t.memoizedProps;s.props=l;var a=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=ft(u):(u=Ge(n)?er:He.current,u=Ur(t,u));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==r||a!==u)&&Ah(t,s,r,u),yn=!1;var d=t.memoizedState;s.state=d,Ls(t,r,s,o),a=t.memoizedState,l!==r||d!==a||Xe.current||yn?(typeof c=="function"&&(Su(t,n,c,r),a=t.memoizedState),(l=yn||zh(t,n,l,r,d,a,u))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),s.props=r,s.state=a,s.context=u,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,rg(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:St(t.type,l),s.props=u,f=t.pendingProps,d=s.context,a=n.contextType,typeof a=="object"&&a!==null?a=ft(a):(a=Ge(n)?er:He.current,a=Ur(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(l!==f||d!==a)&&Ah(t,s,r,a),yn=!1,d=t.memoizedState,s.state=d,Ls(t,r,s,o);var m=t.memoizedState;l!==f||d!==m||Xe.current||yn?(typeof h=="function"&&(Su(t,n,h,r),m=t.memoizedState),(u=yn||zh(t,n,u,r,d,m,a)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,m,a),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,m,a)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),s.props=r,s.state=m,s.context=a,r=u):(typeof s.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Cu(e,t,n,r,i,o)}function Cu(e,t,n,r,o,i){Ig(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return o&&bh(t,n,!1),rn(e,t,i);r=t.stateNode,rk.current=t;var l=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=qr(t,e.child,null,i),t.child=qr(t,null,l,i)):je(e,t,l,i),t.memoizedState=r.state,o&&bh(t,n,!0),t.child}function Pg(e){var t=e.stateNode;t.pendingContext?Ch(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ch(e,t.context,!1),ac(e,t.containerInfo)}function jh(e,t,n,r,o){return Yr(),nc(o),t.flags|=256,je(e,t,n,r),t.child}var bu={dehydrated:null,treeContext:null,retryLane:0};function Mu(e){return{baseLanes:e,cachePool:null,transitions:null}}function Og(e,t,n){var r=t.pendingProps,o=ve.current,i=!1,s=(t.flags&128)!==0,l;if((l=s)||(l=e!==null&&e.memoizedState===null?!1:(o&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),fe(ve,o&1),e===null)return xu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(s=r.children,e=r.fallback,i?(r=t.mode,i=t.child,s={mode:"hidden",children:s},(r&1)===0&&i!==null?(i.childLanes=0,i.pendingProps=s):i=Js(s,r,0,null),e=Jn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Mu(n),t.memoizedState=bu,e):mc(t,s));if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null))return ok(e,t,s,r,l,o,n);if(i){i=r.fallback,s=t.mode,o=e.child,l=o.sibling;var a={mode:"hidden",children:r.children};return(s&1)===0&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=In(o,a),r.subtreeFlags=o.subtreeFlags&14680064),l!==null?i=In(l,i):(i=Jn(i,s,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,s=e.child.memoizedState,s=s===null?Mu(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},i.memoizedState=s,i.childLanes=e.childLanes&~n,t.memoizedState=bu,r}return i=e.child,e=i.sibling,r=In(i,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function mc(e,t){return t=Js({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function ss(e,t,n,r){return r!==null&&nc(r),qr(t,e.child,null,n),e=mc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ok(e,t,n,r,o,i,s){if(n)return t.flags&256?(t.flags&=-257,r=Va(Error(j(422))),ss(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Js({mode:"visible",children:r.children},o,0,null),i=Jn(i,o,s,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,(t.mode&1)!==0&&qr(t,e.child,null,s),t.child.memoizedState=Mu(s),t.memoizedState=bu,i);if((t.mode&1)===0)return ss(e,t,s,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(j(419)),r=Va(i,r,void 0),ss(e,t,s,r)}if(l=(s&e.childLanes)!==0,qe||l){if(r=Pe,r!==null){switch(s&-s){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=(o&(r.suspendedLanes|s))!==0?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,nn(e,o),Ct(r,e,o,-1))}return Sc(),r=Va(Error(j(421))),ss(e,t,s,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=yk.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,et=Nn(o.nextSibling),tt=t,me=!0,_t=null,e!==null&&(at[ut++]=Qt,at[ut++]=Kt,at[ut++]=tr,Qt=e.id,Kt=e.overflow,tr=t),t=mc(t,r.children),t.flags|=4096,t)}function Wh(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Eu(e.return,t,n)}function ja(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Tg(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(je(e,t,r.children,n),r=ve.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wh(e,n,t);else if(e.tag===19)Wh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(fe(ve,r),(t.mode&1)===0)t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&zs(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),ja(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&zs(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}ja(t,!0,n,null,i);break;case"together":ja(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function rn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rr|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,n=In(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=In(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ik(e,t,n){switch(t.tag){case 3:Pg(t),Yr();break;case 5:og(t);break;case 1:Ge(t.type)&&Is(t);break;case 4:ac(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;fe(Ts,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(fe(ve,ve.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?Og(e,t,n):(fe(ve,ve.current&1),e=rn(e,t,n),e!==null?e.sibling:null);fe(ve,ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return Tg(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),fe(ve,ve.current),r)break;return null;case 22:case 23:return t.lanes=0,Mg(e,t,n)}return rn(e,t,n)}var Dg,Iu,Lg,zg;Dg=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Iu=function(){};Lg=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Qn(Bt.current);var i=null;switch(n){case"input":o=Qa(e,o),r=Qa(e,r),i=[];break;case"select":o=xe({},o,{value:void 0}),r=xe({},r,{value:void 0}),i=[];break;case"textarea":o=eu(e,o),r=eu(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bs)}nu(n,r);var s;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var l=o[u];for(s in l)l.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Uo.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(l=o?.[u],r.hasOwnProperty(u)&&a!==l&&(a!=null||l!=null))if(u==="style")if(l){for(s in l)!l.hasOwnProperty(s)||a&&a.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in a)a.hasOwnProperty(s)&&l[s]!==a[s]&&(n||(n={}),n[s]=a[s])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,l=l?l.__html:void 0,a!=null&&l!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Uo.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&he("scroll",e),i||l===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};zg=function(e,t,n,r){n!==r&&(t.flags|=4)};function Io(e,t){if(!me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function sk(e,t,n){var r=t.pendingProps;switch(tc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return Ge(t.type)&&Ms(),$e(t),null;case 3:return r=t.stateNode,Xr(),pe(Xe),pe(He),cc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(os(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_t!==null&&(Ru(_t),_t=null))),Iu(e,t),$e(t),null;case 5:uc(t);var o=Qn(ri.current);if(n=t.type,e!==null&&t.stateNode!=null)Lg(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(j(166));return $e(t),null}if(e=Qn(Bt.current),os(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Rt]=t,r[ti]=i,e=(t.mode&1)!==0,n){case"dialog":he("cancel",r),he("close",r);break;case"iframe":case"object":case"embed":he("load",r);break;case"video":case"audio":for(o=0;o<zo.length;o++)he(zo[o],r);break;case"source":he("error",r);break;case"img":case"image":case"link":he("error",r),he("load",r);break;case"details":he("toggle",r);break;case"input":Kf(r,i),he("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},he("invalid",r);break;case"textarea":eh(r,i),he("invalid",r)}nu(n,i),o=null;for(var s in i)if(i.hasOwnProperty(s)){var l=i[s];s==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&rs(r.textContent,l,e),o=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&rs(r.textContent,l,e),o=["children",""+l]):Uo.hasOwnProperty(s)&&l!=null&&s==="onScroll"&&he("scroll",r)}switch(n){case"input":Ui(r),Jf(r,i,!0);break;case"textarea":Ui(r),th(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=bs)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=up(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Rt]=t,e[ti]=r,Dg(e,t,!1,!1),t.stateNode=e;e:{switch(s=ru(n,r),n){case"dialog":he("cancel",e),he("close",e),o=r;break;case"iframe":case"object":case"embed":he("load",e),o=r;break;case"video":case"audio":for(o=0;o<zo.length;o++)he(zo[o],e);o=r;break;case"source":he("error",e),o=r;break;case"img":case"image":case"link":he("error",e),he("load",e),o=r;break;case"details":he("toggle",e),o=r;break;case"input":Kf(e,r),o=Qa(e,r),he("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=xe({},r,{value:void 0}),he("invalid",e);break;case"textarea":eh(e,r),o=eu(e,r),he("invalid",e);break;default:o=r}nu(n,o),l=o;for(i in l)if(l.hasOwnProperty(i)){var a=l[i];i==="style"?fp(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&cp(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Yo(e,a):typeof a=="number"&&Yo(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Uo.hasOwnProperty(i)?a!=null&&i==="onScroll"&&he("scroll",e):a!=null&&Hu(e,i,a,s))}switch(n){case"input":Ui(e),Jf(e,r,!1);break;case"textarea":Ui(e),th(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Pn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?$r(e,!!r.multiple,i,!1):r.defaultValue!=null&&$r(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=bs)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return $e(t),null;case 6:if(e&&t.stateNode!=null)zg(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(j(166));if(n=Qn(ri.current),Qn(Bt.current),os(t)){if(r=t.stateNode,n=t.memoizedProps,r[Rt]=t,(i=r.nodeValue!==n)&&(e=tt,e!==null))switch(e.tag){case 3:rs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&rs(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Rt]=t,t.stateNode=r}return $e(t),null;case 13:if(pe(ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(me&&et!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Jp(),Yr(),t.flags|=98560,i=!1;else if(i=os(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(j(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(j(317));i[Rt]=t}else Yr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),i=!1}else _t!==null&&(Ru(_t),_t=null),i=!0;if(!i)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(ve.current&1)!==0?Me===0&&(Me=3):Sc())),t.updateQueue!==null&&(t.flags|=4),$e(t),null);case 4:return Xr(),Iu(e,t),e===null&&Jo(t.stateNode.containerInfo),$e(t),null;case 10:return ic(t.type._context),$e(t),null;case 17:return Ge(t.type)&&Ms(),$e(t),null;case 19:if(pe(ve),i=t.memoizedState,i===null)return $e(t),null;if(r=(t.flags&128)!==0,s=i.rendering,s===null)if(r)Io(i,!1);else{if(Me!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=zs(e),s!==null){for(t.flags|=128,Io(i,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,s=i.alternate,s===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=s.childLanes,i.lanes=s.lanes,i.child=s.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=s.memoizedProps,i.memoizedState=s.memoizedState,i.updateQueue=s.updateQueue,i.type=s.type,e=s.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fe(ve,ve.current&1|2),t.child}e=e.sibling}i.tail!==null&&_e()>Zr&&(t.flags|=128,r=!0,Io(i,!1),t.lanes=4194304)}else{if(!r)if(e=zs(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Io(i,!0),i.tail===null&&i.tailMode==="hidden"&&!s.alternate&&!me)return $e(t),null}else 2*_e()-i.renderingStartTime>Zr&&n!==1073741824&&(t.flags|=128,r=!0,Io(i,!1),t.lanes=4194304);i.isBackwards?(s.sibling=t.child,t.child=s):(n=i.last,n!==null?n.sibling=s:t.child=s,i.last=s)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=_e(),t.sibling=null,n=ve.current,fe(ve,r?n&1|2:n&1),t):($e(t),null);case 22:case 23:return Ec(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Je&1073741824)!==0&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function lk(e,t){switch(tc(t),t.tag){case 1:return Ge(t.type)&&Ms(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xr(),pe(Xe),pe(He),cc(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return uc(t),null;case 13:if(pe(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Yr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ve),null;case 4:return Xr(),null;case 10:return ic(t.type._context),null;case 22:case 23:return Ec(),null;case 24:return null;default:return null}}var ls=!1,Be=!1,ak=typeof WeakSet=="function"?WeakSet:Set,X=null;function Ar(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ee(e,t,r)}else n.current=null}function Pu(e,t,n){try{n()}catch(r){Ee(e,t,r)}}var Uh=!1;function uk(e,t){if(hu=_s,e=Hp(),Ju(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var s=0,l=-1,a=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||o!==0&&f.nodeType!==3||(l=s+o),f!==i||r!==0&&f.nodeType!==3||(a=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===o&&(l=s),d===i&&++c===r&&(a=s),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=l===-1||a===-1?null:{start:l,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(pu={focusedElem:e,selectionRange:n},_s=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var m=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var w=m.memoizedProps,x=m.memoizedState,g=t.stateNode,y=g.getSnapshotBeforeUpdate(t.elementType===t.type?w:St(t.type,w),x);g.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(v){Ee(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return m=Uh,Uh=!1,m}function Vo(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Pu(t,n,i)}o=o.next}while(o!==r)}}function Qs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ou(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ag(e){var t=e.alternate;t!==null&&(e.alternate=null,Ag(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[ti],delete t[yu],delete t[US],delete t[YS])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rg(e){return e.tag===5||e.tag===3||e.tag===4}function Yh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rg(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Tu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bs));else if(r!==4&&(e=e.child,e!==null))for(Tu(e,t,n),e=e.sibling;e!==null;)Tu(e,t,n),e=e.sibling}function Du(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Du(e,t,n),e=e.sibling;e!==null;)Du(e,t,n),e=e.sibling}var De=null,kt=!1;function gn(e,t,n){for(n=n.child;n!==null;)$g(e,t,n),n=n.sibling}function $g(e,t,n){if($t&&typeof $t.onCommitFiberUnmount=="function")try{$t.onCommitFiberUnmount(js,n)}catch{}switch(n.tag){case 5:Be||Ar(n,t);case 6:var r=De,o=kt;De=null,gn(e,t,n),De=r,kt=o,De!==null&&(kt?(e=De,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):De.removeChild(n.stateNode));break;case 18:De!==null&&(kt?(e=De,n=n.stateNode,e.nodeType===8?Aa(e.parentNode,n):e.nodeType===1&&Aa(e,n),Zo(e)):Aa(De,n.stateNode));break;case 4:r=De,o=kt,De=n.stateNode.containerInfo,kt=!0,gn(e,t,n),De=r,kt=o;break;case 0:case 11:case 14:case 15:if(!Be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,s=i.destroy;i=i.tag,s!==void 0&&((i&2)!==0||(i&4)!==0)&&Pu(n,t,s),o=o.next}while(o!==r)}gn(e,t,n);break;case 1:if(!Be&&(Ar(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Ee(n,t,l)}gn(e,t,n);break;case 21:gn(e,t,n);break;case 22:n.mode&1?(Be=(r=Be)||n.memoizedState!==null,gn(e,t,n),Be=r):gn(e,t,n);break;default:gn(e,t,n)}}function qh(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ak),t.forEach(function(r){var o=vk.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Et(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 5:De=l.stateNode,kt=!1;break e;case 3:De=l.stateNode.containerInfo,kt=!0;break e;case 4:De=l.stateNode.containerInfo,kt=!0;break e}l=l.return}if(De===null)throw Error(j(160));$g(i,s,o),De=null,kt=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){Ee(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Bg(t,e),t=t.sibling}function Bg(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Et(t,e),zt(e),r&4){try{Vo(3,e,e.return),Qs(3,e)}catch(w){Ee(e,e.return,w)}try{Vo(5,e,e.return)}catch(w){Ee(e,e.return,w)}}break;case 1:Et(t,e),zt(e),r&512&&n!==null&&Ar(n,n.return);break;case 5:if(Et(t,e),zt(e),r&512&&n!==null&&Ar(n,n.return),e.flags&32){var o=e.stateNode;try{Yo(o,"")}catch(w){Ee(e,e.return,w)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,s=n!==null?n.memoizedProps:i,l=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&lp(o,i),ru(l,s);var u=ru(l,i);for(s=0;s<a.length;s+=2){var c=a[s],f=a[s+1];c==="style"?fp(o,f):c==="dangerouslySetInnerHTML"?cp(o,f):c==="children"?Yo(o,f):Hu(o,c,f,u)}switch(l){case"input":Ka(o,i);break;case"textarea":ap(o,i);break;case"select":var d=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?$r(o,!!i.multiple,h,!1):d!==!!i.multiple&&(i.defaultValue!=null?$r(o,!!i.multiple,i.defaultValue,!0):$r(o,!!i.multiple,i.multiple?[]:"",!1))}o[ti]=i}catch(w){Ee(e,e.return,w)}}break;case 6:if(Et(t,e),zt(e),r&4){if(e.stateNode===null)throw Error(j(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(w){Ee(e,e.return,w)}}break;case 3:if(Et(t,e),zt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Zo(t.containerInfo)}catch(w){Ee(e,e.return,w)}break;case 4:Et(t,e),zt(e);break;case 13:Et(t,e),zt(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(wc=_e())),r&4&&qh(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Be=(u=Be)||c,Et(t,e),Be=u):Et(t,e),zt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&(e.mode&1)!==0)for(X=e,c=e.child;c!==null;){for(f=X=c;X!==null;){switch(d=X,h=d.child,d.tag){case 0:case 11:case 14:case 15:Vo(4,d,d.return);break;case 1:Ar(d,d.return);var m=d.stateNode;if(typeof m.componentWillUnmount=="function"){r=d,n=d.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(w){Ee(r,n,w)}}break;case 5:Ar(d,d.return);break;case 22:if(d.memoizedState!==null){Gh(f);continue}}h!==null?(h.return=d,X=h):Gh(f)}c=c.sibling}e:for(c=null,f=e;;){if(f.tag===5){if(c===null){c=f;try{o=f.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,a=f.memoizedProps.style,s=a!=null&&a.hasOwnProperty("display")?a.display:null,l.style.display=dp("display",s))}catch(w){Ee(e,e.return,w)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(w){Ee(e,e.return,w)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;c===f&&(c=null),f=f.return}c===f&&(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Et(t,e),zt(e),r&4&&qh(e);break;case 21:break;default:Et(t,e),zt(e)}}function zt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Rg(n)){var r=n;break e}n=n.return}throw Error(j(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Yo(o,""),r.flags&=-33);var i=Yh(e);Du(e,i,o);break;case 3:case 4:var s=r.stateNode.containerInfo,l=Yh(e);Tu(e,l,s);break;default:throw Error(j(161))}}catch(a){Ee(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ck(e,t,n){X=e,Hg(e,t,n)}function Hg(e,t,n){for(var r=(e.mode&1)!==0;X!==null;){var o=X,i=o.child;if(o.tag===22&&r){var s=o.memoizedState!==null||ls;if(!s){var l=o.alternate,a=l!==null&&l.memoizedState!==null||Be;l=ls;var u=Be;if(ls=s,(Be=a)&&!u)for(X=o;X!==null;)s=X,a=s.child,s.tag===22&&s.memoizedState!==null?Zh(o):a!==null?(a.return=s,X=a):Zh(o);for(;i!==null;)X=i,Hg(i,t,n),i=i.sibling;X=o,ls=l,Be=u}Xh(e,t,n)}else(o.subtreeFlags&8772)!==0&&i!==null?(i.return=o,X=i):Xh(e,t,n)}}function Xh(e){for(;X!==null;){var t=X;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:Be||Qs(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Be)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:St(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Th(t,i,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Th(t,s,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&&Zo(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}Be||t.flags&512&&Ou(t)}catch(d){Ee(t,t.return,d)}}if(t===e){X=null;break}if(n=t.sibling,n!==null){n.return=t.return,X=n;break}X=t.return}}function Gh(e){for(;X!==null;){var t=X;if(t===e){X=null;break}var n=t.sibling;if(n!==null){n.return=t.return,X=n;break}X=t.return}}function Zh(e){for(;X!==null;){var t=X;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Qs(4,t)}catch(a){Ee(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){Ee(t,o,a)}}var i=t.return;try{Ou(t)}catch(a){Ee(t,i,a)}break;case 5:var s=t.return;try{Ou(t)}catch(a){Ee(t,s,a)}}}catch(a){Ee(t,t.return,a)}if(t===e){X=null;break}var l=t.sibling;if(l!==null){l.return=t.return,X=l;break}X=t.return}}var dk=Math.ceil,$s=on.ReactCurrentDispatcher,yc=on.ReactCurrentOwner,dt=on.ReactCurrentBatchConfig,ae=0,Pe=null,Ce=null,Le=0,Je=0,Rr=Dn(0),Me=0,li=null,rr=0,Ks=0,vc=0,jo=null,Ye=null,wc=0,Zr=1/0,Gt=null,Bs=!1,Lu=null,bn=null,as=!1,En=null,Hs=0,Wo=0,zu=null,ms=-1,ys=0;function We(){return(ae&6)!==0?_e():ms!==-1?ms:ms=_e()}function Mn(e){return(e.mode&1)===0?1:(ae&2)!==0&&Le!==0?Le&-Le:XS.transition!==null?(ys===0&&(ys=_p()),ys):(e=ce,e!==0||(e=window.event,e=e===void 0?16:Op(e.type)),e)}function Ct(e,t,n,r){if(50<Wo)throw Wo=0,zu=null,Error(j(185));ai(e,n,r),((ae&2)===0||e!==Pe)&&(e===Pe&&((ae&2)===0&&(Ks|=n),Me===4&&wn(e,Le)),Ze(e,r),n===1&&ae===0&&(t.mode&1)===0&&(Zr=_e()+500,Xs&&Ln()))}function Ze(e,t){var n=e.callbackNode;ZE(e,t);var r=ks(e,e===Pe?Le:0);if(r===0)n!==null&&oh(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&oh(n),t===1)e.tag===0?qS(Qh.bind(null,e)):Zp(Qh.bind(null,e)),jS(function(){(ae&6)===0&&Ln()}),n=null;else{switch(Np(r)){case 1:n=Uu;break;case 4:n=Sp;break;case 16:n=Ss;break;case 536870912:n=kp;break;default:n=Ss}n=Xg(n,Fg.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fg(e,t){if(ms=-1,ys=0,(ae&6)!==0)throw Error(j(327));var n=e.callbackNode;if(jr()&&e.callbackNode!==n)return null;var r=ks(e,e===Pe?Le:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=Fs(e,r);else{t=r;var o=ae;ae|=2;var i=jg();(Pe!==e||Le!==t)&&(Gt=null,Zr=_e()+500,Kn(e,t));do try{pk();break}catch(l){Vg(e,l)}while(!0);oc(),$s.current=i,ae=o,Ce!==null?t=0:(Pe=null,Le=0,t=Me)}if(t!==0){if(t===2&&(o=au(e),o!==0&&(r=o,t=Au(e,o))),t===1)throw n=li,Kn(e,0),wn(e,r),Ze(e,_e()),n;if(t===6)wn(e,r);else{if(o=e.current.alternate,(r&30)===0&&!fk(o)&&(t=Fs(e,r),t===2&&(i=au(e),i!==0&&(r=i,t=Au(e,i))),t===1))throw n=li,Kn(e,0),wn(e,r),Ze(e,_e()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(j(345));case 2:Xn(e,Ye,Gt);break;case 3:if(wn(e,r),(r&130023424)===r&&(t=wc+500-_e(),10<t)){if(ks(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){We(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=mu(Xn.bind(null,e,Ye,Gt),t);break}Xn(e,Ye,Gt);break;case 4:if(wn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-Nt(r);i=1<<s,s=t[s],s>o&&(o=s),r&=~i}if(r=o,r=_e()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*dk(r/1960))-r,10<r){e.timeoutHandle=mu(Xn.bind(null,e,Ye,Gt),r);break}Xn(e,Ye,Gt);break;case 5:Xn(e,Ye,Gt);break;default:throw Error(j(329))}}}return Ze(e,_e()),e.callbackNode===n?Fg.bind(null,e):null}function Au(e,t){var n=jo;return e.current.memoizedState.isDehydrated&&(Kn(e,t).flags|=256),e=Fs(e,t),e!==2&&(t=Ye,Ye=n,t!==null&&Ru(t)),e}function Ru(e){Ye===null?Ye=e:Ye.push.apply(Ye,e)}function fk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!bt(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function wn(e,t){for(t&=~vc,t&=~Ks,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function Qh(e){if((ae&6)!==0)throw Error(j(327));jr();var t=ks(e,0);if((t&1)===0)return Ze(e,_e()),null;var n=Fs(e,t);if(e.tag!==0&&n===2){var r=au(e);r!==0&&(t=r,n=Au(e,r))}if(n===1)throw n=li,Kn(e,0),wn(e,t),Ze(e,_e()),n;if(n===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Xn(e,Ye,Gt),Ze(e,_e()),null}function xc(e,t){var n=ae;ae|=1;try{return e(t)}finally{ae=n,ae===0&&(Zr=_e()+500,Xs&&Ln())}}function or(e){En!==null&&En.tag===0&&(ae&6)===0&&jr();var t=ae;ae|=1;var n=dt.transition,r=ce;try{if(dt.transition=null,ce=1,e)return e()}finally{ce=r,dt.transition=n,ae=t,(ae&6)===0&&Ln()}}function Ec(){Je=Rr.current,pe(Rr)}function Kn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,VS(n)),Ce!==null)for(n=Ce.return;n!==null;){var r=n;switch(tc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ms();break;case 3:Xr(),pe(Xe),pe(He),cc();break;case 5:uc(r);break;case 4:Xr();break;case 13:pe(ve);break;case 19:pe(ve);break;case 10:ic(r.type._context);break;case 22:case 23:Ec()}n=n.return}if(Pe=e,Ce=e=In(e.current,null),Le=Je=t,Me=0,li=null,vc=Ks=rr=0,Ye=jo=null,Zn!==null){for(t=0;t<Zn.length;t++)if(n=Zn[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var s=i.next;i.next=o,r.next=s}n.pending=r}Zn=null}return e}function Vg(e,t){do{var n=Ce;try{if(oc(),hs.current=Rs,As){for(var r=we.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}As=!1}if(nr=0,Ie=be=we=null,Fo=!1,oi=0,yc.current=null,n===null||n.return===null){Me=1,li=t,Ce=null;break}e:{var i=e,s=n.return,l=n,a=t;if(t=Le,l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=l,f=c.tag;if((c.mode&1)===0&&(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=$h(s);if(h!==null){h.flags&=-257,Bh(h,s,l,i,t),h.mode&1&&Rh(i,u,t),t=h,a=u;var m=t.updateQueue;if(m===null){var w=new Set;w.add(a),t.updateQueue=w}else m.add(a);break e}else{if((t&1)===0){Rh(i,u,t),Sc();break e}a=Error(j(426))}}else if(me&&l.mode&1){var x=$h(s);if(x!==null){(x.flags&65536)===0&&(x.flags|=256),Bh(x,s,l,i,t),nc(Gr(a,l));break e}}i=a=Gr(a,l),Me!==4&&(Me=2),jo===null?jo=[i]:jo.push(i),i=s;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var g=Ng(i,a,t);Oh(i,g);break e;case 1:l=a;var y=i.type,p=i.stateNode;if((i.flags&128)===0&&(typeof y.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(bn===null||!bn.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var v=Cg(i,l,t);Oh(i,v);break e}}i=i.return}while(i!==null)}Ug(n)}catch(k){t=k,Ce===n&&n!==null&&(Ce=n=n.return);continue}break}while(!0)}function jg(){var e=$s.current;return $s.current=Rs,e===null?Rs:e}function Sc(){(Me===0||Me===3||Me===2)&&(Me=4),Pe===null||(rr&268435455)===0&&(Ks&268435455)===0||wn(Pe,Le)}function Fs(e,t){var n=ae;ae|=2;var r=jg();(Pe!==e||Le!==t)&&(Gt=null,Kn(e,t));do try{hk();break}catch(o){Vg(e,o)}while(!0);if(oc(),ae=n,$s.current=r,Ce!==null)throw Error(j(261));return Pe=null,Le=0,Me}function hk(){for(;Ce!==null;)Wg(Ce)}function pk(){for(;Ce!==null&&!FE();)Wg(Ce)}function Wg(e){var t=qg(e.alternate,e,Je);e.memoizedProps=e.pendingProps,t===null?Ug(e):Ce=t,yc.current=null}function Ug(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=sk(n,t,Je),n!==null){Ce=n;return}}else{if(n=lk(n,t),n!==null){n.flags&=32767,Ce=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Me=6,Ce=null;return}}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);Me===0&&(Me=5)}function Xn(e,t,n){var r=ce,o=dt.transition;try{dt.transition=null,ce=1,gk(e,t,n,r)}finally{dt.transition=o,ce=r}return null}function gk(e,t,n,r){do jr();while(En!==null);if((ae&6)!==0)throw Error(j(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(QE(e,i),e===Pe&&(Ce=Pe=null,Le=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||as||(as=!0,Xg(Ss,function(){return jr(),null})),i=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||i){i=dt.transition,dt.transition=null;var s=ce;ce=1;var l=ae;ae|=4,yc.current=null,uk(e,n),Bg(n,e),RS(pu),_s=!!hu,pu=hu=null,e.current=n,ck(n,e,o),VE(),ae=l,ce=s,dt.transition=i}else e.current=n;if(as&&(as=!1,En=e,Hs=o),i=e.pendingLanes,i===0&&(bn=null),UE(n.stateNode,r),Ze(e,_e()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(Bs)throw Bs=!1,e=Lu,Lu=null,e;return(Hs&1)!==0&&e.tag!==0&&jr(),i=e.pendingLanes,(i&1)!==0?e===zu?Wo++:(Wo=0,zu=e):Wo=0,Ln(),null}function jr(){if(En!==null){var e=Np(Hs),t=dt.transition,n=ce;try{if(dt.transition=null,ce=16>e?16:e,En===null)var r=!1;else{if(e=En,En=null,Hs=0,(ae&6)!==0)throw Error(j(331));var o=ae;for(ae|=4,X=e.current;X!==null;){var i=X,s=i.child;if((X.flags&16)!==0){var l=i.deletions;if(l!==null){for(var a=0;a<l.length;a++){var u=l[a];for(X=u;X!==null;){var c=X;switch(c.tag){case 0:case 11:case 15:Vo(8,c,i)}var f=c.child;if(f!==null)f.return=c,X=f;else for(;X!==null;){c=X;var d=c.sibling,h=c.return;if(Ag(c),c===u){X=null;break}if(d!==null){d.return=h,X=d;break}X=h}}}var m=i.alternate;if(m!==null){var w=m.child;if(w!==null){m.child=null;do{var x=w.sibling;w.sibling=null,w=x}while(w!==null)}}X=i}}if((i.subtreeFlags&2064)!==0&&s!==null)s.return=i,X=s;else e:for(;X!==null;){if(i=X,(i.flags&2048)!==0)switch(i.tag){case 0:case 11:case 15:Vo(9,i,i.return)}var g=i.sibling;if(g!==null){g.return=i.return,X=g;break e}X=i.return}}var y=e.current;for(X=y;X!==null;){s=X;var p=s.child;if((s.subtreeFlags&2064)!==0&&p!==null)p.return=s,X=p;else e:for(s=y;X!==null;){if(l=X,(l.flags&2048)!==0)try{switch(l.tag){case 0:case 11:case 15:Qs(9,l)}}catch(k){Ee(l,l.return,k)}if(l===s){X=null;break e}var v=l.sibling;if(v!==null){v.return=l.return,X=v;break e}X=l.return}}if(ae=o,Ln(),$t&&typeof $t.onPostCommitFiberRoot=="function")try{$t.onPostCommitFiberRoot(js,e)}catch{}r=!0}return r}finally{ce=n,dt.transition=t}}return!1}function Kh(e,t,n){t=Gr(n,t),t=Ng(e,t,1),e=Cn(e,t,1),t=We(),e!==null&&(ai(e,1,t),Ze(e,t))}function Ee(e,t,n){if(e.tag===3)Kh(e,e,n);else for(;t!==null;){if(t.tag===3){Kh(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(bn===null||!bn.has(r))){e=Gr(n,e),e=Cg(t,e,1),t=Cn(t,e,1),e=We(),t!==null&&(ai(t,1,e),Ze(t,e));break}}t=t.return}}function mk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=We(),e.pingedLanes|=e.suspendedLanes&n,Pe===e&&(Le&n)===n&&(Me===4||Me===3&&(Le&130023424)===Le&&500>_e()-wc?Kn(e,0):vc|=n),Ze(e,t)}function Yg(e,t){t===0&&((e.mode&1)===0?t=1:(t=Xi,Xi<<=1,(Xi&130023424)===0&&(Xi=4194304)));var n=We();e=nn(e,t),e!==null&&(ai(e,t,n),Ze(e,n))}function yk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yg(e,n)}function vk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(j(314))}r!==null&&r.delete(t),Yg(e,n)}var qg;qg=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xe.current)qe=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return qe=!1,ik(e,t,n);qe=(e.flags&131072)!==0}else qe=!1,me&&(t.flags&1048576)!==0&&Qp(t,Os,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;gs(e,t),e=t.pendingProps;var o=Ur(t,He.current);Vr(t,n),o=fc(null,t,r,e,o,n);var i=hc();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ge(r)?(i=!0,Is(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,lc(t),o.updater=Zs,t.stateNode=o,o._reactInternals=t,ku(t,r,e,n),t=Cu(null,t,r,!0,i,n)):(t.tag=0,me&&i&&ec(t),je(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(gs(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=xk(r),e=St(r,e),o){case 0:t=Nu(null,t,r,e,n);break e;case 1:t=Vh(null,t,r,e,n);break e;case 11:t=Hh(null,t,r,e,n);break e;case 14:t=Fh(null,t,r,St(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Nu(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Vh(e,t,r,o,n);case 3:e:{if(Pg(t),e===null)throw Error(j(387));r=t.pendingProps,i=t.memoizedState,o=i.element,rg(e,t),Ls(t,r,null,n);var s=t.memoizedState;if(r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Gr(Error(j(423)),t),t=jh(e,t,r,n,o);break e}else if(r!==o){o=Gr(Error(j(424)),t),t=jh(e,t,r,n,o);break e}else for(et=Nn(t.stateNode.containerInfo.firstChild),tt=t,me=!0,_t=null,n=tg(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Yr(),r===o){t=rn(e,t,n);break e}je(e,t,r,n)}t=t.child}return t;case 5:return og(t),e===null&&xu(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,s=o.children,gu(r,o)?s=null:i!==null&&gu(r,i)&&(t.flags|=32),Ig(e,t),je(e,t,s,n),t.child;case 6:return e===null&&xu(t),null;case 13:return Og(e,t,n);case 4:return ac(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=qr(t,null,r,n):je(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),Hh(e,t,r,o,n);case 7:return je(e,t,t.pendingProps,n),t.child;case 8:return je(e,t,t.pendingProps.children,n),t.child;case 12:return je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,s=o.value,fe(Ts,r._currentValue),r._currentValue=s,i!==null)if(bt(i.value,s)){if(i.children===o.children&&!Xe.current){t=rn(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){s=i.child;for(var a=l.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Jt(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Eu(i.return,n,t),l.lanes|=n;break}a=a.next}}else if(i.tag===10)s=i.type===t.type?null:i.child;else if(i.tag===18){if(s=i.return,s===null)throw Error(j(341));s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Eu(s,n,t),s=i.sibling}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===t){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}je(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Vr(t,n),o=ft(o),r=r(o),t.flags|=1,je(e,t,r,n),t.child;case 14:return r=t.type,o=St(r,t.pendingProps),o=St(r.type,o),Fh(e,t,r,o,n);case 15:return bg(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:St(r,o),gs(e,t),t.tag=1,Ge(r)?(e=!0,Is(t)):e=!1,Vr(t,n),_g(t,r,o),ku(t,r,o,n),Cu(null,t,r,!0,e,n);case 19:return Tg(e,t,n);case 22:return Mg(e,t,n)}throw Error(j(156,t.tag))};function Xg(e,t){return Ep(e,t)}function wk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ct(e,t,n,r){return new wk(e,t,n,r)}function kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xk(e){if(typeof e=="function")return kc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Vu)return 11;if(e===ju)return 14}return 2}function In(e,t){var n=e.alternate;return n===null?(n=ct(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function vs(e,t,n,r,o,i){var s=2;if(r=e,typeof e=="function")kc(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case br:return Jn(n.children,o,i,t);case Fu:s=8,o|=8;break;case qa:return e=ct(12,n,t,o|2),e.elementType=qa,e.lanes=i,e;case Xa:return e=ct(13,n,t,o),e.elementType=Xa,e.lanes=i,e;case Ga:return e=ct(19,n,t,o),e.elementType=Ga,e.lanes=i,e;case op:return Js(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case np:s=10;break e;case rp:s=9;break e;case Vu:s=11;break e;case ju:s=14;break e;case mn:s=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=ct(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Jn(e,t,n,r){return e=ct(7,e,r,t),e.lanes=n,e}function Js(e,t,n,r){return e=ct(22,e,r,t),e.elementType=op,e.lanes=n,e.stateNode={isHidden:!1},e}function Wa(e,t,n){return e=ct(6,e,null,t),e.lanes=n,e}function Ua(e,t,n){return t=ct(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ek(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ma(0),this.expirationTimes=Ma(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ma(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function _c(e,t,n,r,o,i,s,l,a){return e=new Ek(e,t,n,l,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ct(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lc(i),e}function Sk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Cr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Gg(e){if(!e)return On;e=e._reactInternals;e:{if(sr(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ge(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var n=e.type;if(Ge(n))return Gp(e,n,t)}return t}function Zg(e,t,n,r,o,i,s,l,a){return e=_c(n,r,!0,e,o,i,s,l,a),e.context=Gg(null),n=e.current,r=We(),o=Mn(n),i=Jt(r,o),i.callback=t??null,Cn(n,i,o),e.current.lanes=o,ai(e,o,r),Ze(e,r),e}function el(e,t,n,r){var o=t.current,i=We(),s=Mn(o);return n=Gg(n),t.context===null?t.context=n:t.pendingContext=n,t=Jt(i,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Cn(o,t,s),e!==null&&(Ct(e,o,s,i),fs(e,o,s)),s}function Vs(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Jh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Nc(e,t){Jh(e,t),(e=e.alternate)&&Jh(e,t)}function kk(){return null}var Qg=typeof reportError=="function"?reportError:function(e){console.error(e)};function Cc(e){this._internalRoot=e}tl.prototype.render=Cc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));el(e,t,null,null)};tl.prototype.unmount=Cc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;or(function(){el(null,e,null,null)}),t[tn]=null}};function tl(e){this._internalRoot=e}tl.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mp();e={blockedOn:null,target:e,priority:t};for(var n=0;n<vn.length&&t!==0&&t<vn[n].priority;n++);vn.splice(n,0,e),n===0&&Pp(e)}};function bc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function nl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function ep(){}function _k(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=Vs(s);i.call(u)}}var s=Zg(t,r,e,0,null,!1,!1,"",ep);return e._reactRootContainer=s,e[tn]=s.current,Jo(e.nodeType===8?e.parentNode:e),or(),s}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var l=r;r=function(){var u=Vs(a);l.call(u)}}var a=_c(e,0,!1,null,null,!1,!1,"",ep);return e._reactRootContainer=a,e[tn]=a.current,Jo(e.nodeType===8?e.parentNode:e),or(function(){el(t,a,n,r)}),a}function rl(e,t,n,r,o){var i=n._reactRootContainer;if(i){var s=i;if(typeof o=="function"){var l=o;o=function(){var a=Vs(s);l.call(a)}}el(t,s,e,o)}else s=_k(n,t,e,o,r);return Vs(s)}Cp=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Lo(t.pendingLanes);n!==0&&(Yu(t,n|1),Ze(t,_e()),(ae&6)===0&&(Zr=_e()+500,Ln()))}break;case 13:or(function(){var r=nn(e,1);if(r!==null){var o=We();Ct(r,e,1,o)}}),Nc(e,1)}};qu=function(e){if(e.tag===13){var t=nn(e,134217728);if(t!==null){var n=We();Ct(t,e,134217728,n)}Nc(e,134217728)}};bp=function(e){if(e.tag===13){var t=Mn(e),n=nn(e,t);if(n!==null){var r=We();Ct(n,e,t,r)}Nc(e,t)}};Mp=function(){return ce};Ip=function(e,t){var n=ce;try{return ce=e,t()}finally{ce=n}};iu=function(e,t,n){switch(t){case"input":if(Ka(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=qs(r);if(!o)throw Error(j(90));sp(r),Ka(r,o)}}}break;case"textarea":ap(e,n);break;case"select":t=n.value,t!=null&&$r(e,!!n.multiple,t,!1)}};gp=xc;mp=or;var Nk={usingClientEntryPoint:!1,Events:[ci,Or,qs,hp,pp,xc]},Po={findFiberByHostInstance:Gn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ck={bundleType:Po.bundleType,version:Po.version,rendererPackageName:Po.rendererPackageName,rendererConfig:Po.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:on.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=wp(e),e===null?null:e.stateNode},findFiberByHostInstance:Po.findFiberByHostInstance||kk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Oo=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Oo.isDisabled&&Oo.supportsFiber))try{js=Oo.inject(Ck),$t=Oo}catch{}var Oo;ot.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Nk;ot.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bc(t))throw Error(j(200));return Sk(e,t,null,n)};ot.createRoot=function(e,t){if(!bc(e))throw Error(j(299));var n=!1,r="",o=Qg;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=_c(e,1,!1,null,null,n,!1,r,o),e[tn]=t.current,Jo(e.nodeType===8?e.parentNode:e),new Cc(t)};ot.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=wp(t),e=e===null?null:e.stateNode,e};ot.flushSync=function(e){return or(e)};ot.hydrate=function(e,t,n){if(!nl(t))throw Error(j(200));return rl(null,e,t,!0,n)};ot.hydrateRoot=function(e,t,n){if(!bc(e))throw Error(j(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",s=Qg;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=Zg(t,null,e,1,n??null,o,!1,i,s),e[tn]=t.current,Jo(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new tl(t)};ot.render=function(e,t,n){if(!nl(t))throw Error(j(200));return rl(null,e,t,!1,n)};ot.unmountComponentAtNode=function(e){if(!nl(e))throw Error(j(40));return e._reactRootContainer?(or(function(){rl(null,null,e,!1,function(){e._reactRootContainer=null,e[tn]=null})}),!0):!1};ot.unstable_batchedUpdates=xc;ot.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!nl(n))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return rl(e,t,n,!1,r)};ot.version="18.3.1-next-f1338f8080-20240426"});var Mc=K((n3,em)=>{"use strict";function Jg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Jg)}catch(e){console.error(e)}}Jg(),em.exports=Kg()});var nm=K(Ic=>{"use strict";var tm=Mc();Ic.createRoot=tm.createRoot,Ic.hydrateRoot=tm.hydrateRoot;var r3});var om=K(ol=>{"use strict";var bk=hn(),Mk=Symbol.for("react.element"),Ik=Symbol.for("react.fragment"),Pk=Object.prototype.hasOwnProperty,Ok=bk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Tk={key:!0,ref:!0,__self:!0,__source:!0};function rm(e,t,n){var r,o={},i=null,s=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Pk.call(t,r)&&!Tk.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Mk,type:e,key:i,ref:s,props:o,_owner:Ok.current}}ol.Fragment=Ik;ol.jsx=rm;ol.jsxs=rm});var il=K((s3,im)=>{"use strict";im.exports=om()});var ty=K(ey=>{"use strict";var yo=hn();function X2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var G2=typeof Object.is=="function"?Object.is:X2,Z2=yo.useState,Q2=yo.useEffect,K2=yo.useLayoutEffect,J2=yo.useDebugValue;function eb(e,t){var n=t(),r=Z2({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return K2(function(){o.value=n,o.getSnapshot=t,Hd(o)&&i({inst:o})},[e,n,t]),Q2(function(){return Hd(o)&&i({inst:o}),e(function(){Hd(o)&&i({inst:o})})},[e]),J2(n),n}function Hd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!G2(e,n)}catch{return!0}}function tb(e,t){return t()}var nb=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?tb:eb;ey.useSyncExternalStore=yo.useSyncExternalStore!==void 0?yo.useSyncExternalStore:nb});var ry=K((cD,ny)=>{"use strict";ny.exports=ty()});var iy=K(oy=>{"use strict";var Yl=hn(),rb=ry();function ob(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ib=typeof Object.is=="function"?Object.is:ob,sb=rb.useSyncExternalStore,lb=Yl.useRef,ab=Yl.useEffect,ub=Yl.useMemo,cb=Yl.useDebugValue;oy.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=lb(null);if(i.current===null){var s={hasValue:!1,value:null};i.current=s}else s=i.current;i=ub(function(){function a(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&s.hasValue){var m=s.value;if(o(m,h))return f=m}return f=h}if(m=f,ib(c,h))return m;var w=r(h);return o!==void 0&&o(m,w)?(c=h,m):(c=h,f=w)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return a(t())},d===null?void 0:function(){return a(d())}]},[t,n,r,o]);var l=sb(e,i[0],i[1]);return ab(function(){s.hasValue=!0,s.value=l},[l]),cb(l),l}});var ly=K((fD,sy)=>{"use strict";sy.exports=iy()});var ea=K((RD,Ov)=>{"use strict";var II="\0",Er="\0",Mv="",Xd=class{constructor(t){ke(this,"_isDirected",!0);ke(this,"_isMultigraph",!1);ke(this,"_isCompound",!1);ke(this,"_label");ke(this,"_defaultNodeLabelFn",()=>{});ke(this,"_defaultEdgeLabelFn",()=>{});ke(this,"_nodes",{});ke(this,"_in",{});ke(this,"_preds",{});ke(this,"_out",{});ke(this,"_sucs",{});ke(this,"_edgeObjs",{});ke(this,"_edgeLabels",{});ke(this,"_nodeCount",0);ke(this,"_edgeCount",0);ke(this,"_parent");ke(this,"_children");t&&(this._isDirected=Object.hasOwn(t,"directed")?t.directed:!0,this._isMultigraph=Object.hasOwn(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.hasOwn(t,"compound")?t.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[Er]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return this._defaultNodeLabelFn=t,typeof t!="function"&&(this._defaultNodeLabelFn=()=>t),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var t=this;return this.nodes().filter(n=>Object.keys(t._in[n]).length===0)}sinks(){var t=this;return this.nodes().filter(n=>Object.keys(t._out[n]).length===0)}setNodes(t,n){var r=arguments,o=this;return t.forEach(function(i){r.length>1?o.setNode(i,n):o.setNode(i)}),this}setNode(t,n){return Object.hasOwn(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Er,this._children[t]={},this._children[Er][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.hasOwn(this._nodes,t)}removeNode(t){var n=this;if(Object.hasOwn(this._nodes,t)){var r=o=>n.removeEdge(n._edgeObjs[o]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],this.children(t).forEach(function(o){n.setParent(o)}),delete this._children[t]),Object.keys(this._in[t]).forEach(r),delete this._in[t],delete this._preds[t],Object.keys(this._out[t]).forEach(r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n===void 0)n=Er;else{n+="";for(var r=n;r!==void 0;r=this.parent(r))if(r===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var n=this._parent[t];if(n!==Er)return n}}children(t=Er){if(this._isCompound){var n=this._children[t];if(n)return Object.keys(n)}else{if(t===Er)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var n=this._preds[t];if(n)return Object.keys(n)}successors(t){var n=this._sucs[t];if(n)return Object.keys(n)}neighbors(t){var n=this.predecessors(t);if(n){let o=new Set(n);for(var r of this.successors(t))o.add(r);return Array.from(o.values())}}isLeaf(t){var n;return this.isDirected()?n=this.successors(t):n=this.neighbors(t),n.length===0}filterNodes(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([s,l]){t(s)&&n.setNode(s,l)}),Object.values(this._edgeObjs).forEach(function(s){n.hasNode(s.v)&&n.hasNode(s.w)&&n.setEdge(s,r.edge(s))});var o={};function i(s){var l=r.parent(s);return l===void 0||n.hasNode(l)?(o[s]=l,l):l in o?o[l]:i(l)}return this._isCompound&&n.nodes().forEach(s=>n.setParent(s,i(s))),n}setDefaultEdgeLabel(t){return this._defaultEdgeLabelFn=t,typeof t!="function"&&(this._defaultEdgeLabelFn=()=>t),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(t,n){var r=this,o=arguments;return t.reduce(function(i,s){return o.length>1?r.setEdge(i,s,n):r.setEdge(i,s),s}),this}setEdge(){var t,n,r,o,i=!1,s=arguments[0];typeof s=="object"&&s!==null&&"v"in s?(t=s.v,n=s.w,r=s.name,arguments.length===2&&(o=arguments[1],i=!0)):(t=s,n=arguments[1],r=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),t=""+t,n=""+n,r!==void 0&&(r=""+r);var l=Di(this._isDirected,t,n,r);if(Object.hasOwn(this._edgeLabels,l))return i&&(this._edgeLabels[l]=o),this;if(r!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[l]=i?o:this._defaultEdgeLabelFn(t,n,r);var a=PI(this._isDirected,t,n,r);return t=a.v,n=a.w,Object.freeze(a),this._edgeObjs[l]=a,Iv(this._preds[n],t),Iv(this._sucs[t],n),this._in[n][l]=a,this._out[t][l]=a,this._edgeCount++,this}edge(t,n,r){var o=arguments.length===1?qd(this._isDirected,arguments[0]):Di(this._isDirected,t,n,r);return this._edgeLabels[o]}edgeAsObj(){let t=this.edge(...arguments);return typeof t!="object"?{label:t}:t}hasEdge(t,n,r){var o=arguments.length===1?qd(this._isDirected,arguments[0]):Di(this._isDirected,t,n,r);return Object.hasOwn(this._edgeLabels,o)}removeEdge(t,n,r){var o=arguments.length===1?qd(this._isDirected,arguments[0]):Di(this._isDirected,t,n,r),i=this._edgeObjs[o];return i&&(t=i.v,n=i.w,delete this._edgeLabels[o],delete this._edgeObjs[o],Pv(this._preds[n],t),Pv(this._sucs[t],n),delete this._in[n][o],delete this._out[t][o],this._edgeCount--),this}inEdges(t,n){var r=this._in[t];if(r){var o=Object.values(r);return n?o.filter(i=>i.v===n):o}}outEdges(t,n){var r=this._out[t];if(r){var o=Object.values(r);return n?o.filter(i=>i.w===n):o}}nodeEdges(t,n){var r=this.inEdges(t,n);if(r)return r.concat(this.outEdges(t,n))}};function Iv(e,t){e[t]?e[t]++:e[t]=1}function Pv(e,t){--e[t]||delete e[t]}function Di(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var s=o;o=i,i=s}return o+Mv+i+Mv+(r===void 0?II:r)}function PI(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var s=o;o=i,i=s}var l={v:o,w:i};return r&&(l.name=r),l}function qd(e,t){return Di(e,t.v,t.w,t.name)}Ov.exports=Xd});var Dv=K((BD,Tv)=>{Tv.exports="2.2.4"});var zv=K((HD,Lv)=>{Lv.exports={Graph:ea(),version:Dv()}});var Rv=K((FD,Av)=>{var OI=ea();Av.exports={write:TI,read:zI};function TI(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:DI(e),edges:LI(e)};return e.graph()!==void 0&&(t.value=structuredClone(e.graph())),t}function DI(e){return e.nodes().map(function(t){var n=e.node(t),r=e.parent(t),o={v:t};return n!==void 0&&(o.value=n),r!==void 0&&(o.parent=r),o})}function LI(e){return e.edges().map(function(t){var n=e.edge(t),r={v:t.v,w:t.w};return t.name!==void 0&&(r.name=t.name),n!==void 0&&(r.value=n),r})}function zI(e){var t=new OI(e.options).setGraph(e.value);return e.nodes.forEach(function(n){t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(function(n){t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}});var Bv=K((VD,$v)=>{$v.exports=AI;function AI(e){var t={},n=[],r;function o(i){Object.hasOwn(t,i)||(t[i]=!0,r.push(i),e.successors(i).forEach(o),e.predecessors(i).forEach(o))}return e.nodes().forEach(function(i){r=[],o(i),r.length&&n.push(r)}),n}});var Zd=K((jD,Hv)=>{var Gd=class{constructor(){ke(this,"_arr",[]);ke(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(t){return t.key})}has(t){return Object.hasOwn(this._keyIndices,t)}priority(t){var n=this._keyIndices[t];if(n!==void 0)return this._arr[n].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(t,n){var r=this._keyIndices;if(t=String(t),!Object.hasOwn(r,t)){var o=this._arr,i=o.length;return r[t]=i,o.push({key:t,priority:n}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key}decrease(t,n){var r=this._keyIndices[t];if(n>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+n);this._arr[r].priority=n,this._decrease(r)}_heapify(t){var n=this._arr,r=2*t,o=r+1,i=t;r<n.length&&(i=n[r].priority<n[i].priority?r:i,o<n.length&&(i=n[o].priority<n[i].priority?o:i),i!==t&&(this._swap(t,i),this._heapify(i)))}_decrease(t){for(var n=this._arr,r=n[t].priority,o;t!==0&&(o=t>>1,!(n[o].priority<r));)this._swap(t,o),t=o}_swap(t,n){var r=this._arr,o=this._keyIndices,i=r[t],s=r[n];r[t]=s,r[n]=i,o[s.key]=t,o[i.key]=n}};Hv.exports=Gd});var Qd=K((UD,Fv)=>{var RI=Zd();Fv.exports=BI;var $I=()=>1;function BI(e,t,n,r){return HI(e,String(t),n||$I,r||function(o){return e.outEdges(o)})}function HI(e,t,n,r){var o={},i=new RI,s,l,a=function(u){var c=u.v!==s?u.v:u.w,f=o[c],d=n(u),h=l.distance+d;if(d<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+d);h<f.distance&&(f.distance=h,f.predecessor=s,i.decrease(c,h))};for(e.nodes().forEach(function(u){var c=u===t?0:Number.POSITIVE_INFINITY;o[u]={distance:c},i.add(u,c)});i.size()>0&&(s=i.removeMin(),l=o[s],l.distance!==Number.POSITIVE_INFINITY);)r(s).forEach(a);return o}});var jv=K((YD,Vv)=>{var FI=Qd();Vv.exports=VI;function VI(e,t,n){return e.nodes().reduce(function(r,o){return r[o]=FI(e,o,t,n),r},{})}});var Kd=K((qD,Wv)=>{Wv.exports=jI;function jI(e){var t=0,n=[],r={},o=[];function i(s){var l=r[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach(function(c){Object.hasOwn(r,c)?r[c].onStack&&(l.lowlink=Math.min(l.lowlink,r[c].index)):(i(c),l.lowlink=Math.min(l.lowlink,r[c].lowlink))}),l.lowlink===l.index){var a=[],u;do u=n.pop(),r[u].onStack=!1,a.push(u);while(s!==u);o.push(a)}}return e.nodes().forEach(function(s){Object.hasOwn(r,s)||i(s)}),o}});var Yv=K((XD,Uv)=>{var WI=Kd();Uv.exports=UI;function UI(e){return WI(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}});var Xv=K((GD,qv)=>{qv.exports=qI;var YI=()=>1;function qI(e,t,n){return XI(e,t||YI,n||function(r){return e.outEdges(r)})}function XI(e,t,n){var r={},o=e.nodes();return o.forEach(function(i){r[i]={},r[i][i]={distance:0},o.forEach(function(s){i!==s&&(r[i][s]={distance:Number.POSITIVE_INFINITY})}),n(i).forEach(function(s){var l=s.v===i?s.w:s.v,a=t(s);r[i][l]={distance:a,predecessor:i}})}),o.forEach(function(i){var s=r[i];o.forEach(function(l){var a=r[l];o.forEach(function(u){var c=a[i],f=s[u],d=a[u],h=c.distance+f.distance;h<d.distance&&(d.distance=h,d.predecessor=f.predecessor)})})}),r}});var Jd=K((ZD,Zv)=>{function Gv(e){var t={},n={},r=[];function o(i){if(Object.hasOwn(n,i))throw new Li;Object.hasOwn(t,i)||(n[i]=!0,t[i]=!0,e.predecessors(i).forEach(o),delete n[i],r.push(i))}if(e.sinks().forEach(o),Object.keys(t).length!==e.nodeCount())throw new Li;return r}var Li=class extends Error{constructor(){super(...arguments)}};Zv.exports=Gv;Gv.CycleException=Li});var Jv=K((QD,Kv)=>{var Qv=Jd();Kv.exports=GI;function GI(e){try{Qv(e)}catch(t){if(t instanceof Qv.CycleException)return!1;throw t}return!0}});var ef=K((KD,tw)=>{tw.exports=ZI;function ZI(e,t,n){Array.isArray(t)||(t=[t]);var r=e.isDirected()?l=>e.successors(l):l=>e.neighbors(l),o=n==="post"?QI:KI,i=[],s={};return t.forEach(l=>{if(!e.hasNode(l))throw new Error("Graph does not have node: "+l);o(l,r,s,i)}),i}function QI(e,t,n,r){for(var o=[[e,!1]];o.length>0;){var i=o.pop();i[1]?r.push(i[0]):Object.hasOwn(n,i[0])||(n[i[0]]=!0,o.push([i[0],!0]),ew(t(i[0]),s=>o.push([s,!1])))}}function KI(e,t,n,r){for(var o=[e];o.length>0;){var i=o.pop();Object.hasOwn(n,i)||(n[i]=!0,r.push(i),ew(t(i),s=>o.push(s)))}}function ew(e,t){for(var n=e.length;n--;)t(e[n],n,e);return e}});var rw=K((JD,nw)=>{var JI=ef();nw.exports=eP;function eP(e,t){return JI(e,t,"post")}});var iw=K((eL,ow)=>{var tP=ef();ow.exports=nP;function nP(e,t){return tP(e,t,"pre")}});var lw=K((tL,sw)=>{var rP=ea(),oP=Zd();sw.exports=iP;function iP(e,t){var n=new rP,r={},o=new oP,i;function s(a){var u=a.v===i?a.w:a.v,c=o.priority(u);if(c!==void 0){var f=t(a);f<c&&(r[u]=i,o.decrease(u,f))}}if(e.nodeCount()===0)return n;e.nodes().forEach(function(a){o.add(a,Number.POSITIVE_INFINITY),n.setNode(a)}),o.decrease(e.nodes()[0],0);for(var l=!1;o.size()>0;){if(i=o.removeMin(),Object.hasOwn(r,i))n.setEdge(i,r[i]);else{if(l)throw new Error("Input graph is not connected: "+e);l=!0}e.nodeEdges(i).forEach(s)}return n}});var uw=K((nL,aw)=>{aw.exports={components:Bv(),dijkstra:Qd(),dijkstraAll:jv(),findCycles:Yv(),floydWarshall:Xv(),isAcyclic:Jv(),postorder:rw(),preorder:iw(),prim:lw(),tarjan:Kd(),topsort:Jd()}});var yt=K((rL,dw)=>{var cw=zv();dw.exports={Graph:cw.Graph,json:Rv(),alg:uw(),version:cw.version}});var pw=K((oL,hw)=>{var tf=class{constructor(){let t={};t._next=t._prev=t,this._sentinel=t}dequeue(){let t=this._sentinel,n=t._prev;if(n!==t)return fw(n),n}enqueue(t){let n=this._sentinel;t._prev&&t._next&&fw(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n}toString(){let t=[],n=this._sentinel,r=n._prev;for(;r!==n;)t.push(JSON.stringify(r,sP)),r=r._prev;return"["+t.join(", ")+"]"}};function fw(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function sP(e,t){if(e!=="_next"&&e!=="_prev")return t}hw.exports=tf});var mw=K((iL,gw)=>{var lP=yt().Graph,aP=pw();gw.exports=cP;var uP=()=>1;function cP(e,t){if(e.nodeCount()<=1)return[];let n=fP(e,t||uP);return dP(n.graph,n.buckets,n.zeroIdx).flatMap(o=>e.outEdges(o.v,o.w))}function dP(e,t,n){let r=[],o=t[t.length-1],i=t[0],s;for(;e.nodeCount();){for(;s=i.dequeue();)nf(e,t,n,s);for(;s=o.dequeue();)nf(e,t,n,s);if(e.nodeCount()){for(let l=t.length-2;l>0;--l)if(s=t[l].dequeue(),s){r=r.concat(nf(e,t,n,s,!0));break}}}return r}function nf(e,t,n,r,o){let i=o?[]:void 0;return e.inEdges(r.v).forEach(s=>{let l=e.edge(s),a=e.node(s.v);o&&i.push({v:s.v,w:s.w}),a.out-=l,rf(t,n,a)}),e.outEdges(r.v).forEach(s=>{let l=e.edge(s),a=s.w,u=e.node(a);u.in-=l,rf(t,n,u)}),e.removeNode(r.v),i}function fP(e,t){let n=new lP,r=0,o=0;e.nodes().forEach(l=>{n.setNode(l,{v:l,in:0,out:0})}),e.edges().forEach(l=>{let a=n.edge(l.v,l.w)||0,u=t(l),c=a+u;n.setEdge(l.v,l.w,c),o=Math.max(o,n.node(l.v).out+=u),r=Math.max(r,n.node(l.w).in+=u)});let i=hP(o+r+3).map(()=>new aP),s=r+1;return n.nodes().forEach(l=>{rf(i,s,n.node(l))}),{graph:n,buckets:i,zeroIdx:s}}function rf(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function hP(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}});var Ne=K((sL,kw)=>{"use strict";var yw=yt().Graph;kw.exports={addBorderNode:SP,addDummyNode:vw,applyWithChunking:ta,asNonCompoundGraph:gP,buildLayerMatrix:wP,intersectRect:vP,mapValues:IP,maxRank:xw,normalizeRanks:xP,notime:CP,partition:_P,pick:MP,predecessorWeights:yP,range:Sw,removeEmptyRanks:EP,simplify:pP,successorWeights:mP,time:NP,uniqueId:Ew,zipObject:of};function vw(e,t,n,r){for(var o=r;e.hasNode(o);)o=Ew(r);return n.dummy=t,e.setNode(o,n),o}function pP(e){let t=new yw().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t}function gP(e){let t=new yw({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function mP(e){let t=e.nodes().map(n=>{let r={};return e.outEdges(n).forEach(o=>{r[o.w]=(r[o.w]||0)+e.edge(o).weight}),r});return of(e.nodes(),t)}function yP(e){let t=e.nodes().map(n=>{let r={};return e.inEdges(n).forEach(o=>{r[o.v]=(r[o.v]||0)+e.edge(o).weight}),r});return of(e.nodes(),t)}function vP(e,t){let n=e.x,r=e.y,o=t.x-n,i=t.y-r,s=e.width/2,l=e.height/2;if(!o&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let a,u;return Math.abs(i)*s>Math.abs(o)*l?(i<0&&(l=-l),a=l*o/i,u=l):(o<0&&(s=-s),a=s,u=s*i/o),{x:n+a,y:r+u}}function wP(e){let t=Sw(xw(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),o=r.rank;o!==void 0&&(t[o][r.order]=n)}),t}function xP(e){let t=e.nodes().map(r=>{let o=e.node(r).rank;return o===void 0?Number.MAX_VALUE:o}),n=ta(Math.min,t);e.nodes().forEach(r=>{let o=e.node(r);Object.hasOwn(o,"rank")&&(o.rank-=n)})}function EP(e){let t=e.nodes().map(s=>e.node(s).rank),n=ta(Math.min,t),r=[];e.nodes().forEach(s=>{let l=e.node(s).rank-n;r[l]||(r[l]=[]),r[l].push(s)});let o=0,i=e.graph().nodeRankFactor;Array.from(r).forEach((s,l)=>{s===void 0&&l%i!==0?--o:s!==void 0&&o&&s.forEach(a=>e.node(a).rank+=o)})}function SP(e,t,n,r){let o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),vw(e,"border",o,t)}function kP(e,t=ww){let n=[];for(let r=0;r<e.length;r+=t){let o=e.slice(r,r+t);n.push(o)}return n}var ww=65535;function ta(e,t){if(t.length>ww){let n=kP(t);return e.apply(null,n.map(r=>e.apply(null,r)))}else return e.apply(null,t)}function xw(e){let n=e.nodes().map(r=>{let o=e.node(r).rank;return o===void 0?Number.MIN_VALUE:o});return ta(Math.max,n)}function _P(e,t){let n={lhs:[],rhs:[]};return e.forEach(r=>{t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function NP(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function CP(e,t){return t()}var bP=0;function Ew(e){var t=++bP;return e+(""+t)}function Sw(e,t,n=1){t==null&&(t=e,e=0);let r=i=>i<t;n<0&&(r=i=>t<i);let o=[];for(let i=e;r(i);i+=n)o.push(i);return o}function MP(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function IP(e,t){let n=t;return typeof t=="string"&&(n=r=>r[t]),Object.entries(e).reduce((r,[o,i])=>(r[o]=n(i,o),r),{})}function of(e,t){return e.reduce((n,r,o)=>(n[r]=t[o],n),{})}});var Nw=K((lL,_w)=>{"use strict";var PP=mw(),OP=Ne().uniqueId;_w.exports={run:TP,undo:LP};function TP(e){(e.graph().acyclicer==="greedy"?PP(e,n(e)):DP(e)).forEach(r=>{let o=e.edge(r);e.removeEdge(r),o.forwardName=r.name,o.reversed=!0,e.setEdge(r.w,r.v,o,OP("rev"))});function n(r){return o=>r.edge(o).weight}}function DP(e){let t=[],n={},r={};function o(i){Object.hasOwn(r,i)||(r[i]=!0,n[i]=!0,e.outEdges(i).forEach(s=>{Object.hasOwn(n,s.w)?t.push(s):o(s.w)}),delete n[i])}return e.nodes().forEach(o),t}function LP(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}});var bw=K((aL,Cw)=>{"use strict";var zP=Ne();Cw.exports={run:AP,undo:$P};function AP(e){e.graph().dummyChains=[],e.edges().forEach(t=>RP(e,t))}function RP(e,t){let n=t.v,r=e.node(n).rank,o=t.w,i=e.node(o).rank,s=t.name,l=e.edge(t),a=l.labelRank;if(i===r+1)return;e.removeEdge(t);let u,c,f;for(f=0,++r;r<i;++f,++r)l.points=[],c={width:0,height:0,edgeLabel:l,edgeObj:t,rank:r},u=zP.addDummyNode(e,"edge",c,"_d"),r===a&&(c.width=l.width,c.height=l.height,c.dummy="edge-label",c.labelpos=l.labelpos),e.setEdge(n,u,{weight:l.weight},s),f===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,o,{weight:l.weight},s)}function $P(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel,o;for(e.setEdge(n.edgeObj,r);n.dummy;)o=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=o,n=e.node(t)})}});var zi=K((uL,Mw)=>{"use strict";var{applyWithChunking:BP}=Ne();Mw.exports={longestPath:HP,slack:FP};function HP(e){var t={};function n(r){var o=e.node(r);if(Object.hasOwn(t,r))return o.rank;t[r]=!0;let i=e.outEdges(r).map(l=>l==null?Number.POSITIVE_INFINITY:n(l.w)-e.edge(l).minlen);var s=BP(Math.min,i);return s===Number.POSITIVE_INFINITY&&(s=0),o.rank=s}e.sources().forEach(n)}function FP(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}});var sf=K((cL,Iw)=>{"use strict";var VP=yt().Graph,na=zi().slack;Iw.exports=jP;function jP(e){var t=new VP({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var o,i;WP(t,e)<r;)o=UP(t,e),i=t.hasNode(o.v)?na(e,o):-na(e,o),YP(t,e,i);return t}function WP(e,t){function n(r){t.nodeEdges(r).forEach(o=>{var i=o.v,s=r===i?o.w:i;!e.hasNode(s)&&!na(t,o)&&(e.setNode(s,{}),e.setEdge(r,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function UP(e,t){return t.edges().reduce((r,o)=>{let i=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(i=na(t,o)),i<r[0]?[i,o]:r},[Number.POSITIVE_INFINITY,null])[1]}function YP(e,t,n){e.nodes().forEach(r=>t.node(r).rank+=n)}});var $w=K((dL,Rw)=>{"use strict";var qP=sf(),Pw=zi().slack,XP=zi().longestPath,GP=yt().alg.preorder,ZP=yt().alg.postorder,QP=Ne().simplify;Rw.exports=Sr;Sr.initLowLimValues=af;Sr.initCutValues=lf;Sr.calcCutValue=Tw;Sr.leaveEdge=Lw;Sr.enterEdge=zw;Sr.exchangeEdges=Aw;function Sr(e){e=QP(e),XP(e);var t=qP(e);af(t),lf(t,e);for(var n,r;n=Lw(t);)r=zw(t,e,n),Aw(t,e,n,r)}function lf(e,t){var n=ZP(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(r=>KP(e,t,r))}function KP(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=Tw(e,t,n)}function Tw(e,t,n){var r=e.node(n),o=r.parent,i=!0,s=t.edge(n,o),l=0;return s||(i=!1,s=t.edge(o,n)),l=s.weight,t.nodeEdges(n).forEach(a=>{var u=a.v===n,c=u?a.w:a.v;if(c!==o){var f=u===i,d=t.edge(a).weight;if(l+=f?d:-d,eO(e,n,c)){var h=e.edge(n,c).cutvalue;l+=f?-h:h}}}),l}function af(e,t){arguments.length<2&&(t=e.nodes()[0]),Dw(e,{},1,t)}function Dw(e,t,n,r,o){var i=n,s=e.node(r);return t[r]=!0,e.neighbors(r).forEach(l=>{Object.hasOwn(t,l)||(n=Dw(e,t,n,l,r))}),s.low=i,s.lim=n++,o?s.parent=o:delete s.parent,n}function Lw(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function zw(e,t,n){var r=n.v,o=n.w;t.hasEdge(r,o)||(r=n.w,o=n.v);var i=e.node(r),s=e.node(o),l=i,a=!1;i.lim>s.lim&&(l=s,a=!0);var u=t.edges().filter(c=>a===Ow(e,e.node(c.v),l)&&a!==Ow(e,e.node(c.w),l));return u.reduce((c,f)=>Pw(t,f)<Pw(t,c)?f:c)}function Aw(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),af(e),lf(e,t),JP(e,t)}function JP(e,t){var n=e.nodes().find(o=>!t.node(o).parent),r=GP(e,n);r=r.slice(1),r.forEach(o=>{var i=e.node(o).parent,s=t.edge(o,i),l=!1;s||(s=t.edge(i,o),l=!0),t.node(o).rank=t.node(i).rank+(l?s.minlen:-s.minlen)})}function eO(e,t,n){return e.hasEdge(t,n)}function Ow(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}});var Vw=K((fL,Fw)=>{"use strict";var tO=zi(),Hw=tO.longestPath,nO=sf(),rO=$w();Fw.exports=oO;function oO(e){var t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case"network-simplex":Bw(e);break;case"tight-tree":sO(e);break;case"longest-path":iO(e);break;case"none":break;default:Bw(e)}}var iO=Hw;function sO(e){Hw(e),nO(e)}function Bw(e){rO(e)}});var Ww=K((hL,jw)=>{jw.exports=lO;function lO(e){let t=uO(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),o=r.edgeObj,i=aO(e,t,o.v,o.w),s=i.path,l=i.lca,a=0,u=s[a],c=!0;for(;n!==o.w;){if(r=e.node(n),c){for(;(u=s[a])!==l&&e.node(u).maxRank<r.rank;)a++;u===l&&(c=!1)}if(!c){for(;a<s.length-1&&e.node(u=s[a+1]).minRank<=r.rank;)a++;u=s[a]}e.setParent(n,u),n=e.successors(n)[0]}})}function aO(e,t,n,r){let o=[],i=[],s=Math.min(t[n].low,t[r].low),l=Math.max(t[n].lim,t[r].lim),a,u;a=n;do a=e.parent(a),o.push(a);while(a&&(t[a].low>s||l>t[a].lim));for(u=a,a=r;(a=e.parent(a))!==u;)i.push(a);return{path:o.concat(i.reverse()),lca:u}}function uO(e){let t={},n=0;function r(o){let i=n;e.children(o).forEach(r),t[o]={low:i,lim:n++}}return e.children().forEach(r),t}});var qw=K((pL,Yw)=>{var ra=Ne();Yw.exports={run:cO,cleanup:hO};function cO(e){let t=ra.addDummyNode(e,"root",{},"_root"),n=dO(e),r=Object.values(n),o=ra.applyWithChunking(Math.max,r)-1,i=2*o+1;e.graph().nestingRoot=t,e.edges().forEach(l=>e.edge(l).minlen*=i);let s=fO(e)+1;e.children().forEach(l=>Uw(e,t,i,s,o,n,l)),e.graph().nodeRankFactor=i}function Uw(e,t,n,r,o,i,s){let l=e.children(s);if(!l.length){s!==t&&e.setEdge(t,s,{weight:0,minlen:n});return}let a=ra.addBorderNode(e,"_bt"),u=ra.addBorderNode(e,"_bb"),c=e.node(s);e.setParent(a,s),c.borderTop=a,e.setParent(u,s),c.borderBottom=u,l.forEach(f=>{Uw(e,t,n,r,o,i,f);let d=e.node(f),h=d.borderTop?d.borderTop:f,m=d.borderBottom?d.borderBottom:f,w=d.borderTop?r:2*r,x=h!==m?1:o-i[s]+1;e.setEdge(a,h,{weight:w,minlen:x,nestingEdge:!0}),e.setEdge(m,u,{weight:w,minlen:x,nestingEdge:!0})}),e.parent(s)||e.setEdge(t,a,{weight:0,minlen:o+i[s]})}function dO(e){var t={};function n(r,o){var i=e.children(r);i&&i.length&&i.forEach(s=>n(s,o+1)),t[r]=o}return e.children().forEach(r=>n(r,1)),t}function fO(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function hO(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}});var Zw=K((gL,Gw)=>{var pO=Ne();Gw.exports=gO;function gO(e){function t(n){let r=e.children(n),o=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(let i=o.minRank,s=o.maxRank+1;i<s;++i)Xw(e,"borderLeft","_bl",n,o,i),Xw(e,"borderRight","_br",n,o,i)}}e.children().forEach(t)}function Xw(e,t,n,r,o,i){let s={width:0,height:0,rank:i,borderType:t},l=o[t][i-1],a=pO.addDummyNode(e,"border",s,n);o[t][i]=a,e.setParent(a,r),l&&e.setEdge(l,a,{weight:1})}});var e1=K((mL,Jw)=>{"use strict";Jw.exports={adjust:mO,undo:yO};function mO(e){let t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Kw(e)}function yO(e){let t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&vO(e),(t==="lr"||t==="rl")&&(wO(e),Kw(e))}function Kw(e){e.nodes().forEach(t=>Qw(e.node(t))),e.edges().forEach(t=>Qw(e.edge(t)))}function Qw(e){let t=e.width;e.width=e.height,e.height=t}function vO(e){e.nodes().forEach(t=>uf(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(uf),Object.hasOwn(n,"y")&&uf(n)})}function uf(e){e.y=-e.y}function wO(e){e.nodes().forEach(t=>cf(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(cf),Object.hasOwn(n,"x")&&cf(n)})}function cf(e){let t=e.x;e.x=e.y,e.y=t}});var r1=K((yL,n1)=>{"use strict";var t1=Ne();n1.exports=xO;function xO(e){let t={},n=e.nodes().filter(a=>!e.children(a).length),r=n.map(a=>e.node(a).rank),o=t1.applyWithChunking(Math.max,r),i=t1.range(o+1).map(()=>[]);function s(a){if(t[a])return;t[a]=!0;let u=e.node(a);i[u.rank].push(a),e.successors(a).forEach(s)}return n.sort((a,u)=>e.node(a).rank-e.node(u).rank).forEach(s),i}});var i1=K((vL,o1)=>{"use strict";var EO=Ne().zipObject;o1.exports=SO;function SO(e,t){let n=0;for(let r=1;r<t.length;++r)n+=kO(e,t[r-1],t[r]);return n}function kO(e,t,n){let r=EO(n,n.map((u,c)=>c)),o=t.flatMap(u=>e.outEdges(u).map(c=>({pos:r[c.w],weight:e.edge(c).weight})).sort((c,f)=>c.pos-f.pos)),i=1;for(;i<n.length;)i<<=1;let s=2*i-1;i-=1;let l=new Array(s).fill(0),a=0;return o.forEach(u=>{let c=u.pos+i;l[c]+=u.weight;let f=0;for(;c>0;)c%2&&(f+=l[c+1]),c=c-1>>1,l[c]+=u.weight;a+=u.weight*f}),a}});var l1=K((wL,s1)=>{s1.exports=_O;function _O(e,t=[]){return t.map(n=>{let r=e.inEdges(n);if(r.length){let o=r.reduce((i,s)=>{let l=e.edge(s),a=e.node(s.v);return{sum:i.sum+l.weight*a.order,weight:i.weight+l.weight}},{sum:0,weight:0});return{v:n,barycenter:o.sum/o.weight,weight:o.weight}}else return{v:n}})}});var u1=K((xL,a1)=>{"use strict";var NO=Ne();a1.exports=CO;function CO(e,t){let n={};e.forEach((o,i)=>{let s=n[o.v]={indegree:0,in:[],out:[],vs:[o.v],i};o.barycenter!==void 0&&(s.barycenter=o.barycenter,s.weight=o.weight)}),t.edges().forEach(o=>{let i=n[o.v],s=n[o.w];i!==void 0&&s!==void 0&&(s.indegree++,i.out.push(n[o.w]))});let r=Object.values(n).filter(o=>!o.indegree);return bO(r)}function bO(e){let t=[];function n(o){return i=>{i.merged||(i.barycenter===void 0||o.barycenter===void 0||i.barycenter>=o.barycenter)&&MO(o,i)}}function r(o){return i=>{i.in.push(o),--i.indegree===0&&e.push(i)}}for(;e.length;){let o=e.pop();t.push(o),o.in.reverse().forEach(n(o)),o.out.forEach(r(o))}return t.filter(o=>!o.merged).map(o=>NO.pick(o,["vs","i","barycenter","weight"]))}function MO(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}});var f1=K((EL,d1)=>{var IO=Ne();d1.exports=PO;function PO(e,t){let n=IO.partition(e,c=>Object.hasOwn(c,"barycenter")),r=n.lhs,o=n.rhs.sort((c,f)=>f.i-c.i),i=[],s=0,l=0,a=0;r.sort(OO(!!t)),a=c1(i,o,a),r.forEach(c=>{a+=c.vs.length,i.push(c.vs),s+=c.barycenter*c.weight,l+=c.weight,a=c1(i,o,a)});let u={vs:i.flat(!0)};return l&&(u.barycenter=s/l,u.weight=l),u}function c1(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function OO(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}});var g1=K((SL,p1)=>{var TO=l1(),DO=u1(),LO=f1();p1.exports=h1;function h1(e,t,n,r){let o=e.children(t),i=e.node(t),s=i?i.borderLeft:void 0,l=i?i.borderRight:void 0,a={};s&&(o=o.filter(d=>d!==s&&d!==l));let u=TO(e,o);u.forEach(d=>{if(e.children(d.v).length){let h=h1(e,d.v,n,r);a[d.v]=h,Object.hasOwn(h,"barycenter")&&AO(d,h)}});let c=DO(u,n);zO(c,a);let f=LO(c,r);if(s&&(f.vs=[s,f.vs,l].flat(!0),e.predecessors(s).length)){let d=e.node(e.predecessors(s)[0]),h=e.node(e.predecessors(l)[0]);Object.hasOwn(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+d.order+h.order)/(f.weight+2),f.weight+=2}return f}function zO(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(r=>t[r]?t[r].vs:r)})}function AO(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}});var y1=K((kL,m1)=>{var RO=yt().Graph,$O=Ne();m1.exports=BO;function BO(e,t,n,r){r||(r=e.nodes());let o=HO(e),i=new RO({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(s=>e.node(s));return r.forEach(s=>{let l=e.node(s),a=e.parent(s);(l.rank===t||l.minRank<=t&&t<=l.maxRank)&&(i.setNode(s),i.setParent(s,a||o),e[n](s).forEach(u=>{let c=u.v===s?u.w:u.v,f=i.edge(c,s),d=f!==void 0?f.weight:0;i.setEdge(c,s,{weight:e.edge(u).weight+d})}),Object.hasOwn(l,"minRank")&&i.setNode(s,{borderLeft:l.borderLeft[t],borderRight:l.borderRight[t]}))}),i}function HO(e){for(var t;e.hasNode(t=$O.uniqueId("_root")););return t}});var w1=K((_L,v1)=>{v1.exports=FO;function FO(e,t,n){let r={},o;n.forEach(i=>{let s=e.parent(i),l,a;for(;s;){if(l=e.parent(s),l?(a=r[l],r[l]=s):(a=o,o=s),a&&a!==s){t.setEdge(a,s);return}s=l}})}});var _1=K((NL,k1)=>{"use strict";var VO=r1(),jO=i1(),WO=g1(),UO=y1(),YO=w1(),qO=yt().Graph,oa=Ne();k1.exports=S1;function S1(e,t){if(t&&typeof t.customOrder=="function"){t.customOrder(e,S1);return}let n=oa.maxRank(e),r=x1(e,oa.range(1,n+1),"inEdges"),o=x1(e,oa.range(n-1,-1,-1),"outEdges"),i=VO(e);if(E1(e,i),t&&t.disableOptimalOrderHeuristic)return;let s=Number.POSITIVE_INFINITY,l;for(let a=0,u=0;u<4;++a,++u){XO(a%2?r:o,a%4>=2),i=oa.buildLayerMatrix(e);let c=jO(e,i);c<s&&(u=0,l=Object.assign({},i),s=c)}E1(e,l)}function x1(e,t,n){let r=new Map,o=(i,s)=>{r.has(i)||r.set(i,[]),r.get(i).push(s)};for(let i of e.nodes()){let s=e.node(i);if(typeof s.rank=="number"&&o(s.rank,i),typeof s.minRank=="number"&&typeof s.maxRank=="number")for(let l=s.minRank;l<=s.maxRank;l++)l!==s.rank&&o(l,i)}return t.map(function(i){return UO(e,i,n,r.get(i)||[])})}function XO(e,t){let n=new qO;e.forEach(function(r){let o=r.graph().root,i=WO(r,o,n,t);i.vs.forEach((s,l)=>r.node(s).order=l),YO(r,n,i.vs)})}function E1(e,t){Object.values(t).forEach(n=>n.forEach((r,o)=>e.node(r).order=o))}});var L1=K((CL,D1)=>{"use strict";var GO=yt().Graph,fn=Ne();D1.exports={positionX:KO,findType1Conflicts:N1,findType2Conflicts:C1,addConflict:df,hasConflict:b1,verticalAlignment:M1,horizontalCompaction:I1,alignCoordinates:O1,findSmallestWidthAlignment:P1,balance:T1};function N1(e,t){let n={};function r(o,i){let s=0,l=0,a=o.length,u=i[i.length-1];return i.forEach((c,f)=>{let d=ZO(e,c),h=d?e.node(d).order:a;(d||c===u)&&(i.slice(l,f+1).forEach(m=>{e.predecessors(m).forEach(w=>{let x=e.node(w),g=x.order;(g<s||h<g)&&!(x.dummy&&e.node(m).dummy)&&df(n,w,m)})}),l=f+1,s=h)}),i}return t.length&&t.reduce(r),n}function C1(e,t){let n={};function r(i,s,l,a,u){let c;fn.range(s,l).forEach(f=>{c=i[f],e.node(c).dummy&&e.predecessors(c).forEach(d=>{let h=e.node(d);h.dummy&&(h.order<a||h.order>u)&&df(n,d,c)})})}function o(i,s){let l=-1,a,u=0;return s.forEach((c,f)=>{if(e.node(c).dummy==="border"){let d=e.predecessors(c);d.length&&(a=e.node(d[0]).order,r(s,u,f,l,a),u=f,l=a)}r(s,u,s.length,a,i.length)}),s}return t.length&&t.reduce(o),n}function ZO(e,t){if(e.node(t).dummy)return e.predecessors(t).find(n=>e.node(n).dummy)}function df(e,t,n){if(t>n){let o=t;t=n,n=o}let r=e[t];r||(e[t]=r={}),r[n]=!0}function b1(e,t,n){if(t>n){let r=t;t=n,n=r}return!!e[t]&&Object.hasOwn(e[t],n)}function M1(e,t,n,r){let o={},i={},s={};return t.forEach(l=>{l.forEach((a,u)=>{o[a]=a,i[a]=a,s[a]=u})}),t.forEach(l=>{let a=-1;l.forEach(u=>{let c=r(u);if(c.length){c=c.sort((d,h)=>s[d]-s[h]);let f=(c.length-1)/2;for(let d=Math.floor(f),h=Math.ceil(f);d<=h;++d){let m=c[d];i[u]===u&&a<s[m]&&!b1(n,u,m)&&(i[m]=u,i[u]=o[u]=o[m],a=s[m])}}})}),{root:o,align:i}}function I1(e,t,n,r,o){let i={},s=QO(e,t,n,o),l=o?"borderLeft":"borderRight";function a(f,d){let h=s.nodes(),m=h.pop(),w={};for(;m;)w[m]?f(m):(w[m]=!0,h.push(m),h=h.concat(d(m))),m=h.pop()}function u(f){i[f]=s.inEdges(f).reduce((d,h)=>Math.max(d,i[h.v]+s.edge(h)),0)}function c(f){let d=s.outEdges(f).reduce((m,w)=>Math.min(m,i[w.w]-s.edge(w)),Number.POSITIVE_INFINITY),h=e.node(f);d!==Number.POSITIVE_INFINITY&&h.borderType!==l&&(i[f]=Math.max(i[f],d))}return a(u,s.predecessors.bind(s)),a(c,s.successors.bind(s)),Object.keys(r).forEach(f=>i[f]=i[n[f]]),i}function QO(e,t,n,r){let o=new GO,i=e.graph(),s=JO(i.nodesep,i.edgesep,r);return t.forEach(l=>{let a;l.forEach(u=>{let c=n[u];if(o.setNode(c),a){var f=n[a],d=o.edge(f,c);o.setEdge(f,c,Math.max(s(e,u,a),d||0))}a=u})}),o}function P1(e,t){return Object.values(t).reduce((n,r)=>{let o=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(r).forEach(([l,a])=>{let u=eT(e,l)/2;o=Math.max(a+u,o),i=Math.min(a-u,i)});let s=o-i;return s<n[0]&&(n=[s,r]),n},[Number.POSITIVE_INFINITY,null])[1]}function O1(e,t){let n=Object.values(t),r=fn.applyWithChunking(Math.min,n),o=fn.applyWithChunking(Math.max,n);["u","d"].forEach(i=>{["l","r"].forEach(s=>{let l=i+s,a=e[l];if(a===t)return;let u=Object.values(a),c=r-fn.applyWithChunking(Math.min,u);s!=="l"&&(c=o-fn.applyWithChunking(Math.max,u)),c&&(e[l]=fn.mapValues(a,f=>f+c))})})}function T1(e,t){return fn.mapValues(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];{let o=Object.values(e).map(i=>i[r]).sort((i,s)=>i-s);return(o[1]+o[2])/2}})}function KO(e){let t=fn.buildLayerMatrix(e),n=Object.assign(N1(e,t),C1(e,t)),r={},o;["u","d"].forEach(s=>{o=s==="u"?t:Object.values(t).reverse(),["l","r"].forEach(l=>{l==="r"&&(o=o.map(f=>Object.values(f).reverse()));let a=(s==="u"?e.predecessors:e.successors).bind(e),u=M1(e,o,n,a),c=I1(e,o,u.root,u.align,l==="r");l==="r"&&(c=fn.mapValues(c,f=>-f)),r[s+l]=c})});let i=P1(e,r);return O1(r,i),T1(r,e.graph().align)}function JO(e,t,n){return(r,o,i)=>{let s=r.node(o),l=r.node(i),a=0,u;if(a+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=-s.width/2;break;case"r":u=s.width/2;break}if(u&&(a+=n?u:-u),u=0,a+=(s.dummy?t:e)/2,a+=(l.dummy?t:e)/2,a+=l.width/2,Object.hasOwn(l,"labelpos"))switch(l.labelpos.toLowerCase()){case"l":u=l.width/2;break;case"r":u=-l.width/2;break}return u&&(a+=n?u:-u),u=0,a}}function eT(e,t){return e.node(t).width}});var R1=K((bL,A1)=>{"use strict";var z1=Ne(),tT=L1().positionX;A1.exports=nT;function nT(e){e=z1.asNonCompoundGraph(e),rT(e),Object.entries(tT(e)).forEach(([t,n])=>e.node(t).x=n)}function rT(e){let t=z1.buildLayerMatrix(e),n=e.graph().ranksep,r=0;t.forEach(o=>{let i=o.reduce((s,l)=>{let a=e.node(l).height;return s>a?s:a},0);o.forEach(s=>e.node(s).y=r+i/2),r+=i+n})}});var W1=K((ML,j1)=>{"use strict";var $1=Nw(),B1=bw(),oT=Vw(),iT=Ne().normalizeRanks,sT=Ww(),lT=Ne().removeEmptyRanks,H1=qw(),aT=Zw(),F1=e1(),uT=_1(),cT=R1(),vt=Ne(),dT=yt().Graph;j1.exports=fT;function fT(e,t){let n=t&&t.debugTiming?vt.time:vt.notime;n("layout",()=>{let r=n(" buildLayoutGraph",()=>ST(e));n(" runLayout",()=>hT(r,n,t)),n(" updateInputGraph",()=>pT(e,r))})}function hT(e,t,n){t(" makeSpaceForEdgeLabels",()=>kT(e)),t(" removeSelfEdges",()=>TT(e)),t(" acyclic",()=>$1.run(e)),t(" nestingGraph.run",()=>H1.run(e)),t(" rank",()=>oT(vt.asNonCompoundGraph(e))),t(" injectEdgeLabelProxies",()=>_T(e)),t(" removeEmptyRanks",()=>lT(e)),t(" nestingGraph.cleanup",()=>H1.cleanup(e)),t(" normalizeRanks",()=>iT(e)),t(" assignRankMinMax",()=>NT(e)),t(" removeEdgeLabelProxies",()=>CT(e)),t(" normalize.run",()=>B1.run(e)),t(" parentDummyChains",()=>sT(e)),t(" addBorderSegments",()=>aT(e)),t(" order",()=>uT(e,n)),t(" insertSelfEdges",()=>DT(e)),t(" adjustCoordinateSystem",()=>F1.adjust(e)),t(" position",()=>cT(e)),t(" positionSelfEdges",()=>LT(e)),t(" removeBorderNodes",()=>OT(e)),t(" normalize.undo",()=>B1.undo(e)),t(" fixupEdgeLabelCoords",()=>IT(e)),t(" undoCoordinateSystem",()=>F1.undo(e)),t(" translateGraph",()=>bT(e)),t(" assignNodeIntersects",()=>MT(e)),t(" reversePoints",()=>PT(e)),t(" acyclic.undo",()=>$1.undo(e))}function pT(e,t){e.nodes().forEach(n=>{let r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,r.rank=o.rank,t.children(n).length&&(r.width=o.width,r.height=o.height))}),e.edges().forEach(n=>{let r=e.edge(n),o=t.edge(n);r.points=o.points,Object.hasOwn(o,"x")&&(r.x=o.x,r.y=o.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var gT=["nodesep","edgesep","ranksep","marginx","marginy"],mT={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},yT=["acyclicer","ranker","rankdir","align"],vT=["width","height","rank"],V1={width:0,height:0},wT=["minlen","weight","width","height","labeloffset"],xT={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ET=["labelpos"];function ST(e){let t=new dT({multigraph:!0,compound:!0}),n=hf(e.graph());return t.setGraph(Object.assign({},mT,ff(n,gT),vt.pick(n,yT))),e.nodes().forEach(r=>{let o=hf(e.node(r)),i=ff(o,vT);Object.keys(V1).forEach(s=>{i[s]===void 0&&(i[s]=V1[s])}),t.setNode(r,i),t.setParent(r,e.parent(r))}),e.edges().forEach(r=>{let o=hf(e.edge(r));t.setEdge(r,Object.assign({},xT,ff(o,wT),vt.pick(o,ET)))}),t}function kT(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function _T(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};vt.addDummyNode(e,"edge-proxy",i,"_ep")}})}function NT(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function CT(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function bT(e){let t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,o=0,i=e.graph(),s=i.marginx||0,l=i.marginy||0;function a(u){let c=u.x,f=u.y,d=u.width,h=u.height;t=Math.min(t,c-d/2),n=Math.max(n,c+d/2),r=Math.min(r,f-h/2),o=Math.max(o,f+h/2)}e.nodes().forEach(u=>a(e.node(u))),e.edges().forEach(u=>{let c=e.edge(u);Object.hasOwn(c,"x")&&a(c)}),t-=s,r-=l,e.nodes().forEach(u=>{let c=e.node(u);c.x-=t,c.y-=r}),e.edges().forEach(u=>{let c=e.edge(u);c.points.forEach(f=>{f.x-=t,f.y-=r}),Object.hasOwn(c,"x")&&(c.x-=t),Object.hasOwn(c,"y")&&(c.y-=r)}),i.width=n-t+s,i.height=o-r+l}function MT(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),o=e.node(t.w),i,s;n.points?(i=n.points[0],s=n.points[n.points.length-1]):(n.points=[],i=o,s=r),n.points.unshift(vt.intersectRect(r,i)),n.points.push(vt.intersectRect(o,s))})}function IT(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function PT(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function OT(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),o=e.node(n.borderBottom),i=e.node(n.borderLeft[n.borderLeft.length-1]),s=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(s.x-i.x),n.height=Math.abs(o.y-r.y),n.x=i.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function TT(e){e.edges().forEach(t=>{if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function DT(e){var t=vt.buildLayerMatrix(e);t.forEach(n=>{var r=0;n.forEach((o,i)=>{var s=e.node(o);s.order=i+r,(s.selfEdges||[]).forEach(l=>{vt.addDummyNode(e,"selfedge",{width:l.label.width,height:l.label.height,rank:s.rank,order:i+ ++r,e:l.e,label:l.label},"_se")}),delete s.selfEdges})})}function LT(e){e.nodes().forEach(t=>{var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,s=n.x-o,l=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*s/3,y:i-l},{x:o+5*s/6,y:i-l},{x:o+s,y:i},{x:o+5*s/6,y:i+l},{x:o+2*s/3,y:i+l}],n.label.x=n.x,n.label.y=n.y}})}function ff(e,t){return vt.mapValues(vt.pick(e,t),Number)}function hf(e){var t={};return e&&Object.entries(e).forEach(([n,r])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=r}),t}});var Y1=K((IL,U1)=>{var zT=Ne(),AT=yt().Graph;U1.exports={debugOrdering:RT};function RT(e){let t=zT.buildLayerMatrix(e),n=new AT({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(r=>{n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),e.edges().forEach(r=>n.setEdge(r.v,r.w,{},r.name)),t.forEach((r,o)=>{let i="layer"+o;n.setNode(i,{rank:"same"}),r.reduce((s,l)=>(n.setEdge(s,l,{style:"invis"}),l))}),n}});var X1=K((PL,q1)=>{q1.exports="1.1.8"});var Z1=K((OL,G1)=>{G1.exports={graphlib:yt(),layout:W1(),debug:Y1(),util:{time:Ne().time,notime:Ne().notime},version:X1()}});var oe=Dt(hn(),1),J1=Dt(nm(),1);var D=Dt(il()),T=Dt(hn());function Se(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=Se(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Dk={value:()=>{}};function lr(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new sl(n)}function sl(e){this._=e}function Lk(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}sl.prototype=lr.prototype={constructor:sl,on:function(e,t){var n=this._,r=Lk(e+"",n),o,i=-1,s=r.length;if(arguments.length<2){for(;++i<s;)if((o=(e=r[i]).type)&&(o=zk(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<s;)if(o=(e=r[i]).type)n[o]=sm(n[o],e.name,t);else if(t==null)for(o in n)n[o]=sm(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new sl(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,i;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],r=0,o=i.length;r<o;++r)i[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};function zk(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function sm(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Dk,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Pc="http://www.w3.org/1999/xhtml",lm={svg:"http://www.w3.org/2000/svg",xhtml:Pc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fi(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),lm.hasOwnProperty(t)?{space:lm[t],local:e}:e}function Ak(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pc&&t.documentElement.namespaceURI===Pc?t.createElement(e):t.createElementNS(n,e)}}function Rk(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function am(e){var t=fi(e);return(t.local?Rk:Ak)(t)}function $k(){}function al(e){return e==null?$k:function(){return this.querySelector(e)}}function Bk(e){typeof e!="function"&&(e=al(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=new Array(s),a,u,c=0;c<s;++c)(a=i[c])&&(u=e.call(a,a.__data__,c,i))&&("__data__"in a&&(u.__data__=a.__data__),l[c]=u);return new it(r,this._parents)}function Hk(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Fk(){return[]}function Tc(e){return e==null?Fk:function(){return this.querySelectorAll(e)}}function Vk(e){return function(){return Hk(e.apply(this,arguments))}}function jk(e){typeof e=="function"?e=Vk(e):e=Tc(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var s=t[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&(r.push(e.call(a,a.__data__,u,s)),o.push(a));return new it(r,o)}function Dc(e){return function(){return this.matches(e)}}function um(e){return function(t){return t.matches(e)}}var Wk=Array.prototype.find;function Uk(e){return function(){return Wk.call(this.children,e)}}function Yk(){return this.firstElementChild}function qk(e){return this.select(e==null?Yk:Uk(typeof e=="function"?e:um(e)))}var Xk=Array.prototype.filter;function Gk(){return Array.from(this.children)}function Zk(e){return function(){return Xk.call(this.children,e)}}function Qk(e){return this.selectAll(e==null?Gk:Zk(typeof e=="function"?e:um(e)))}function Kk(e){typeof e!="function"&&(e=Dc(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new it(r,this._parents)}function cm(e){return new Array(e.length)}function Jk(){return new it(this._enter||this._groups.map(cm),this._parents)}function ll(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ll.prototype={constructor:ll,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function e_(e){return function(){return e}}function t_(e,t,n,r,o,i){for(var s=0,l,a=t.length,u=i.length;s<u;++s)(l=t[s])?(l.__data__=i[s],r[s]=l):n[s]=new ll(e,i[s]);for(;s<a;++s)(l=t[s])&&(o[s]=l)}function n_(e,t,n,r,o,i,s){var l,a,u=new Map,c=t.length,f=i.length,d=new Array(c),h;for(l=0;l<c;++l)(a=t[l])&&(d[l]=h=s.call(a,a.__data__,l,t)+"",u.has(h)?o[l]=a:u.set(h,a));for(l=0;l<f;++l)h=s.call(e,i[l],l,i)+"",(a=u.get(h))?(r[l]=a,a.__data__=i[l],u.delete(h)):n[l]=new ll(e,i[l]);for(l=0;l<c;++l)(a=t[l])&&u.get(d[l])===a&&(o[l]=a)}function r_(e){return e.__data__}function o_(e,t){if(!arguments.length)return Array.from(this,r_);var n=t?n_:t_,r=this._parents,o=this._groups;typeof e!="function"&&(e=e_(e));for(var i=o.length,s=new Array(i),l=new Array(i),a=new Array(i),u=0;u<i;++u){var c=r[u],f=o[u],d=f.length,h=i_(e.call(c,c&&c.__data__,u,r)),m=h.length,w=l[u]=new Array(m),x=s[u]=new Array(m),g=a[u]=new Array(d);n(c,f,w,x,g,h,t);for(var y=0,p=0,v,k;y<m;++y)if(v=w[y]){for(y>=p&&(p=y+1);!(k=x[p])&&++p<m;);v._next=k||null}}return s=new it(s,r),s._enter=l,s._exit=a,s}function i_(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function s_(){return new it(this._exit||this._groups.map(cm),this._parents)}function l_(e,t,n){var r=this.enter(),o=this,i=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?i.remove():n(i),r&&o?r.merge(o).order():o}function a_(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,s=Math.min(o,i),l=new Array(o),a=0;a<s;++a)for(var u=n[a],c=r[a],f=u.length,d=l[a]=new Array(f),h,m=0;m<f;++m)(h=u[m]||c[m])&&(d[m]=h);for(;a<o;++a)l[a]=n[a];return new it(l,this._parents)}function u_(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,i=r[o],s;--o>=0;)(s=r[o])&&(i&&s.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(s,i),i=s);return this}function c_(e){e||(e=d_);function t(f,d){return f&&d?e(f.__data__,d.__data__):!f-!d}for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var s=n[i],l=s.length,a=o[i]=new Array(l),u,c=0;c<l;++c)(u=s[c])&&(a[c]=u);a.sort(t)}return new it(o,this._parents).order()}function d_(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function f_(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function h_(){return Array.from(this)}function p_(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var s=r[o];if(s)return s}return null}function g_(){let e=0;for(let t of this)++e;return e}function m_(){return!this.node()}function y_(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],i=0,s=o.length,l;i<s;++i)(l=o[i])&&e.call(l,l.__data__,i,o);return this}function v_(e){return function(){this.removeAttribute(e)}}function w_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function x_(e,t){return function(){this.setAttribute(e,t)}}function E_(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function S_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function k_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function __(e,t){var n=fi(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?w_:v_:typeof t=="function"?n.local?k_:S_:n.local?E_:x_)(n,t))}function dm(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function N_(e){return function(){this.style.removeProperty(e)}}function C_(e,t,n){return function(){this.style.setProperty(e,t,n)}}function b_(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function M_(e,t,n){return arguments.length>1?this.each((t==null?N_:typeof t=="function"?b_:C_)(e,t,n??"")):ar(this.node(),e)}function ar(e,t){return e.style.getPropertyValue(t)||dm(e).getComputedStyle(e,null).getPropertyValue(t)}function I_(e){return function(){delete this[e]}}function P_(e,t){return function(){this[e]=t}}function O_(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function T_(e,t){return arguments.length>1?this.each((t==null?I_:typeof t=="function"?O_:P_)(e,t)):this.node()[e]}function fm(e){return e.trim().split(/^|\s+/)}function Lc(e){return e.classList||new hm(e)}function hm(e){this._node=e,this._names=fm(e.getAttribute("class")||"")}hm.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function pm(e,t){for(var n=Lc(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function gm(e,t){for(var n=Lc(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function D_(e){return function(){pm(this,e)}}function L_(e){return function(){gm(this,e)}}function z_(e,t){return function(){(t.apply(this,arguments)?pm:gm)(this,e)}}function A_(e,t){var n=fm(e+"");if(arguments.length<2){for(var r=Lc(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?z_:t?D_:L_)(n,t))}function R_(){this.textContent=""}function $_(e){return function(){this.textContent=e}}function B_(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function H_(e){return arguments.length?this.each(e==null?R_:(typeof e=="function"?B_:$_)(e)):this.node().textContent}function F_(){this.innerHTML=""}function V_(e){return function(){this.innerHTML=e}}function j_(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function W_(e){return arguments.length?this.each(e==null?F_:(typeof e=="function"?j_:V_)(e)):this.node().innerHTML}function U_(){this.nextSibling&&this.parentNode.appendChild(this)}function Y_(){return this.each(U_)}function q_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function X_(){return this.each(q_)}function G_(e){var t=typeof e=="function"?e:am(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Z_(){return null}function Q_(e,t){var n=typeof e=="function"?e:am(e),r=t==null?Z_:typeof t=="function"?t:al(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function K_(){var e=this.parentNode;e&&e.removeChild(this)}function J_(){return this.each(K_)}function eN(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function tN(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function nN(e){return this.select(e?tN:eN)}function rN(e){return arguments.length?this.property("__data__",e):this.node().__data__}function oN(e){return function(t){e.call(this,t,this.__data__)}}function iN(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function sN(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,i;n<o;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++r]=i;++r?t.length=r:delete this.__on}}}function lN(e,t,n){return function(){var r=this.__on,o,i=oN(t);if(r){for(var s=0,l=r.length;s<l;++s)if((o=r[s]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=i,o.options=n),o.value=t;return}}this.addEventListener(e.type,i,n),o={type:e.type,name:e.name,value:t,listener:i,options:n},r?r.push(o):this.__on=[o]}}function aN(e,t,n){var r=iN(e+""),o,i=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var a=0,u=l.length,c;a<u;++a)for(o=0,c=l[a];o<i;++o)if((s=r[o]).type===c.type&&s.name===c.name)return c.value}return}for(l=t?lN:sN,o=0;o<i;++o)this.each(l(r[o],t,n));return this}function mm(e,t,n){var r=dm(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function uN(e,t){return function(){return mm(this,e,t)}}function cN(e,t){return function(){return mm(this,e,t.apply(this,arguments))}}function dN(e,t){return this.each((typeof t=="function"?cN:uN)(e,t))}function*fN(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length,s;o<i;++o)(s=r[o])&&(yield s)}var ym=[null];function it(e,t){this._groups=e,this._parents=t}function ur(){return new it([[document.documentElement]],ym)}function hN(){return this}it.prototype=ur.prototype={constructor:it,select:Bk,selectAll:jk,selectChild:qk,selectChildren:Qk,filter:Kk,data:o_,enter:Jk,exit:s_,join:l_,merge:a_,selection:hN,order:u_,sort:c_,call:f_,nodes:h_,node:p_,size:g_,empty:m_,each:y_,attr:__,style:M_,property:T_,classed:A_,text:H_,html:W_,raise:Y_,lower:X_,append:G_,insert:Q_,remove:J_,clone:nN,datum:rN,on:aN,dispatch:dN,[Symbol.iterator]:fN};function Fe(e){return typeof e=="string"?new it([[document.querySelector(e)]],[document.documentElement]):new it([[e]],ym)}var pN=0;function gN(){return new Oc}function Oc(){this._="@"+(++pN).toString(36)}Oc.prototype=gN.prototype={constructor:Oc,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function mN(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Qe(e,t){if(e=mN(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}var yN={passive:!1},hi={capture:!0,passive:!1};function zc(e){e.stopImmediatePropagation()}function Jr(e){e.preventDefault(),e.stopImmediatePropagation()}function Rc(e){var t=e.document.documentElement,n=Fe(e).on("dragstart.drag",Jr,hi);"onselectstart"in t?n.on("selectstart.drag",Jr,hi):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function $c(e,t){var n=e.document.documentElement,r=Fe(e).on("dragstart.drag",null);t&&(r.on("click.drag",Jr,hi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var ul=e=>()=>e;function Ac(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:s,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Ac.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function vN(e){return!e.ctrlKey&&!e.button}function wN(){return this.parentNode}function xN(e,t){return t??{x:e.x,y:e.y}}function EN(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bc(){var e=vN,t=wN,n=xN,r=EN,o={},i=lr("start","drag","end"),s=0,l,a,u,c,f=0;function d(v){v.on("mousedown.drag",h).filter(r).on("touchstart.drag",x).on("touchmove.drag",g,yN).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(v,k){if(!(c||!e.call(this,v,k))){var S=p(this,t.call(this,v,k),v,k,"mouse");S&&(Fe(v.view).on("mousemove.drag",m,hi).on("mouseup.drag",w,hi),Rc(v.view),zc(v),u=!1,l=v.clientX,a=v.clientY,S("start",v))}}function m(v){if(Jr(v),!u){var k=v.clientX-l,S=v.clientY-a;u=k*k+S*S>f}o.mouse("drag",v)}function w(v){Fe(v.view).on("mousemove.drag mouseup.drag",null),$c(v.view,u),Jr(v),o.mouse("end",v)}function x(v,k){if(e.call(this,v,k)){var S=v.changedTouches,_=t.call(this,v,k),N=S.length,M,A;for(M=0;M<N;++M)(A=p(this,_,v,k,S[M].identifier,S[M]))&&(zc(v),A("start",v,S[M]))}}function g(v){var k=v.changedTouches,S=k.length,_,N;for(_=0;_<S;++_)(N=o[k[_].identifier])&&(Jr(v),N("drag",v,k[_]))}function y(v){var k=v.changedTouches,S=k.length,_,N;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),_=0;_<S;++_)(N=o[k[_].identifier])&&(zc(v),N("end",v,k[_]))}function p(v,k,S,_,N,M){var A=i.copy(),R=Qe(M||S,k),V,B,E;if((E=n.call(v,new Ac("beforestart",{sourceEvent:S,target:d,identifier:N,active:s,x:R[0],y:R[1],dx:0,dy:0,dispatch:A}),_))!=null)return V=E.x-R[0]||0,B=E.y-R[1]||0,function b(I,P,L){var z=R,F;switch(I){case"start":o[N]=b,F=s++;break;case"end":delete o[N],--s;case"drag":R=Qe(L||P,k),F=s;break}A.call(I,v,new Ac(I,{sourceEvent:P,subject:E,target:d,identifier:N,active:F,x:R[0]+V,y:R[1]+B,dx:R[0]-z[0],dy:R[1]-z[1],dispatch:A}),_)}}return d.filter=function(v){return arguments.length?(e=typeof v=="function"?v:ul(!!v),d):e},d.container=function(v){return arguments.length?(t=typeof v=="function"?v:ul(v),d):t},d.subject=function(v){return arguments.length?(n=typeof v=="function"?v:ul(v),d):n},d.touchable=function(v){return arguments.length?(r=typeof v=="function"?v:ul(!!v),d):r},d.on=function(){var v=i.on.apply(i,arguments);return v===i?d:v},d.clickDistance=function(v){return arguments.length?(f=(v=+v)*v,d):Math.sqrt(f)},d}function ro(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function mi(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function zn(){}var hr=.7,no=1/hr,eo="\\s*([+-]?\\d+)\\s*",pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",SN=/^#([0-9a-f]{3,8})$/,kN=new RegExp(`^rgb\\(${eo},${eo},${eo}\\)$`),_N=new RegExp(`^rgb\\(${Ht},${Ht},${Ht}\\)$`),NN=new RegExp(`^rgba\\(${eo},${eo},${eo},${pi}\\)$`),CN=new RegExp(`^rgba\\(${Ht},${Ht},${Ht},${pi}\\)$`),bN=new RegExp(`^hsl\\(${pi},${Ht},${Ht}\\)$`),MN=new RegExp(`^hsla\\(${pi},${Ht},${Ht},${pi}\\)$`),vm={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};ro(zn,ln,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:wm,formatHex:wm,formatHex8:IN,formatHsl:PN,formatRgb:xm,toString:xm});function wm(){return this.rgb().formatHex()}function IN(){return this.rgb().formatHex8()}function PN(){return Im(this).formatHsl()}function xm(){return this.rgb().formatRgb()}function ln(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=SN.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Em(t):n===3?new Oe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cl(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=kN.exec(e))?new Oe(t[1],t[2],t[3],1):(t=_N.exec(e))?new Oe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=NN.exec(e))?cl(t[1],t[2],t[3],t[4]):(t=CN.exec(e))?cl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=bN.exec(e))?_m(t[1],t[2]/100,t[3]/100,1):(t=MN.exec(e))?_m(t[1],t[2]/100,t[3]/100,t[4]):vm.hasOwnProperty(e)?Em(vm[e]):e==="transparent"?new Oe(NaN,NaN,NaN,0):null}function Em(e){return new Oe(e>>16&255,e>>8&255,e&255,1)}function cl(e,t,n,r){return r<=0&&(e=t=n=NaN),new Oe(e,t,n,r)}function Uc(e){return e instanceof zn||(e=ln(e)),e?(e=e.rgb(),new Oe(e.r,e.g,e.b,e.opacity)):new Oe}function yi(e,t,n,r){return arguments.length===1?Uc(e):new Oe(e,t,n,r??1)}function Oe(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}ro(Oe,yi,mi(zn,{brighter(e){return e=e==null?no:Math.pow(no,e),new Oe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hr:Math.pow(hr,e),new Oe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Oe(dr(this.r),dr(this.g),dr(this.b),fl(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:Sm,formatHex:Sm,formatHex8:ON,formatRgb:km,toString:km}));function Sm(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}`}function ON(){return`#${cr(this.r)}${cr(this.g)}${cr(this.b)}${cr((isNaN(this.opacity)?1:this.opacity)*255)}`}function km(){let e=fl(this.opacity);return`${e===1?"rgb(":"rgba("}${dr(this.r)}, ${dr(this.g)}, ${dr(this.b)}${e===1?")":`, ${e})`}`}function fl(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function dr(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function cr(e){return e=dr(e),(e<16?"0":"")+e.toString(16)}function _m(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mt(e,t,n,r)}function Im(e){if(e instanceof Mt)return new Mt(e.h,e.s,e.l,e.opacity);if(e instanceof zn||(e=ln(e)),!e)return new Mt;if(e instanceof Mt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),s=NaN,l=i-o,a=(i+o)/2;return l?(t===i?s=(n-r)/l+(n<r)*6:n===i?s=(r-t)/l+2:s=(t-n)/l+4,l/=a<.5?i+o:2-i-o,s*=60):l=a>0&&a<1?0:s,new Mt(s,l,a,e.opacity)}function pl(e,t,n,r){return arguments.length===1?Im(e):new Mt(e,t,n,r??1)}function Mt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ro(Mt,pl,mi(zn,{brighter(e){return e=e==null?no:Math.pow(no,e),new Mt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hr:Math.pow(hr,e),new Mt(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,o=2*n-r;return new Oe(Hc(e>=240?e-240:e+120,o,r),Hc(e,o,r),Hc(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Mt(Nm(this.h),dl(this.s),dl(this.l),fl(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=fl(this.opacity);return`${e===1?"hsl(":"hsla("}${Nm(this.h)}, ${dl(this.s)*100}%, ${dl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Nm(e){return e=(e||0)%360,e<0?e+360:e}function dl(e){return Math.max(0,Math.min(1,e||0))}function Hc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Pm=Math.PI/180,Om=180/Math.PI,hl=18,Tm=.96422,Dm=1,Lm=.82521,zm=4/29,to=6/29,Am=3*to*to,TN=to*to*to;function Rm(e){if(e instanceof Ft)return new Ft(e.l,e.a,e.b,e.opacity);if(e instanceof sn)return Bm(e);e instanceof Oe||(e=Uc(e));var t=Wc(e.r),n=Wc(e.g),r=Wc(e.b),o=Fc((.2225045*t+.7168786*n+.0606169*r)/Dm),i,s;return t===n&&n===r?i=s=o:(i=Fc((.4360747*t+.3850649*n+.1430804*r)/Tm),s=Fc((.0139322*t+.0971045*n+.7141733*r)/Lm)),new Ft(116*o-16,500*(i-o),200*(o-s),e.opacity)}function $m(e,t,n,r){return arguments.length===1?Rm(e):new Ft(e,t,n,r??1)}function Ft(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}ro(Ft,$m,mi(zn,{brighter(e){return new Ft(this.l+hl*(e??1),this.a,this.b,this.opacity)},darker(e){return new Ft(this.l-hl*(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=Tm*Vc(t),e=Dm*Vc(e),n=Lm*Vc(n),new Oe(jc(3.1338561*t-1.6168667*e-.4906146*n),jc(-.9787684*t+1.9161415*e+.033454*n),jc(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function Fc(e){return e>TN?Math.pow(e,1/3):e/Am+zm}function Vc(e){return e>to?e*e*e:Am*(e-zm)}function jc(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Wc(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function DN(e){if(e instanceof sn)return new sn(e.h,e.c,e.l,e.opacity);if(e instanceof Ft||(e=Rm(e)),e.a===0&&e.b===0)return new sn(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Om;return new sn(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function gl(e,t,n,r){return arguments.length===1?DN(e):new sn(e,t,n,r??1)}function sn(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Bm(e){if(isNaN(e.h))return new Ft(e.l,0,0,e.opacity);var t=e.h*Pm;return new Ft(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}ro(sn,gl,mi(zn,{brighter(e){return new sn(this.h,this.c,this.l+hl*(e??1),this.opacity)},darker(e){return new sn(this.h,this.c,this.l-hl*(e??1),this.opacity)},rgb(){return Bm(this).rgb()}}));var Hm=-.14861,Yc=1.78277,qc=-.29227,ml=-.90649,gi=1.97294,Cm=gi*ml,bm=gi*Yc,Mm=Yc*qc-ml*Hm;function LN(e){if(e instanceof fr)return new fr(e.h,e.s,e.l,e.opacity);e instanceof Oe||(e=Uc(e));var t=e.r/255,n=e.g/255,r=e.b/255,o=(Mm*r+Cm*t-bm*n)/(Mm+Cm-bm),i=r-o,s=(gi*(n-o)-qc*i)/ml,l=Math.sqrt(s*s+i*i)/(gi*o*(1-o)),a=l?Math.atan2(s,i)*Om-120:NaN;return new fr(a<0?a+360:a,l,o,e.opacity)}function yl(e,t,n,r){return arguments.length===1?LN(e):new fr(e,t,n,r??1)}function fr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}ro(fr,yl,mi(zn,{brighter(e){return e=e==null?no:Math.pow(no,e),new fr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hr:Math.pow(hr,e),new fr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*Pm,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),o=Math.sin(e);return new Oe(255*(t+n*(Hm*r+Yc*o)),255*(t+n*(qc*r+ml*o)),255*(t+n*(gi*r)),this.opacity)}}));function jm(e,t,n,r,o){var i=e*e,s=i*e;return((1-3*e+3*i-s)*t+(4-6*i+3*s)*n+(1+3*e+3*i-3*s)*r+s*o)/6}function zN(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),o=e[r],i=e[r+1],s=r>0?e[r-1]:2*o-i,l=r<t-1?e[r+2]:2*i-o;return jm((n-r/t)*t,s,o,i,l)}}function AN(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],i=e[r%t],s=e[(r+1)%t],l=e[(r+2)%t];return jm((n-r/t)*t,o,i,s,l)}}var wl=e=>()=>e;function Wm(e,t){return function(n){return e+n*t}}function RN(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 Qc(e,t){var n=t-e;return n?Wm(e,n>180||n<-180?n-360*Math.round(n/360):n):wl(isNaN(e)?t:e)}function $N(e){return(e=+e)==1?Ke:function(t,n){return n-t?RN(t,n,e):wl(isNaN(t)?n:t)}}function Ke(e,t){var n=t-e;return n?Wm(e,n):wl(isNaN(e)?t:e)}var vi=(function e(t){var n=$N(t);function r(o,i){var s=n((o=yi(o)).r,(i=yi(i)).r),l=n(o.g,i.g),a=n(o.b,i.b),u=Ke(o.opacity,i.opacity);return function(c){return o.r=s(c),o.g=l(c),o.b=a(c),o.opacity=u(c),o+""}}return r.gamma=e,r})(1);function Um(e){return function(t){var n=t.length,r=new Array(n),o=new Array(n),i=new Array(n),s,l;for(s=0;s<n;++s)l=yi(t[s]),r[s]=l.r||0,o[s]=l.g||0,i[s]=l.b||0;return r=e(r),o=e(o),i=e(i),l.opacity=1,function(a){return l.r=r(a),l.g=o(a),l.b=i(a),l+""}}}var g3=Um(zN),m3=Um(AN);function BN(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;o<n;++o)r[o]=e[o]*(1-i)+t[o]*i;return r}}function HN(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function FN(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),i=new Array(n),s;for(s=0;s<r;++s)o[s]=oo(e[s],t[s]);for(;s<n;++s)i[s]=t[s];return function(l){for(s=0;s<r;++s)i[s]=o[s](l);return i}}function VN(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function It(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function jN(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=oo(e[o],t[o]):r[o]=t[o];return function(i){for(o in n)r[o]=n[o](i);return r}}var Gc=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xc=new RegExp(Gc.source,"g");function WN(e){return function(){return e}}function UN(e){return function(t){return e(t)+""}}function Kc(e,t){var n=Gc.lastIndex=Xc.lastIndex=0,r,o,i,s=-1,l=[],a=[];for(e=e+"",t=t+"";(r=Gc.exec(e))&&(o=Xc.exec(t));)(i=o.index)>n&&(i=t.slice(n,i),l[s]?l[s]+=i:l[++s]=i),(r=r[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,a.push({i:s,x:It(r,o)})),n=Xc.lastIndex;return n<t.length&&(i=t.slice(n),l[s]?l[s]+=i:l[++s]=i),l.length<2?a[0]?UN(a[0].x):WN(t):(t=a.length,function(u){for(var c=0,f;c<t;++c)l[(f=a[c]).i]=f.x(u);return l.join("")})}function oo(e,t){var n=typeof t,r;return t==null||n==="boolean"?wl(t):(n==="number"?It:n==="string"?(r=ln(t))?(t=r,vi):Kc:t instanceof ln?vi:t instanceof Date?VN:HN(t)?BN:Array.isArray(t)?FN:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?jN:It)(e,t)}var Fm=180/Math.PI,Zc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ym(e,t,n,r,o,i){var s,l,a;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(a=e*n+t*r)&&(n-=e*a,r-=t*a),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,a/=l),e*r<t*n&&(e=-e,t=-t,a=-a,s=-s),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Fm,skewX:Math.atan(a)*Fm,scaleX:s,scaleY:l}}var vl;function YN(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Zc:Ym(t.a,t.b,t.c,t.d,t.e,t.f)}function qN(e){return e==null||(vl||(vl=document.createElementNS("http://www.w3.org/2000/svg","g")),vl.setAttribute("transform",e),!(e=vl.transform.baseVal.consolidate()))?Zc:(e=e.matrix,Ym(e.a,e.b,e.c,e.d,e.e,e.f))}function qm(e,t,n,r){function o(u){return u.length?u.pop()+" ":""}function i(u,c,f,d,h,m){if(u!==f||c!==d){var w=h.push("translate(",null,t,null,n);m.push({i:w-4,x:It(u,f)},{i:w-2,x:It(c,d)})}else(f||d)&&h.push("translate("+f+t+d+n)}function s(u,c,f,d){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),d.push({i:f.push(o(f)+"rotate(",null,r)-2,x:It(u,c)})):c&&f.push(o(f)+"rotate("+c+r)}function l(u,c,f,d){u!==c?d.push({i:f.push(o(f)+"skewX(",null,r)-2,x:It(u,c)}):c&&f.push(o(f)+"skewX("+c+r)}function a(u,c,f,d,h,m){if(u!==f||c!==d){var w=h.push(o(h)+"scale(",null,",",null,")");m.push({i:w-4,x:It(u,f)},{i:w-2,x:It(c,d)})}else(f!==1||d!==1)&&h.push(o(h)+"scale("+f+","+d+")")}return function(u,c){var f=[],d=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,d),s(u.rotate,c.rotate,f,d),l(u.skewX,c.skewX,f,d),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,d),u=c=null,function(h){for(var m=-1,w=d.length,x;++m<w;)f[(x=d[m]).i]=x.x(h);return f.join("")}}}var Xm=qm(YN,"px, ","px)","deg)"),Gm=qm(qN,", ",")",")"),XN=1e-12;function Vm(e){return((e=Math.exp(e))+1/e)/2}function GN(e){return((e=Math.exp(e))-1/e)/2}function ZN(e){return((e=Math.exp(2*e))-1)/(e+1)}var io=(function e(t,n,r){function o(i,s){var l=i[0],a=i[1],u=i[2],c=s[0],f=s[1],d=s[2],h=c-l,m=f-a,w=h*h+m*m,x,g;if(w<XN)g=Math.log(d/u)/t,x=function(_){return[l+_*h,a+_*m,u*Math.exp(t*_*g)]};else{var y=Math.sqrt(w),p=(d*d-u*u+r*w)/(2*u*n*y),v=(d*d-u*u-r*w)/(2*d*n*y),k=Math.log(Math.sqrt(p*p+1)-p),S=Math.log(Math.sqrt(v*v+1)-v);g=(S-k)/t,x=function(_){var N=_*g,M=Vm(k),A=u/(n*y)*(M*ZN(t*N+k)-GN(k));return[l+A*h,a+A*m,u*M/Vm(t*N+k)]}}return x.duration=Math.abs(g)*1e3*t/Math.SQRT2,x}return o.rho=function(i){var s=Math.max(.001,+i),l=s*s,a=l*l;return e(s,l,a)},o})(Math.SQRT2,2,4);function Zm(e){return function(t,n){var r=e((t=pl(t)).h,(n=pl(n)).h),o=Ke(t.s,n.s),i=Ke(t.l,n.l),s=Ke(t.opacity,n.opacity);return function(l){return t.h=r(l),t.s=o(l),t.l=i(l),t.opacity=s(l),t+""}}}var y3=Zm(Qc),v3=Zm(Ke);function Qm(e){return function(t,n){var r=e((t=gl(t)).h,(n=gl(n)).h),o=Ke(t.c,n.c),i=Ke(t.l,n.l),s=Ke(t.opacity,n.opacity);return function(l){return t.h=r(l),t.c=o(l),t.l=i(l),t.opacity=s(l),t+""}}}var w3=Qm(Qc),x3=Qm(Ke);function Km(e){return(function t(n){n=+n;function r(o,i){var s=e((o=yl(o)).h,(i=yl(i)).h),l=Ke(o.s,i.s),a=Ke(o.l,i.l),u=Ke(o.opacity,i.opacity);return function(c){return o.h=s(c),o.s=l(c),o.l=a(Math.pow(c,n)),o.opacity=u(c),o+""}}return r.gamma=t,r})(1)}var E3=Km(Qc),S3=Km(Ke);var so=0,xi=0,wi=0,e0=1e3,xl,Ei,El=0,pr=0,kl=0,Si=typeof performance=="object"&&performance.now?performance:Date,t0=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function _l(){return pr||(t0(QN),pr=Si.now()+kl)}function QN(){pr=0}function Sl(){this._call=this._time=this._next=null}Sl.prototype=ed.prototype={constructor:Sl,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?_l():+n)+(t==null?0:+t),!this._next&&Ei!==this&&(Ei?Ei._next=this:xl=this,Ei=this),this._call=e,this._time=n,Jc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Jc())}};function ed(e,t,n){var r=new Sl;return r.restart(e,t,n),r}function KN(){_l(),++so;for(var e=xl,t;e;)(t=pr-e._time)>=0&&e._call.call(void 0,t),e=e._next;--so}function Jm(){pr=(El=Si.now())+kl,so=xi=0;try{KN()}finally{so=0,eC(),pr=0}}function JN(){var e=Si.now(),t=e-El;t>e0&&(kl-=t,El=e)}function eC(){for(var e,t=xl,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:xl=n);Ei=e,Jc(r)}function Jc(e){if(!so){xi&&(xi=clearTimeout(xi));var t=e-pr;t>24?(e<1/0&&(xi=setTimeout(Jm,Math.ceil(e-Si.now()-kl)+1)),wi&&(wi=clearInterval(wi))):(wi||(El=Si.now(),wi=setInterval(JN,e0)),so=1,t0(Jm))}}function td(e,t,n){var r=new Sl;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}function r0(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var nd=3,N3=(function e(t){t=+t;function n(r){return Math.pow(r,t)}return n.exponent=e,n})(nd),C3=(function e(t){t=+t;function n(r){return 1-Math.pow(1-r,t)}return n.exponent=e,n})(nd),b3=(function e(t){t=+t;function n(r){return((r*=2)<=1?Math.pow(r,t):2-Math.pow(2-r,t))/2}return n.exponent=e,n})(nd),tC=Math.PI,M3=tC/2;function Nl(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}var n0=4/11,I3=6/11,P3=8/11,O3=3/4,T3=9/11,D3=10/11,L3=15/16,z3=21/22,A3=63/64,R3=1/n0/n0;var rd=1.70158,$3=(function e(t){t=+t;function n(r){return(r=+r)*r*(t*(r-1)+r)}return n.overshoot=e,n})(rd),B3=(function e(t){t=+t;function n(r){return--r*r*((r+1)*t+r)+1}return n.overshoot=e,n})(rd),H3=(function e(t){t=+t;function n(r){return((r*=2)<1?r*r*((t+1)*r-t):(r-=2)*r*((t+1)*r+t)+2)/2}return n.overshoot=e,n})(rd),lo=2*Math.PI,od=1,id=.3,F3=(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=lo);function o(i){return t*Nl(- --i)*Math.sin((r-i)/n)}return o.amplitude=function(i){return e(i,n*lo)},o.period=function(i){return e(t,i)},o})(od,id),V3=(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=lo);function o(i){return 1-t*Nl(i=+i)*Math.sin((i+r)/n)}return o.amplitude=function(i){return e(i,n*lo)},o.period=function(i){return e(t,i)},o})(od,id),j3=(function e(t,n){var r=Math.asin(1/(t=Math.max(1,t)))*(n/=lo);function o(i){return((i=i*2-1)<0?t*Nl(-i)*Math.sin((r-i)/n):2-t*Nl(i)*Math.sin((r+i)/n))/2}return o.amplitude=function(i){return e(i,n*lo)},o.period=function(i){return e(t,i)},o})(od,id);var nC=lr("start","end","cancel","interrupt"),rC=[],s0=0,o0=1,sd=2,Cl=3,i0=4,ld=5,bl=6;function Ml(e,t,n,r,o,i){var s=e.__transition;if(!s)e.__transition={};else if(n in s)return;oC(e,n,{name:t,index:r,group:o,on:nC,tween:rC,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:s0})}function ad(e,t){var n=Pt(e,t);if(n.state>s0)throw new Error("too late; already scheduled");return n}function Vt(e,t){var n=Pt(e,t);if(n.state>Cl)throw new Error("too late; already running");return n}function Pt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function oC(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=ed(i,0,n.time);function i(u){n.state=o0,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var c,f,d,h;if(n.state!==o0)return a();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Cl)return td(s);h.state===i0?(h.state=bl,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=bl,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(td(function(){n.state===Cl&&(n.state=i0,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=sd,n.on.call("start",e,e.__data__,n.index,n.group),n.state===sd){for(n.state=Cl,o=new Array(d=n.tween.length),c=0,f=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(o[++f]=h);o.length=f+1}}function l(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(a),n.state=ld,1),f=-1,d=o.length;++f<d;)o[f].call(e,c);n.state===ld&&(n.on.call("end",e,e.__data__,n.index,n.group),a())}function a(){n.state=bl,n.timer.stop(),delete r[t];for(var u in r)return;delete e.__transition}}function ki(e,t){var n=e.__transition,r,o,i=!0,s;if(n){t=t==null?null:t+"";for(s in n){if((r=n[s]).name!==t){i=!1;continue}o=r.state>sd&&r.state<ld,r.state=bl,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[s]}i&&delete e.__transition}}function iC(e){return this.each(function(){ki(this,e)})}function sC(e,t){var n,r;return function(){var o=Vt(this,e),i=o.tween;if(i!==n){r=n=i;for(var s=0,l=r.length;s<l;++s)if(r[s].name===t){r=r.slice(),r.splice(s,1);break}}o.tween=r}}function lC(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var i=Vt(this,e),s=i.tween;if(s!==r){o=(r=s).slice();for(var l={name:t,value:n},a=0,u=o.length;a<u;++a)if(o[a].name===t){o[a]=l;break}a===u&&o.push(l)}i.tween=o}}function aC(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Pt(this.node(),n).tween,o=0,i=r.length,s;o<i;++o)if((s=r[o]).name===e)return s.value;return null}return this.each((t==null?sC:lC)(n,e,t))}function ud(e,t,n){var r=e._id;return e.each(function(){var o=Vt(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Pt(o,r).value[t]}}function l0(e,t){var n;return(typeof t=="number"?It:t instanceof ln?vi:(n=ln(t))?(t=n,vi):Kc)(e,t)}function uC(e){return function(){this.removeAttribute(e)}}function cC(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dC(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttribute(e);return s===o?null:s===r?i:i=t(r=s,n)}}function fC(e,t,n){var r,o=n+"",i;return function(){var s=this.getAttributeNS(e.space,e.local);return s===o?null:s===r?i:i=t(r=s,n)}}function hC(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttribute(e):(s=this.getAttribute(e),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function pC(e,t,n){var r,o,i;return function(){var s,l=n(this),a;return l==null?void this.removeAttributeNS(e.space,e.local):(s=this.getAttributeNS(e.space,e.local),a=l+"",s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l)))}}function gC(e,t){var n=fi(e),r=n==="transform"?Gm:l0;return this.attrTween(e,typeof t=="function"?(n.local?pC:hC)(n,r,ud(this,"attr."+e,t)):t==null?(n.local?cC:uC)(n):(n.local?fC:dC)(n,r,t))}function mC(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function yC(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function vC(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&yC(e,i)),n}return o._value=t,o}function wC(e,t){var n,r;function o(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&mC(e,i)),n}return o._value=t,o}function xC(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=fi(e);return this.tween(n,(r.local?vC:wC)(r,t))}function EC(e,t){return function(){ad(this,e).delay=+t.apply(this,arguments)}}function SC(e,t){return t=+t,function(){ad(this,e).delay=t}}function kC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?EC:SC)(t,e)):Pt(this.node(),t).delay}function _C(e,t){return function(){Vt(this,e).duration=+t.apply(this,arguments)}}function NC(e,t){return t=+t,function(){Vt(this,e).duration=t}}function CC(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?_C:NC)(t,e)):Pt(this.node(),t).duration}function bC(e,t){if(typeof t!="function")throw new Error;return function(){Vt(this,e).ease=t}}function MC(e){var t=this._id;return arguments.length?this.each(bC(t,e)):Pt(this.node(),t).ease}function IC(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Vt(this,e).ease=n}}function PC(e){if(typeof e!="function")throw new Error;return this.each(IC(this._id,e))}function OC(e){typeof e!="function"&&(e=Dc(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i=t[o],s=i.length,l=r[o]=[],a,u=0;u<s;++u)(a=i[u])&&e.call(a,a.__data__,u,i)&&l.push(a);return new un(r,this._parents,this._name,this._id)}function TC(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),s=new Array(r),l=0;l<i;++l)for(var a=t[l],u=n[l],c=a.length,f=s[l]=new Array(c),d,h=0;h<c;++h)(d=a[h]||u[h])&&(f[h]=d);for(;l<r;++l)s[l]=t[l];return new un(s,this._parents,this._name,this._id)}function DC(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function LC(e,t,n){var r,o,i=DC(t)?ad:Vt;return function(){var s=i(this,e),l=s.on;l!==r&&(o=(r=l).copy()).on(t,n),s.on=o}}function zC(e,t){var n=this._id;return arguments.length<2?Pt(this.node(),n).on.on(e):this.each(LC(n,e,t))}function AC(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function RC(){return this.on("end.remove",AC(this._id))}function $C(e){var t=this._name,n=this._id;typeof e!="function"&&(e=al(e));for(var r=this._groups,o=r.length,i=new Array(o),s=0;s<o;++s)for(var l=r[s],a=l.length,u=i[s]=new Array(a),c,f,d=0;d<a;++d)(c=l[d])&&(f=e.call(c,c.__data__,d,l))&&("__data__"in c&&(f.__data__=c.__data__),u[d]=f,Ml(u[d],t,n,d,u,Pt(c,n)));return new un(i,this._parents,t,n)}function BC(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Tc(e));for(var r=this._groups,o=r.length,i=[],s=[],l=0;l<o;++l)for(var a=r[l],u=a.length,c,f=0;f<u;++f)if(c=a[f]){for(var d=e.call(c,c.__data__,f,a),h,m=Pt(c,n),w=0,x=d.length;w<x;++w)(h=d[w])&&Ml(h,t,n,w,d,m);i.push(d),s.push(c)}return new un(i,s,t,n)}var HC=ur.prototype.constructor;function FC(){return new HC(this._groups,this._parents)}function VC(e,t){var n,r,o;return function(){var i=ar(this,e),s=(this.style.removeProperty(e),ar(this,e));return i===s?null:i===n&&s===r?o:o=t(n=i,r=s)}}function a0(e){return function(){this.style.removeProperty(e)}}function jC(e,t,n){var r,o=n+"",i;return function(){var s=ar(this,e);return s===o?null:s===r?i:i=t(r=s,n)}}function WC(e,t,n){var r,o,i;return function(){var s=ar(this,e),l=n(this),a=l+"";return l==null&&(a=l=(this.style.removeProperty(e),ar(this,e))),s===a?null:s===r&&a===o?i:(o=a,i=t(r=s,l))}}function UC(e,t){var n,r,o,i="style."+t,s="end."+i,l;return function(){var a=Vt(this,e),u=a.on,c=a.value[i]==null?l||(l=a0(t)):void 0;(u!==n||o!==c)&&(r=(n=u).copy()).on(s,o=c),a.on=r}}function YC(e,t,n){var r=(e+="")=="transform"?Xm:l0;return t==null?this.styleTween(e,VC(e,r)).on("end.style."+e,a0(e)):typeof t=="function"?this.styleTween(e,WC(e,r,ud(this,"style."+e,t))).each(UC(this._id,e)):this.styleTween(e,jC(e,r,t),n).on("end.style."+e,null)}function qC(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function XC(e,t,n){var r,o;function i(){var s=t.apply(this,arguments);return s!==o&&(r=(o=s)&&qC(e,s,n)),r}return i._value=t,i}function GC(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,XC(e,t,n??""))}function ZC(e){return function(){this.textContent=e}}function QC(e){return function(){var t=e(this);this.textContent=t??""}}function KC(e){return this.tween("text",typeof e=="function"?QC(ud(this,"text",e)):ZC(e==null?"":e+""))}function JC(e){return function(t){this.textContent=e.call(this,t)}}function e2(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&JC(o)),t}return r._value=e,r}function t2(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,e2(e))}function n2(){for(var e=this._name,t=this._id,n=u0(),r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)if(a=s[u]){var c=Pt(a,t);Ml(a,e,n,u,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new un(r,this._parents,e,n)}function r2(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(i,s){var l={value:s},a={value:function(){--o===0&&i()}};n.each(function(){var u=Vt(this,r),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(a)),u.on=t}),o===0&&i()})}var o2=0;function un(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function i2(e){return ur().transition(e)}function u0(){return++o2}var an=ur.prototype;un.prototype=i2.prototype={constructor:un,select:$C,selectAll:BC,selectChild:an.selectChild,selectChildren:an.selectChildren,filter:OC,merge:TC,selection:FC,transition:n2,call:an.call,nodes:an.nodes,node:an.node,size:an.size,empty:an.empty,each:an.each,on:zC,attr:gC,attrTween:xC,style:YC,styleTween:GC,text:KC,textTween:t2,remove:RC,tween:aC,delay:kC,duration:CC,ease:MC,easeVarying:PC,end:r2,[Symbol.iterator]:an[Symbol.iterator]};var s2={time:null,delay:0,duration:250,ease:r0};function l2(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function a2(e){var t,n;e instanceof un?(t=e._id,e=e._name):(t=u0(),(n=s2).time=_l(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var s=r[i],l=s.length,a,u=0;u<l;++u)(a=s[u])&&Ml(a,e,t,u,s,n||l2(a,t));return new un(r,this._parents,e,t)}ur.prototype.interrupt=iC;ur.prototype.transition=a2;var Il=e=>()=>e;function u2(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function cn(e,t,n){this.k=e,this.x=t,this.y=n}cn.prototype={constructor:cn,scale:function(e){return e===1?this:new cn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new cn(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ni=new cn(1,0,0);dd.prototype=cn.prototype;function dd(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Ni;return e.__zoom}function cd(e){e.stopImmediatePropagation()}function _i(e){e.preventDefault(),e.stopImmediatePropagation()}function c2(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function d2(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function c0(){return this.__zoom||Ni}function f2(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function h2(){return navigator.maxTouchPoints||"ontouchstart"in this}function p2(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],s=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),s>i?(i+s)/2:Math.min(0,i)||Math.max(0,s))}function fd(){var e=c2,t=d2,n=p2,r=f2,o=h2,i=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,a=io,u=lr("start","zoom","end"),c,f,d,h=500,m=150,w=0,x=10;function g(E){E.property("__zoom",c0).on("wheel.zoom",N,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",A).filter(o).on("touchstart.zoom",R).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(E,b,I,P){var L=E.selection?E.selection():E;L.property("__zoom",c0),E!==L?k(E,b,I,P):L.interrupt().each(function(){S(this,arguments).event(P).start().zoom(null,typeof b=="function"?b.apply(this,arguments):b).end()})},g.scaleBy=function(E,b,I,P){g.scaleTo(E,function(){var L=this.__zoom.k,z=typeof b=="function"?b.apply(this,arguments):b;return L*z},I,P)},g.scaleTo=function(E,b,I,P){g.transform(E,function(){var L=t.apply(this,arguments),z=this.__zoom,F=I==null?v(L):typeof I=="function"?I.apply(this,arguments):I,H=z.invert(F),Y=typeof b=="function"?b.apply(this,arguments):b;return n(p(y(z,Y),F,H),L,s)},I,P)},g.translateBy=function(E,b,I,P){g.transform(E,function(){return n(this.__zoom.translate(typeof b=="function"?b.apply(this,arguments):b,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),s)},null,P)},g.translateTo=function(E,b,I,P,L){g.transform(E,function(){var z=t.apply(this,arguments),F=this.__zoom,H=P==null?v(z):typeof P=="function"?P.apply(this,arguments):P;return n(Ni.translate(H[0],H[1]).scale(F.k).translate(typeof b=="function"?-b.apply(this,arguments):-b,typeof I=="function"?-I.apply(this,arguments):-I),z,s)},P,L)};function y(E,b){return b=Math.max(i[0],Math.min(i[1],b)),b===E.k?E:new cn(b,E.x,E.y)}function p(E,b,I){var P=b[0]-I[0]*E.k,L=b[1]-I[1]*E.k;return P===E.x&&L===E.y?E:new cn(E.k,P,L)}function v(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function k(E,b,I,P){E.on("start.zoom",function(){S(this,arguments).event(P).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).event(P).end()}).tween("zoom",function(){var L=this,z=arguments,F=S(L,z).event(P),H=t.apply(L,z),Y=I==null?v(H):typeof I=="function"?I.apply(L,z):I,ne=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),U=L.__zoom,te=typeof b=="function"?b.apply(L,z):b,re=a(U.invert(Y).concat(ne/U.k),te.invert(Y).concat(ne/te.k));return function(ee){if(ee===1)ee=te;else{var $=re(ee),G=ne/$[2];ee=new cn(G,Y[0]-$[0]*G,Y[1]-$[1]*G)}F.zoom(null,ee)}})}function S(E,b,I){return!I&&E.__zooming||new _(E,b)}function _(E,b){this.that=E,this.args=b,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,b),this.taps=0}_.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,b){return this.mouse&&E!=="mouse"&&(this.mouse[1]=b.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=b.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=b.invert(this.touch1[0])),this.that.__zoom=b,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var b=Fe(this.that).datum();u.call(E,this.that,new u2(E,{sourceEvent:this.sourceEvent,target:g,transform:this.that.__zoom,dispatch:u}),b)}};function N(E,...b){if(!e.apply(this,arguments))return;var I=S(this,b).event(E),P=this.__zoom,L=Math.max(i[0],Math.min(i[1],P.k*Math.pow(2,r.apply(this,arguments)))),z=Qe(E);if(I.wheel)(I.mouse[0][0]!==z[0]||I.mouse[0][1]!==z[1])&&(I.mouse[1]=P.invert(I.mouse[0]=z)),clearTimeout(I.wheel);else{if(P.k===L)return;I.mouse=[z,P.invert(z)],ki(this),I.start()}_i(E),I.wheel=setTimeout(F,m),I.zoom("mouse",n(p(y(P,L),I.mouse[0],I.mouse[1]),I.extent,s));function F(){I.wheel=null,I.end()}}function M(E,...b){if(d||!e.apply(this,arguments))return;var I=E.currentTarget,P=S(this,b,!0).event(E),L=Fe(E.view).on("mousemove.zoom",Y,!0).on("mouseup.zoom",ne,!0),z=Qe(E,I),F=E.clientX,H=E.clientY;Rc(E.view),cd(E),P.mouse=[z,this.__zoom.invert(z)],ki(this),P.start();function Y(U){if(_i(U),!P.moved){var te=U.clientX-F,re=U.clientY-H;P.moved=te*te+re*re>w}P.event(U).zoom("mouse",n(p(P.that.__zoom,P.mouse[0]=Qe(U,I),P.mouse[1]),P.extent,s))}function ne(U){L.on("mousemove.zoom mouseup.zoom",null),$c(U.view,P.moved),_i(U),P.event(U).end()}}function A(E,...b){if(e.apply(this,arguments)){var I=this.__zoom,P=Qe(E.changedTouches?E.changedTouches[0]:E,this),L=I.invert(P),z=I.k*(E.shiftKey?.5:2),F=n(p(y(I,z),P,L),t.apply(this,b),s);_i(E),l>0?Fe(this).transition().duration(l).call(k,F,P,E):Fe(this).call(g.transform,F,P,E)}}function R(E,...b){if(e.apply(this,arguments)){var I=E.touches,P=I.length,L=S(this,b,E.changedTouches.length===P).event(E),z,F,H,Y;for(cd(E),F=0;F<P;++F)H=I[F],Y=Qe(H,this),Y=[Y,this.__zoom.invert(Y),H.identifier],L.touch0?!L.touch1&&L.touch0[2]!==Y[2]&&(L.touch1=Y,L.taps=0):(L.touch0=Y,z=!0,L.taps=1+!!c);c&&(c=clearTimeout(c)),z&&(L.taps<2&&(f=Y[0],c=setTimeout(function(){c=null},h)),ki(this),L.start())}}function V(E,...b){if(this.__zooming){var I=S(this,b).event(E),P=E.changedTouches,L=P.length,z,F,H,Y;for(_i(E),z=0;z<L;++z)F=P[z],H=Qe(F,this),I.touch0&&I.touch0[2]===F.identifier?I.touch0[0]=H:I.touch1&&I.touch1[2]===F.identifier&&(I.touch1[0]=H);if(F=I.that.__zoom,I.touch1){var ne=I.touch0[0],U=I.touch0[1],te=I.touch1[0],re=I.touch1[1],ee=(ee=te[0]-ne[0])*ee+(ee=te[1]-ne[1])*ee,$=($=re[0]-U[0])*$+($=re[1]-U[1])*$;F=y(F,Math.sqrt(ee/$)),H=[(ne[0]+te[0])/2,(ne[1]+te[1])/2],Y=[(U[0]+re[0])/2,(U[1]+re[1])/2]}else if(I.touch0)H=I.touch0[0],Y=I.touch0[1];else return;I.zoom("touch",n(p(F,H,Y),I.extent,s))}}function B(E,...b){if(this.__zooming){var I=S(this,b).event(E),P=E.changedTouches,L=P.length,z,F;for(cd(E),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),z=0;z<L;++z)F=P[z],I.touch0&&I.touch0[2]===F.identifier?delete I.touch0:I.touch1&&I.touch1[2]===F.identifier&&delete I.touch1;if(I.touch1&&!I.touch0&&(I.touch0=I.touch1,delete I.touch1),I.touch0)I.touch0[1]=this.__zoom.invert(I.touch0[0]);else if(I.end(),I.taps===2&&(F=Qe(F,this),Math.hypot(f[0]-F[0],f[1]-F[1])<x)){var H=Fe(this).on("dblclick.zoom");H&&H.apply(this,arguments)}}}return g.wheelDelta=function(E){return arguments.length?(r=typeof E=="function"?E:Il(+E),g):r},g.filter=function(E){return arguments.length?(e=typeof E=="function"?E:Il(!!E),g):e},g.touchable=function(E){return arguments.length?(o=typeof E=="function"?E:Il(!!E),g):o},g.extent=function(E){return arguments.length?(t=typeof E=="function"?E:Il([[+E[0][0],+E[0][1]],[+E[1][0],+E[1][1]]]),g):t},g.scaleExtent=function(E){return arguments.length?(i[0]=+E[0],i[1]=+E[1],g):[i[0],i[1]]},g.translateExtent=function(E){return arguments.length?(s[0][0]=+E[0][0],s[1][0]=+E[1][0],s[0][1]=+E[0][1],s[1][1]=+E[1][1],g):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},g.constrain=function(E){return arguments.length?(n=E,g):n},g.duration=function(E){return arguments.length?(l=+E,g):l},g.interpolate=function(E){return arguments.length?(a=E,g):a},g.on=function(){var E=u.on.apply(u,arguments);return E===u?g:E},g.clickDistance=function(E){return arguments.length?(w=(E=+E)*E,g):Math.sqrt(w)},g.tapDistance=function(E){return arguments.length?(x=+E,g):x},g}var st={error001:(e="react")=>`Seems like you have not used ${e==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${e}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:r}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},co=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],yd=["Enter"," ","Escape"],vd={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"},Bn;(function(e){e.Strict="strict",e.Loose="loose"})(Bn||(Bn={}));var dn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(dn||(dn={}));var gr;(function(e){e.Partial="partial",e.Full="full"})(gr||(gr={}));var wd={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},jt;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(jt||(jt={}));var Wt;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Wt||(Wt={}));var Q;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Q||(Q={}));var d0={[Q.Left]:Q.Right,[Q.Right]:Q.Left,[Q.Top]:Q.Bottom,[Q.Bottom]:Q.Top},xd=e=>!!e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e,_0=e=>!!e&&typeof e=="object"&&"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),Ed=e=>!!e&&typeof e=="object"&&"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e);var bi=(e,t=[0,0])=>{let{width:n,height:r}=mt(e),o=e.origin??t,i=n*o[0],s=r*o[1];return{x:e.position.x-i,y:e.position.y-s}},Sd=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1,r=e.reduce((o,i)=>{let s=typeof i=="string",l=!t.nodeLookup&&!s?i:void 0;return t.nodeLookup&&(l=s?t.nodeLookup.get(i):Ed(i)?i:t.nodeLookup.get(i.id)),l?(n=!0,zl(o,Tl(l,t.nodeOrigin))):o},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?Al(r):{x:0,y:0,width:0,height:0}},fo=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(o=>{(t.filter===void 0||t.filter(o))&&(n=zl(n,Tl(o)),r=!0)}),r?Al(n):{x:0,y:0,width:0,height:0}},Dl=(e,t,[n,r,o]=[0,0,1],i=!1,s=!1)=>{let l=(t.x-n)/o,a=(t.y-r)/o,u=t.width/o,c=t.height/o,f=[];for(let d of e.values()){let{measured:h,selectable:m=!0,hidden:w=!1}=d;if(s&&!m||w)continue;let x=h.width??d.width??d.initialWidth??0,g=h.height??d.height??d.initialHeight??0,{x:y,y:p}=d.internals.positionAbsolute,v=I0(l,a,u,c,y,p,x,g),k=x*g,S=i&&v>0;(!d.internals.handleBounds||S||v>=k||d.dragging)&&f.push(d)}return f},N0=(e,t)=>{let n=new Set;return e.forEach(r=>{n.add(r.id)}),t.filter(r=>n.has(r.source)||n.has(r.target))};function g2(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(o=>o.id)):null;return e.forEach(o=>{let i;if(t?.includeHiddenNodes){let{width:s,height:l}=mt(o);i=s>0&&l>0}else i=!!(o.measured.width&&o.measured.height&&!o.hidden);i&&(!r||r.has(o.id))&&n.set(o.id,o)}),n}async function C0({nodes:e,width:t,height:n,panZoom:r,minZoom:o,maxZoom:i},s){if(e.size===0)return!0;let l=g2(e,s),a=fo(l),u=Ii(a,t,n,s?.minZoom??o,s?.maxZoom??i,s?.padding??.1);return await r.setViewport(u,{duration:s?.duration,ease:s?.ease,interpolate:s?.interpolate}),!0}function kd({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:o,onError:i}){let s=n.get(e),l=s.parentId?n.get(s.parentId):void 0,{x:a,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},c=s.origin??r,f=s.extent||o;if(s.extent==="parent"&&!s.expandParent)if(!l)i?.("005",st.error005());else{let{width:h,height:m}=mt(l);h&&m&&(f=[[a,u],[a+h,u+m]])}else l&&vr(s.extent)&&(f=[[s.extent[0][0]+a,s.extent[0][1]+u],[s.extent[1][0]+a,s.extent[1][1]+u]]);let d=vr(f)?mr(t,f,s.measured):t;return(s.measured.width===void 0||s.measured.height===void 0)&&i?.("015",st.error015()),{position:{x:d.x-a+(s.measured.width??0)*c[0],y:d.y-u+(s.measured.height??0)*c[1]},positionAbsolute:d}}async function b0({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:o}){let i=new Set(e.map(d=>d.id)),s=[];for(let d of n){if(d.deletable===!1)continue;let h=i.has(d.id),m=!h&&d.parentId&&s.find(w=>w.id===d.parentId);(h||m)&&s.push(d)}let l=new Set(t.map(d=>d.id)),a=r.filter(d=>d.deletable!==!1),c=N0(s,a);for(let d of a)l.has(d.id)&&!c.find(m=>m.id===d.id)&&c.push(d);if(!o)return{edges:c,nodes:s};let f=await o({nodes:s,edges:c});return typeof f=="boolean"?f?{edges:c,nodes:s}:{edges:[],nodes:[]}:f}var uo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),mr=(e={x:0,y:0},t,n)=>({x:uo(e.x,t[0][0],t[1][0]-(n?.width??0)),y:uo(e.y,t[0][1],t[1][1]-(n?.height??0))});function M0(e,t,n){let{width:r,height:o}=mt(n),{x:i,y:s}=n.internals.positionAbsolute;return mr(e,[[i,s],[i+r,s+o]],t)}var f0=(e,t,n)=>e<t?uo(Math.abs(e-t),1,t)/t:e>n?-uo(Math.abs(e-n),1,t)/t:0,Ll=(e,t,n=15,r=40)=>{let o=f0(e.x,r,t.width-r)*n,i=f0(e.y,r,t.height-r)*n;return[o,i]},zl=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),md=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Al=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),ho=(e,t=[0,0])=>{let{x:n,y:r}=Ed(e)?e.internals.positionAbsolute:bi(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},Tl=(e,t=[0,0])=>{let{x:n,y:r}=Ed(e)?e.internals.positionAbsolute:bi(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},_d=(e,t)=>Al(zl(md(e),md(t))),I0=(e,t,n,r,o,i,s,l)=>{let a=Math.max(0,Math.min(e+n,o+s)-Math.max(e,o)),u=Math.max(0,Math.min(t+r,i+l)-Math.max(t,i));return Math.ceil(a*u)},Mi=(e,t)=>I0(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),Nd=e=>pt(e.width)&&pt(e.height)&&pt(e.x)&&pt(e.y),pt=e=>!isNaN(e)&&isFinite(e),Cd=(e,t)=>(n,r)=>{},po=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),go=({x:e,y:t},[n,r,o],i=!1,s=[1,1])=>{let l={x:(e-n)/o,y:(t-r)/o};return i?po(l,s):l},yr=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r});function ao(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function m2(e,t,n){if(typeof e=="string"||typeof e=="number"){let r=ao(e,n),o=ao(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){let r=ao(e.top??e.y??0,n),o=ao(e.bottom??e.y??0,n),i=ao(e.left??e.x??0,t),s=ao(e.right??e.x??0,t);return{top:r,right:s,bottom:o,left:i,x:i+s,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function y2(e,t,n,r,o,i){let{x:s,y:l}=yr(e,[t,n,r]),{x:a,y:u}=yr({x:e.x+e.width,y:e.y+e.height},[t,n,r]),c=o-a,f=i-u;return{left:Math.floor(s),top:Math.floor(l),right:Math.floor(c),bottom:Math.floor(f)}}var Ii=(e,t,n,r,o,i)=>{let s=m2(i,t,n),l=(t-s.x)/e.width,a=(n-s.y)/e.height,u=Math.min(l,a),c=uo(u,r,o),f=e.x+e.width/2,d=e.y+e.height/2,h=t/2-f*c,m=n/2-d*c,w=y2(e,h,m,c,t,n),x={left:Math.min(w.left-s.left,0),top:Math.min(w.top-s.top,0),right:Math.min(w.right-s.right,0),bottom:Math.min(w.bottom-s.bottom,0)};return{x:h-x.left+x.right,y:m-x.top+x.bottom,zoom:c}},mo=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function vr(e){return e!=null&&e!=="parent"}function mt(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function bd(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function Md(e,t={width:0,height:0},n,r,o){let i={...e},s=r.get(n);if(s){let l=s.origin||o;i.x+=s.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=s.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function Id(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function P0(){let e,t;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}}function O0(e){return{...vd,...e||{}}}function Pd(e){return e===null?null:e?"valid":"invalid"}function Ci(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:o}){let{x:i,y:s}=gt(e),l=go({x:i-(o?.left??0),y:s-(o?.top??0)},r),{x:a,y:u}=n?po(l,t):l;return{xSnapped:a,ySnapped:u,...l}}var Rl=e=>({width:e.offsetWidth,height:e.offsetHeight}),Od=e=>e?.getRootNode?.()||window?.document,v2=["INPUT","SELECT","TEXTAREA"];function Td(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType!==1?!1:v2.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}var Dd=e=>"clientX"in e,gt=(e,t)=>{let n=Dd(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},h0=(e,t,n,r,o)=>{let i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(s=>{let l=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),type:e,nodeId:o,position:s.getAttribute("data-handlepos"),x:(l.left-n.left)/r,y:(l.top-n.top)/r,...Rl(s)}})};function $l({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:s,targetControlY:l}){let a=e*.125+o*.375+s*.375+n*.125,u=t*.125+i*.375+l*.375+r*.125,c=Math.abs(a-e),f=Math.abs(u-t);return[a,u,c,f]}function Pl(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function p0({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case Q.Left:return[t-Pl(t-r,i),n];case Q.Right:return[t+Pl(r-t,i),n];case Q.Top:return[t,n-Pl(n-o,i)];case Q.Bottom:return[t,n+Pl(o-n,i)]}}function Bl({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:r,targetY:o,targetPosition:i=Q.Top,curvature:s=.25}){let[l,a]=p0({pos:n,x1:e,y1:t,x2:r,y2:o,c:s}),[u,c]=p0({pos:i,x1:r,y1:o,x2:e,y2:t,c:s}),[f,d,h,m]=$l({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${e},${t} C${l},${a} ${u},${c} ${r},${o}`,f,d,h,m]}function Ld({sourceX:e,sourceY:t,targetX:n,targetY:r}){let o=Math.abs(n-e)/2,i=n<e?n+o:n-o,s=Math.abs(r-t)/2,l=r<t?r+s:r-s;return[i,l,o,s]}function T0({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:o=!1,zIndexMode:i="basic"}){if(i==="manual")return r;let s=o&&n?r+1e3:r,l=Math.max(e.parentId||o&&e.selected?e.internals.z:0,t.parentId||o&&t.selected?t.internals.z:0);return s+l}function D0({sourceNode:e,targetNode:t,width:n,height:r,transform:o}){let i=zl(Tl(e),Tl(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);let s={x:-o[0]/o[2],y:-o[1]/o[2],width:n/o[2],height:r/o[2]};return Mi(s,Al(i))>0}var w2=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||""}-${n}${r||""}`,x2=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),L0=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.("006",st.error006()),t;let r=n.getEdgeId||w2,o;return xd(e)?o={...e}:o={...e,id:r(e)},x2(o,t)?t:(o.sourceHandle===null&&delete o.sourceHandle,o.targetHandle===null&&delete o.targetHandle,t.concat(o))};function Hl({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[o,i,s,l]=Ld({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,s,l]}var g0={[Q.Left]:{x:-1,y:0},[Q.Right]:{x:1,y:0},[Q.Top]:{x:0,y:-1},[Q.Bottom]:{x:0,y:1}},E2=({source:e,sourcePosition:t=Q.Bottom,target:n})=>t===Q.Left||t===Q.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},m0=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)),S2=(e,t,n)=>e.x===t.x&&t.x===n.x&&(t.y-e.y)*(n.y-t.y)>=0||e.y===t.y&&t.y===n.y&&(t.x-e.x)*(n.x-t.x)>=0;function k2({source:e,sourcePosition:t=Q.Bottom,target:n,targetPosition:r=Q.Top,center:o,offset:i,stepPosition:s}){let l=g0[t],a=g0[r],u={x:e.x+l.x*i,y:e.y+l.y*i},c={x:n.x+a.x*i,y:n.y+a.y*i},f=E2({source:u,sourcePosition:t,target:c}),d=f.x!==0?"x":"y",h=f[d],m=[],w,x,g={x:0,y:0},y={x:0,y:0},[,,p,v]=Ld({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[d]*a[d]===-1){d==="x"?(w=o.x??u.x+(c.x-u.x)*s,x=o.y??(u.y+c.y)/2):(w=o.x??(u.x+c.x)/2,x=o.y??u.y+(c.y-u.y)*s);let N=[{x:w,y:u.y},{x:w,y:c.y}],M=[{x:u.x,y:x},{x:c.x,y:x}];l[d]===h?m=d==="x"?N:M:m=d==="x"?M:N}else{let N=[{x:u.x,y:c.y}],M=[{x:c.x,y:u.y}];if(d==="x"?m=l.x===h?M:N:m=l.y===h?N:M,t===r){let E=Math.abs(e[d]-n[d]);if(E<=i){let b=Math.min(i-1,i-E);l[d]===h?g[d]=(u[d]>e[d]?-1:1)*b:y[d]=(c[d]>n[d]?-1:1)*b}}if(t!==r){let E=d==="x"?"y":"x",b=l[d]===a[E],I=u[E]>c[E],P=u[E]<c[E];(l[d]===1&&(!b&&I||b&&P)||l[d]!==1&&(!b&&P||b&&I))&&(m=d==="x"?N:M)}let A={x:u.x+g.x,y:u.y+g.y},R={x:c.x+y.x,y:c.y+y.y},V=Math.max(Math.abs(A.x-m[0].x),Math.abs(R.x-m[0].x)),B=Math.max(Math.abs(A.y-m[0].y),Math.abs(R.y-m[0].y));V>=B?(w=(A.x+R.x)/2,x=m[0].y):(w=m[0].x,x=(A.y+R.y)/2)}let k={x:u.x+g.x,y:u.y+g.y},S={x:c.x+y.x,y:c.y+y.y},_=[];for(let N of[e,k,...m,S,n]){let[M,A]=_.slice(-2);A&&S2(M,A,N)&&_.pop(),_.push(N)}return[_,w,x,p,v]}function _2(e,t,n,r){let o=Math.min(m0(e,t)/2,m0(t,n)/2,r),{x:i,y:s}=t;if(e.x===i&&i===n.x||e.y===s&&s===n.y)return`L${i} ${s}`;if(e.y===s){let u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${i+o*u},${s}Q ${i},${s} ${i},${s+o*c}`}let l=e.x<n.x?1:-1,a=e.y<n.y?-1:1;return`L ${i},${s+o*a}Q ${i},${s} ${i+o*l},${s}`}function Pi({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:r,targetY:o,targetPosition:i=Q.Top,borderRadius:s=5,centerX:l,centerY:a,offset:u=20,stepPosition:c=.5}){let[f,d,h,m,w]=k2({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:l,y:a},offset:u,stepPosition:c}),x=`M${f[0].x} ${f[0].y}`;for(let g=1;g<f.length-1;g++)x+=_2(f[g-1],f[g],f[g+1],s);return x+=`L${f[f.length-1].x} ${f[f.length-1].y}`,[x,d,h,m,w]}function y0(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function z0(e){let{sourceNode:t,targetNode:n}=e;if(!y0(t)||!y0(n))return null;let r=t.internals.handleBounds||v0(t.handles),o=n.internals.handleBounds||v0(n.handles),i=w0(r?.source??[],e.sourceHandle),s=w0(e.connectionMode===Bn.Strict?o?.target??[]:(o?.target??[]).concat(o?.source??[]),e.targetHandle);if(!i||!s)return e.onError?.("008",st.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let l=i?.position||Q.Bottom,a=s?.position||Q.Top,u=Hn(t,i,l),c=Hn(n,s,a);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y,sourcePosition:l,targetPosition:a}}function v0(e){if(!e)return null;let t=[],n=[];for(let r of e)r.width=r.width??1,r.height=r.height??1,r.type==="source"?t.push(r):r.type==="target"&&n.push(r);return{source:t,target:n}}function Hn(e,t,n=Q.Left,r=!1){let o=(t?.x??0)+e.internals.positionAbsolute.x,i=(t?.y??0)+e.internals.positionAbsolute.y,{width:s,height:l}=t??mt(e);if(r)return{x:o+s/2,y:i+l/2};switch(t?.position??n){case Q.Top:return{x:o+s/2,y:i};case Q.Right:return{x:o+s,y:i+l/2};case Q.Bottom:return{x:o+s/2,y:i+l};case Q.Left:return{x:o,y:i+l/2}}}function w0(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Fl(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function A0(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:o}){let i=new Set;return e.reduce((s,l)=>([l.markerStart||r,l.markerEnd||o].forEach(a=>{if(a&&typeof a=="object"){let u=Fl(a,t);i.has(u)||(s.push({id:u,color:a.color||n,...a}),i.add(u))}}),s),[]).sort((s,l)=>s.id.localeCompare(l.id))}var R0=1e3,N2=10,zd={nodeOrigin:[0,0],nodeExtent:co,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},C2={...zd,checkEquality:!0};function Ad(e,t){let n={...e};for(let r in t)t[r]!==void 0&&(n[r]=t[r]);return n}function $0(e,t,n){let r=Ad(zd,n);for(let o of e.values())if(o.parentId)$d(o,e,t,r);else{let i=bi(o,r.nodeOrigin),s=vr(o.extent)?o.extent:r.nodeExtent,l=mr(i,s,mt(o));o.internals.positionAbsolute=l}}function b2(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let o of e.handles){let i={id:o.id,width:o.width??1,height:o.height??1,nodeId:e.id,x:o.x,y:o.y,position:o.position,type:o.type};o.type==="source"?n.push(i):o.type==="target"&&r.push(i)}return{source:n,target:r}}function Rd(e){return e==="manual"}function Vl(e,t,n,r={}){let o=Ad(C2,r),i={i:0},s=new Map(t),l=o?.elevateNodesOnSelect&&!Rd(o.zIndexMode)?R0:0,a=e.length>0,u=!1;t.clear(),n.clear();for(let c of e){let f=s.get(c.id);if(o.checkEquality&&c===f?.internals.userNode)t.set(c.id,f);else{let d=bi(c,o.nodeOrigin),h=vr(c.extent)?c.extent:o.nodeExtent,m=mr(d,h,mt(c));f={...o.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:m,handleBounds:b2(c,f),z:B0(c,l,o.zIndexMode),userNode:c}},t.set(c.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(a=!1),c.parentId&&$d(f,t,n,r,i),u||(u=c.selected??!1)}return{nodesInitialized:a,hasSelectedNodes:u}}function M2(e,t){if(!e.parentId)return;let n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function $d(e,t,n,r,o){let{elevateNodesOnSelect:i,nodeOrigin:s,nodeExtent:l,zIndexMode:a}=Ad(zd,r),u=e.parentId,c=t.get(u);if(!c){console.warn(`Parent node ${u} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}M2(e,n),o&&!c.parentId&&c.internals.rootParentIndex===void 0&&a==="auto"&&(c.internals.rootParentIndex=++o.i,c.internals.z=c.internals.z+o.i*N2),o&&c.internals.rootParentIndex!==void 0&&(o.i=c.internals.rootParentIndex);let f=i&&!Rd(a)?R0:0,{x:d,y:h,z:m}=I2(e,c,s,l,f,a),{positionAbsolute:w}=e.internals,x=d!==w.x||h!==w.y;(x||m!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:d,y:h}:w,z:m}})}function B0(e,t,n){let r=pt(e.zIndex)?e.zIndex:0;return Rd(n)?r:r+(e.selected?t:0)}function I2(e,t,n,r,o,i){let{x:s,y:l}=t.internals.positionAbsolute,a=mt(e),u=bi(e,n),c=vr(e.extent)?mr(u,e.extent,a):u,f=mr({x:s+c.x,y:l+c.y},r,a);e.extent==="parent"&&(f=M0(f,a,t));let d=B0(e,o,i),h=t.internals.z??0;return{x:f.x,y:f.y,z:h>=d?h+1:d}}function jl(e,t,n,r=[0,0]){let o=[],i=new Map;for(let s of e){let l=t.get(s.parentId);if(!l)continue;let a=i.get(s.parentId)?.expandedRect??ho(l),u=_d(a,s.rect);i.set(s.parentId,{expandedRect:u,parent:l})}return i.size>0&&i.forEach(({expandedRect:s,parent:l},a)=>{let u=l.internals.positionAbsolute,c=mt(l),f=l.origin??r,d=s.x<u.x?Math.round(Math.abs(u.x-s.x)):0,h=s.y<u.y?Math.round(Math.abs(u.y-s.y)):0,m=Math.max(c.width,Math.round(s.width)),w=Math.max(c.height,Math.round(s.height)),x=(m-c.width)*f[0],g=(w-c.height)*f[1];(d>0||h>0||x||g)&&(o.push({id:a,type:"position",position:{x:l.position.x-d+x,y:l.position.y-h+g}}),n.get(a)?.forEach(y=>{e.some(p=>p.id===y.id)||o.push({id:y.id,type:"position",position:{x:y.position.x+d,y:y.position.y+h}})})),(c.width<s.width||c.height<s.height||d||h)&&o.push({id:a,type:"dimensions",setAttributes:!0,dimensions:{width:m+(d?f[0]*d-x:0),height:w+(h?f[1]*h-g:0)}})}),o}function H0(e,t,n,r,o,i,s){let l=r?.querySelector(".xyflow__viewport"),a=!1;if(!l)return{changes:[],updatedInternals:a};let u=[],c=window.getComputedStyle(l),{m22:f}=new window.DOMMatrixReadOnly(c.transform),d=[];for(let h of e.values()){let m=t.get(h.id);if(!m)continue;if(m.hidden){t.set(m.id,{...m,internals:{...m.internals,handleBounds:void 0}}),a=!0;continue}let w=Rl(h.nodeElement),x=m.measured.width!==w.width||m.measured.height!==w.height;if(!!(w.width&&w.height&&(x||!m.internals.handleBounds||h.force))){let y=h.nodeElement.getBoundingClientRect(),p=vr(m.extent)?m.extent:i,{positionAbsolute:v}=m.internals;if(m.parentId&&m.extent==="parent"){let S=t.get(m.parentId);S&&(v=M0(v,w,S))}else p&&(v=mr(v,p,w));let k={...m,measured:w,internals:{...m.internals,positionAbsolute:v,handleBounds:{source:h0("source",h.nodeElement,y,f,m.id),target:h0("target",h.nodeElement,y,f,m.id)}}};t.set(m.id,k),m.parentId&&$d(k,t,n,{nodeOrigin:o,zIndexMode:s}),a=!0,x&&(u.push({id:m.id,type:"dimensions",dimensions:w}),m.expandParent&&m.parentId&&d.push({id:m.id,parentId:m.parentId,rect:ho(k,o)}))}}if(d.length>0){let h=jl(d,t,n,o);u.push(...h)}return{changes:u,updatedInternals:a}}async function F0({delta:e,panZoom:t,transform:n,translateExtent:r,width:o,height:i}){if(!t||!e.x&&!e.y)return!1;let s=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[o,i]],r);return!!s&&(s.x!==n[0]||s.y!==n[1]||s.k!==n[2])}function x0(e,t,n,r,o,i){let s=o,l=r.get(s)||new Map;r.set(s,l.set(n,t)),s=`${o}-${e}`;let a=r.get(s)||new Map;if(r.set(s,a.set(n,t)),i){s=`${o}-${e}-${i}`;let u=r.get(s)||new Map;r.set(s,u.set(n,t))}}function Bd(e,t,n){e.clear(),t.clear();for(let r of n){let{source:o,target:i,sourceHandle:s=null,targetHandle:l=null}=r,a={edgeId:r.id,source:o,target:i,sourceHandle:s,targetHandle:l},u=`${o}-${s}--${i}-${l}`,c=`${i}-${l}--${o}-${s}`;x0("source",a,c,e,o,s),x0("target",a,u,e,i,l),t.set(r.id,r)}}function V0(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:V0(n,t):!1}function E0(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function P2(e,t,n,r,o){let i=new Map;for(let[s,l]of e)if((o?l.id===r:l.selected||l.id===r)&&(o||!l.parentId||!V0(l,e))&&(l.draggable||t&&typeof l.draggable>"u")){let u=e.get(s);u&&i.set(s,{id:s,position:u.position||{x:0,y:0},distance:{x:n.x-u.internals.positionAbsolute.x,y:n.y-u.internals.positionAbsolute.y},extent:u.extent,parentId:u.parentId,origin:u.origin,expandParent:u.expandParent,internals:{positionAbsolute:u.internals.positionAbsolute||{x:0,y:0}},measured:{width:u.measured.width??0,height:u.measured.height??0}})}return i}function hd({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let o=[];for(let[s,l]of t){let a=n.get(s)?.internals.userNode;a&&o.push({...a,position:l.position,dragging:r})}if(!e)return[o[0],o];let i=n.get(e)?.internals.userNode;return[i?{...i,position:t.get(e)?.position||i.position,dragging:r}:o[0],o]}function O2({dragItems:e,snapGrid:t,x:n,y:r}){let o=e.values().next().value;if(!o)return null;let i={x:n-o.distance.x,y:r-o.distance.y},s=po(i,t);return{x:s.x-i.x,y:s.y-i.y}}function j0({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:o}){let i={x:null,y:null},s=0,l=new Map,a=!1,u={x:0,y:0},c=null,f=!1,d=null,h=!1,m=!1,w=null;function x({noDragClassName:y,handleSelector:p,domNode:v,isSelectable:k,nodeId:S,nodeClickDistance:_=0}){d=Fe(v);function N({x:V,y:B}){let{nodeLookup:E,nodeExtent:b,snapGrid:I,snapToGrid:P,nodeOrigin:L,onNodeDrag:z,onSelectionDrag:F,onError:H,updateNodePositions:Y}=t();i={x:V,y:B};let ne=!1,U=l.size>1,te=U&&b?md(fo(l)):null,re=U&&P?O2({dragItems:l,snapGrid:I,x:V,y:B}):null;for(let[ee,$]of l){if(!E.has(ee))continue;let G={x:V-$.distance.x,y:B-$.distance.y};P&&(G=re?{x:Math.round(G.x+re.x),y:Math.round(G.y+re.y)}:po(G,I));let O=null;if(U&&b&&!$.extent&&te){let{positionAbsolute:Z}=$.internals,J=Z.x-te.x+b[0][0],ie=Z.x+$.measured.width-te.x2+b[1][0],se=Z.y-te.y+b[0][1],Te=Z.y+$.measured.height-te.y2+b[1][1];O=[[J,se],[ie,Te]]}let{position:W,positionAbsolute:q}=kd({nodeId:ee,nextPosition:G,nodeLookup:E,nodeExtent:O||b,nodeOrigin:L,onError:H});ne=ne||$.position.x!==W.x||$.position.y!==W.y,$.position=W,$.internals.positionAbsolute=q}if(m=m||ne,!!ne&&(Y(l,!0),w&&(r||z||!S&&F))){let[ee,$]=hd({nodeId:S,dragItems:l,nodeLookup:E});r?.(w,l,ee,$),z?.(w,ee,$),S||F?.(w,$)}}async function M(){if(!c)return;let{transform:V,panBy:B,autoPanSpeed:E,autoPanOnNodeDrag:b}=t();if(!b){a=!1,cancelAnimationFrame(s);return}let[I,P]=Ll(u,c,E);(I!==0||P!==0)&&(i.x=(i.x??0)-I/V[2],i.y=(i.y??0)-P/V[2],await B({x:I,y:P})&&N(i)),s=requestAnimationFrame(M)}function A(V){let{nodeLookup:B,multiSelectionActive:E,nodesDraggable:b,transform:I,snapGrid:P,snapToGrid:L,selectNodesOnDrag:z,onNodeDragStart:F,onSelectionDragStart:H,unselectNodesAndEdges:Y}=t();f=!0;let ne=!!S&&!E&&!B.get(S)?.selected;(!z||!k)&&!E&&S&&(B.get(S)?.selected||Y()),k&&z&&S&&e?.(S);let U=Ci(V.sourceEvent,{transform:I,snapGrid:P,snapToGrid:L,containerBounds:c});if(i=U,l=P2(B,b,U,S,ne),l.size>0&&(n||F||!S&&H)){let[te,re]=hd({nodeId:S,dragItems:l,nodeLookup:B});n?.(V.sourceEvent,l,te,re),F?.(V.sourceEvent,te,re),S||H?.(V.sourceEvent,re)}}let R=Bc().clickDistance(_).on("start",V=>{let{domNode:B,nodeDragThreshold:E,transform:b,snapGrid:I,snapToGrid:P}=t();c=B?.getBoundingClientRect()||null,h=!1,m=!1,w=V.sourceEvent,E===0&&A(V),i=Ci(V.sourceEvent,{transform:b,snapGrid:I,snapToGrid:P,containerBounds:c}),u=gt(V.sourceEvent,c)}).on("drag",V=>{let{autoPanOnNodeDrag:B,transform:E,snapGrid:b,snapToGrid:I,nodeDragThreshold:P,nodeLookup:L}=t(),z=Ci(V.sourceEvent,{transform:E,snapGrid:b,snapToGrid:I,containerBounds:c});if(w=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||S&&!L.has(S))&&(h=!0),!h){if(!a&&B&&f&&(a=!0,M()),!f){let F=gt(V.sourceEvent,c),H=F.x-u.x,Y=F.y-u.y;Math.sqrt(H*H+Y*Y)>P&&A(V)}(i.x!==z.xSnapped||i.y!==z.ySnapped)&&l&&f&&(u=gt(V.sourceEvent,c),N(z))}}).on("end",V=>{if(!f||h){h&&l.size>0&&t().updateNodePositions(l,!1);return}if(a=!1,f=!1,cancelAnimationFrame(s),l.size>0){let{nodeLookup:B,updateNodePositions:E,onNodeDragStop:b,onSelectionDragStop:I}=t();if(m&&(E(l,!1),m=!1),o||b||!S&&I){let[P,L]=hd({nodeId:S,dragItems:l,nodeLookup:B,dragging:!1});o?.(V.sourceEvent,l,P,L),b?.(V.sourceEvent,P,L),S||I?.(V.sourceEvent,L)}}}).filter(V=>{let B=V.target;return!V.button&&(!y||!E0(B,`.${y}`,v))&&(!p||E0(B,p,v))});d.call(R)}function g(){d?.on(".drag",null)}return{update:x,destroy:g}}function T2(e,t,n){let r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let i of t.values())Mi(o,ho(i))>0&&r.push(i);return r}var D2=250;function L2(e,t,n,r){let o=[],i=1/0,s=T2(e,n,t+D2);for(let l of s){let a=[...l.internals.handleBounds?.source??[],...l.internals.handleBounds?.target??[]];for(let u of a){if(r.nodeId===u.nodeId&&r.type===u.type&&r.id===u.id)continue;let{x:c,y:f}=Hn(l,u,u.position,!0),d=Math.sqrt(Math.pow(c-e.x,2)+Math.pow(f-e.y,2));d>t||(d<i?(o=[{...u,x:c,y:f}],i=d):d===i&&o.push({...u,x:c,y:f}))}}if(!o.length)return null;if(o.length>1){let l=r.type==="source"?"target":"source";return o.find(a=>a.type===l)??o[0]}return o[0]}function W0(e,t,n,r,o,i=!1){let s=r.get(e);if(!s)return null;let l=o==="strict"?s.internals.handleBounds?.[t]:[...s.internals.handleBounds?.source??[],...s.internals.handleBounds?.target??[]],a=(n?l?.find(u=>u.id===n):l?.[0])??null;return a&&i?{...a,...Hn(s,a,a.position,!0)}:a}function U0(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function z2(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var Y0=()=>!0;function A2(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:o,edgeUpdaterType:i,isTarget:s,domNode:l,nodeLookup:a,lib:u,autoPanOnConnect:c,flowId:f,panBy:d,cancelConnection:h,onConnectStart:m,onConnect:w,onConnectEnd:x,isValidConnection:g=Y0,onReconnectEnd:y,updateConnection:p,getTransform:v,getFromHandle:k,autoPanSpeed:S,dragThreshold:_=1,handleDomNode:N}){let M=Od(e.target),A=0,R,{x:V,y:B}=gt(e),E=U0(i,N),b=l?.getBoundingClientRect(),I=!1;if(!b||!E)return;let P=W0(o,E,r,a,t);if(!P)return;let L=gt(e,b),z=!1,F=null,H=!1,Y=null;function ne(){if(!c||!b)return;let[W,q]=Ll(L,b,S);d({x:W,y:q}),A=requestAnimationFrame(ne)}let U={...P,nodeId:o,type:E,position:P.position},te=a.get(o),ee={inProgress:!0,isValid:null,from:Hn(te,U,Q.Left,!0),fromHandle:U,fromPosition:U.position,fromNode:te,to:L,toHandle:null,toPosition:d0[U.position],toNode:null,pointer:L};function $(){I=!0,p(ee),m?.(e,{nodeId:o,handleId:r,handleType:E})}_===0&&$();function G(W){if(!I){let{x:Te,y:Ut}=gt(W),Ot=Te-V,Tt=Ut-B;if(!(Ot*Ot+Tt*Tt>_*_))return;$()}if(!k()||!U){O(W);return}let q=v();L=gt(W,b),R=L2(go(L,q,!1,[1,1]),n,a,U),z||(ne(),z=!0);let Z=q0(W,{handle:R,connectionMode:t,fromNodeId:o,fromHandleId:r,fromType:s?"target":"source",isValidConnection:g,doc:M,lib:u,flowId:f,nodeLookup:a});Y=Z.handleDomNode,F=Z.connection,H=z2(!!R,Z.isValid);let J=a.get(o),ie=J?Hn(J,U,Q.Left,!0):ee.from,se={...ee,from:ie,isValid:H,to:Z.toHandle&&H?yr({x:Z.toHandle.x,y:Z.toHandle.y},q):L,toHandle:Z.toHandle,toPosition:H&&Z.toHandle?Z.toHandle.position:d0[U.position],toNode:Z.toHandle?a.get(Z.toHandle.nodeId):null,pointer:L};p(se),ee=se}function O(W){if(!("touches"in W&&W.touches.length>0)){if(I){(R||Y)&&F&&H&&w?.(F);let{inProgress:q,...Z}=ee,J={...Z,toPosition:ee.toHandle?ee.toPosition:null};x?.(W,J),i&&y?.(W,J)}h(),cancelAnimationFrame(A),z=!1,H=!1,F=null,Y=null,M.removeEventListener("mousemove",G),M.removeEventListener("mouseup",O),M.removeEventListener("touchmove",G),M.removeEventListener("touchend",O)}}M.addEventListener("mousemove",G),M.addEventListener("mouseup",O),M.addEventListener("touchmove",G),M.addEventListener("touchend",O)}function q0(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:i,doc:s,lib:l,flowId:a,isValidConnection:u=Y0,nodeLookup:c}){let f=i==="target",d=t?s.querySelector(`.${l}-flow__handle[data-id="${a}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:h,y:m}=gt(e),w=s.elementFromPoint(h,m),x=w?.classList.contains(`${l}-flow__handle`)?w:d,g={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){let y=U0(void 0,x),p=x.getAttribute("data-nodeid"),v=x.getAttribute("data-handleid"),k=x.classList.contains("connectable"),S=x.classList.contains("connectableend");if(!p||!y)return g;let _={source:f?p:r,sourceHandle:f?v:o,target:f?r:p,targetHandle:f?o:v};g.connection=_;let M=k&&S&&(n===Bn.Strict?f&&y==="source"||!f&&y==="target":p!==r||v!==o);g.isValid=M&&u(_),g.toHandle=W0(p,y,v,c,n,!0)}return g}var Wl={onPointerDown:A2,isValid:q0};function X0({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let o=Fe(e);function i({translateExtent:l,width:a,height:u,zoomStep:c=1,pannable:f=!0,zoomable:d=!0,inversePan:h=!1}){let m=p=>{if(p.sourceEvent.type!=="wheel"||!t)return;let v=n(),k=p.sourceEvent.ctrlKey&&mo()?10:1,S=-p.sourceEvent.deltaY*(p.sourceEvent.deltaMode===1?.05:p.sourceEvent.deltaMode?1:.002)*c,_=v[2]*Math.pow(2,S*k);t.scaleTo(_)},w=[0,0],x=p=>{(p.sourceEvent.type==="mousedown"||p.sourceEvent.type==="touchstart")&&(w=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY])},g=p=>{let v=n();if(p.sourceEvent.type!=="mousemove"&&p.sourceEvent.type!=="touchmove"||!t)return;let k=[p.sourceEvent.clientX??p.sourceEvent.touches[0].clientX,p.sourceEvent.clientY??p.sourceEvent.touches[0].clientY],S=[k[0]-w[0],k[1]-w[1]];w=k;let _=r()*Math.max(v[2],Math.log(v[2]))*(h?-1:1),N={x:v[0]-S[0]*_,y:v[1]-S[1]*_},M=[[0,0],[a,u]];t.setViewportConstrained({x:N.x,y:N.y,zoom:v[2]},M,l)},y=fd().on("start",x).on("zoom",f?g:null).on("zoom.wheel",d?m:null);o.call(y,{})}function s(){o.on("zoom",null)}return{update:i,destroy:s,pointer:Qe}}var Ul=e=>({x:e.x,y:e.y,zoom:e.k}),pd=({x:e,y:t,zoom:n})=>Ni.translate(e,t).scale(n),$n=(e,t)=>e.target.closest(`.${t}`),G0=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),R2=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,gd=(e,t=0,n=R2,r=()=>{})=>{let o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e},Z0=e=>{let t=e.ctrlKey&&mo()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function $2({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:o,panOnScrollSpeed:i,zoomOnPinch:s,onPanZoomStart:l,onPanZoom:a,onPanZoomEnd:u}){return c=>{if($n(c,t))return c.ctrlKey&&c.preventDefault(),!1;c.preventDefault(),c.stopImmediatePropagation();let f=n.property("__zoom").k||1;if(c.ctrlKey&&s){let x=Qe(c),g=Z0(c),y=f*Math.pow(2,g);r.scaleTo(n,y,x,c);return}let d=c.deltaMode===1?20:1,h=o===dn.Vertical?0:c.deltaX*d,m=o===dn.Horizontal?0:c.deltaY*d;!mo()&&c.shiftKey&&o!==dn.Vertical&&(h=c.deltaY*d,m=0),r.translateBy(n,-(h/f)*i,-(m/f)*i,{internal:!0});let w=Ul(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?a?.(c,w):(e.isPanScrolling=!0,l?.(c,w)),e.panScrollTimeout=setTimeout(()=>{u?.(c,w),e.isPanScrolling=!1},150)}}function B2({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,o){let i=r.type==="wheel",s=!t&&i&&!r.ctrlKey,l=$n(r,e);if(r.ctrlKey&&i&&l&&r.preventDefault(),s||l)return null;r.preventDefault(),n.call(this,r,o)}}function H2({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let o=Ul(r.transform);e.mouseButton=r.sourceEvent?.button||0,e.isZoomingOrPanning=!0,e.prevViewport=o,r.sourceEvent?.type==="mousedown"&&t(!0),n&&n?.(r.sourceEvent,o)}}function F2({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:r,onPanZoom:o}){return i=>{e.usedRightMouseButton=!!(n&&G0(t,e.mouseButton??0)),i.sourceEvent?.sync||r([i.transform.x,i.transform.y,i.transform.k]),o&&!i.sourceEvent?.internal&&o?.(i.sourceEvent,Ul(i.transform))}}function V2({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:o,onPaneContextMenu:i}){return s=>{if(!s.sourceEvent?.internal&&(e.isZoomingOrPanning=!1,i&&G0(t,e.mouseButton??0)&&!e.usedRightMouseButton&&s.sourceEvent&&i(s.sourceEvent),e.usedRightMouseButton=!1,r(!1),o)){let l=Ul(s.transform);e.prevViewport=l,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{o?.(s.sourceEvent,l)},n?150:0)}}}function j2({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:o,panOnScroll:i,zoomOnDoubleClick:s,userSelectionActive:l,noWheelClassName:a,noPanClassName:u,lib:c,connectionInProgress:f}){return d=>{let h=t||n,m=r&&d.ctrlKey,w=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&($n(d,`${c}-flow__node`)||$n(d,`${c}-flow__edge`)||$n(d,`${c}-flow__selection`)||$n(d,`${c}-flow__nodesselection`)))return!0;if(!o&&!h&&!i&&!s&&!r||l||f&&!w||$n(d,a)&&w||$n(d,u)&&(!w||i&&w&&!t)||!r&&d.ctrlKey&&w)return!1;if(!r&&d.type==="touchstart"&&d.touches?.length>1)return d.preventDefault(),!1;if(!h&&!i&&!m&&w||!o&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(o)&&!o.includes(d.button)&&d.type==="mousedown")return!1;let x=Array.isArray(o)&&o.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||w||e)&&x}}function Q0({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:o,onPanZoom:i,onPanZoomStart:s,onPanZoomEnd:l,onDraggingChange:a}){let u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},c=e.getBoundingClientRect(),f=[[0,0],[c.width,c.height]],d=typeof ResizeObserver<"u"?new ResizeObserver(B=>{let E=B[0];E?.contentRect&&(f=[[0,0],[E.contentRect.width,E.contentRect.height]])}):null;d?.observe(e);let h=fd().extent(()=>f).scaleExtent([t,n]).translateExtent(r),m=Fe(e).call(h);v({x:o.x,y:o.y,zoom:uo(o.zoom,t,n)},[[0,0],[c.width,c.height]],r);let w=m.on("wheel.zoom"),x=m.on("dblclick.zoom");h.wheelDelta(Z0);async function g(B,E){return m?new Promise(b=>{h?.interpolate(E?.interpolate==="linear"?oo:io).transform(gd(m,E?.duration,E?.ease,()=>b(!0)),B)}):!1}function y({noWheelClassName:B,noPanClassName:E,onPaneContextMenu:b,userSelectionActive:I,panOnScroll:P,panOnDrag:L,panOnScrollMode:z,panOnScrollSpeed:F,preventScrolling:H,zoomOnPinch:Y,zoomOnScroll:ne,zoomOnDoubleClick:U,panActivationKeyPressed:te=!1,zoomActivationKeyPressed:re,lib:ee,onTransformChange:$,connectionInProgress:G,paneClickDistance:O,selectionOnDrag:W}){I&&!u.isZoomingOrPanning&&h.on("zoom",null);let q=P&&!re&&!I;h.clickDistance(W?1/0:!pt(O)||O<0?0:O);let Z=q?$2({zoomPanValues:u,noWheelClassName:B,d3Selection:m,d3Zoom:h,panOnScrollMode:z,panOnScrollSpeed:F,zoomOnPinch:Y,onPanZoomStart:s,onPanZoom:i,onPanZoomEnd:l}):B2({noWheelClassName:B,preventScrolling:H,d3ZoomHandler:w});m.on("wheel.zoom",Z,{passive:!1});let J=H2({zoomPanValues:u,onDraggingChange:a,onPanZoomStart:s});h.on("start",J);let ie=F2({zoomPanValues:u,panOnDrag:L,onPaneContextMenu:!!b,onPanZoom:i,onTransformChange:$});h.on("zoom",ie);let se=V2({zoomPanValues:u,panOnDrag:L,panOnScroll:P,onPaneContextMenu:b,onPanZoomEnd:l,onDraggingChange:a});h.on("end",se);let Te=j2({panActivationKeyPressed:te,zoomActivationKeyPressed:re,panOnDrag:L,zoomOnScroll:ne,panOnScroll:P,zoomOnDoubleClick:U,zoomOnPinch:Y,userSelectionActive:I,noPanClassName:E,noWheelClassName:B,lib:ee,connectionInProgress:G});h.filter(Te),U?m.on("dblclick.zoom",x):m.on("dblclick.zoom",null)}function p(){h.on("zoom",null),d?.disconnect()}async function v(B,E,b){let I=pd(B),P=h?.constrain()(I,E,b);return P&&await g(P),P}async function k(B,E){let b=pd(B);return await g(b,E),b}function S(B){if(m){let E=pd(B),b=m.property("__zoom");(b.k!==B.zoom||b.x!==B.x||b.y!==B.y)&&h?.transform(m,E,null,{sync:!0})}}function _(){let B=m?dd(m.node()):{x:0,y:0,k:1};return{x:B.x,y:B.y,zoom:B.k}}async function N(B,E){return m?new Promise(b=>{h?.interpolate(E?.interpolate==="linear"?oo:io).scaleTo(gd(m,E?.duration,E?.ease,()=>b(!0)),B)}):!1}async function M(B,E){return m?new Promise(b=>{h?.interpolate(E?.interpolate==="linear"?oo:io).scaleBy(gd(m,E?.duration,E?.ease,()=>b(!0)),B)}):!1}function A(B){h?.scaleExtent(B)}function R(B){h?.translateExtent(B)}function V(B){let E=!pt(B)||B<0?0:B;h?.clickDistance(E)}return{update:y,destroy:p,setViewport:k,setViewportConstrained:v,getViewport:_,scaleTo:N,scaleBy:M,setScaleExtent:A,setTranslateExtent:R,syncViewport:S,setClickDistance:V}}var Fn;(function(e){e.Line="line",e.Handle="handle"})(Fn||(Fn={}));function W2({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:o,affectsY:i}){let s=e-t,l=n-r,a=[s>0?1:s<0?-1:0,l>0?1:l<0?-1:0];return s&&o&&(a[0]=a[0]*-1),l&&i&&(a[1]=a[1]*-1),a}function S0(e){let t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),r=e.includes("left"),o=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:r,affectsY:o}}function An(e,t){return Math.max(0,t-e)}function Rn(e,t){return Math.max(0,e-t)}function Ol(e,t,n){return Math.max(0,t-e,e-n)}function k0(e,t){return e?!t:t}function U2(e,t,n,r,o,i,s,l){let{affectsX:a,affectsY:u}=t,{isHorizontal:c,isVertical:f}=t,d=c&&f,{xSnapped:h,ySnapped:m}=n,{minWidth:w,maxWidth:x,minHeight:g,maxHeight:y}=r,{x:p,y:v,width:k,height:S,aspectRatio:_}=e,N=Math.floor(c?h-e.pointerX:0),M=Math.floor(f?m-e.pointerY:0),A=k+(a?-N:N),R=S+(u?-M:M),V=-i[0]*k,B=-i[1]*S,E=Ol(A,w,x),b=Ol(R,g,y);if(s){let L=0,z=0;a&&N<0?L=An(p+N+V,s[0][0]):!a&&N>0&&(L=Rn(p+A+V,s[1][0])),u&&M<0?z=An(v+M+B,s[0][1]):!u&&M>0&&(z=Rn(v+R+B,s[1][1])),E=Math.max(E,L),b=Math.max(b,z)}if(l){let L=0,z=0;a&&N>0?L=Rn(p+N,l[0][0]):!a&&N<0&&(L=An(p+A,l[1][0])),u&&M>0?z=Rn(v+M,l[0][1]):!u&&M<0&&(z=An(v+R,l[1][1])),E=Math.max(E,L),b=Math.max(b,z)}if(o){if(c){let L=Ol(A/_,g,y)*_;if(E=Math.max(E,L),s){let z=0;!a&&!u||a&&!u&&d?z=Rn(v+B+A/_,s[1][1])*_:z=An(v+B+(a?N:-N)/_,s[0][1])*_,E=Math.max(E,z)}if(l){let z=0;!a&&!u||a&&!u&&d?z=An(v+A/_,l[1][1])*_:z=Rn(v+(a?N:-N)/_,l[0][1])*_,E=Math.max(E,z)}}if(f){let L=Ol(R*_,w,x)/_;if(b=Math.max(b,L),s){let z=0;!a&&!u||u&&!a&&d?z=Rn(p+R*_+V,s[1][0])/_:z=An(p+(u?M:-M)*_+V,s[0][0])/_,b=Math.max(b,z)}if(l){let z=0;!a&&!u||u&&!a&&d?z=An(p+R*_,l[1][0])/_:z=Rn(p+(u?M:-M)*_,l[0][0])/_,b=Math.max(b,z)}}}M=M+(M<0?b:-b),N=N+(N<0?E:-E),o&&(d?A>R*_?M=(k0(a,u)?-N:N)/_:N=(k0(a,u)?-M:M)*_:c?(M=N/_,u=a):(N=M*_,a=u));let I=a?p+N:p,P=u?v+M:v;return{width:k+(a?-N:N),height:S+(u?-M:M),x:i[0]*N*(a?-1:1)+I,y:i[1]*M*(u?-1:1)+P}}var K0={width:0,height:0,x:0,y:0},Y2={...K0,pointerX:0,pointerY:0,aspectRatio:1};function q2(e,t,n){let r=t.position.x+e.position.x,o=t.position.y+e.position.y,i=e.measured.width??0,s=e.measured.height??0,l=n[0]*i,a=n[1]*s;return[[r-l,o-a],[r+i-l,o+s-a]]}function J0({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:o}){let i=Fe(e),s={controlDirection:S0("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:c,keepAspectRatio:f,resizeDirection:d,onResizeStart:h,onResize:m,onResizeEnd:w,shouldResize:x}){let g={...K0},y={...Y2};s={boundaries:c,resizeDirection:d,keepAspectRatio:f,controlDirection:S0(u)};let p,v=null,k=[],S,_,N,M=Bc().on("start",A=>{let{nodeLookup:R,transform:V,snapGrid:B,snapToGrid:E,nodeOrigin:b,paneDomNode:I}=n();if(p=R.get(t),!p)return;v=I?.getBoundingClientRect()??null;let{xSnapped:P,ySnapped:L}=Ci(A.sourceEvent,{transform:V,snapGrid:B,snapToGrid:E,containerBounds:v});g={width:p.measured.width??0,height:p.measured.height??0,x:p.position.x??0,y:p.position.y??0},y={...g,pointerX:P,pointerY:L,aspectRatio:g.width/g.height},S=void 0,_=vr(p.extent)?p.extent:void 0,p.parentId&&(p.extent==="parent"||p.expandParent)&&(S=R.get(p.parentId)),S&&p.extent==="parent"&&(_=[[0,0],[S.measured.width,S.measured.height]]),k=[],N=void 0;for(let[z,F]of R)if(F.parentId===t&&(k.push({id:z,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){let H=q2(F,p,F.origin??b);N?N=[[Math.min(H[0][0],N[0][0]),Math.min(H[0][1],N[0][1])],[Math.max(H[1][0],N[1][0]),Math.max(H[1][1],N[1][1])]]:N=H}h?.(A,{...g})}).on("drag",A=>{let{transform:R,snapGrid:V,snapToGrid:B,nodeOrigin:E}=n(),b=Ci(A.sourceEvent,{transform:R,snapGrid:V,snapToGrid:B,containerBounds:v}),I=[];if(!p)return;let{x:P,y:L,width:z,height:F}=g,H={},Y=p.origin??E,{width:ne,height:U,x:te,y:re}=U2(y,s.controlDirection,b,s.boundaries,s.keepAspectRatio,Y,_,N),ee=ne!==z,$=U!==F,G=te!==P&&ee,O=re!==L&&$;if(!G&&!O&&!ee&&!$)return;let W={prevValues:{...g},startX:y.x,startY:y.y,childNodes:k.map(ie=>({...ie,position:{...ie.position}}))};if((G||O||Y[0]===1||Y[1]===1)&&(H.x=G?te:g.x,H.y=O?re:g.y,g.x=H.x,g.y=H.y,k.length>0)){let ie=te-P,se=re-L;for(let Te of k)Te.position={x:Te.position.x-ie+Y[0]*(ne-z),y:Te.position.y-se+Y[1]*(U-F)},I.push(Te)}if((ee||$)&&(H.width=ee&&(!s.resizeDirection||s.resizeDirection==="horizontal")?ne:g.width,H.height=$&&(!s.resizeDirection||s.resizeDirection==="vertical")?U:g.height,g.width=H.width,g.height=H.height),S&&p.expandParent){let ie=Y[0]*(H.width??0);H.x&&H.x<ie&&(g.x=ie,y.x=y.x-(H.x-ie));let se=Y[1]*(H.height??0);H.y&&H.y<se&&(g.y=se,y.y=y.y-(H.y-se))}let q=W2({width:g.width,prevWidth:z,height:g.height,prevHeight:F,affectsX:s.controlDirection.affectsX,affectsY:s.controlDirection.affectsY}),Z={...g,direction:q};if(x?.(A,Z)===!1){g=W.prevValues,y.x=W.startX,y.y=W.startY,k.forEach((ie,se)=>{ie.position=W.childNodes[se].position});return}m?.(A,Z),r(H,I)}).on("end",A=>{w?.(A,{...g}),o?.({...g})});i.call(M)}function a(){i.on(".drag",null)}return{update:l,destroy:a}}var fy=Dt(hn(),1),hy=Dt(ly(),1);var uy={},ay=e=>{let t,n=new Set,r=(c,f)=>{let d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){let h=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,h))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(uy.env?uy.env.MODE:void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,o,a);return a},cy=e=>e?ay(e):ay;var{useDebugValue:db}=fy.default,{useSyncExternalStoreWithSelector:fb}=hy.default,hb=e=>e;function Fd(e,t=hb,n){let r=fb(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return db(r),r}var dy=(e,t)=>{let n=cy(e),r=(o,i=t)=>Fd(n,o,i);return Object.assign(r,n),r},py=(e,t)=>e?dy(e,t):dy;function ye(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[r,o]of e)if(!Object.is(o,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var pb=Dt(Mc()),Zl=(0,T.createContext)(null),gb=Zl.Provider,Fy=st.error001("react");function ue(e,t){let n=(0,T.useContext)(Zl);if(n===null)throw new Error(Fy);return Fd(n,e,t)}function ge(){let e=(0,T.useContext)(Zl);if(e===null)throw new Error(Fy);return(0,T.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}var gy={display:"none"},mb={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Vy="react-flow__node-desc",jy="react-flow__edge-desc",yb="react-flow__aria-live",vb=e=>e.ariaLiveMessage,wb=e=>e.ariaLabelConfig;function xb({rfId:e}){let t=ue(vb);return(0,D.jsx)("div",{id:`${yb}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:mb,children:t})}function Eb({rfId:e,disableKeyboardA11y:t}){let n=ue(wb);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("div",{id:`${Vy}-${e}`,style:gy,children:t?n["node.a11yDescription.default"]:n["node.a11yDescription.keyboardDisabled"]}),(0,D.jsx)("div",{id:`${jy}-${e}`,style:gy,children:n["edge.a11yDescription.default"]}),!t&&(0,D.jsx)(xb,{rfId:e})]})}var Ql=(0,T.forwardRef)(({position:e="top-left",children:t,className:n,style:r,...o},i)=>{let s=`${e}`.split("-");return(0,D.jsx)("div",{className:Se(["react-flow__panel",n,...s]),style:r,ref:i,...o,children:t})});Ql.displayName="Panel";var my="https://reactflow.dev?utm_source=attribution";function Sb({proOptions:e,position:t="bottom-right"}){return(0,T.useEffect)(()=>{},[]),e?.hideAttribution?null:(0,D.jsx)(Ql,{position:t,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${my}`,children:(0,D.jsx)("a",{href:my,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var kb=e=>{let t=[],n=[];for(let[,r]of e.nodeLookup)r.selected&&t.push(r.internals.userNode);for(let[,r]of e.edgeLookup)r.selected&&n.push(r);return{selectedNodes:t,selectedEdges:n}},ql=e=>e.id;function _b(e,t){return ye(e.selectedNodes.map(ql),t.selectedNodes.map(ql))&&ye(e.selectedEdges.map(ql),t.selectedEdges.map(ql))}function Nb({onSelectionChange:e}){let t=ge(),{selectedNodes:n,selectedEdges:r}=ue(kb,_b);return(0,T.useEffect)(()=>{let o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChangeHandlers.forEach(i=>i(o))},[n,r,e]),null}var Cb=e=>!!e.onSelectionChangeHandlers;function bb({onSelectionChange:e}){let t=ue(Cb);return e||t?(0,D.jsx)(Nb,{onSelectionChange:e}):null}var Wy=[0,0],Mb={x:0,y:0,zoom:1},Ib=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],yy=[...Ib,"rfId"],Pb=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges}),vy={translateExtent:co,nodeOrigin:Wy,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function Ob(e){let{setNodes:t,setEdges:n,setMinZoom:r,setMaxZoom:o,setTranslateExtent:i,setNodeExtent:s,reset:l,setDefaultNodesAndEdges:a}=ue(Pb,ye),u=ge();(0,T.useEffect)(()=>(a(e.defaultNodes,e.defaultEdges),()=>{c.current=vy,l()}),[]);let c=(0,T.useRef)(vy);return(0,T.useEffect)(()=>{for(let f of yy){let d=e[f],h=c.current[f];d!==h&&(typeof e[f]>"u"||(f==="nodes"?t(d):f==="edges"?n(d):f==="minZoom"?r(d):f==="maxZoom"?o(d):f==="translateExtent"?i(d):f==="nodeExtent"?s(d):f==="ariaLabelConfig"?u.setState({ariaLabelConfig:O0(d)}):f==="fitView"?u.setState({fitViewQueued:d}):f==="fitViewOptions"?u.setState({fitViewOptions:d}):u.setState({[f]:d})))}c.current=e},yy.map(f=>e[f])),null}function wy(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function Tb(e){let[t,n]=(0,T.useState)(e==="system"?null:e);return(0,T.useEffect)(()=>{if(e!=="system"){n(e);return}let r=wy(),o=()=>n(r?.matches?"dark":"light");return o(),r?.addEventListener("change",o),()=>{r?.removeEventListener("change",o)}},[e]),t!==null?t:wy()?.matches?"dark":"light"}var xy=typeof document<"u"?document:null;function Oi(e=null,t={target:xy,actInsideInputWithModifier:!0}){let[n,r]=(0,T.useState)(!1),o=(0,T.useRef)(!1),i=(0,T.useRef)(new Set([])),[s,l]=(0,T.useMemo)(()=>{if(e!==null){let u=(Array.isArray(e)?e:[e]).filter(f=>typeof f=="string").map(f=>f.replace(/\+/g,`
|
|
1835
|
+
`).replace(`
|
|
1836
|
+
|
|
1837
|
+
`,`
|
|
1838
|
+
+`).split(`
|
|
1839
|
+
`)),c=u.reduce((f,d)=>f.concat(...d),[]);return[u,c]}return[[],[]]},[e]);return(0,T.useEffect)(()=>{let a=t?.target??xy,u=t?.actInsideInputWithModifier??!0;if(e!==null){let c=h=>{if(o.current=h.ctrlKey||h.metaKey||h.shiftKey||h.altKey,(!o.current||o.current&&!u)&&Td(h))return!1;let w=Sy(h.code,l);if(i.current.add(h[w]),Ey(s,i.current,!1)){let x=h.composedPath?.()?.[0]||h.target,g=x?.nodeName==="BUTTON"||x?.nodeName==="A";t.preventDefault!==!1&&(o.current||!g)&&h.preventDefault(),r(!0)}},f=h=>{let m=Sy(h.code,l);Ey(s,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(h[m]),h.key==="Meta"&&i.current.clear(),o.current=!1},d=()=>{i.current.clear(),r(!1)};return a?.addEventListener("keydown",c),a?.addEventListener("keyup",f),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{a?.removeEventListener("keydown",c),a?.removeEventListener("keyup",f),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}},[e,r]),n}function Ey(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function Sy(e,t){return t.includes(e)?"code":"key"}var Db=()=>{let e=ge();return(0,T.useMemo)(()=>({zoomIn:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):!1},zoomOut:async t=>{let{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):!1},zoomTo:async(t,n)=>{let{panZoom:r}=e.getState();return r?r.scaleTo(t,n):!1},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{let{transform:[r,o,i],panZoom:s}=e.getState();return s?(await s.setViewport({x:t.x??r,y:t.y??o,zoom:t.zoom??i},n),!0):!1},getViewport:()=>{let[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},setCenter:async(t,n,r)=>e.getState().setCenter(t,n,r),fitBounds:async(t,n)=>{let{width:r,height:o,minZoom:i,maxZoom:s,panZoom:l}=e.getState(),a=Ii(t,r,o,i,s,n?.padding??.1);return l?(await l.setViewport(a,{duration:n?.duration,ease:n?.ease,interpolate:n?.interpolate}),!0):!1},screenToFlowPosition:(t,n={})=>{let{transform:r,snapGrid:o,snapToGrid:i,domNode:s}=e.getState();if(!s)return t;let{x:l,y:a}=s.getBoundingClientRect(),u={x:t.x-l,y:t.y-a},c=n.snapGrid??o,f=n.snapToGrid??i;return go(u,r,f,c)},flowToScreenPosition:t=>{let{transform:n,domNode:r}=e.getState();if(!r)return t;let{x:o,y:i}=r.getBoundingClientRect(),s=yr(t,n);return{x:s.x+o,y:s.y+i}}}),[])};function Uy(e,t){let n=[],r=new Map,o=[];for(let i of e)if(i.type==="add"){o.push(i);continue}else if(i.type==="remove"||i.type==="replace")r.set(i.id,[i]);else{let s=r.get(i.id);s?s.push(i):r.set(i.id,[i])}for(let i of t){let s=r.get(i.id);if(!s){n.push(i);continue}if(s[0].type==="remove")continue;if(s[0].type==="replace"){n.push({...s[0].item});continue}let l={...i};for(let a of s)Lb(a,l);n.push(l)}return o.length&&o.forEach(i=>{i.index!==void 0?n.splice(i.index,0,{...i.item}):n.push({...i.item})}),n}function Lb(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function Yy(e,t){return Uy(e,t)}function qy(e,t){return Uy(e,t)}function wr(e,t){return{id:e,type:"select",selected:t}}function vo(e,t=new Set){let n=[];for(let[r,o]of e){let i=t.has(r);!(o.selected===void 0&&!i)&&o.selected!==i&&n.push(wr(o.id,i))}return n}function ky({items:e=[],lookup:t}){let n=[],r=new Map(e.map(o=>[o.id,o]));for(let[o,i]of e.entries()){let s=t.get(i.id),l=s?.internals?.userNode??s;l!==void 0&&l!==i&&n.push({id:i.id,item:i,type:"replace"}),l===void 0&&n.push({item:i,type:"add",index:o})}for(let[o]of t)r.get(o)===void 0&&n.push({id:o,type:"remove"});return n}function _y(e){return{id:e.id,type:"remove"}}var zb=Cd("React Flow","https://reactflow.dev/");function Ab(e,t,n={}){return L0(e,t,{...n,onError:n.onError??zb})}var Ny=e=>_0(e),Rb=e=>xd(e);function Xy(e){return(0,T.forwardRef)(e)}var Gy=typeof window<"u"?T.useLayoutEffect:T.useEffect;function Cy(e){let[t,n]=(0,T.useState)(BigInt(0)),[r]=(0,T.useState)(()=>$b(()=>n(o=>o+BigInt(1))));return Gy(()=>{let o=r.get();o.length&&(e(o),r.reset())},[t]),r}function $b(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var Zy=(0,T.createContext)(null);function Bb({children:e}){let t=ge(),n=(0,T.useCallback)(l=>{let{nodes:a=[],setNodes:u,hasDefaultNodes:c,onNodesChange:f,nodeLookup:d,fitViewQueued:h,onNodesChangeMiddlewareMap:m}=t.getState(),w=a;for(let g of l)w=typeof g=="function"?g(w):g;let x=ky({items:w,lookup:d});for(let g of m.values())x=g(x);c&&u(w),x.length>0?f?.(x):h&&window.requestAnimationFrame(()=>{let{fitViewQueued:g,nodes:y,setNodes:p}=t.getState();g&&p(y)})},[]),r=Cy(n),o=(0,T.useCallback)(l=>{let{edges:a=[],setEdges:u,hasDefaultEdges:c,onEdgesChange:f,edgeLookup:d}=t.getState(),h=a;for(let m of l)h=typeof m=="function"?m(h):m;c?u(h):f&&f(ky({items:h,lookup:d}))},[]),i=Cy(o),s=(0,T.useMemo)(()=>({nodeQueue:r,edgeQueue:i}),[]);return(0,D.jsx)(Zy.Provider,{value:s,children:e})}function Hb(){let e=(0,T.useContext)(Zy);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}var Fb=e=>!!e.panZoom;function Ti(){let e=Db(),t=ge(),n=Hb(),r=ue(Fb),o=(0,T.useMemo)(()=>{let i=f=>t.getState().nodeLookup.get(f),s=f=>{n.nodeQueue.push(f)},l=f=>{n.edgeQueue.push(f)},a=f=>{let{nodeLookup:d,nodeOrigin:h}=t.getState(),m=Ny(f)?f:d.get(f.id),w=m.parentId?Md(m.position,m.measured,m.parentId,d,h):m.position,x={...m,position:w,width:m.measured?.width??m.width,height:m.measured?.height??m.height};return ho(x,m.parentId?void 0:h)},u=(f,d,h={replace:!1})=>{s(m=>m.map(w=>{if(w.id===f){let x=typeof d=="function"?d(w):d;return h.replace&&Ny(x)?x:{...w,...x}}return w}))},c=(f,d,h={replace:!1})=>{l(m=>m.map(w=>{if(w.id===f){let x=typeof d=="function"?d(w):d;return h.replace&&Rb(x)?x:{...w,...x}}return w}))};return{getNodes:()=>t.getState().nodes.map(f=>({...f})),getNode:f=>i(f)?.internals.userNode,getInternalNode:i,getEdges:()=>{let{edges:f=[]}=t.getState();return f.map(d=>({...d}))},getEdge:f=>t.getState().edgeLookup.get(f),setNodes:s,setEdges:l,addNodes:f=>{let d=Array.isArray(f)?f:[f];n.nodeQueue.push(h=>[...h,...d])},addEdges:f=>{let d=Array.isArray(f)?f:[f];n.edgeQueue.push(h=>[...h,...d])},toObject:()=>{let{nodes:f=[],edges:d=[],transform:h}=t.getState(),[m,w,x]=h;return{nodes:f.map(g=>({...g})),edges:d.map(g=>({...g})),viewport:{x:m,y:w,zoom:x}}},deleteElements:async({nodes:f=[],edges:d=[]})=>{let{nodes:h,edges:m,onNodesDelete:w,onEdgesDelete:x,triggerNodeChanges:g,triggerEdgeChanges:y,onDelete:p,onBeforeDelete:v}=t.getState(),{nodes:k,edges:S}=await b0({nodesToRemove:f,edgesToRemove:d,nodes:h,edges:m,onBeforeDelete:v}),_=S.length>0,N=k.length>0;if(_){let M=S.map(_y);x?.(S),y(M)}if(N){let M=k.map(_y);w?.(k),g(M)}return(N||_)&&p?.({nodes:k,edges:S}),{deletedNodes:k,deletedEdges:S}},getIntersectingNodes:(f,d=!0,h)=>{let m=Nd(f),w=m?f:a(f),x=h!==void 0;if(!w)return[];let{nodeOrigin:g}=t.getState();return(h||t.getState().nodes).filter(y=>{let p=t.getState().nodeLookup.get(y.id);if(p&&!m&&(y.id===f.id||!p.internals.positionAbsolute))return!1;let v=ho(x?y:p,g),k=Mi(v,w);return d&&k>0||k>=v.width*v.height||k>=w.width*w.height})},isNodeIntersecting:(f,d,h=!0)=>{let w=Nd(f)?f:a(f);if(!w)return!1;let x=Mi(w,d);return h&&x>0||x>=d.width*d.height||x>=w.width*w.height},updateNode:u,updateNodeData:(f,d,h={replace:!1})=>{u(f,m=>{let w=typeof d=="function"?d(m):d;return h.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},h)},updateEdge:c,updateEdgeData:(f,d,h={replace:!1})=>{c(f,m=>{let w=typeof d=="function"?d(m):d;return h.replace?{...m,data:w}:{...m,data:{...m.data,...w}}},h)},getNodesBounds:f=>{let{nodeLookup:d,nodeOrigin:h}=t.getState();return Sd(f,{nodeLookup:d,nodeOrigin:h})},getHandleConnections:({type:f,id:d,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}-${f}${d?`-${d}`:""}`)?.values()??[]),getNodeConnections:({type:f,handleId:d,nodeId:h})=>Array.from(t.getState().connectionLookup.get(`${h}${f?d?`-${f}-${d}`:`-${f}`:""}`)?.values()??[]),fitView:async f=>{let d=t.getState().fitViewResolver??P0();return t.setState({fitViewQueued:!0,fitViewOptions:f,fitViewResolver:d}),n.nodeQueue.push(h=>[...h]),d.promise}}},[]);return(0,T.useMemo)(()=>({...o,...e,viewportInitialized:r}),[r])}var by=e=>e.selected,Vb=typeof window<"u"?window:void 0;function jb({deleteKeyCode:e,multiSelectionKeyCode:t}){let n=ge(),{deleteElements:r}=Ti(),o=Oi(e,{actInsideInputWithModifier:!1}),i=Oi(t,{target:Vb});(0,T.useEffect)(()=>{if(o){let{edges:s,nodes:l}=n.getState();r({nodes:l.filter(by),edges:s.filter(by)}),n.setState({nodesSelectionActive:!1})}},[o]),(0,T.useEffect)(()=>{n.setState({multiSelectionActive:i})},[i])}function Wb(e){let t=ge();(0,T.useEffect)(()=>{let n=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let r=Rl(e.current);(r.height===0||r.width===0)&&t.getState().onError?.("004",st.error004()),t.setState({width:r.width||500,height:r.height||500})};if(e.current){n(),window.addEventListener("resize",n);let r=new ResizeObserver(()=>n());return r.observe(e.current),()=>{window.removeEventListener("resize",n),r.disconnect()}}},[])}var Kl={position:"absolute",width:"100%",height:"100%",top:0,left:0},Ub=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function Yb({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:r=!1,panActivationKeyPressed:o,panOnScrollSpeed:i=.5,panOnScrollMode:s=dn.Free,zoomOnDoubleClick:l=!0,panOnDrag:a=!0,defaultViewport:u,translateExtent:c,minZoom:f,maxZoom:d,zoomActivationKeyCode:h,preventScrolling:m=!0,children:w,noWheelClassName:x,noPanClassName:g,onViewportChange:y,isControlledViewport:p,paneClickDistance:v,selectionOnDrag:k}){let S=ge(),_=(0,T.useRef)(null),{userSelectionActive:N,lib:M,connectionInProgress:A}=ue(Ub,ye),R=Oi(h),V=(0,T.useRef)();Wb(_);let B=(0,T.useCallback)(E=>{y?.({x:E[0],y:E[1],zoom:E[2]}),p||S.setState({transform:E})},[y,p]);return(0,T.useEffect)(()=>{if(_.current){V.current=Q0({domNode:_.current,minZoom:f,maxZoom:d,translateExtent:c,viewport:u,onDraggingChange:P=>S.setState(L=>L.paneDragging===P?L:{paneDragging:P}),onPanZoomStart:(P,L)=>{let{onViewportChangeStart:z,onMoveStart:F}=S.getState();F?.(P,L),z?.(L)},onPanZoom:(P,L)=>{let{onViewportChange:z,onMove:F}=S.getState();F?.(P,L),z?.(L)},onPanZoomEnd:(P,L)=>{let{onViewportChangeEnd:z,onMoveEnd:F}=S.getState();F?.(P,L),z?.(L)}});let{x:E,y:b,zoom:I}=V.current.getViewport();return S.setState({panZoom:V.current,transform:[E,b,I],domNode:_.current.closest(".react-flow")}),()=>{V.current?.destroy()}}},[]),(0,T.useEffect)(()=>{V.current?.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:r,panActivationKeyPressed:o,panOnScrollSpeed:i,panOnScrollMode:s,zoomOnDoubleClick:l,panOnDrag:a,zoomActivationKeyPressed:R,preventScrolling:m,noPanClassName:g,userSelectionActive:N,noWheelClassName:x,lib:M,onTransformChange:B,connectionInProgress:A,selectionOnDrag:k,paneClickDistance:v})},[e,t,n,r,o,i,s,l,a,R,m,g,N,x,M,B,A,k,v]),(0,D.jsx)("div",{className:"react-flow__renderer",ref:_,style:Kl,children:w})}var qb=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Xb(){let{userSelectionActive:e,userSelectionRect:t}=ue(qb,ye);return e&&t?(0,D.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}var Vd=(e,t)=>n=>{n.target===t.current&&e?.(n)},Gb=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function Zb({isSelecting:e,selectionKeyPressed:t,selectionMode:n=gr.Full,panOnDrag:r,autoPanOnSelection:o,paneClickDistance:i,selectionOnDrag:s,onSelectionStart:l,onSelectionEnd:a,onPaneClick:u,onPaneContextMenu:c,onPaneScroll:f,onPaneMouseEnter:d,onPaneMouseMove:h,onPaneMouseLeave:m,children:w}){let x=(0,T.useRef)(0),g=ge(),{userSelectionActive:y,elementsSelectable:p,dragging:v,panBy:k,autoPanSpeed:S}=ue(Gb,ye),_=p&&(e||y),N=(0,T.useRef)(null),M=(0,T.useRef)(),A=(0,T.useRef)(new Set),R=(0,T.useRef)(new Set),V=(0,T.useRef)(!1),B=(0,T.useRef)(!1),E=(0,T.useRef)({x:0,y:0}),b=(0,T.useRef)(!1),I=$=>{if(B.current||V.current||g.getState().connection.inProgress){B.current=!1,V.current=!1;return}let{connectionClickStartHandle:G,connection:O,onClickConnectEnd:W,resetSelectedElements:q}=g.getState();if(G){let Z=structuredClone(O);delete Z.inProgress,Z.toPosition=Z.toHandle?Z.toHandle.position:null,W?.($.nativeEvent,Z),g.setState({connectionClickStartHandle:null})}u?.($),q(),g.setState({nodesSelectionActive:!1})},P=$=>{if(Array.isArray(r)&&r?.includes(2)){$.preventDefault();return}c?.($)},L=f?$=>f($):void 0,z=$=>{B.current&&($.stopPropagation(),B.current=!1)},F=$=>{if($.pointerType==="touch"&&r!==!1&&!t)return;let{domNode:G,transform:O}=g.getState();if(M.current=G?.getBoundingClientRect(),!M.current)return;let W=$.target===N.current;if(!W&&!!$.target.closest(".nokey")||!e||!(s&&W||t)||$.button!==0||!$.isPrimary)return;$.target?.setPointerCapture?.($.pointerId),B.current=!1;let{x:J,y:ie}=gt($.nativeEvent,M.current),se=go({x:J,y:ie},O);g.setState({userSelectionRect:{width:0,height:0,startX:se.x,startY:se.y,x:J,y:ie}}),W||($.stopPropagation(),$.preventDefault())};function H($,G){let{userSelectionRect:O}=g.getState();if(!O)return;let{transform:W,nodeLookup:q,edgeLookup:Z,connectionLookup:J,triggerNodeChanges:ie,triggerEdgeChanges:se,defaultEdgeOptions:Te}=g.getState(),Ut={x:O.startX,y:O.startY},{x:Ot,y:Tt}=yr(Ut,W),Yt={startX:Ut.x,startY:Ut.y,x:$<Ot?$:Ot,y:G<Tt?G:Tt,width:Math.abs($-Ot),height:Math.abs(G-Tt)},wo=A.current,jn=R.current;A.current=new Set(Dl(q,Yt,W,n===gr.Partial,!0).map(wt=>wt.id)),R.current=new Set;let Wn=Te?.selectable??!0;for(let wt of A.current){let qt=J.get(wt);if(qt)for(let{edgeId:Xt}of qt.values()){let Un=Z.get(Xt);Un&&(Un.selectable??Wn)&&R.current.add(Xt)}}if(!Id(wo,A.current)){let wt=vo(q,A.current);ie(wt)}if(!Id(jn,R.current)){let wt=vo(Z,R.current);se(wt)}g.setState({userSelectionRect:Yt,userSelectionActive:!0,nodesSelectionActive:!1})}function Y(){if(!o||!M.current)return;let[$,G]=Ll(E.current,M.current,S);k({x:$,y:G}).then(O=>{if(!B.current||!O){x.current=requestAnimationFrame(Y);return}let{x:W,y:q}=E.current;H(W,q),x.current=requestAnimationFrame(Y)})}let ne=()=>{cancelAnimationFrame(x.current),x.current=0,b.current=!1};(0,T.useEffect)(()=>()=>ne(),[]);let U=$=>{let{userSelectionRect:G,transform:O,resetSelectedElements:W}=g.getState();if(!M.current||!G)return;let{x:q,y:Z}=gt($.nativeEvent,M.current);E.current={x:q,y:Z};let J=yr({x:G.startX,y:G.startY},O);if(!B.current){let ie=t?0:i;if(Math.hypot(q-J.x,Z-J.y)<=ie)return;W(),l?.($)}B.current=!0,b.current||(Y(),b.current=!0),H(q,Z)},te=$=>{if(!_){$.target===N.current&&g.getState().connection.inProgress&&(V.current=!0);return}$.button===0&&($.target?.releasePointerCapture?.($.pointerId),!y&&$.target===N.current&&g.getState().userSelectionRect&&I?.($),g.setState({userSelectionActive:!1,userSelectionRect:null}),B.current&&(a?.($),g.setState({nodesSelectionActive:A.current.size>0})),ne())},re=$=>{$.target?.releasePointerCapture?.($.pointerId),ne()},ee=r===!0||Array.isArray(r)&&r.includes(0);return(0,D.jsxs)("div",{className:Se(["react-flow__pane",{draggable:ee,dragging:v,selection:e}]),onClick:_?void 0:Vd(I,N),onContextMenu:Vd(P,N),onWheel:Vd(L,N),onPointerEnter:_?void 0:d,onPointerMove:_?U:h,onPointerUp:te,onPointerCancel:_?re:void 0,onPointerDownCapture:_?F:void 0,onClickCapture:_?z:void 0,onPointerLeave:m,ref:N,style:Kl,children:[w,(0,D.jsx)(Xb,{})]})}function Wd({id:e,store:t,unselect:n=!1,nodeRef:r}){let{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:s,nodeLookup:l,onError:a}=t.getState(),u=l.get(e);if(!u){a?.("012",st.error012(e));return}t.setState({nodesSelectionActive:!1}),u.selected?(n||u.selected&&s)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):o([e])}function Qy({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,nodeClickDistance:s}){let l=ge(),[a,u]=(0,T.useState)(!1),c=(0,T.useRef)();return(0,T.useEffect)(()=>{if(!t)return c.current=j0({getStoreItems:()=>l.getState(),onNodeMouseDown:f=>{Wd({id:f,store:l,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}}),()=>{c.current?.destroy(),c.current=void 0}},[t,l,e]),(0,T.useEffect)(()=>{t||!e.current||!c.current||c.current.update({noDragClassName:n,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:o,nodeClickDistance:s})},[n,r,t,i,e,o,s]),a}var Qb=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function Ky(){let e=ge();return(0,T.useCallback)(n=>{let{nodeExtent:r,snapToGrid:o,snapGrid:i,nodesDraggable:s,onError:l,updateNodePositions:a,nodeLookup:u,nodeOrigin:c}=e.getState(),f=new Map,d=Qb(s),h=o?i[0]:5,m=o?i[1]:5,w=n.direction.x*h*n.factor,x=n.direction.y*m*n.factor;for(let[,g]of u){if(!d(g))continue;let y={x:g.internals.positionAbsolute.x+w,y:g.internals.positionAbsolute.y+x};o&&(y=po(y,i));let{position:p,positionAbsolute:v}=kd({nodeId:g.id,nextPosition:y,nodeLookup:u,nodeExtent:r,nodeOrigin:c,onError:l});g.position=p,g.internals.positionAbsolute=v,f.set(g.id,g)}a(f)},[])}var Ud=(0,T.createContext)(null),Kb=Ud.Provider;Ud.Consumer;var Jy=()=>(0,T.useContext)(Ud),Jb=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),ev=(0,T.createContext)(null);function eM({children:e}){let t=ue(Jb,ye);return(0,D.jsx)(ev.Provider,{value:t,children:e})}function tM(){let e=(0,T.useContext)(ev);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}var nM={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},rM=(e,t,n)=>r=>{let{connectionClickStartHandle:o,connectionMode:i,connection:s}=r,{fromHandle:l,toHandle:a,isValid:u}=s;if(!l&&!o)return nM;let c=a?.nodeId===e&&a?.id===t&&a?.type===n;return{connectingFrom:l?.nodeId===e&&l?.id===t&&l?.type===n,connectingTo:c,clickConnecting:o?.nodeId===e&&o?.id===t&&o?.type===n,isPossibleEndHandle:i===Bn.Strict?l?.type!==n:e!==l?.nodeId||t!==l?.id,connectionInProcess:!!l,clickConnectionInProcess:!!o,valid:c&&u}};function oM({type:e="source",position:t=Q.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:i=!0,id:s,onConnect:l,children:a,className:u,onMouseDown:c,onTouchStart:f,...d},h){let m=s||null,w=e==="target",x=ge(),g=Jy(),{connectOnClick:y,noPanClassName:p,rfId:v}=tM(),{connectingFrom:k,connectingTo:S,clickConnecting:_,isPossibleEndHandle:N,connectionInProcess:M,clickConnectionInProcess:A,valid:R}=ue(rM(g,m,e),ye);g||x.getState().onError?.("010",st.error010());let V=b=>{let{defaultEdgeOptions:I,onConnect:P,hasDefaultEdges:L}=x.getState(),z={...I,...b};if(L){let{edges:F,setEdges:H,onError:Y}=x.getState();H(Ab(z,F,{onError:Y}))}P?.(z),l?.(z)},B=b=>{if(!g)return;let I=Dd(b.nativeEvent);if(o&&(I&&b.button===0||!I)){let P=x.getState();Wl.onPointerDown(b.nativeEvent,{handleDomNode:b.currentTarget,autoPanOnConnect:P.autoPanOnConnect,connectionMode:P.connectionMode,connectionRadius:P.connectionRadius,domNode:P.domNode,nodeLookup:P.nodeLookup,lib:P.lib,isTarget:w,handleId:m,nodeId:g,flowId:P.rfId,panBy:P.panBy,cancelConnection:P.cancelConnection,onConnectStart:P.onConnectStart,onConnectEnd:(...L)=>x.getState().onConnectEnd?.(...L),updateConnection:P.updateConnection,onConnect:V,isValidConnection:n||((...L)=>x.getState().isValidConnection?.(...L)??!0),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:P.autoPanSpeed,dragThreshold:P.connectionDragThreshold})}I?c?.(b):f?.(b)},E=b=>{let{onClickConnectStart:I,onClickConnectEnd:P,connectionClickStartHandle:L,connectionMode:z,isValidConnection:F,lib:H,rfId:Y,nodeLookup:ne,connection:U}=x.getState();if(!g||!L&&!o)return;if(!L){I?.(b.nativeEvent,{nodeId:g,handleId:m,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:g,type:e,id:m}});return}let te=Od(b.target),re=n||F,{connection:ee,isValid:$}=Wl.isValid(b.nativeEvent,{handle:{nodeId:g,id:m,type:e},connectionMode:z,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:re,flowId:Y,doc:te,lib:H,nodeLookup:ne});$&&ee&&V(ee);let G=structuredClone(U);delete G.inProgress,G.toPosition=G.toHandle?G.toHandle.position:null,P?.(b,G),x.setState({connectionClickStartHandle:null})};return(0,D.jsx)("div",{"data-handleid":m,"data-nodeid":g,"data-handlepos":t,"data-id":`${v}-${g}-${m}-${e}`,className:Se(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",p,u,{source:!w,target:w,connectable:r,connectablestart:o,connectableend:i,clickconnecting:_,connectingfrom:k,connectingto:S,valid:R,connectionindicator:r&&(!M||N)&&(M||A?i:o)}]),onMouseDown:B,onTouchStart:B,onClick:y?E:void 0,ref:h,...d,children:a})}var xr=(0,T.memo)(Xy(oM));function iM({data:e,isConnectable:t,sourcePosition:n=Q.Bottom}){return(0,D.jsxs)(D.Fragment,{children:[e?.label,(0,D.jsx)(xr,{type:"source",position:n,isConnectable:t})]})}function sM({data:e,isConnectable:t,targetPosition:n=Q.Top,sourcePosition:r=Q.Bottom}){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(xr,{type:"target",position:n,isConnectable:t}),e?.label,(0,D.jsx)(xr,{type:"source",position:r,isConnectable:t})]})}function lM(){return null}function aM({data:e,isConnectable:t,targetPosition:n=Q.Top}){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(xr,{type:"target",position:n,isConnectable:t}),e?.label]})}var Gl={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},My={input:iM,default:sM,output:aM,group:lM};function uM(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var cM=e=>{let{width:t,height:n,x:r,y:o}=fo(e.nodeLookup,{filter:i=>!!i.selected});return{width:pt(t)?t:null,height:pt(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${r}px,${o}px)`}};function dM({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){let r=ge(),{width:o,height:i,transformString:s,userSelectionActive:l}=ue(cM,ye),a=Ky(),u=(0,T.useRef)(null);(0,T.useEffect)(()=>{n||u.current?.focus({preventScroll:!0})},[n]);let c=!l&&o!==null&&i!==null;if(Qy({nodeRef:u,disabled:!c}),!c)return null;let f=e?h=>{let m=r.getState().nodes.filter(w=>w.selected);e(h,m)}:void 0,d=h=>{Object.prototype.hasOwnProperty.call(Gl,h.key)&&(h.preventDefault(),a({direction:Gl[h.key],factor:h.shiftKey?4:1}))};return(0,D.jsx)("div",{className:Se(["react-flow__nodesselection","react-flow__container",t]),style:{transform:s},children:(0,D.jsx)("div",{ref:u,className:"react-flow__nodesselection-rect",onContextMenu:f,tabIndex:n?void 0:-1,onKeyDown:n?void 0:d,style:{width:o,height:i}})})}var Iy=typeof window<"u"?window:void 0,fM=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function tv({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,paneClickDistance:l,deleteKeyCode:a,selectionKeyCode:u,selectionOnDrag:c,selectionMode:f,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:m,panActivationKeyCode:w,zoomActivationKeyCode:x,elementsSelectable:g,zoomOnScroll:y,zoomOnPinch:p,panOnScroll:v,panOnScrollSpeed:k,panOnScrollMode:S,zoomOnDoubleClick:_,panOnDrag:N,autoPanOnSelection:M,defaultViewport:A,translateExtent:R,minZoom:V,maxZoom:B,preventScrolling:E,onSelectionContextMenu:b,noWheelClassName:I,noPanClassName:P,disableKeyboardA11y:L,onViewportChange:z,isControlledViewport:F}){let{nodesSelectionActive:H,userSelectionActive:Y}=ue(fM,ye),ne=Oi(u,{target:Iy}),U=Oi(w,{target:Iy}),te=U||N,re=U||v,ee=c&&te!==!0,$=ne||Y||ee;return jb({deleteKeyCode:a,multiSelectionKeyCode:m}),(0,D.jsx)(Yb,{onPaneContextMenu:i,elementsSelectable:g,zoomOnScroll:y,zoomOnPinch:p,panOnScroll:re,panActivationKeyPressed:U,panOnScrollSpeed:k,panOnScrollMode:S,zoomOnDoubleClick:_,panOnDrag:!ne&&te,defaultViewport:A,translateExtent:R,minZoom:V,maxZoom:B,zoomActivationKeyCode:x,preventScrolling:E,noWheelClassName:I,noPanClassName:P,onViewportChange:z,isControlledViewport:F,paneClickDistance:l,selectionOnDrag:ee,children:(0,D.jsxs)(Zb,{onSelectionStart:d,onSelectionEnd:h,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:i,onPaneScroll:s,panOnDrag:te,autoPanOnSelection:M,isSelecting:!!$,selectionMode:f,selectionKeyPressed:ne,paneClickDistance:l,selectionOnDrag:ee,children:[e,H&&(0,D.jsx)(dM,{onSelectionContextMenu:b,noPanClassName:P,disableKeyboardA11y:L})]})})}tv.displayName="FlowRenderer";var hM=(0,T.memo)(tv),pM=e=>t=>e?Dl(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function gM(e){return ue((0,T.useCallback)(pM(e),[e]),ye)}var mM=e=>e.updateNodeInternals;function yM(){let e=ue(mM),[t]=(0,T.useState)(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{let r=new Map;n.forEach(o=>{let i=o.target.getAttribute("data-id");r.set(i,{id:i,nodeElement:o.target,force:!0})}),e(r)}));return(0,T.useEffect)(()=>()=>{t?.disconnect()},[t]),t}function vM({node:e,nodeType:t,hasDimensions:n,resizeObserver:r}){let o=ge(),i=(0,T.useRef)(null),s=(0,T.useRef)(null),l=(0,T.useRef)(e.sourcePosition),a=(0,T.useRef)(e.targetPosition),u=(0,T.useRef)(t),c=n&&!!e.internals.handleBounds;return(0,T.useEffect)(()=>{i.current&&!e.hidden&&(!c||s.current!==i.current)&&(s.current&&r?.unobserve(s.current),r?.observe(i.current),s.current=i.current)},[c,e.hidden]),(0,T.useEffect)(()=>()=>{s.current&&(r?.unobserve(s.current),s.current=null)},[]),(0,T.useEffect)(()=>{if(i.current){let f=u.current!==t,d=l.current!==e.sourcePosition,h=a.current!==e.targetPosition;(f||d||h)&&(u.current=t,l.current=e.sourcePosition,a.current=e.targetPosition,o.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:i.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),i}function wM({id:e,onClick:t,onMouseEnter:n,onMouseMove:r,onMouseLeave:o,onContextMenu:i,onDoubleClick:s,nodesDraggable:l,elementsSelectable:a,nodesConnectable:u,nodesFocusable:c,resizeObserver:f,noDragClassName:d,noPanClassName:h,disableKeyboardA11y:m,rfId:w,nodeTypes:x,nodeClickDistance:g,onError:y}){let{node:p,internals:v,isParent:k}=ue($=>{let G=$.nodeLookup.get(e),O=$.parentLookup.has(e);return{node:G,internals:G.internals,isParent:O}},ye),S=p.type||"default",_=x?.[S]||My[S];_===void 0&&(y?.("003",st.error003(S)),S="default",_=x?.default||My.default);let N=!!(p.draggable||l&&typeof p.draggable>"u"),M=!!(p.selectable||a&&typeof p.selectable>"u"),A=!!(p.connectable||u&&typeof p.connectable>"u"),R=!!(p.focusable||c&&typeof p.focusable>"u"),V=ge(),B=bd(p),E=vM({node:p,nodeType:S,hasDimensions:B,resizeObserver:f}),b=Qy({nodeRef:E,disabled:p.hidden||!N,noDragClassName:d,handleSelector:p.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:g}),I=Ky();if(p.hidden)return null;let P=mt(p),L=uM(p),z=M||N||t||n||r||o,F=n?$=>n($,{...v.userNode}):void 0,H=r?$=>r($,{...v.userNode}):void 0,Y=o?$=>o($,{...v.userNode}):void 0,ne=i?$=>i($,{...v.userNode}):void 0,U=s?$=>s($,{...v.userNode}):void 0,te=$=>{let{selectNodesOnDrag:G,nodeDragThreshold:O}=V.getState();M&&(!G||!N||O>0)&&Wd({id:e,store:V,nodeRef:E}),t&&t($,{...v.userNode})},re=$=>{if(!(Td($.nativeEvent)||m)){if(yd.includes($.key)&&M){let G=$.key==="Escape";Wd({id:e,store:V,unselect:G,nodeRef:E})}else if(N&&p.selected&&Object.prototype.hasOwnProperty.call(Gl,$.key)){$.preventDefault();let{ariaLabelConfig:G}=V.getState();V.setState({ariaLiveMessage:G["node.a11yDescription.ariaLiveMessage"]({direction:$.key.replace("Arrow","").toLowerCase(),x:~~v.positionAbsolute.x,y:~~v.positionAbsolute.y})}),I({direction:Gl[$.key],factor:$.shiftKey?4:1})}}},ee=()=>{if(m||!E.current?.matches(":focus-visible"))return;let{transform:$,width:G,height:O,autoPanOnNodeFocus:W,setCenter:q}=V.getState();if(!W)return;Dl(new Map([[e,p]]),{x:0,y:0,width:G,height:O},$,!0).length>0||q(p.position.x+P.width/2,p.position.y+P.height/2,{zoom:$[2]})};return(0,D.jsx)("div",{className:Se(["react-flow__node",`react-flow__node-${S}`,{[h]:N},p.className,{selected:p.selected,selectable:M,parent:k,draggable:N,dragging:b}]),ref:E,style:{zIndex:v.z,transform:`translate(${v.positionAbsolute.x}px,${v.positionAbsolute.y}px)`,pointerEvents:z?"all":"none",visibility:B?"visible":"hidden",...p.style,...L},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:F,onMouseMove:H,onMouseLeave:Y,onContextMenu:ne,onClick:te,onDoubleClick:U,onKeyDown:R?re:void 0,tabIndex:R?0:void 0,onFocus:R?ee:void 0,role:p.ariaRole??(R?"group":void 0),"aria-roledescription":"node","aria-describedby":m?void 0:`${Vy}-${w}`,"aria-label":p.ariaLabel,...p.domAttributes,children:(0,D.jsx)(Kb,{value:e,children:(0,D.jsx)(_,{id:e,data:p.data,type:S,positionAbsoluteX:v.positionAbsolute.x,positionAbsoluteY:v.positionAbsolute.y,selected:p.selected??!1,selectable:M,draggable:N,deletable:p.deletable??!0,isConnectable:A,sourcePosition:p.sourcePosition,targetPosition:p.targetPosition,dragging:b,dragHandle:p.dragHandle,zIndex:v.z,parentId:p.parentId,...P})})})}var xM=(0,T.memo)(wM),EM=e=>({nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function nv(e){let{nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,onError:o}=ue(EM,ye),i=gM(e.onlyRenderVisibleElements),s=yM();return(0,D.jsx)("div",{className:"react-flow__nodes",style:Kl,children:i.map(l=>(0,D.jsx)(xM,{id:l,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:s,nodesDraggable:e.nodesDraggable??!0,nodesConnectable:t,nodesFocusable:n,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:o},l))})}nv.displayName="NodeRenderer";var SM=(0,T.memo)(nv);function kM(e){return ue((0,T.useCallback)(n=>{if(!e)return n.edges.map(o=>o.id);let r=[];if(n.width&&n.height)for(let o of n.edges){let i=n.nodeLookup.get(o.source),s=n.nodeLookup.get(o.target);i&&s&&D0({sourceNode:i,targetNode:s,width:n.width,height:n.height,transform:n.transform})&&r.push(o.id)}return r},[e]),ye)}var _M=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e}};return(0,D.jsx)("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},NM=({color:e="none",strokeWidth:t=1})=>{let n={strokeWidth:t,...e&&{stroke:e,fill:e}};return(0,D.jsx)("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Py={[Wt.Arrow]:_M,[Wt.ArrowClosed]:NM};function CM(e){let t=ge();return(0,T.useMemo)(()=>Object.prototype.hasOwnProperty.call(Py,e)?Py[e]:(t.getState().onError?.("009",st.error009(e)),null),[e])}var bM=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:i="strokeWidth",strokeWidth:s,orient:l="auto-start-reverse"})=>{let a=CM(t);return a?(0,D.jsx)("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:l,refX:"0",refY:"0",children:(0,D.jsx)(a,{color:n,strokeWidth:s})}):null},rv=({defaultColor:e,rfId:t})=>{let n=ue(i=>i.edges),r=ue(i=>i.defaultEdgeOptions),o=(0,T.useMemo)(()=>A0(n,{id:t,defaultColor:e,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[n,r,t,e]);return o.length?(0,D.jsx)("svg",{className:"react-flow__marker","aria-hidden":"true",children:(0,D.jsx)("defs",{children:o.map(i=>(0,D.jsx)(bM,{id:i.id,type:i.type,color:i.color,width:i.width,height:i.height,markerUnits:i.markerUnits,strokeWidth:i.strokeWidth,orient:i.orient},i.id))})}):null};rv.displayName="MarkerDefinitions";var MM=(0,T.memo)(rv);function ov({x:e,y:t,label:n,labelStyle:r,labelShowBg:o=!0,labelBgStyle:i,labelBgPadding:s=[2,4],labelBgBorderRadius:l=2,children:a,className:u,...c}){let[f,d]=(0,T.useState)({x:1,y:0,width:0,height:0}),h=Se(["react-flow__edge-textwrapper",u]),m=(0,T.useRef)(null);return(0,T.useEffect)(()=>{if(m.current){let w=m.current.getBBox();d({x:w.x,y:w.y,width:w.width,height:w.height})}},[n]),n?(0,D.jsxs)("g",{transform:`translate(${e-f.width/2} ${t-f.height/2})`,className:h,visibility:f.width?"visible":"hidden",...c,children:[o&&(0,D.jsx)("rect",{width:f.width+2*s[0],x:-s[0],y:-s[1],height:f.height+2*s[1],className:"react-flow__edge-textbg",style:i,rx:l,ry:l}),(0,D.jsx)("text",{className:"react-flow__edge-text",y:f.height/2,dy:"0.3em",ref:m,style:r,children:n}),a]}):null}ov.displayName="EdgeText";var IM=(0,T.memo)(ov);function Jl({path:e,labelX:t,labelY:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a,interactionWidth:u=20,...c}){return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("path",{...c,d:e,fill:"none",className:Se(["react-flow__edge-path",c.className])}),u?(0,D.jsx)("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&pt(t)&&pt(n)?(0,D.jsx)(IM,{x:t,y:n,label:r,labelStyle:o,labelShowBg:i,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:a}):null]})}function Oy({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===Q.Left||e===Q.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function iv({sourceX:e,sourceY:t,sourcePosition:n=Q.Bottom,targetX:r,targetY:o,targetPosition:i=Q.Top}){let[s,l]=Oy({pos:n,x1:e,y1:t,x2:r,y2:o}),[a,u]=Oy({pos:i,x1:r,y1:o,x2:e,y2:t}),[c,f,d,h]=$l({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:a,targetControlY:u});return[`M${e},${t} C${s},${l} ${a},${u} ${r},${o}`,c,f,d,h]}function sv(e){return(0,T.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s,targetPosition:l,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:x,interactionWidth:g})=>{let[y,p,v]=iv({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l}),k=e.isInternal?void 0:t;return(0,D.jsx)(Jl,{id:k,path:y,labelX:p,labelY:v,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:x,interactionWidth:g})})}var PM=sv({isInternal:!1}),lv=sv({isInternal:!0});PM.displayName="SimpleBezierEdge";lv.displayName="SimpleBezierEdgeInternal";function av(e){return(0,T.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,sourcePosition:h=Q.Bottom,targetPosition:m=Q.Top,markerEnd:w,markerStart:x,pathOptions:g,interactionWidth:y})=>{let[p,v,k]=Pi({sourceX:n,sourceY:r,sourcePosition:h,targetX:o,targetY:i,targetPosition:m,borderRadius:g?.borderRadius,offset:g?.offset,stepPosition:g?.stepPosition}),S=e.isInternal?void 0:t;return(0,D.jsx)(Jl,{id:S,path:p,labelX:v,labelY:k,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:w,markerStart:x,interactionWidth:y})})}var uv=av({isInternal:!1}),cv=av({isInternal:!0});uv.displayName="SmoothStepEdge";cv.displayName="SmoothStepEdgeInternal";function dv(e){return(0,T.memo)(({id:t,...n})=>{let r=e.isInternal?void 0:t;return(0,D.jsx)(uv,{...n,id:r,pathOptions:(0,T.useMemo)(()=>({borderRadius:0,offset:n.pathOptions?.offset}),[n.pathOptions?.offset])})})}var OM=dv({isInternal:!1}),fv=dv({isInternal:!0});OM.displayName="StepEdge";fv.displayName="StepEdgeInternal";function hv(e){return(0,T.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:m,interactionWidth:w})=>{let[x,g,y]=Hl({sourceX:n,sourceY:r,targetX:o,targetY:i}),p=e.isInternal?void 0:t;return(0,D.jsx)(Jl,{id:p,path:x,labelX:g,labelY:y,label:s,labelStyle:l,labelShowBg:a,labelBgStyle:u,labelBgPadding:c,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:m,interactionWidth:w})})}var TM=hv({isInternal:!1}),pv=hv({isInternal:!0});TM.displayName="StraightEdge";pv.displayName="StraightEdgeInternal";function gv(e){return(0,T.memo)(({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:s=Q.Bottom,targetPosition:l=Q.Top,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:x,pathOptions:g,interactionWidth:y})=>{let[p,v,k]=Bl({sourceX:n,sourceY:r,sourcePosition:s,targetX:o,targetY:i,targetPosition:l,curvature:g?.curvature}),S=e.isInternal?void 0:t;return(0,D.jsx)(Jl,{id:S,path:p,labelX:v,labelY:k,label:a,labelStyle:u,labelShowBg:c,labelBgStyle:f,labelBgPadding:d,labelBgBorderRadius:h,style:m,markerEnd:w,markerStart:x,interactionWidth:y})})}var DM=gv({isInternal:!1}),mv=gv({isInternal:!0});DM.displayName="BezierEdge";mv.displayName="BezierEdgeInternal";var Ty={default:mv,straight:pv,step:fv,smoothstep:cv,simplebezier:lv},Dy={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},LM=(e,t,n)=>n===Q.Left?e-t:n===Q.Right?e+t:e,zM=(e,t,n)=>n===Q.Top?e-t:n===Q.Bottom?e+t:e,Ly="react-flow__edgeupdater";function zy({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:i,onMouseOut:s,type:l}){return(0,D.jsx)("circle",{onMouseDown:o,onMouseEnter:i,onMouseOut:s,className:Se([Ly,`${Ly}-${l}`]),cx:LM(t,r,e),cy:zM(n,r,e),r,stroke:"transparent",fill:"transparent"})}function AM({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:r,sourceY:o,targetX:i,targetY:s,sourcePosition:l,targetPosition:a,onReconnect:u,onReconnectStart:c,onReconnectEnd:f,setReconnecting:d,setUpdateHover:h}){let m=ge(),w=(v,k)=>{if(v.button!==0)return;let{autoPanOnConnect:S,domNode:_,connectionMode:N,connectionRadius:M,lib:A,onConnectStart:R,cancelConnection:V,nodeLookup:B,rfId:E,panBy:b,updateConnection:I}=m.getState(),P=k.type==="target",L=(H,Y)=>{d(!1),f?.(H,n,k.type,Y)},z=H=>u?.(n,H),F=(H,Y)=>{d(!0),c?.(v,n,k.type),R?.(H,Y)};Wl.onPointerDown(v.nativeEvent,{autoPanOnConnect:S,connectionMode:N,connectionRadius:M,domNode:_,handleId:k.id,nodeId:k.nodeId,nodeLookup:B,isTarget:P,edgeUpdaterType:k.type,lib:A,flowId:E,cancelConnection:V,panBy:b,isValidConnection:(...H)=>m.getState().isValidConnection?.(...H)??!0,onConnect:z,onConnectStart:F,onConnectEnd:(...H)=>m.getState().onConnectEnd?.(...H),onReconnectEnd:L,updateConnection:I,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle,dragThreshold:m.getState().connectionDragThreshold,handleDomNode:v.currentTarget})},x=v=>w(v,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),g=v=>w(v,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),y=()=>h(!0),p=()=>h(!1);return(0,D.jsxs)(D.Fragment,{children:[(e===!0||e==="source")&&(0,D.jsx)(zy,{position:l,centerX:r,centerY:o,radius:t,onMouseDown:x,onMouseEnter:y,onMouseOut:p,type:"source"}),(e===!0||e==="target")&&(0,D.jsx)(zy,{position:a,centerX:i,centerY:s,radius:t,onMouseDown:g,onMouseEnter:y,onMouseOut:p,type:"target"})]})}function RM({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:r,onClick:o,onDoubleClick:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,reconnectRadius:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,rfId:m,edgeTypes:w,noPanClassName:x,onError:g,disableKeyboardA11y:y}){let p=ue(q=>q.edgeLookup.get(e)),v=ue(q=>q.defaultEdgeOptions);p=v?{...v,...p}:p;let k=p.type||"default",S=w?.[k]||Ty[k];S===void 0&&(g?.("011",st.error011(k)),k="default",S=w?.default||Ty.default);let _=!!(p.focusable||t&&typeof p.focusable>"u"),N=typeof f<"u"&&(p.reconnectable||n&&typeof p.reconnectable>"u"),M=!!(p.selectable||r&&typeof p.selectable>"u"),A=(0,T.useRef)(null),[R,V]=(0,T.useState)(!1),[B,E]=(0,T.useState)(!1),b=ge(),{zIndex:I=p.zIndex,sourceX:P,sourceY:L,targetX:z,targetY:F,sourcePosition:H,targetPosition:Y}=ue((0,T.useCallback)(q=>{let Z=q.nodeLookup.get(p.source),J=q.nodeLookup.get(p.target);if(!Z||!J)return Dy;let ie=z0({id:e,sourceNode:Z,targetNode:J,sourceHandle:p.sourceHandle||null,targetHandle:p.targetHandle||null,connectionMode:q.connectionMode,onError:g}),se=T0({selected:p.selected,zIndex:p.zIndex,sourceNode:Z,targetNode:J,elevateOnSelect:q.elevateEdgesOnSelect,zIndexMode:q.zIndexMode});return{...ie||Dy,zIndex:se}},[p.source,p.target,p.sourceHandle,p.targetHandle,p.selected,p.zIndex,g]),ye),ne=(0,T.useMemo)(()=>p.markerStart?`url('#${Fl(p.markerStart,m)}')`:void 0,[p.markerStart,m]),U=(0,T.useMemo)(()=>p.markerEnd?`url('#${Fl(p.markerEnd,m)}')`:void 0,[p.markerEnd,m]);if(p.hidden||P===null||L===null||z===null||F===null)return null;let te=q=>{let{addSelectedEdges:Z,unselectNodesAndEdges:J,multiSelectionActive:ie}=b.getState();M&&(b.setState({nodesSelectionActive:!1}),p.selected&&ie?(J({nodes:[],edges:[p]}),A.current?.blur()):Z([e])),o&&o(q,p)},re=i?q=>{i(q,{...p})}:void 0,ee=s?q=>{s(q,{...p})}:void 0,$=l?q=>{l(q,{...p})}:void 0,G=a?q=>{a(q,{...p})}:void 0,O=u?q=>{u(q,{...p})}:void 0,W=q=>{if(!y&&yd.includes(q.key)&&M){let{unselectNodesAndEdges:Z,addSelectedEdges:J}=b.getState();q.key==="Escape"?(A.current?.blur(),Z({edges:[p]})):J([e])}};return(0,D.jsx)("svg",{style:{zIndex:I},children:(0,D.jsxs)("g",{className:Se(["react-flow__edge",`react-flow__edge-${k}`,p.className,x,{selected:p.selected,animated:p.animated,inactive:!M&&!o,updating:R,selectable:M}]),onClick:te,onDoubleClick:re,onContextMenu:ee,onMouseEnter:$,onMouseMove:G,onMouseLeave:O,onKeyDown:_?W:void 0,tabIndex:_?0:void 0,role:p.ariaRole??(_?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":p.ariaLabel===null?void 0:p.ariaLabel||`Edge from ${p.source} to ${p.target}`,"aria-describedby":_?`${jy}-${m}`:void 0,ref:A,...p.domAttributes,children:[!B&&(0,D.jsx)(S,{id:e,source:p.source,target:p.target,type:p.type,selected:p.selected,animated:p.animated,selectable:M,deletable:p.deletable??!0,label:p.label,labelStyle:p.labelStyle,labelShowBg:p.labelShowBg,labelBgStyle:p.labelBgStyle,labelBgPadding:p.labelBgPadding,labelBgBorderRadius:p.labelBgBorderRadius,sourceX:P,sourceY:L,targetX:z,targetY:F,sourcePosition:H,targetPosition:Y,data:p.data,style:p.style,sourceHandleId:p.sourceHandle,targetHandleId:p.targetHandle,markerStart:ne,markerEnd:U,pathOptions:"pathOptions"in p?p.pathOptions:void 0,interactionWidth:p.interactionWidth}),N&&(0,D.jsx)(AM,{edge:p,isReconnectable:N,reconnectRadius:c,onReconnect:f,onReconnectStart:d,onReconnectEnd:h,sourceX:P,sourceY:L,targetX:z,targetY:F,sourcePosition:H,targetPosition:Y,setUpdateHover:V,setReconnecting:E})]})})}var $M=(0,T.memo)(RM),BM=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function yv({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:r,noPanClassName:o,onReconnect:i,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:a,onEdgeMouseLeave:u,onEdgeClick:c,reconnectRadius:f,onEdgeDoubleClick:d,onReconnectStart:h,onReconnectEnd:m,disableKeyboardA11y:w}){let{edgesFocusable:x,edgesReconnectable:g,elementsSelectable:y,onError:p}=ue(BM,ye),v=kM(t);return(0,D.jsxs)("div",{className:"react-flow__edges",children:[(0,D.jsx)(MM,{defaultColor:e,rfId:n}),v.map(k=>(0,D.jsx)($M,{id:k,edgesFocusable:x,edgesReconnectable:g,elementsSelectable:y,noPanClassName:o,onReconnect:i,onContextMenu:s,onMouseEnter:l,onMouseMove:a,onMouseLeave:u,onClick:c,reconnectRadius:f,onDoubleClick:d,onReconnectStart:h,onReconnectEnd:m,rfId:n,onError:p,edgeTypes:r,disableKeyboardA11y:w},k))]})}yv.displayName="EdgeRenderer";var HM=(0,T.memo)(yv),Ay=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function FM({children:e}){let t=ge(),n=(0,T.useRef)(null),[r]=(0,T.useState)(()=>t.getState().transform);return Gy(()=>{let o=null,i=()=>{let s=t.getState().transform;o&&s[0]===o[0]&&s[1]===o[1]&&s[2]===o[2]||(o=s,n.current&&(n.current.style.transform=Ay(s)))};return i(),t.subscribe(i)},[t]),(0,D.jsx)("div",{ref:n,className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:Ay(r)},children:e})}function VM(e){let t=Ti(),n=(0,T.useRef)(!1);(0,T.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}var jM=e=>e.panZoom?.syncViewport;function WM(e){let t=ue(jM),n=ge();return(0,T.useEffect)(()=>{e&&(t?.(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function Ry(e){return e.connection.inProgress?{...e.connection,to:go(e.connection.to,e.transform)}:{...e.connection}}function UM(e){return e?n=>{let r=Ry(n);return e(r)}:Ry}function YM(e){let t=UM(e);return ue(t,ye)}var qM=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function XM({containerStyle:e,style:t,type:n,component:r}){let{nodesConnectable:o,width:i,height:s,isValid:l,inProgress:a}=ue(qM,ye);return!(i&&o&&a)?null:(0,D.jsx)("svg",{style:e,width:i,height:s,className:"react-flow__connectionline react-flow__container",children:(0,D.jsx)("g",{className:Se(["react-flow__connection",Pd(l)]),children:(0,D.jsx)(vv,{style:t,type:n,CustomComponent:r,isValid:l})})})}var vv=({style:e,type:t=jt.Bezier,CustomComponent:n,isValid:r})=>{let{inProgress:o,from:i,fromNode:s,fromHandle:l,fromPosition:a,to:u,toNode:c,toHandle:f,toPosition:d,pointer:h}=YM();if(!o)return;if(n)return(0,D.jsx)(n,{connectionLineType:t,connectionLineStyle:e,fromNode:s,fromHandle:l,fromX:i.x,fromY:i.y,toX:u.x,toY:u.y,fromPosition:a,toPosition:d,connectionStatus:Pd(r),toNode:c,toHandle:f,pointer:h});let m="",w={sourceX:i.x,sourceY:i.y,sourcePosition:a,targetX:u.x,targetY:u.y,targetPosition:d};switch(t){case jt.Bezier:[m]=Bl(w);break;case jt.SimpleBezier:[m]=iv(w);break;case jt.Step:[m]=Pi({...w,borderRadius:0});break;case jt.SmoothStep:[m]=Pi(w);break;default:[m]=Hl(w)}return(0,D.jsx)("path",{d:m,fill:"none",className:"react-flow__connection-path",style:e})};vv.displayName="ConnectionLine";var GM={};function $y(e=GM){let t=(0,T.useRef)(e),n=ge();(0,T.useEffect)(()=>{},[e])}function ZM(){let e=ge(),t=(0,T.useRef)(!1);(0,T.useEffect)(()=>{},[])}function wv({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:r,onEdgeClick:o,onNodeDoubleClick:i,onEdgeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,onSelectionContextMenu:f,onSelectionStart:d,onSelectionEnd:h,connectionLineType:m,connectionLineStyle:w,connectionLineComponent:x,connectionLineContainerStyle:g,selectionKeyCode:y,selectionOnDrag:p,selectionMode:v,multiSelectionKeyCode:k,panActivationKeyCode:S,zoomActivationKeyCode:_,deleteKeyCode:N,onlyRenderVisibleElements:M,elementsSelectable:A,defaultViewport:R,translateExtent:V,minZoom:B,maxZoom:E,preventScrolling:b,defaultMarkerColor:I,zoomOnScroll:P,zoomOnPinch:L,panOnScroll:z,panOnScrollSpeed:F,panOnScrollMode:H,zoomOnDoubleClick:Y,panOnDrag:ne,autoPanOnSelection:U,onPaneClick:te,onPaneMouseEnter:re,onPaneMouseMove:ee,onPaneMouseLeave:$,onPaneScroll:G,onPaneContextMenu:O,paneClickDistance:W,nodeClickDistance:q,onEdgeContextMenu:Z,onEdgeMouseEnter:J,onEdgeMouseMove:ie,onEdgeMouseLeave:se,reconnectRadius:Te,onReconnect:Ut,onReconnectStart:Ot,onReconnectEnd:Tt,noDragClassName:Yt,noWheelClassName:wo,noPanClassName:jn,disableKeyboardA11y:Wn,nodeExtent:wt,rfId:qt,viewport:Xt,onViewportChange:Un,nodesDraggable:sa}){return $y(e),$y(t),ZM(),VM(n),WM(Xt),(0,D.jsx)(hM,{onPaneClick:te,onPaneMouseEnter:re,onPaneMouseMove:ee,onPaneMouseLeave:$,onPaneContextMenu:O,onPaneScroll:G,paneClickDistance:W,deleteKeyCode:N,selectionKeyCode:y,selectionOnDrag:p,selectionMode:v,onSelectionStart:d,onSelectionEnd:h,multiSelectionKeyCode:k,panActivationKeyCode:S,zoomActivationKeyCode:_,elementsSelectable:A,zoomOnScroll:P,zoomOnPinch:L,zoomOnDoubleClick:Y,panOnScroll:z,panOnScrollSpeed:F,panOnScrollMode:H,panOnDrag:ne,autoPanOnSelection:U,defaultViewport:R,translateExtent:V,minZoom:B,maxZoom:E,onSelectionContextMenu:f,preventScrolling:b,noDragClassName:Yt,noWheelClassName:wo,noPanClassName:jn,disableKeyboardA11y:Wn,onViewportChange:Un,isControlledViewport:!!Xt,children:(0,D.jsxs)(FM,{children:[(0,D.jsx)(HM,{edgeTypes:t,onEdgeClick:o,onEdgeDoubleClick:s,onReconnect:Ut,onReconnectStart:Ot,onReconnectEnd:Tt,onlyRenderVisibleElements:M,onEdgeContextMenu:Z,onEdgeMouseEnter:J,onEdgeMouseMove:ie,onEdgeMouseLeave:se,reconnectRadius:Te,defaultMarkerColor:I,noPanClassName:jn,disableKeyboardA11y:Wn,rfId:qt}),(0,D.jsx)(XM,{style:w,type:m,component:x,containerStyle:g}),(0,D.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,D.jsx)(SM,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:l,onNodeMouseMove:a,onNodeMouseLeave:u,onNodeContextMenu:c,nodeClickDistance:q,onlyRenderVisibleElements:M,noPanClassName:jn,noDragClassName:Yt,disableKeyboardA11y:Wn,nodeExtent:wt,rfId:qt,nodesDraggable:sa}),(0,D.jsx)("div",{className:"react-flow__viewport-portal"})]})})}wv.displayName="GraphView";var QM=(0,T.memo)(wv),KM=Cd("React Flow","https://reactflow.dev/"),By=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a=.5,maxZoom:u=2,nodeOrigin:c,nodeExtent:f,zIndexMode:d="basic"}={})=>{let h=new Map,m=new Map,w=new Map,x=new Map,g=r??t??[],y=n??e??[],p=c??[0,0],v=f??co;Bd(w,x,g);let{nodesInitialized:k}=Vl(y,h,m,{nodeOrigin:p,nodeExtent:v,zIndexMode:d}),S=[0,0,1];if(s&&o&&i){let _=fo(h,{filter:R=>!!((R.width||R.initialWidth)&&(R.height||R.initialHeight))}),{x:N,y:M,zoom:A}=Ii(_,o,i,a,u,l?.padding??.1);S=[N,M,A]}return{rfId:"1",width:o??0,height:i??0,transform:S,nodes:y,nodesInitialized:k,nodeLookup:h,parentLookup:m,edges:g,edgeLookup:x,connectionLookup:w,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:a,maxZoom:u,translateExtent:co,nodeExtent:v,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Bn.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:p,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:s??!1,fitViewOptions:l,fitViewResolver:null,connection:{...wd},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:KM,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:vd,zIndexMode:d,defaultEdgeOptions:void 0,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0}},JM=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:f,zIndexMode:d})=>py((h,m)=>{async function w(){let{nodeLookup:x,panZoom:g,fitViewOptions:y,fitViewResolver:p,width:v,height:k,minZoom:S,maxZoom:_}=m();g&&(await C0({nodes:x,width:v,height:k,panZoom:g,minZoom:S,maxZoom:_},y),p?.resolve(!0),h({fitViewResolver:null}))}return{...By({nodes:e,edges:t,width:o,height:i,fitView:s,fitViewOptions:l,minZoom:a,maxZoom:u,nodeOrigin:c,nodeExtent:f,defaultNodes:n,defaultEdges:r,zIndexMode:d}),setNodes:x=>{let{nodeLookup:g,parentLookup:y,nodeOrigin:p,nodeExtent:v,elevateNodesOnSelect:k,fitViewQueued:S,zIndexMode:_,nodesSelectionActive:N}=m(),{nodesInitialized:M,hasSelectedNodes:A}=Vl(x,g,y,{nodeOrigin:p,nodeExtent:v,elevateNodesOnSelect:k,checkEquality:!0,zIndexMode:_}),R=N&&A;S&&M?(w(),h({nodes:x,nodesInitialized:M,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:R})):h({nodes:x,nodesInitialized:M,nodesSelectionActive:R})},setEdges:x=>{let{connectionLookup:g,edgeLookup:y}=m();Bd(g,y,x),h({edges:x})},setDefaultNodesAndEdges:(x,g)=>{if(x){let{setNodes:y}=m();y(x),h({hasDefaultNodes:!0})}if(g){let{setEdges:y}=m();y(g),h({hasDefaultEdges:!0})}},updateNodeInternals:x=>{let{triggerNodeChanges:g,nodeLookup:y,parentLookup:p,domNode:v,nodeOrigin:k,nodeExtent:S,debug:_,fitViewQueued:N,zIndexMode:M}=m(),{changes:A,updatedInternals:R}=H0(x,y,p,v,k,S,M);R&&($0(y,p,{nodeOrigin:k,nodeExtent:S,zIndexMode:M}),N?(w(),h({fitViewQueued:!1,fitViewOptions:void 0})):h({}),A?.length>0&&(_&&console.log("React Flow: trigger node changes",A),g?.(A)))},updateNodePositions:(x,g=!1)=>{let y=[],p=[],{nodeLookup:v,triggerNodeChanges:k,connection:S,updateConnection:_,onNodesChangeMiddlewareMap:N}=m();for(let[M,A]of x){let R=v.get(M),V=!!(R?.expandParent&&R?.parentId&&A?.position),B={id:M,type:"position",position:V?{x:Math.max(0,A.position.x),y:Math.max(0,A.position.y)}:A.position,dragging:g};if(R&&S.inProgress&&S.fromNode.id===R.id){let E=Hn(R,S.fromHandle,Q.Left,!0);_({...S,from:E})}V&&R.parentId&&y.push({id:M,parentId:R.parentId,rect:{...A.internals.positionAbsolute,width:A.measured.width??0,height:A.measured.height??0}}),p.push(B)}if(y.length>0){let{parentLookup:M,nodeOrigin:A}=m(),R=jl(y,v,M,A);p.push(...R)}for(let M of N.values())p=M(p);k(p)},triggerNodeChanges:x=>{let{onNodesChange:g,setNodes:y,nodes:p,hasDefaultNodes:v,debug:k}=m();if(x?.length){if(v){let S=Yy(x,p);y(S)}k&&console.log("React Flow: trigger node changes",x),g?.(x)}},triggerEdgeChanges:x=>{let{onEdgesChange:g,setEdges:y,edges:p,hasDefaultEdges:v,debug:k}=m();if(x?.length){if(v){let S=qy(x,p);y(S)}k&&console.log("React Flow: trigger edge changes",x),g?.(x)}},addSelectedNodes:x=>{let{multiSelectionActive:g,edgeLookup:y,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:k}=m();if(g){let S=x.map(_=>wr(_,!0));v(S);return}v(vo(p,new Set([...x]))),k(vo(y))},addSelectedEdges:x=>{let{multiSelectionActive:g,edgeLookup:y,nodeLookup:p,triggerNodeChanges:v,triggerEdgeChanges:k}=m();if(g){let S=x.map(_=>wr(_,!0));k(S);return}k(vo(y,new Set([...x]))),v(vo(p,new Set))},unselectNodesAndEdges:({nodes:x,edges:g}={})=>{let{edges:y,nodes:p,nodeLookup:v,triggerNodeChanges:k,triggerEdgeChanges:S}=m(),_=x||p,N=g||y,M=[];for(let R of _)R.selected&&M.push(wr(R.id,!1));let A=[];for(let R of N)R.selected&&A.push(wr(R.id,!1));k(M),S(A)},setMinZoom:x=>{let{panZoom:g,maxZoom:y}=m();g?.setScaleExtent([x,y]),h({minZoom:x})},setMaxZoom:x=>{let{panZoom:g,minZoom:y}=m();g?.setScaleExtent([y,x]),h({maxZoom:x})},setTranslateExtent:x=>{m().panZoom?.setTranslateExtent(x),h({translateExtent:x})},resetSelectedElements:()=>{let{edges:x,nodes:g,triggerNodeChanges:y,triggerEdgeChanges:p,elementsSelectable:v}=m();if(!v)return;let k=g.reduce((_,N)=>N.selected?[..._,wr(N.id,!1)]:_,[]),S=x.reduce((_,N)=>N.selected?[..._,wr(N.id,!1)]:_,[]);y(k),p(S)},setNodeExtent:x=>{let{nodes:g,nodeLookup:y,parentLookup:p,nodeOrigin:v,elevateNodesOnSelect:k,nodeExtent:S,zIndexMode:_}=m();x[0][0]===S[0][0]&&x[0][1]===S[0][1]&&x[1][0]===S[1][0]&&x[1][1]===S[1][1]||(Vl(g,y,p,{nodeOrigin:v,nodeExtent:x,elevateNodesOnSelect:k,checkEquality:!1,zIndexMode:_}),h({nodeExtent:x}))},panBy:x=>{let{transform:g,width:y,height:p,panZoom:v,translateExtent:k}=m();return F0({delta:x,panZoom:v,transform:g,translateExtent:k,width:y,height:p})},setCenter:async(x,g,y)=>{let{width:p,height:v,maxZoom:k,panZoom:S}=m();if(!S)return!1;let _=typeof y?.zoom<"u"?y.zoom:k;return await S.setViewport({x:p/2-x*_,y:v/2-g*_,zoom:_},{duration:y?.duration,ease:y?.ease,interpolate:y?.interpolate}),!0},cancelConnection:()=>{h({connection:{...wd}})},updateConnection:x=>{h({connection:x})},reset:()=>h({...By()})}},Object.is);function Yd({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:r,initialWidth:o,initialHeight:i,initialMinZoom:s,initialMaxZoom:l,initialFitViewOptions:a,fitView:u,nodeOrigin:c,nodeExtent:f,zIndexMode:d,children:h}){let[m]=(0,T.useState)(()=>JM({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:o,height:i,fitView:u,minZoom:s,maxZoom:l,fitViewOptions:a,nodeOrigin:c,nodeExtent:f,zIndexMode:d}));return(0,D.jsx)(gb,{value:m,children:(0,D.jsx)(Bb,{children:(0,D.jsx)(eM,{children:h})})})}function eI({children:e,nodes:t,edges:n,defaultNodes:r,defaultEdges:o,width:i,height:s,fitView:l,fitViewOptions:a,minZoom:u,maxZoom:c,nodeOrigin:f,nodeExtent:d,zIndexMode:h}){return(0,T.useContext)(Zl)?(0,D.jsx)(D.Fragment,{children:e}):(0,D.jsx)(Yd,{initialNodes:t,initialEdges:n,defaultNodes:r,defaultEdges:o,initialWidth:i,initialHeight:s,fitView:l,initialFitViewOptions:a,initialMinZoom:u,initialMaxZoom:c,nodeOrigin:f,nodeExtent:d,zIndexMode:h,children:e})}var tI={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function nI({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:i,edgeTypes:s,onNodeClick:l,onEdgeClick:a,onInit:u,onMove:c,onMoveStart:f,onMoveEnd:d,onConnect:h,onConnectStart:m,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:g,onNodeMouseEnter:y,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:k,onNodeDoubleClick:S,onNodeDragStart:_,onNodeDrag:N,onNodeDragStop:M,onNodesDelete:A,onEdgesDelete:R,onDelete:V,onSelectionChange:B,onSelectionDragStart:E,onSelectionDrag:b,onSelectionDragStop:I,onSelectionContextMenu:P,onSelectionStart:L,onSelectionEnd:z,onBeforeDelete:F,connectionMode:H,connectionLineType:Y=jt.Bezier,connectionLineStyle:ne,connectionLineComponent:U,connectionLineContainerStyle:te,deleteKeyCode:re="Backspace",selectionKeyCode:ee="Shift",selectionOnDrag:$=!1,selectionMode:G=gr.Full,panActivationKeyCode:O="Space",multiSelectionKeyCode:W=mo()?"Meta":"Control",zoomActivationKeyCode:q=mo()?"Meta":"Control",snapToGrid:Z,snapGrid:J,onlyRenderVisibleElements:ie=!1,selectNodesOnDrag:se,nodesDraggable:Te,autoPanOnNodeFocus:Ut,nodesConnectable:Ot,nodesFocusable:Tt,nodeOrigin:Yt=Wy,edgesFocusable:wo,edgesReconnectable:jn,elementsSelectable:Wn=!0,defaultViewport:wt=Mb,minZoom:qt=.5,maxZoom:Xt=2,translateExtent:Un=co,preventScrolling:sa=!0,nodeExtent:la,defaultMarkerColor:ex="#b1b1b7",zoomOnScroll:tx=!0,zoomOnPinch:nx=!0,panOnScroll:rx=!1,panOnScrollSpeed:ox=.5,panOnScrollMode:ix=dn.Free,zoomOnDoubleClick:sx=!0,panOnDrag:lx=!0,onPaneClick:ax,onPaneMouseEnter:ux,onPaneMouseMove:cx,onPaneMouseLeave:dx,onPaneScroll:fx,onPaneContextMenu:hx,paneClickDistance:px=1,nodeClickDistance:gx=0,children:mx,onReconnect:yx,onReconnectStart:vx,onReconnectEnd:wx,onEdgeContextMenu:xx,onEdgeDoubleClick:Ex,onEdgeMouseEnter:Sx,onEdgeMouseMove:kx,onEdgeMouseLeave:_x,reconnectRadius:Nx=10,onNodesChange:Cx,onEdgesChange:bx,noDragClassName:Mx="nodrag",noWheelClassName:Ix="nowheel",noPanClassName:mf="nopan",fitView:yf,fitViewOptions:vf,connectOnClick:Px,attributionPosition:Ox,proOptions:Tx,defaultEdgeOptions:Dx,elevateNodesOnSelect:Lx=!0,elevateEdgesOnSelect:zx=!1,disableKeyboardA11y:wf=!1,autoPanOnConnect:Ax,autoPanOnNodeDrag:Rx,autoPanOnSelection:$x=!0,autoPanSpeed:Bx,connectionRadius:Hx,isValidConnection:Fx,onError:Vx,style:jx,id:xf,nodeDragThreshold:Wx,connectionDragThreshold:Ux,viewport:Yx,onViewportChange:qx,width:Xx,height:Gx,colorMode:Zx="light",debug:Qx,onScroll:Ef,ariaLabelConfig:Kx,zIndexMode:Sf="basic",...Jx},eE){let aa=xf||"1",tE=Tb(Zx),nE=(0,T.useCallback)(kf=>{kf.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ef?.(kf)},[Ef]);return(0,D.jsx)("div",{"data-testid":"rf__wrapper",...Jx,onScroll:nE,style:{...jx,...tI},ref:eE,className:Se(["react-flow",o,tE]),id:xf,role:"application",children:(0,D.jsxs)(eI,{nodes:e,edges:t,width:Xx,height:Gx,fitView:yf,fitViewOptions:vf,minZoom:qt,maxZoom:Xt,nodeOrigin:Yt,nodeExtent:la,zIndexMode:Sf,children:[(0,D.jsx)(Ob,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:m,onConnectEnd:w,onClickConnectStart:x,onClickConnectEnd:g,nodesDraggable:Te,autoPanOnNodeFocus:Ut,nodesConnectable:Ot,nodesFocusable:Tt,edgesFocusable:wo,edgesReconnectable:jn,elementsSelectable:Wn,elevateNodesOnSelect:Lx,elevateEdgesOnSelect:zx,minZoom:qt,maxZoom:Xt,nodeExtent:la,onNodesChange:Cx,onEdgesChange:bx,snapToGrid:Z,snapGrid:J,connectionMode:H,translateExtent:Un,connectOnClick:Px,defaultEdgeOptions:Dx,fitView:yf,fitViewOptions:vf,onNodesDelete:A,onEdgesDelete:R,onDelete:V,onNodeDragStart:_,onNodeDrag:N,onNodeDragStop:M,onSelectionDrag:b,onSelectionDragStart:E,onSelectionDragStop:I,onMove:c,onMoveStart:f,onMoveEnd:d,noPanClassName:mf,nodeOrigin:Yt,rfId:aa,autoPanOnConnect:Ax,autoPanOnNodeDrag:Rx,autoPanSpeed:Bx,onError:Vx,connectionRadius:Hx,isValidConnection:Fx,selectNodesOnDrag:se,nodeDragThreshold:Wx,connectionDragThreshold:Ux,onBeforeDelete:F,debug:Qx,ariaLabelConfig:Kx,zIndexMode:Sf}),(0,D.jsx)(QM,{onInit:u,onNodeClick:l,onEdgeClick:a,onNodeMouseEnter:y,onNodeMouseMove:p,onNodeMouseLeave:v,onNodeContextMenu:k,onNodeDoubleClick:S,nodeTypes:i,edgeTypes:s,connectionLineType:Y,connectionLineStyle:ne,connectionLineComponent:U,connectionLineContainerStyle:te,selectionKeyCode:ee,selectionOnDrag:$,selectionMode:G,deleteKeyCode:re,multiSelectionKeyCode:W,panActivationKeyCode:O,zoomActivationKeyCode:q,onlyRenderVisibleElements:ie,defaultViewport:wt,translateExtent:Un,minZoom:qt,maxZoom:Xt,preventScrolling:sa,zoomOnScroll:tx,zoomOnPinch:nx,zoomOnDoubleClick:sx,panOnScroll:rx,panOnScrollSpeed:ox,panOnScrollMode:ix,panOnDrag:lx,autoPanOnSelection:$x,onPaneClick:ax,onPaneMouseEnter:ux,onPaneMouseMove:cx,onPaneMouseLeave:dx,onPaneScroll:fx,onPaneContextMenu:hx,paneClickDistance:px,nodeClickDistance:gx,onSelectionContextMenu:P,onSelectionStart:L,onSelectionEnd:z,onReconnect:yx,onReconnectStart:vx,onReconnectEnd:wx,onEdgeContextMenu:xx,onEdgeDoubleClick:Ex,onEdgeMouseEnter:Sx,onEdgeMouseMove:kx,onEdgeMouseLeave:_x,reconnectRadius:Nx,defaultMarkerColor:ex,noDragClassName:Mx,noWheelClassName:Ix,noPanClassName:mf,rfId:aa,disableKeyboardA11y:wf,nodeExtent:la,viewport:Yx,onViewportChange:qx,nodesDraggable:Te}),(0,D.jsx)(bb,{onSelectionChange:B}),mx,(0,D.jsx)(Sb,{proOptions:Tx,position:Ox}),(0,D.jsx)(Eb,{rfId:aa,disableKeyboardA11y:wf})]})})}var xv=Xy(nI);function Ev(e){let[t,n]=(0,T.useState)(e),r=(0,T.useCallback)(o=>n(i=>Yy(o,i)),[]);return[t,n,r]}function Sv(e){let[t,n]=(0,T.useState)(e),r=(0,T.useCallback)(o=>n(i=>qy(o,i)),[]);return[t,n,r]}var TD=st.error014();function rI({dimensions:e,lineWidth:t,variant:n,className:r}){return(0,D.jsx)("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Se(["react-flow__background-pattern",n,r])})}function oI({radius:e,className:t}){return(0,D.jsx)("circle",{cx:e,cy:e,r:e,className:Se(["react-flow__background-pattern","dots",t])})}var Vn;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Vn||(Vn={}));var iI={[Vn.Dots]:1,[Vn.Lines]:1,[Vn.Cross]:6},sI=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function kv({id:e,variant:t=Vn.Dots,gap:n=20,size:r,lineWidth:o=1,offset:i=0,color:s,bgColor:l,style:a,className:u,patternClassName:c}){let f=(0,T.useRef)(null),{transform:d,patternId:h}=ue(sI,ye),m=r||iI[t],w=t===Vn.Dots,x=t===Vn.Cross,g=Array.isArray(n)?n:[n,n],y=[g[0]*d[2]||1,g[1]*d[2]||1],p=m*d[2],v=Array.isArray(i)?i:[i,i],k=x?[p,p]:y,S=[v[0]*d[2]+k[0]/2,v[1]*d[2]+k[1]/2],_=`${h}${e||""}`;return(0,D.jsxs)("svg",{className:Se(["react-flow__background",u]),style:{...a,...Kl,"--xy-background-color-props":l,"--xy-background-pattern-color-props":s},ref:f,"data-testid":"rf__background",children:[(0,D.jsx)("pattern",{id:_,x:d[0]%y[0],y:d[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`,children:w?(0,D.jsx)(oI,{radius:p/2,className:c}):(0,D.jsx)(rI,{dimensions:k,lineWidth:o,variant:t,className:c})}),(0,D.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${_})`})]})}kv.displayName="Background";var _v=(0,T.memo)(kv);function lI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,D.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function aI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,D.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function uI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,D.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function cI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,D.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function dI(){return(0,D.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,D.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Xl({children:e,className:t,...n}){return(0,D.jsx)("button",{type:"button",className:Se(["react-flow__controls-button",t]),...n,children:e})}var fI=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function Nv({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:o,onZoomIn:i,onZoomOut:s,onFitView:l,onInteractiveChange:a,className:u,children:c,position:f="bottom-left",orientation:d="vertical","aria-label":h}){let m=ge(),{isInteractive:w,minZoomReached:x,maxZoomReached:g,ariaLabelConfig:y}=ue(fI,ye),{zoomIn:p,zoomOut:v,fitView:k}=Ti(),S=()=>{p(),i?.()},_=()=>{v(),s?.()},N=()=>{k(o),l?.()},M=()=>{m.setState({nodesDraggable:!w,nodesConnectable:!w,elementsSelectable:!w}),a?.(!w)};return(0,D.jsxs)(Ql,{className:Se(["react-flow__controls",d==="horizontal"?"horizontal":"vertical",u]),position:f,style:e,"data-testid":"rf__controls","aria-label":h??y["controls.ariaLabel"],children:[t&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(Xl,{onClick:S,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:g,children:(0,D.jsx)(lI,{})}),(0,D.jsx)(Xl,{onClick:_,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:x,children:(0,D.jsx)(aI,{})})]}),n&&(0,D.jsx)(Xl,{className:"react-flow__controls-fitview",onClick:N,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:(0,D.jsx)(uI,{})}),r&&(0,D.jsx)(Xl,{className:"react-flow__controls-interactive",onClick:M,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:w?(0,D.jsx)(dI,{}):(0,D.jsx)(cI,{})}),c]})}Nv.displayName="Controls";var DD=(0,T.memo)(Nv);function hI({id:e,x:t,y:n,width:r,height:o,style:i,color:s,strokeColor:l,strokeWidth:a,className:u,borderRadius:c,shapeRendering:f,selected:d,onClick:h}){let{background:m,backgroundColor:w}=i||{},x=s||m||w;return(0,D.jsx)("rect",{className:Se(["react-flow__minimap-node",{selected:d},u]),x:t,y:n,rx:c,ry:c,width:r,height:o,style:{fill:x,stroke:l,strokeWidth:a},shapeRendering:f,onClick:h?g=>h(g,e):void 0})}var pI=(0,T.memo)(hI),gI=e=>e.nodes.map(t=>t.id),jd=e=>e instanceof Function?e:()=>e;function mI({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:o,nodeComponent:i=pI,onClick:s}){let l=ue(gI,ye),a=jd(t),u=jd(e),c=jd(n),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return(0,D.jsx)(D.Fragment,{children:l.map(d=>(0,D.jsx)(vI,{id:d,nodeColorFunc:a,nodeStrokeColorFunc:u,nodeClassNameFunc:c,nodeBorderRadius:r,nodeStrokeWidth:o,NodeComponent:i,onClick:s,shapeRendering:f},d))})}function yI({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:r,nodeBorderRadius:o,nodeStrokeWidth:i,shapeRendering:s,NodeComponent:l,onClick:a}){let{node:u,x:c,y:f,width:d,height:h}=ue(m=>{let w=m.nodeLookup.get(e);if(!w)return{node:void 0,x:0,y:0,width:0,height:0};let x=w.internals.userNode,{x:g,y}=w.internals.positionAbsolute,{width:p,height:v}=mt(x);return{node:x,x:g,y,width:p,height:v}},ye);return!u||u.hidden||!bd(u)?null:(0,D.jsx)(l,{x:c,y:f,width:d,height:h,style:u.style,selected:!!u.selected,className:r(u),color:t(u),borderRadius:o,strokeColor:n(u),strokeWidth:i,shapeRendering:s,onClick:a,id:u.id})}var vI=(0,T.memo)(yI),wI=(0,T.memo)(mI),xI=200,EI=150,SI=e=>!e.hidden,kI=e=>{let t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},n=!1;for(let r of e.nodeLookup.values())if(!r.hidden){n=!0;break}return{viewBB:t,boundingRect:n?_d(fo(e.nodeLookup,{filter:SI}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},Hy=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,_I=(e,t)=>Hy(e.viewBB,t.viewBB)&&Hy(e.boundingRect,t.boundingRect)&&e.rfId===t.rfId&&e.panZoom===t.panZoom&&e.translateExtent===t.translateExtent&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight&&e.ariaLabelConfig===t.ariaLabelConfig,NI="react-flow__minimap-desc";function Cv({style:e,className:t,nodeStrokeColor:n,nodeColor:r,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:s,nodeComponent:l,bgColor:a,maskColor:u,maskStrokeColor:c,maskStrokeWidth:f,position:d="bottom-right",onClick:h,onNodeClick:m,pannable:w=!1,zoomable:x=!1,ariaLabel:g,inversePan:y,zoomStep:p=1,offsetScale:v=5}){let k=ge(),S=(0,T.useRef)(null),{boundingRect:_,panZoom:N,viewBB:M,rfId:A,translateExtent:R,flowWidth:V,flowHeight:B,ariaLabelConfig:E}=ue(kI,_I),b=e?.width??xI,I=e?.height??EI,P=_.width/b,L=_.height/I,z=Math.max(P,L),F=z*b,H=z*I,Y=v*z,ne=_.x-(F-_.width)/2-Y,U=_.y-(H-_.height)/2-Y,te=F+Y*2,re=H+Y*2,ee=`${NI}-${A}`,$=(0,T.useRef)(0),G=(0,T.useRef)();$.current=z,(0,T.useEffect)(()=>{let J=k.getState().panZoom;if(S.current&&J)return G.current=X0({domNode:S.current,panZoom:J,getTransform:()=>k.getState().transform,getViewScale:()=>$.current}),()=>{G.current?.destroy()}},[N]),(0,T.useEffect)(()=>{G.current?.update({translateExtent:R,width:V,height:B,inversePan:y,pannable:w,zoomStep:p,zoomable:x})},[w,x,y,p,R,V,B]);let O=h?J=>{let[ie,se]=G.current?.pointer(J)||[0,0];h(J,{x:ie,y:se})}:void 0,W=(0,T.useCallback)((J,ie)=>{let se=k.getState().nodeLookup.get(ie).internals.userNode;m?.(J,se)},[m]),q=m?W:void 0,Z=g??E["minimap.ariaLabel"];return(0,D.jsx)(Ql,{position:d,style:{...e,"--xy-minimap-background-color-props":typeof a=="string"?a:void 0,"--xy-minimap-mask-background-color-props":typeof u=="string"?u:void 0,"--xy-minimap-mask-stroke-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-stroke-width-props":typeof f=="number"?f*z:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof s=="number"?s:void 0},className:Se(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:(0,D.jsxs)("svg",{width:b,height:I,viewBox:`${ne} ${U} ${te} ${re}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:S,onClick:O,children:[Z&&(0,D.jsx)("title",{id:ee,children:Z}),(0,D.jsx)(wI,{onClick:q,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:o,nodeStrokeWidth:s,nodeComponent:l}),(0,D.jsx)("path",{className:"react-flow__minimap-mask",d:`M${ne-Y},${U-Y}h${te+Y*2}v${re+Y*2}h${-te-Y*2}z
|
|
1840
|
+
M${M.x},${M.y}h${M.width}v${M.height}h${-M.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Cv.displayName="MiniMap";var bv=(0,T.memo)(Cv),CI=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,bI={[Fn.Line]:"right",[Fn.Handle]:"bottom-right"};function MI({nodeId:e,position:t,variant:n=Fn.Handle,className:r,style:o=void 0,children:i,color:s,minWidth:l=10,minHeight:a=10,maxWidth:u=Number.MAX_VALUE,maxHeight:c=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:d,autoScale:h=!0,shouldResize:m,onResizeStart:w,onResize:x,onResizeEnd:g}){let y=Jy(),p=typeof e=="string"?e:y,v=ge(),k=(0,T.useRef)(null),S=n===Fn.Handle,_=ue((0,T.useCallback)(CI(S&&h),[S,h]),ye),N=(0,T.useRef)(null),M=t??bI[n];(0,T.useEffect)(()=>{if(!(!k.current||!p))return N.current||(N.current=J0({domNode:k.current,nodeId:p,getStoreItems:()=>{let{nodeLookup:R,transform:V,snapGrid:B,snapToGrid:E,nodeOrigin:b,domNode:I}=v.getState();return{nodeLookup:R,transform:V,snapGrid:B,snapToGrid:E,nodeOrigin:b,paneDomNode:I}},onChange:(R,V)=>{let{triggerNodeChanges:B,nodeLookup:E,parentLookup:b,nodeOrigin:I}=v.getState(),P=[],L={x:R.x,y:R.y},z=E.get(p);if(z&&z.expandParent&&z.parentId){let F=z.origin??I,H=R.width??z.measured.width??0,Y=R.height??z.measured.height??0,ne={id:z.id,parentId:z.parentId,rect:{width:H,height:Y,...Md({x:R.x??z.position.x,y:R.y??z.position.y},{width:H,height:Y},z.parentId,E,F)}},U=jl([ne],E,b,I);P.push(...U),L.x=R.x?Math.max(F[0]*H,R.x):void 0,L.y=R.y?Math.max(F[1]*Y,R.y):void 0}if(L.x!==void 0&&L.y!==void 0){let F={id:p,type:"position",position:{...L}};P.push(F)}if(R.width!==void 0&&R.height!==void 0){let H={id:p,type:"dimensions",resizing:!0,setAttributes:d?d==="horizontal"?"width":"height":!0,dimensions:{width:R.width,height:R.height}};P.push(H)}for(let F of V){let H={...F,type:"position"};P.push(H)}B(P)},onEnd:({width:R,height:V})=>{let B={id:p,type:"dimensions",resizing:!1,dimensions:{width:R,height:V}};v.getState().triggerNodeChanges([B])}})),N.current.update({controlPosition:M,boundaries:{minWidth:l,minHeight:a,maxWidth:u,maxHeight:c},keepAspectRatio:f,resizeDirection:d,onResizeStart:w,onResize:x,onResizeEnd:g,shouldResize:m}),()=>{N.current?.destroy()}},[M,l,a,u,c,f,w,x,g,m]);let A=M.split("-");return(0,D.jsx)("div",{className:Se(["react-flow__resize-control","nodrag",...A,n,r]),ref:k,style:{...o,scale:_,...s&&{[S?"backgroundColor":"borderColor"]:s}},children:i})}var LD=(0,T.memo)(MI);var pf=Dt(Z1(),1),C=Dt(il(),1),Q1={zh:{skipToCanvas:"\u8DF3\u8F6C\u5230\u4EA4\u4E92\u753B\u5E03",modelPrefix:"\u751F\u6210\u6A21\u578B\uFF1A",backParent:"\u8FD4\u56DE\u4E0A\u7EA7\u5730\u56FE",levelOverview:"L0 \u5168\u666F\u56FE\u8C31",levelSubPrefix:"L1+ \u6DF1\u5EA6\u4E13\u9898\uFF1A",allStreams:"\u5168\u90E8\u8109\u7EDC",searchLabel:"\u641C\u7D22\u8282\u70B9\u4E0E\u63D0\u793A\u8BCD",searchPlaceholder:"\u641C\u7D22\u6982\u5FF5\u3001\u673A\u5236\u3001\u8DEF\u5F84\u6216\u8FFD\u95EE\u2026",zoomIn:"\u653E\u5927",zoomOut:"\u7F29\u5C0F",lock:"\u9501\u5B9A\u4F4D\u7F6E",unlock:"\u5DF2\u9501\u5B9A",fitView:"\u9002\u914D\u5168\u56FE",reset:"\u91CD\u7F6E",legend:"\u56FE\u4F8B",scopeNotes:"\u8303\u56F4\u4E0E\u5F85\u786E\u8BA4",learningPath:"\u63A8\u8350\u987A\u5E8F",expandDetail:"\u5C55\u5F00\u7EC6\u8282",collapseDetail:"\u6536\u8D77\u7EC6\u8282",detailEdgeLabel:"\u4E0B\u94BB\u7EC6\u8282",deepDiveBadgeTitle:"\u6253\u5F00\u7EE7\u7EED\u6DF1\u6316\u63D0\u793A\u8BCD",deepDiveModalTitle:"\u7EE7\u7EED\u6DF1\u6F5C\uFF08Atlas Loop\uFF09",tabAsk:"\u5B9A\u5411\u8FFD\u95EE",tabRecursive:"\u9012\u5F52\u751F\u6210\u5B50\u5730\u56FE",copyBtn:"\u590D\u5236\u63D0\u793A\u8BCD",copiedBtn:"\u5DF2\u590D\u5236",copySnippet:"\u590D\u5236\u7247\u6BB5",openInEditor:"\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00",editorConfirmHint:"\u9996\u6B21\u70B9\u51FB\u65F6\u6D4F\u89C8\u5668\u53EF\u80FD\u4F1A\u8BF7\u6C42\u6253\u5F00\u5916\u90E8\u7F16\u8F91\u5668\u6743\u9650\uFF1B\u82E5\u6587\u4EF6\u79FB\u52A8\u8BF7\u91CD\u65B0\u751F\u6210\u3002",recursiveUsageHint:"\u5C06\u4E0B\u65B9\u63D0\u793A\u8BCD\u53D1\u9001\u7ED9 AI\uFF0C\u5373\u53EF\u56F4\u7ED5\u5F53\u524D\u8282\u70B9\u9012\u5F52\u751F\u6210\u4E0B\u4E00\u5C42\u72EC\u7ACB\u4EA4\u4E92\u5F0F HTML \u5B50\u5730\u56FE\uFF1A",whatItDoes:"\u6838\u5FC3\u8BF4\u660E",whyItMatters:"\u5173\u952E\u4EF7\u503C",inputsLabel:"\u524D\u7F6E / \u8F93\u5165",outputsLabel:"\u7ED3\u679C / \u4EA7\u51FA",mechanismsLabel:"\u5185\u90E8\u673A\u5236\u4E0E\u5F71\u54CD",watchoutsLabel:"\u7406\u89E3\u6CE8\u610F\u70B9",anchorsLabel:"\u5173\u8054\u4F9D\u636E\u4E0E\u951A\u70B9",openDeepDiveBtn:"\u67E5\u770B\u8FDB\u9636\u8FFD\u95EE\u4E0E\u9012\u5F52\u6307\u4EE4",unverifiedTag:"\u5F85\u786E\u8BA4",verifiedTag:"\u5DF2\u6838\u5B9E",uncoveredTitle:"\u672A\u8986\u76D6\u8303\u56F4",unverifiedTitle:"\u5F85\u786E\u8BA4\u9879\u8BF4\u660E",noSearchMatches:"\u65E0\u5339\u914D\u8282\u70B9",nestedBadge:"\u5185\u90E8\u7EC6\u8282",close:"\u5173\u95ED",roles:{entry:"\u8D77\u70B9 / \u547D\u9898",core:"\u6838\u5FC3\u673A\u5236",branch:"\u5224\u65AD / \u5206\u5C94",foundation:"\u5E95\u5C42\u57FA\u77F3",context:"\u5916\u90E8\u5173\u8054",extension:"\u5EF6\u4F38\u6F14\u5316",outcome:"\u6700\u7EC8\u7ED3\u8BBA"}},en:{skipToCanvas:"Skip to interactive canvas",modelPrefix:"Model: ",backParent:"Back to Parent Atlas",levelOverview:"L0 Overview",levelSubPrefix:"L1+ Focus: ",allStreams:"All Streams",searchLabel:"Search nodes & prompts",searchPlaceholder:"Search concepts, paths, or prompts\u2026",zoomIn:"Zoom In",zoomOut:"Zoom Out",lock:"Lock",unlock:"Locked",fitView:"Fit View",reset:"Reset",legend:"Legend",scopeNotes:"Scope & Notes",learningPath:"Learning Order",expandDetail:"Details",collapseDetail:"Collapse",detailEdgeLabel:"Drill-down",deepDiveBadgeTitle:"Open deep-dive prompts",deepDiveModalTitle:"Deep Dive (Atlas Loop)",tabAsk:"Follow-Up Prompts",tabRecursive:"Recursive Sub-Atlas",copyBtn:"Copy Prompt",copiedBtn:"Copied",copySnippet:"Copy Snippet",openInEditor:"Open in Editor",editorConfirmHint:"Your browser may ask permission to open the external editor. Regenerate if files move.",recursiveUsageHint:"Send this prompt to your AI agent to generate a linked child HTML atlas for this node:",whatItDoes:"Summary",whyItMatters:"Why It Matters",inputsLabel:"Inputs / Conditions",outputsLabel:"Outputs / Effects",mechanismsLabel:"Mechanism & Side Effects",watchoutsLabel:"Watchouts",anchorsLabel:"Evidence & Anchors",openDeepDiveBtn:"View Deep-Dive & Recursive Prompts",unverifiedTag:"Unverified",verifiedTag:"Verified",uncoveredTitle:"Uncovered Scope",unverifiedTitle:"Unverified Items",noSearchMatches:"No matching nodes",nestedBadge:"Sub-node",close:"Close",roles:{entry:"Entry / Thesis",core:"Core Mechanism",branch:"Decision / Branch",foundation:"Foundation",context:"Context",extension:"Extension",outcome:"Outcome"}}};function $T(e={}){let n=String(e.language||"en").toLowerCase().startsWith("zh")?Q1.zh:Q1.en,r=e.uiLabels&&typeof e.uiLabels=="object"?e.uiLabels:{};return{...n,...r,roles:{...n.roles,...r.roles||{}}}}var ia={entry:"#18181b",core:"#52525b",branch:"#b45309",foundation:"#334155",context:"#a1a1aa",extension:"#6366f1",outcome:"#15803d"};function BT(){return(0,C.jsxs)("svg",{className:"atlas-search-icon",width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,C.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,C.jsx)("path",{d:"m21 21-4.3-4.3"})]})}function HT({locked:e}){return e?(0,C.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,C.jsx)("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),(0,C.jsx)("path",{d:"M7 11V7a5 5 0 0 1 10 0v4"})]}):(0,C.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,C.jsx)("rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2"}),(0,C.jsx)("path",{d:"M7 11V7a5 5 0 0 1 9.9-1"})]})}function FT(){return(0,C.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,C.jsx)("path",{d:"m15 18-6-6 6-6"})})}function VT(e){return navigator.clipboard&&typeof navigator.clipboard.writeText=="function"?navigator.clipboard.writeText(e).catch(()=>K1(e)):Promise.resolve(K1(e))}function K1(e){let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.position="fixed",t.style.top="-9999px",t.style.left="-9999px",document.body.appendChild(t),t.select();try{document.execCommand("copy")}catch{}return document.body.removeChild(t),!0}function jT(e,t,n,r,o){let i=new pf.default.graphlib.Graph;i.setDefaultEdgeLabel(()=>({})),i.setGraph({rankdir:"LR",nodesep:64,ranksep:116,marginx:44,marginy:44});let s=Array.isArray(e.nodes)?e.nodes:[],l=Array.isArray(e.edges)?e.edges:[],a=s.filter(h=>t==="all"?!0:Array.isArray(h.streamIds)&&h.streamIds.includes(t)),u=new Set(a.map(h=>h.id)),c=[],f=[];for(let h of a){let m=Array.isArray(h.detailGraph?.nodes)?h.detailGraph.nodes.length:0,w=n.has(h.id)&&m>0,x=296,g=144;if(i.setNode(h.id,{width:x,height:g}),c.push({id:h.id,type:"atlasNode",position:{x:0,y:0},data:{item:h,isSubNode:!1,detailCount:m,isExpanded:w,t:r,...o},style:{width:x,minHeight:g}}),w){let y=h.detailGraph.nodes||[],p=h.detailGraph.edges||[],v=new Map;for(let k of y)v.set(k.id,0);for(let k of p)v.has(k.target)&&v.set(k.target,v.get(k.target)+1);for(let k of y){let S=`${h.id}::${k.id}`,_=264,N=120;if(i.setNode(S,{width:_,height:N}),c.push({id:S,type:"atlasNode",position:{x:0,y:0},data:{item:{...k,parentTitle:h.title,parentId:h.id},isSubNode:!0,detailCount:0,isExpanded:!1,t:r,...o},style:{width:_,minHeight:N}}),(v.get(k.id)||0)===0){let M=`bridge::${h.id}->${S}`;i.setEdge(h.id,S),f.push({id:M,source:h.id,target:S,label:r.detailEdgeLabel,style:{stroke:"#71717a",strokeWidth:1.4,strokeDasharray:"4 4"},labelStyle:{fill:"#52525b",fontSize:10.5,fontWeight:500},labelBgStyle:{fill:"#fafafa",fillOpacity:.94},labelBgPadding:[5,2],markerEnd:{type:Wt.ArrowClosed,color:"#71717a"}})}}for(let k=0;k<p.length;k++){let S=p[k],_=`${h.id}::${S.source}`,N=`${h.id}::${S.target}`;i.setEdge(_,N),f.push({id:`subedge::${h.id}::${S.id||k}`,source:_,target:N,label:S.label||"",style:{stroke:"#a1a1aa",strokeWidth:1.4},labelStyle:{fill:"#52525b",fontSize:10.5,fontWeight:500},labelBgStyle:{fill:"#ffffff",fillOpacity:.94},labelBgPadding:[5,2],markerEnd:{type:Wt.ArrowClosed,color:"#a1a1aa"}})}}}for(let h=0;h<l.length;h++){let m=l[h];!u.has(m.source)||!u.has(m.target)||(i.setEdge(m.source,m.target),f.push({id:m.id||`edge-${h}`,source:m.source,target:m.target,label:m.label||"",style:{stroke:"#71717a",strokeWidth:1.5},labelStyle:{fill:"#27272a",fontSize:11,fontWeight:500},labelBgStyle:{fill:"#ffffff",fillOpacity:.95},labelBgPadding:[6,3],labelBgBorderRadius:4,markerEnd:{type:Wt.ArrowClosed,color:"#71717a"}}))}return pf.default.layout(i),{nodes:c.map(h=>{let m=i.node(h.id),w=h.style.width||296,x=h.style.minHeight||144;return{...h,targetPosition:Q.Left,sourcePosition:Q.Right,position:{x:Math.round((m?m.x:0)-w/2),y:Math.round((m?m.y:0)-x/2)}}}),edges:f}}function WT({id:e,data:t,selected:n}){let{item:r,isSubNode:o,detailCount:i,isExpanded:s,t:l,onToggleExpand:a,onOpenDeepDive:u,onSelectNode:c}=t,[f,d]=(0,oe.useState)(!1),h=ia[r.role]?r.role:"core",m=ia[h],w=!!(r.deepDive&&(Array.isArray(r.deepDive.askPrompts)&&r.deepDive.askPrompts.length>0||r.deepDive.subAtlasPrompt)),x=Array.isArray(r.anchors)?r.anchors.length:0;return(0,C.jsxs)("div",{"data-testid":o?"atlas-subnode-card":"atlas-node-card","data-node-id":e,className:`atlas-node ${o?"atlas-node-sub":""} ${n?"atlas-node-selected":""}`,children:[(0,C.jsx)(xr,{type:"target",position:Q.Left,className:"atlas-handle"}),(0,C.jsxs)("div",{className:"atlas-node-header",children:[(0,C.jsxs)("div",{className:"atlas-node-badges",children:[(0,C.jsxs)("span",{className:"atlas-role-badge",children:[(0,C.jsx)("span",{className:"atlas-role-dot",style:{backgroundColor:m},"aria-hidden":"true"}),(0,C.jsx)("span",{children:l.roles[h]||r.role})]}),o&&(0,C.jsx)("span",{className:"atlas-sub-pill",children:l.nestedBadge}),r.confidence==="unverified"&&(0,C.jsx)("span",{className:"atlas-unverified-pill",children:l.unverifiedTag})]}),w&&(0,C.jsxs)("div",{className:"atlas-help-wrap nodrag nopan",children:[(0,C.jsx)("button",{type:"button","data-testid":"node-deep-dive-btn","data-for-node":e,"aria-label":`${l.deepDiveBadgeTitle}: ${r.title}`,className:"atlas-help-btn nodrag nopan",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onFocus:()=>d(!0),onBlur:()=>d(!1),onPointerDown:g=>g.stopPropagation(),onMouseDown:g=>g.stopPropagation(),onClick:g=>{g.stopPropagation(),d(!1),u({title:r.title,deepDive:r.deepDive})},children:"?"}),f&&(0,C.jsx)("div",{role:"tooltip","data-testid":"deep-dive-tooltip",className:"atlas-help-tooltip",children:r.deepDive.hoverHint||l.deepDiveBadgeTitle})]})]}),(0,C.jsxs)("div",{className:"atlas-node-body",children:[(0,C.jsx)("div",{className:"atlas-node-title",children:r.title}),r.summary&&(0,C.jsx)("div",{className:"atlas-node-summary",children:r.summary})]}),(i>0||x>0)&&(0,C.jsxs)("div",{className:"atlas-node-footer nodrag nopan",children:[i>0?(0,C.jsx)("button",{type:"button","data-testid":"node-expand-btn","data-for-node":e,"aria-expanded":s,className:`atlas-expand-btn nodrag nopan ${s?"active":""}`,onPointerDown:g=>g.stopPropagation(),onMouseDown:g=>g.stopPropagation(),onClick:g=>{g.stopPropagation(),a(e)},children:s?`${l.collapseDetail} (${i})`:`${l.expandDetail} (${i})`}):(0,C.jsx)("span",{}),x>0&&(0,C.jsxs)("span",{className:"atlas-anchor-count",translate:"no",children:["#",x]})]}),(0,C.jsx)(xr,{type:"source",position:Q.Right,className:"atlas-handle"})]})}var UT={atlasNode:WT};function gf({text:e,label:t,copiedLabel:n,testId:r="btn-copy-prompt",small:o=!1}){let[i,s]=(0,oe.useState)(!1),l=(0,oe.useRef)(null);return(0,oe.useEffect)(()=>()=>{l.current&&clearTimeout(l.current)},[]),(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("button",{type:"button","data-testid":r,"data-copied":i?"true":"false",onClick:()=>{VT(e).then(()=>{s(!0),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>s(!1),1800)})},className:`atlas-copy-btn ${o?"small":""} ${i?"copied":""}`,children:i?n:t}),(0,C.jsx)("span",{className:"sr-only","aria-live":"polite",children:i?n:""})]})}function YT({target:e,t,onClose:n}){let[r,o]=(0,oe.useState)("ask");if((0,oe.useEffect)(()=>{o("ask")},[e]),(0,oe.useEffect)(()=>{if(!e)return;let l=a=>{a.key==="Escape"&&n()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e,n]),!e||!e.deepDive)return null;let i=Array.isArray(e.deepDive.askPrompts)?e.deepDive.askPrompts:[],s=e.deepDive.subAtlasPrompt||"";return(0,C.jsx)("div",{className:"atlas-modal-backdrop","data-testid":"deep-dive-backdrop",role:"presentation",onMouseDown:l=>{l.target===l.currentTarget&&n()},children:(0,C.jsxs)("div",{className:"atlas-modal",role:"dialog","aria-modal":"true","aria-labelledby":"atlas-dive-modal-title","data-testid":"deep-dive-panel",children:[(0,C.jsxs)("div",{className:"atlas-modal-header",children:[(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"atlas-modal-kicker",children:t.deepDiveModalTitle}),(0,C.jsx)("h3",{id:"atlas-dive-modal-title",className:"atlas-modal-title",children:e.title})]}),(0,C.jsx)("button",{type:"button","data-testid":"btn-close-deep-dive","aria-label":t.close,className:"atlas-icon-close",onClick:n,children:t.close})]}),(0,C.jsxs)("div",{className:"atlas-modal-tabs",role:"tablist",children:[(0,C.jsxs)("button",{type:"button",role:"tab","aria-selected":r==="ask","data-testid":"tab-ask-prompts",className:`atlas-tab-btn ${r==="ask"?"active":""}`,onClick:()=>o("ask"),children:[t.tabAsk," (",i.length,")"]}),s&&(0,C.jsx)("button",{type:"button",role:"tab","aria-selected":r==="recursive","data-testid":"tab-recursive-prompt",className:`atlas-tab-btn ${r==="recursive"?"active":""}`,onClick:()=>o("recursive"),children:t.tabRecursive})]}),(0,C.jsxs)("div",{className:"atlas-modal-body",children:[r==="ask"&&(0,C.jsx)("div",{className:"atlas-prompt-list",children:i.map((l,a)=>(0,C.jsxs)("div",{className:"atlas-prompt-card","data-testid":"ask-prompt-card",children:[(0,C.jsxs)("div",{className:"atlas-prompt-card-head",children:[(0,C.jsx)("strong",{children:l.title}),(0,C.jsx)(gf,{text:l.prompt,label:t.copyBtn,copiedLabel:t.copiedBtn,testId:`btn-copy-ask-${a}`})]}),(0,C.jsx)("pre",{className:"atlas-prompt-pre","data-testid":"ask-prompt-text",children:l.prompt})]},a))}),r==="recursive"&&s&&(0,C.jsxs)("div",{className:"atlas-prompt-card","data-testid":"recursive-prompt-card",children:[(0,C.jsx)("p",{className:"atlas-hint-p",children:t.recursiveUsageHint}),(0,C.jsxs)("div",{className:"atlas-prompt-card-head",children:[(0,C.jsx)("strong",{translate:"no",children:"Atlas Loop \xB7 L1+"}),(0,C.jsx)(gf,{text:s,label:t.copyBtn,copiedLabel:t.copiedBtn,testId:"btn-copy-recursive"})]}),(0,C.jsx)("pre",{className:"atlas-prompt-pre","data-testid":"recursive-prompt-text",children:s})]})]})]})})}function qT({open:e,uncoveredScopes:t,unverifiedNotes:n,t:r,onClose:o}){return(0,oe.useEffect)(()=>{if(!e)return;let i=s=>{s.key==="Escape"&&o()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[e,o]),e?(0,C.jsx)("div",{className:"atlas-modal-backdrop",role:"presentation",onMouseDown:i=>{i.target===i.currentTarget&&o()},children:(0,C.jsxs)("div",{className:"atlas-modal",role:"dialog","aria-modal":"true","aria-labelledby":"atlas-scope-modal-title",children:[(0,C.jsxs)("div",{className:"atlas-modal-header",children:[(0,C.jsx)("h3",{id:"atlas-scope-modal-title",className:"atlas-modal-title",children:r.scopeNotes}),(0,C.jsx)("button",{type:"button","aria-label":r.close,className:"atlas-icon-close",onClick:o,children:r.close})]}),(0,C.jsxs)("div",{className:"atlas-modal-body",children:[t.length>0&&(0,C.jsxs)("section",{className:"atlas-sec",style:{marginTop:0,paddingTop:0,borderTop:"none"},children:[(0,C.jsx)("h4",{children:r.uncoveredTitle}),(0,C.jsx)("ul",{children:t.map((i,s)=>(0,C.jsx)("li",{children:i},s))})]}),n.length>0&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:r.unverifiedTitle}),(0,C.jsx)("ul",{children:n.map((i,s)=>(0,C.jsx)("li",{children:i},s))})]})]})]})}):null}function XT({data:e}){let t=e.meta||{},n=(0,oe.useMemo)(()=>$T(t),[t]),r=Array.isArray(e.streams)?e.streams:[],[o,i]=(0,oe.useState)("all"),[s,l]=(0,oe.useState)(()=>new Set),[a,u]=(0,oe.useState)(!1),[c,f]=(0,oe.useState)(!1),[d,h]=(0,oe.useState)(!1),[m,w]=(0,oe.useState)(""),[x,g]=(0,oe.useState)(null),[y,p]=(0,oe.useState)(null),[v,k]=(0,oe.useState)(0),S=Ti(),_=(0,oe.useRef)(null),N=(0,oe.useCallback)(O=>{l(W=>{let q=new Set(W);return q.has(O)?q.delete(O):q.add(O),q})},[]),M=(0,oe.useCallback)(O=>{p(O)},[]),A=(0,oe.useCallback)(O=>{g(O)},[]),R=(0,oe.useMemo)(()=>({onToggleExpand:N,onOpenDeepDive:M,onSelectNode:A}),[N,M,A]),V=(0,oe.useMemo)(()=>jT(e,o,s,n,R),[e,o,s,n,R,v]),[B,E,b]=Ev(V.nodes),[I,P,L]=Sv(V.edges);(0,oe.useEffect)(()=>{E(V.nodes),P(V.edges)},[V,E,P]),(0,oe.useEffect)(()=>{E(O=>O.map(W=>{let q=W.id===x;return W.selected===q?W:{...W,selected:q}}))},[x,E]),(0,oe.useEffect)(()=>{if(_.current){let O=_.current;B.some(q=>q.id===O)&&(_.current=null,requestAnimationFrame(()=>{S.fitView({nodes:[{id:O}],padding:.45,duration:0})}))}},[B,S]);let z=(0,oe.useCallback)(()=>{S.fitView({padding:.18,duration:0})},[S]),F=(0,oe.useCallback)(()=>{i("all"),l(new Set),w(""),g(null),p(null),h(!1),u(!1),k(O=>O+1),requestAnimationFrame(()=>{requestAnimationFrame(()=>{S.fitView({padding:.18,duration:0})})})},[S]),H=(0,oe.useMemo)(()=>{let O=[];for(let W of e.nodes||[]){let q=(W.anchors||[]).map(J=>[J.label,J.filePath,J.symbol,J.content,J.citation,J.url].filter(Boolean).join(" ")).join(" "),Z=(W.deepDive?.askPrompts||[]).map(J=>`${J.title} ${J.prompt}`).join(" ");O.push({flowId:W.id,parentId:null,title:W.title,summary:W.summary||"",isSub:!1,haystack:`${W.title} ${W.summary||""} ${W.whyItMatters||""} ${q} ${Z}`.toLowerCase()});for(let J of W.detailGraph?.nodes||[]){let ie=(J.anchors||[]).map(se=>[se.label,se.filePath,se.symbol,se.content,se.citation,se.url].filter(Boolean).join(" ")).join(" ");O.push({flowId:`${W.id}::${J.id}`,parentId:W.id,title:J.title,summary:`${W.title} \u2192 ${J.summary||""}`,isSub:!0,haystack:`${J.title} ${J.summary||""} ${W.title} ${ie}`.toLowerCase()})}}return O},[e.nodes]),Y=(0,oe.useMemo)(()=>{let O=m.trim().toLowerCase();return O?H.filter(W=>W.haystack.includes(O)).slice(0,12):[]},[m,H]),ne=O=>{o!=="all"&&i("all"),O.parentId&&!s.has(O.parentId)&&l(q=>{let Z=new Set(q);return Z.add(O.parentId),Z}),g(O.flowId),_.current=O.flowId,w(""),B.some(q=>q.id===O.flowId)&&(_.current=null,requestAnimationFrame(()=>{S.fitView({nodes:[{id:O.flowId}],padding:.45,duration:0})}))},U=(0,oe.useMemo)(()=>{if(!x)return null;if(x.includes("::")){let[O,W]=x.split("::"),q=(e.nodes||[]).find(J=>J.id===O),Z=(q?.detailGraph?.nodes||[]).find(J=>J.id===W);return Z?{...Z,_parentTitle:q?.title}:null}return(e.nodes||[]).find(O=>O.id===x)||null},[x,e.nodes]),te=(0,oe.useMemo)(()=>o==="all"?r[0]||null:r.find(O=>O.id===o)||null,[o,r]),re=(0,oe.useMemo)(()=>{let O=new Map;for(let W of e.nodes||[])O.set(W.id,W.title);return O},[e.nodes]),ee=Array.isArray(t.uncoveredScopes)?t.uncoveredScopes:[],$=Array.isArray(t.unverifiedNotes)?t.unverifiedNotes:[],G=ee.length+$.length;return(0,C.jsxs)("div",{className:"atlas-shell-root",children:[(0,C.jsx)("a",{href:"#atlas-main",className:"atlas-skip-link",children:n.skipToCanvas}),(0,C.jsxs)("header",{className:"atlas-topbar","data-testid":"atlas-topbar",children:[(0,C.jsxs)("div",{className:"atlas-topbar-left",children:[(0,C.jsxs)("div",{className:"atlas-top-badges",children:[t.parentMapHtml&&(0,C.jsxs)("a",{href:t.parentMapHtml,"data-testid":"parent-map-link",className:"atlas-parent-link",children:[(0,C.jsx)(FT,{}),(0,C.jsx)("span",{children:n.backParent})]}),t.subjectTag&&(0,C.jsx)("span",{className:"atlas-subject-badge",children:t.subjectTag}),(0,C.jsx)("span",{className:"atlas-level-badge","data-testid":"level-badge",children:t.level&&Number(t.level)>0&&t.drillDownTarget?`${n.levelSubPrefix}${t.drillDownTarget}`:n.levelOverview})]}),(0,C.jsxs)("div",{className:"atlas-title-row",children:[(0,C.jsx)("h1",{className:"atlas-main-title",children:t.title}),t.subtitle&&(0,C.jsx)("p",{className:"atlas-subtitle",children:t.subtitle})]})]}),(0,C.jsxs)("div",{className:"atlas-topbar-right",children:[(0,C.jsxs)("div",{className:"atlas-model-pill","data-testid":"model-badge",children:[(0,C.jsx)("span",{children:n.modelPrefix}),(0,C.jsx)("span",{translate:"no",children:t.generatedByModel})]}),G>0&&(0,C.jsxs)("button",{type:"button","data-testid":"btn-scope-notes",className:"atlas-scope-btn",onClick:()=>h(!0),children:[n.scopeNotes," (",G,")"]})]})]}),(0,C.jsxs)("div",{className:"atlas-toolbar-row",children:[(0,C.jsxs)("div",{className:"atlas-streams-bar","data-testid":"stream-filter-bar",children:[(0,C.jsx)("button",{type:"button","data-testid":"stream-btn-all","data-active":o==="all"?"true":"false",className:`atlas-stream-pill ${o==="all"?"active":""}`,onClick:()=>i("all"),children:n.allStreams}),r.map(O=>{let W=o===O.id,q=!!(O.deepDive&&(O.deepDive.askPrompts&&O.deepDive.askPrompts.length>0||O.deepDive.subAtlasPrompt));return(0,C.jsxs)("div",{className:`atlas-stream-pill-group ${W?"active":""}`,children:[(0,C.jsx)("button",{type:"button","data-testid":`stream-btn-${O.id}`,"data-active":W?"true":"false",className:`atlas-stream-pill ${W?"active":""}`,onClick:()=>i(O.id),children:O.title}),q&&(0,C.jsx)("button",{type:"button","aria-label":`${n.deepDiveBadgeTitle}: ${O.title}`,title:O.deepDive.hoverHint||n.deepDiveBadgeTitle,"data-testid":`stream-deep-dive-${O.id}`,className:"atlas-stream-help-btn",onClick:()=>p({title:O.title,deepDive:O.deepDive}),children:"?"})]},O.id)})]}),(0,C.jsxs)("div",{className:"atlas-controls-group",children:[(0,C.jsxs)("div",{className:"atlas-search-box",children:[(0,C.jsxs)("label",{htmlFor:"atlas-search-input",className:"atlas-search-field",children:[(0,C.jsx)("span",{className:"sr-only",children:n.searchLabel}),(0,C.jsx)(BT,{}),(0,C.jsx)("input",{id:"atlas-search-input",name:"q",type:"search",autoComplete:"off",spellCheck:!1,"data-testid":"search-input",value:m,onChange:O=>w(O.target.value),placeholder:n.searchPlaceholder,className:"atlas-search-input"})]}),m.trim()!==""&&(0,C.jsx)("div",{className:"atlas-search-dropdown","data-testid":"search-results","aria-live":"polite",children:Y.length===0?(0,C.jsx)("div",{className:"atlas-search-empty",children:n.noSearchMatches}):Y.map(O=>(0,C.jsxs)("button",{type:"button","data-testid":"search-result-item","data-target-id":O.flowId,className:"atlas-search-item",onClick:()=>ne(O),children:[(0,C.jsxs)("div",{className:"atlas-search-item-title",children:[(0,C.jsx)("span",{children:O.title}),O.isSub&&(0,C.jsx)("span",{className:"atlas-sub-pill",children:n.nestedBadge})]}),O.summary&&(0,C.jsx)("div",{className:"atlas-search-item-sub",children:O.summary})]},O.flowId))})]}),(0,C.jsxs)("div",{className:"atlas-canvas-btns",children:[(0,C.jsxs)("button",{type:"button","data-testid":"btn-zoom-in","aria-label":n.zoomIn,className:"atlas-ctrl-btn",onClick:()=>S.zoomIn({duration:0}),children:["+ ",n.zoomIn]}),(0,C.jsxs)("button",{type:"button","data-testid":"btn-zoom-out","aria-label":n.zoomOut,className:"atlas-ctrl-btn",onClick:()=>S.zoomOut({duration:0}),children:["\u2212 ",n.zoomOut]}),(0,C.jsxs)("button",{type:"button","data-testid":"btn-lock","data-locked":a?"true":"false","aria-pressed":a,className:`atlas-ctrl-btn ${a?"locked":""}`,onClick:()=>u(O=>!O),children:[(0,C.jsx)(HT,{locked:a}),(0,C.jsx)("span",{children:a?n.unlock:n.lock})]}),(0,C.jsx)("button",{type:"button","data-testid":"btn-fit-view",className:"atlas-ctrl-btn",onClick:z,children:n.fitView}),(0,C.jsx)("button",{type:"button","data-testid":"btn-reset",className:"atlas-ctrl-btn",onClick:F,children:n.reset}),(0,C.jsx)("button",{type:"button","data-testid":"btn-legend","aria-pressed":c,className:`atlas-ctrl-btn ${c?"active":""}`,onClick:()=>f(O=>!O),children:n.legend})]})]})]}),te&&Array.isArray(te.learningOrder)&&te.learningOrder.length>0&&(0,C.jsxs)("nav",{className:"atlas-reading-bar","aria-label":n.learningPath,"data-testid":"learning-order-bar",children:[(0,C.jsx)("span",{className:"atlas-reading-label",children:n.learningPath}),(0,C.jsx)("div",{className:"atlas-reading-steps",children:te.learningOrder.map((O,W)=>{let q=re.get(O)||O;return(0,C.jsxs)("button",{type:"button","data-testid":`learning-step-${W}`,className:`atlas-step-chip ${x===O?"active":""}`,onClick:()=>{g(O),S.fitView({nodes:[{id:O}],padding:.45,duration:0})},children:[(0,C.jsx)("span",{className:"atlas-step-num",children:W+1}),(0,C.jsx)("span",{children:q})]},O)})})]}),(0,C.jsxs)("main",{id:"atlas-main",className:"atlas-main-workspace",children:[(0,C.jsxs)("div",{className:"atlas-canvas-container","data-testid":"atlas-canvas-wrap",children:[(0,C.jsxs)(xv,{nodes:B,edges:I,nodeTypes:UT,onNodesChange:b,onEdgesChange:L,onNodeClick:(O,W)=>g(W.id),nodesDraggable:!a,nodesConnectable:!1,elementsSelectable:!0,fitView:!0,fitViewOptions:{padding:.18},minZoom:.15,maxZoom:2.5,proOptions:{hideAttribution:!0},children:[(0,C.jsx)(_v,{gap:22,size:1,color:"#e4e4e7"}),(0,C.jsx)(bv,{pannable:!0,zoomable:!0,maskColor:"rgba(244, 244, 245, 0.7)",nodeColor:O=>{let W=O.data?.item?.role;return ia[W]||"#71717a"}})]}),c&&(0,C.jsx)("div",{className:"atlas-legend-card","data-testid":"legend-panel",children:Object.entries(ia).map(([O,W])=>(0,C.jsxs)("div",{className:"atlas-legend-row",children:[(0,C.jsx)("span",{className:"atlas-legend-swatch",style:{backgroundColor:W},"aria-hidden":"true"}),(0,C.jsx)("span",{children:n.roles[O]||O})]},O))})]}),U&&(0,C.jsxs)("aside",{className:"atlas-inspector","data-testid":"inspector-panel",children:[(0,C.jsxs)("div",{className:"atlas-inspector-head",children:[(0,C.jsxs)("div",{className:"atlas-inspector-head-text",children:[U._parentTitle&&(0,C.jsx)("div",{className:"atlas-inspector-parent",children:U._parentTitle}),(0,C.jsx)("h2",{className:"atlas-inspector-title",children:U.title})]}),(0,C.jsx)("button",{type:"button","data-testid":"btn-close-inspector","aria-label":n.close,className:"atlas-icon-close",onClick:()=>g(null),children:n.close})]}),(0,C.jsxs)("div",{className:"atlas-inspector-meta",children:[(0,C.jsxs)("span",{className:"atlas-conf-badge",children:[(0,C.jsx)("span",{className:"atlas-role-dot",style:{backgroundColor:U.confidence==="unverified"?"#b45309":"#15803d"},"aria-hidden":"true"}),(0,C.jsx)("span",{children:U.confidence==="unverified"?n.unverifiedTag:n.verifiedTag})]}),U.unverifiedReason&&(0,C.jsx)("p",{className:"atlas-unverified-note",children:U.unverifiedReason})]}),U.summary&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:n.whatItDoes}),(0,C.jsx)("p",{children:U.summary})]}),U.whyItMatters&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:n.whyItMatters}),(0,C.jsx)("p",{children:U.whyItMatters})]}),(U.keyFactors?.inputs||U.keyFactors?.outputs)&&(0,C.jsxs)("section",{className:"atlas-sec",children:[U.keyFactors.inputs&&(0,C.jsxs)("div",{className:"atlas-kv",children:[(0,C.jsxs)("strong",{children:[n.inputsLabel,"\uFF1A"]}),(0,C.jsx)("span",{children:U.keyFactors.inputs})]}),U.keyFactors.outputs&&(0,C.jsxs)("div",{className:"atlas-kv",children:[(0,C.jsxs)("strong",{children:[n.outputsLabel,"\uFF1A"]}),(0,C.jsx)("span",{children:U.keyFactors.outputs})]})]}),U.mechanismsAndEffects&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:n.mechanismsLabel}),(0,C.jsx)("p",{children:U.mechanismsAndEffects})]}),U.watchouts&&(0,C.jsxs)("section",{className:"atlas-sec atlas-watchout-box",children:[(0,C.jsx)("h4",{children:n.watchoutsLabel}),(0,C.jsx)("p",{children:U.watchouts})]}),Array.isArray(U.anchors)&&U.anchors.length>0&&(0,C.jsxs)("section",{className:"atlas-sec",children:[(0,C.jsx)("h4",{children:n.anchorsLabel}),(0,C.jsx)("div",{className:"atlas-anchor-list",children:U.anchors.map((O,W)=>(0,C.jsxs)("div",{className:"atlas-anchor-card","data-testid":"anchor-item",children:[(0,C.jsx)("div",{className:"atlas-anchor-label",children:O.label}),O.kind==="editor"&&(0,C.jsxs)("div",{className:"atlas-anchor-editor",children:[(0,C.jsxs)("code",{translate:"no",children:[O.filePath,":",O.line||1,O.symbol?` (${O.symbol})`:""]}),O.unsupportedNote?(0,C.jsx)("div",{className:"atlas-unverified-note",children:O.unsupportedNote}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)("a",{href:O.editorUri,"data-testid":"editor-jump-link",className:"atlas-editor-btn",children:[n.openInEditor," (",(O.editor||"vscode").toUpperCase(),")"]}),(0,C.jsx)("div",{className:"atlas-editor-hint",children:n.editorConfirmHint})]})]}),O.kind==="snippet"&&(0,C.jsxs)("div",{className:"atlas-anchor-snippet",children:[(0,C.jsx)("pre",{translate:"no",children:O.content}),(0,C.jsx)(gf,{text:O.content||"",label:n.copySnippet,copiedLabel:n.copiedBtn,testId:`btn-copy-snippet-${W}`,small:!0})]}),O.kind==="link"&&(0,C.jsx)("a",{href:O.url,target:"_blank",rel:"noopener noreferrer",className:"atlas-ext-link",translate:"no",children:O.url}),O.kind==="source"&&(0,C.jsx)("div",{className:"atlas-source-cite",children:O.citation})]},W))})]}),U.deepDive&&(0,C.jsx)("section",{className:"atlas-sec",children:(0,C.jsxs)("button",{type:"button","data-testid":"inspector-open-deep-dive",className:"atlas-open-dive-btn",onClick:()=>p({title:U.title,deepDive:U.deepDive}),children:["? ",n.openDeepDiveBtn]})})]})]}),(0,C.jsx)(YT,{target:y,t:n,onClose:()=>p(null)}),(0,C.jsx)(qT,{open:d,uncoveredScopes:ee,unverifiedNotes:$,t:n,onClose:()=>h(!1)})]})}function GT(){let e=document.getElementById("atlas-data-json"),t=e?JSON.parse(e.textContent):window.__ATLAS_DATA__||{},n=document.getElementById("root");(0,J1.createRoot)(n).render((0,C.jsx)(Yd,{children:(0,C.jsx)(XT,{data:t})}))}GT();})();
|
|
1841
|
+
/*! Bundled license information:
|
|
1842
|
+
|
|
1843
|
+
react/cjs/react.production.min.js:
|
|
1844
|
+
(**
|
|
1845
|
+
* @license React
|
|
1846
|
+
* react.production.min.js
|
|
1847
|
+
*
|
|
1848
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1849
|
+
*
|
|
1850
|
+
* This source code is licensed under the MIT license found in the
|
|
1851
|
+
* LICENSE file in the root directory of this source tree.
|
|
1852
|
+
*)
|
|
1853
|
+
|
|
1854
|
+
scheduler/cjs/scheduler.production.min.js:
|
|
1855
|
+
(**
|
|
1856
|
+
* @license React
|
|
1857
|
+
* scheduler.production.min.js
|
|
1858
|
+
*
|
|
1859
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1860
|
+
*
|
|
1861
|
+
* This source code is licensed under the MIT license found in the
|
|
1862
|
+
* LICENSE file in the root directory of this source tree.
|
|
1863
|
+
*)
|
|
1864
|
+
|
|
1865
|
+
react-dom/cjs/react-dom.production.min.js:
|
|
1866
|
+
(**
|
|
1867
|
+
* @license React
|
|
1868
|
+
* react-dom.production.min.js
|
|
1869
|
+
*
|
|
1870
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1871
|
+
*
|
|
1872
|
+
* This source code is licensed under the MIT license found in the
|
|
1873
|
+
* LICENSE file in the root directory of this source tree.
|
|
1874
|
+
*)
|
|
1875
|
+
|
|
1876
|
+
react/cjs/react-jsx-runtime.production.min.js:
|
|
1877
|
+
(**
|
|
1878
|
+
* @license React
|
|
1879
|
+
* react-jsx-runtime.production.min.js
|
|
1880
|
+
*
|
|
1881
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1882
|
+
*
|
|
1883
|
+
* This source code is licensed under the MIT license found in the
|
|
1884
|
+
* LICENSE file in the root directory of this source tree.
|
|
1885
|
+
*)
|
|
1886
|
+
|
|
1887
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
1888
|
+
(**
|
|
1889
|
+
* @license React
|
|
1890
|
+
* use-sync-external-store-shim.production.js
|
|
1891
|
+
*
|
|
1892
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1893
|
+
*
|
|
1894
|
+
* This source code is licensed under the MIT license found in the
|
|
1895
|
+
* LICENSE file in the root directory of this source tree.
|
|
1896
|
+
*)
|
|
1897
|
+
|
|
1898
|
+
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js:
|
|
1899
|
+
(**
|
|
1900
|
+
* @license React
|
|
1901
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
1902
|
+
*
|
|
1903
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1904
|
+
*
|
|
1905
|
+
* This source code is licensed under the MIT license found in the
|
|
1906
|
+
* LICENSE file in the root directory of this source tree.
|
|
1907
|
+
*)
|
|
1908
|
+
*/
|
|
1909
|
+
</script>
|
|
1910
|
+
</body>
|
|
1911
|
+
</html>
|