diff --git a/README.md b/README.md index 0cfd59f..83e86f4 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ plus the jobs the view enqueues (`send_invoice_email.delay`, `rebuild_ledger.sen ## App -`loadpath serve --port 7345` opens a local desktop-style UI: icon rail, labeled toolbar, merge-box confidence, and an inspectable impact graph. The same process hosts MCP at `/mcp` (OAuth). Tokens stay on the machine in `~/.loadpath/settings.json`. AI is used **only** for residual uncertainty the graph cannot close. A dozen themes (Obsidian, Nord, Solarized, Paper, high-contrast, …) live in Settings and `localStorage`. Last repo, git range, and SCM slug are remembered the same way. Copy the markdown brief, or post **one** PR comment (updated in place) from the Review tab. Keyboard: `1`–`5` switches tabs. Outside Settings and Pull requests, `⌘`/`Ctrl`+`Enter` runs a review. +`loadpath serve --port 7345` opens a local desktop-style UI: icon rail, labeled toolbar, merge-box confidence, and an inspectable impact graph. The same process hosts MCP at `/mcp` (OAuth). Tokens stay on the machine in `~/.loadpath/settings.json`. AI is used **only** for residual uncertainty the graph cannot close. Two dozen themes (Obsidian, Nord, Neon Noir, Synthwave, Phosphor, Sakura, Citrus, Paper, high-contrast, …) live in Settings and `localStorage`. Last repo, git range, and SCM slug are remembered the same way. Copy the markdown brief, or post **one** PR comment (updated in place) from the Review tab. Keyboard: `1`–`5` switches tabs. Outside Settings and Pull requests, `⌘`/`Ctrl`+`Enter` runs a review. ### Review diff --git a/src/loadpath/static/assets/LayeredGraph3D-CoG8lubm.js b/src/loadpath/static/assets/LayeredGraph3D-CUJpCaK3.js similarity index 99% rename from src/loadpath/static/assets/LayeredGraph3D-CoG8lubm.js rename to src/loadpath/static/assets/LayeredGraph3D-CUJpCaK3.js index 09a8c02..808599f 100644 --- a/src/loadpath/static/assets/LayeredGraph3D-CoG8lubm.js +++ b/src/loadpath/static/assets/LayeredGraph3D-CUJpCaK3.js @@ -1,4 +1,4 @@ -import{r as bn,l as tc,c as nc,a as ic,L as sc,j as jn,t as rc}from"./index-aoV_COFI.js";/** +import{r as bn,l as tc,c as nc,a as ic,L as sc,j as jn,t as rc}from"./index-_7_dtN73.js";/** * @license * Copyright 2010-2026 Three.js Authors * SPDX-License-Identifier: MIT diff --git a/src/loadpath/static/assets/index-BSKSsotG.css b/src/loadpath/static/assets/index-BSKSsotG.css new file mode 100644 index 0000000..bcfe35c --- /dev/null +++ b/src/loadpath/static/assets/index-BSKSsotG.css @@ -0,0 +1 @@ +.react-flow{direction:ltr;--xy-edge-stroke-default: #b1b1b7;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #555;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(255, 255, 255, .5);--xy-minimap-background-color-default: #fff;--xy-minimap-mask-background-color-default: rgba(240, 240, 240, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #e2e2e2;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: transparent;--xy-background-pattern-dots-color-default: #91919a;--xy-background-pattern-lines-color-default: #eee;--xy-background-pattern-cross-color-default: #e2e2e2;background-color:var(--xy-background-color, var(--xy-background-color-default));--xy-node-color-default: inherit;--xy-node-border-default: 1px solid #1a192b;--xy-node-background-color-default: #fff;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #1a192b;--xy-node-border-radius-default: 3px;--xy-handle-background-color-default: #1a192b;--xy-handle-border-color-default: #fff;--xy-selection-background-color-default: rgba(0, 89, 220, .08);--xy-selection-border-default: 1px dotted rgba(0, 89, 220, .8);--xy-controls-button-background-color-default: #fefefe;--xy-controls-button-background-color-hover-default: #f4f4f4;--xy-controls-button-color-default: inherit;--xy-controls-button-color-hover-default: inherit;--xy-controls-button-border-color-default: #eee;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #ffffff;--xy-edge-label-color-default: inherit;--xy-resize-background-color-default: #3367d9}.react-flow.dark{--xy-edge-stroke-default: #3e3e3e;--xy-edge-stroke-width-default: 1;--xy-edge-stroke-selected-default: #727272;--xy-connectionline-stroke-default: #b1b1b7;--xy-connectionline-stroke-width-default: 1;--xy-attribution-background-color-default: rgba(150, 150, 150, .25);--xy-minimap-background-color-default: #141414;--xy-minimap-mask-background-color-default: rgba(60, 60, 60, .6);--xy-minimap-mask-stroke-color-default: transparent;--xy-minimap-mask-stroke-width-default: 1;--xy-minimap-node-background-color-default: #2b2b2b;--xy-minimap-node-stroke-color-default: transparent;--xy-minimap-node-stroke-width-default: 2;--xy-background-color-default: #141414;--xy-background-pattern-dots-color-default: #555;--xy-background-pattern-lines-color-default: #333;--xy-background-pattern-cross-color-default: #333;--xy-node-color-default: #f8f8f8;--xy-node-border-default: 1px solid #3c3c3c;--xy-node-background-color-default: #1e1e1e;--xy-node-group-background-color-default: rgba(240, 240, 240, .25);--xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, .08);--xy-node-boxshadow-selected-default: 0 0 0 .5px #999;--xy-handle-background-color-default: #bebebe;--xy-handle-border-color-default: #1e1e1e;--xy-selection-background-color-default: rgba(200, 200, 220, .08);--xy-selection-border-default: 1px dotted rgba(200, 200, 220, .8);--xy-controls-button-background-color-default: #2b2b2b;--xy-controls-button-background-color-hover-default: #3e3e3e;--xy-controls-button-color-default: #f8f8f8;--xy-controls-button-color-hover-default: #fff;--xy-controls-button-border-color-default: #5b5b5b;--xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, .08);--xy-edge-label-background-color-default: #141414;--xy-edge-label-color-default: #f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{position:absolute;width:100%;height:100%;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{overflow:visible;position:absolute;pointer-events:none}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke, var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}svg.react-flow__connectionline{z-index:1001;overflow:visible;position:absolute}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.react-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.react-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px;width:6px;height:6px;background-color:var(--xy-handle-background-color, var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));border-radius:100%}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;left:50%;bottom:0;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{position:absolute;z-index:5;margin:15px}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px) translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px) translateY(-50%)}.react-flow__attribution{font-size:10px;background:var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));padding:2px 3px;margin:0}.react-flow__attribution a{text-decoration:none;color:#999}@keyframes dashdraw{0%{stroke-dashoffset:10}}.react-flow__edgelabel-renderer{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;left:0;top:0}.react-flow__viewport-portal{position:absolute;width:100%;height:100%;left:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__minimap{background:var( --xy-minimap-background-color-props, var(--xy-minimap-background-color, var(--xy-minimap-background-color-default)) )}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var( --xy-minimap-mask-background-color-props, var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default)) );stroke:var( --xy-minimap-mask-stroke-color-props, var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default)) );stroke-width:var( --xy-minimap-mask-stroke-width-props, var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default)) )}.react-flow__minimap-node{fill:var( --xy-minimap-node-background-color-props, var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default)) );stroke:var( --xy-minimap-node-stroke-color-props, var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default)) );stroke-width:var( --xy-minimap-node-stroke-width-props, var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default)) )}.react-flow__background-pattern.dots{fill:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default)) )}.react-flow__background-pattern.lines{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default)) )}.react-flow__background-pattern.cross{stroke:var( --xy-background-pattern-color-props, var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default)) )}.react-flow__controls{display:flex;flex-direction:column;box-shadow:var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default))}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{display:flex;justify-content:center;align-items:center;height:26px;width:26px;padding:4px;border:none;background:var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));border-bottom:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) );color:var( --xy-controls-button-color-props, var(--xy-controls-button-color, var(--xy-controls-button-color-default)) );cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__controls-button svg{width:100%;max-width:12px;max-height:12px;fill:currentColor}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{padding:10px;border-radius:var(--xy-node-border-radius, var(--xy-node-border-radius-default));width:150px;font-size:12px;color:var(--xy-node-color, var(--xy-node-color-default));text-align:center;border:var(--xy-node-border, var(--xy-node-border-default));background-color:var(--xy-node-background-color, var(--xy-node-background-color-default))}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color, var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color, var(--xy-selection-background-color-default));border:var(--xy-selection-border, var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var( --xy-controls-button-background-color-hover-props, var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default)) );color:var( --xy-controls-button-color-hover-props, var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default)) )}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var( --xy-controls-button-border-color-props, var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default)) )}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{width:5px;height:5px;border:1px solid #fff;border-radius:1px;background-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));translate:-50% -50%}.react-flow__resize-control.handle.left{left:0;top:50%}.react-flow__resize-control.handle.right{left:100%;top:50%}.react-flow__resize-control.handle.top{left:50%;top:0}.react-flow__resize-control.handle.bottom{left:50%;top:100%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color, var(--xy-resize-background-color-default));border-width:0;border-style:solid}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;transform:translate(-50%);top:0;height:100%}.react-flow__resize-control.line.left{left:0;border-left-width:1px}.react-flow__resize-control.line.right{left:100%;border-right-width:1px}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{height:1px;transform:translateY(-50%);left:0;width:100%}.react-flow__resize-control.line.top{top:0;border-top-width:1px}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color, var(--xy-edge-label-color-default))}:root,[data-theme=obsidian]{--bg: #070b10;--bg-2: #0d141c;--surface: #121a24;--line: #1e2c3c;--ink: #e7eef6;--muted: #8b9bb0;--high: #2a9d8f;--medium: #e9c46a;--low: #e76f51;--critical: #e85d04;--accent: #4cc9f0;--rail-from: #0b1219;--rail-to: #070b10;--rail-active: #15202c;--btn: #173044;--btn-line: #24506c;--btn-primary: #134e4a;--btn-primary-line: #2a9d8f;--node-bg: #101822;--node-line: #2a3d52;--graph-bg: #070b10;--graph-grid: rgba(42, 80, 120, .09);--edge-cheap: #4a5568;--edge-expensive: #f4a261;--edge-critical: #e85d04;--shadow: rgba(76, 201, 240, .08)}[data-theme=nord]{--bg: #2e3440;--bg-2: #3b4252;--surface: #434c5e;--line: #4c566a;--ink: #eceff4;--muted: #d8dee9;--high: #a3be8c;--medium: #ebcb8b;--low: #bf616a;--critical: #d08770;--accent: #88c0d0;--rail-from: #3b4252;--rail-to: #2e3440;--rail-active: #4c566a;--btn: #434c5e;--btn-line: #81a1c1;--btn-primary: #5e81ac;--btn-primary-line: #88c0d0;--node-bg: #3b4252;--node-line: #81a1c1;--graph-bg: #2e3440;--graph-grid: rgba(136, 192, 208, .12);--edge-cheap: #4c566a;--edge-expensive: #d08770;--edge-critical: #bf616a;--shadow: rgba(136, 192, 208, .12)}[data-theme=solarized-dark]{--bg: #002b36;--bg-2: #073642;--surface: #0a3944;--line: #16444f;--ink: #eee8d5;--muted: #93a1a1;--high: #859900;--medium: #b58900;--low: #dc322f;--critical: #cb4b16;--accent: #2aa198;--rail-from: #073642;--rail-to: #002b36;--rail-active: #16444f;--btn: #073642;--btn-line: #268bd2;--btn-primary: #0a4a42;--btn-primary-line: #2aa198;--node-bg: #073642;--node-line: #268bd2;--graph-bg: #002b36;--graph-grid: rgba(42, 161, 152, .12);--edge-cheap: #586e75;--edge-expensive: #cb4b16;--edge-critical: #dc322f;--shadow: rgba(42, 161, 152, .12)}[data-theme=forest]{--bg: #0e1510;--bg-2: #152019;--surface: #1b2a20;--line: #2c4334;--ink: #e4f0e6;--muted: #8eaa96;--high: #6ab04c;--medium: #c8a951;--low: #e17055;--critical: #d35400;--accent: #7bed9f;--rail-from: #152019;--rail-to: #0e1510;--rail-active: #1f3326;--btn: #1f3326;--btn-line: #3d6b4f;--btn-primary: #1e4d32;--btn-primary-line: #6ab04c;--node-bg: #16241b;--node-line: #3d6b4f;--graph-bg: #0e1510;--graph-grid: rgba(123, 237, 159, .1);--edge-cheap: #3d6b4f;--edge-expensive: #c8a951;--edge-critical: #d35400;--shadow: rgba(123, 237, 159, .1)}[data-theme=rose]{--bg: #191724;--bg-2: #1f1d2e;--surface: #26233a;--line: #403d52;--ink: #e0def4;--muted: #908caa;--high: #9ccfd8;--medium: #f6c177;--low: #eb6f92;--critical: #eb6f92;--accent: #c4a7e7;--rail-from: #1f1d2e;--rail-to: #191724;--rail-active: #26233a;--btn: #26233a;--btn-line: #c4a7e7;--btn-primary: #3a2f4d;--btn-primary-line: #c4a7e7;--node-bg: #1f1d2e;--node-line: #524f67;--graph-bg: #191724;--graph-grid: rgba(196, 167, 231, .12);--edge-cheap: #524f67;--edge-expensive: #f6c177;--edge-critical: #eb6f92;--shadow: rgba(196, 167, 231, .12)}[data-theme=amber]{--bg: #120e0a;--bg-2: #1c1610;--surface: #261e16;--line: #3d2f22;--ink: #f4e6d0;--muted: #b59a78;--high: #c4d6a0;--medium: #e9b44c;--low: #d8572a;--critical: #c0392b;--accent: #f0a05a;--rail-from: #1c1610;--rail-to: #120e0a;--rail-active: #2b2218;--btn: #2b2218;--btn-line: #8a5a2b;--btn-primary: #4a3418;--btn-primary-line: #f0a05a;--node-bg: #1c1610;--node-line: #8a5a2b;--graph-bg: #120e0a;--graph-grid: rgba(240, 160, 90, .12);--edge-cheap: #5c4a38;--edge-expensive: #e9b44c;--edge-critical: #d8572a;--shadow: rgba(240, 160, 90, .12)}[data-theme=volcano]{--bg: #14090a;--bg-2: #1e0e10;--surface: #2a1416;--line: #4a2226;--ink: #fde8e4;--muted: #c48b86;--high: #7bed9f;--medium: #f6c90e;--low: #ff6b6b;--critical: #ff3b3b;--accent: #ff7b54;--rail-from: #1e0e10;--rail-to: #14090a;--rail-active: #32181b;--btn: #32181b;--btn-line: #ff7b54;--btn-primary: #5a1f18;--btn-primary-line: #ff7b54;--node-bg: #1e0e10;--node-line: #7a3330;--graph-bg: #14090a;--graph-grid: rgba(255, 123, 84, .12);--edge-cheap: #5a3330;--edge-expensive: #ff7b54;--edge-critical: #ff3b3b;--shadow: rgba(255, 123, 84, .14)}[data-theme=lavender]{--bg: #12101c;--bg-2: #1a1730;--surface: #221e3c;--line: #3b3560;--ink: #efeaff;--muted: #b3a7d6;--high: #80ffdb;--medium: #ffd166;--low: #ff6b9d;--critical: #ff4d6d;--accent: #c77dff;--rail-from: #1a1730;--rail-to: #12101c;--rail-active: #2a2550;--btn: #2a2550;--btn-line: #c77dff;--btn-primary: #3d2a66;--btn-primary-line: #c77dff;--node-bg: #1a1730;--node-line: #5a4d8a;--graph-bg: #12101c;--graph-grid: rgba(199, 125, 255, .12);--edge-cheap: #5a4d8a;--edge-expensive: #ffd166;--edge-critical: #ff4d6d;--shadow: rgba(199, 125, 255, .14)}[data-theme=neon-noir]{--bg: #05060a;--bg-2: #0a0c14;--surface: #10131c;--line: #1e2436;--ink: #f0f4ff;--muted: #8b93b0;--high: #39ff88;--medium: #ffe66d;--low: #ff2d95;--critical: #ff3d5a;--accent: #00f0ff;--rail-from: #0a0c14;--rail-to: #05060a;--rail-active: #151a2a;--btn: #151a2a;--btn-line: #00f0ff;--btn-primary: #063a40;--btn-primary-line: #00f0ff;--node-bg: #0a0c14;--node-line: #2a3550;--graph-bg: #05060a;--graph-grid: rgba(0, 240, 255, .12);--edge-cheap: #3a4560;--edge-expensive: #ff2d95;--edge-critical: #ff3d5a;--shadow: rgba(0, 240, 255, .22)}[data-theme=synthwave]{--bg: #1a0a2e;--bg-2: #240b3d;--surface: #2d1250;--line: #4a1d7a;--ink: #ffe6fb;--muted: #c49ad8;--high: #00f5d4;--medium: #ffd60a;--low: #ff6b9d;--critical: #ff006e;--accent: #ff2bd6;--rail-from: #240b3d;--rail-to: #1a0a2e;--rail-active: #3a1570;--btn: #3a1570;--btn-line: #ff2bd6;--btn-primary: #5a0a4a;--btn-primary-line: #ff2bd6;--node-bg: #240b3d;--node-line: #7b2cbf;--graph-bg: #1a0a2e;--graph-grid: rgba(255, 43, 214, .16);--edge-cheap: #5a3a80;--edge-expensive: #ff9e00;--edge-critical: #ff006e;--shadow: rgba(255, 43, 214, .24)}[data-theme=phosphor]{--bg: #020804;--bg-2: #061208;--surface: #0a1a0e;--line: #163c1e;--ink: #c8ffc8;--muted: #5aaa5a;--high: #39ff14;--medium: #c8f542;--low: #ffb000;--critical: #ff5e00;--accent: #00ff66;--rail-from: #061208;--rail-to: #020804;--rail-active: #0e2414;--btn: #0e2414;--btn-line: #00ff66;--btn-primary: #0a3a18;--btn-primary-line: #00ff66;--node-bg: #061208;--node-line: #1e6a32;--graph-bg: #020804;--graph-grid: rgba(0, 255, 102, .12);--edge-cheap: #1e5a2a;--edge-expensive: #c8f542;--edge-critical: #ff5e00;--shadow: rgba(0, 255, 102, .2)}[data-theme=aurora]{--bg: #071018;--bg-2: #0c1c28;--surface: #122636;--line: #1e3d52;--ink: #e8fff6;--muted: #7eb8a8;--high: #5fffcf;--medium: #ffe566;--low: #ff7eb6;--critical: #ff4d6d;--accent: #7cffb2;--rail-from: #0c1c28;--rail-to: #071018;--rail-active: #163044;--btn: #163044;--btn-line: #7cffb2;--btn-primary: #0e3d3a;--btn-primary-line: #7cffb2;--node-bg: #0c1c28;--node-line: #2a6a78;--graph-bg: #071018;--graph-grid: rgba(124, 255, 178, .12);--edge-cheap: #2a5a68;--edge-expensive: #c9a0ff;--edge-critical: #ff4d6d;--shadow: rgba(124, 255, 178, .18)}[data-theme=biolume]{--bg: #02141c;--bg-2: #042430;--surface: #073040;--line: #0a4a5c;--ink: #e6fffb;--muted: #6eb8b0;--high: #5dffb0;--medium: #ffe066;--low: #ff79c6;--critical: #ff4d6d;--accent: #18e7d4;--rail-from: #042430;--rail-to: #02141c;--rail-active: #0a3848;--btn: #0a3848;--btn-line: #18e7d4;--btn-primary: #0a4a48;--btn-primary-line: #18e7d4;--node-bg: #042430;--node-line: #1a7080;--graph-bg: #02141c;--graph-grid: rgba(24, 231, 212, .12);--edge-cheap: #1a5a68;--edge-expensive: #ff79c6;--edge-critical: #ff4d6d;--shadow: rgba(24, 231, 212, .2)}[data-theme=carbon]{--bg: #0d0d0f;--bg-2: #16161a;--surface: #1e1e24;--line: #33333c;--ink: #f2f2f4;--muted: #9a9aa8;--high: #3dd68c;--medium: #f0c040;--low: #ff5a5a;--critical: #ff2a2a;--accent: #ff2a2a;--rail-from: #16161a;--rail-to: #0d0d0f;--rail-active: #24242c;--btn: #24242c;--btn-line: #ff2a2a;--btn-primary: #4a1212;--btn-primary-line: #ff2a2a;--node-bg: #16161a;--node-line: #4a4a55;--graph-bg: #0d0d0f;--graph-grid: rgba(255, 42, 42, .1);--edge-cheap: #4a4a55;--edge-expensive: #ff8a3d;--edge-critical: #ff2a2a;--shadow: rgba(255, 42, 42, .18)}[data-theme=paper]{--bg: #f6f1e8;--bg-2: #efe6d6;--surface: #fffaf2;--line: #d9cbb6;--ink: #2b241c;--muted: #6f6456;--high: #2a7a4b;--medium: #b5811a;--low: #c0392b;--critical: #a93226;--accent: #1d6a7a;--rail-from: #efe6d6;--rail-to: #e7dcc8;--rail-active: #e2d3bb;--btn: #fffaf2;--btn-line: #c9b79a;--btn-primary: #d7eee0;--btn-primary-line: #2a7a4b;--node-bg: #fffaf2;--node-line: #c9b79a;--graph-bg: #f6f1e8;--graph-grid: rgba(29, 106, 122, .1);--edge-cheap: #b7a48c;--edge-expensive: #c0392b;--edge-critical: #a93226;--shadow: rgba(43, 36, 28, .08)}[data-theme=solarized-light]{--bg: #fdf6e3;--bg-2: #eee8d5;--surface: #f5efdc;--line: #d6cba9;--ink: #657b83;--muted: #93a1a1;--high: #859900;--medium: #b58900;--low: #dc322f;--critical: #cb4b16;--accent: #268bd2;--rail-from: #eee8d5;--rail-to: #e6dfc8;--rail-active: #e0d9c0;--btn: #fdf6e3;--btn-line: #93a1a1;--btn-primary: #e8efc8;--btn-primary-line: #859900;--node-bg: #fdf6e3;--node-line: #93a1a1;--graph-bg: #fdf6e3;--graph-grid: rgba(38, 139, 210, .12);--edge-cheap: #93a1a1;--edge-expensive: #cb4b16;--edge-critical: #dc322f;--shadow: rgba(101, 123, 131, .1)}[data-theme=seafoam]{--bg: #eef7f4;--bg-2: #dff0ea;--surface: #ffffff;--line: #b7d5cc;--ink: #17332c;--muted: #4d7268;--high: #1b8a5a;--medium: #c48a14;--low: #c44536;--critical: #9b2d22;--accent: #1d9a8a;--rail-from: #dff0ea;--rail-to: #cfe6de;--rail-active: #c4ddd4;--btn: #ffffff;--btn-line: #8fbfb2;--btn-primary: #d4f0e4;--btn-primary-line: #1b8a5a;--node-bg: #ffffff;--node-line: #8fbfb2;--graph-bg: #eef7f4;--graph-grid: rgba(29, 154, 138, .12);--edge-cheap: #8fbfb2;--edge-expensive: #c48a14;--edge-critical: #c44536;--shadow: rgba(23, 51, 44, .08)}[data-theme=high-contrast]{--bg: #ffffff;--bg-2: #f2f2f2;--surface: #ffffff;--line: #111111;--ink: #000000;--muted: #222222;--high: #007a33;--medium: #8a5a00;--low: #b00000;--critical: #9b0000;--accent: #0033cc;--rail-from: #f2f2f2;--rail-to: #e6e6e6;--rail-active: #d9d9d9;--btn: #ffffff;--btn-line: #000000;--btn-primary: #d9f2e3;--btn-primary-line: #007a33;--node-bg: #ffffff;--node-line: #000000;--graph-bg: #ffffff;--graph-grid: rgba(0, 0, 0, .12);--edge-cheap: #444444;--edge-expensive: #8a5a00;--edge-critical: #b00000;--shadow: rgba(0, 0, 0, .12)}[data-theme=sakura]{--bg: #fff0f5;--bg-2: #ffe4ee;--surface: #fff7fa;--line: #f5b8cc;--ink: #4a1830;--muted: #a05a78;--high: #1a8a5c;--medium: #c48a14;--low: #d63d6e;--critical: #b01040;--accent: #e84a8a;--rail-from: #ffe4ee;--rail-to: #f8d4e0;--rail-active: #f5c8d8;--btn: #fff7fa;--btn-line: #e89ab0;--btn-primary: #ffd6e6;--btn-primary-line: #e84a8a;--node-bg: #fff7fa;--node-line: #e89ab0;--graph-bg: #fff0f5;--graph-grid: rgba(232, 74, 138, .12);--edge-cheap: #d4a0b0;--edge-expensive: #d63d6e;--edge-critical: #b01040;--shadow: rgba(74, 24, 48, .1)}[data-theme=citrus]{--bg: #fffce8;--bg-2: #fff3b0;--surface: #fffef5;--line: #e8d44a;--ink: #2a2a08;--muted: #6a6a20;--high: #2a8a20;--medium: #d4a000;--low: #e85d04;--critical: #c0392b;--accent: #5aad14;--rail-from: #fff3b0;--rail-to: #ffe98a;--rail-active: #ffe066;--btn: #fffef5;--btn-line: #d4c030;--btn-primary: #e8f5b8;--btn-primary-line: #5aad14;--node-bg: #fffef5;--node-line: #d4c030;--graph-bg: #fffce8;--graph-grid: rgba(90, 173, 20, .14);--edge-cheap: #c4b040;--edge-expensive: #e85d04;--edge-critical: #c0392b;--shadow: rgba(42, 42, 8, .1)}[data-theme=peach]{--bg: #fff3eb;--bg-2: #ffe0cc;--surface: #fffaf6;--line: #f0c4a8;--ink: #3a2218;--muted: #8a5a48;--high: #2a8a5c;--medium: #d48a14;--low: #e85d3a;--critical: #c0392b;--accent: #ff6b35;--rail-from: #ffe0cc;--rail-to: #ffd4b8;--rail-active: #ffc8a8;--btn: #fffaf6;--btn-line: #e8a888;--btn-primary: #ffe0cc;--btn-primary-line: #ff6b35;--node-bg: #fffaf6;--node-line: #e8a888;--graph-bg: #fff3eb;--graph-grid: rgba(255, 107, 53, .12);--edge-cheap: #d4a088;--edge-expensive: #e85d3a;--edge-critical: #c0392b;--shadow: rgba(58, 34, 24, .1)}[data-theme=candy]{--bg: #f4f0ff;--bg-2: #e8dcff;--surface: #fbf8ff;--line: #d4c0f0;--ink: #2a1848;--muted: #6a5890;--high: #1a8a6a;--medium: #c48a14;--low: #e84a8a;--critical: #c01060;--accent: #ff5eb1;--rail-from: #e8dcff;--rail-to: #ddd0ff;--rail-active: #d4c4ff;--btn: #fbf8ff;--btn-line: #c4a8e8;--btn-primary: #ffd6ec;--btn-primary-line: #ff5eb1;--node-bg: #fbf8ff;--node-line: #c4a8e8;--graph-bg: #f4f0ff;--graph-grid: rgba(255, 94, 177, .14);--edge-cheap: #b0a0d0;--edge-expensive: #e84a8a;--edge-critical: #c01060;--shadow: rgba(42, 24, 72, .1)}[data-theme=sky]{--bg: #e8f4ff;--bg-2: #cfe8ff;--surface: #f5faff;--line: #90c8f0;--ink: #0a2848;--muted: #3a6080;--high: #0a8a4a;--medium: #c48a14;--low: #e85d3a;--critical: #c0392b;--accent: #0077ff;--rail-from: #cfe8ff;--rail-to: #b8dcff;--rail-active: #a8d4ff;--btn: #f5faff;--btn-line: #70b0e0;--btn-primary: #cfe8ff;--btn-primary-line: #0077ff;--node-bg: #f5faff;--node-line: #70b0e0;--graph-bg: #e8f4ff;--graph-grid: rgba(0, 119, 255, .12);--edge-cheap: #80b0d0;--edge-expensive: #e85d3a;--edge-critical: #c0392b;--shadow: rgba(10, 40, 72, .1)}[data-theme=coral]{--bg: #fff1ee;--bg-2: #ffddd6;--surface: #fff8f6;--line: #f0b0a4;--ink: #3a1814;--muted: #8a5048;--high: #0d9488;--medium: #d48a14;--low: #e85d4a;--critical: #c0392b;--accent: #0d9488;--rail-from: #ffddd6;--rail-to: #ffd0c6;--rail-active: #ffc4b8;--btn: #fff8f6;--btn-line: #e89888;--btn-primary: #d4f4ee;--btn-primary-line: #0d9488;--node-bg: #fff8f6;--node-line: #e89888;--graph-bg: #fff1ee;--graph-grid: rgba(13, 148, 136, .14);--edge-cheap: #d4a098;--edge-expensive: #e85d4a;--edge-critical: #c0392b;--shadow: rgba(58, 24, 20, .1)}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}:root{--radius: 6px;--radius-lg: 10px;--control-h: 32px;--font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;--mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;--focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);--space: 8px}body{background:var(--bg);color:var(--ink);font-family:var(--font);font-size:13px;line-height:1.45;-webkit-font-smoothing:antialiased}button,input,select,textarea{font-family:inherit;font-size:inherit;color:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,summary:focus-visible{outline:none;box-shadow:var(--focus-ring)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}.skip{position:absolute;left:12px;top:-40px;z-index:50;background:var(--surface);color:var(--ink);border:1px solid var(--accent);border-radius:var(--radius);padding:8px 12px}.skip:focus{top:12px}.app{display:grid;grid-template-columns:232px 1fr;height:100%}.rail{border-right:1px solid var(--line);background:linear-gradient(180deg,var(--rail-from),var(--rail-to));padding:16px 12px;display:flex;flex-direction:column;gap:2px;min-width:0}.brand{display:flex;flex-direction:column;gap:2px;padding:4px 8px 16px}.brand-mark{font-family:var(--mono);letter-spacing:.16em;font-size:11px;text-transform:uppercase;color:var(--accent);font-weight:600}.brand-sub{font-size:11px;color:var(--muted)}.nav-item{display:flex;align-items:center;gap:10px;background:transparent;border:0;text-align:left;padding:8px 10px;border-radius:var(--radius);color:var(--muted);cursor:pointer;width:100%}.nav-item:hover{background:color-mix(in srgb,var(--rail-active) 70%,transparent);color:var(--ink)}.nav-item.active{background:var(--rail-active);color:var(--ink);font-weight:500}.nav-item svg{flex-shrink:0}.theme-pick{margin-top:14px;display:grid;gap:4px;padding:0 2px}.theme-pick label{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-weight:500}.theme-pick select,.field select,.field input,.topbar input,.topbar select,.settings input,.settings select,.explorer-path input{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:0 10px;height:var(--control-h);width:100%}.rail-foot{margin-top:auto;padding:12px 8px 4px;border-top:1px solid var(--line);display:grid;gap:6px}.kbd-hint{font-size:11px;color:var(--muted)}kbd{font-family:var(--mono);font-size:10px;border:1px solid var(--line);border-radius:4px;padding:0 4px;background:var(--surface)}.main{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative;background:var(--bg)}.progress{position:absolute;top:0;left:0;right:0;height:2px;overflow:hidden;z-index:30;background:color-mix(in srgb,var(--accent) 20%,transparent)}.progress i{display:block;height:100%;width:32%;background:var(--accent);animation:indeterminate 1.1s ease-in-out infinite}@keyframes indeterminate{0%{transform:translate(-120%)}to{transform:translate(400%)}}.topbar{display:flex;gap:10px;align-items:flex-end;padding:10px 16px;border-bottom:1px solid var(--line);background:var(--bg-2);flex-wrap:wrap}.field{display:grid;gap:4px;min-width:0}.field>span{font-size:11px;color:var(--muted);font-weight:500}.field.path{flex:1;min-width:180px}.field.ref{width:188px;flex:0 0 188px}.field.workspace{width:180px;flex:0 0 180px}.path-row,.combo-row{display:flex;min-width:0}.path-row input,.combo-row input{flex:1;min-width:0}.combo{position:relative;min-width:0}.combo-row input{border-top-right-radius:0;border-bottom-right-radius:0}.topbar .icon-btn{width:var(--control-h);padding:0;flex:0 0 var(--control-h)}.combo-toggle{border-top-left-radius:0;border-bottom-left-radius:0;border-left:0}.combo-menu{position:absolute;top:calc(100% + 4px);right:0;left:auto;min-width:340px;max-width:min(480px,70vw);max-height:360px;overflow:auto;z-index:40;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 12px 32px var(--shadow);padding:6px 0}.combo-heading{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:8px 12px 4px}.combo-menu .combo-option{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;text-align:left;background:transparent;border:0;border-radius:0;height:auto;padding:6px 12px;color:var(--ink);cursor:pointer}.combo-menu .combo-option:hover,.combo-menu .combo-option.active{background:var(--rail-active)}.combo-label{font-family:var(--mono);font-size:12px}.combo-detail{color:var(--muted);font-size:12px;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}.combo-empty{padding:10px 12px}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:50;background:color-mix(in srgb,var(--bg) 72%,transparent);display:grid;place-items:center;padding:24px}.modal{width:min(720px,100%);max-height:min(640px,90vh);background:var(--bg-2);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:0 16px 48px var(--shadow);display:flex;flex-direction:column;overflow:hidden}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 16px 10px;border-bottom:1px solid var(--line)}.modal-head h2{font-size:15px}.modal-head .muted{margin:4px 0 0}.explorer-path{display:flex;gap:8px;padding:12px 16px;border-bottom:1px solid var(--line)}.explorer-path input{flex:1;min-width:0}.explorer-list{flex:1;overflow:auto;padding:8px;min-height:220px}.explorer-row{display:flex;align-items:center;gap:8px;width:100%;text-align:left;background:transparent;border:0;border-radius:var(--radius);padding:8px 10px;color:var(--ink);cursor:pointer;height:auto}.explorer-row:hover,.explorer-row.active{background:var(--rail-active)}.explorer-name{min-width:0;overflow:hidden;text-overflow:ellipsis}.git-badge{margin-left:auto;margin-bottom:0}.explorer-empty{padding:18px 10px}.modal-foot{display:flex;align-items:center;gap:12px;padding:12px 16px;border-top:1px solid var(--line)}.explorer-current{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--mono);font-size:12px}.topbar input,.topbar select{min-width:0}.topbar-actions{display:flex;gap:8px;margin-left:auto;align-items:center;padding-bottom:0}.btn,.topbar button{background:var(--btn);border:1px solid var(--btn-line);border-radius:var(--radius);height:var(--control-h);padding:0 12px;cursor:pointer;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap}.btn:hover,.topbar button:hover{filter:brightness(1.08)}.btn:disabled,.topbar button:disabled{opacity:.55;cursor:not-allowed;filter:none}.btn.primary{background:var(--btn-primary);border-color:var(--btn-primary-line)}.btn.ghost{background:transparent}.alerts{display:grid;gap:8px;padding:10px 16px 0}.alerts:empty{display:none;padding:0}.stage{flex:1;min-height:0;display:flex;flex-direction:column}.content{flex:1;min-height:0;display:grid;grid-template-columns:minmax(340px,420px) 1fr}.brief{overflow:auto;border-right:1px solid var(--line);padding:16px 18px 24px;background:radial-gradient(circle at 0 0,color-mix(in srgb,var(--accent) 8%,transparent),transparent 42%),var(--bg)}.graph-wrap{position:relative;min-height:0;display:flex;flex-direction:column}.impact-graph{flex:1;min-height:0;position:relative;display:flex;flex-direction:column}.graph-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:8px 14px;border-bottom:1px solid var(--line);background:var(--bg-2)}.graph-count{margin-left:auto;font-size:11px}.chip-btn{background:var(--surface);border:1px solid var(--line);border-radius:999px;padding:4px 12px;color:var(--muted);cursor:pointer;height:26px}.chip-btn:hover{color:var(--ink)}.chip-btn.active{background:var(--rail-active);color:var(--ink)}.chip-btn:disabled{opacity:.45;cursor:not-allowed}.graph-stage{flex:1;min-height:0;position:relative;display:flex;flex-direction:column}.graph-stage .react-flow,.graph-3d,.graph-3d-host,.graph-3d-canvas-host{flex:1;width:100%;height:100%;min-height:280px}.graph-3d{position:relative;background:var(--graph-bg);display:flex;flex-direction:column}.graph-3d-host{position:relative;min-height:0;display:flex;flex-direction:column}.graph-3d-canvas-host{position:relative;min-height:0}.graph-3d canvas{display:block;width:100%;height:100%}.graph-3d-tip{position:absolute;pointer-events:none;z-index:2;max-width:320px;padding:6px 8px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);color:var(--ink);font-size:11px;line-height:1.35;box-shadow:0 8px 24px var(--shadow)}.graph-3d-tip .t{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.graph-3d-tip .n{font-weight:600}.graph-3d-hint{position:absolute;left:10px;bottom:10px;z-index:2;margin:0;font-size:11px;color:var(--muted);max-width:min(420px,calc(100% - 24px));pointer-events:none}.graph-wrap .react-flow{background-color:var(--graph-bg);background-image:linear-gradient(var(--graph-grid) 1px,transparent 1px),linear-gradient(90deg,var(--graph-grid) 1px,transparent 1px);background-size:24px 24px}.react-flow__minimap{background:var(--graph-bg)!important;border:1px solid var(--line)!important;border-radius:var(--radius);overflow:hidden;box-shadow:0 8px 24px var(--shadow)}.react-flow__minimap-node{fill:var(--muted);stroke:none}.react-flow__minimap-node.selected{fill:var(--accent)}.react-flow__minimap-mask{fill:#00000073!important;stroke:var(--accent)!important}.react-flow__controls{box-shadow:none!important}.react-flow__controls-button{background:var(--surface)!important;border-bottom:1px solid var(--line)!important;fill:var(--ink)!important}h1{font-size:18px;margin:0 0 6px;font-weight:600}h2{font-size:13px;margin:0;font-weight:600}.merge-box{border:1px solid var(--line);background:var(--surface);border-radius:var(--radius-lg);padding:12px 14px;margin-bottom:12px}.merge-box.high{border-color:color-mix(in srgb,var(--high) 55%,var(--line))}.merge-box.medium{border-color:color-mix(in srgb,var(--medium) 55%,var(--line))}.merge-box.low{border-color:color-mix(in srgb,var(--low) 55%,var(--line))}.level{font-family:var(--mono);font-weight:600;font-size:14px}.level.high{color:var(--high)}.level.medium{color:var(--medium)}.level.low{color:var(--low)}.merge-title{margin-top:4px;font-size:13px;color:var(--ink)}.reasons{margin:10px 0 0;padding:0 0 0 18px;color:var(--muted)}.reasons li{margin:0 0 4px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0 0 14px}.metric{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);padding:8px 10px}.metric .n{font-family:var(--mono);font-size:16px;font-weight:600;font-variant-numeric:tabular-nums}.metric .l{font-size:11px;color:var(--muted);margin-top:2px}.section{border-top:1px solid var(--line);padding:8px 0 4px}.section>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.07em;font-weight:600;padding:6px 0}.section>summary::-webkit-details-marker{display:none}.section>summary .count{font-family:var(--mono);letter-spacing:0;text-transform:none;border:1px solid var(--line);border-radius:999px;padding:0 7px;height:18px;display:inline-flex;align-items:center;font-size:11px}.kicker{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em;margin:16px 0 6px;font-weight:600}.chip{display:inline-flex;align-items:center;font-size:11px;padding:2px 8px;border-radius:999px;border:1px solid var(--line);margin:0 6px 6px 0;color:var(--muted);background:var(--surface)}.chip.blocker{color:var(--low);border-color:var(--low)}.chip.warning{color:var(--medium);border-color:var(--medium)}.chip.strong{color:var(--low);border-color:var(--low)}.chip.worth_exploring{color:var(--medium);border-color:var(--medium)}.chip.speculative{color:var(--muted);border-color:var(--line)}.chip.open{color:var(--high);border-color:color-mix(in srgb,var(--high) 50%,var(--line))}.file{font-family:var(--mono);font-size:12px;color:var(--accent)}.read-item,.finding,.residual{padding:8px 0;border-bottom:1px solid color-mix(in srgb,var(--line) 70%,transparent)}.read-item:last-child,.finding:last-child{border-bottom:0}.read-item .why{color:var(--muted);font-size:12px;margin-top:2px}.muted{color:var(--muted);font-size:13px;line-height:1.45}.error{color:var(--low);padding:8px 12px;border:1px solid var(--low);background:color-mix(in srgb,var(--low) 10%,var(--surface));border-radius:var(--radius);display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.banner{padding:8px 12px;border-radius:var(--radius);border:1px solid var(--line);background:var(--surface);font-size:13px;line-height:1.45;display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.banner.warn{border-color:var(--medium);color:var(--medium)}.banner.stale{border-color:var(--low);color:var(--low)}.banner .dismiss{background:transparent;border:0;color:inherit;cursor:pointer;height:auto;padding:0 2px;opacity:.7}.empty{padding:24px 8px;color:var(--muted);font-size:13px;line-height:1.55}.empty h2{font-size:16px;color:var(--ink);margin-bottom:8px}.empty ol{margin:12px 0 0 18px;padding:0}.empty code,code{font-family:var(--mono);font-size:12px;color:var(--accent)}.btn-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.pr-list{padding:16px;overflow:auto}.pr-toolbar{display:flex;gap:8px;align-items:flex-end;margin-bottom:14px}.pr-toolbar .field{flex:1}.pr-toolbar .field.provider{flex:0 0 140px}.pr{border:1px solid var(--line);background:var(--surface);padding:12px 14px;border-radius:var(--radius-lg);margin-bottom:10px}.pr h3{margin:0 0 4px;font-size:14px;font-weight:600}.pr-meta{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;margin:6px 0 10px}.pr-actions{display:flex;gap:8px;align-items:center}.settings{padding:24px;max-width:760px;overflow:auto;display:grid;gap:16px}.settings-card{border:1px solid var(--line);background:var(--surface);border-radius:var(--radius-lg);padding:16px;display:grid;gap:8px}.settings-card h2{font-size:14px;margin-bottom:2px}.settings label{font-size:12px;color:var(--muted);font-weight:500}.theme-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}.theme-swatch{border:1px solid var(--line);background:var(--bg);color:var(--ink);border-radius:var(--radius);padding:10px;text-align:left;cursor:pointer;height:auto;box-shadow:0 1px 8px var(--shadow)}.theme-swatch.active{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent),0 1px 8px var(--shadow)}.theme-swatch .swatch-bar{height:6px;border-radius:3px;margin-bottom:8px;background:linear-gradient(90deg,var(--accent),var(--high),var(--medium),var(--low))}.theme-swatch .name{font-size:13px;font-weight:600}.theme-swatch .group{font-size:11px;color:var(--muted)}.headline{white-space:pre-wrap;font-family:var(--mono);font-size:12px;color:var(--muted);margin:8px 0 0}.graph-modes{display:flex;gap:8px;align-items:center;padding:8px 14px;border-bottom:1px solid var(--line);background:var(--bg-2)}.seg{display:inline-flex;border:1px solid var(--line);border-radius:999px;padding:2px;background:var(--surface)}.seg button,.graph-modes button{background:transparent;border:0;border-radius:999px;padding:4px 12px;color:var(--muted);cursor:pointer;height:26px}.seg button.active,.graph-modes button.active{background:var(--rail-active);color:var(--ink)}.legend{margin-left:auto;display:flex;gap:12px;color:var(--muted);font-size:11px}.legend i{display:inline-block;width:14px;height:2px;margin-right:6px;vertical-align:middle;background:var(--edge-cheap)}.legend i.exp{background:var(--edge-expensive)}.legend i.crit{background:var(--edge-critical);height:3px}.legend i.dash{border-top:2px dashed var(--muted);background:none;height:0}.inspector{position:absolute;top:12px;right:12px;z-index:5;width:260px;max-width:calc(100% - 24px);overflow-x:hidden;overflow-wrap:break-word;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-lg);padding:10px 12px;box-shadow:0 8px 24px var(--shadow)}.inspector .t{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}.inspector .n,.inspector .file,.inspector .muted{overflow-wrap:break-word}.inspector .n{font-weight:600;margin:4px 0}.lp-node{padding:8px 10px;border-radius:var(--radius);border:1px solid var(--node-line);background:var(--node-bg);width:180px;max-width:100%;height:56px;box-sizing:border-box;box-shadow:0 0 0 1px var(--shadow);overflow:visible;position:relative}.lp-node .t{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.08em}.lp-node .n{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lp-node.selected{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}.react-flow__node-load .react-flow__handle{width:8px;height:8px;border:none;background:transparent;opacity:0}.type-table{width:100%;border-collapse:collapse;font-size:12px}.type-table td{padding:3px 0}.type-table td:last-child{text-align:right;font-family:var(--mono);font-variant-numeric:tabular-nums;color:var(--muted)}@media(prefers-reduced-motion:reduce){.progress i{animation:none;width:100%}*{scroll-behavior:auto!important}}@media(max-width:960px){.app{grid-template-columns:56px 1fr}.brand-sub,.nav-item span,.theme-pick,.kbd-hint,.rail-foot .muted{display:none}.nav-item{justify-content:center;padding:10px}.content{grid-template-columns:1fr}.brief{border-right:0;border-bottom:1px solid var(--line);max-height:42vh}} diff --git a/src/loadpath/static/assets/index-aoV_COFI.js b/src/loadpath/static/assets/index-_7_dtN73.js similarity index 79% rename from src/loadpath/static/assets/index-aoV_COFI.js rename to src/loadpath/static/assets/index-_7_dtN73.js index d686d32..51d7561 100644 --- a/src/loadpath/static/assets/index-aoV_COFI.js +++ b/src/loadpath/static/assets/index-_7_dtN73.js @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Of;function H0(){if(Of)return Pe;Of=1;var t=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),x=Symbol.iterator;function v(P){return P===null||typeof P!="object"?null:(P=x&&P[x]||P["@@iterator"],typeof P=="function"?P:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,C={};function E(P,T,ne){this.props=P,this.context=T,this.refs=C,this.updater=ne||S}E.prototype.isReactComponent={},E.prototype.setState=function(P,T){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,T,"setState")},E.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function N(){}N.prototype=E.prototype;function R(P,T,ne){this.props=P,this.context=T,this.refs=C,this.updater=ne||S}var k=R.prototype=new N;k.constructor=R,_(k,E.prototype),k.isPureReactComponent=!0;var j=Array.isArray,L=Object.prototype.hasOwnProperty,D={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function H(P,T,ne){var re,ue={},ce=null,de=null;if(T!=null)for(re in T.ref!==void 0&&(de=T.ref),T.key!==void 0&&(ce=""+T.key),T)L.call(T,re)&&!B.hasOwnProperty(re)&&(ue[re]=T[re]);var Q=arguments.length-2;if(Q===1)ue.children=ne;else if(1>>1,T=A[P];if(0>>1;Pa(ue,F))cea(de,ue)?(A[P]=de,A[ce]=F,P=ce):(A[P]=ue,A[re]=F,P=re);else if(cea(de,F))A[P]=de,A[ce]=F,P=ce;else break e}}return b}function a(A,b){var F=A.sortIndex-b.sortIndex;return F!==0?F:A.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();t.unstable_now=function(){return d.now()-f}}var p=[],y=[],m=1,x=null,v=3,S=!1,_=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(A){for(var b=i(y);b!==null;){if(b.callback===null)l(y);else if(b.startTime<=A)l(y),b.sortIndex=b.expirationTime,r(p,b);else break;b=i(y)}}function j(A){if(C=!1,k(A),!_)if(i(p)!==null)_=!0,V(L);else{var b=i(y);b!==null&&U(j,b.startTime-A)}}function L(A,b){_=!1,C&&(C=!1,N(H),H=-1),S=!0;var F=v;try{for(k(b),x=i(p);x!==null&&(!(x.expirationTime>b)||A&&!Z());){var P=x.callback;if(typeof P=="function"){x.callback=null,v=x.priorityLevel;var T=P(x.expirationTime<=b);b=t.unstable_now(),typeof T=="function"?x.callback=T:x===i(p)&&l(p),k(b)}else l(p);x=i(p)}if(x!==null)var ne=!0;else{var re=i(y);re!==null&&U(j,re.startTime-b),ne=!1}return ne}finally{x=null,v=F,S=!1}}var D=!1,B=null,H=-1,X=5,ee=-1;function Z(){return!(t.unstable_now()-eeA||125P?(A.sortIndex=F,r(y,A),i(p)===null&&A===i(y)&&(C?(N(H),H=-1):C=!0,U(j,F-P))):(A.sortIndex=T,r(p,A),_||S||(_=!0,V(L))),A},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(A){var b=v;return function(){var F=v;v=b;try{return A.apply(this,arguments)}finally{v=F}}}})(wu)),wu}var Uf;function Y0(){return Uf||(Uf=1,xu.exports=W0()),xu.exports}/** + */var Vf;function W0(){return Vf||(Vf=1,(function(t){function r(A,L){var F=A.length;A.push(L);e:for(;0>>1,T=A[P];if(0>>1;Pa(ue,F))cea(de,ue)?(A[P]=de,A[ce]=F,P=ce):(A[P]=ue,A[re]=F,P=re);else if(cea(de,F))A[P]=de,A[ce]=F,P=ce;else break e}}return L}function a(A,L){var F=A.sortIndex-L.sortIndex;return F!==0?F:A.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();t.unstable_now=function(){return d.now()-f}}var p=[],y=[],m=1,x=null,v=3,S=!1,_=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(A){for(var L=i(y);L!==null;){if(L.callback===null)l(y);else if(L.startTime<=A)l(y),L.sortIndex=L.expirationTime,r(p,L);else break;L=i(y)}}function j(A){if(C=!1,k(A),!_)if(i(p)!==null)_=!0,V(z);else{var L=i(y);L!==null&&U(j,L.startTime-A)}}function z(A,L){_=!1,C&&(C=!1,N(H),H=-1),S=!0;var F=v;try{for(k(L),x=i(p);x!==null&&(!(x.expirationTime>L)||A&&!Z());){var P=x.callback;if(typeof P=="function"){x.callback=null,v=x.priorityLevel;var T=P(x.expirationTime<=L);L=t.unstable_now(),typeof T=="function"?x.callback=T:x===i(p)&&l(p),k(L)}else l(p);x=i(p)}if(x!==null)var ne=!0;else{var re=i(y);re!==null&&U(j,re.startTime-L),ne=!1}return ne}finally{x=null,v=F,S=!1}}var D=!1,B=null,H=-1,X=5,ee=-1;function Z(){return!(t.unstable_now()-eeA||125P?(A.sortIndex=F,r(y,A),i(p)===null&&A===i(y)&&(C?(N(H),H=-1):C=!0,U(j,F-P))):(A.sortIndex=T,r(p,A),_||S||(_=!0,V(z))),A},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(A){var L=v;return function(){var F=v;v=L;try{return A.apply(this,arguments)}finally{v=F}}}})(wu)),wu}var Uf;function Y0(){return Uf||(Uf=1,xu.exports=W0()),xu.exports}/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Wf;function X0(){if(Wf)return kt;Wf=1;var t=wi(),r=Y0();function i(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,y=/^[: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]*$/,m={},x={};function v(e){return p.call(x,e)?!0:p.call(m,e)?!1:y.test(e)?x[e]=!0:(m[e]=!0,!1)}function S(e,n,o,s){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _(e,n,o,s){if(n===null||typeof n>"u"||S(e,n,o,s))return!0;if(s)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function C(e,n,o,s,c,h,w){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=h,this.removeEmptyString=w}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){E[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];E[n]=new C(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){E[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){E[e]=new C(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){E[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){E[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){E[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){E[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){E[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function R(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 n=e.replace(N,R);E[n]=new C(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(N,R);E[n]=new C(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(N,R);E[n]=new C(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){E[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),E.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){E[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function k(e,n,o,s){var c=E.hasOwnProperty(n)?E[n]:null;(c!==null?c.type!==0:s||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,y=/^[: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]*$/,m={},x={};function v(e){return p.call(x,e)?!0:p.call(m,e)?!1:y.test(e)?x[e]=!0:(m[e]=!0,!1)}function S(e,n,o,s){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return s?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function _(e,n,o,s){if(n===null||typeof n>"u"||S(e,n,o,s))return!0;if(s)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function C(e,n,o,s,c,h,w){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=s,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=h,this.removeEmptyString=w}var E={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){E[e]=new C(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];E[n]=new C(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){E[e]=new C(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){E[e]=new C(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){E[e]=new C(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){E[e]=new C(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){E[e]=new C(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){E[e]=new C(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){E[e]=new C(e,5,!1,e.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function R(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 n=e.replace(N,R);E[n]=new C(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(N,R);E[n]=new C(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(N,R);E[n]=new C(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){E[e]=new C(e,1,!1,e.toLowerCase(),null,!1,!1)}),E.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){E[e]=new C(e,1,!1,e.toLowerCase(),null,!0,!0)});function k(e,n,o,s){var c=E.hasOwnProperty(n)?E[n]:null;(c!==null?c.type!==0:s||!(2I||c[w]!==h[I]){var z=` -`+c[w].replace(" at new "," at ");return e.displayName&&z.includes("")&&(z=z.replace("",e.displayName)),z}while(1<=w&&0<=I);break}}}finally{ne=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?T(e):""}function ue(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=re(e.type,!1),e;case 11:return e=re(e.type.render,!1),e;case 1:return e=re(e.type,!0),e;default:return""}}function ce(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 B:return"Fragment";case D:return"Portal";case X:return"Profiler";case H:return"StrictMode";case J:return"Suspense";case M:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Z:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return n=e.displayName||null,n!==null?n:ce(e.type)||"Memo";case V:n=e._payload,e=e._init;try{return ce(e(n))}catch{}}return null}function de(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(n);case 8:return n===H?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function se(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function fe(e){var n=se(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,h=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(w){s=""+w,h.call(this,w)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(w){s=""+w},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ge(e){e._valueTracker||(e._valueTracker=fe(e))}function ve(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),s="";return e&&(s=se(e)?e.checked?"true":"false":e.value),e=s,e!==o?(n.setValue(e),!0):!1}function pe(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 Ce(e,n){var o=n.checked;return F({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function je(e,n){var o=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;o=Q(n.value!=null?n.value:o),e._wrapperState={initialChecked:s,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Me(e,n){n=n.checked,n!=null&&k(e,"checked",n,!1)}function ze(e,n){Me(e,n);var o=Q(n.value),s=n.type;if(o!=null)s==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?rt(e,n.type,o):n.hasOwnProperty("defaultValue")&&rt(e,n.type,Q(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Xe(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function rt(e,n,o){(n!=="number"||pe(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Ze=Array.isArray;function Je(e,n,o,s){if(e=e.options,n){n={};for(var c=0;c"+n.valueOf().toString()+"",n=pt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Ut(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var hn={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},Ir=["Webkit","ms","Moz","O"];Object.keys(hn).forEach(function(e){Ir.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),hn[n]=hn[e]})});function er(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||hn.hasOwnProperty(e)&&hn[e]?(""+n).trim():n+"px"}function tr(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var s=o.indexOf("--")===0,c=er(o,n[o],s);o==="float"&&(o="cssFloat"),s?e.setProperty(o,c):e[o]=c}}var Rr=F({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 jn(e,n){if(n){if(Rr[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(i(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(i(61))}if(n.style!=null&&typeof n.style!="object")throw Error(i(62))}}function Mn(e,n){if(e.indexOf("-")===-1)return typeof n.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 Pn=null;function K(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Se=null,Le=null,Nt=null;function Ct(e){if(e=Bo(e)){if(typeof Se!="function")throw Error(i(280));var n=e.stateNode;n&&(n=ns(n),Se(e.stateNode,e.type,n))}}function ji(e){Le?Nt?Nt.push(e):Nt=[e]:Le=e}function Mi(){if(Le){var e=Le,n=Nt;if(Nt=Le=null,Ct(e),n)for(e=0;e>>=0,e===0?32:31-(bl(e)/Al|0)|0}var Ar=64,Dr=4194304;function ir(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 pn(e,n){var o=e.pendingLanes;if(o===0)return 0;var s=0,c=e.suspendedLanes,h=e.pingedLanes,w=o&268435455;if(w!==0){var I=w&~c;I!==0?s=ir(I):(h&=w,h!==0&&(s=ir(h)))}else w=o&~c,w!==0?s=ir(w):h!==0&&(s=ir(h));if(s===0)return 0;if(n!==0&&n!==s&&(n&c)===0&&(c=s&-s,h=n&-n,c>=h||c===16&&(h&4194240)!==0))return n;if((s&4)!==0&&(s|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0o;o++)n.push(e);return n}function lr(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Mt(n),e[n]=o}function Ol(e,n){var o=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0=zo),Rc=" ",Tc=!1;function zc(e,n){switch(e){case"keyup":return Am.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hr=!1;function $m(e,n){switch(e){case"compositionend":return Lc(n);case"keypress":return n.which!==32?null:(Tc=!0,Rc);case"textInput":return e=n.data,e===Rc&&Tc?null:e;default:return null}}function Om(e,n){if(Hr)return e==="compositionend"||!Kl&&zc(e,n)?(e=Nc(),Wi=Ul=Ln=null,Hr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:o,offset:n-e};e=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Hc(o)}}function Vc(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Vc(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Uc(){for(var e=window,n=pe();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=pe(e.document)}return n}function Jl(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Gm(e){var n=Uc(),o=e.focusedElem,s=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&Vc(o.ownerDocument.documentElement,o)){if(s!==null&&Jl(o)){if(n=s.start,e=s.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=o.textContent.length,h=Math.min(s.start,c);s=s.end===void 0?h:Math.min(s.end,c),!e.extend&&h>s&&(c=s,s=h,h=c),c=Bc(o,h);var w=Bc(o,s);c&&w&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==w.node||e.focusOffset!==w.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),h>s?(e.addRange(n),e.extend(w.node,w.offset)):(n.setEnd(w.node,w.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,Br=null,ea=null,Do=null,ta=!1;function Wc(e,n,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;ta||Br==null||Br!==pe(s)||(s=Br,"selectionStart"in s&&Jl(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Do&&Ao(Do,s)||(Do=s,s=Ji(ea,"onSelect"),0Xr||(e.current=ha[Xr],ha[Xr]=null,Xr--)}function Ae(e,n){Xr++,ha[Xr]=e.current,e.current=n}var $n={},at=Dn($n),vt=Dn(!1),ur=$n;function Gr(e,n){var o=e.type.contextTypes;if(!o)return $n;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var c={},h;for(h in o)c[h]=n[h];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function xt(e){return e=e.childContextTypes,e!=null}function rs(){$e(vt),$e(at)}function sd(e,n,o){if(at.current!==$n)throw Error(i(168));Ae(at,n),Ae(vt,o)}function ld(e,n,o){var s=e.stateNode;if(n=n.childContextTypes,typeof s.getChildContext!="function")return o;s=s.getChildContext();for(var c in s)if(!(c in n))throw Error(i(108,de(e)||"Unknown",c));return F({},o,s)}function os(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$n,ur=at.current,Ae(at,e),Ae(vt,vt.current),!0}function ad(e,n,o){var s=e.stateNode;if(!s)throw Error(i(169));o?(e=ld(e,n,ur),s.__reactInternalMemoizedMergedChildContext=e,$e(vt),$e(at),Ae(at,e)):$e(vt),Ae(vt,o)}var mn=null,is=!1,pa=!1;function ud(e){mn===null?mn=[e]:mn.push(e)}function s0(e){is=!0,ud(e)}function On(){if(!pa&&mn!==null){pa=!0;var e=0,n=be;try{var o=mn;for(be=1;e>=w,c-=w,yn=1<<32-Mt(n)+c|o<Ne?(nt=Ee,Ee=null):nt=Ee.sibling;var Te=oe(Y,Ee,G[Ne],ae);if(Te===null){Ee===null&&(Ee=nt);break}e&&Ee&&Te.alternate===null&&n(Y,Ee),$=h(Te,$,Ne),ke===null?we=Te:ke.sibling=Te,ke=Te,Ee=nt}if(Ne===G.length)return o(Y,Ee),Fe&&dr(Y,Ne),we;if(Ee===null){for(;NeNe?(nt=Ee,Ee=null):nt=Ee.sibling;var Gn=oe(Y,Ee,Te.value,ae);if(Gn===null){Ee===null&&(Ee=nt);break}e&&Ee&&Gn.alternate===null&&n(Y,Ee),$=h(Gn,$,Ne),ke===null?we=Gn:ke.sibling=Gn,ke=Gn,Ee=nt}if(Te.done)return o(Y,Ee),Fe&&dr(Y,Ne),we;if(Ee===null){for(;!Te.done;Ne++,Te=G.next())Te=le(Y,Te.value,ae),Te!==null&&($=h(Te,$,Ne),ke===null?we=Te:ke.sibling=Te,ke=Te);return Fe&&dr(Y,Ne),we}for(Ee=s(Y,Ee);!Te.done;Ne++,Te=G.next())Te=he(Ee,Y,Ne,Te.value,ae),Te!==null&&(e&&Te.alternate!==null&&Ee.delete(Te.key===null?Ne:Te.key),$=h(Te,$,Ne),ke===null?we=Te:ke.sibling=Te,ke=Te);return e&&Ee.forEach(function(F0){return n(Y,F0)}),Fe&&dr(Y,Ne),we}function Ye(Y,$,G,ae){if(typeof G=="object"&&G!==null&&G.type===B&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case L:e:{for(var we=G.key,ke=$;ke!==null;){if(ke.key===we){if(we=G.type,we===B){if(ke.tag===7){o(Y,ke.sibling),$=c(ke,G.props.children),$.return=Y,Y=$;break e}}else if(ke.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===V&&gd(we)===ke.type){o(Y,ke.sibling),$=c(ke,G.props),$.ref=Vo(Y,ke,G),$.return=Y,Y=$;break e}o(Y,ke);break}else n(Y,ke);ke=ke.sibling}G.type===B?($=xr(G.props.children,Y.mode,ae,G.key),$.return=Y,Y=$):(ae=zs(G.type,G.key,G.props,null,Y.mode,ae),ae.ref=Vo(Y,$,G),ae.return=Y,Y=ae)}return w(Y);case D:e:{for(ke=G.key;$!==null;){if($.key===ke)if($.tag===4&&$.stateNode.containerInfo===G.containerInfo&&$.stateNode.implementation===G.implementation){o(Y,$.sibling),$=c($,G.children||[]),$.return=Y,Y=$;break e}else{o(Y,$);break}else n(Y,$);$=$.sibling}$=du(G,Y.mode,ae),$.return=Y,Y=$}return w(Y);case V:return ke=G._init,Ye(Y,$,ke(G._payload),ae)}if(Ze(G))return ye(Y,$,G,ae);if(b(G))return xe(Y,$,G,ae);us(Y,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,$!==null&&$.tag===6?(o(Y,$.sibling),$=c($,G),$.return=Y,Y=$):(o(Y,$),$=cu(G,Y.mode,ae),$.return=Y,Y=$),w(Y)):o(Y,$)}return Ye}var Zr=md(!0),yd=md(!1),cs=Dn(null),ds=null,Jr=null,wa=null;function Sa(){wa=Jr=ds=null}function _a(e){var n=cs.current;$e(cs),e._currentValue=n}function ka(e,n,o){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===o)break;e=e.return}}function eo(e,n){ds=e,wa=Jr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(wt=!0),e.firstContext=null)}function Ot(e){var n=e._currentValue;if(wa!==e)if(e={context:e,memoizedValue:n,next:null},Jr===null){if(ds===null)throw Error(i(308));Jr=e,ds.dependencies={lanes:0,firstContext:e}}else Jr=Jr.next=e;return n}var fr=null;function Ea(e){fr===null?fr=[e]:fr.push(e)}function vd(e,n,o,s){var c=n.interleaved;return c===null?(o.next=o,Ea(n)):(o.next=c.next,c.next=o),n.interleaved=o,xn(e,s)}function xn(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Fn=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xd(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Hn(e,n,o){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ie&2)!==0){var c=s.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),s.pending=n,xn(e,o)}return c=s.interleaved,c===null?(n.next=n,Ea(s)):(n.next=c.next,c.next=n),s.interleaved=n,xn(e,o)}function fs(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var s=n.lanes;s&=e.pendingLanes,o|=s,n.lanes=o,$r(e,o)}}function wd(e,n){var o=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var c=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var w={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};h===null?c=h=w:h=h.next=w,o=o.next}while(o!==null);h===null?c=h=n:h=h.next=n}else c=h=n;o={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:s.shared,effects:s.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function hs(e,n,o,s){var c=e.updateQueue;Fn=!1;var h=c.firstBaseUpdate,w=c.lastBaseUpdate,I=c.shared.pending;if(I!==null){c.shared.pending=null;var z=I,q=z.next;z.next=null,w===null?h=q:w.next=q,w=z;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,I=ie.lastBaseUpdate,I!==w&&(I===null?ie.firstBaseUpdate=q:I.next=q,ie.lastBaseUpdate=z))}if(h!==null){var le=c.baseState;w=0,ie=q=z=null,I=h;do{var oe=I.lane,he=I.eventTime;if((s&oe)===oe){ie!==null&&(ie=ie.next={eventTime:he,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var ye=e,xe=I;switch(oe=n,he=o,xe.tag){case 1:if(ye=xe.payload,typeof ye=="function"){le=ye.call(he,le,oe);break e}le=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=xe.payload,oe=typeof ye=="function"?ye.call(he,le,oe):ye,oe==null)break e;le=F({},le,oe);break e;case 2:Fn=!0}}I.callback!==null&&I.lane!==0&&(e.flags|=64,oe=c.effects,oe===null?c.effects=[I]:oe.push(I))}else he={eventTime:he,lane:oe,tag:I.tag,payload:I.payload,callback:I.callback,next:null},ie===null?(q=ie=he,z=le):ie=ie.next=he,w|=oe;if(I=I.next,I===null){if(I=c.shared.pending,I===null)break;oe=I,I=oe.next,oe.next=null,c.lastBaseUpdate=oe,c.shared.pending=null}}while(!0);if(ie===null&&(z=le),c.baseState=z,c.firstBaseUpdate=q,c.lastBaseUpdate=ie,n=c.shared.interleaved,n!==null){c=n;do w|=c.lane,c=c.next;while(c!==n)}else h===null&&(c.shared.lanes=0);gr|=w,e.lanes=w,e.memoizedState=le}}function Sd(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;no?o:4,e(!0);var s=Ia.transition;Ia.transition={};try{e(!1),n()}finally{be=o,Ia.transition=s}}function Fd(){return Ft().memoizedState}function c0(e,n,o){var s=Wn(e);if(o={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null},Hd(e))Bd(n,o);else if(o=vd(e,n,o,s),o!==null){var c=mt();Kt(o,e,s,c),Vd(o,n,s)}}function d0(e,n,o){var s=Wn(e),c={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null};if(Hd(e))Bd(n,c);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var w=n.lastRenderedState,I=h(w,o);if(c.hasEagerState=!0,c.eagerState=I,Wt(I,w)){var z=n.interleaved;z===null?(c.next=c,Ea(n)):(c.next=z.next,z.next=c),n.interleaved=c;return}}catch{}finally{}o=vd(e,n,c,s),o!==null&&(c=mt(),Kt(o,e,s,c),Vd(o,n,s))}}function Hd(e){var n=e.alternate;return e===Ve||n!==null&&n===Ve}function Bd(e,n){Xo=ms=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function Vd(e,n,o){if((o&4194240)!==0){var s=n.lanes;s&=e.pendingLanes,o|=s,n.lanes=o,$r(e,o)}}var xs={readContext:Ot,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},f0={readContext:Ot,useCallback:function(e,n){return an().memoizedState=[e,n===void 0?null:n],e},useContext:Ot,useEffect:Td,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,ys(4194308,4,bd.bind(null,n,e),o)},useLayoutEffect:function(e,n){return ys(4194308,4,e,n)},useInsertionEffect:function(e,n){return ys(4,2,e,n)},useMemo:function(e,n){var o=an();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var s=an();return n=o!==void 0?o(n):n,s.memoizedState=s.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=c0.bind(null,Ve,e),[s.memoizedState,e]},useRef:function(e){var n=an();return e={current:e},n.memoizedState=e},useState:Id,useDebugValue:Da,useDeferredValue:function(e){return an().memoizedState=e},useTransition:function(){var e=Id(!1),n=e[0];return e=u0.bind(null,e[1]),an().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var s=Ve,c=an();if(Fe){if(o===void 0)throw Error(i(407));o=o()}else{if(o=n(),tt===null)throw Error(i(349));(pr&30)!==0||Nd(s,n,o)}c.memoizedState=o;var h={value:o,getSnapshot:n};return c.queue=h,Td(jd.bind(null,s,h,e),[e]),s.flags|=2048,Ko(9,Cd.bind(null,s,h,o,n),void 0,null),o},useId:function(){var e=an(),n=tt.identifierPrefix;if(Fe){var o=vn,s=yn;o=(s&~(1<<32-Mt(s)-1)).toString(32)+o,n=":"+n+"R"+o,o=Go++,0I||c[w]!==h[I]){var b=` +`+c[w].replace(" at new "," at ");return e.displayName&&b.includes("")&&(b=b.replace("",e.displayName)),b}while(1<=w&&0<=I);break}}}finally{ne=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?T(e):""}function ue(e){switch(e.tag){case 5:return T(e.type);case 16:return T("Lazy");case 13:return T("Suspense");case 19:return T("SuspenseList");case 0:case 2:case 15:return e=re(e.type,!1),e;case 11:return e=re(e.type.render,!1),e;case 1:return e=re(e.type,!0),e;default:return""}}function ce(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 B:return"Fragment";case D:return"Portal";case X:return"Profiler";case H:return"StrictMode";case J:return"Suspense";case M:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Z:return(e.displayName||"Context")+".Consumer";case ee:return(e._context.displayName||"Context")+".Provider";case te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return n=e.displayName||null,n!==null?n:ce(e.type)||"Memo";case V:n=e._payload,e=e._init;try{return ce(e(n))}catch{}}return null}function de(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ce(n);case 8:return n===H?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function Q(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function se(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function fe(e){var n=se(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),s=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,h=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(w){s=""+w,h.call(this,w)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(w){s=""+w},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ge(e){e._valueTracker||(e._valueTracker=fe(e))}function xe(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),s="";return e&&(s=se(e)?e.checked?"true":"false":e.value),e=s,e!==o?(n.setValue(e),!0):!1}function pe(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 Ce(e,n){var o=n.checked;return F({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function je(e,n){var o=n.defaultValue==null?"":n.defaultValue,s=n.checked!=null?n.checked:n.defaultChecked;o=Q(n.value!=null?n.value:o),e._wrapperState={initialChecked:s,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Me(e,n){n=n.checked,n!=null&&k(e,"checked",n,!1)}function be(e,n){Me(e,n);var o=Q(n.value),s=n.type;if(o!=null)s==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?rt(e,n.type,o):n.hasOwnProperty("defaultValue")&&rt(e,n.type,Q(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Xe(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var s=n.type;if(!(s!=="submit"&&s!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function rt(e,n,o){(n!=="number"||pe(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var Ze=Array.isArray;function Je(e,n,o,s){if(e=e.options,n){n={};for(var c=0;c"+n.valueOf().toString()+"",n=pt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Ut(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var hn={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},Ir=["Webkit","ms","Moz","O"];Object.keys(hn).forEach(function(e){Ir.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),hn[n]=hn[e]})});function er(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||hn.hasOwnProperty(e)&&hn[e]?(""+n).trim():n+"px"}function tr(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var s=o.indexOf("--")===0,c=er(o,n[o],s);o==="float"&&(o="cssFloat"),s?e.setProperty(o,c):e[o]=c}}var Rr=F({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 jn(e,n){if(n){if(Rr[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(i(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(i(61))}if(n.style!=null&&typeof n.style!="object")throw Error(i(62))}}function Mn(e,n){if(e.indexOf("-")===-1)return typeof n.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 Pn=null;function K(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ye=null,ze=null,Nt=null;function Ct(e){if(e=Bo(e)){if(typeof ye!="function")throw Error(i(280));var n=e.stateNode;n&&(n=ns(n),ye(e.stateNode,e.type,n))}}function ji(e){ze?Nt?Nt.push(e):Nt=[e]:ze=e}function Mi(){if(ze){var e=ze,n=Nt;if(Nt=ze=null,Ct(e),n)for(e=0;e>>=0,e===0?32:31-(Ll(e)/Al|0)|0}var Ar=64,Dr=4194304;function ir(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 pn(e,n){var o=e.pendingLanes;if(o===0)return 0;var s=0,c=e.suspendedLanes,h=e.pingedLanes,w=o&268435455;if(w!==0){var I=w&~c;I!==0?s=ir(I):(h&=w,h!==0&&(s=ir(h)))}else w=o&~c,w!==0?s=ir(w):h!==0&&(s=ir(h));if(s===0)return 0;if(n!==0&&n!==s&&(n&c)===0&&(c=s&-s,h=n&-n,c>=h||c===16&&(h&4194240)!==0))return n;if((s&4)!==0&&(s|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=s;0o;o++)n.push(e);return n}function lr(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Mt(n),e[n]=o}function Ol(e,n){var o=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var s=e.eventTimes;for(e=e.expirationTimes;0=bo),Rc=" ",Tc=!1;function bc(e,n){switch(e){case"keyup":return Am.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hr=!1;function $m(e,n){switch(e){case"compositionend":return zc(n);case"keypress":return n.which!==32?null:(Tc=!0,Rc);case"textInput":return e=n.data,e===Rc&&Tc?null:e;default:return null}}function Om(e,n){if(Hr)return e==="compositionend"||!Kl&&bc(e,n)?(e=Nc(),Wi=Ul=zn=null,Hr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:o,offset:n-e};e=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=Hc(o)}}function Vc(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Vc(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Uc(){for(var e=window,n=pe();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=pe(e.document)}return n}function Jl(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Gm(e){var n=Uc(),o=e.focusedElem,s=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&Vc(o.ownerDocument.documentElement,o)){if(s!==null&&Jl(o)){if(n=s.start,e=s.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var c=o.textContent.length,h=Math.min(s.start,c);s=s.end===void 0?h:Math.min(s.end,c),!e.extend&&h>s&&(c=s,s=h,h=c),c=Bc(o,h);var w=Bc(o,s);c&&w&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==w.node||e.focusOffset!==w.offset)&&(n=n.createRange(),n.setStart(c.node,c.offset),e.removeAllRanges(),h>s?(e.addRange(n),e.extend(w.node,w.offset)):(n.setEnd(w.node,w.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,Br=null,ea=null,Do=null,ta=!1;function Wc(e,n,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;ta||Br==null||Br!==pe(s)||(s=Br,"selectionStart"in s&&Jl(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Do&&Ao(Do,s)||(Do=s,s=Ji(ea,"onSelect"),0Xr||(e.current=ha[Xr],ha[Xr]=null,Xr--)}function Ae(e,n){Xr++,ha[Xr]=e.current,e.current=n}var $n={},at=Dn($n),vt=Dn(!1),ur=$n;function Gr(e,n){var o=e.type.contextTypes;if(!o)return $n;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===n)return s.__reactInternalMemoizedMaskedChildContext;var c={},h;for(h in o)c[h]=n[h];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=c),c}function xt(e){return e=e.childContextTypes,e!=null}function rs(){$e(vt),$e(at)}function sd(e,n,o){if(at.current!==$n)throw Error(i(168));Ae(at,n),Ae(vt,o)}function ld(e,n,o){var s=e.stateNode;if(n=n.childContextTypes,typeof s.getChildContext!="function")return o;s=s.getChildContext();for(var c in s)if(!(c in n))throw Error(i(108,de(e)||"Unknown",c));return F({},o,s)}function os(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$n,ur=at.current,Ae(at,e),Ae(vt,vt.current),!0}function ad(e,n,o){var s=e.stateNode;if(!s)throw Error(i(169));o?(e=ld(e,n,ur),s.__reactInternalMemoizedMergedChildContext=e,$e(vt),$e(at),Ae(at,e)):$e(vt),Ae(vt,o)}var mn=null,is=!1,pa=!1;function ud(e){mn===null?mn=[e]:mn.push(e)}function s0(e){is=!0,ud(e)}function On(){if(!pa&&mn!==null){pa=!0;var e=0,n=Le;try{var o=mn;for(Le=1;e>=w,c-=w,yn=1<<32-Mt(n)+c|o<Ne?(nt=Ee,Ee=null):nt=Ee.sibling;var Te=oe(Y,Ee,G[Ne],ae);if(Te===null){Ee===null&&(Ee=nt);break}e&&Ee&&Te.alternate===null&&n(Y,Ee),$=h(Te,$,Ne),ke===null?Se=Te:ke.sibling=Te,ke=Te,Ee=nt}if(Ne===G.length)return o(Y,Ee),Fe&&dr(Y,Ne),Se;if(Ee===null){for(;NeNe?(nt=Ee,Ee=null):nt=Ee.sibling;var Gn=oe(Y,Ee,Te.value,ae);if(Gn===null){Ee===null&&(Ee=nt);break}e&&Ee&&Gn.alternate===null&&n(Y,Ee),$=h(Gn,$,Ne),ke===null?Se=Gn:ke.sibling=Gn,ke=Gn,Ee=nt}if(Te.done)return o(Y,Ee),Fe&&dr(Y,Ne),Se;if(Ee===null){for(;!Te.done;Ne++,Te=G.next())Te=le(Y,Te.value,ae),Te!==null&&($=h(Te,$,Ne),ke===null?Se=Te:ke.sibling=Te,ke=Te);return Fe&&dr(Y,Ne),Se}for(Ee=s(Y,Ee);!Te.done;Ne++,Te=G.next())Te=he(Ee,Y,Ne,Te.value,ae),Te!==null&&(e&&Te.alternate!==null&&Ee.delete(Te.key===null?Ne:Te.key),$=h(Te,$,Ne),ke===null?Se=Te:ke.sibling=Te,ke=Te);return e&&Ee.forEach(function(F0){return n(Y,F0)}),Fe&&dr(Y,Ne),Se}function Ye(Y,$,G,ae){if(typeof G=="object"&&G!==null&&G.type===B&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case z:e:{for(var Se=G.key,ke=$;ke!==null;){if(ke.key===Se){if(Se=G.type,Se===B){if(ke.tag===7){o(Y,ke.sibling),$=c(ke,G.props.children),$.return=Y,Y=$;break e}}else if(ke.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===V&&gd(Se)===ke.type){o(Y,ke.sibling),$=c(ke,G.props),$.ref=Vo(Y,ke,G),$.return=Y,Y=$;break e}o(Y,ke);break}else n(Y,ke);ke=ke.sibling}G.type===B?($=xr(G.props.children,Y.mode,ae,G.key),$.return=Y,Y=$):(ae=bs(G.type,G.key,G.props,null,Y.mode,ae),ae.ref=Vo(Y,$,G),ae.return=Y,Y=ae)}return w(Y);case D:e:{for(ke=G.key;$!==null;){if($.key===ke)if($.tag===4&&$.stateNode.containerInfo===G.containerInfo&&$.stateNode.implementation===G.implementation){o(Y,$.sibling),$=c($,G.children||[]),$.return=Y,Y=$;break e}else{o(Y,$);break}else n(Y,$);$=$.sibling}$=du(G,Y.mode,ae),$.return=Y,Y=$}return w(Y);case V:return ke=G._init,Ye(Y,$,ke(G._payload),ae)}if(Ze(G))return ve(Y,$,G,ae);if(L(G))return we(Y,$,G,ae);us(Y,G)}return typeof G=="string"&&G!==""||typeof G=="number"?(G=""+G,$!==null&&$.tag===6?(o(Y,$.sibling),$=c($,G),$.return=Y,Y=$):(o(Y,$),$=cu(G,Y.mode,ae),$.return=Y,Y=$),w(Y)):o(Y,$)}return Ye}var Zr=md(!0),yd=md(!1),cs=Dn(null),ds=null,Jr=null,wa=null;function Sa(){wa=Jr=ds=null}function _a(e){var n=cs.current;$e(cs),e._currentValue=n}function ka(e,n,o){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===o)break;e=e.return}}function eo(e,n){ds=e,wa=Jr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(wt=!0),e.firstContext=null)}function Ot(e){var n=e._currentValue;if(wa!==e)if(e={context:e,memoizedValue:n,next:null},Jr===null){if(ds===null)throw Error(i(308));Jr=e,ds.dependencies={lanes:0,firstContext:e}}else Jr=Jr.next=e;return n}var fr=null;function Ea(e){fr===null?fr=[e]:fr.push(e)}function vd(e,n,o,s){var c=n.interleaved;return c===null?(o.next=o,Ea(n)):(o.next=c.next,c.next=o),n.interleaved=o,xn(e,s)}function xn(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Fn=!1;function Na(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function xd(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Hn(e,n,o){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ie&2)!==0){var c=s.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),s.pending=n,xn(e,o)}return c=s.interleaved,c===null?(n.next=n,Ea(s)):(n.next=c.next,c.next=n),s.interleaved=n,xn(e,o)}function fs(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var s=n.lanes;s&=e.pendingLanes,o|=s,n.lanes=o,$r(e,o)}}function wd(e,n){var o=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var c=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var w={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};h===null?c=h=w:h=h.next=w,o=o.next}while(o!==null);h===null?c=h=n:h=h.next=n}else c=h=n;o={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:h,shared:s.shared,effects:s.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function hs(e,n,o,s){var c=e.updateQueue;Fn=!1;var h=c.firstBaseUpdate,w=c.lastBaseUpdate,I=c.shared.pending;if(I!==null){c.shared.pending=null;var b=I,q=b.next;b.next=null,w===null?h=q:w.next=q,w=b;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,I=ie.lastBaseUpdate,I!==w&&(I===null?ie.firstBaseUpdate=q:I.next=q,ie.lastBaseUpdate=b))}if(h!==null){var le=c.baseState;w=0,ie=q=b=null,I=h;do{var oe=I.lane,he=I.eventTime;if((s&oe)===oe){ie!==null&&(ie=ie.next={eventTime:he,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var ve=e,we=I;switch(oe=n,he=o,we.tag){case 1:if(ve=we.payload,typeof ve=="function"){le=ve.call(he,le,oe);break e}le=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=we.payload,oe=typeof ve=="function"?ve.call(he,le,oe):ve,oe==null)break e;le=F({},le,oe);break e;case 2:Fn=!0}}I.callback!==null&&I.lane!==0&&(e.flags|=64,oe=c.effects,oe===null?c.effects=[I]:oe.push(I))}else he={eventTime:he,lane:oe,tag:I.tag,payload:I.payload,callback:I.callback,next:null},ie===null?(q=ie=he,b=le):ie=ie.next=he,w|=oe;if(I=I.next,I===null){if(I=c.shared.pending,I===null)break;oe=I,I=oe.next,oe.next=null,c.lastBaseUpdate=oe,c.shared.pending=null}}while(!0);if(ie===null&&(b=le),c.baseState=b,c.firstBaseUpdate=q,c.lastBaseUpdate=ie,n=c.shared.interleaved,n!==null){c=n;do w|=c.lane,c=c.next;while(c!==n)}else h===null&&(c.shared.lanes=0);gr|=w,e.lanes=w,e.memoizedState=le}}function Sd(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;no?o:4,e(!0);var s=Ia.transition;Ia.transition={};try{e(!1),n()}finally{Le=o,Ia.transition=s}}function Fd(){return Ft().memoizedState}function c0(e,n,o){var s=Wn(e);if(o={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null},Hd(e))Bd(n,o);else if(o=vd(e,n,o,s),o!==null){var c=mt();Kt(o,e,s,c),Vd(o,n,s)}}function d0(e,n,o){var s=Wn(e),c={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null};if(Hd(e))Bd(n,c);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var w=n.lastRenderedState,I=h(w,o);if(c.hasEagerState=!0,c.eagerState=I,Wt(I,w)){var b=n.interleaved;b===null?(c.next=c,Ea(n)):(c.next=b.next,b.next=c),n.interleaved=c;return}}catch{}finally{}o=vd(e,n,c,s),o!==null&&(c=mt(),Kt(o,e,s,c),Vd(o,n,s))}}function Hd(e){var n=e.alternate;return e===Ve||n!==null&&n===Ve}function Bd(e,n){Xo=ms=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function Vd(e,n,o){if((o&4194240)!==0){var s=n.lanes;s&=e.pendingLanes,o|=s,n.lanes=o,$r(e,o)}}var xs={readContext:Ot,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useInsertionEffect:ut,useLayoutEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useMutableSource:ut,useSyncExternalStore:ut,useId:ut,unstable_isNewReconciler:!1},f0={readContext:Ot,useCallback:function(e,n){return an().memoizedState=[e,n===void 0?null:n],e},useContext:Ot,useEffect:Td,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,ys(4194308,4,Ld.bind(null,n,e),o)},useLayoutEffect:function(e,n){return ys(4194308,4,e,n)},useInsertionEffect:function(e,n){return ys(4,2,e,n)},useMemo:function(e,n){var o=an();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var s=an();return n=o!==void 0?o(n):n,s.memoizedState=s.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},s.queue=e,e=e.dispatch=c0.bind(null,Ve,e),[s.memoizedState,e]},useRef:function(e){var n=an();return e={current:e},n.memoizedState=e},useState:Id,useDebugValue:Da,useDeferredValue:function(e){return an().memoizedState=e},useTransition:function(){var e=Id(!1),n=e[0];return e=u0.bind(null,e[1]),an().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var s=Ve,c=an();if(Fe){if(o===void 0)throw Error(i(407));o=o()}else{if(o=n(),tt===null)throw Error(i(349));(pr&30)!==0||Nd(s,n,o)}c.memoizedState=o;var h={value:o,getSnapshot:n};return c.queue=h,Td(jd.bind(null,s,h,e),[e]),s.flags|=2048,Ko(9,Cd.bind(null,s,h,o,n),void 0,null),o},useId:function(){var e=an(),n=tt.identifierPrefix;if(Fe){var o=vn,s=yn;o=(s&~(1<<32-Mt(s)-1)).toString(32)+o,n=":"+n+"R"+o,o=Go++,0<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=w.createElement(o,{is:s.is}):(e=w.createElement(o),o==="select"&&(w=e,s.multiple?w.multiple=!0:s.size&&(w.size=s.size))):e=w.createElementNS(e,o),e[sn]=n,e[Ho]=s,cf(e,n,!1,!1),n.stateNode=e;e:{switch(w=Mn(o,s),o){case"dialog":De("cancel",e),De("close",e),c=s;break;case"iframe":case"object":case"embed":De("load",e),c=s;break;case"video":case"audio":for(c=0;c<$o.length;c++)De($o[c],e);c=s;break;case"source":De("error",e),c=s;break;case"img":case"image":case"link":De("error",e),De("load",e),c=s;break;case"details":De("toggle",e),c=s;break;case"input":je(e,s),c=Ce(e,s),De("invalid",e);break;case"option":c=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},c=F({},s,{value:void 0}),De("invalid",e);break;case"textarea":bt(e,s),c=Vt(e,s),De("invalid",e);break;default:c=s}jn(o,c),I=c;for(h in I)if(I.hasOwnProperty(h)){var z=I[h];h==="style"?tr(e,z):h==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&Cn(e,z)):h==="children"?typeof z=="string"?(o!=="textarea"||z!=="")&&Ut(e,z):typeof z=="number"&&Ut(e,""+z):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(a.hasOwnProperty(h)?z!=null&&h==="onScroll"&&De("scroll",e):z!=null&&k(e,h,z,w))}switch(o){case"input":ge(e),Xe(e,s,!1);break;case"textarea":ge(e),lt(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Q(s.value));break;case"select":e.multiple=!!s.multiple,h=s.value,h!=null?Je(e,!!s.multiple,h,!1):s.defaultValue!=null&&Je(e,!!s.multiple,s.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=ts)}switch(o){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return ct(n),null;case 6:if(e&&n.stateNode!=null)ff(e,n,e.memoizedProps,s);else{if(typeof s!="string"&&n.stateNode===null)throw Error(i(166));if(o=hr(Yo.current),hr(ln.current),as(n)){if(s=n.stateNode,o=n.memoizedProps,s[sn]=n,(h=s.nodeValue!==o)&&(e=It,e!==null))switch(e.tag){case 3:es(s.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&es(s.nodeValue,o,(e.mode&1)!==0)}h&&(n.flags|=4)}else s=(o.nodeType===9?o:o.ownerDocument).createTextNode(s),s[sn]=n,n.stateNode=s}return ct(n),null;case 13:if($e(Be),s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Fe&&Rt!==null&&(n.mode&1)!==0&&(n.flags&128)===0)pd(),qr(),n.flags|=98560,h=!1;else if(h=as(n),s!==null&&s.dehydrated!==null){if(e===null){if(!h)throw Error(i(318));if(h=n.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[sn]=n}else qr(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ct(n),h=!1}else Yt!==null&&(iu(Yt),Yt=null),h=!0;if(!h)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(Be.current&1)!==0?qe===0&&(qe=3):au())),n.updateQueue!==null&&(n.flags|=4),ct(n),null);case 4:return to(),Ga(e,n),e===null&&Oo(n.stateNode.containerInfo),ct(n),null;case 10:return _a(n.type._context),ct(n),null;case 17:return xt(n.type)&&rs(),ct(n),null;case 19:if($e(Be),h=n.memoizedState,h===null)return ct(n),null;if(s=(n.flags&128)!==0,w=h.rendering,w===null)if(s)qo(h,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(w=ps(e),w!==null){for(n.flags|=128,qo(h,!1),s=w.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),n.subtreeFlags=0,s=o,o=n.child;o!==null;)h=o,e=s,h.flags&=14680066,w=h.alternate,w===null?(h.childLanes=0,h.lanes=e,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=w.childLanes,h.lanes=w.lanes,h.child=w.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=w.memoizedProps,h.memoizedState=w.memoizedState,h.updateQueue=w.updateQueue,h.type=w.type,e=w.dependencies,h.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return Ae(Be,Be.current&1|2),n.child}e=e.sibling}h.tail!==null&&He()>io&&(n.flags|=128,s=!0,qo(h,!1),n.lanes=4194304)}else{if(!s)if(e=ps(w),e!==null){if(n.flags|=128,s=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),qo(h,!0),h.tail===null&&h.tailMode==="hidden"&&!w.alternate&&!Fe)return ct(n),null}else 2*He()-h.renderingStartTime>io&&o!==1073741824&&(n.flags|=128,s=!0,qo(h,!1),n.lanes=4194304);h.isBackwards?(w.sibling=n.child,n.child=w):(o=h.last,o!==null?o.sibling=w:n.child=w,h.last=w)}return h.tail!==null?(n=h.tail,h.rendering=n,h.tail=n.sibling,h.renderingStartTime=He(),n.sibling=null,o=Be.current,Ae(Be,s?o&1|2:o&1),n):(ct(n),null);case 22:case 23:return lu(),s=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(n.flags|=8192),s&&(n.mode&1)!==0?(Tt&1073741824)!==0&&(ct(n),n.subtreeFlags&6&&(n.flags|=8192)):ct(n),null;case 24:return null;case 25:return null}throw Error(i(156,n.tag))}function w0(e,n){switch(ma(n),n.tag){case 1:return xt(n.type)&&rs(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return to(),$e(vt),$e(at),Pa(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return ja(n),null;case 13:if($e(Be),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(i(340));qr()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return $e(Be),null;case 4:return to(),null;case 10:return _a(n.type._context),null;case 22:case 23:return lu(),null;case 24:return null;default:return null}}var ks=!1,dt=!1,S0=typeof WeakSet=="function"?WeakSet:Set,me=null;function ro(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(s){We(e,n,s)}else o.current=null}function Qa(e,n,o){try{o()}catch(s){We(e,n,s)}}var hf=!1;function _0(e,n){if(la=Vi,e=Uc(),Jl(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var c=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var w=0,I=-1,z=-1,q=0,ie=0,le=e,oe=null;t:for(;;){for(var he;le!==o||c!==0&&le.nodeType!==3||(I=w+c),le!==h||s!==0&&le.nodeType!==3||(z=w+s),le.nodeType===3&&(w+=le.nodeValue.length),(he=le.firstChild)!==null;)oe=le,le=he;for(;;){if(le===e)break t;if(oe===o&&++q===c&&(I=w),oe===h&&++ie===s&&(z=w),(he=le.nextSibling)!==null)break;le=oe,oe=le.parentNode}le=he}o=I===-1||z===-1?null:{start:I,end:z}}else o=null}o=o||{start:0,end:0}}else o=null;for(aa={focusedElem:e,selectionRange:o},Vi=!1,me=n;me!==null;)if(n=me,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,me=e;else for(;me!==null;){n=me;try{var ye=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var xe=ye.memoizedProps,Ye=ye.memoizedState,Y=n.stateNode,$=Y.getSnapshotBeforeUpdate(n.elementType===n.type?xe:Xt(n.type,xe),Ye);Y.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var G=n.stateNode.containerInfo;G.nodeType===1?G.textContent="":G.nodeType===9&&G.documentElement&&G.removeChild(G.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(i(163))}}catch(ae){We(n,n.return,ae)}if(e=n.sibling,e!==null){e.return=n.return,me=e;break}me=n.return}return ye=hf,hf=!1,ye}function Zo(e,n,o){var s=n.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&e)===e){var h=c.destroy;c.destroy=void 0,h!==void 0&&Qa(n,o,h)}c=c.next}while(c!==s)}}function Es(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var s=o.create;o.destroy=s()}o=o.next}while(o!==n)}}function Ka(e){var n=e.ref;if(n!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof n=="function"?n(e):n.current=e}}function pf(e){var n=e.alternate;n!==null&&(e.alternate=null,pf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[sn],delete n[Ho],delete n[fa],delete n[o0],delete n[i0])),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 gf(e){return e.tag===5||e.tag===3||e.tag===4}function mf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gf(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 qa(e,n,o){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=ts));else if(s!==4&&(e=e.child,e!==null))for(qa(e,n,o),e=e.sibling;e!==null;)qa(e,n,o),e=e.sibling}function Za(e,n,o){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Za(e,n,o),e=e.sibling;e!==null;)Za(e,n,o),e=e.sibling}var it=null,Gt=!1;function Bn(e,n,o){for(o=o.child;o!==null;)yf(e,n,o),o=o.sibling}function yf(e,n,o){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(br,o)}catch{}switch(o.tag){case 5:dt||ro(o,n);case 6:var s=it,c=Gt;it=null,Bn(e,n,o),it=s,Gt=c,it!==null&&(Gt?(e=it,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):it.removeChild(o.stateNode));break;case 18:it!==null&&(Gt?(e=it,o=o.stateNode,e.nodeType===8?da(e.parentNode,o):e.nodeType===1&&da(e,o),Io(e)):da(it,o.stateNode));break;case 4:s=it,c=Gt,it=o.stateNode.containerInfo,Gt=!0,Bn(e,n,o),it=s,Gt=c;break;case 0:case 11:case 14:case 15:if(!dt&&(s=o.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){c=s=s.next;do{var h=c,w=h.destroy;h=h.tag,w!==void 0&&((h&2)!==0||(h&4)!==0)&&Qa(o,n,w),c=c.next}while(c!==s)}Bn(e,n,o);break;case 1:if(!dt&&(ro(o,n),s=o.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=o.memoizedProps,s.state=o.memoizedState,s.componentWillUnmount()}catch(I){We(o,n,I)}Bn(e,n,o);break;case 21:Bn(e,n,o);break;case 22:o.mode&1?(dt=(s=dt)||o.memoizedState!==null,Bn(e,n,o),dt=s):Bn(e,n,o);break;default:Bn(e,n,o)}}function vf(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new S0),n.forEach(function(s){var c=R0.bind(null,e,s);o.has(s)||(o.add(s),s.then(c,c))})}}function Qt(e,n){var o=n.deletions;if(o!==null)for(var s=0;sc&&(c=w),s&=~h}if(s=c,s=He()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*E0(s/1960))-s,10e?16:e,Un===null)var s=!1;else{if(e=Un,Un=null,Ps=0,(Ie&6)!==0)throw Error(i(331));var c=Ie;for(Ie|=4,me=e.current;me!==null;){var h=me,w=h.child;if((me.flags&16)!==0){var I=h.deletions;if(I!==null){for(var z=0;zHe()-tu?yr(e,0):eu|=o),_t(e,n)}function Rf(e,n){n===0&&((e.mode&1)===0?n=1:(n=Dr,Dr<<=1,(Dr&130023424)===0&&(Dr=4194304)));var o=mt();e=xn(e,n),e!==null&&(lr(e,n,o),_t(e,o))}function I0(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),Rf(e,o)}function R0(e,n){var o=0;switch(e.tag){case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(i(314))}s!==null&&s.delete(n),Rf(e,o)}var Tf;Tf=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||vt.current)wt=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return wt=!1,v0(e,n,o);wt=(e.flags&131072)!==0}else wt=!1,Fe&&(n.flags&1048576)!==0&&cd(n,ls,n.index);switch(n.lanes=0,n.tag){case 2:var s=n.type;_s(e,n),e=n.pendingProps;var c=Gr(n,at.current);eo(n,o),c=Ta(null,n,s,e,c,o);var h=za();return n.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,xt(s)?(h=!0,os(n)):h=!1,n.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,Na(n),c.updater=ws,n.stateNode=c,c._reactInternals=n,Oa(n,s,e,o),n=Va(null,n,s,!0,h,o)):(n.tag=0,Fe&&h&&ga(n),gt(null,n,c,o),n=n.child),n;case 16:s=n.elementType;e:{switch(_s(e,n),e=n.pendingProps,c=s._init,s=c(s._payload),n.type=s,c=n.tag=z0(s),e=Xt(s,e),c){case 0:n=Ba(null,n,s,e,o);break e;case 1:n=rf(null,n,s,e,o);break e;case 11:n=Zd(null,n,s,e,o);break e;case 14:n=Jd(null,n,s,Xt(s.type,e),o);break e}throw Error(i(306,s,""))}return n;case 0:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Xt(s,c),Ba(e,n,s,c,o);case 1:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Xt(s,c),rf(e,n,s,c,o);case 3:e:{if(of(n),e===null)throw Error(i(387));s=n.pendingProps,h=n.memoizedState,c=h.element,xd(e,n),hs(n,s,null,o);var w=n.memoizedState;if(s=w.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){c=no(Error(i(423)),n),n=sf(e,n,s,o,c);break e}else if(s!==c){c=no(Error(i(424)),n),n=sf(e,n,s,o,c);break e}else for(Rt=An(n.stateNode.containerInfo.firstChild),It=n,Fe=!0,Yt=null,o=yd(n,null,s,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(qr(),s===c){n=Sn(e,n,o);break e}gt(e,n,s,o)}n=n.child}return n;case 5:return _d(n),e===null&&va(n),s=n.type,c=n.pendingProps,h=e!==null?e.memoizedProps:null,w=c.children,ua(s,c)?w=null:h!==null&&ua(s,h)&&(n.flags|=32),nf(e,n),gt(e,n,w,o),n.child;case 6:return e===null&&va(n),null;case 13:return lf(e,n,o);case 4:return Ca(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Zr(n,null,s,o):gt(e,n,s,o),n.child;case 11:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Xt(s,c),Zd(e,n,s,c,o);case 7:return gt(e,n,n.pendingProps,o),n.child;case 8:return gt(e,n,n.pendingProps.children,o),n.child;case 12:return gt(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(s=n.type._context,c=n.pendingProps,h=n.memoizedProps,w=c.value,Ae(cs,s._currentValue),s._currentValue=w,h!==null)if(Wt(h.value,w)){if(h.children===c.children&&!vt.current){n=Sn(e,n,o);break e}}else for(h=n.child,h!==null&&(h.return=n);h!==null;){var I=h.dependencies;if(I!==null){w=h.child;for(var z=I.firstContext;z!==null;){if(z.context===s){if(h.tag===1){z=wn(-1,o&-o),z.tag=2;var q=h.updateQueue;if(q!==null){q=q.shared;var ie=q.pending;ie===null?z.next=z:(z.next=ie.next,ie.next=z),q.pending=z}}h.lanes|=o,z=h.alternate,z!==null&&(z.lanes|=o),ka(h.return,o,n),I.lanes|=o;break}z=z.next}}else if(h.tag===10)w=h.type===n.type?null:h.child;else if(h.tag===18){if(w=h.return,w===null)throw Error(i(341));w.lanes|=o,I=w.alternate,I!==null&&(I.lanes|=o),ka(w,o,n),w=h.sibling}else w=h.child;if(w!==null)w.return=h;else for(w=h;w!==null;){if(w===n){w=null;break}if(h=w.sibling,h!==null){h.return=w.return,w=h;break}w=w.return}h=w}gt(e,n,c.children,o),n=n.child}return n;case 9:return c=n.type,s=n.pendingProps.children,eo(n,o),c=Ot(c),s=s(c),n.flags|=1,gt(e,n,s,o),n.child;case 14:return s=n.type,c=Xt(s,n.pendingProps),c=Xt(s.type,c),Jd(e,n,s,c,o);case 15:return ef(e,n,n.type,n.pendingProps,o);case 17:return s=n.type,c=n.pendingProps,c=n.elementType===s?c:Xt(s,c),_s(e,n),n.tag=1,xt(s)?(e=!0,os(n)):e=!1,eo(n,o),Wd(n,s,c),Oa(n,s,c,o),Va(null,n,s,!0,e,o);case 19:return uf(e,n,o);case 22:return tf(e,n,o)}throw Error(i(156,n.tag))};function zf(e,n){return Li(e,n)}function T0(e,n,o,s){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Bt(e,n,o,s){return new T0(e,n,o,s)}function uu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function z0(e){if(typeof e=="function")return uu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===te)return 11;if(e===W)return 14}return 2}function Xn(e,n){var o=e.alternate;return o===null?(o=Bt(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function zs(e,n,o,s,c,h){var w=2;if(s=e,typeof e=="function")uu(e)&&(w=1);else if(typeof e=="string")w=5;else e:switch(e){case B:return xr(o.children,c,h,n);case H:w=8,c|=8;break;case X:return e=Bt(12,o,n,c|2),e.elementType=X,e.lanes=h,e;case J:return e=Bt(13,o,n,c),e.elementType=J,e.lanes=h,e;case M:return e=Bt(19,o,n,c),e.elementType=M,e.lanes=h,e;case U:return Ls(o,c,h,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ee:w=10;break e;case Z:w=9;break e;case te:w=11;break e;case W:w=14;break e;case V:w=16,s=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return n=Bt(w,o,n,c),n.elementType=e,n.type=s,n.lanes=h,n}function xr(e,n,o,s){return e=Bt(7,e,s,n),e.lanes=o,e}function Ls(e,n,o,s){return e=Bt(22,e,s,n),e.elementType=U,e.lanes=o,e.stateNode={isHidden:!1},e}function cu(e,n,o){return e=Bt(6,e,null,n),e.lanes=o,e}function du(e,n,o){return n=Bt(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function L0(e,n,o,s,c){this.tag=n,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=sr(0),this.expirationTimes=sr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sr(0),this.identifierPrefix=s,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function fu(e,n,o,s,c,h,w,I,z){return e=new L0(e,n,o,I,z),n===1?(n=1,h===!0&&(n|=8)):n=0,h=Bt(3,null,null,n),e.current=h,h.stateNode=e,h.memoizedState={element:s,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},Na(h),e}function b0(e,n,o){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(r){console.error(r)}}return t(),vu.exports=X0(),vu.exports}var Xf;function G0(){if(Xf)return Hs;Xf=1;var t=fp();return Hs.createRoot=t.createRoot,Hs.hydrateRoot=t.hydrateRoot,Hs}var Q0=G0();function K0(t,r="Request failed"){const i=(t||"").trim();if(!i)return r;try{const a=JSON.parse(i).detail;if(typeof a=="string"&&a.trim())return a;if(Array.isArray(a)){const u=a.map(d=>typeof d=="string"?d:d&&typeof d=="object"&&"msg"in d?String(d.msg):"").filter(Boolean);if(u.length)return u.join("; ")}}catch{}return i}async function yt(t,r){const i=await fetch(t,{...r,headers:{"Content-Type":"application/json",...(r==null?void 0:r.headers)||{}}});if(!i.ok){const l=await i.text();throw new Error(K0(l,i.statusText||"Request failed"))}return i.json()}const q0=["github_token","bitbucket_token","ai_api_key","ai_model","ai_base_url"],ft={health:()=>yt("/api/health"),settings:()=>yt("/api/settings"),saveSettings:t=>{const r={...t};for(const i of q0)r[i]===""&&delete r[i];return yt("/api/settings",{method:"PUT",body:JSON.stringify(r)})},repos:()=>yt("/api/repos"),browse:t=>yt(`/api/fs${t?`?path=${encodeURIComponent(t)}`:""}`),gitRefs:(t,r=50)=>yt(`/api/git/refs?repo_path=${encodeURIComponent(t)}&limit=${r}`),index:(t,r=!0)=>yt("/api/index",{method:"POST",body:JSON.stringify({repo_path:t,incremental:r})}),indexStatus:t=>yt(`/api/index?repo_path=${encodeURIComponent(t)}`),architecture:t=>yt(`/api/architecture?repo_path=${encodeURIComponent(t)}`),review:(t,r,i,l=!0)=>yt("/api/review",{method:"POST",body:JSON.stringify({repo_path:t,base:r,head:i||null,reindex:l,incremental:!0,three_dot:!0})}),init:(t,r=!1)=>yt("/api/init",{method:"POST",body:JSON.stringify({repo_path:t,overwrite:r})}),postComment:(t,r,i,l)=>yt("/api/prs/comment",{method:"POST",body:JSON.stringify({provider:t,repo:r,number:i,markdown:l})}),graph:(t,r="full")=>yt(`/api/graph?repo_path=${encodeURIComponent(t)}&scope=${r}`),prs:(t,r,i="open")=>yt("/api/prs",{method:"POST",body:JSON.stringify({provider:t,repo:r,state:i})}),residual:t=>yt("/api/ai/residual",{method:"POST",body:JSON.stringify({review:t})})};function Z0(t){return t.replaceAll("_"," ")}function J0(t){return t.replaceAll("_"," ")}function Qu(t){return t.split(".").pop()||t}function ey(t){if(!t)return"";const r=new Date(t);return Number.isNaN(r.getTime())?t:r.toLocaleString()}function Bs(t){return t.replace(/([/\\._:@-])/g,"$1​")}function Pr({className:t,children:r}){return g.jsx("svg",{className:t,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:r})}function ty({className:t}){return g.jsxs(Pr,{className:t,children:[g.jsx("path",{d:"M3 3.5h6.5L13 7v5.5H3z"}),g.jsx("path",{d:"M9.5 3.5V7H13"}),g.jsx("path",{d:"M5.5 9.5h5M5.5 11.5h3.5"})]})}function ny({className:t}){return g.jsxs(Pr,{className:t,children:[g.jsx("rect",{x:"2.5",y:"2.5",width:"4.5",height:"4.5",rx:"0.8"}),g.jsx("rect",{x:"9",y:"2.5",width:"4.5",height:"4.5",rx:"0.8"}),g.jsx("rect",{x:"2.5",y:"9",width:"4.5",height:"4.5",rx:"0.8"}),g.jsx("rect",{x:"9",y:"9",width:"4.5",height:"4.5",rx:"0.8"})]})}function ry({className:t}){return g.jsxs(Pr,{className:t,children:[g.jsx("circle",{cx:"4",cy:"8",r:"1.6"}),g.jsx("circle",{cx:"12",cy:"4",r:"1.6"}),g.jsx("circle",{cx:"12",cy:"12",r:"1.6"}),g.jsx("path",{d:"M5.5 7.2 10.4 4.8M5.5 8.8 10.4 11.2"})]})}function oy({className:t}){return g.jsxs(Pr,{className:t,children:[g.jsx("circle",{cx:"4.5",cy:"4",r:"1.4"}),g.jsx("circle",{cx:"4.5",cy:"12",r:"1.4"}),g.jsx("circle",{cx:"11.5",cy:"12",r:"1.4"}),g.jsx("path",{d:"M4.5 5.5v5M4.5 8h4.2a3 3 0 0 1 3 3"})]})}function iy({className:t}){return g.jsxs(Pr,{className:t,children:[g.jsx("circle",{cx:"8",cy:"8",r:"2.1"}),g.jsx("path",{d:"M8 2.5v1.6M8 11.9v1.6M2.5 8h1.6M11.9 8h1.6M4.1 4.1l1.1 1.1M10.8 10.8l1.1 1.1M11.9 4.1l-1.1 1.1M5.2 10.8l-1.1 1.1"})]})}function hp({className:t}){return g.jsx(Pr,{className:t,children:g.jsx("path",{d:"M2.5 4.5h4L8 6h5.5v6.5h-11z"})})}function sy({className:t}){return g.jsx(Pr,{className:t,children:g.jsx("path",{d:"M4 6.5 8 10.5 12 6.5"})})}const ly="modulepreload",ay=function(t,r){return new URL(t,r).href},Gf={},uy=function(r,i,l){let a=Promise.resolve();if(i&&i.length>0){let d=function(m){return Promise.all(m.map(x=>Promise.resolve(x).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const f=document.getElementsByTagName("link"),p=document.querySelector("meta[property=csp-nonce]"),y=(p==null?void 0:p.nonce)||(p==null?void 0:p.getAttribute("nonce"));a=d(i.map(m=>{if(m=ay(m,l),m in Gf)return;Gf[m]=!0;const x=m.endsWith(".css"),v=x?'[rel="stylesheet"]':"";if(!!l)for(let C=f.length-1;C>=0;C--){const E=f[C];if(E.href===m&&(!x||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${v}`))return;const _=document.createElement("link");if(_.rel=x?"stylesheet":ly,x||(_.as="script"),_.crossOrigin="",_.href=m,y&&_.setAttribute("nonce",y),document.head.appendChild(_),x)return new Promise((C,E)=>{_.addEventListener("load",C),_.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(d){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=d,window.dispatchEvent(f),!f.defaultPrevented)throw d}return a.then(d=>{for(const f of d||[])f.status==="rejected"&&u(f.reason);return r().catch(u)})};function Qe(t){if(typeof t=="string"||typeof t=="number")return""+t;let r="";if(Array.isArray(t))for(let i=0,l;i{}};function pl(){for(var t=0,r=arguments.length,i={},l;t=0&&(l=i.slice(a+1),i=i.slice(0,a)),i&&!r.hasOwnProperty(i))throw new Error("unknown type: "+i);return{type:i,name:l}})}Zs.prototype=pl.prototype={constructor:Zs,on:function(t,r){var i=this._,l=dy(t+"",i),a,u=-1,d=l.length;if(arguments.length<2){for(;++u0)for(var i=new Array(a),l=0,a,u;l=0&&(r=t.slice(0,i))!=="xmlns"&&(t=t.slice(i+1)),Kf.hasOwnProperty(r)?{space:Kf[r],local:t}:t}function hy(t){return function(){var r=this.ownerDocument,i=this.namespaceURI;return i===bu&&r.documentElement.namespaceURI===bu?r.createElement(t):r.createElementNS(i,t)}}function py(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function pp(t){var r=gl(t);return(r.local?py:hy)(r)}function gy(){}function Ku(t){return t==null?gy:function(){return this.querySelector(t)}}function my(t){typeof t!="function"&&(t=Ku(t));for(var r=this._groups,i=r.length,l=new Array(i),a=0;a=k&&(k=R+1);!(L=E[k])&&++k<_;);j._next=L||null}}return d=new Lt(d,l),d._enter=f,d._exit=p,d}function Ay(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Dy(){return new Lt(this._exit||this._groups.map(vp),this._parents)}function $y(t,r,i){var l=this.enter(),a=this,u=this.exit();return typeof t=="function"?(l=t(l),l&&(l=l.selection())):l=l.append(t+""),r!=null&&(a=r(a),a&&(a=a.selection())),i==null?u.remove():i(u),l&&a?l.merge(a).order():a}function Oy(t){for(var r=t.selection?t.selection():t,i=this._groups,l=r._groups,a=i.length,u=l.length,d=Math.min(a,u),f=new Array(a),p=0;p=0;)(d=l[a])&&(u&&d.compareDocumentPosition(u)^4&&u.parentNode.insertBefore(d,u),u=d);return this}function Hy(t){t||(t=By);function r(x,v){return x&&v?t(x.__data__,v.__data__):!x-!v}for(var i=this._groups,l=i.length,a=new Array(l),u=0;ur?1:t>=r?0:NaN}function Vy(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Uy(){return Array.from(this)}function Wy(){for(var t=this._groups,r=0,i=t.length;r1?this.each((r==null?nv:typeof r=="function"?ov:rv)(t,r,i??"")):fo(this.node(),t)}function fo(t,r){return t.style.getPropertyValue(r)||xp(t).getComputedStyle(t,null).getPropertyValue(r)}function sv(t){return function(){delete this[t]}}function lv(t,r){return function(){this[t]=r}}function av(t,r){return function(){var i=r.apply(this,arguments);i==null?delete this[t]:this[t]=i}}function uv(t,r){return arguments.length>1?this.each((r==null?sv:typeof r=="function"?av:lv)(t,r)):this.node()[t]}function wp(t){return t.trim().split(/^|\s+/)}function qu(t){return t.classList||new Sp(t)}function Sp(t){this._node=t,this._names=wp(t.getAttribute("class")||"")}Sp.prototype={add:function(t){var r=this._names.indexOf(t);r<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var r=this._names.indexOf(t);r>=0&&(this._names.splice(r,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function _p(t,r){for(var i=qu(t),l=-1,a=r.length;++l=0&&(i=r.slice(l+1),r=r.slice(0,l)),{type:r,name:i}})}function Dv(t){return function(){var r=this.__on;if(r){for(var i=0,l=-1,a=r.length,u;i()=>t;function Au(t,{sourceEvent:r,subject:i,target:l,identifier:a,active:u,x:d,y:f,dx:p,dy:y,dispatch:m}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},subject:{value:i,enumerable:!0,configurable:!0},target:{value:l,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:u,enumerable:!0,configurable:!0},x:{value:d,enumerable:!0,configurable:!0},y:{value:f,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:y,enumerable:!0,configurable:!0},_:{value:m}})}Au.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Xv(t){return!t.ctrlKey&&!t.button}function Gv(){return this.parentNode}function Qv(t,r){return r??{x:t.x,y:t.y}}function Kv(){return navigator.maxTouchPoints||"ontouchstart"in this}function Mp(){var t=Xv,r=Gv,i=Qv,l=Kv,a={},u=pl("start","drag","end"),d=0,f,p,y,m,x=0;function v(j){j.on("mousedown.drag",S).filter(l).on("touchstart.drag",E).on("touchmove.drag",N,Yv).on("touchend.drag touchcancel.drag",R).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function S(j,L){if(!(m||!t.call(this,j,L))){var D=k(this,r.call(this,j,L),j,L,"mouse");D&&(zt(j.view).on("mousemove.drag",_,ci).on("mouseup.drag",C,ci),Cp(j.view),Su(j),y=!1,f=j.clientX,p=j.clientY,D("start",j))}}function _(j){if(uo(j),!y){var L=j.clientX-f,D=j.clientY-p;y=L*L+D*D>x}a.mouse("drag",j)}function C(j){zt(j.view).on("mousemove.drag mouseup.drag",null),jp(j.view,y),uo(j),a.mouse("end",j)}function E(j,L){if(t.call(this,j,L)){var D=j.changedTouches,B=r.call(this,j,L),H=D.length,X,ee;for(X=0;X>8&15|r>>4&240,r>>4&15|r&240,(r&15)<<4|r&15,1):i===8?Us(r>>24&255,r>>16&255,r>>8&255,(r&255)/255):i===4?Us(r>>12&15|r>>8&240,r>>8&15|r>>4&240,r>>4&15|r&240,((r&15)<<4|r&15)/255):null):(r=Zv.exec(t))?new Et(r[1],r[2],r[3],1):(r=Jv.exec(t))?new Et(r[1]*255/100,r[2]*255/100,r[3]*255/100,1):(r=ex.exec(t))?Us(r[1],r[2],r[3],r[4]):(r=tx.exec(t))?Us(r[1]*255/100,r[2]*255/100,r[3]*255/100,r[4]):(r=nx.exec(t))?rh(r[1],r[2]/100,r[3]/100,1):(r=rx.exec(t))?rh(r[1],r[2]/100,r[3]/100,r[4]):qf.hasOwnProperty(t)?eh(qf[t]):t==="transparent"?new Et(NaN,NaN,NaN,0):null}function eh(t){return new Et(t>>16&255,t>>8&255,t&255,1)}function Us(t,r,i,l){return l<=0&&(t=r=i=NaN),new Et(t,r,i,l)}function sx(t){return t instanceof _i||(t=Er(t)),t?(t=t.rgb(),new Et(t.r,t.g,t.b,t.opacity)):new Et}function Du(t,r,i,l){return arguments.length===1?sx(t):new Et(t,r,i,l??1)}function Et(t,r,i,l){this.r=+t,this.g=+r,this.b=+i,this.opacity=+l}Zu(Et,Du,Pp(_i,{brighter(t){return t=t==null?ol:Math.pow(ol,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?di:Math.pow(di,t),new Et(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Et(_r(this.r),_r(this.g),_r(this.b),il(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:th,formatHex:th,formatHex8:lx,formatRgb:nh,toString:nh}));function th(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}`}function lx(){return`#${Sr(this.r)}${Sr(this.g)}${Sr(this.b)}${Sr((isNaN(this.opacity)?1:this.opacity)*255)}`}function nh(){const t=il(this.opacity);return`${t===1?"rgb(":"rgba("}${_r(this.r)}, ${_r(this.g)}, ${_r(this.b)}${t===1?")":`, ${t})`}`}function il(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function _r(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Sr(t){return t=_r(t),(t<16?"0":"")+t.toString(16)}function rh(t,r,i,l){return l<=0?t=r=i=NaN:i<=0||i>=1?t=r=NaN:r<=0&&(t=NaN),new Zt(t,r,i,l)}function Ip(t){if(t instanceof Zt)return new Zt(t.h,t.s,t.l,t.opacity);if(t instanceof _i||(t=Er(t)),!t)return new Zt;if(t instanceof Zt)return t;t=t.rgb();var r=t.r/255,i=t.g/255,l=t.b/255,a=Math.min(r,i,l),u=Math.max(r,i,l),d=NaN,f=u-a,p=(u+a)/2;return f?(r===u?d=(i-l)/f+(i0&&p<1?0:d,new Zt(d,f,p,t.opacity)}function ax(t,r,i,l){return arguments.length===1?Ip(t):new Zt(t,r,i,l??1)}function Zt(t,r,i,l){this.h=+t,this.s=+r,this.l=+i,this.opacity=+l}Zu(Zt,ax,Pp(_i,{brighter(t){return t=t==null?ol:Math.pow(ol,t),new Zt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?di:Math.pow(di,t),new Zt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,r=isNaN(t)||isNaN(this.s)?0:this.s,i=this.l,l=i+(i<.5?i:1-i)*r,a=2*i-l;return new Et(_u(t>=240?t-240:t+120,a,l),_u(t,a,l),_u(t<120?t+240:t-120,a,l),this.opacity)},clamp(){return new Zt(oh(this.h),Ws(this.s),Ws(this.l),il(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=il(this.opacity);return`${t===1?"hsl(":"hsla("}${oh(this.h)}, ${Ws(this.s)*100}%, ${Ws(this.l)*100}%${t===1?")":`, ${t})`}`}}));function oh(t){return t=(t||0)%360,t<0?t+360:t}function Ws(t){return Math.max(0,Math.min(1,t||0))}function _u(t,r,i){return(t<60?r+(i-r)*t/60:t<180?i:t<240?r+(i-r)*(240-t)/60:r)*255}const Ju=t=>()=>t;function ux(t,r){return function(i){return t+i*r}}function cx(t,r,i){return t=Math.pow(t,i),r=Math.pow(r,i)-t,i=1/i,function(l){return Math.pow(t+l*r,i)}}function dx(t){return(t=+t)==1?Rp:function(r,i){return i-r?cx(r,i,t):Ju(isNaN(r)?i:r)}}function Rp(t,r){var i=r-t;return i?ux(t,i):Ju(isNaN(t)?r:t)}const sl=(function t(r){var i=dx(r);function l(a,u){var d=i((a=Du(a)).r,(u=Du(u)).r),f=i(a.g,u.g),p=i(a.b,u.b),y=Rp(a.opacity,u.opacity);return function(m){return a.r=d(m),a.g=f(m),a.b=p(m),a.opacity=y(m),a+""}}return l.gamma=t,l})(1);function fx(t,r){r||(r=[]);var i=t?Math.min(r.length,t.length):0,l=r.slice(),a;return function(u){for(a=0;ai&&(u=r.slice(i,u),f[d]?f[d]+=u:f[++d]=u),(l=l[0])===(a=a[0])?f[d]?f[d]+=a:f[++d]=a:(f[++d]=null,p.push({i:d,x:cn(l,a)})),i=ku.lastIndex;return i180?m+=360:m-y>180&&(y+=360),v.push({i:x.push(a(x)+"rotate(",null,l)-2,x:cn(y,m)})):m&&x.push(a(x)+"rotate("+m+l)}function f(y,m,x,v){y!==m?v.push({i:x.push(a(x)+"skewX(",null,l)-2,x:cn(y,m)}):m&&x.push(a(x)+"skewX("+m+l)}function p(y,m,x,v,S,_){if(y!==x||m!==v){var C=S.push(a(S)+"scale(",null,",",null,")");_.push({i:C-4,x:cn(y,x)},{i:C-2,x:cn(m,v)})}else(x!==1||v!==1)&&S.push(a(S)+"scale("+x+","+v+")")}return function(y,m){var x=[],v=[];return y=t(y),m=t(m),u(y.translateX,y.translateY,m.translateX,m.translateY,x,v),d(y.rotate,m.rotate,x,v),f(y.skewX,m.skewX,x,v),p(y.scaleX,y.scaleY,m.scaleX,m.scaleY,x,v),y=m=null,function(S){for(var _=-1,C=v.length,E;++_=0&&t._call.call(void 0,r),t=t._next;--ho}function lh(){Nr=(al=hi.now())+ml,ho=si=0;try{jx()}finally{ho=0,Px(),Nr=0}}function Mx(){var t=hi.now(),r=t-al;r>bp&&(ml-=r,al=t)}function Px(){for(var t,r=ll,i,l=1/0;r;)r._call?(l>r._time&&(l=r._time),t=r,r=r._next):(i=r._next,r._next=null,r=t?t._next=i:ll=i);li=t,Fu(l)}function Fu(t){if(!ho){si&&(si=clearTimeout(si));var r=t-Nr;r>24?(t<1/0&&(si=setTimeout(lh,t-hi.now()-ml)),oi&&(oi=clearInterval(oi))):(oi||(al=hi.now(),oi=setInterval(Mx,bp)),ho=1,Ap(lh))}}function ah(t,r,i){var l=new ul;return r=r==null?0:+r,l.restart(a=>{l.stop(),t(a+r)},r,i),l}var Ix=pl("start","end","cancel","interrupt"),Rx=[],$p=0,uh=1,Hu=2,el=3,ch=4,Bu=5,tl=6;function yl(t,r,i,l,a,u){var d=t.__transition;if(!d)t.__transition={};else if(i in d)return;Tx(t,i,{name:r,index:l,group:a,on:Ix,tween:Rx,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:$p})}function tc(t,r){var i=nn(t,r);if(i.state>$p)throw new Error("too late; already scheduled");return i}function fn(t,r){var i=nn(t,r);if(i.state>el)throw new Error("too late; already running");return i}function nn(t,r){var i=t.__transition;if(!i||!(i=i[r]))throw new Error("transition not found");return i}function Tx(t,r,i){var l=t.__transition,a;l[r]=i,i.timer=Dp(u,0,i.time);function u(y){i.state=uh,i.timer.restart(d,i.delay,i.time),i.delay<=y&&d(y-i.delay)}function d(y){var m,x,v,S;if(i.state!==uh)return p();for(m in l)if(S=l[m],S.name===i.name){if(S.state===el)return ah(d);S.state===ch?(S.state=tl,S.timer.stop(),S.on.call("interrupt",t,t.__data__,S.index,S.group),delete l[m]):+mHu&&l.state=0&&(r=r.slice(0,i)),!r||r==="start"})}function aw(t,r,i){var l,a,u=lw(r)?tc:fn;return function(){var d=u(this,t),f=d.on;f!==l&&(a=(l=f).copy()).on(r,i),d.on=a}}function uw(t,r){var i=this._id;return arguments.length<2?nn(this.node(),i).on.on(t):this.each(aw(i,t,r))}function cw(t){return function(){var r=this.parentNode;for(var i in this.__transition)if(+i!==t)return;r&&r.removeChild(this)}}function dw(){return this.on("end.remove",cw(this._id))}function fw(t){var r=this._name,i=this._id;typeof t!="function"&&(t=Ku(t));for(var l=this._groups,a=l.length,u=new Array(a),d=0;d()=>t;function Dw(t,{sourceEvent:r,target:i,transform:l,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},transform:{value:l,enumerable:!0,configurable:!0},_:{value:a}})}function En(t,r,i){this.k=t,this.x=r,this.y=i}En.prototype={constructor:En,scale:function(t){return t===1?this:new En(this.k*t,this.x,this.y)},translate:function(t,r){return t===0&r===0?this:new En(this.k,this.x+this.k*t,this.y+this.k*r)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vl=new En(1,0,0);Bp.prototype=En.prototype;function Bp(t){for(;!t.__zoom;)if(!(t=t.parentNode))return vl;return t.__zoom}function Eu(t){t.stopImmediatePropagation()}function ii(t){t.preventDefault(),t.stopImmediatePropagation()}function $w(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Ow(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function dh(){return this.__zoom||vl}function Fw(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Hw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Bw(t,r,i){var l=t.invertX(r[0][0])-i[0][0],a=t.invertX(r[1][0])-i[1][0],u=t.invertY(r[0][1])-i[0][1],d=t.invertY(r[1][1])-i[1][1];return t.translate(a>l?(l+a)/2:Math.min(0,l)||Math.max(0,a),d>u?(u+d)/2:Math.min(0,u)||Math.max(0,d))}function Vp(){var t=$w,r=Ow,i=Bw,l=Fw,a=Hw,u=[0,1/0],d=[[-1/0,-1/0],[1/0,1/0]],f=250,p=Js,y=pl("start","zoom","end"),m,x,v,S=500,_=150,C=0,E=10;function N(M){M.property("__zoom",dh).on("wheel.zoom",H,{passive:!1}).on("mousedown.zoom",X).on("dblclick.zoom",ee).filter(a).on("touchstart.zoom",Z).on("touchmove.zoom",te).on("touchend.zoom touchcancel.zoom",J).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}N.transform=function(M,W,V,U){var A=M.selection?M.selection():M;A.property("__zoom",dh),M!==A?L(M,W,V,U):A.interrupt().each(function(){D(this,arguments).event(U).start().zoom(null,typeof W=="function"?W.apply(this,arguments):W).end()})},N.scaleBy=function(M,W,V,U){N.scaleTo(M,function(){var A=this.__zoom.k,b=typeof W=="function"?W.apply(this,arguments):W;return A*b},V,U)},N.scaleTo=function(M,W,V,U){N.transform(M,function(){var A=r.apply(this,arguments),b=this.__zoom,F=V==null?j(A):typeof V=="function"?V.apply(this,arguments):V,P=b.invert(F),T=typeof W=="function"?W.apply(this,arguments):W;return i(k(R(b,T),F,P),A,d)},V,U)},N.translateBy=function(M,W,V,U){N.transform(M,function(){return i(this.__zoom.translate(typeof W=="function"?W.apply(this,arguments):W,typeof V=="function"?V.apply(this,arguments):V),r.apply(this,arguments),d)},null,U)},N.translateTo=function(M,W,V,U,A){N.transform(M,function(){var b=r.apply(this,arguments),F=this.__zoom,P=U==null?j(b):typeof U=="function"?U.apply(this,arguments):U;return i(vl.translate(P[0],P[1]).scale(F.k).translate(typeof W=="function"?-W.apply(this,arguments):-W,typeof V=="function"?-V.apply(this,arguments):-V),b,d)},U,A)};function R(M,W){return W=Math.max(u[0],Math.min(u[1],W)),W===M.k?M:new En(W,M.x,M.y)}function k(M,W,V){var U=W[0]-V[0]*M.k,A=W[1]-V[1]*M.k;return U===M.x&&A===M.y?M:new En(M.k,U,A)}function j(M){return[(+M[0][0]+ +M[1][0])/2,(+M[0][1]+ +M[1][1])/2]}function L(M,W,V,U){M.on("start.zoom",function(){D(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(U).end()}).tween("zoom",function(){var A=this,b=arguments,F=D(A,b).event(U),P=r.apply(A,b),T=V==null?j(P):typeof V=="function"?V.apply(A,b):V,ne=Math.max(P[1][0]-P[0][0],P[1][1]-P[0][1]),re=A.__zoom,ue=typeof W=="function"?W.apply(A,b):W,ce=p(re.invert(T).concat(ne/re.k),ue.invert(T).concat(ne/ue.k));return function(de){if(de===1)de=ue;else{var Q=ce(de),se=ne/Q[2];de=new En(se,T[0]-Q[0]*se,T[1]-Q[1]*se)}F.zoom(null,de)}})}function D(M,W,V){return!V&&M.__zooming||new B(M,W)}function B(M,W){this.that=M,this.args=W,this.active=0,this.sourceEvent=null,this.extent=r.apply(M,W),this.taps=0}B.prototype={event:function(M){return M&&(this.sourceEvent=M),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(M,W){return this.mouse&&M!=="mouse"&&(this.mouse[1]=W.invert(this.mouse[0])),this.touch0&&M!=="touch"&&(this.touch0[1]=W.invert(this.touch0[0])),this.touch1&&M!=="touch"&&(this.touch1[1]=W.invert(this.touch1[0])),this.that.__zoom=W,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(M){var W=zt(this.that).datum();y.call(M,this.that,new Dw(M,{sourceEvent:this.sourceEvent,target:N,transform:this.that.__zoom,dispatch:y}),W)}};function H(M,...W){if(!t.apply(this,arguments))return;var V=D(this,W).event(M),U=this.__zoom,A=Math.max(u[0],Math.min(u[1],U.k*Math.pow(2,l.apply(this,arguments)))),b=qt(M);if(V.wheel)(V.mouse[0][0]!==b[0]||V.mouse[0][1]!==b[1])&&(V.mouse[1]=U.invert(V.mouse[0]=b)),clearTimeout(V.wheel);else{if(U.k===A)return;V.mouse=[b,U.invert(b)],nl(this),V.start()}ii(M),V.wheel=setTimeout(F,_),V.zoom("mouse",i(k(R(U,A),V.mouse[0],V.mouse[1]),V.extent,d));function F(){V.wheel=null,V.end()}}function X(M,...W){if(v||!t.apply(this,arguments))return;var V=M.currentTarget,U=D(this,W,!0).event(M),A=zt(M.view).on("mousemove.zoom",T,!0).on("mouseup.zoom",ne,!0),b=qt(M,V),F=M.clientX,P=M.clientY;Cp(M.view),Eu(M),U.mouse=[b,this.__zoom.invert(b)],nl(this),U.start();function T(re){if(ii(re),!U.moved){var ue=re.clientX-F,ce=re.clientY-P;U.moved=ue*ue+ce*ce>C}U.event(re).zoom("mouse",i(k(U.that.__zoom,U.mouse[0]=qt(re,V),U.mouse[1]),U.extent,d))}function ne(re){A.on("mousemove.zoom mouseup.zoom",null),jp(re.view,U.moved),ii(re),U.event(re).end()}}function ee(M,...W){if(t.apply(this,arguments)){var V=this.__zoom,U=qt(M.changedTouches?M.changedTouches[0]:M,this),A=V.invert(U),b=V.k*(M.shiftKey?.5:2),F=i(k(R(V,b),U,A),r.apply(this,W),d);ii(M),f>0?zt(this).transition().duration(f).call(L,F,U,M):zt(this).call(N.transform,F,U,M)}}function Z(M,...W){if(t.apply(this,arguments)){var V=M.touches,U=V.length,A=D(this,W,M.changedTouches.length===U).event(M),b,F,P,T;for(Eu(M),F=0;F`Seems like you have not used ${t==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${t}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:t=>`Node type "${t}" 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:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:r,sourceHandle:i,targetHandle:l})=>`Couldn't create edge for ${t} handle id: "${t==="source"?i:l}", edge id: ${r}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/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:t=>`Edge with id "${t}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},pi=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Up=["Enter"," ","Escape"],Wp={"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:t,x:r,y:i})=>`Moved selected node ${t}. New position, x: ${r}, y: ${i}`,"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"};var po;(function(t){t.Strict="strict",t.Loose="loose"})(po||(po={}));var kr;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(kr||(kr={}));var gi;(function(t){t.Partial="partial",t.Full="full"})(gi||(gi={}));const Yp={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Zn;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Zn||(Zn={}));var mi;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(mi||(mi={}));var _e;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(_e||(_e={}));const fh={[_e.Left]:_e.Right,[_e.Right]:_e.Left,[_e.Top]:_e.Bottom,[_e.Bottom]:_e.Top};function Xp(t){return t===null?null:t?"valid":"invalid"}const Gp=t=>!!t&&typeof t=="object"&&"id"in t&&"source"in t&&"target"in t,Vw=t=>!!t&&typeof t=="object"&&"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),rc=t=>!!t&&typeof t=="object"&&"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),ki=(t,r=[0,0])=>{const{width:i,height:l}=rn(t),a=t.origin??r,u=i*a[0],d=l*a[1];return{x:t.position.x-u,y:t.position.y-d}},Uw=(t,r={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};let i=!1;const l=t.reduce((a,u)=>{const d=typeof u=="string";let f=!r.nodeLookup&&!d?u:void 0;return r.nodeLookup&&(f=d?r.nodeLookup.get(u):rc(u)?u:r.nodeLookup.get(u.id)),f?(i=!0,xl(a,cl(f,r.nodeOrigin))):a},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return i?wl(l):{x:0,y:0,width:0,height:0}},Ei=(t,r={})=>{let i={x:1/0,y:1/0,x2:-1/0,y2:-1/0},l=!1;return t.forEach(a=>{(r.filter===void 0||r.filter(a))&&(i=xl(i,cl(a)),l=!0)}),l?wl(i):{x:0,y:0,width:0,height:0}},oc=(t,r,[i,l,a]=[0,0,1],u=!1,d=!1)=>{const f=(r.x-i)/a,p=(r.y-l)/a,y=r.width/a,m=r.height/a,x=[];for(const v of t.values()){const{measured:S,selectable:_=!0,hidden:C=!1}=v;if(d&&!_||C)continue;const E=S.width??v.width??v.initialWidth??0,N=S.height??v.height??v.initialHeight??0,{x:R,y:k}=v.internals.positionAbsolute,j=Zp(f,p,y,m,R,k,E,N),L=E*N,D=u&&j>0;(!v.internals.handleBounds||D||j>=L||v.dragging)&&x.push(v)}return x},Ww=(t,r)=>{const i=new Set;return t.forEach(l=>{i.add(l.id)}),r.filter(l=>i.has(l.source)||i.has(l.target))};function Yw(t,r){const i=new Map,l=r!=null&&r.nodes?new Set(r.nodes.map(a=>a.id)):null;return t.forEach(a=>{let u;if(r!=null&&r.includeHiddenNodes){const{width:d,height:f}=rn(a);u=d>0&&f>0}else u=!!(a.measured.width&&a.measured.height&&!a.hidden);u&&(!l||l.has(a.id))&&i.set(a.id,a)}),i}async function Xw({nodes:t,width:r,height:i,panZoom:l,minZoom:a,maxZoom:u},d){if(t.size===0)return!0;const f=Yw(t,d),p=Ei(f),y=sc(p,r,i,(d==null?void 0:d.minZoom)??a,(d==null?void 0:d.maxZoom)??u,(d==null?void 0:d.padding)??.1);return await l.setViewport(y,{duration:d==null?void 0:d.duration,ease:d==null?void 0:d.ease,interpolate:d==null?void 0:d.interpolate}),!0}function Qp({nodeId:t,nextPosition:r,nodeLookup:i,nodeOrigin:l=[0,0],nodeExtent:a,onError:u}){const d=i.get(t),f=d.parentId?i.get(d.parentId):void 0,{x:p,y}=f?f.internals.positionAbsolute:{x:0,y:0},m=d.origin??l;let x=d.extent||a;if(d.extent==="parent"&&!d.expandParent)if(!f)u==null||u("005",tn.error005());else{const{width:S,height:_}=rn(f);S&&_&&(x=[[p,y],[p+S,y+_]])}else f&&jr(d.extent)&&(x=[[d.extent[0][0]+p,d.extent[0][1]+y],[d.extent[1][0]+p,d.extent[1][1]+y]]);const v=jr(x)?Cr(r,x,d.measured):r;return(d.measured.width===void 0||d.measured.height===void 0)&&(u==null||u("015",tn.error015())),{position:{x:v.x-p+(d.measured.width??0)*m[0],y:v.y-y+(d.measured.height??0)*m[1]},positionAbsolute:v}}async function Gw({nodesToRemove:t=[],edgesToRemove:r=[],nodes:i,edges:l,onBeforeDelete:a}){const u=new Set(t.map(v=>v.id)),d=[];for(const v of i){if(v.deletable===!1)continue;const S=u.has(v.id),_=!S&&v.parentId&&d.find(C=>C.id===v.parentId);(S||_)&&d.push(v)}const f=new Set(r.map(v=>v.id)),p=l.filter(v=>v.deletable!==!1),m=Ww(d,p);for(const v of p)f.has(v.id)&&!m.find(_=>_.id===v.id)&&m.push(v);if(!a)return{edges:m,nodes:d};const x=await a({nodes:d,edges:m});return typeof x=="boolean"?x?{edges:m,nodes:d}:{edges:[],nodes:[]}:x}const go=(t,r=0,i=1)=>Math.min(Math.max(t,r),i),Cr=(t={x:0,y:0},r,i)=>({x:go(t.x,r[0][0],r[1][0]-((i==null?void 0:i.width)??0)),y:go(t.y,r[0][1],r[1][1]-((i==null?void 0:i.height)??0))});function Kp(t,r,i){const{width:l,height:a}=rn(i),{x:u,y:d}=i.internals.positionAbsolute;return Cr(t,[[u,d],[u+l,d+a]],r)}const hh=(t,r,i)=>ti?-go(Math.abs(t-i),1,r)/r:0,ic=(t,r,i=15,l=40)=>{const a=hh(t.x,l,r.width-l)*i,u=hh(t.y,l,r.height-l)*i;return[a,u]},xl=(t,r)=>({x:Math.min(t.x,r.x),y:Math.min(t.y,r.y),x2:Math.max(t.x2,r.x2),y2:Math.max(t.y2,r.y2)}),Vu=({x:t,y:r,width:i,height:l})=>({x:t,y:r,x2:t+i,y2:r+l}),wl=({x:t,y:r,x2:i,y2:l})=>({x:t,y:r,width:i-t,height:l-r}),yi=(t,r=[0,0])=>{var a,u;const{x:i,y:l}=rc(t)?t.internals.positionAbsolute:ki(t,r);return{x:i,y:l,width:((a=t.measured)==null?void 0:a.width)??t.width??t.initialWidth??0,height:((u=t.measured)==null?void 0:u.height)??t.height??t.initialHeight??0}},cl=(t,r=[0,0])=>{var a,u;const{x:i,y:l}=rc(t)?t.internals.positionAbsolute:ki(t,r);return{x:i,y:l,x2:i+(((a=t.measured)==null?void 0:a.width)??t.width??t.initialWidth??0),y2:l+(((u=t.measured)==null?void 0:u.height)??t.height??t.initialHeight??0)}},qp=(t,r)=>wl(xl(Vu(t),Vu(r))),Zp=(t,r,i,l,a,u,d,f)=>{const p=Math.max(0,Math.min(t+i,a+d)-Math.max(t,a)),y=Math.max(0,Math.min(r+l,u+f)-Math.max(r,u));return Math.ceil(p*y)},dl=(t,r)=>Zp(t.x,t.y,t.width,t.height,r.x,r.y,r.width,r.height),ph=t=>Jt(t.width)&&Jt(t.height)&&Jt(t.x)&&Jt(t.y),Jt=t=>!isNaN(t)&&isFinite(t),Jp=(t,r)=>(i,l)=>{},Ni=(t,r=[1,1])=>({x:r[0]*Math.round(t.x/r[0]),y:r[1]*Math.round(t.y/r[1])}),Ci=({x:t,y:r},[i,l,a],u=!1,d=[1,1])=>{const f={x:(t-i)/a,y:(r-l)/a};return u?Ni(f,d):f},mo=({x:t,y:r},[i,l,a])=>({x:t*a+i,y:r*a+l});function lo(t,r){if(typeof t=="number")return Math.floor((r-r/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(i)}if(typeof t=="string"&&t.endsWith("%")){const i=parseFloat(t);if(!Number.isNaN(i))return Math.floor(r*i*.01)}return console.error(`The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Qw(t,r,i){if(typeof t=="string"||typeof t=="number"){const l=lo(t,i),a=lo(t,r);return{top:l,right:a,bottom:l,left:a,x:a*2,y:l*2}}if(typeof t=="object"){const l=lo(t.top??t.y??0,i),a=lo(t.bottom??t.y??0,i),u=lo(t.left??t.x??0,r),d=lo(t.right??t.x??0,r);return{top:l,right:d,bottom:a,left:u,x:u+d,y:l+a}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Kw(t,r,i,l,a,u){const{x:d,y:f}=mo(t,[r,i,l]),{x:p,y}=mo({x:t.x+t.width,y:t.y+t.height},[r,i,l]),m=a-p,x=u-y;return{left:Math.floor(d),top:Math.floor(f),right:Math.floor(m),bottom:Math.floor(x)}}const sc=(t,r,i,l,a,u)=>{const d=Qw(u,r,i),f=(r-d.x)/t.width,p=(i-d.y)/t.height,y=Math.min(f,p),m=go(y,l,a),x=t.x+t.width/2,v=t.y+t.height/2,S=r/2-x*m,_=i/2-v*m,C=Kw(t,S,_,m,r,i),E={left:Math.min(C.left-d.left,0),top:Math.min(C.top-d.top,0),right:Math.min(C.right-d.right,0),bottom:Math.min(C.bottom-d.bottom,0)};return{x:S-E.left+E.right,y:_-E.top+E.bottom,zoom:m}},vi=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0};function jr(t){return t!=null&&t!=="parent"}function rn(t){var r,i;return{width:((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth??0,height:((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight??0}}function eg(t){var r,i;return(((r=t.measured)==null?void 0:r.width)??t.width??t.initialWidth)!==void 0&&(((i=t.measured)==null?void 0:i.height)??t.height??t.initialHeight)!==void 0}function tg(t,r={width:0,height:0},i,l,a){const u={...t},d=l.get(i);if(d){const f=d.origin||a;u.x+=d.internals.positionAbsolute.x-(r.width??0)*f[0],u.y+=d.internals.positionAbsolute.y-(r.height??0)*f[1]}return u}function gh(t,r){if(t.size!==r.size)return!1;for(const i of t)if(!r.has(i))return!1;return!0}function qw(){let t,r;return{promise:new Promise((l,a)=>{t=l,r=a}),resolve:t,reject:r}}function Zw(t){return{...Wp,...t||{}}}function ui(t,{snapGrid:r=[0,0],snapToGrid:i=!1,transform:l,containerBounds:a}){const{x:u,y:d}=en(t),f=Ci({x:u-((a==null?void 0:a.left)??0),y:d-((a==null?void 0:a.top)??0)},l),{x:p,y}=i?Ni(f,r):f;return{xSnapped:p,ySnapped:y,...f}}const lc=t=>({width:t.offsetWidth,height:t.offsetHeight}),ng=t=>{var r;return((r=t==null?void 0:t.getRootNode)==null?void 0:r.call(t))||(window==null?void 0:window.document)},Jw=["INPUT","SELECT","TEXTAREA"];function rg(t){var l,a;const r=((a=(l=t.composedPath)==null?void 0:l.call(t))==null?void 0:a[0])||t.target;return(r==null?void 0:r.nodeType)!==1?!1:Jw.includes(r.nodeName)||r.hasAttribute("contenteditable")||!!r.closest(".nokey")}const og=t=>"clientX"in t,en=(t,r)=>{var u,d;const i=og(t),l=i?t.clientX:(u=t.touches)==null?void 0:u[0].clientX,a=i?t.clientY:(d=t.touches)==null?void 0:d[0].clientY;return{x:l-((r==null?void 0:r.left)??0),y:a-((r==null?void 0:r.top)??0)}},mh=(t,r,i,l,a)=>{const u=r.querySelectorAll(`.${t}`);return!u||!u.length?null:Array.from(u).map(d=>{const f=d.getBoundingClientRect();return{id:d.getAttribute("data-handleid"),type:t,nodeId:a,position:d.getAttribute("data-handlepos"),x:(f.left-i.left)/l,y:(f.top-i.top)/l,...lc(d)}})};function ig({sourceX:t,sourceY:r,targetX:i,targetY:l,sourceControlX:a,sourceControlY:u,targetControlX:d,targetControlY:f}){const p=t*.125+a*.375+d*.375+i*.125,y=r*.125+u*.375+f*.375+l*.125,m=Math.abs(p-t),x=Math.abs(y-r);return[p,y,m,x]}function Gs(t,r){return t>=0?.5*t:r*25*Math.sqrt(-t)}function yh({pos:t,x1:r,y1:i,x2:l,y2:a,c:u}){switch(t){case _e.Left:return[r-Gs(r-l,u),i];case _e.Right:return[r+Gs(l-r,u),i];case _e.Top:return[r,i-Gs(i-a,u)];case _e.Bottom:return[r,i+Gs(a-i,u)]}}function sg({sourceX:t,sourceY:r,sourcePosition:i=_e.Bottom,targetX:l,targetY:a,targetPosition:u=_e.Top,curvature:d=.25}){const[f,p]=yh({pos:i,x1:t,y1:r,x2:l,y2:a,c:d}),[y,m]=yh({pos:u,x1:l,y1:a,x2:t,y2:r,c:d}),[x,v,S,_]=ig({sourceX:t,sourceY:r,targetX:l,targetY:a,sourceControlX:f,sourceControlY:p,targetControlX:y,targetControlY:m});return[`M${t},${r} C${f},${p} ${y},${m} ${l},${a}`,x,v,S,_]}function lg({sourceX:t,sourceY:r,targetX:i,targetY:l}){const a=Math.abs(i-t)/2,u=i0}const n1=({source:t,sourceHandle:r,target:i,targetHandle:l})=>`xy-edge__${t}${r||""}-${i}${l||""}`,r1=(t,r)=>r.some(i=>i.source===t.source&&i.target===t.target&&(i.sourceHandle===t.sourceHandle||!i.sourceHandle&&!t.sourceHandle)&&(i.targetHandle===t.targetHandle||!i.targetHandle&&!t.targetHandle)),o1=(t,r,i={})=>{var u;if(!t.source||!t.target)return(u=i.onError)==null||u.call(i,"006",tn.error006()),r;const l=i.getEdgeId||n1;let a;return Gp(t)?a={...t}:a={...t,id:l(t)},r1(a,r)?r:(a.sourceHandle===null&&delete a.sourceHandle,a.targetHandle===null&&delete a.targetHandle,r.concat(a))};function ag({sourceX:t,sourceY:r,targetX:i,targetY:l}){const[a,u,d,f]=lg({sourceX:t,sourceY:r,targetX:i,targetY:l});return[`M ${t},${r}L ${i},${l}`,a,u,d,f]}const vh={[_e.Left]:{x:-1,y:0},[_e.Right]:{x:1,y:0},[_e.Top]:{x:0,y:-1},[_e.Bottom]:{x:0,y:1}},i1=({source:t,sourcePosition:r=_e.Bottom,target:i})=>r===_e.Left||r===_e.Right?t.xMath.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2));function s1({source:t,sourcePosition:r=_e.Bottom,target:i,targetPosition:l=_e.Top,center:a,offset:u,stepPosition:d}){const f=vh[r],p=vh[l],y={x:t.x+f.x*u,y:t.y+f.y*u},m={x:i.x+p.x*u,y:i.y+p.y*u},x=i1({source:y,sourcePosition:r,target:m}),v=x.x!==0?"x":"y",S=x[v];let _=[],C,E;const N={x:0,y:0},R={x:0,y:0},[,,k,j]=lg({sourceX:t.x,sourceY:t.y,targetX:i.x,targetY:i.y});if(f[v]*p[v]===-1){v==="x"?(C=a.x??y.x+(m.x-y.x)*d,E=a.y??(y.y+m.y)/2):(C=a.x??(y.x+m.x)/2,E=a.y??y.y+(m.y-y.y)*d);const H=[{x:C,y:y.y},{x:C,y:m.y}],X=[{x:y.x,y:E},{x:m.x,y:E}];f[v]===S?_=v==="x"?H:X:_=v==="x"?X:H}else{const H=[{x:y.x,y:m.y}],X=[{x:m.x,y:y.y}];if(v==="x"?_=f.x===S?X:H:_=f.y===S?H:X,r===l){const M=Math.abs(t[v]-i[v]);if(M<=u){const W=Math.min(u-1,u-M);f[v]===S?N[v]=(y[v]>t[v]?-1:1)*W:R[v]=(m[v]>i[v]?-1:1)*W}}if(r!==l){const M=v==="x"?"y":"x",W=f[v]===p[M],V=y[M]>m[M],U=y[M]=J?(C=(ee.x+Z.x)/2,E=_[0].y):(C=_[0].x,E=(ee.y+Z.y)/2)}const L={x:y.x+N.x,y:y.y+N.y},D={x:m.x+R.x,y:m.y+R.y};return[[t,...L.x!==_[0].x||L.y!==_[0].y?[L]:[],..._,...D.x!==_[_.length-1].x||D.y!==_[_.length-1].y?[D]:[],i],C,E,k,j]}function l1(t,r,i,l){const a=Math.min(xh(t,r)/2,xh(r,i)/2,l),{x:u,y:d}=r;if(t.x===u&&u===i.x||t.y===d&&d===i.y)return`L${u} ${d}`;if(t.y===d){const y=t.xi.id===r):t[0])||null}function Wu(t,r){return t?typeof t=="string"?t:`${r?`${r}__`:""}${Object.keys(t).sort().map(l=>`${l}=${t[l]}`).join("&")}`:""}function u1(t,{id:r,defaultColor:i,defaultMarkerStart:l,defaultMarkerEnd:a}){const u=new Set;return t.reduce((d,f)=>([f.markerStart||l,f.markerEnd||a].forEach(p=>{if(p&&typeof p=="object"){const y=Wu(p,r);u.has(y)||(d.push({id:y,color:p.color||i,...p}),u.add(y))}}),d),[]).sort((d,f)=>d.id.localeCompare(f.id))}const ug=1e3,c1=10,ac={nodeOrigin:[0,0],nodeExtent:pi,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},d1={...ac,checkEquality:!0};function uc(t,r){const i={...t};for(const l in r)r[l]!==void 0&&(i[l]=r[l]);return i}function f1(t,r,i){const l=uc(ac,i);for(const a of t.values())if(a.parentId)dc(a,t,r,l);else{const u=ki(a,l.nodeOrigin),d=jr(a.extent)?a.extent:l.nodeExtent,f=Cr(u,d,rn(a));a.internals.positionAbsolute=f}}function h1(t,r){if(!t.handles)return t.measured?r==null?void 0:r.internals.handleBounds:void 0;const i=[],l=[];for(const a of t.handles){const u={id:a.id,width:a.width??1,height:a.height??1,nodeId:t.id,x:a.x,y:a.y,position:a.position,type:a.type};a.type==="source"?i.push(u):a.type==="target"&&l.push(u)}return{source:i,target:l}}function cc(t){return t==="manual"}function Yu(t,r,i,l={}){var m,x;const a=uc(d1,l),u={i:0},d=new Map(r),f=a!=null&&a.elevateNodesOnSelect&&!cc(a.zIndexMode)?ug:0;let p=t.length>0,y=!1;r.clear(),i.clear();for(const v of t){let S=d.get(v.id);if(a.checkEquality&&v===(S==null?void 0:S.internals.userNode))r.set(v.id,S);else{const _=ki(v,a.nodeOrigin),C=jr(v.extent)?v.extent:a.nodeExtent,E=Cr(_,C,rn(v));S={...a.defaults,...v,measured:{width:(m=v.measured)==null?void 0:m.width,height:(x=v.measured)==null?void 0:x.height},internals:{positionAbsolute:E,handleBounds:h1(v,S),z:cg(v,f,a.zIndexMode),userNode:v}},r.set(v.id,S)}(S.measured===void 0||S.measured.width===void 0||S.measured.height===void 0)&&!S.hidden&&(p=!1),v.parentId&&dc(S,r,i,l,u),y||(y=v.selected??!1)}return{nodesInitialized:p,hasSelectedNodes:y}}function p1(t,r){if(!t.parentId)return;const i=r.get(t.parentId);i?i.set(t.id,t):r.set(t.parentId,new Map([[t.id,t]]))}function dc(t,r,i,l,a){const{elevateNodesOnSelect:u,nodeOrigin:d,nodeExtent:f,zIndexMode:p}=uc(ac,l),y=t.parentId,m=r.get(y);if(!m){console.warn(`Parent node ${y} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}p1(t,i),a&&!m.parentId&&m.internals.rootParentIndex===void 0&&p==="auto"&&(m.internals.rootParentIndex=++a.i,m.internals.z=m.internals.z+a.i*c1),a&&m.internals.rootParentIndex!==void 0&&(a.i=m.internals.rootParentIndex);const x=u&&!cc(p)?ug:0,{x:v,y:S,z:_}=g1(t,m,d,f,x,p),{positionAbsolute:C}=t.internals,E=v!==C.x||S!==C.y;(E||_!==t.internals.z)&&r.set(t.id,{...t,internals:{...t.internals,positionAbsolute:E?{x:v,y:S}:C,z:_}})}function cg(t,r,i){const l=Jt(t.zIndex)?t.zIndex:0;return cc(i)?l:l+(t.selected?r:0)}function g1(t,r,i,l,a,u){const{x:d,y:f}=r.internals.positionAbsolute,p=rn(t),y=ki(t,i),m=jr(t.extent)?Cr(y,t.extent,p):y;let x=Cr({x:d+m.x,y:f+m.y},l,p);t.extent==="parent"&&(x=Kp(x,p,r));const v=cg(t,a,u),S=r.internals.z??0;return{x:x.x,y:x.y,z:S>=v?S+1:v}}function fc(t,r,i,l=[0,0]){var d;const a=[],u=new Map;for(const f of t){const p=r.get(f.parentId);if(!p)continue;const y=((d=u.get(f.parentId))==null?void 0:d.expandedRect)??yi(p),m=qp(y,f.rect);u.set(f.parentId,{expandedRect:m,parent:p})}return u.size>0&&u.forEach(({expandedRect:f,parent:p},y)=>{var k;const m=p.internals.positionAbsolute,x=rn(p),v=p.origin??l,S=f.x0||_>0||N||R)&&(a.push({id:y,type:"position",position:{x:p.position.x-S+N,y:p.position.y-_+R}}),(k=i.get(y))==null||k.forEach(j=>{t.some(L=>L.id===j.id)||a.push({id:j.id,type:"position",position:{x:j.position.x+S,y:j.position.y+_}})})),(x.width0){const S=fc(v,r,i,a);y.push(...S)}return{changes:y,updatedInternals:p}}async function y1({delta:t,panZoom:r,transform:i,translateExtent:l,width:a,height:u}){if(!r||!t.x&&!t.y)return!1;const d=await r.setViewportConstrained({x:i[0]+t.x,y:i[1]+t.y,zoom:i[2]},[[0,0],[a,u]],l);return!!d&&(d.x!==i[0]||d.y!==i[1]||d.k!==i[2])}function kh(t,r,i,l,a,u){let d=a;const f=l.get(d)||new Map;l.set(d,f.set(i,r)),d=`${a}-${t}`;const p=l.get(d)||new Map;if(l.set(d,p.set(i,r)),u){d=`${a}-${t}-${u}`;const y=l.get(d)||new Map;l.set(d,y.set(i,r))}}function dg(t,r,i){t.clear(),r.clear();for(const l of i){const{source:a,target:u,sourceHandle:d=null,targetHandle:f=null}=l,p={edgeId:l.id,source:a,target:u,sourceHandle:d,targetHandle:f},y=`${a}-${d}--${u}-${f}`,m=`${u}-${f}--${a}-${d}`;kh("source",p,m,t,a,d),kh("target",p,y,t,u,f),r.set(l.id,l)}}function fg(t,r){if(!t.parentId)return!1;const i=r.get(t.parentId);return i?i.selected?!0:fg(i,r):!1}function Eh(t,r,i){var a;let l=t;do{if((a=l==null?void 0:l.matches)!=null&&a.call(l,r))return!0;if(l===i)return!1;l=l==null?void 0:l.parentElement}while(l);return!1}function v1(t,r,i,l){const a=new Map;for(const[u,d]of t)if((d.selected||d.id===l)&&(!d.parentId||!fg(d,t))&&(d.draggable||r&&typeof d.draggable>"u")){const f=t.get(u);f&&a.set(u,{id:u,position:f.position||{x:0,y:0},distance:{x:i.x-f.internals.positionAbsolute.x,y:i.y-f.internals.positionAbsolute.y},extent:f.extent,parentId:f.parentId,origin:f.origin,expandParent:f.expandParent,internals:{positionAbsolute:f.internals.positionAbsolute||{x:0,y:0}},measured:{width:f.measured.width??0,height:f.measured.height??0}})}return a}function Nu({nodeId:t,dragItems:r,nodeLookup:i,dragging:l=!0}){var d,f,p;const a=[];for(const[y,m]of r){const x=(d=i.get(y))==null?void 0:d.internals.userNode;x&&a.push({...x,position:m.position,dragging:l})}if(!t)return[a[0],a];const u=(f=i.get(t))==null?void 0:f.internals.userNode;return[u?{...u,position:((p=r.get(t))==null?void 0:p.position)||u.position,dragging:l}:a[0],a]}function x1({dragItems:t,snapGrid:r,x:i,y:l}){const a=t.values().next().value;if(!a)return null;const u={x:i-a.distance.x,y:l-a.distance.y},d=Ni(u,r);return{x:d.x-u.x,y:d.y-u.y}}function w1({onNodeMouseDown:t,getStoreItems:r,onDragStart:i,onDrag:l,onDragStop:a}){let u={x:null,y:null},d=0,f=new Map,p=!1,y={x:0,y:0},m=null,x=!1,v=null,S=!1,_=!1,C=null;function E({noDragClassName:R,handleSelector:k,domNode:j,isSelectable:L,nodeId:D,nodeClickDistance:B=0}){v=zt(j);function H({x:te,y:J}){const{nodeLookup:M,nodeExtent:W,snapGrid:V,snapToGrid:U,nodeOrigin:A,onNodeDrag:b,onSelectionDrag:F,onError:P,updateNodePositions:T}=r();u={x:te,y:J};let ne=!1;const re=f.size>1,ue=re&&W?Vu(Ei(f)):null,ce=re&&U?x1({dragItems:f,snapGrid:V,x:te,y:J}):null;for(const[de,Q]of f){if(!M.has(de))continue;let se={x:te-Q.distance.x,y:J-Q.distance.y};U&&(se=ce?{x:Math.round(se.x+ce.x),y:Math.round(se.y+ce.y)}:Ni(se,V));let fe=null;if(re&&W&&!Q.extent&&ue){const{positionAbsolute:pe}=Q.internals,Ce=pe.x-ue.x+W[0][0],je=pe.x+Q.measured.width-ue.x2+W[1][0],Me=pe.y-ue.y+W[0][1],ze=pe.y+Q.measured.height-ue.y2+W[1][1];fe=[[Ce,Me],[je,ze]]}const{position:ge,positionAbsolute:ve}=Qp({nodeId:de,nextPosition:se,nodeLookup:M,nodeExtent:fe||W,nodeOrigin:A,onError:P});ne=ne||Q.position.x!==ge.x||Q.position.y!==ge.y,Q.position=ge,Q.internals.positionAbsolute=ve}if(_=_||ne,!!ne&&(T(f,!0),C&&(l||b||!D&&F))){const[de,Q]=Nu({nodeId:D,dragItems:f,nodeLookup:M});l==null||l(C,f,de,Q),b==null||b(C,de,Q),D||F==null||F(C,Q)}}async function X(){if(!m)return;const{transform:te,panBy:J,autoPanSpeed:M,autoPanOnNodeDrag:W}=r();if(!W){p=!1,cancelAnimationFrame(d);return}const[V,U]=ic(y,m,M);(V!==0||U!==0)&&(u.x=(u.x??0)-V/te[2],u.y=(u.y??0)-U/te[2],await J({x:V,y:U})&&H(u)),d=requestAnimationFrame(X)}function ee(te){var re;const{nodeLookup:J,multiSelectionActive:M,nodesDraggable:W,transform:V,snapGrid:U,snapToGrid:A,selectNodesOnDrag:b,onNodeDragStart:F,onSelectionDragStart:P,unselectNodesAndEdges:T}=r();x=!0,(!b||!L)&&!M&&D&&((re=J.get(D))!=null&&re.selected||T()),L&&b&&D&&(t==null||t(D));const ne=ui(te.sourceEvent,{transform:V,snapGrid:U,snapToGrid:A,containerBounds:m});if(u=ne,f=v1(J,W,ne,D),f.size>0&&(i||F||!D&&P)){const[ue,ce]=Nu({nodeId:D,dragItems:f,nodeLookup:J});i==null||i(te.sourceEvent,f,ue,ce),F==null||F(te.sourceEvent,ue,ce),D||P==null||P(te.sourceEvent,ce)}}const Z=Mp().clickDistance(B).on("start",te=>{const{domNode:J,nodeDragThreshold:M,transform:W,snapGrid:V,snapToGrid:U}=r();m=(J==null?void 0:J.getBoundingClientRect())||null,S=!1,_=!1,C=te.sourceEvent,M===0&&ee(te),u=ui(te.sourceEvent,{transform:W,snapGrid:V,snapToGrid:U,containerBounds:m}),y=en(te.sourceEvent,m)}).on("drag",te=>{const{autoPanOnNodeDrag:J,transform:M,snapGrid:W,snapToGrid:V,nodeDragThreshold:U,nodeLookup:A}=r(),b=ui(te.sourceEvent,{transform:M,snapGrid:W,snapToGrid:V,containerBounds:m});if(C=te.sourceEvent,(te.sourceEvent.type==="touchmove"&&te.sourceEvent.touches.length>1||D&&!A.has(D))&&(S=!0),!S){if(!p&&J&&x&&(p=!0,X()),!x){const F=en(te.sourceEvent,m),P=F.x-y.x,T=F.y-y.y;Math.sqrt(P*P+T*T)>U&&ee(te)}(u.x!==b.xSnapped||u.y!==b.ySnapped)&&f&&x&&(y=en(te.sourceEvent,m),H(b))}}).on("end",te=>{if(!x||S){S&&f.size>0&&r().updateNodePositions(f,!1);return}if(p=!1,x=!1,cancelAnimationFrame(d),f.size>0){const{nodeLookup:J,updateNodePositions:M,onNodeDragStop:W,onSelectionDragStop:V}=r();if(_&&(M(f,!1),_=!1),a||W||!D&&V){const[U,A]=Nu({nodeId:D,dragItems:f,nodeLookup:J,dragging:!1});a==null||a(te.sourceEvent,f,U,A),W==null||W(te.sourceEvent,U,A),D||V==null||V(te.sourceEvent,A)}}}).filter(te=>{const J=te.target;return!te.button&&(!R||!Eh(J,`.${R}`,j))&&(!k||Eh(J,k,j))});v.call(Z)}function N(){v==null||v.on(".drag",null)}return{update:E,destroy:N}}function S1(t,r,i){const l=[],a={x:t.x-i,y:t.y-i,width:i*2,height:i*2};for(const u of r.values())dl(a,yi(u))>0&&l.push(u);return l}const _1=250;function k1(t,r,i,l){var f,p;let a=[],u=1/0;const d=S1(t,i,r+_1);for(const y of d){const m=[...((f=y.internals.handleBounds)==null?void 0:f.source)??[],...((p=y.internals.handleBounds)==null?void 0:p.target)??[]];for(const x of m){if(l.nodeId===x.nodeId&&l.type===x.type&&l.id===x.id)continue;const{x:v,y:S}=Mr(y,x,x.position,!0),_=Math.sqrt(Math.pow(v-t.x,2)+Math.pow(S-t.y,2));_>r||(_1){const y=l.type==="source"?"target":"source";return a.find(m=>m.type===y)??a[0]}return a[0]}function hg(t,r,i,l,a,u=!1){var y,m,x;const d=l.get(t);if(!d)return null;const f=a==="strict"?(y=d.internals.handleBounds)==null?void 0:y[r]:[...((m=d.internals.handleBounds)==null?void 0:m.source)??[],...((x=d.internals.handleBounds)==null?void 0:x.target)??[]],p=(i?f==null?void 0:f.find(v=>v.id===i):f==null?void 0:f[0])??null;return p&&u?{...p,...Mr(d,p,p.position,!0)}:p}function pg(t,r){return t||(r!=null&&r.classList.contains("target")?"target":r!=null&&r.classList.contains("source")?"source":null)}function E1(t,r){let i=null;return r?i=!0:t&&!r&&(i=!1),i}const gg=()=>!0;function N1(t,{connectionMode:r,connectionRadius:i,handleId:l,nodeId:a,edgeUpdaterType:u,isTarget:d,domNode:f,nodeLookup:p,lib:y,autoPanOnConnect:m,flowId:x,panBy:v,cancelConnection:S,onConnectStart:_,onConnect:C,onConnectEnd:E,isValidConnection:N=gg,onReconnectEnd:R,updateConnection:k,getTransform:j,getFromHandle:L,autoPanSpeed:D,dragThreshold:B=1,handleDomNode:H}){const X=ng(t.target);let ee=0,Z;const{x:te,y:J}=en(t),M=pg(u,H),W=f==null?void 0:f.getBoundingClientRect();let V=!1;if(!W||!M)return;const U=hg(a,M,l,p,r);if(!U)return;let A=en(t,W),b=!1,F=null,P=!1,T=null;function ne(){if(!m||!W)return;const[ge,ve]=ic(A,W,D);v({x:ge,y:ve}),ee=requestAnimationFrame(ne)}const re={...U,nodeId:a,type:M,position:U.position},ue=p.get(a);let de={inProgress:!0,isValid:null,from:Mr(ue,re,_e.Left,!0),fromHandle:re,fromPosition:re.position,fromNode:ue,to:A,toHandle:null,toPosition:fh[re.position],toNode:null,pointer:A};function Q(){V=!0,k(de),_==null||_(t,{nodeId:a,handleId:l,handleType:M})}B===0&&Q();function se(ge){if(!V){const{x:ze,y:Xe}=en(ge),rt=ze-te,Ze=Xe-J;if(!(rt*rt+Ze*Ze>B*B))return;Q()}if(!L()||!re){fe(ge);return}const ve=j();A=en(ge,W),Z=k1(Ci(A,ve,!1,[1,1]),i,p,re),b||(ne(),b=!0);const pe=mg(ge,{handle:Z,connectionMode:r,fromNodeId:a,fromHandleId:l,fromType:d?"target":"source",isValidConnection:N,doc:X,lib:y,flowId:x,nodeLookup:p});T=pe.handleDomNode,F=pe.connection,P=E1(!!Z,pe.isValid);const Ce=p.get(a),je=Ce?Mr(Ce,re,_e.Left,!0):de.from,Me={...de,from:je,isValid:P,to:pe.toHandle&&P?mo({x:pe.toHandle.x,y:pe.toHandle.y},ve):A,toHandle:pe.toHandle,toPosition:P&&pe.toHandle?pe.toHandle.position:fh[re.position],toNode:pe.toHandle?p.get(pe.toHandle.nodeId):null,pointer:A};k(Me),de=Me}function fe(ge){if(!("touches"in ge&&ge.touches.length>0)){if(V){(Z||T)&&F&&P&&(C==null||C(F));const{inProgress:ve,...pe}=de,Ce={...pe,toPosition:de.toHandle?de.toPosition:null};E==null||E(ge,Ce),u&&(R==null||R(ge,Ce))}S(),cancelAnimationFrame(ee),b=!1,P=!1,F=null,T=null,X.removeEventListener("mousemove",se),X.removeEventListener("mouseup",fe),X.removeEventListener("touchmove",se),X.removeEventListener("touchend",fe)}}X.addEventListener("mousemove",se),X.addEventListener("mouseup",fe),X.addEventListener("touchmove",se),X.addEventListener("touchend",fe)}function mg(t,{handle:r,connectionMode:i,fromNodeId:l,fromHandleId:a,fromType:u,doc:d,lib:f,flowId:p,isValidConnection:y=gg,nodeLookup:m}){const x=u==="target",v=r?d.querySelector(`.${f}-flow__handle[data-id="${p}-${r==null?void 0:r.nodeId}-${r==null?void 0:r.id}-${r==null?void 0:r.type}"]`):null,{x:S,y:_}=en(t),C=d.elementFromPoint(S,_),E=C!=null&&C.classList.contains(`${f}-flow__handle`)?C:v,N={handleDomNode:E,isValid:!1,connection:null,toHandle:null};if(E){const R=pg(void 0,E),k=E.getAttribute("data-nodeid"),j=E.getAttribute("data-handleid"),L=E.classList.contains("connectable"),D=E.classList.contains("connectableend");if(!k||!R)return N;const B={source:x?k:l,sourceHandle:x?j:a,target:x?l:k,targetHandle:x?a:j};N.connection=B;const X=L&&D&&(i===po.Strict?x&&R==="source"||!x&&R==="target":k!==l||j!==a);N.isValid=X&&y(B),N.toHandle=hg(k,R,j,m,i,!0)}return N}const Xu={onPointerDown:N1,isValid:mg};function C1({domNode:t,panZoom:r,getTransform:i,getViewScale:l}){const a=zt(t);function u({translateExtent:f,width:p,height:y,zoomStep:m=1,pannable:x=!0,zoomable:v=!0,inversePan:S=!1}){const _=k=>{if(k.sourceEvent.type!=="wheel"||!r)return;const j=i(),L=k.sourceEvent.ctrlKey&&vi()?10:1,D=-k.sourceEvent.deltaY*(k.sourceEvent.deltaMode===1?.05:k.sourceEvent.deltaMode?1:.002)*m,B=j[2]*Math.pow(2,D*L);r.scaleTo(B)};let C=[0,0];const E=k=>{(k.sourceEvent.type==="mousedown"||k.sourceEvent.type==="touchstart")&&(C=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY])},N=k=>{const j=i();if(k.sourceEvent.type!=="mousemove"&&k.sourceEvent.type!=="touchmove"||!r)return;const L=[k.sourceEvent.clientX??k.sourceEvent.touches[0].clientX,k.sourceEvent.clientY??k.sourceEvent.touches[0].clientY],D=[L[0]-C[0],L[1]-C[1]];C=L;const B=l()*Math.max(j[2],Math.log(j[2]))*(S?-1:1),H={x:j[0]-D[0]*B,y:j[1]-D[1]*B},X=[[0,0],[p,y]];r.setViewportConstrained({x:H.x,y:H.y,zoom:j[2]},X,f)},R=Vp().on("start",E).on("zoom",x?N:null).on("zoom.wheel",v?_:null);a.call(R,{})}function d(){a.on("zoom",null)}return{update:u,destroy:d,pointer:qt}}const Sl=t=>({x:t.x,y:t.y,zoom:t.k}),Cu=({x:t,y:r,zoom:i})=>vl.translate(t,r).scale(i),qn=(t,r)=>t.target.closest(`.${r}`),yg=(t,r)=>r===2&&Array.isArray(t)&&t.includes(2),j1=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,ju=(t,r=0,i=j1,l=()=>{})=>{const a=typeof r=="number"&&r>0;return a||l(),a?t.transition().duration(r).ease(i).on("end",l):t},vg=t=>{const r=t.ctrlKey&&vi()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*r};function M1({zoomPanValues:t,noWheelClassName:r,d3Selection:i,d3Zoom:l,panOnScrollMode:a,panOnScrollSpeed:u,zoomOnPinch:d,onPanZoomStart:f,onPanZoom:p,onPanZoomEnd:y}){return m=>{if(qn(m,r))return m.ctrlKey&&m.preventDefault(),!1;m.preventDefault(),m.stopImmediatePropagation();const x=i.property("__zoom").k||1;if(m.ctrlKey&&d){const E=qt(m),N=vg(m),R=x*Math.pow(2,N);l.scaleTo(i,R,E,m);return}const v=m.deltaMode===1?20:1;let S=a===kr.Vertical?0:m.deltaX*v,_=a===kr.Horizontal?0:m.deltaY*v;!vi()&&m.shiftKey&&a!==kr.Vertical&&(S=m.deltaY*v,_=0),l.translateBy(i,-(S/x)*u,-(_/x)*u,{internal:!0});const C=Sl(i.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?p==null||p(m,C):(t.isPanScrolling=!0,f==null||f(m,C)),t.panScrollTimeout=setTimeout(()=>{y==null||y(m,C),t.isPanScrolling=!1},150)}}function P1({noWheelClassName:t,preventScrolling:r,d3ZoomHandler:i}){return function(l,a){const u=l.type==="wheel",d=!r&&u&&!l.ctrlKey,f=qn(l,t);if(l.ctrlKey&&u&&f&&l.preventDefault(),d||f)return null;l.preventDefault(),i.call(this,l,a)}}function I1({zoomPanValues:t,onDraggingChange:r,onPanZoomStart:i}){return l=>{var u,d,f;if((u=l.sourceEvent)!=null&&u.internal)return;const a=Sl(l.transform);t.mouseButton=((d=l.sourceEvent)==null?void 0:d.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=a,((f=l.sourceEvent)==null?void 0:f.type)==="mousedown"&&r(!0),i&&(i==null||i(l.sourceEvent,a))}}function R1({zoomPanValues:t,panOnDrag:r,onPaneContextMenu:i,onTransformChange:l,onPanZoom:a}){return u=>{var d,f;t.usedRightMouseButton=!!(i&&yg(r,t.mouseButton??0)),(d=u.sourceEvent)!=null&&d.sync||l([u.transform.x,u.transform.y,u.transform.k]),a&&!((f=u.sourceEvent)!=null&&f.internal)&&(a==null||a(u.sourceEvent,Sl(u.transform)))}}function T1({zoomPanValues:t,panOnDrag:r,panOnScroll:i,onDraggingChange:l,onPanZoomEnd:a,onPaneContextMenu:u}){return d=>{var f;if(!((f=d.sourceEvent)!=null&&f.internal)&&(t.isZoomingOrPanning=!1,u&&yg(r,t.mouseButton??0)&&!t.usedRightMouseButton&&d.sourceEvent&&u(d.sourceEvent),t.usedRightMouseButton=!1,l(!1),a)){const p=Sl(d.transform);t.prevViewport=p,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{a==null||a(d.sourceEvent,p)},i?150:0)}}}function z1({panActivationKeyPressed:t,zoomActivationKeyPressed:r,zoomOnScroll:i,zoomOnPinch:l,panOnDrag:a,panOnScroll:u,zoomOnDoubleClick:d,userSelectionActive:f,noWheelClassName:p,noPanClassName:y,lib:m,connectionInProgress:x}){return v=>{var N;const S=r||i,_=l&&v.ctrlKey,C=v.type==="wheel";if(v.button===1&&v.type==="mousedown"&&(qn(v,`${m}-flow__node`)||qn(v,`${m}-flow__edge`)||qn(v,`${m}-flow__selection`)||qn(v,`${m}-flow__nodesselection`)))return!0;if(!a&&!S&&!u&&!d&&!l||f||x&&!C||qn(v,p)&&C||qn(v,y)&&(!C||u&&C&&!r)||!l&&v.ctrlKey&&C)return!1;if(!l&&v.type==="touchstart"&&((N=v.touches)==null?void 0:N.length)>1)return v.preventDefault(),!1;if(!S&&!u&&!_&&C||!a&&(v.type==="mousedown"||v.type==="touchstart")||Array.isArray(a)&&!a.includes(v.button)&&v.type==="mousedown")return!1;const E=Array.isArray(a)&&a.includes(v.button)||!v.button||v.button<=1;return(!v.ctrlKey||C||t)&&E}}function L1({domNode:t,minZoom:r,maxZoom:i,translateExtent:l,viewport:a,onPanZoom:u,onPanZoomStart:d,onPanZoomEnd:f,onDraggingChange:p}){const y={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},m=t.getBoundingClientRect();let x=[[0,0],[m.width,m.height]];const v=typeof ResizeObserver<"u"?new ResizeObserver(J=>{const M=J[0];M&&(x=[[0,0],[M.contentRect.width,M.contentRect.height]])}):null;v==null||v.observe(t);const S=Vp().extent(()=>x).scaleExtent([r,i]).translateExtent(l),_=zt(t).call(S);j({x:a.x,y:a.y,zoom:go(a.zoom,r,i)},[[0,0],[m.width,m.height]],l);const C=_.on("wheel.zoom"),E=_.on("dblclick.zoom");S.wheelDelta(vg);async function N(J,M){return _?new Promise(W=>{S==null||S.interpolate((M==null?void 0:M.interpolate)==="linear"?ai:Js).transform(ju(_,M==null?void 0:M.duration,M==null?void 0:M.ease,()=>W(!0)),J)}):!1}function R({noWheelClassName:J,noPanClassName:M,onPaneContextMenu:W,userSelectionActive:V,panOnScroll:U,panOnDrag:A,panOnScrollMode:b,panOnScrollSpeed:F,preventScrolling:P,zoomOnPinch:T,zoomOnScroll:ne,zoomOnDoubleClick:re,panActivationKeyPressed:ue=!1,zoomActivationKeyPressed:ce,lib:de,onTransformChange:Q,connectionInProgress:se,paneClickDistance:fe,selectionOnDrag:ge}){V&&!y.isZoomingOrPanning&&k();const ve=U&&!ce&&!V;S.clickDistance(ge?1/0:!Jt(fe)||fe<0?0:fe);const pe=ve?M1({zoomPanValues:y,noWheelClassName:J,d3Selection:_,d3Zoom:S,panOnScrollMode:b,panOnScrollSpeed:F,zoomOnPinch:T,onPanZoomStart:d,onPanZoom:u,onPanZoomEnd:f}):P1({noWheelClassName:J,preventScrolling:P,d3ZoomHandler:C});_.on("wheel.zoom",pe,{passive:!1});const Ce=I1({zoomPanValues:y,onDraggingChange:p,onPanZoomStart:d});S.on("start",Ce);const je=R1({zoomPanValues:y,panOnDrag:A,onPaneContextMenu:!!W,onPanZoom:u,onTransformChange:Q});S.on("zoom",je);const Me=T1({zoomPanValues:y,panOnDrag:A,panOnScroll:U,onPaneContextMenu:W,onPanZoomEnd:f,onDraggingChange:p});S.on("end",Me);const ze=z1({panActivationKeyPressed:ue,zoomActivationKeyPressed:ce,panOnDrag:A,zoomOnScroll:ne,panOnScroll:U,zoomOnDoubleClick:re,zoomOnPinch:T,userSelectionActive:V,noPanClassName:M,noWheelClassName:J,lib:de,connectionInProgress:se});S.filter(ze),re?_.on("dblclick.zoom",E):_.on("dblclick.zoom",null)}function k(){S.on("zoom",null)}async function j(J,M,W){const V=Cu(J),U=S==null?void 0:S.constrain()(V,M,W);return U&&await N(U),U}async function L(J,M){const W=Cu(J);return await N(W,M),W}function D(J){if(_){const M=Cu(J),W=_.property("__zoom");(W.k!==J.zoom||W.x!==J.x||W.y!==J.y)&&(S==null||S.transform(_,M,null,{sync:!0}))}}function B(){const J=_?Bp(_.node()):{x:0,y:0,k:1};return{x:J.x,y:J.y,zoom:J.k}}async function H(J,M){return _?new Promise(W=>{S==null||S.interpolate((M==null?void 0:M.interpolate)==="linear"?ai:Js).scaleTo(ju(_,M==null?void 0:M.duration,M==null?void 0:M.ease,()=>W(!0)),J)}):!1}async function X(J,M){return _?new Promise(W=>{S==null||S.interpolate((M==null?void 0:M.interpolate)==="linear"?ai:Js).scaleBy(ju(_,M==null?void 0:M.duration,M==null?void 0:M.ease,()=>W(!0)),J)}):!1}function ee(J){S==null||S.scaleExtent(J)}function Z(J){S==null||S.translateExtent(J)}function te(J){const M=!Jt(J)||J<0?0:J;S==null||S.clickDistance(M)}return{update:R,destroy:k,setViewport:L,setViewportConstrained:j,getViewport:B,scaleTo:H,scaleBy:X,setScaleExtent:ee,setTranslateExtent:Z,syncViewport:D,setClickDistance:te}}var yo;(function(t){t.Line="line",t.Handle="handle"})(yo||(yo={}));function b1({width:t,prevWidth:r,height:i,prevHeight:l,affectsX:a,affectsY:u}){const d=t-r,f=i-l,p=[d>0?1:d<0?-1:0,f>0?1:f<0?-1:0];return d&&a&&(p[0]=p[0]*-1),f&&u&&(p[1]=p[1]*-1),p}function Nh(t){const r=t.includes("right")||t.includes("left"),i=t.includes("bottom")||t.includes("top"),l=t.includes("left"),a=t.includes("top");return{isHorizontal:r,isVertical:i,affectsX:l,affectsY:a}}function Qn(t,r){return Math.max(0,r-t)}function Kn(t,r){return Math.max(0,t-r)}function Qs(t,r,i){return Math.max(0,r-t,t-i)}function Ch(t,r){return t?!r:r}function A1(t,r,i,l,a,u,d,f){let{affectsX:p,affectsY:y}=r;const{isHorizontal:m,isVertical:x}=r,v=m&&x,{xSnapped:S,ySnapped:_}=i,{minWidth:C,maxWidth:E,minHeight:N,maxHeight:R}=l,{x:k,y:j,width:L,height:D,aspectRatio:B}=t;let H=Math.floor(m?S-t.pointerX:0),X=Math.floor(x?_-t.pointerY:0);const ee=L+(p?-H:H),Z=D+(y?-X:X),te=-u[0]*L,J=-u[1]*D;let M=Qs(ee,C,E),W=Qs(Z,N,R);if(d){let A=0,b=0;p&&H<0?A=Qn(k+H+te,d[0][0]):!p&&H>0&&(A=Kn(k+ee+te,d[1][0])),y&&X<0?b=Qn(j+X+J,d[0][1]):!y&&X>0&&(b=Kn(j+Z+J,d[1][1])),M=Math.max(M,A),W=Math.max(W,b)}if(f){let A=0,b=0;p&&H>0?A=Kn(k+H,f[0][0]):!p&&H<0&&(A=Qn(k+ee,f[1][0])),y&&X>0?b=Kn(j+X,f[0][1]):!y&&X<0&&(b=Qn(j+Z,f[1][1])),M=Math.max(M,A),W=Math.max(W,b)}if(a){if(m){const A=Qs(ee/B,N,R)*B;if(M=Math.max(M,A),d){let b=0;!p&&!y||p&&!y&&v?b=Kn(j+J+ee/B,d[1][1])*B:b=Qn(j+J+(p?H:-H)/B,d[0][1])*B,M=Math.max(M,b)}if(f){let b=0;!p&&!y||p&&!y&&v?b=Qn(j+ee/B,f[1][1])*B:b=Kn(j+(p?H:-H)/B,f[0][1])*B,M=Math.max(M,b)}}if(x){const A=Qs(Z*B,C,E)/B;if(W=Math.max(W,A),d){let b=0;!p&&!y||y&&!p&&v?b=Kn(k+Z*B+te,d[1][0])/B:b=Qn(k+(y?X:-X)*B+te,d[0][0])/B,W=Math.max(W,b)}if(f){let b=0;!p&&!y||y&&!p&&v?b=Qn(k+Z*B,f[1][0])/B:b=Kn(k+(y?X:-X)*B,f[0][0])/B,W=Math.max(W,b)}}}X=X+(X<0?W:-W),H=H+(H<0?M:-M),a&&(v?ee>Z*B?X=(Ch(p,y)?-H:H)/B:H=(Ch(p,y)?-X:X)*B:m?(X=H/B,y=p):(H=X*B,p=y));const V=p?k+H:k,U=y?j+X:j;return{width:L+(p?-H:H),height:D+(y?-X:X),x:u[0]*H*(p?-1:1)+V,y:u[1]*X*(y?-1:1)+U}}const xg={width:0,height:0,x:0,y:0},D1={...xg,pointerX:0,pointerY:0,aspectRatio:1};function $1(t,r,i){const l=r.position.x+t.position.x,a=r.position.y+t.position.y,u=t.measured.width??0,d=t.measured.height??0,f=i[0]*u,p=i[1]*d;return[[l-f,a-p],[l+u-f,a+d-p]]}function O1({domNode:t,nodeId:r,getStoreItems:i,onChange:l,onEnd:a}){const u=zt(t);let d={controlDirection:Nh("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function f({controlPosition:y,boundaries:m,keepAspectRatio:x,resizeDirection:v,onResizeStart:S,onResize:_,onResizeEnd:C,shouldResize:E}){let N={...xg},R={...D1};d={boundaries:m,resizeDirection:v,keepAspectRatio:x,controlDirection:Nh(y)};let k,j=null,L=[],D,B,H,X=!1;const ee=Mp().on("start",Z=>{const{nodeLookup:te,transform:J,snapGrid:M,snapToGrid:W,nodeOrigin:V,paneDomNode:U}=i();if(k=te.get(r),!k)return;j=(U==null?void 0:U.getBoundingClientRect())??null;const{xSnapped:A,ySnapped:b}=ui(Z.sourceEvent,{transform:J,snapGrid:M,snapToGrid:W,containerBounds:j});N={width:k.measured.width??0,height:k.measured.height??0,x:k.position.x??0,y:k.position.y??0},R={...N,pointerX:A,pointerY:b,aspectRatio:N.width/N.height},D=void 0,B=jr(k.extent)?k.extent:void 0,k.parentId&&(k.extent==="parent"||k.expandParent)&&(D=te.get(k.parentId)),D&&k.extent==="parent"&&(B=[[0,0],[D.measured.width,D.measured.height]]),L=[],H=void 0;for(const[F,P]of te)if(P.parentId===r&&(L.push({id:F,position:{...P.position},extent:P.extent}),P.extent==="parent"||P.expandParent)){const T=$1(P,k,P.origin??V);H?H=[[Math.min(T[0][0],H[0][0]),Math.min(T[0][1],H[0][1])],[Math.max(T[1][0],H[1][0]),Math.max(T[1][1],H[1][1])]]:H=T}S==null||S(Z,{...N})}).on("drag",Z=>{const{transform:te,snapGrid:J,snapToGrid:M,nodeOrigin:W}=i(),V=ui(Z.sourceEvent,{transform:te,snapGrid:J,snapToGrid:M,containerBounds:j}),U=[];if(!k)return;const{x:A,y:b,width:F,height:P}=N,T={},ne=k.origin??W,{width:re,height:ue,x:ce,y:de}=A1(R,d.controlDirection,V,d.boundaries,d.keepAspectRatio,ne,B,H),Q=re!==F,se=ue!==P,fe=ce!==A&&Q,ge=de!==b&&se;if(!fe&&!ge&&!Q&&!se)return;if((fe||ge||ne[0]===1||ne[1]===1)&&(T.x=fe?ce:N.x,T.y=ge?de:N.y,N.x=T.x,N.y=T.y,L.length>0)){const je=ce-A,Me=de-b;for(const ze of L)ze.position={x:ze.position.x-je+ne[0]*(re-F),y:ze.position.y-Me+ne[1]*(ue-P)},U.push(ze)}if((Q||se)&&(T.width=Q&&(!d.resizeDirection||d.resizeDirection==="horizontal")?re:N.width,T.height=se&&(!d.resizeDirection||d.resizeDirection==="vertical")?ue:N.height,N.width=T.width,N.height=T.height),D&&k.expandParent){const je=ne[0]*(T.width??0);T.x&&T.x{X&&(C==null||C(Z,{...N}),a==null||a({...N}),X=!1)});u.call(ee)}function p(){u.on(".drag",null)}return{update:f,destroy:p}}var Mu={exports:{}},Pu={},Iu={exports:{}},Ru={};/** +`+h.stack}return{value:e,source:n,stack:c,digest:null}}function Fa(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function Ha(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var g0=typeof WeakMap=="function"?WeakMap:Map;function Xd(e,n,o){o=wn(-1,o),o.tag=3,o.payload={element:null};var s=n.value;return o.callback=function(){js||(js=!0,nu=s),Ha(e,n)},o}function Gd(e,n,o){o=wn(-1,o),o.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var c=n.value;o.payload=function(){return s(c)},o.callback=function(){Ha(e,n)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(o.callback=function(){Ha(e,n),typeof s!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var w=n.stack;this.componentDidCatch(n.value,{componentStack:w!==null?w:""})}),o}function Qd(e,n,o){var s=e.pingCache;if(s===null){s=e.pingCache=new g0;var c=new Set;s.set(n,c)}else c=s.get(n),c===void 0&&(c=new Set,s.set(n,c));c.has(o)||(c.add(o),e=P0.bind(null,e,n,o),n.then(e,e))}function Kd(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function qd(e,n,o,s,c){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=wn(-1,1),n.tag=2,Hn(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var m0=j.ReactCurrentOwner,wt=!1;function gt(e,n,o,s){n.child=e===null?yd(n,null,o,s):Zr(n,e.child,o,s)}function Zd(e,n,o,s,c){o=o.render;var h=n.ref;return eo(n,c),s=Ta(e,n,o,s,h,c),o=ba(),e!==null&&!wt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,Sn(e,n,c)):(Fe&&o&&ga(n),n.flags|=1,gt(e,n,s,c),n.child)}function Jd(e,n,o,s,c){if(e===null){var h=o.type;return typeof h=="function"&&!uu(h)&&h.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=h,ef(e,n,h,s,c)):(e=bs(o.type,null,s,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,(e.lanes&c)===0){var w=h.memoizedProps;if(o=o.compare,o=o!==null?o:Ao,o(w,s)&&e.ref===n.ref)return Sn(e,n,c)}return n.flags|=1,e=Xn(h,s),e.ref=n.ref,e.return=n,n.child=e}function ef(e,n,o,s,c){if(e!==null){var h=e.memoizedProps;if(Ao(h,s)&&e.ref===n.ref)if(wt=!1,n.pendingProps=s=h,(e.lanes&c)!==0)(e.flags&131072)!==0&&(wt=!0);else return n.lanes=e.lanes,Sn(e,n,c)}return Ba(e,n,o,s,c)}function tf(e,n,o){var s=n.pendingProps,c=s.children,h=e!==null?e.memoizedState:null;if(s.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ae(oo,Tt),Tt|=o;else{if((o&1073741824)===0)return e=h!==null?h.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Ae(oo,Tt),Tt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=h!==null?h.baseLanes:o,Ae(oo,Tt),Tt|=s}else h!==null?(s=h.baseLanes|o,n.memoizedState=null):s=o,Ae(oo,Tt),Tt|=s;return gt(e,n,c,o),n.child}function nf(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function Ba(e,n,o,s,c){var h=xt(o)?ur:at.current;return h=Gr(n,h),eo(n,c),o=Ta(e,n,o,s,h,c),s=ba(),e!==null&&!wt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~c,Sn(e,n,c)):(Fe&&s&&ga(n),n.flags|=1,gt(e,n,o,c),n.child)}function rf(e,n,o,s,c){if(xt(o)){var h=!0;os(n)}else h=!1;if(eo(n,c),n.stateNode===null)_s(e,n),Wd(n,o,s),Oa(n,o,s,c),s=!0;else if(e===null){var w=n.stateNode,I=n.memoizedProps;w.props=I;var b=w.context,q=o.contextType;typeof q=="object"&&q!==null?q=Ot(q):(q=xt(o)?ur:at.current,q=Gr(n,q));var ie=o.getDerivedStateFromProps,le=typeof ie=="function"||typeof w.getSnapshotBeforeUpdate=="function";le||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(I!==s||b!==q)&&Yd(n,w,s,q),Fn=!1;var oe=n.memoizedState;w.state=oe,hs(n,s,w,c),b=n.memoizedState,I!==s||oe!==b||vt.current||Fn?(typeof ie=="function"&&($a(n,o,ie,s),b=n.memoizedState),(I=Fn||Ud(n,o,I,s,oe,b,q))?(le||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(n.flags|=4194308)):(typeof w.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=b),w.props=s,w.state=b,w.context=q,s=I):(typeof w.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{w=n.stateNode,xd(e,n),I=n.memoizedProps,q=n.type===n.elementType?I:Xt(n.type,I),w.props=q,le=n.pendingProps,oe=w.context,b=o.contextType,typeof b=="object"&&b!==null?b=Ot(b):(b=xt(o)?ur:at.current,b=Gr(n,b));var he=o.getDerivedStateFromProps;(ie=typeof he=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(I!==le||oe!==b)&&Yd(n,w,s,b),Fn=!1,oe=n.memoizedState,w.state=oe,hs(n,s,w,c);var ve=n.memoizedState;I!==le||oe!==ve||vt.current||Fn?(typeof he=="function"&&($a(n,o,he,s),ve=n.memoizedState),(q=Fn||Ud(n,o,q,s,oe,ve,b)||!1)?(ie||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(s,ve,b),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(s,ve,b)),typeof w.componentDidUpdate=="function"&&(n.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof w.componentDidUpdate!="function"||I===e.memoizedProps&&oe===e.memoizedState||(n.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&oe===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=ve),w.props=s,w.state=ve,w.context=b,s=q):(typeof w.componentDidUpdate!="function"||I===e.memoizedProps&&oe===e.memoizedState||(n.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||I===e.memoizedProps&&oe===e.memoizedState||(n.flags|=1024),s=!1)}return Va(e,n,o,s,h,c)}function Va(e,n,o,s,c,h){nf(e,n);var w=(n.flags&128)!==0;if(!s&&!w)return c&&ad(n,o,!1),Sn(e,n,h);s=n.stateNode,m0.current=n;var I=w&&typeof o.getDerivedStateFromError!="function"?null:s.render();return n.flags|=1,e!==null&&w?(n.child=Zr(n,e.child,null,h),n.child=Zr(n,null,I,h)):gt(e,n,I,h),n.memoizedState=s.state,c&&ad(n,o,!0),n.child}function of(e){var n=e.stateNode;n.pendingContext?sd(e,n.pendingContext,n.pendingContext!==n.context):n.context&&sd(e,n.context,!1),Ca(e,n.containerInfo)}function sf(e,n,o,s,c){return qr(),xa(c),n.flags|=256,gt(e,n,o,s),n.child}var Ua={dehydrated:null,treeContext:null,retryLane:0};function Wa(e){return{baseLanes:e,cachePool:null,transitions:null}}function lf(e,n,o){var s=n.pendingProps,c=Be.current,h=!1,w=(n.flags&128)!==0,I;if((I=w)||(I=e!==null&&e.memoizedState===null?!1:(c&2)!==0),I?(h=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),Ae(Be,c&1),e===null)return va(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(w=s.children,e=s.fallback,h?(s=n.mode,h=n.child,w={mode:"hidden",children:w},(s&1)===0&&h!==null?(h.childLanes=0,h.pendingProps=w):h=zs(w,s,0,null),e=xr(e,s,o,null),h.return=n,e.return=n,h.sibling=e,n.child=h,n.child.memoizedState=Wa(o),n.memoizedState=Ua,e):Ya(n,w));if(c=e.memoizedState,c!==null&&(I=c.dehydrated,I!==null))return y0(e,n,w,s,I,c,o);if(h){h=s.fallback,w=n.mode,c=e.child,I=c.sibling;var b={mode:"hidden",children:s.children};return(w&1)===0&&n.child!==c?(s=n.child,s.childLanes=0,s.pendingProps=b,n.deletions=null):(s=Xn(c,b),s.subtreeFlags=c.subtreeFlags&14680064),I!==null?h=Xn(I,h):(h=xr(h,w,o,null),h.flags|=2),h.return=n,s.return=n,s.sibling=h,n.child=s,s=h,h=n.child,w=e.child.memoizedState,w=w===null?Wa(o):{baseLanes:w.baseLanes|o,cachePool:null,transitions:w.transitions},h.memoizedState=w,h.childLanes=e.childLanes&~o,n.memoizedState=Ua,s}return h=e.child,e=h.sibling,s=Xn(h,{mode:"visible",children:s.children}),(n.mode&1)===0&&(s.lanes=o),s.return=n,s.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=s,n.memoizedState=null,s}function Ya(e,n){return n=zs({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Ss(e,n,o,s){return s!==null&&xa(s),Zr(n,e.child,null,o),e=Ya(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function y0(e,n,o,s,c,h,w){if(o)return n.flags&256?(n.flags&=-257,s=Fa(Error(i(422))),Ss(e,n,w,s)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(h=s.fallback,c=n.mode,s=zs({mode:"visible",children:s.children},c,0,null),h=xr(h,c,w,null),h.flags|=2,s.return=n,h.return=n,s.sibling=h,n.child=s,(n.mode&1)!==0&&Zr(n,e.child,null,w),n.child.memoizedState=Wa(w),n.memoizedState=Ua,h);if((n.mode&1)===0)return Ss(e,n,w,null);if(c.data==="$!"){if(s=c.nextSibling&&c.nextSibling.dataset,s)var I=s.dgst;return s=I,h=Error(i(419)),s=Fa(h,s,void 0),Ss(e,n,w,s)}if(I=(w&e.childLanes)!==0,wt||I){if(s=tt,s!==null){switch(w&-w){case 4:c=2;break;case 16:c=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:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(s.suspendedLanes|w))!==0?0:c,c!==0&&c!==h.retryLane&&(h.retryLane=c,xn(e,c),Kt(s,e,c,-1))}return au(),s=Fa(Error(i(421))),Ss(e,n,w,s)}return c.data==="$?"?(n.flags|=128,n.child=e.child,n=I0.bind(null,e),c._reactRetry=n,null):(e=h.treeContext,Rt=An(c.nextSibling),It=n,Fe=!0,Yt=null,e!==null&&(Dt[$t++]=yn,Dt[$t++]=vn,Dt[$t++]=cr,yn=e.id,vn=e.overflow,cr=n),n=Ya(n,s.children),n.flags|=4096,n)}function af(e,n,o){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),ka(e.return,n,o)}function Xa(e,n,o,s,c){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:c}:(h.isBackwards=n,h.rendering=null,h.renderingStartTime=0,h.last=s,h.tail=o,h.tailMode=c)}function uf(e,n,o){var s=n.pendingProps,c=s.revealOrder,h=s.tail;if(gt(e,n,s.children,o),s=Be.current,(s&2)!==0)s=s&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&af(e,o,n);else if(e.tag===19)af(e,o,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}s&=1}if(Ae(Be,s),(n.mode&1)===0)n.memoizedState=null;else switch(c){case"forwards":for(o=n.child,c=null;o!==null;)e=o.alternate,e!==null&&ps(e)===null&&(c=o),o=o.sibling;o=c,o===null?(c=n.child,n.child=null):(c=o.sibling,o.sibling=null),Xa(n,!1,c,o,h);break;case"backwards":for(o=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&ps(e)===null){n.child=c;break}e=c.sibling,c.sibling=o,o=c,c=e}Xa(n,!0,o,null,h);break;case"together":Xa(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function _s(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Sn(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),gr|=n.lanes,(o&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(i(153));if(n.child!==null){for(e=n.child,o=Xn(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=Xn(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function v0(e,n,o){switch(n.tag){case 3:of(n),qr();break;case 5:_d(n);break;case 1:xt(n.type)&&os(n);break;case 4:Ca(n,n.stateNode.containerInfo);break;case 10:var s=n.type._context,c=n.memoizedProps.value;Ae(cs,s._currentValue),s._currentValue=c;break;case 13:if(s=n.memoizedState,s!==null)return s.dehydrated!==null?(Ae(Be,Be.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?lf(e,n,o):(Ae(Be,Be.current&1),e=Sn(e,n,o),e!==null?e.sibling:null);Ae(Be,Be.current&1);break;case 19:if(s=(o&n.childLanes)!==0,(e.flags&128)!==0){if(s)return uf(e,n,o);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Ae(Be,Be.current),s)break;return null;case 22:case 23:return n.lanes=0,tf(e,n,o)}return Sn(e,n,o)}var cf,Ga,df,ff;cf=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Ga=function(){},df=function(e,n,o,s){var c=e.memoizedProps;if(c!==s){e=n.stateNode,hr(ln.current);var h=null;switch(o){case"input":c=Ce(e,c),s=Ce(e,s),h=[];break;case"select":c=F({},c,{value:void 0}),s=F({},s,{value:void 0}),h=[];break;case"textarea":c=Vt(e,c),s=Vt(e,s),h=[];break;default:typeof c.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=ts)}jn(o,s);var w;o=null;for(q in c)if(!s.hasOwnProperty(q)&&c.hasOwnProperty(q)&&c[q]!=null)if(q==="style"){var I=c[q];for(w in I)I.hasOwnProperty(w)&&(o||(o={}),o[w]="")}else q!=="dangerouslySetInnerHTML"&&q!=="children"&&q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&q!=="autoFocus"&&(a.hasOwnProperty(q)?h||(h=[]):(h=h||[]).push(q,null));for(q in s){var b=s[q];if(I=c!=null?c[q]:void 0,s.hasOwnProperty(q)&&b!==I&&(b!=null||I!=null))if(q==="style")if(I){for(w in I)!I.hasOwnProperty(w)||b&&b.hasOwnProperty(w)||(o||(o={}),o[w]="");for(w in b)b.hasOwnProperty(w)&&I[w]!==b[w]&&(o||(o={}),o[w]=b[w])}else o||(h||(h=[]),h.push(q,o)),o=b;else q==="dangerouslySetInnerHTML"?(b=b?b.__html:void 0,I=I?I.__html:void 0,b!=null&&I!==b&&(h=h||[]).push(q,b)):q==="children"?typeof b!="string"&&typeof b!="number"||(h=h||[]).push(q,""+b):q!=="suppressContentEditableWarning"&&q!=="suppressHydrationWarning"&&(a.hasOwnProperty(q)?(b!=null&&q==="onScroll"&&De("scroll",e),h||I===b||(h=[])):(h=h||[]).push(q,b))}o&&(h=h||[]).push("style",o);var q=h;(n.updateQueue=q)&&(n.flags|=4)}},ff=function(e,n,o,s){o!==s&&(n.flags|=4)};function qo(e,n){if(!Fe)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function ct(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,s=0;if(n)for(var c=e.child;c!==null;)o|=c.lanes|c.childLanes,s|=c.subtreeFlags&14680064,s|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)o|=c.lanes|c.childLanes,s|=c.subtreeFlags,s|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=s,e.childLanes=o,n}function x0(e,n,o){var s=n.pendingProps;switch(ma(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ct(n),null;case 1:return xt(n.type)&&rs(),ct(n),null;case 3:return s=n.stateNode,to(),$e(vt),$e(at),Pa(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(as(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Yt!==null&&(iu(Yt),Yt=null))),Ga(e,n),ct(n),null;case 5:ja(n);var c=hr(Yo.current);if(o=n.type,e!==null&&n.stateNode!=null)df(e,n,o,s,c),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!s){if(n.stateNode===null)throw Error(i(166));return ct(n),null}if(e=hr(ln.current),as(n)){s=n.stateNode,o=n.type;var h=n.memoizedProps;switch(s[sn]=n,s[Ho]=h,e=(n.mode&1)!==0,o){case"dialog":De("cancel",s),De("close",s);break;case"iframe":case"object":case"embed":De("load",s);break;case"video":case"audio":for(c=0;c<$o.length;c++)De($o[c],s);break;case"source":De("error",s);break;case"img":case"image":case"link":De("error",s),De("load",s);break;case"details":De("toggle",s);break;case"input":je(s,h),De("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!h.multiple},De("invalid",s);break;case"textarea":Lt(s,h),De("invalid",s)}jn(o,h),c=null;for(var w in h)if(h.hasOwnProperty(w)){var I=h[w];w==="children"?typeof I=="string"?s.textContent!==I&&(h.suppressHydrationWarning!==!0&&es(s.textContent,I,e),c=["children",I]):typeof I=="number"&&s.textContent!==""+I&&(h.suppressHydrationWarning!==!0&&es(s.textContent,I,e),c=["children",""+I]):a.hasOwnProperty(w)&&I!=null&&w==="onScroll"&&De("scroll",s)}switch(o){case"input":ge(s),Xe(s,h,!0);break;case"textarea":ge(s),lt(s);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(s.onclick=ts)}s=c,n.updateQueue=s,s!==null&&(n.flags|=4)}else{w=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=ht(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=w.createElement("div"),e.innerHTML=" - + +
diff --git a/ui/index.html b/ui/index.html index 41e4d2c..423f8bc 100644 --- a/ui/index.html +++ b/ui/index.html @@ -9,7 +9,7 @@ try { var t = localStorage.getItem("loadpath.theme"); if (t) document.documentElement.setAttribute("data-theme", t); - var light = { paper: 1, "solarized-light": 1, seafoam: 1, "high-contrast": 1 }; + var light = { paper: 1, "solarized-light": 1, seafoam: 1, "high-contrast": 1, sakura: 1, citrus: 1, peach: 1, candy: 1, sky: 1, coral: 1 }; document.documentElement.style.colorScheme = light[t] ? "light" : "dark"; } catch (e) {} })(); diff --git a/ui/src/App.tsx b/ui/src/App.tsx index 5f9b251..485e2dd 100644 --- a/ui/src/App.tsx +++ b/ui/src/App.tsx @@ -370,10 +370,14 @@ export function App() { value={theme} onChange={(e) => persistTheme(e.target.value as ThemeId)} > - {THEMES.map((t) => ( - + {(["dark", "light"] as const).map((group) => ( + + {THEMES.filter((t) => t.group === group).map((t) => ( + + ))} + ))} @@ -707,10 +711,12 @@ export function App() { diff --git a/ui/src/styles.css b/ui/src/styles.css index dc2fe44..b9e511c 100644 --- a/ui/src/styles.css +++ b/ui/src/styles.css @@ -230,6 +230,180 @@ --shadow: rgba(199, 125, 255, 0.14); } +[data-theme="neon-noir"] { + --bg: #05060a; + --bg-2: #0a0c14; + --surface: #10131c; + --line: #1e2436; + --ink: #f0f4ff; + --muted: #8b93b0; + --high: #39ff88; + --medium: #ffe66d; + --low: #ff2d95; + --critical: #ff3d5a; + --accent: #00f0ff; + --rail-from: #0a0c14; + --rail-to: #05060a; + --rail-active: #151a2a; + --btn: #151a2a; + --btn-line: #00f0ff; + --btn-primary: #063a40; + --btn-primary-line: #00f0ff; + --node-bg: #0a0c14; + --node-line: #2a3550; + --graph-bg: #05060a; + --graph-grid: rgba(0, 240, 255, 0.12); + --edge-cheap: #3a4560; + --edge-expensive: #ff2d95; + --edge-critical: #ff3d5a; + --shadow: rgba(0, 240, 255, 0.22); +} + +[data-theme="synthwave"] { + --bg: #1a0a2e; + --bg-2: #240b3d; + --surface: #2d1250; + --line: #4a1d7a; + --ink: #ffe6fb; + --muted: #c49ad8; + --high: #00f5d4; + --medium: #ffd60a; + --low: #ff6b9d; + --critical: #ff006e; + --accent: #ff2bd6; + --rail-from: #240b3d; + --rail-to: #1a0a2e; + --rail-active: #3a1570; + --btn: #3a1570; + --btn-line: #ff2bd6; + --btn-primary: #5a0a4a; + --btn-primary-line: #ff2bd6; + --node-bg: #240b3d; + --node-line: #7b2cbf; + --graph-bg: #1a0a2e; + --graph-grid: rgba(255, 43, 214, 0.16); + --edge-cheap: #5a3a80; + --edge-expensive: #ff9e00; + --edge-critical: #ff006e; + --shadow: rgba(255, 43, 214, 0.24); +} + +[data-theme="phosphor"] { + --bg: #020804; + --bg-2: #061208; + --surface: #0a1a0e; + --line: #163c1e; + --ink: #c8ffc8; + --muted: #5aaa5a; + --high: #39ff14; + --medium: #c8f542; + --low: #ffb000; + --critical: #ff5e00; + --accent: #00ff66; + --rail-from: #061208; + --rail-to: #020804; + --rail-active: #0e2414; + --btn: #0e2414; + --btn-line: #00ff66; + --btn-primary: #0a3a18; + --btn-primary-line: #00ff66; + --node-bg: #061208; + --node-line: #1e6a32; + --graph-bg: #020804; + --graph-grid: rgba(0, 255, 102, 0.12); + --edge-cheap: #1e5a2a; + --edge-expensive: #c8f542; + --edge-critical: #ff5e00; + --shadow: rgba(0, 255, 102, 0.2); +} + +[data-theme="aurora"] { + --bg: #071018; + --bg-2: #0c1c28; + --surface: #122636; + --line: #1e3d52; + --ink: #e8fff6; + --muted: #7eb8a8; + --high: #5fffcf; + --medium: #ffe566; + --low: #ff7eb6; + --critical: #ff4d6d; + --accent: #7cffb2; + --rail-from: #0c1c28; + --rail-to: #071018; + --rail-active: #163044; + --btn: #163044; + --btn-line: #7cffb2; + --btn-primary: #0e3d3a; + --btn-primary-line: #7cffb2; + --node-bg: #0c1c28; + --node-line: #2a6a78; + --graph-bg: #071018; + --graph-grid: rgba(124, 255, 178, 0.12); + --edge-cheap: #2a5a68; + --edge-expensive: #c9a0ff; + --edge-critical: #ff4d6d; + --shadow: rgba(124, 255, 178, 0.18); +} + +[data-theme="biolume"] { + --bg: #02141c; + --bg-2: #042430; + --surface: #073040; + --line: #0a4a5c; + --ink: #e6fffb; + --muted: #6eb8b0; + --high: #5dffb0; + --medium: #ffe066; + --low: #ff79c6; + --critical: #ff4d6d; + --accent: #18e7d4; + --rail-from: #042430; + --rail-to: #02141c; + --rail-active: #0a3848; + --btn: #0a3848; + --btn-line: #18e7d4; + --btn-primary: #0a4a48; + --btn-primary-line: #18e7d4; + --node-bg: #042430; + --node-line: #1a7080; + --graph-bg: #02141c; + --graph-grid: rgba(24, 231, 212, 0.12); + --edge-cheap: #1a5a68; + --edge-expensive: #ff79c6; + --edge-critical: #ff4d6d; + --shadow: rgba(24, 231, 212, 0.2); +} + +[data-theme="carbon"] { + --bg: #0d0d0f; + --bg-2: #16161a; + --surface: #1e1e24; + --line: #33333c; + --ink: #f2f2f4; + --muted: #9a9aa8; + --high: #3dd68c; + --medium: #f0c040; + --low: #ff5a5a; + --critical: #ff2a2a; + --accent: #ff2a2a; + --rail-from: #16161a; + --rail-to: #0d0d0f; + --rail-active: #24242c; + --btn: #24242c; + --btn-line: #ff2a2a; + --btn-primary: #4a1212; + --btn-primary-line: #ff2a2a; + --node-bg: #16161a; + --node-line: #4a4a55; + --graph-bg: #0d0d0f; + --graph-grid: rgba(255, 42, 42, 0.1); + --edge-cheap: #4a4a55; + --edge-expensive: #ff8a3d; + --edge-critical: #ff2a2a; + --shadow: rgba(255, 42, 42, 0.18); +} + [data-theme="paper"] { --bg: #f6f1e8; --bg-2: #efe6d6; @@ -346,6 +520,180 @@ --shadow: rgba(0, 0, 0, 0.12); } +[data-theme="sakura"] { + --bg: #fff0f5; + --bg-2: #ffe4ee; + --surface: #fff7fa; + --line: #f5b8cc; + --ink: #4a1830; + --muted: #a05a78; + --high: #1a8a5c; + --medium: #c48a14; + --low: #d63d6e; + --critical: #b01040; + --accent: #e84a8a; + --rail-from: #ffe4ee; + --rail-to: #f8d4e0; + --rail-active: #f5c8d8; + --btn: #fff7fa; + --btn-line: #e89ab0; + --btn-primary: #ffd6e6; + --btn-primary-line: #e84a8a; + --node-bg: #fff7fa; + --node-line: #e89ab0; + --graph-bg: #fff0f5; + --graph-grid: rgba(232, 74, 138, 0.12); + --edge-cheap: #d4a0b0; + --edge-expensive: #d63d6e; + --edge-critical: #b01040; + --shadow: rgba(74, 24, 48, 0.1); +} + +[data-theme="citrus"] { + --bg: #fffce8; + --bg-2: #fff3b0; + --surface: #fffef5; + --line: #e8d44a; + --ink: #2a2a08; + --muted: #6a6a20; + --high: #2a8a20; + --medium: #d4a000; + --low: #e85d04; + --critical: #c0392b; + --accent: #5aad14; + --rail-from: #fff3b0; + --rail-to: #ffe98a; + --rail-active: #ffe066; + --btn: #fffef5; + --btn-line: #d4c030; + --btn-primary: #e8f5b8; + --btn-primary-line: #5aad14; + --node-bg: #fffef5; + --node-line: #d4c030; + --graph-bg: #fffce8; + --graph-grid: rgba(90, 173, 20, 0.14); + --edge-cheap: #c4b040; + --edge-expensive: #e85d04; + --edge-critical: #c0392b; + --shadow: rgba(42, 42, 8, 0.1); +} + +[data-theme="peach"] { + --bg: #fff3eb; + --bg-2: #ffe0cc; + --surface: #fffaf6; + --line: #f0c4a8; + --ink: #3a2218; + --muted: #8a5a48; + --high: #2a8a5c; + --medium: #d48a14; + --low: #e85d3a; + --critical: #c0392b; + --accent: #ff6b35; + --rail-from: #ffe0cc; + --rail-to: #ffd4b8; + --rail-active: #ffc8a8; + --btn: #fffaf6; + --btn-line: #e8a888; + --btn-primary: #ffe0cc; + --btn-primary-line: #ff6b35; + --node-bg: #fffaf6; + --node-line: #e8a888; + --graph-bg: #fff3eb; + --graph-grid: rgba(255, 107, 53, 0.12); + --edge-cheap: #d4a088; + --edge-expensive: #e85d3a; + --edge-critical: #c0392b; + --shadow: rgba(58, 34, 24, 0.1); +} + +[data-theme="candy"] { + --bg: #f4f0ff; + --bg-2: #e8dcff; + --surface: #fbf8ff; + --line: #d4c0f0; + --ink: #2a1848; + --muted: #6a5890; + --high: #1a8a6a; + --medium: #c48a14; + --low: #e84a8a; + --critical: #c01060; + --accent: #ff5eb1; + --rail-from: #e8dcff; + --rail-to: #ddd0ff; + --rail-active: #d4c4ff; + --btn: #fbf8ff; + --btn-line: #c4a8e8; + --btn-primary: #ffd6ec; + --btn-primary-line: #ff5eb1; + --node-bg: #fbf8ff; + --node-line: #c4a8e8; + --graph-bg: #f4f0ff; + --graph-grid: rgba(255, 94, 177, 0.14); + --edge-cheap: #b0a0d0; + --edge-expensive: #e84a8a; + --edge-critical: #c01060; + --shadow: rgba(42, 24, 72, 0.1); +} + +[data-theme="sky"] { + --bg: #e8f4ff; + --bg-2: #cfe8ff; + --surface: #f5faff; + --line: #90c8f0; + --ink: #0a2848; + --muted: #3a6080; + --high: #0a8a4a; + --medium: #c48a14; + --low: #e85d3a; + --critical: #c0392b; + --accent: #0077ff; + --rail-from: #cfe8ff; + --rail-to: #b8dcff; + --rail-active: #a8d4ff; + --btn: #f5faff; + --btn-line: #70b0e0; + --btn-primary: #cfe8ff; + --btn-primary-line: #0077ff; + --node-bg: #f5faff; + --node-line: #70b0e0; + --graph-bg: #e8f4ff; + --graph-grid: rgba(0, 119, 255, 0.12); + --edge-cheap: #80b0d0; + --edge-expensive: #e85d3a; + --edge-critical: #c0392b; + --shadow: rgba(10, 40, 72, 0.1); +} + +[data-theme="coral"] { + --bg: #fff1ee; + --bg-2: #ffddd6; + --surface: #fff8f6; + --line: #f0b0a4; + --ink: #3a1814; + --muted: #8a5048; + --high: #0d9488; + --medium: #d48a14; + --low: #e85d4a; + --critical: #c0392b; + --accent: #0d9488; + --rail-from: #ffddd6; + --rail-to: #ffd0c6; + --rail-active: #ffc4b8; + --btn: #fff8f6; + --btn-line: #e89888; + --btn-primary: #d4f4ee; + --btn-primary-line: #0d9488; + --node-bg: #fff8f6; + --node-line: #e89888; + --graph-bg: #fff1ee; + --graph-grid: rgba(13, 148, 136, 0.14); + --edge-cheap: #d4a098; + --edge-expensive: #e85d4a; + --edge-critical: #c0392b; + --shadow: rgba(58, 24, 20, 0.1); +} + * { box-sizing: border-box; } html, body, #root { height: 100%; margin: 0; } :root { @@ -1071,15 +1419,23 @@ h2 { font-size: 13px; margin: 0; font-weight: 600; } .theme-swatch { border: 1px solid var(--line); background: var(--bg); + color: var(--ink); border-radius: var(--radius); padding: 10px; text-align: left; cursor: pointer; height: auto; + box-shadow: 0 1px 8px var(--shadow); } .theme-swatch.active { border-color: var(--accent); - box-shadow: 0 0 0 1px var(--accent); + box-shadow: 0 0 0 1px var(--accent), 0 1px 8px var(--shadow); +} +.theme-swatch .swatch-bar { + height: 6px; + border-radius: 3px; + margin-bottom: 8px; + background: linear-gradient(90deg, var(--accent), var(--high), var(--medium), var(--low)); } .theme-swatch .name { font-size: 13px; font-weight: 600; } .theme-swatch .group { font-size: 11px; color: var(--muted); } diff --git a/ui/src/themes.test.ts b/ui/src/themes.test.ts index 1159cf9..4003fa5 100644 --- a/ui/src/themes.test.ts +++ b/ui/src/themes.test.ts @@ -1,15 +1,40 @@ +import { readFileSync } from "node:fs"; +import { dirname, join } from "node:path"; +import { fileURLToPath } from "node:url"; import { describe, expect, it } from "vitest"; import { THEMES, colorSchemeFor, isThemeId } from "./themes"; +const here = dirname(fileURLToPath(import.meta.url)); +const css = readFileSync(join(here, "styles.css"), "utf8"); +const boot = readFileSync(join(here, "../index.html"), "utf8"); + describe("themes", () => { - it("ships a dozen named palettes", () => { - expect(THEMES.length).toBeGreaterThanOrEqual(12); + it("ships two dozen named palettes", () => { + expect(THEMES).toHaveLength(24); + expect(new Set(THEMES.map((t) => t.id)).size).toBe(24); + expect(THEMES.filter((t) => t.group === "dark")).toHaveLength(14); + expect(THEMES.filter((t) => t.group === "light")).toHaveLength(10); expect(THEMES.some((t) => t.id === "obsidian")).toBe(true); - expect(THEMES.some((t) => t.group === "light")).toBe(true); - expect(THEMES.some((t) => t.group === "dark")).toBe(true); expect(isThemeId("nord")).toBe(true); + expect(isThemeId("synthwave")).toBe(true); + expect(isThemeId("citrus")).toBe(true); expect(isThemeId("not-a-theme")).toBe(false); expect(colorSchemeFor("obsidian")).toBe("dark"); + expect(colorSchemeFor("neon-noir")).toBe("dark"); expect(colorSchemeFor("paper")).toBe("light"); + expect(colorSchemeFor("sakura")).toBe("light"); + }); + + it("has CSS tokens and a boot-script color-scheme for every palette", () => { + const lightBoot = boot.match(/var light = \{([^}]+)\}/)?.[1] ?? ""; + expect(lightBoot).toBeTruthy(); + for (const theme of THEMES) { + expect(css).toContain(`[data-theme="${theme.id}"]`); + if (theme.group === "light") { + expect(lightBoot).toContain(theme.id); + } else { + expect(lightBoot).not.toContain(theme.id); + } + } }); }); diff --git a/ui/src/themes.ts b/ui/src/themes.ts index 91916f5..750d3cf 100644 --- a/ui/src/themes.ts +++ b/ui/src/themes.ts @@ -10,7 +10,19 @@ export type ThemeId = | "amber" | "seafoam" | "volcano" - | "lavender"; + | "lavender" + | "neon-noir" + | "synthwave" + | "phosphor" + | "aurora" + | "biolume" + | "carbon" + | "sakura" + | "citrus" + | "peach" + | "candy" + | "sky" + | "coral"; export type Theme = { id: ThemeId; label: string; group: "dark" | "light" }; @@ -23,10 +35,22 @@ export const THEMES: Theme[] = [ { id: "amber", label: "Midnight Amber", group: "dark" }, { id: "volcano", label: "Volcano", group: "dark" }, { id: "lavender", label: "Lavender", group: "dark" }, + { id: "neon-noir", label: "Neon Noir", group: "dark" }, + { id: "synthwave", label: "Synthwave", group: "dark" }, + { id: "phosphor", label: "Phosphor", group: "dark" }, + { id: "aurora", label: "Aurora", group: "dark" }, + { id: "biolume", label: "Biolume", group: "dark" }, + { id: "carbon", label: "Carbon", group: "dark" }, { id: "paper", label: "Paper", group: "light" }, { id: "solarized-light", label: "Solarized Light", group: "light" }, { id: "seafoam", label: "Seafoam", group: "light" }, { id: "high-contrast", label: "High Contrast", group: "light" }, + { id: "sakura", label: "Sakura", group: "light" }, + { id: "citrus", label: "Citrus", group: "light" }, + { id: "peach", label: "Peach Fuzz", group: "light" }, + { id: "candy", label: "Cotton Candy", group: "light" }, + { id: "sky", label: "Clear Sky", group: "light" }, + { id: "coral", label: "Coral Reef", group: "light" }, ]; export const DEFAULT_THEME: ThemeId = "obsidian";