1/*! For license information please see 9117.ac5bee66.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkinsta_automate=self.webpackChunkinsta_automate||[]).push([[9117],{28553:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"}}]},name:"align-left",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},23209:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M945 412H689c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h256c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM811 548H689c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h122c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM477.3 322.5H434c-6.2 0-11.2 5-11.2 11.2v248c0 3.6 1.7 6.9 4.6 9l148.9 108.6c5 3.6 12 2.6 15.6-2.4l25.7-35.1v-.1c3.6-5 2.5-12-2.5-15.6l-126.7-91.6V333.7c.1-6.2-5-11.2-11.1-11.2z"}},{tag:"path",attrs:{d:"M804.8 673.9H747c-5.6 0-10.9 2.9-13.9 7.7a321 321 0 01-44.5 55.7 317.17 317.17 0 01-101.3 68.3c-39.3 16.6-81 25-124 25-43.1 0-84.8-8.4-124-25-37.9-16-72-39-101.3-68.3s-52.3-63.4-68.3-101.3c-16.6-39.2-25-80.9-25-124 0-43.1 8.4-84.7 25-124 16-37.9 39-72 68.3-101.3 29.3-29.3 63.4-52.3 101.3-68.3 39.2-16.6 81-25 124-25 43.1 0 84.8 8.4 124 25 37.9 16 72 39 101.3 68.3a321 321 0 0144.5 55.7c3 4.8 8.3 7.7 13.9 7.7h57.8c6.9 0 11.3-7.2 8.2-13.3-65.2-129.7-197.4-214-345-215.7-216.1-2.7-395.6 174.2-396 390.1C71.6 727.5 246.9 903 463.2 903c149.5 0 283.9-84.6 349.8-215.8a9.18 9.18 0 00-8.2-13.3z"}}]},name:"field-time",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},15918:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 816H120c-4.4 0-8 3.6-8 8v80c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-80c0-4.4-3.6-8-8-8zm-650.3-80h85c4.2 0 8-2.7 9.3-6.8l53.7-166h219.2l53.2 166c1.3 4 5 6.8 9.3 6.8h89.1c1.1 0 2.2-.2 3.2-.5a9.7 9.7 0 006-12.4L573.6 118.6a9.9 9.9 0 00-9.2-6.6H462.1c-4.2 0-7.9 2.6-9.2 6.6L244.5 723.1c-.4 1-.5 2.1-.5 3.2-.1 5.3 4.3 9.7 9.7 9.7zm255.9-516.1h4.1l83.8 263.8H424.9l84.7-263.8z"}}]},name:"font-colors",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},50849:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M920 416H616c-4.4 0-8 3.6-8 8v112c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-56h60v320h-46c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h164c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8h-46V480h60v56c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V424c0-4.4-3.6-8-8-8zM656 296V168c0-4.4-3.6-8-8-8H104c-4.4 0-8 3.6-8 8v128c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-64h168v560h-92c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8h-92V232h168v64c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8z"}}]},name:"font-size",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},56509:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M752 100c-61.8 0-112 50.2-112 112 0 47.7 29.9 88.5 72 104.6v27.6L512 601.4 312 344.2v-27.6c42.1-16.1 72-56.9 72-104.6 0-61.8-50.2-112-112-112s-112 50.2-112 112c0 50.6 33.8 93.5 80 107.3v34.4c0 9.7 3.3 19.3 9.3 27L476 672.3v33.6c-44.2 15-76 56.9-76 106.1 0 61.8 50.2 112 112 112s112-50.2 112-112c0-49.2-31.8-91-76-106.1v-33.6l226.7-291.6c6-7.7 9.3-17.3 9.3-27v-34.4c46.2-13.8 80-56.7 80-107.3 0-61.8-50.2-112-112-112zM224 212a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm336 600a48.01 48.01 0 01-96 0 48.01 48.01 0 0196 0zm192-552a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"fork",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},46011:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M946.5 505L560.1 118.8l-25.9-25.9a31.5 31.5 0 00-44.4 0L77.5 505a63.9 63.9 0 00-18.8 46c.4 35.2 29.7 63.3 64.9 63.3h42.5V940h691.8V614.3h43.4c17.1 0 33.2-6.7 45.3-18.8a63.6 63.6 0 0018.7-45.3c0-17-6.7-33.1-18.8-45.2zM568 868H456V664h112v204zm217.9-325.7V868H632V640c0-22.1-17.9-40-40-40H432c-22.1 0-40 17.9-40 40v228H238.1V542.3h-96l370-369.7 23.1 23.1L882 542.3h-96.1z"}}]},name:"home",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)}
2,73139:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 378.7c-73.4 0-133.3 59.9-133.3 133.3S438.6 645.3 512 645.3 645.3 585.4 645.3 512 585.4 378.7 512 378.7zM911.8 512c0-55.2.5-109.9-2.6-165-3.1-64-17.7-120.8-64.5-167.6-46.9-46.9-103.6-61.4-167.6-64.5-55.2-3.1-109.9-2.6-165-2.6-55.2 0-109.9-.5-165 2.6-64 3.1-120.8 17.7-167.6 64.5C132.6 226.3 118.1 283 115 347c-3.1 55.2-2.6 109.9-2.6 165s-.5 109.9 2.6 165c3.1 64 17.7 120.8 64.5 167.6 46.9 46.9 103.6 61.4 167.6 64.5 55.2 3.1 109.9 2.6 165 2.6 55.2 0 109.9.5 165-2.6 64-3.1 120.8-17.7 167.6-64.5 46.9-46.9 61.4-103.6 64.5-167.6 3.2-55.1 2.6-109.8 2.6-165zM512 717.1c-113.5 0-205.1-91.6-205.1-205.1S398.5 306.9 512 306.9 717.1 398.5 717.1 512 625.5 717.1 512 717.1zm213.5-370.7c-26.5 0-47.9-21.4-47.9-47.9s21.4-47.9 47.9-47.9 47.9 21.4 47.9 47.9a47.84 47.84 0 01-47.9 47.9z"}}]},name:"instagram",theme:"filled"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},65178:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M248 752h72V264h-72z"}},{tag:"path",attrs:{d:"M740 863c61.86 0 112-50.14 112-112 0-48.33-30.6-89.5-73.5-105.2l-.01-113.04a50.73 50.73 0 00-34.95-48.2l-434.9-142.41-22.4 68.42 420.25 137.61.01 95.92C661 658.34 628 700.8 628 751c0 61.86 50.14 112 112 112m-456 61c61.86 0 112-50.14 112-112s-50.14-112-112-112-112 50.14-112 112 50.14 112 112 112m456-125a48 48 0 110-96 48 48 0 010 96m-456 61a48 48 0 110-96 48 48 0 010 96m0-536c61.86 0 112-50.14 112-112s-50.14-112-112-112-112 50.14-112 112 50.14 112 112 112m0-64a48 48 0 110-96 48 48 0 010 96"}}]},name:"merge",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},77848:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 394c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H400V152c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v166H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v236H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h168v166c0 4.4 3.6 8 8 8h64c4.4
20 8-3.6 8-8V706h228v166c0 4.4 3.6 8 8 8h64c4.4 0 8-3.6 8-8V706h164c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8H708V394h164zM628 630H400V394h228v236z"}}]},name:"number",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},99519:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M952 792H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-632H72c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h880c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM848 660c8.8 0 16-7.2 16-16V380c0-8.8-7.2-16-16-16H176c-8.8 0-16 7.2-16 16v264c0 8.8 7.2 16 16 16h672zM232 436h560v152H232V436z"}}]},name:"pic-center",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},45565:(e,t,n)=>{n.d(t,{A:()=>s});var o=n(58168),i=n(65043);const r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M938 458.8l-29.6-312.6c-1.5-16.2-14.4-29-30.6-30.6L565.2 86h-.4c-3.2 0-5.7 1-7.6 2.9L88.9 557.2a9.96 9.96 0 000 14.1l363.8 363.8c1.9 1.9 4.4 2.9 7.1 2.9s5.2-1 7.1-2.9l468.3-468.3c2-2.1 3-5 2.8-8zM459.7 834.7L189.3 564.3 589 164.6 836 188l23.4 247-399.7 399.7zM680 256c-48.5 0-88 39.5-88 88s39.5 88 88 88 88-39.5 88-88-39.5-88-88-88zm0 120c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"}}]},name:"tag",theme:"outlined"};var a=n(22172),l=function(e,t){return i.createElement(a.A,(0,o.A)({},e,{ref:t,icon:r}))};const s=i.forwardRef(l)},77845:(e,t,n)=>{n.d(t,{VS:()=>hn,tE:()=>ct,H2:()=>bn,rV:()=>on,h7:()=>Xe,Gc:()=>tn,Ln:()=>$t,zW:()=>ce,_0:()=>se,VH:()=>Se,PF:()=>rn});var o=n(89379),i=n(80045),r=n(70579),a=n(65043);function l(e){if("string"===typeof e||"number"===typeof e)return""+e;let t="";if(Array.isArray(e))for(let n,o=0;o<e.length;o++)""!==(n=l(e[o]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var s=n(55108),c=n(98443);const d=e=>{let t;const n=new Set,o=(e,o)=>{const i="function"===typeof e?e(t):e;if(!Object.is(i,t)){const e=t;t=(null!=o?o:"object"!==typeof i||null===i)?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,r={setState:o,getState:i,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(o,i,r);return r},u=e=>e?d(e):d;const{useDebugValue:h}=a,{useSyncExternalStoreWithSelector:f}=c,g=e=>e;function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g,n=arguments.length>2?arguments[2]:void 0;const o=f(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return h(o),o}const v=(e,t)=>{const n=u(e),o=function(e){return p(n,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:t)};return Object.assign(o,n),o};function m(e,t){if(Object.is(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,o]of e)if(!Object.is(o,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const o of n)if(!Object.prototype.hasOwnProperty.call(t,o)||!Object.is(e[o],t[o]))return!1;return!0}var y=n(97950);const x=["position","children","className","style"],w=["type","position","isValidConnection","isConnectable","isConnectableStart","isConnectableEnd","id","onConnect","children","className","onMouseDown","onTouchStart"],b=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"],S=["path","labelX","labelY","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","interactionWidth"],C=["id"],E=["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","onSelectionStart","onSelectionEnd","onBeforeDelete","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","selectionOnDrag","selectionMode","panActivationKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGri
2d","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","nodesFocusable","nodeOrigin","edgesFocusable","edgesReconnectable","elementsSelectable","defaultViewport","minZoom","maxZoom","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneMouseEnter","onPaneMouseMove","onPaneMouseLeave","onPaneScroll","onPaneContextMenu","paneClickDistance","nodeClickDistance","children","onReconnect","onReconnectStart","onReconnectEnd","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","reconnectRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateNodesOnSelect","elevateEdgesOnSelect","disableKeyboardA11y","autoPanOnConnect","autoPanOnNodeDrag","autoPanSpeed","connectionRadius","isValidConnection","onError","style","id","nodeDragThreshold","viewport","onViewportChange","width","height","colorMode","debug","onScroll"],k=["children","className"],M=(0,a.createContext)(null),N=M.Provider,_=s.xc.error001();function A(e,t){const n=(0,a.useContext)(M);if(null===n)throw new Error(_);return p(n,e,t)}function P(){const e=(0,a.useContext)(M);if(null===e)throw new Error(_);return(0,a.useMemo)((()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe})),[e])}const O={display:"none"},z={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},I="react-flow__node-desc",D="react-flow__edge-desc",R="react-flow__aria-live",L=e=>e.ariaLiveMessage;function B(e){let{rfId:t}=e;const n=A(L);return(0,r.jsx)("div",{id:"".concat(R,"-").concat(t),"aria-live":"assertive","aria-atomic":"true",style:z,children:n})}function j(e){let{rfId:t,disableKeyboardA11y:n}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{id:"".concat(I,"-").concat(t),style:O,children:["Press enter or space to select a node.",!n&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "]}),(0,r.jsx)("div",{id:"".concat(D,"-").concat(t),style:O,children:"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."}),!n&&(0,r.jsx)(B,{rfId:t})]})}const H=e=>e.userSelectionActive?"none":"all",T=(0,a.forwardRef)(((e,t)=>{let{position:n="top-left",children:a,className:s,style:c}=e,d=(0,i.A)(e,x);const u=A(H),h="".concat(n).split("-");return(0,r.jsx)("div",(0,o.A)((0,o.A)({className:l(["react-flow__panel",s,...h]),style:(0,o.A)((0,o.A)({},c),{},{pointerEvents:u}),ref:t},d),{},{children:a}))}));function V(e){let{proOptions:t,position:n="bottom-right"}=e;return null!==t&&void 0!==t&&t.hideAttribution?null:(0,r.jsx)(T,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,r.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}T.displayName="Panel";const X=e=>{const t=[],n=[];for(const[,o]of e.nodeLookup)o.selected&&t.push(o.internals.userNode);for(const[,o]of e.edgeLookup)o.selected&&n.push(o);return{selectedNodes:t,selectedEdges:n}},Z=e=>e.id;function Y(e,t){return m(e.selectedNodes.map(Z),t.selectedNodes.map(Z))&&m(e.selectedEdges.map(Z),t.selectedEdges.map(Z))}function F(e){let{onSelectionChange:t}=e;const n=P(),{selectedNodes:o,selectedEdges:i}=A(X,Y);return(0,a.useEffect)((()=>{const e={nodes:o,edges:i};null===t||void 0===t||t(e),n.getState().onSelectionChangeHandlers.forEach((t=>t(e)))}),[o,i,t]),null}const W=e=>!!e.onSelectionChangeHandlers;function K(e){let{onSelectionChange:t}=e;const n=A(W);return t||n?(0,r.jsx)(F,{onSelectionChange:t}):null}const G=[0,0],q={x:0,y:0,zoom:1},U=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGri
2d","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","onBeforeDelete","debug","autoPanSpeed","paneClickDistance","rfId"],Q=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setPaneClickDistance:e.setPaneClickDistance}),$={translateExtent:s.ZO,nodeOrigin:G,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1",paneClickDistance:0};function J(e){const{setNodes:t,setEdges:n,setMinZoom:o,setMaxZoom:i,setTranslateExtent:r,setNodeExtent:l,reset:s,setDefaultNodesAndEdges:c,setPaneClickDistance:d}=A(Q,m),u=P();(0,a.useEffect)((()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=$,s()})),[]);const h=(0,a.useRef)($);return(0,a.useEffect)((()=>{for(const a of U){const s=e[a];s!==h.current[a]&&("undefined"!==typeof e[a]&&("nodes"===a?t(s):"edges"===a?n(s):"minZoom"===a?o(s):"maxZoom"===a?i(s):"translateExtent"===a?r(s):"nodeExtent"===a?l(s):"paneClickDistance"===a?d(s):"fitView"===a?u.setState({fitViewOnInit:s}):"fitViewOptions"===a?u.setState({fitViewOnInitOptions:s}):u.setState({[a]:s})))}h.current=e}),U.map((t=>e[t]))),null}function ee(){return"undefined"!==typeof window&&window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null}const te="undefined"!==typeof document?document:null;function ne(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{target:te,actInsideInputWithModifier:!0};const[n,o]=(0,a.useState)(!1),i=(0,a.useRef)(!1),r=(0,a.useRef)(new Set([])),[l,c]=(0,a.useMemo)((()=>{if(null!==e){const t=(Array.isArray(e)?e:[e]).filter((e=>"string"===typeof e)).map((e=>e.replace("+","\n").replace("\n\n","\n+").split("\n"))),n=t.reduce(((e,t)=>e.concat(...t)),[]);return[t,n]}return[[],[]]}),[e]);return(0,a.useEffect)((()=>{const n=(null===t||void 0===t?void 0:t.target)||te;if(null!==e){const e=e=>{i.current=e.ctrlKey||e.metaKey||e.shiftKey;if((!i.current||i.current&&!t.actInsideInputWithModifier)&&(0,s.v5)(e))return!1;const n=ie(e.code,c);r.current.add(e[n]),oe(l,r.current,!1)&&(e.preventDefault(),o(!0))},a=e=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&(0,s.v5)(e))return!1;const n=ie(e.code,c);oe(l,r.current,!0)?(o(!1),r.current.clear()):r.current.delete(e[n]),"Meta"===e.key&&r.current.clear(),i.current=!1},d=()=>{r.current.clear(),o(!1)};return null===n||void 0===n||n.addEventListener("keydown",e),null===n||void 0===n||n.addEventListener("keyup",a),window.addEventListener("blur",d),window.addEventListener("contextmenu",d),()=>{null===n||void 0===n||n.removeEventListener("keydown",e),null===n||void 0===n||n.removeEventListener("keyup",a),window.removeEventListener("blur",d),window.removeEventListener("contextmenu",d)}}}),[e,o]),n}function oe(e,t,n){return e.filter((e=>n||e.length===t.size)).some((e=>e.every((e=>t.has(e)))))}function ie(e,t){return t.includes(e)?"code":"key"}const re=()=>{const e=P();return(0,a.useMemo)((()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,{duration:null===t||void 0===t?void 0:t.duration}):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,{duration:null===t||void 0===t?void 0:t.duration}):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,{duration:null===n||void 0===n?void 0:n.duration}):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{var o,i,r;const{transform:[a,l,s],panZoom:c}=e.getState();return c?(await c.setViewport({x:null!==(o=t.x)&&void 0!==o?o:a,y:null!==(i=t.y)&&void 0!==i?i:l,zoom:null!==(r=t.zoom)&&void 0!==r?r:s},{duration:null===n||void 0===n?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},fitView:t=>{const{nodeLookup:n,minZoom:o,maxZoom:i,panZoom:r,domNode:a}=e.getState();if(!r||!a)return Promise.resolve(!1);const l=(0,s.YV)(n,t),{width:c,height:d}=(0,s.Eo)(a);
2return(0,s.Pr)({nodes:l,width:c,height:d,minZoom:o,maxZoom:i,panZoom:r},t)},setCenter:async(t,n,o)=>{const{width:i,height:r,maxZoom:a,panZoom:l}=e.getState(),s="undefined"!==typeof(null===o||void 0===o?void 0:o.zoom)?o.zoom:a,c=i/2-t*s,d=r/2-n*s;return l?(await l.setViewport({x:c,y:d,zoom:s},{duration:null===o||void 0===o?void 0:o.duration}),Promise.resolve(!0)):Promise.resolve(!1)},fitBounds:async(t,n)=>{var o;const{width:i,height:r,minZoom:a,maxZoom:l,panZoom:c}=e.getState(),d=(0,s.R4)(t,i,r,a,l,null!==(o=null===n||void 0===n?void 0:n.padding)&&void 0!==o?o:.1);return c?(await c.setViewport(d,{duration:null===n||void 0===n?void 0:n.duration}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:function(t){var n,o;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:r,snapGrid:a,snapToGrid:l,domNode:c}=e.getState();if(!c)return t;const{x:d,y:u}=c.getBoundingClientRect(),h={x:t.x-d,y:t.y-u},f=null!==(n=i.snapGrid)&&void 0!==n?n:a,g=null!==(o=i.snapToGrid)&&void 0!==o?o:l;return(0,s.Ff)(h,r,g,f)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:i,y:r}=o.getBoundingClientRect(),a=(0,s.zj)(t,n);return{x:a.x+i,y:a.y+r}}})),[])};function ae(e,t){const n=[],i=new Map,r=[];for(const o of e)if("add"!==o.type)if("remove"===o.type||"replace"===o.type)i.set(o.id,[o]);else{const e=i.get(o.id);e?e.push(o):i.set(o.id,[o])}else r.push(o);for(const a of t){const e=i.get(a.id);if(!e){n.push(a);continue}if("remove"===e[0].type)continue;if("replace"===e[0].type){n.push((0,o.A)({},e[0].item));continue}const t=(0,o.A)({},a);for(const n of e)le(n,t);n.push(t)}return r.length&&r.forEach((e=>{void 0!==e.index?n.splice(e.index,0,(0,o.A)({},e.item)):n.push((0,o.A)({},e.item))})),n}function le(e,t){switch(e.type){case"select":t.selected=e.selected;break;case"position":"undefined"!==typeof e.position&&(t.position=e.position),"undefined"!==typeof e.dragging&&(t.dragging=e.dragging);break;case"dimensions":var n;if("undefined"!==typeof e.dimensions)null!==(n=t.measured)&&void 0!==n||(t.measured={}),t.measured.width=e.dimensions.width,t.measured.height=e.dimensions.height,e.setAttributes&&(t.width=e.dimensions.width,t.height=e.dimensions.height);"boolean"===typeof e.resizing&&(t.resizing=e.resizing)}}function se(e,t){return ae(e,t)}function ce(e,t){return ae(e,t)}function de(e,t){return{id:e,type:"select",selected:t}}function ue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];for(const[i,r]of e){const e=t.has(i);void 0===r.selected&&!e||r.selected===e||(n&&(r.selected=e),o.push(de(r.id,e)))}return o}function he(e){let{items:t=[],lookup:n}=e;const o=[],i=new Map(t.map((e=>[e.id,e])));for(const[l,s]of t.entries()){var r,a;const e=n.get(s.id),t=null!==(r=null===e||void 0===e||null===(a=e.internals)||void 0===a?void 0:a.userNode)&&void 0!==r?r:e;void 0!==t&&t!==s&&o.push({id:s.id,item:s,type:"replace"}),void 0===t&&o.push({item:s,type:"add",index:l})}for(const[l]of n){void 0===i.get(l)&&o.push({id:l,type:"remove"})}return o}function fe(e){return{id:e.id,type:"remove"}}const ge=e=>(0,s.oB)(e),pe=e=>(0,s.b$)(e);function ve(e){return(0,a.forwardRef)(e)}const me="undefined"!==typeof window?a.useLayoutEffect:a.useEffect;function ye(e){const[t,n]=(0,a.useState)(BigInt(0)),[o]=(0,a.useState)((()=>function(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}((()=>n((e=>e+BigInt(1)))))));return me((()=>{const t=o.get();t.length&&(e(t),o.reset())}),[t]),o}const xe=(0,a.createContext)(null);function we(e){let{children:t}=e;const n=P(),o=ye((0,a.useCallback)((e=>{const{nodes:t=[],setNodes:o,hasDefaultNodes:i,onNodesChange:r,nodeLookup:a}=n.getState();let l=t;for(const n of e)l="function"===typeof n?n(l):n;i?o(l):r&&r(he({items:l,lookup:a}))}),[])),i=ye((0,a.useCallback)((e=>{const{edges:t=[],setEdges:o,hasDefaultEdges:i,onEdgesChange:r,edgeLookup:a}=n.getState();let l=t;for(const n of e)l="function"===typeof n?n(l):n;i?o(l):r&&r(he({items:l,lookup:a}))}),[])),l=(0,a.useMemo)((()=>({nodeQueue:o,edgeQueue:i})),[]);return(0,r.jsx)(xe.Provider,{value:l,children:t})}const be=e=>!!e.panZoom;function Se(){const e=re(),t=P(),n=function(){const e=(0,a.useContext)(xe);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}(),i=A(be),r=(0,a.useMemo)((()=>{const e=e=>t.getState().nodeLookup.get(e),i=e=>{n.nodeQueue.push(e)}
2,r=e=>{n.edgeQueue.push(e)},a=e=>{var n,i,r,a;const{nodeLookup:l,nodeOrigin:c}=t.getState(),d=ge(e)?e:l.get(e.id),u=d.parentId?(0,s.us)(d.position,d.measured,d.parentId,l,c):d.position,h=(0,o.A)((0,o.A)({},d),{},{position:u,width:null!==(n=null===(i=d.measured)||void 0===i?void 0:i.width)&&void 0!==n?n:d.width,height:null!==(r=null===(a=d.measured)||void 0===a?void 0:a.height)&&void 0!==r?r:d.height});return(0,s.kM)(h)},l=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{replace:!1};i((i=>i.map((i=>{if(i.id===e){const e="function"===typeof t?t(i):t;return n.replace&&ge(e)?e:(0,o.A)((0,o.A)({},i),e)}return i}))))},c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{replace:!1};r((i=>i.map((i=>{if(i.id===e){const e="function"===typeof t?t(i):t;return n.replace&&pe(e)?e:(0,o.A)((0,o.A)({},i),e)}return i}))))};return{getNodes:()=>t.getState().nodes.map((e=>(0,o.A)({},e))),getNode:t=>{var n;return null===(n=e(t))||void 0===n?void 0:n.internals.userNode},getInternalNode:e,getEdges:()=>{const{edges:e=[]}=t.getState();return e.map((e=>(0,o.A)({},e)))},getEdge:e=>t.getState().edgeLookup.get(e),setNodes:i,setEdges:r,addNodes:e=>{const t=Array.isArray(e)?e:[e];n.nodeQueue.push((e=>[...e,...t]))},addEdges:e=>{const t=Array.isArray(e)?e:[e];n.edgeQueue.push((e=>[...e,...t]))},toObject:()=>{const{nodes:e=[],edges:n=[],transform:i}=t.getState(),[r,a,l]=i;return{nodes:e.map((e=>(0,o.A)({},e))),edges:n.map((e=>(0,o.A)({},e))),viewport:{x:r,y:a,zoom:l}}},deleteElements:async e=>{let{nodes:n=[],edges:o=[]}=e;const{nodes:i,edges:r,onNodesDelete:a,onEdgesDelete:l,triggerNodeChanges:c,triggerEdgeChanges:d,onDelete:u,onBeforeDelete:h}=t.getState(),{nodes:f,edges:g}=await(0,s.Tq)({nodesToRemove:n,edgesToRemove:o,nodes:i,edges:r,onBeforeDelete:h}),p=g.length>0,v=f.length>0;if(p){const e=g.map(fe);null===l||void 0===l||l(g),d(e)}if(v){const e=f.map(fe);null===a||void 0===a||a(f),c(e)}return(v||p)&&(null===u||void 0===u||u({nodes:f,edges:g})),{deletedNodes:f,deletedEdges:g}},getIntersectingNodes:function(e){let n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2?arguments[2]:void 0;const i=(0,s.mW)(e),r=i?e:a(e),l=void 0!==o;return r?(o||t.getState().nodes).filter((o=>{const a=t.getState().nodeLookup.get(o.id);if(a&&!i&&(o.id===e.id||!a.internals.positionAbsolute))return!1;const c=(0,s.kM)(l?o:a),d=(0,s.X6)(c,r);return n&&d>0||d>=r.width*r.height})):[]},isNodeIntersecting:function(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=(0,s.mW)(e)?e:a(e);if(!o)return!1;const i=(0,s.X6)(o,t);return n&&i>0||i>=o.width*o.height},updateNode:l,updateNodeData:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{replace:!1};l(e,(e=>{const i="function"===typeof t?t(e):t;return n.replace?(0,o.A)((0,o.A)({},e),{},{data:i}):(0,o.A)((0,o.A)({},e),{},{data:(0,o.A)((0,o.A)({},e.data),i)})}),n)},updateEdge:c,updateEdgeData:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{replace:!1};c(e,(e=>{const i="function"===typeof t?t(e):t;return n.replace?(0,o.A)((0,o.A)({},e),{},{data:i}):(0,o.A)((0,o.A)({},e),{},{data:(0,o.A)((0,o.A)({},e.data),i)})}),n)},getNodesBounds:e=>{const{nodeLookup:n,nodeOrigin:o}=t.getState();return(0,s.Jo)(e,{nodeLookup:n,nodeOrigin:o})},getHandleConnections:e=>{var n,o;let{type:i,id:r,nodeId:a}=e;return Array.from(null!==(n=null===(o=t.getState().connectionLookup.get("".concat(a,"-").concat(i).concat(r?"-".concat(r):"")))||void 0===o?void 0:o.values())&&void 0!==n?n:[])},getNodeConnections:e=>{var n,o;let{type:i,handleId:r,nodeId:a}=e;return Array.from(null!==(n=null===(o=t.getState().connectionLookup.get("".concat(a).concat(i?r?"-".concat(i,"-").concat(r):"-".concat(i):"")))||void 0===o?void 0:o.values())&&void 0!==n?n:[])}}}),[]);return(0,a.useMemo)((()=>(0,o.A)((0,o.A)((0,o.A)({},r),e),{},{viewportInitialized:i})),[i])}const Ce=e=>e.selected,Ee={actInsideInputWithModifier:!1},ke="undefined"!==typeof window?window:void 0;const Me={position:"absolute",width:"100%",height:"100%",top:0,left:0},Ne=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib});function _e(e){let{onPaneContextMenu:t,zoomOnScroll:n=!0,zoomOnPinch:o=!0,panOnScroll:i=!1,panOnScrollSpeed:l=.5,panOnScrollMode:c=s.ny.Free,zoomOnDoubleClick:d=!0,panOnDrag:u=!0,defaultViewport:h,translateExtent:f,minZoom:g,maxZoom:p,zoomActivationKeyCode:v,preventScrolling:y=!0,children:x,noWheelClassName:w,noPanClassName:b,onViewportChange:S,isControlledViewport:C,paneClickDistance:E}=e;const k=P(),M=(0,a.useRef)(null),{userSelectionActive:N,lib:_}=A(Ne,m),O=ne(v),z=(0,a.useRef)();!function(e){const t=P();(0,a.useEffect)((()=>{const n=()=>
2{if(!e.current)return!1;const n=(0,s.Eo)(e.current);var o,i;0!==n.height&&0!==n.width||null===(o=(i=t.getState()).onError)||void 0===o||o.call(i,"004",s.xc.error004()),t.setState({width:n.width||500,height:n.height||500})};if(e.current){n(),window.addEventListener("resize",n);const t=new ResizeObserver((()=>n()));return t.observe(e.current),()=>{window.removeEventListener("resize",n),t&&e.current&&t.unobserve(e.current)}}}),[])}(M);const I=(0,a.useCallback)((e=>{null===S||void 0===S||S({x:e[0],y:e[1],zoom:e[2]}),C||k.setState({transform:e})}),[S,C]);return(0,a.useEffect)((()=>{if(M.current){z.current=(0,s.kO)({domNode:M.current,minZoom:g,maxZoom:p,translateExtent:f,viewport:h,paneClickDistance:E,onDraggingChange:e=>k.setState({paneDragging:e}),onPanZoomStart:(e,t)=>{const{onViewportChangeStart:n,onMoveStart:o}=k.getState();null===o||void 0===o||o(e,t),null===n||void 0===n||n(t)},onPanZoom:(e,t)=>{const{onViewportChange:n,onMove:o}=k.getState();null===o||void 0===o||o(e,t),null===n||void 0===n||n(t)},onPanZoomEnd:(e,t)=>{const{onViewportChangeEnd:n,onMoveEnd:o}=k.getState();null===o||void 0===o||o(e,t),null===n||void 0===n||n(t)}});const{x:e,y:t,zoom:n}=z.current.getViewport();return k.setState({panZoom:z.current,transform:[e,t,n],domNode:M.current.closest(".react-flow")}),()=>{var e;null===(e=z.current)||void 0===e||e.destroy()}}}),[]),(0,a.useEffect)((()=>{var e;null===(e=z.current)||void 0===e||e.update({onPaneContextMenu:t,zoomOnScroll:n,zoomOnPinch:o,panOnScroll:i,panOnScrollSpeed:l,panOnScrollMode:c,zoomOnDoubleClick:d,panOnDrag:u,zoomActivationKeyPressed:O,preventScrolling:y,noPanClassName:b,userSelectionActive:N,noWheelClassName:w,lib:_,onTransformChange:I})}),[t,n,o,i,l,c,d,u,O,y,b,N,w,_,I]),(0,r.jsx)("div",{className:"react-flow__renderer",ref:M,style:Me,children:x})}const Ae=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Pe(){const{userSelectionActive:e,userSelectionRect:t}=A(Ae,m);return e&&t?(0,r.jsx)("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:"translate(".concat(t.x,"px, ").concat(t.y,"px)")}}):null}const Oe=(e,t)=>n=>{n.target===t.current&&(null===e||void 0===e||e(n))},ze=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging});function Ie(e){let{isSelecting:t,selectionKeyPressed:n,selectionMode:o=s.Qc.Full,panOnDrag:i,selectionOnDrag:c,onSelectionStart:d,onSelectionEnd:u,onPaneClick:h,onPaneContextMenu:f,onPaneScroll:g,onPaneMouseEnter:p,onPaneMouseMove:v,onPaneMouseLeave:y,children:x}=e;const w=P(),{userSelectionActive:b,elementsSelectable:S,dragging:C}=A(ze,m),E=S&&(t||b),k=(0,a.useRef)(null),M=(0,a.useRef)(),N=(0,a.useRef)(new Set),_=(0,a.useRef)(new Set),O=(0,a.useRef)(!1),z=(0,a.useRef)(!1),I=e=>{O.current?O.current=!1:(null===h||void 0===h||h(e),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1}))},D=g?e=>g(e):void 0,R=!0===i||Array.isArray(i)&&i.includes(0);return(0,r.jsxs)("div",{className:l(["react-flow__pane",{draggable:R,dragging:C,selection:t}]),onClick:E?void 0:Oe(I,k),onContextMenu:Oe((e=>{Array.isArray(i)&&null!==i&&void 0!==i&&i.includes(2)?e.preventDefault():null===f||void 0===f||f(e)}),k),onWheel:Oe(D,k),onPointerEnter:E?void 0:p,onPointerDown:E?e=>{var n,o;const{resetSelectedElements:i,domNode:r}=w.getState();if(M.current=null===r||void 0===r?void 0:r.getBoundingClientRect(),!S||!t||0!==e.button||e.target!==k.current||!M.current)return;null===(n=e.target)||void 0===n||null===(o=n.setPointerCapture)||void 0===o||o.call(n,e.pointerId),z.current=!0,O.current=!1;const{x:a,y:l}=(0,s.q1)(e.nativeEvent,M.current);i(),w.setState({userSelectionRect:{width:0,height:0,startX:a,startY:l,x:a,y:l}}),null===d||void 0===d||d(e)}:v,onPointerMove:E?e=>{var t;const{userSelectionRect:n,transform:i,nodeLookup:r,edgeLookup:a,connectionLookup:l,triggerNodeChanges:c,triggerEdgeChanges:d,defaultEdgeOptions:u}=w.getState();if(!M.current||!n)return;O.current=!0;const{x:h,y:f}=(0,s.q1)(e.nativeEvent,M.current),{startX:g,startY:p}=n,v={startX:g,startY:p,x:h<g?h:g,y:f<p?f:p,width:Math.abs(h-g),height:Math.abs(f-p)},m=N.current,y=_.current;
2N.current=new Set((0,s.U$)(r,v,i,o===s.Qc.Partial,!0).map((e=>e.id))),_.current=new Set;const x=null===(t=null===u||void 0===u?void 0:u.selectable)||void 0===t||t;for(const o of N.current){const e=l.get(o);if(e)for(const{edgeId:t}of e.values()){var b;const e=a.get(t);e&&(null!==(b=e.selectable)&&void 0!==b?b:x)&&_.current.add(t)}}if(!(0,s._s)(m,N.current)){c(ue(r,N.current,!0))}if(!(0,s._s)(y,_.current)){d(ue(a,_.current))}w.setState({userSelectionRect:v,userSelectionActive:!0,nodesSelectionActive:!1})}:v,onPointerUp:E?e=>{var t,o;if(0!==e.button||!z.current)return;null===(t=e.target)||void 0===t||null===(o=t.releasePointerCapture)||void 0===o||o.call(t,e.pointerId);const{userSelectionRect:i}=w.getState();!b&&i&&e.target===k.current&&(null===I||void 0===I||I(e)),w.setState({userSelectionActive:!1,userSelectionRect:null,nodesSelectionActive:N.current.size>0}),null===u||void 0===u||u(e),(n||c)&&(O.current=!1),z.current=!1}:void 0,onPointerLeave:y,ref:k,style:Me,children:[x,(0,r.jsx)(Pe,{})]})}function De(e){let{id:t,store:n,unselect:o=!1,nodeRef:i}=e;const{addSelectedNodes:r,unselectNodesAndEdges:a,multiSelectionActive:l,nodeLookup:c,onError:d}=n.getState(),u=c.get(t);u?(n.setState({nodesSelectionActive:!1}),u.selected?(o||u.selected&&l)&&(a({nodes:[u],edges:[]}),requestAnimationFrame((()=>{var e;return null===i||void 0===i||null===(e=i.current)||void 0===e?void 0:e.blur()}))):r([t])):null===d||void 0===d||d("012",s.xc.error012(t))}function Re(e){let{nodeRef:t,disabled:n=!1,noDragClassName:o,handleSelector:i,nodeId:r,isSelectable:l,nodeClickDistance:c}=e;const d=P(),[u,h]=(0,a.useState)(!1),f=(0,a.useRef)();return(0,a.useEffect)((()=>{f.current=(0,s.I$)({getStoreItems:()=>d.getState(),onNodeMouseDown:e=>{De({id:e,store:d,nodeRef:t})},onDragStart:()=>{h(!0)},onDragStop:()=>{h(!1)}})}),[]),(0,a.useEffect)((()=>{var e;if(n)null===(e=f.current)||void 0===e||e.destroy();else if(t.current){var a;return null===(a=f.current)||void 0===a||a.update({noDragClassName:o,handleSelector:i,domNode:t.current,isSelectable:l,nodeId:r,nodeClickDistance:c}),()=>{var e;null===(e=f.current)||void 0===e||e.destroy()}}}),[o,i,n,l,t,r]),u}const Le=e=>t=>t.selected&&(t.draggable||e&&"undefined"===typeof t.draggable);function Be(){const e=P();return(0,a.useCallback)((t=>{const{nodeExtent:n,snapToGrid:o,snapGrid:i,nodesDraggable:r,onError:a,updateNodePositions:l,nodeLookup:c,nodeOrigin:d}=e.getState(),u=new Map,h=Le(r),f=o?i[0]:5,g=o?i[1]:5,p=t.direction.x*f*t.factor,v=t.direction.y*g*t.factor;for(const[,e]of c){if(!h(e))continue;let t={x:e.internals.positionAbsolute.x+p,y:e.internals.positionAbsolute.y+v};o&&(t=(0,s.s_)(t,i));const{position:r,positionAbsolute:l}=(0,s.aE)({nodeId:e.id,nextPosition:t,nodeLookup:c,nodeExtent:n,nodeOrigin:d,onError:a});e.position=r,e.internals.positionAbsolute=l,u.set(e.id,e)}l(u)}),[])}const je=(0,a.createContext)(null),He=je.Provider;je.Consumer;const Te=()=>(0,a.useContext)(je),Ve=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId});const Xe=(0,a.memo)(ve((function(e,t){let{type:n="source",position:a=s.yX.Top,isValidConnection:c,isConnectable:d=!0,isConnectableStart:u=!0,isConnectableEnd:h=!0,id:f,onConnect:g,children:p,className:v,onMouseDown:y,onTouchStart:x}=e,b=(0,i.A)(e,w);const S=f||null,C="target"===n,E=P(),k=Te(),{connectOnClick:M,noPanClassName:N,rfId:_}=A(Ve,m),{connectingFrom:O,connectingTo:z,clickConnecting:I,isPossibleEndHandle:D,connectionInProcess:R,clickConnectionInProcess:L,valid:B}=A(((e,t,n)=>o=>{const{connectionClickStartHandle:i,connectionMode:r,connection:a}=o,{fromHandle:l,toHandle:c,isValid:d}=a,u=(null===c||void 0===c?void 0:c.nodeId)===e&&(null===c||void 0===c?void 0:c.id)===t&&(null===c||void 0===c?void 0:c.type)===n;return{connectingFrom:(null===l||void 0===l?void 0:l.nodeId)===e&&(null===l||void 0===l?void 0:l.id)===t&&(null===l||void 0===l?void 0:l.type)===n,connectingTo:u,clickConnecting:(null===i||void 0===i?void 0:i.nodeId)===e&&(null===i||void 0===i?void 0:i.id)===t&&(null===i||void 0===i?void 0:i.type)===n,isPossibleEndHandle:r===s.WZ.Strict?(null===l||void 0===l?void 0:l.type)!==n:e!==(null===l||void 0===l?void 0:l.nodeId)||t!==(null===l||void 0===l?void 0:l.id),connectionInProcess:!!l,clickConnectionInProcess:!!i,valid:u&&d}})(k,S,n),m);var j,H;k||null===(j=(H=E.getState()).onError)||void 0===j||j.call(H,"010",s.xc.error010());const T=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:i}=E.getState(),r=(0,o.A)((0,o.A)({},t),e);if(i){const{edges:e,setEdges:t}
2=E.getState();t((0,s.rN)(r,e))}null===n||void 0===n||n(r),null===g||void 0===g||g(r)},V=e=>{if(!k)return;const t=(0,s.Er)(e.nativeEvent);if(u&&(t&&0===e.button||!t)){const t=E.getState();s.aQ.onPointerDown(e.nativeEvent,{autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:t.nodeLookup,lib:t.lib,isTarget:C,handleId:S,nodeId:k,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:t.onConnectEnd,updateConnection:t.updateConnection,onConnect:T,isValidConnection:c||t.isValidConnection,getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed})}t?null===y||void 0===y||y(e):null===x||void 0===x||x(e)};return(0,r.jsx)("div",(0,o.A)((0,o.A)({"data-handleid":S,"data-nodeid":k,"data-handlepos":a,"data-id":"".concat(_,"-").concat(k,"-").concat(S,"-").concat(n),className:l(["react-flow__handle","react-flow__handle-".concat(a),"nodrag",N,v,{source:!C,target:C,connectable:d,connectablestart:u,connectableend:h,clickconnecting:I,connectingfrom:O,connectingto:z,valid:B,connectionindicator:d&&(!R||D)&&(R||L?h:u)}]),onMouseDown:V,onTouchStart:V,onClick:M?e=>{const{onClickConnectStart:t,onClickConnectEnd:o,connectionClickStartHandle:i,connectionMode:r,isValidConnection:a,lib:l,rfId:d,nodeLookup:h,connection:f}
2=E.getState();if(!k||!i&&!u)return;if(!i)return null===t||void 0===t||t(e.nativeEvent,{nodeId:k,handleId:S,handleType:n}),void E.setState({connectionClickStartHandle:{nodeId:k,type:n,id:S}});const g=(0,s.oj)(e.target),p=c||a,{connection:v,isValid:m}=s.aQ.isValid(e.nativeEvent,{handle:{nodeId:k,id:S,type:n},connectionMode:r,fromNodeId:i.nodeId,fromHandleId:i.id||null,fromType:i.type,isValidConnection:p,flowId:d,doc:g,lib:l,nodeLookup:h});m&&v&&T(v);const y=structuredClone(f);delete y.inProgress,y.toPosition=y.toHandle?y.toHandle.position:null,null===o||void 0===o||o(e,y),E.setState({connectionClickStartHandle:null})}:void 0,ref:t},b),{},{children:p}))})));const Ze={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Ye={input:function(e){let{data:t,isConnectable:n,sourcePosition:o=s.yX.Bottom}=e;return(0,r.jsxs)(r.Fragment,{children:[null===t||void 0===t?void 0:t.label,(0,r.jsx)(Xe,{type:"source",position:o,isConnectable:n})]})},default:function(e){let{data:t,isConnectable:n,targetPosition:o=s.yX.Top,sourcePosition:i=s.yX.Bottom}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Xe,{type:"target",position:o,isConnectable:n}),null===t||void 0===t?void 0:t.label,(0,r.jsx)(Xe,{type:"source",position:i,isConnectable:n})]})},output:function(e){let{data:t,isConnectable:n,targetPosition:o=s.yX.Top}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(Xe,{type:"target",position:o,isConnectable:n}),null===t||void 0===t?void 0:t.label]})},group:function(){return null}};const Fe=e=>{const{width:t,height:n,x:o,y:i}=(0,s.aZ)(e.nodeLookup,{filter:e=>!!e.selected});return{width:(0,s.kf)(t)?t:null,height:(0,s.kf)(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:"translate(".concat(e.transform[0],"px,").concat(e.transform[1],"px) scale(").concat(e.transform[2],") translate(").concat(o,"px,").concat(i,"px)")}};function We(e){let{onSelectionContextMenu:t,noPanClassName:n,disableKeyboardA11y:o}=e;const i=P(),{width:s,height:c,transformString:d,userSelectionActive:u}=A(Fe,m),h=Be(),f=(0,a.useRef)(null);if((0,a.useEffect)((()=>{var e;o||(null===(e=f.current)||void 0===e||e.focus({preventScroll:!0}))}),[o]),Re({nodeRef:f}),u||!s||!c)return null;const g=t?e=>{const n=i.getState().nodes.filter((e=>e.selected));t(e,n)}:void 0;return(0,r.jsx)("div",{className:l(["react-flow__nodesselection","react-flow__container",n]),style:{transform:d},children:(0,r.jsx)("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:g,tabIndex:o?void 0:-1,onKeyDown:o?void 0:e=>{Object.prototype.hasOwnProperty.call(Ze,e.key)&&(e.preventDefault(),h({direction:Ze[e.key],factor:e.shiftKey?4:1}))},style:{width:s,height:c}})})}const Ke="undefined"!==typeof window?window:void 0,Ge=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function qe(e){let{children:t,onPaneClick:n,onPaneMouseEnter:o,onPaneMouseMove:i,onPaneMouseLeave:l,onPaneContextMenu:s,onPaneScroll:c,paneClickDistance:d,deleteKeyCode:u,selectionKeyCode:h,selectionOnDrag:f,selectionMode:g,onSelectionStart:p,onSelectionEnd:v,multiSelectionKeyCode:m,panActivationKeyCode:y,zoomActivationKeyCode:x,elementsSelectable:w,zoomOnScroll:b,zoomOnPinch:S,panOnScroll:C,panOnScrollSpeed:E,panOnScrollMode:k,zoomOnDoubleClick:M,panOnDrag:N,defaultViewport:_,translateExtent:O,minZoom:z,maxZoom:I,preventScrolling:D,onSelectionContextMenu:R,noWheelClassName:L,noPanClassName:B,disableKeyboardA11y:j,onViewportChange:H,isControlledViewport:T}=e;const{nodesSelectionActive:V,userSelectionActive:X}=A(Ge),Z=ne(h,{target:Ke}),Y=ne(y,{target:Ke}),F=Y||N,W=Y||C,K=f&&!0!==F,G=Z||X||K;return function(e){let{deleteKeyCode:t,multiSelectionKeyCode:n}=e;const o=P(),{deleteElements:i}=Se(),r=ne(t,Ee),l=ne(n,{target:ke});(0,a.useEffect)((()=>{if(r){const{edges:e,nodes:t}=o.getState();i({nodes:t.filter(Ce),edges:e.filter(Ce)}),o.setState({nodesSelectionActive:!1})}}),[r]),(0,a.useEffect)((()=>{o.setState({multiSelectionActive:l})}),[l])}({deleteKeyCode:u,multiSelectionKeyCode:m}),(0,r.jsx)(_e,{onPaneContextMenu:s,elementsSelectable:w,zoomOnScroll:b,zoomOnPinch:S,panOnScroll:W,panOnScrollSpeed:E,panOnScrollMode:k,zoomOnDoubleClick:M,panOnDrag:!Z&&F,defaultViewport:_,translateExtent:O,minZoom:z,maxZoom:I,zoomActivationKeyCode:x,preventScrolling:D,noWheelClassName:L,noPanClassName:B,onViewportChange:H,isControlledViewport:T,paneClickDistance:d,children:(0,r.jsxs)(Ie,{onSelectionStart:p,onSelectionEnd:v,onPaneClick:n,onPaneMouseEnter:o,onPaneMouseMove:i,onPaneMouseLeave:l,onPaneContextMenu:s,onPaneScroll:c,panOnDrag:F,isSelecting:!!G,selectionMode:g,selectionKeyPressed:Z,selectionOnDrag:K,children:[t,V&&(0,r.jsx)(We,{onSelectionContextMenu:R,noPanClassName:B,disableKeyboardA11y:j})]})})}qe.displayName="FlowRenderer";const Ue=(0,a.memo)(qe),Qe=e=>t=>e?(0,s.U$)(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map((e=>e.id)):Array.from(t.nodeLookup.keys());const $e=e=>e.updateNodeInternals;function Je(e){var t,n;let{id:i,onClick:c,onMouseEnter:d,onMouseMove:u,onMouseLeave:h,onContextMenu:f,onDoubleClick:g,nodesDraggable:p,elementsSelectable:v,nodesConnectable:y,nodesFocusable:x,resizeObserver:w,noDragClassName:b,noPanClassName:S,disableKeyboardA11y:C,rfId:E,nodeTypes:k,nodeClickDistance:M,onError:N}=e;const{node:_,internals:O,isParent:z}=A((e=>{const t=e.nodeLookup.get(i),n=e.parentLookup.has(i);return{node:t,internals:t.internals,isParent:n}}),m);let D=_.type||"default",R=(null===k||void 0===k?void 0:k[D])||Ye[D];void 0===R&&(null===N||void 0===N||N("003",s.xc.error003(D)),D="default",R=Ye.default);const L=!!(_.draggable||p&&"undefined"===typeof _.draggable),B=!!(_.selectable||v&&"undefined"===typeof _.selectable),j=!!(_.connectable||y&&"undefined"===typeof _.connectable),H=!!(_.focusable||x&&"undefined"===typeof _.focusable),T=P(),V=(0,s.QE)(_),X=function(e){let{node:t,nodeType:n,hasDimensions:o,resizeObserver:i}=e;const r=P(),l=(0,a.useRef)(null),s=(0,a.useRef)(null),c=(0,a.useRef)(t.sourcePosition),d=(0,a.useRef)(t.targetPosition),u=(0,a.useRef)(n),h=o&&!!t.internals.handleBounds;return(0,a.useEffect)((()=>{!l.current||t.hidden||h&&s.current===l.current||(s.current&&(null===i||void 0===i||i.unobserve(s.current)),null===i||void 0===i||i.observe(l.current),s.current=l.current)}),[h,t.hidden]),(0,a.useEffect)((()=>()=>{s.current&&(null===i||void 0===i||i.unobserve(s.current),s.current=null)}),[]),(0,a.useEffect)((()=>
2{if(l.current){const e=u.current!==n,o=c.current!==t.sourcePosition,i=d.current!==t.targetPosition;(e||o||i)&&(u.current=n,c.current=t.sourcePosition,d.current=t.targetPosition,r.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:l.current,force:!0}]])))}}),[t.id,n,t.sourcePosition,t.targetPosition]),l}({node:_,nodeType:D,hasDimensions:V,resizeObserver:w}),Z=Re({nodeRef:X,disabled:_.hidden||!L,noDragClassName:b,handleSelector:_.dragHandle,nodeId:i,isSelectable:B,nodeClickDistance:M}),Y=Be();if(_.hidden)return null;const F=(0,s.uD)(_),W=function(e){var t,n,o,i,r,a,l,s,c,d;return void 0===e.internals.handleBounds?{width:null!==(r=null!==(a=e.width)&&void 0!==a?a:e.initialWidth)&&void 0!==r?r:null===(l=e.style)||void 0===l?void 0:l.width,height:null!==(s=null!==(c=e.height)&&void 0!==c?c:e.initialHeight)&&void 0!==s?s:null===(d=e.style)||void 0===d?void 0:d.height}:{width:null!==(t=e.width)&&void 0!==t?t:null===(n=e.style)||void 0===n?void 0:n.width,height:null!==(o=e.height)&&void 0!==o?o:null===(i=e.style)||void 0===i?void 0:i.height}}(_),K=B||L||c||d||u||h,G=d?e=>d(e,(0,o.A)({},O.userNode)):void 0,q=u?e=>u(e,(0,o.A)({},O.userNode)):void 0,U=h?e=>h(e,(0,o.A)({},O.userNode)):void 0,Q=f?e=>f(e,(0,o.A)({},O.userNode)):void 0,$=g?e=>g(e,(0,o.A)({},O.userNode)):void 0;return(0,r.jsx)("div",{className:l(["react-flow__node","react-flow__node-".concat(D),{[S]:L},_.className,{selected:_.selected,selectable:B,parent:z,draggable:L,dragging:Z}]),ref:X,style:(0,o.A)((0,o.A)({zIndex:O.z,transform:"translate(".concat(O.positionAbsolute.x,"px,").concat(O.positionAbsolute.y,"px)"),pointerEvents:K?"all":"none",visibility:V?"visible":"hidden"},_.style),W),"data-id":i,"data-testid":"rf__node-".concat(i),onMouseEnter:G,onMouseMove:q,onMouseLeave:U,onContextMenu:Q,onClick:e=>{const{selectNodesOnDrag:t,nodeDragThreshold:n}=T.getState();B&&(!t||!L||n>0)&&De({id:i,store:T,nodeRef:X}),c&&c(e,(0,o.A)({},O.userNode))},onDoubleClick:$,onKeyDown:H?e=>{if(!(0,s.v5)(e.nativeEvent)&&!C)if(s.tn.includes(e.key)&&B){const t="Escape"===e.key;De({id:i,store:T,unselect:t,nodeRef:X})}else L&&_.selected&&Object.prototype.hasOwnProperty.call(Ze,e.key)&&(e.preventDefault(),T.setState({ariaLiveMessage:"Moved selected node ".concat(e.key.replace("Arrow","").toLowerCase(),". New position, x: ").concat(~~O.positionAbsolute.x,", y: ").concat(~~O.positionAbsolute.y)}),Y({direction:Ze[e.key],factor:e.shiftKey?4:1}))}:void 0,tabIndex:H?0:void 0,role:H?"button":void 0,"aria-describedby":C?void 0:"".concat(I,"-").concat(E),"aria-label":_.ariaLabel,children:(0,r.jsx)(He,{value:i,children:(0,r.jsx)(R,(0,o.A)({id:i,data:_.data,type:D,positionAbsoluteX:O.positionAbsolute.x,positionAbsoluteY:O.positionAbsolute.y,selected:null!==(t=_.selected)&&void 0!==t&&t,selectable:B,draggable:L,deletable:null===(n=_.deletable)||void 0===n||n,isConnectable:j,sourcePosition:_.sourcePosition,targetPosition:_.targetPosition,dragging:Z,dragHandle:_.dragHandle,zIndex:O.z,parentId:_.parentId},F))})})}const et=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function tt(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,onError:l}=A(et,m),s=(c=e.onlyRenderVisibleElements,A((0,a.useCallback)(Qe(c),[c]),m));var c;const d=function(){const e=A($e),[t]=(0,a.useState)((()=>"undefined"===typeof ResizeObserver?null:new ResizeObserver((t=>{const n=new Map;t.forEach((e=>{const t=e.target.getAttribute("data-id");n.set(t,{id:t,nodeElement:e.target,force:!0})})),e(n)}))));return(0,a.useEffect)((()=>()=>{null===t||void 0===t||t.disconnect()}),[t]),t}();return(0,r.jsx)("div",{className:"react-flow__nodes",style:Me,children:s.map((a=>(0,r.jsx)(Je,{id:a,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:d,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:i,nodeClickDistance:e.nodeClickDistance,onError:l},a)))})}tt.displayName="NodeRenderer";const nt=(0,a.memo)(tt);const ot={[s.TG.Arrow]:e=>{let{color:t="none",strokeWidth:n=1}=e;return(0,r.jsx)("polyline",{style:{stroke:t,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"})},[s.TG.ArrowClosed]:e=>{let{color:t="none",strokeWidth:n=1}=e;return(0,r.jsx)("polyline",{style:{stroke:t,fill:t,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})}};const it=e=>{let{id:t,type:n,color:o,width:i=12.5,height:l=12.5,markerUnits:c="strokeWidth",strokeWidth:d,orient:u="auto-start-reverse"}=e;const h=function(e){const t=P();return(0,a.useMemo)((()=>{var n,o;return Object.prototype.hasOwnProperty.call(ot,e)?ot[e]:(null===(n=(o=t.getState()).onError)||void 0===n||n.call(o,"009",s.xc.error009(e)),null)}),[e])}(n);return h?(0,r.jsx)("marker",{className:"react-flow__arrowhead",id:t,markerWidth:"".concat(i),markerHeight:"".concat(l),viewBox:"-10 -10 20 20",markerUnits:c,orient:u,refX:"0",refY:"0",children:(0,r.jsx)(h,{color:o,strokeWidth:d})}):null},rt=e=>{let{defaultColor:t,rfId:n}=e;const o=A((e=>e.edges)),i=A((e=>e.defaultEdgeOptions)),l=(0,a.useMemo)((()=>(0,s.Hm)(o,{id:n,defaultColor:t,defaultMarkerStart:null===i||void 0===i?void 0:i.markerStart,defaultMarkerEnd:null===i||void 0===i?void 0:i.markerEnd})),[o,i,n,t]);return l.length?(0,r.jsx)("svg",{className:"react-flow__marker",children:(0,r.jsx)("defs",{children:l.map((e=>(0,r.jsx)(it,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient},e.id)))})}):null};rt.displayName="MarkerDefinitions";var at=(0,a.memo)(rt);function lt(e){let{x:t,y:n,label:s,labelStyle:c={},labelShowBg:d=!0,labelBgStyle:u={},labelBgPadding:h=[2,4],labelBgBorderRadius:f=2,children:g,className:p}=e,v=(0,i.A)(e,b);const[m,y]=(0,a.useState)({x:1,y:0,width:0,height:0}),x=l(["react-flow__edge-textwrapper",p]),w=(0,a.useRef)(null);return(0,a.useEffect)((()=>
2{if(w.current){const e=w.current.getBBox();y({x:e.x,y:e.y,width:e.width,height:e.height})}}),[s]),"undefined"!==typeof s&&s?(0,r.jsxs)("g",(0,o.A)((0,o.A)({transform:"translate(".concat(t-m.width/2," ").concat(n-m.height/2,")"),className:x,visibility:m.width?"visible":"hidden"},v),{},{children:[d&&(0,r.jsx)("rect",{width:m.width+2*h[0],x:-h[0],y:-h[1],height:m.height+2*h[1],className:"react-flow__edge-textbg",style:u,rx:f,ry:f}),(0,r.jsx)("text",{className:"react-flow__edge-text",y:m.height/2,dy:"0.3em",ref:w,style:c,children:s}),g]})):null}lt.displayName="EdgeText";const st=(0,a.memo)(lt);function ct(e){let{path:t,labelX:n,labelY:a,label:c,labelStyle:d,labelShowBg:u,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g,interactionWidth:p=20}=e,v=(0,i.A)(e,S);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("path",(0,o.A)((0,o.A)({},v),{},{d:t,fill:"none",className:l(["react-flow__edge-path",v.className])})),p&&(0,r.jsx)("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}),c&&(0,s.kf)(n)&&(0,s.kf)(a)?(0,r.jsx)(st,{x:n,y:a,label:c,labelStyle:d,labelShowBg:u,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g}):null]})}function dt(e){let{pos:t,x1:n,y1:o,x2:i,y2:r}=e;return t===s.yX.Left||t===s.yX.Right?[.5*(n+i),o]:[n,.5*(o+r)]}function ut(e){let{sourceX:t,sourceY:n,sourcePosition:o=s.yX.Bottom,targetX:i,targetY:r,targetPosition:a=s.yX.Top}=e;const[l,c]=dt({pos:o,x1:t,y1:n,x2:i,y2:r}),[d,u]=dt({pos:a,x1:i,y1:r,x2:t,y2:n}),[h,f,g,p]=(0,s.e_)({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:l,sourceControlY:c,targetControlX:d,targetControlY:u});return["M".concat(t,",").concat(n," C").concat(l,",").concat(c," ").concat(d,",").concat(u," ").concat(i,",").concat(r),h,f,g,p]}function ht(e){return(0,a.memo)((t=>{let{id:n,sourceX:o,sourceY:i,targetX:a,targetY:l,sourcePosition:c=s.yX.Bottom,targetPosition:d=s.yX.Top,label:u,labelStyle:h,labelShowBg:f,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:v,style:m,markerEnd:y,markerStart:x,interactionWidth:w}=t;const[b,S,C]=ut({sourceX:o,sourceY:i,sourcePosition:c,targetX:a,targetY:l,targetPosition:d}),E=e.isInternal?void 0:n;return(0,r.jsx)(ct,{id:E,path:b,labelX:S,labelY:C,label:u,labelStyle:h,labelShowBg:f,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:v,style:m,markerEnd:y,markerStart:x,interactionWidth:w})}))}const ft=ht({isInternal:!1}),gt=ht({isInternal:!0});function pt(e){return(0,a.memo)((t=>{let{id:n,sourceX:o,sourceY:i,targetX:a,targetY:l,label:c,labelStyle:d,labelShowBg:u,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g,style:p,sourcePosition:v=s.yX.Bottom,targetPosition:m=s.yX.Top,markerEnd:y,markerStart:x,pathOptions:w,interactionWidth:b}=t;const[S,C,E]=(0,s.oN)({sourceX:o,sourceY:i,sourcePosition:v,targetX:a,targetY:l,targetPosition:m,borderRadius:null===w||void 0===w?void 0:w.borderRadius,offset:null===w||void 0===w?void 0:w.offset}),k=e.isInternal?void 0:n;return(0,r.jsx)(ct,{id:k,path:S,labelX:C,labelY:E,label:c,labelStyle:d,labelShowBg:u,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g,style:p,markerEnd:y,markerStart:x,interactionWidth:b})}))}ft.displayName="SimpleBezierEdge",gt.displayName="SimpleBezierEdgeInternal";const vt=pt({isInternal:!1}),mt=pt({isInternal:!0});function yt(e){return(0,a.memo)((t=>{var n;let{id:l}=t,s=(0,i.A)(t,C);const c=e.isInternal?void 0:l;return(0,r.jsx)(vt,(0,o.A)((0,o.A)({},s),{},{id:c,pathOptions:(0,a.useMemo)((()=>{var e;return{borderRadius:0,offset:null===(e=s.pathOptions)||void 0===e?void 0:e.offset}}),[null===(n=s.pathOptions)||void 0===n?void 0:n.offset])}))}))}vt.displayName="SmoothStepEdge",mt.displayName="SmoothStepEdgeInternal";const xt=yt({isInternal:!1}),wt=yt({isInternal:!0});function bt(e){return(0,a.memo)((t=>{let{id:n,sourceX:o,sourceY:i,targetX:a,targetY:l,label:c,labelStyle:d,labelShowBg:u,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g,style:p,markerEnd:v,markerStart:m,interactionWidth:y}=t;const[x,w,b]=(0,s.ah)({sourceX:o,sourceY:i,targetX:a,targetY:l}),S=e.isInternal?void 0:n;return(0,r.jsx)(ct,{id:S,path:x,labelX:w,labelY:b,label:c,labelStyle:d,labelShowBg:u,labelBgStyle:h,labelBgPadding:f,labelBgBorderRadius:g,
2style:p,markerEnd:v,markerStart:m,interactionWidth:y})}))}xt.displayName="StepEdge",wt.displayName="StepEdgeInternal";const St=bt({isInternal:!1}),Ct=bt({isInternal:!0});function Et(e){return(0,a.memo)((t=>{let{id:n,sourceX:o,sourceY:i,targetX:a,targetY:l,sourcePosition:c=s.yX.Bottom,targetPosition:d=s.yX.Top,label:u,labelStyle:h,labelShowBg:f,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:v,style:m,markerEnd:y,markerStart:x,pathOptions:w,interactionWidth:b}=t;const[S,C,E]=(0,s.Fp)({sourceX:o,sourceY:i,sourcePosition:c,targetX:a,targetY:l,targetPosition:d,curvature:null===w||void 0===w?void 0:w.curvature}),k=e.isInternal?void 0:n;return(0,r.jsx)(ct,{id:k,path:S,labelX:C,labelY:E,label:u,labelStyle:h,labelShowBg:f,labelBgStyle:g,labelBgPadding:p,labelBgBorderRadius:v,style:m,markerEnd:y,markerStart:x,interactionWidth:b})}))}St.displayName="StraightEdge",Ct.displayName="StraightEdgeInternal";const kt=Et({isInternal:!1}),Mt=Et({isInternal:!0});kt.displayName="BezierEdge",Mt.displayName="BezierEdgeInternal";const Nt={default:Mt,straight:Ct,step:wt,smoothstep:mt,simplebezier:gt},_t={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},At=(e,t,n)=>n===s.yX.Left?e-t:n===s.yX.Right?e+t:e,Pt=(e,t,n)=>n===s.yX.Top?e-t:n===s.yX.Bottom?e+t:e,Ot="react-flow__edgeupdater";function zt(e){let{position:t,centerX:n,centerY:o,radius:i=10,onMouseDown:a,onMouseEnter:s,onMouseOut:c,type:d}=e;return(0,r.jsx)("circle",{onMouseDown:a,onMouseEnter:s,onMouseOut:c,className:l([Ot,"".concat(Ot,"-").concat(d)]),cx:At(n,i,t),cy:Pt(o,i,t),r:i,stroke:"transparent",fill:"transparent"})}function It(e){let{isReconnectable:t,reconnectRadius:n,edge:o,sourceX:i,sourceY:a,targetX:l,targetY:c,sourcePosition:d,targetPosition:u,onReconnect:h,onReconnectStart:f,onReconnectEnd:g,setReconnecting:p,setUpdateHover:v}=e;const m=P(),y=(e,t)=>{if(0!==e.button)return;const{autoPanOnConnect:n,domNode:i,isValidConnection:r,connectionMode:a,connectionRadius:l,lib:c,onConnectStart:d,onConnectEnd:u,cancelConnection:v,nodeLookup:y,rfId:x,panBy:w,updateConnection:b}=m.getState(),S="target"===t.type;p(!0),null===f||void 0===f||f(e,o,t.type);s.aQ.onPointerDown(e.nativeEvent,{autoPanOnConnect:n,connectionMode:a,connectionRadius:l,domNode:i,handleId:t.id,nodeId:t.nodeId,nodeLookup:y,isTarget:S,edgeUpdaterType:t.type,lib:c,flowId:x,cancelConnection:v,panBy:w,isValidConnection:r,onConnect:e=>null===h||void 0===h?void 0:h(o,e),onConnectStart:d,onConnectEnd:u,onReconnectEnd:(e,n)=>{p(!1),null===g||void 0===g||g(e,o,t.type,n)},updateConnection:b,getTransform:()=>m.getState().transform,getFromHandle:()=>m.getState().connection.fromHandle})},x=()=>v(!0),w=()=>v(!1);return(0,r.jsxs)(r.Fragment,{children:[(!0===t||"source"===t)&&(0,r.jsx)(zt,{position:d,centerX:i,centerY:a,radius:n,onMouseDown:e=>{var t;return y(e,{nodeId:o.target,id:null!==(t=o.targetHandle)&&void 0!==t?t:null,type:"target"})},onMouseEnter:x,onMouseOut:w,type:"source"}),(!0===t||"target"===t)&&(0,r.jsx)(zt,{position:u,centerX:l,centerY:c,radius:n,onMouseDown:e=>{var t;return y(e,{nodeId:o.source,id:null!==(t=o.sourceHandle)&&void 0!==t?t:null,type:"source"})},onMouseEnter:x,onMouseOut:w,type:"target"})]})}function Dt(e){var t;let{id:n,edgesFocusable:i,edgesReconnectable:c,elementsSelectable:d,onClick:u,onDoubleClick:h,onContextMenu:f,onMouseEnter:g,onMouseMove:p,onMouseLeave:v,reconnectRadius:y,onReconnect:x,onReconnectStart:w,onReconnectEnd:b,rfId:S,edgeTypes:C,noPanClassName:E,onError:k,disableKeyboardA11y:M}=e,N=A((e=>e.edgeLookup.get(n)));const _=A((e=>e.defaultEdgeOptions));N=_?(0,o.A)((0,o.A)({},_),N):N;let O=N.type||"default",z=(null===C||void 0===C?void 0:C[O])||Nt[O];void 0===z&&(null===k||void 0===k||k("011",s.xc.error011(O)),O="default",z=Nt.default);const I=!!(N.focusable||i&&"undefined"===typeof N.focusable),R="undefined"!==typeof x&&(N.reconnectable||c&&"undefined"===typeof N.reconnectable),L=!!(N.selectable||d&&"undefined"===typeof N.selectable),B=(0,a.useRef)(null),[j,H]=(0,a.useState)(!1),[T,V]=(0,a.useState)(!1),X=P(),{zIndex:Z,sourceX:Y,sourceY:F,targetX:W,targetY:K,sourcePosition:G,targetPosition:q}=A((0,a.useCallback)((e=>{const t=e.nodeLookup.get(N.source),i=e.nodeLookup.get(N.target);if(!t||!i)return(0,o.A)({zIndex:N.zIndex},_t);const r=(0,s.b5)({id:n,sourceNode:t,targetNode:i,sourceHandle:N.sourceHandle||null,targetHandle:N.targetHandle||null,connectionMode:e.connectionMode,onError:k}),a=(0,s.qX)({selected:N.selected,zIndex:N.zIndex,sourceNode:t,targetNode:i,elevateOnSelect:e.elevateEdgesOnSelect});return(0,o.A)({zIndex:a},r||_t)}),[N.source,N.target,N.sourceHandle,N.targetHandle,N.selected,N.zIndex]),m),U=(0,a.useMemo)((()=>N.markerStart?"url('#".concat((0,s.aW)(N.markerStart,S),"')"):void 0),[N.markerStart,S]),Q=(0,a.useMemo)((()=>N.markerEnd?"url('#".concat((0,s.aW)(N.markerEnd,S),"')"):void 0),[N.markerEnd,S]);if(N.hidden||null===Y||null===F||null===W||null===K)return null;const $=h?e=>{h(e,(0,o.A)({},N))}:void 0,J=f?e=>{f(e,(0,o.A)({},N))}:void 0,ee=g?e=>{g(e,(0,o.A)({},N))}:void 0,te=p?e=>{p(e,(0,o.A)({},N))}:void 0,ne=v?e=>{v(e,(0,o.A)({},N))}:void 0;return(0,r.jsx)("svg",{style:{zIndex:Z},children:(0,r.jsxs)("g",{className:l(["react-flow__edge","react-flow__edge-".concat(O),N.className,E,{selected:N.selected,animated:N.animated,inactive:!L&&!u,updating:j,selectable:L}]),onClick:e=>{const{addSelectedEdges:t,unselectNodesAndEdges:o,multiSelectionActive:i}=X.getState();var r;L&&(X.setState({nodesSelectionActive:!1}),N.selected&&i?(o({nodes:[],edges:[N]}),null===(r=B.current)||void 0===r||r.blur()):t([n]));u&&u(e,N)},onDoubleClick:$,onContextMenu:J,onMouseEnter:ee,onMouseMove:te,onMouseLeave:ne,onKeyDown:I?e=>
2{if(!M&&s.tn.includes(e.key)&&L){const{unselectNodesAndEdges:o,addSelectedEdges:i}=X.getState();var t;if("Escape"===e.key)null===(t=B.current)||void 0===t||t.blur(),o({edges:[N]});else i([n])}}:void 0,tabIndex:I?0:void 0,role:I?"button":"img","data-id":n,"data-testid":"rf__edge-".concat(n),"aria-label":null===N.ariaLabel?void 0:N.ariaLabel||"Edge from ".concat(N.source," to ").concat(N.target),"aria-describedby":I?"".concat(D,"-").concat(S):void 0,ref:B,children:[!T&&(0,r.jsx)(z,{id:n,source:N.source,target:N.target,type:N.type,selected:N.selected,animated:N.animated,selectable:L,deletable:null===(t=N.deletable)||void 0===t||t,label:N.label,labelStyle:N.labelStyle,labelShowBg:N.labelShowBg,labelBgStyle:N.labelBgStyle,labelBgPadding:N.labelBgPadding,labelBgBorderRadius:N.labelBgBorderRadius,sourceX:Y,sourceY:F,targetX:W,targetY:K,sourcePosition:G,targetPosition:q,data:N.data,style:N.style,sourceHandleId:N.sourceHandle,targetHandleId:N.targetHandle,markerStart:U,markerEnd:Q,pathOptions:"pathOptions"in N?N.pathOptions:void 0,interactionWidth:N.interactionWidth}),R&&(0,r.jsx)(It,{edge:N,isReconnectable:R,reconnectRadius:y,onReconnect:x,onReconnectStart:w,onReconnectEnd:b,sourceX:Y,sourceY:F,targetX:W,targetY:K,sourcePosition:G,targetPosition:q,setUpdateHover:H,setReconnecting:V})]})})}const Rt=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function Lt(e){let{defaultMarkerColor:t,onlyRenderVisibleElements:n,rfId:o,edgeTypes:i,noPanClassName:l,onReconnect:c,onEdgeContextMenu:d,onEdgeMouseEnter:u,onEdgeMouseMove:h,onEdgeMouseLeave:f,onEdgeClick:g,reconnectRadius:p,onEdgeDoubleClick:v,onReconnectStart:y,onReconnectEnd:x,disableKeyboardA11y:w}=e;const{edgesFocusable:b,edgesReconnectable:S,elementsSelectable:C,onError:E}=A(Rt,m),k=(M=n,A((0,a.useCallback)((e=>{if(!M)return e.edges.map((e=>e.id));const t=[];if(e.width&&e.height)for(const n of e.edges){const o=e.nodeLookup.get(n.source),i=e.nodeLookup.get(n.target);o&&i&&(0,s.uj)({sourceNode:o,targetNode:i,width:e.width,height:e.height,transform:e.transform})&&t.push(n.id)}return t}),[M]),m));var M;return(0,r.jsxs)("div",{className:"react-flow__edges",children:[(0,r.jsx)(at,{defaultColor:t,rfId:o}),k.map((e=>(0,r.jsx)(Dt,{id:e,edgesFocusable:b,edgesReconnectable:S,elementsSelectable:C,noPanClassName:l,onReconnect:c,onContextMenu:d,onMouseEnter:u,onMouseMove:h,onMouseLeave:f,onClick:g,reconnectRadius:p,onDoubleClick:v,onReconnectStart:y,onReconnectEnd:x,rfId:o,onError:E,edgeTypes:i,disableKeyboardA11y:w},e)))]})}Lt.displayName="EdgeRenderer";const Bt=(0,a.memo)(Lt),jt=e=>"translate(".concat(e.transform[0],"px,").concat(e.transform[1],"px) scale(").concat(e.transform[2],")");function Ht(e){let{children:t}=e;const n=A(jt);return(0,r.jsx)("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:t})}const Tt=e=>{var t;return null===(t=e.panZoom)||void 0===t?void 0:t.syncViewport};function Vt(e){return e.connection.inProgress?(0,o.A)((0,o.A)({},e.connection),{},{to:(0,s.Ff)(e.connection.to,e.transform)}):(0,o.A)({},e.connection)}function Xt(e){const t=function(e){if(e)return t=>{const n=Vt(t);return e(n)};return Vt}(e);return A(t,m)}const Zt=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function Yt(e){let{containerStyle:t,style:n,type:o,component:i}=e;const{nodesConnectable:a,width:c,height:d,isValid:u,inProgress:h}=A(Zt,m);return!!(c&&a&&h)?(0,r.jsx)("svg",{style:t,width:c,height:d,className:"react-flow__connectionline react-flow__container",children:(0,r.jsx)("g",{className:l(["react-flow__connection",(0,s.HF)(u)]),children:(0,r.jsx)(Ft,{style:n,type:o,CustomComponent:i,isValid:u})})}):null}const Ft=e=>{let{style:t,type:n=s.Do.Bezier,CustomComponent:i,isValid:a}=e;const{inProgress:l,from:c,fromNode:d,fromHandle:u,fromPosition:h,to:f,toNode:g,toHandle:p,toPosition:v}=Xt();if(!l)return;if(i)return(0,r.jsx)(i,{connectionLineType:n,connectionLineStyle:t,fromNode:d,fromHandle:u,fromX:c.x,fromY:c.y,toX:f.x,toY:f.y,fromPosition:h,toPosition:v,connectionStatus:(0,s.HF)(a),toNode:g,toHandle:p});let m="";const y={sourceX:c.x,sourceY:c.y,sourcePosition:h,targetX:f.x,targetY:f.y,targetPosition:v};switch(n){case s.Do.Bezier:[m]=(0,s.Fp)(y);break;case s.Do.SimpleBezier:[m]=ut(y);break;case s.Do.Step:[m]=(0,s.oN)((0,o.A)((0,o.A)({},y),{},{borderRadius:0}));break;case s.Do.SmoothStep:[m]=(0,s.oN)(y);break;default:[m]=(0,s.ah)(y)}return(0,r.jsx)("path",{d:m,fill:"none",className:"react-flow__connection-path",style:t})};Ft.displayName="ConnectionLine";const Wt={};function Kt(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wt;(0,a.useRef)(e),P();(0,a.useEffect)((()=>{}),[e])}function Gt(e){let{nodeTypes:t,edgeTypes:n,onInit:o,onNodeClick:i,onEdgeClick:l,onNodeDoubleClick:s,onEdgeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:u,onNodeMouseLeave:h,onNodeContextMenu:f,onSelectionContextMenu:g,onSelectionStart:p,onSelectionEnd:v,connectionLineType:m,connectionLineStyle:y,connectionLineComponent:x,connectionLineContainerStyle:w,selectionKeyCode:b,selectionOnDrag:S,selectionMode:C,multiSelectionKeyCode:E,panActivationKeyCode:k,zoomActivationKeyCode:M,deleteKeyCode:N,onlyRenderVisibleElements:_,elementsSelectable:O,defaultViewport:z,translateExtent:I,minZoom:D,maxZoom:R,preventScrolling:L,defaultMarkerColor:B,zoomOnScroll:j,zoomOnPinch:H,panOnScroll:T,panOnScrollSpeed:V,panOnScrollMode:X,zoomOnDoubleClick:Z,panOnDrag:Y,onPaneClick:F,onPaneMouseEnter:W,onPaneMouseMove:K,onPaneMouseLeave:G,onPaneScroll:q,onPaneContextMenu:U,paneClickDistance:Q,nodeClickDistance:$,onEdgeContextMenu:J,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,reconnectRadius:oe,onReconnect:ie,onReconnectStart:re,onReconnectEnd:ae,noDragClassName:le,noWheelClassName:se,noPanClassName:ce,disableKeyboardA11y:de,nodeExtent:ue,rfId:he,viewport:fe,onViewportChange:ge}=e;return Kt(t),Kt(n),P(),(0,a.useRef)(!1),(0,a.useEffect)((()=>{}),[]),function(e){const t=Se(),n=(0,a.useRef)(!1);(0,a.useEffect)((()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout((()=>e(t)),1),n.current=!0)}
2),[e,t.viewportInitialized])}(o),function(e){const t=A(Tt),n=P();(0,a.useEffect)((()=>{e&&(null===t||void 0===t||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))}),[e,t])}(fe),(0,r.jsx)(Ue,{onPaneClick:F,onPaneMouseEnter:W,onPaneMouseMove:K,onPaneMouseLeave:G,onPaneContextMenu:U,onPaneScroll:q,paneClickDistance:Q,deleteKeyCode:N,selectionKeyCode:b,selectionOnDrag:S,selectionMode:C,onSelectionStart:p,onSelectionEnd:v,multiSelectionKeyCode:E,panActivationKeyCode:k,zoomActivationKeyCode:M,elementsSelectable:O,zoomOnScroll:j,zoomOnPinch:H,zoomOnDoubleClick:Z,panOnScroll:T,panOnScrollSpeed:V,panOnScrollMode:X,panOnDrag:Y,defaultViewport:z,translateExtent:I,minZoom:D,maxZoom:R,onSelectionContextMenu:g,preventScrolling:L,noDragClassName:le,noWheelClassName:se,noPanClassName:ce,disableKeyboardA11y:de,onViewportChange:ge,isControlledViewport:!!fe,children:(0,r.jsxs)(Ht,{children:[(0,r.jsx)(Bt,{edgeTypes:n,onEdgeClick:l,onEdgeDoubleClick:c,onReconnect:ie,onReconnectStart:re,onReconnectEnd:ae,onlyRenderVisibleElements:_,onEdgeContextMenu:J,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,reconnectRadius:oe,defaultMarkerColor:B,noPanClassName:ce,disableKeyboardA11y:de,rfId:he}),(0,r.jsx)(Yt,{style:y,type:m,component:x,containerStyle:w}),(0,r.jsx)("div",{className:"react-flow__edgelabel-renderer"}),(0,r.jsx)(nt,{nodeTypes:t,onNodeClick:i,onNodeDoubleClick:s,onNodeMouseEnter:d,onNodeMouseMove:u,onNodeMouseLeave:h,onNodeContextMenu:f,nodeClickDistance:$,onlyRenderVisibleElements:_,noPanClassName:ce,noDragClassName:le,disableKeyboardA11y:de,nodeExtent:ue,rfId:he}),(0,r.jsx)("div",{className:"react-flow__viewport-portal"})]})})}Gt.displayName="GraphView";const qt=(0,a.memo)(Gt),Ut=function(){var e,t;let{nodes:n,edges:i,defaultNodes:r,defaultEdges:a,width:l,height:c,fitView:d,nodeOrigin:u,nodeExtent:h}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const f=new Map,g=new Map,p=new Map,v=new Map,m=null!==(e=null!==a&&void 0!==a?a:i)&&void 0!==e?e:[],y=null!==(t=null!==r&&void 0!==r?r:n)&&void 0!==t?t:[],x=null!==u&&void 0!==u?u:[0,0],w=null!==h&&void 0!==h?h:s.ZO;(0,s.qn)(p,v,m),(0,s.bi)(y,f,g,{nodeOrigin:x,nodeExtent:w,elevateNodesOnSelect:!1});let b=[0,0,1];if(d&&l&&c){const e=(0,s.aZ)(f,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),{x:t,y:n,zoom:o}=(0,s.R4)(e,l,c,.5,2,.1);b=[t,n,o]}return{rfId:"1",width:0,height:0,transform:b,nodes:y,nodeLookup:f,parentLookup:g,edges:m,edgeLookup:v,connectionLookup:p,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:void 0!==r,hasDefaultEdges:void 0!==a,panZoom:null,minZoom:.5,maxZoom:2,translateExtent:s.ZO,nodeExtent:w,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:s.WZ.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,nodeDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!1,fitViewOnInit:!1,fitViewDone:!1,fitViewOnInitOptions:void 0,selectNodesOnDrag:!0,multiSelectionActive:!1,connection:(0,o.A)({},s.bK),connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanSpeed:15,connectionRadius:20,onError:s.KE,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1}},Qt=e=>{let{nodes:t,edges:n,defaultNodes:i,defaultEdges:r,width:a,height:l,fitView:c,nodeOrigin:d,nodeExtent:u}=e;return h=(e,h)=>(0,o.A)((0,o.A)({},Ut({nodes:t,edges:n,width:a,height:l,fitView:c,nodeOrigin:d,nodeExtent:u,defaultNodes:i,defaultEdges:r})),{},{setNodes:t=>{const{nodeLookup:n,parentLookup:o,nodeOrigin:i,elevateNodesOnSelect:r}=h();(0,s.bi)(t,n,o,{nodeOrigin:i,nodeExtent:u,elevateNodesOnSelect:r,checkEquality:!0}),e({nodes:t})},setEdges:t=>{const{connectionLookup:n,edgeLookup:o}=h();(0,s.qn)(n,o,t),e({edges:t})},setDefaultNodesAndEdges:(t,n)=>{if(t){const{setNodes:n}=h();n(t),e({hasDefaultNodes:!0})}if(n){const{setEdges:t}=h();t(n),e({hasDefaultEdges:!0})}},updateNodeInternals:function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{triggerFitView:!0};const{triggerNodeChanges:i,nodeLookup:r,parentLookup:a,fitViewOnInit:l,fitViewDone:c,fitViewOnInitOptions:d,domNode:u,nodeOrigin:f,nodeExtent:g,debug:p,fitViewSync:v}=h(),{changes:m,updatedInternals:y}=(0,s.uL)(t,r,a,u,f,g);if(y){if((0,s.vS)(r,a,{nodeOrigin:f,nodeExtent:g}),n.triggerFitView){let t=c;!c&&l&&(t=v((0,o.A)((0,o.A)({},d),{},{nodes:null===d||void 0===d?void 0:d.nodes}))),e({fitViewDone:t})}else e({});(null===m||void 0===m?void 0:m.length)>0&&(p&&console.log("React Flow: trigger node changes",m),null===i||void 0===i||i(m))}},updateNodePositions:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[],i=[],{nodeLookup:r,triggerNodeChanges:a}=h();for(const[s,d]of e){const e=r.get(s),a=!!(null!==e&&void 0!==e&&e.expandParent&&null!==e&&void 0!==e&&e.parentId&&null!==d&&void 0!==d&&d.position),u={id:s,type:"position",position:a?{x:Math.max(0,d.position.x),y:Math.max(0,d.position.y)}:d.position,dragging:t};var l,c;a&&e.parentId&&n.push({id:s,parentId:e.parentId,rect:(0,o.A)((0,o.A)({},d.internals.positionAbsolute),{},{width:null!==(l=d.measured.width)&&void 0!==l?l:0,height:null!==(c=d.measured.height)&&void 0!==c?c:0})}),i.push(u)}if(n.length>0){const{parentLookup:e,nodeOrigin:t}=h(),o=(0,s.r8)(n,r,e,t);i.push(...o)}a(i)},triggerNodeChanges:e=>{const{onNodesChange:t,setNodes:n,nodes:o,hasDefaultNodes:i,debug:r}=h();null!==e&&void 0!==e&&e.length&&(i&&n(se(e,o)),r&&console.log("React Flow: trigger node changes",e),null===t||void 0===t||t(e))},triggerEdgeChanges:e=>{const{onEdgesChange:t,setEdges:n,edges:o,hasDefaultEdges:i,debug:r}=h();null!==e&&void 0!==e&&e.length&&(i&&n(ce(e,o)),r&&console.log("React Flow: trigger edge changes",e),null===t||void 0===t||t(e))},addSelectedNodes:e=>{const{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:i,triggerEdgeChanges:r}=h();t?i(e.map((e=>de(e,!0)))):(i(ue(o,new Set([...e]),!0)),r(ue(n)))},addSelectedEdges:e=>{const{multiSelectionActive:t,edgeLookup:n,nodeLookup:o,triggerNodeChanges:i,triggerEdgeChanges:r}=h();t?r(e.map((e=>
2de(e,!0)))):(r(ue(n,new Set([...e]))),i(ue(o,new Set,!0)))},unselectNodesAndEdges:function(){let{nodes:e,edges:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{edges:n,nodes:o,nodeLookup:i,triggerNodeChanges:r,triggerEdgeChanges:a}=h(),l=t||n,s=(e||o).map((e=>{const t=i.get(e.id);return t&&(t.selected=!1),de(e.id,!1)})),c=l.map((e=>de(e.id,!1)));r(s),a(c)},setMinZoom:t=>{const{panZoom:n,maxZoom:o}=h();null===n||void 0===n||n.setScaleExtent([t,o]),e({minZoom:t})},setMaxZoom:t=>{const{panZoom:n,minZoom:o}=h();null===n||void 0===n||n.setScaleExtent([o,t]),e({maxZoom:t})},setTranslateExtent:t=>{var n;null===(n=h().panZoom)||void 0===n||n.setTranslateExtent(t),e({translateExtent:t})},setPaneClickDistance:e=>{var t;null===(t=h().panZoom)||void 0===t||t.setClickDistance(e)},resetSelectedElements:()=>{const{edges:e,nodes:t,triggerNodeChanges:n,triggerEdgeChanges:o}=h(),i=t.reduce(((e,t)=>t.selected?[...e,de(t.id,!1)]:e),[]),r=e.reduce(((e,t)=>t.selected?[...e,de(t.id,!1)]:e),[]);n(i),o(r)},setNodeExtent:t=>{const{nodes:n,nodeLookup:o,parentLookup:i,nodeOrigin:r,elevateNodesOnSelect:a,nodeExtent:l}=h();t[0][0]===l[0][0]&&t[0][1]===l[0][1]&&t[1][0]===l[1][0]&&t[1][1]===l[1][1]||((0,s.bi)(n,o,i,{nodeOrigin:r,nodeExtent:t,elevateNodesOnSelect:a,checkEquality:!1}),e({nodeExtent:t}))},panBy:e=>{const{transform:t,width:n,height:o,panZoom:i,translateExtent:r}=h();return(0,s.No)({delta:e,panZoom:i,transform:t,translateExtent:r,width:n,height:o})},fitView:e=>{const{panZoom:t,width:n,height:o,minZoom:i,maxZoom:r,nodeLookup:a}=h();if(!t)return Promise.resolve(!1);const l=(0,s.YV)(a,e);return(0,s.Pr)({nodes:l,width:n,height:o,panZoom:t,minZoom:i,maxZoom:r},e)},fitViewSync:e=>{const{panZoom:t,width:n,height:o,minZoom:i,maxZoom:r,nodeLookup:a}=h();if(!t)return!1;const l=(0,s.YV)(a,e);return(0,s.Pr)({nodes:l,width:n,height:o,panZoom:t,minZoom:i,maxZoom:r},e),l.size>0},cancelConnection:()=>{e({connection:(0,o.A)({},s.bK)})},updateConnection:t=>{e({connection:t})},reset:()=>e((0,o.A)({},Ut()))}),f=Object.is,h?v(h,f):v;var h,f};function $t(e){let{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:i,initialWidth:l,initialHeight:s,fitView:c,nodeOrigin:d,nodeExtent:u,children:h}=e;const[f]=(0,a.useState)((()=>Qt({nodes:t,edges:n,defaultNodes:o,defaultEdges:i,width:l,height:s,fitView:c,nodeOrigin:d,nodeExtent:u})));return(0,r.jsx)(N,{value:f,children:(0,r.jsx)(we,{children:h})})}function Jt(e){let{children:t,nodes:n,edges:o,defaultNodes:i,defaultEdges:l,width:s,height:c,fitView:d,nodeOrigin:u,nodeExtent:h}=e;return(0,a.useContext)(M)?(0,r.jsx)(r.Fragment,{children:t}):(0,r.jsx)($t,{initialNodes:n,initialEdges:o,defaultNodes:i,defaultEdges:l,initialWidth:s,initialHeight:c,fitView:d,nodeOrigin:u,nodeExtent:h,children:t})}const en={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};var tn=ve((function(e,t){let{nodes:n,edges:c,defaultNodes:d,defaultEdges:u,className:h,nodeTypes:f,edgeTypes:g,onNodeClick:p,onEdgeClick:v,onInit:m,onMove:y,onMoveStart:x,onMoveEnd:w,onConnect:b,onConnectStart:S,onConnectEnd:C,onClickConnectStart:k,onClickConnectEnd:M,onNodeMouseEnter:N,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:P,onNodeDoubleClick:O,onNodeDragStart:z,onNodeDrag:I,onNodeDragStop:D,onNodesDelete:R,onEdgesDelete:L,onDelete:B,onSelectionChange:H,onSelectionDragStart:T,onSelectionDrag:X,onSelectionDragStop:Z,onSelectionContextMenu:Y,onSelectionStart:F,onSelectionEnd:W,onBeforeDelete:U,connectionMode:Q,connectionLineType:$=s.Do.Bezier,connectionLineStyle:te,connectionLineComponent:ne,connectionLineContainerStyle:oe,deleteKeyCode:ie="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:ae=!1,selectionMode:le=s.Qc.Full,panActivationKeyCode:se="Space",multiSelectionKeyCode:ce=((0,s.Ue)()?"Meta":"Control"),zoomActivationKeyCode:de=((0,s.Ue)()?"Meta":"Control"),snapToGri
2d:ue,snapGrid:he,onlyRenderVisibleElements:fe=!1,selectNodesOnDrag:ge,nodesDraggable:pe,nodesConnectable:ve,nodesFocusable:me,nodeOrigin:ye=G,edgesFocusable:xe,edgesReconnectable:we,elementsSelectable:be=!0,defaultViewport:Se=q,minZoom:Ce=.5,maxZoom:Ee=2,translateExtent:ke=s.ZO,preventScrolling:Me=!0,nodeExtent:Ne,defaultMarkerColor:_e="#b1b1b7",zoomOnScroll:Ae=!0,zoomOnPinch:Pe=!0,panOnScroll:Oe=!1,panOnScrollSpeed:ze=.5,panOnScrollMode:Ie=s.ny.Free,zoomOnDoubleClick:De=!0,panOnDrag:Re=!0,onPaneClick:Le,onPaneMouseEnter:Be,onPaneMouseMove:je,onPaneMouseLeave:He,onPaneScroll:Te,onPaneContextMenu:Ve,paneClickDistance:Xe=0,nodeClickDistance:Ze=0,children:Ye,onReconnect:Fe,onReconnectStart:We,onReconnectEnd:Ke,onEdgeContextMenu:Ge,onEdgeDoubleClick:qe,onEdgeMouseEnter:Ue,onEdgeMouseMove:Qe,onEdgeMouseLeave:$e,reconnectRadius:Je=10,onNodesChange:et,onEdgesChange:tt,noDragClassName:nt="nodrag",noWheelClassName:ot="nowheel",noPanClassName:it="nopan",fitView:rt,fitViewOptions:at,connectOnClick:lt,attributionPosition:st,proOptions:ct,defaultEdgeOptions:dt,elevateNodesOnSelect:ut,elevateEdgesOnSelect:ht,disableKeyboardA11y:ft=!1,autoPanOnConnect:gt,autoPanOnNodeDrag:pt,autoPanSpeed:vt,connectionRadius:mt,isValidConnection:yt,onError:xt,style:wt,id:bt,nodeDragThreshold:St,viewport:Ct,onViewportChange:Et,width:kt,height:Mt,colorMode:Nt="light",debug:_t,onScroll:At}=e,Pt=(0,i.A)(e,E);const Ot=bt||"1",zt=function(e){var t;const[n,o]=(0,a.useState)("system"===e?null:e);return(0,a.useEffect)((()=>{if("system"!==e)return void o(e);const t=ee(),n=()=>o(null!==t&&void 0!==t&&t.matches?"dark":"light");return n(),null===t||void 0===t||t.addEventListener("change",n),()=>{null===t||void 0===t||t.removeEventListener("change",n)}}),[e]),null!==n?n:null!==(t=ee())&&void 0!==t&&t.matches?"dark":"light"}(Nt),It=(0,a.useCallback)((e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),null===At||void 0===At||At(e)}),[At]);return(0,r.jsx)("div",(0,o.A)((0,o.A)({"data-testid":"rf__wrapper"},Pt),{},{onScroll:It,style:(0,o.A)((0,o.A)({},wt),en),ref:t,className:l(["react-flow",h,zt]),id:bt,children:(0,r.jsxs)(Jt,{nodes:n,edges:c,width:kt,height:Mt,fitView:rt,nodeOrigin:ye,nodeExtent:Ne,children:[(0,r.jsx)(qt,{onInit:m,onNodeClick:p,onEdgeClick:v,onNodeMouseEnter:N,onNodeMouseMove:_,onNodeMouseLeave:A,onNodeContextMenu:P,onNodeDoubleClick:O,nodeTypes:f,edgeTypes:g,connectionLineType:$,connectionLineStyle:te,connectionLineComponent:ne,connectionLineContainerStyle:oe,selectionKeyCode:re,selectionOnDrag:ae,selectionMode:le,deleteKeyCode:ie,multiSelectionKeyCode:ce,panActivationKeyCode:se,zoomActivationKeyCode:de,onlyRenderVisibleElements:fe,defaultViewport:Se,translateExtent:ke,minZoom:Ce,maxZoom:Ee,preventScrolling:Me,zoomOnScroll:Ae,zoomOnPinch:Pe,zoomOnDoubleClick:De,panOnScroll:Oe,panOnScrollSpeed:ze,panOnScrollMode:Ie,panOnDrag:Re,onPaneClick:Le,onPaneMouseEnter:Be,onPaneMouseMove:je,onPaneMouseLeave:He,onPaneScroll:Te,onPaneContextMenu:Ve,paneClickDistance:Xe,nodeClickDistance:Ze,onSelectionContextMenu:Y,onSelectionStart:F,onSelectionEnd:W,onReconnect:Fe,onReconnectStart:We,onReconnectEnd:Ke,onEdgeContextMenu:Ge,onEdgeDoubleClick:qe,onEdgeMouseEnter:Ue,onEdgeMouseMove:Qe,onEdgeMouseLeave:$e,reconnectRadius:Je,defaultMarkerColor:_e,noDragClassName:nt,noWheelClassName:ot,noPanClassName:it,rfId:Ot,disableKeyboardA11y:ft,nodeExtent:Ne,viewport:Ct,onViewportChange:Et}),(0,r.jsx)(J,{nodes:n,edges:c,defaultNodes:d,defaultEdges:u,onConnect:b,onConnectStart:S,onConnectEnd:C,onClickConnectStart:k,onClickConnectEnd:M,nodesDraggable:pe,nodesConnectable:ve,nodesFocusable:me,edgesFocusable:xe,edgesReconnectable:we,elementsSelectable:be,elevateNodesOnSelect:ut,elevateEdgesOnSelect:ht,minZoom:Ce,maxZoom:Ee,nodeExtent:Ne,onNodesChange:et,onEdgesChange:tt,snapToGrid:ue,snapGrid:he,connectionMode:Q,translateExtent:ke,connectOnClick:lt,defaultEdgeOptions:dt,fitView:rt,fitViewOptions:at,onNodesDelete:R,onEdgesDelete:L,onDelete:B,onNodeDragStart:z,onNodeDrag:I,onNodeDragStop:D,onSelectionDrag:X,onSelectionDragStart:T,onSelectionDragStop:Z,onMove:y,onMoveStart:x,onMoveEnd:w,noPanClassName:it,nodeOrigin:ye,rfId:Ot,autoPanOnConnect:gt,autoPanOnNodeDrag:pt,autoPanSpeed:vt,onError:xt,connectionRadius:mt,isValidConnection:yt,selectNodesOnDrag:ge,nodeDragThreshold:St,onBeforeDelete:U,paneClickDistance:Xe,debug:_t}),(0,r.jsx)(K,{onSelectionChange:H}),Ye,(0,r.jsx)(V,{proOptions:ct,position:st}),(0,r.jsx)(j,{rfId:Ot,disableKeyboardA11y:ft})]})}))}));const nn=e=>{var t;return null===(t=e.domNode)||void 0===t?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function on(e){let{children:t}=e;const n=A(nn);return n?(0,y.createPortal)(t,n):null}function rn(){const e=P();return(0,a.useCallback)((t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),i=Array.isArray(t)?t:[t],r=new Map;
2i.forEach((e=>{const t=null===n||void 0===n?void 0:n.querySelector('.react-flow__node[data-id="'.concat(e,'"]'));t&&r.set(e,{id:e,nodeElement:t,force:!0})})),requestAnimationFrame((()=>o(r,{triggerFitView:!1})))}),[])}s.xc.error014();function an(e){let{dimensions:t,lineWidth:n,variant:o,className:i}=e;return(0,r.jsx)("path",{strokeWidth:n,d:"M".concat(t[0]/2," 0 V").concat(t[1]," M0 ").concat(t[1]/2," H").concat(t[0]),className:l(["react-flow__background-pattern",o,i])})}function ln(e){let{radius:t,className:n}=e;return(0,r.jsx)("circle",{cx:t,cy:t,r:t,className:l(["react-flow__background-pattern","dots",n])})}var sn;!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}(sn||(sn={}));const cn={[sn.Dots]:1,[sn.Lines]:1,[sn.Cross]:6},dn=e=>({transform:e.transform,patternId:"pattern-".concat(e.rfId)});function un(e){let{id:t,variant:n=sn.Dots,gap:i=20,size:s,lineWidth:c=1,offset:d=0,color:u,bgColor:h,style:f,className:g,patternClassName:p}=e;const v=(0,a.useRef)(null),{transform:y,patternId:x}=A(dn,m),w=s||cn[n],b=n===sn.Dots,S=n===sn.Cross,C=Array.isArray(i)?i:[i,i],E=[C[0]*y[2]||1,C[1]*y[2]||1],k=w*y[2],M=Array.isArray(d)?d:[d,d],N=S?[k,k]:E,_=[M[0]*y[2]||1+N[0]/2,M[1]*y[2]||1+N[1]/2],P="".concat(x).concat(t||"");return(0,r.jsxs)("svg",{className:l(["react-flow__background",g]),style:(0,o.A)((0,o.A)((0,o.A)({},f),Me),{},{"--xy-background-color-props":h,"--xy-background-pattern-color-props":u}),ref:v,"data-testid":"rf__background",children:[(0,r.jsx)("pattern",{id:P,x:y[0]%E[0],y:y[1]%E[1],width:E[0],height:E[1],patternUnits:"userSpaceOnUse",patternTransform:"translate(-".concat(_[0],",-").concat(_[1],")"),children:b?(0,r.jsx)(ln,{radius:k/2,className:p}):(0,r.jsx)(an,{dimensions:N,lineWidth:c,variant:n,className:p})}),(0,r.jsx)("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(P,")")})]})}un.displayName="Background";const hn=(0,a.memo)(un);function fn(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:(0,r.jsx)("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function gn(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:(0,r.jsx)("path",{d:"M0 0h32v4.2H0z"})})}function pn(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:(0,r.jsx)("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function vn(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,r.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function mn(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:(0,r.jsx)("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function yn(e){let{children:t,className:n}=e,a=(0,i.A)(e,k);return(0,r.jsx)("button",(0,o.A)((0,o.A)({type:"button",className:l(["react-flow__controls-button",n])},a),{},{children:t}))}const xn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom});
2function wn(e){let{style:t,showZoom:n=!0,showFitView:o=!0,showInteractive:i=!0,fitViewOptions:a,onZoomIn:s,onZoomOut:c,onFitView:d,onInteractiveChange:u,className:h,children:f,position:g="bottom-left",orientation:p="vertical","aria-label":v="React Flow controls"}=e;const y=P(),{isInteractive:x,minZoomReached:w,maxZoomReached:b}=A(xn,m),{zoomIn:S,zoomOut:C,fitView:E}=Se(),k="horizontal"===p?"horizontal":"vertical";return(0,r.jsxs)(T,{className:l(["react-flow__controls",k,h]),position:g,style:t,"data-testid":"rf__controls","aria-label":v,children:[n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(yn,{onClick:()=>{S(),null===s||void 0===s||s()},className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:b,children:(0,r.jsx)(fn,{})}),(0,r.jsx)(yn,{onClick:()=>{C(),null===c||void 0===c||c()},className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:w,children:(0,r.jsx)(gn,{})})]}),o&&(0,r.jsx)(yn,{className:"react-flow__controls-fitview",onClick:()=>{E(a),null===d||void 0===d||d()},title:"fit view","aria-label":"fit view",children:(0,r.jsx)(pn,{})}),i&&(0,r.jsx)(yn,{className:"react-flow__controls-interactive",onClick:()=>{y.setState({nodesDraggable:!x,nodesConnectable:!x,elementsSelectable:!x}),null===u||void 0===u||u(!x)},title:"toggle interactivity","aria-label":"toggle interactivity",children:x?(0,r.jsx)(mn,{}):(0,r.jsx)(vn,{})}),f]})}wn.displayName="Controls";const bn=(0,a.memo)(wn);const Sn=(0,a.memo)((function(e){let{id:t,x:n,y:o,width:i,height:a,style:s,color:c,strokeColor:d,strokeWidth:u,className:h,borderRadius:f,shapeRendering:g,selected:p,onClick:v}=e;const{background:m,backgroundColor:y}=s||{},x=c||m||y;return(0,r.jsx)("rect",{className:l(["react-flow__minimap-node",{selected:p},h]),x:n,y:o,rx:f,ry:f,width:i,height:a,style:{fill:x,stroke:d,strokeWidth:u},shapeRendering:g,onClick:v?e=>v(e,t):void 0})})),Cn=e=>e.nodes.map((e=>e.id)),En=e=>e instanceof Function?e:()=>e;const kn=(0,a.memo)((function(e){let{id:t,nodeColorFunc:n,nodeStrokeColorFunc:o,nodeClassNameFunc:i,nodeBorderRadius:a,nodeStrokeWidth:l,shapeRendering:c,NodeComponent:d,onClick:u}=e;const{node:h,x:f,y:g,width:p,height:v}=A((e=>{const n=e.nodeLookup.get(t),{x:o,y:i}=n.internals.positionAbsolute,{width:r,height:a}=(0,s.uD)(n);return{node:n,x:o,y:i,width:r,height:a}}),m);return h&&!h.hidden&&(0,s.QE)(h)?(0,r.jsx)(d,{x:f,y:g,width:p,height:v,style:h.style,selected:!!h.selected,className:i(h),color:n(h),borderRadius:a,strokeColor:o(h),strokeWidth:l,shapeRendering:c,onClick:u,id:h.id}):null}));var Mn=(0,a.memo)((function(e){let{nodeStrokeColor:t,nodeColor:n,nodeClassName:o="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:l=Sn,onClick:s}=e;const c=A(Cn,m),d=En(n),u=En(t),h=En(o),f="undefined"===typeof window||window.chrome?"crispEdges":"geometricPrecision";return(0,r.jsx)(r.Fragment,{children:c.map((e=>(0,r.jsx)(kn,{id:e,nodeColorFunc:d,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:i,nodeStrokeWidth:a,NodeComponent:l,onClick:s,shapeRendering:f},e)))})}));const Nn=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?(0,s.Mi)((0,s.aZ)(e.nodeLookup),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height}};function _n(e){var t,n;let{style:i,className:c,nodeStrokeColor:d,nodeColor:u,nodeClassName:h="",nodeBorderRadius:f=5,nodeStrokeWidth:g,nodeComponent:p,bgColor:v,maskColor:y,maskStrokeColor:x,maskStrokeWidth:w,position:b="bottom-right",onClick:S,onNodeClick:C,pannable:E=!1,zoomable:k=!1,ariaLabel:M="React Flow mini map",inversePan:N,zoomStep:_=10,offsetScale:O=5}=e;const z=P(),I=(0,a.useRef)(null),{boundingRect:D,viewBB:R,rfId:L,panZoom:B,translateExtent:j,flowWidth:H,flowHeight:V}=A(Nn,m),X=null!==(t=null===i||void 0===i?void 0:i.width)&&void 0!==t?t:200,Z=null!==(n=null===i||void 0===i?void 0:i.height)&&void 0!==n?n:150,Y=D.width/X,F=D.height/Z,W=Math.max(Y,F),K=W*X,G=W*Z,q=O*W,U=D.x-(K-D.width)/2-q,Q=D.y-(G-D.height)/2-q,$=K+2*q,J=G+2*q,ee="".concat("react-flow__minimap-desc","-").concat(L),te=(0,a.useRef)(0),ne=(0,a.useRef)();te.current=W,(0,a.useEffect)((()=>
2{if(I.current&&B)return ne.current=(0,s.di)({domNode:I.current,panZoom:B,getTransform:()=>z.getState().transform,getViewScale:()=>te.current}),()=>{var e;null===(e=ne.current)||void 0===e||e.destroy()}}),[B]),(0,a.useEffect)((()=>{var e;null===(e=ne.current)||void 0===e||e.update({translateExtent:j,width:H,height:V,inversePan:N,pannable:E,zoomStep:_,zoomable:k})}),[E,k,N,_,j,H,V]);const oe=S?e=>{var t;const[n,o]=(null===(t=ne.current)||void 0===t?void 0:t.pointer(e))||[0,0];S(e,{x:n,y:o})}:void 0,ie=C?(0,a.useCallback)(((e,t)=>{const n=z.getState().nodeLookup.get(t);C(e,n)}),[]):void 0;return(0,r.jsx)(T,{position:b,style:(0,o.A)((0,o.A)({},i),{},{"--xy-minimap-background-color-props":"string"===typeof v?v:void 0,"--xy-minimap-mask-background-color-props":"string"===typeof y?y:void 0,"--xy-minimap-mask-stroke-color-props":"string"===typeof x?x:void 0,"--xy-minimap-mask-stroke-width-props":"number"===typeof w?w*W:void 0,"--xy-minimap-node-background-color-props":"string"===typeof u?u:void 0,"--xy-minimap-node-stroke-color-props":"string"===typeof d?d:void 0,"--xy-minimap-node-stroke-width-props":"string"===typeof g?g:void 0}),className:l(["react-flow__minimap",c]),"data-testid":"rf__minimap",children:(0,r.jsxs)("svg",{width:X,height:Z,viewBox:"".concat(U," ").concat(Q," ").concat($," ").concat(J),className:"react-flow__minimap-svg",role:"img","aria-labelledby":ee,ref:I,onClick:oe,children:[M&&(0,r.jsx)("title",{id:ee,children:M}),(0,r.jsx)(Mn,{onClick:ie,nodeColor:u,nodeStrokeColor:d,nodeBorderRadius:f,nodeClassName:h,nodeStrokeWidth:g,nodeComponent:p}),(0,r.jsx)("path",{className:"react-flow__minimap-mask",d:"M".concat(U-q,",").concat(Q-q,"h").concat($+2*q,"v").concat(J+2*q,"h").concat(-$-2*q,"z\n M").concat(R.x,",").concat(R.y,"h").concat(R.width,"v").concat(R.height,"h").concat(-R.width,"z"),fillRule:"evenodd",pointerEvents:"none"})]})})}_n.displayName="MiniMap";(0,a.memo)(_n);(0,a.memo)((function(e){let{nodeId:t,position:n,variant:i=s.xN.Handle,className:c,style:d={},children:u,color:h,minWidth:f=10,minHeight:g=10,maxWidth:p=Number.MAX_VALUE,maxHeight:v=Number.MAX_VALUE,keepAspectRatio:m=!1,shouldResize:y,onResizeStart:x,onResize:w,onResizeEnd:b}=e;const S=Te(),C="string"===typeof t?t:S,E=P(),k=(0,a.useRef)(null),M=i===s.xN.Line?"right":"bottom-right",N=null!==n&&void 0!==n?n:M,_=(0,a.useRef)(null);(0,a.useEffect)((()=>{if(k.current&&C)return _.current||(_.current=(0,s.ET)({domNode:k.current,nodeId:C,getStoreItems:()=>
2{const{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:o,nodeOrigin:i,domNode:r}=E.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:o,nodeOrigin:i,paneDomNode:r}},onChange:(e,t)=>{const{triggerNodeChanges:n,nodeLookup:i,parentLookup:r,nodeOrigin:a}=E.getState(),l=[],c={x:e.x,y:e.y},d=i.get(C);if(d&&d.expandParent&&d.parentId){var u,h,f,g,p,v,m;const t=null!==(u=d.origin)&&void 0!==u?u:a,n=null!==(h=null!==(f=e.width)&&void 0!==f?f:d.measured.width)&&void 0!==h?h:0,y=null!==(g=null!==(p=e.height)&&void 0!==p?p:d.measured.height)&&void 0!==g?g:0,x={id:d.id,parentId:d.parentId,rect:(0,o.A)({width:n,height:y},(0,s.us)({x:null!==(v=e.x)&&void 0!==v?v:d.position.x,y:null!==(m=e.y)&&void 0!==m?m:d.position.y},{width:n,height:y},d.parentId,i,t))},w=(0,s.r8)([x],i,r,a);l.push(...w),c.x=e.x?Math.max(t[0]*n,e.x):void 0,c.y=e.y?Math.max(t[1]*y,e.y):void 0}if(void 0!==c.x&&void 0!==c.y){const e={id:C,type:"position",position:(0,o.A)({},c)};l.push(e)}if(void 0!==e.width&&void 0!==e.height){const t={id:C,type:"dimensions",resizing:!0,setAttributes:!0,dimensions:{width:e.width,height:e.height}};l.push(t)}for(const s of t){const e=(0,o.A)((0,o.A)({},s),{},{type:"position"});l.push(e)}n(l)},onEnd:()=>{const e={id:C,type:"dimensions",resizing:!1};E.getState().triggerNodeChanges([e])}})),_.current.update({controlPosition:N,boundaries:{minWidth:f,minHeight:g,maxWidth:p,maxHeight:v},keepAspectRatio:m,onResizeStart:x,onResize:w,onResizeEnd:b,shouldResize:y}),()=>{var e;null===(e=_.current)||void 0===e||e.destroy()}}),[N,f,g,p,v,m,x,w,b,y]);const A=N.split("-"),O=i===s.xN.Line?"borderColor":"backgroundColor",z=h?(0,o.A)((0,o.A)({},d),{},{[O]:h}):d;return(0,r.jsx)("div",{className:l(["react-flow__resize-control","nodrag",...A,i,c]),ref:k,style:z,children:u})}))},55108:(e,t,n)=>{n.d(t,{Do:()=>En,WZ:()=>wn,TG:()=>kn,ny:()=>bn,yX:()=>Mn,xN:()=>wi,Qc:()=>Sn,I$:()=>oi,aQ:()=>di,di:()=>ui,kO:()=>xi,ET:()=>_i,rN:()=>Ao,bi:()=>Wo,_s:()=>ho,aE:()=>Hn,Hm:()=>Vo,KE:()=>to,tn:()=>xn,xc:()=>mn,us:()=>uo,Pr:()=>jn,e_:()=>bo,Fp:()=>Eo,Mi:()=>Qn,HF:()=>_n,Eo:()=>go,b5:()=>Lo,Tq:()=>Tn,qX:()=>Mo,q1:()=>xo,YV:()=>Bn,oj:()=>po,aZ:()=>Dn,aW:()=>To,uD:()=>so,Jo:()=>In,U$:()=>Rn,X6:()=>$n,oN:()=>Do,ah:()=>Po,R4:()=>ro,r8:()=>qo,ZO:()=>yn,bK:()=>Cn,b$:()=>An,uj:()=>No,v5:()=>mo,Ue:()=>ao,Er:()=>yo,oB:()=>Pn,kf:()=>eo,mW:()=>Jn,QE:()=>co,kM:()=>qn,No:()=>Qo,Ff:()=>oo,zj:()=>io,s_:()=>no,vS:()=>Fo,qn:()=>Jo,uL:()=>Uo});var o=n(80045),i=n(89379),r={value:()=>{}};function a(){for(var e,t=0,n=arguments.length,o={};t<n;++t){if(!(e=arguments[t]+"")||e in o||/[\s.]/.test(e))throw new Error("illegal type: "+e);o[e]=[]}return new l(o)}function l(e){this._=e}function s(e,t){for(var n,o=0,i=e.length;o<i;++o)if((n=e[o]).name===t)return n.value}function c(e,t,n){for(var o=0,i=e.length;o<i;++o)if(e[o].name===t){e[o]=r,e=e.slice(0,o).concat(e.slice(o+1));break}return null!=n&&e.push({name:t,value:n}),e}l.prototype=a.prototype={constructor:l,on:function(e,t){var n,o,i=this._,r=(o=i,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!o.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),a=-1,l=r.length;if(!(arguments.length<2)){if(null!=t&&"function"!==typeof t)throw new Error("invalid callback: "+t);for(;++a<l;)if(n=(e=r[a]).type)i[n]=c(i[n],e.name,t);else if(null==t)for(n in i)i[n]=c(i[n],e.name,null);return this}for(;++a<l;)if((n=(e=r[a]).type)&&(n=s(i[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new l(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,o,i=new Array(n),r=0;r<n;++r)i[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(r=0,n=(o=this._[e]).length;r<n;++r)o[r].value.apply(t,i)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],i=0,r=o.length;i<r;++i)o[i].value.apply(t,n)}};const d=a;function u(){}function h(e){return null==e?u:function(){return this.querySelector(e)}}function f(){return[]}function g(e){return null==e?f:function(){return this.querySelectorAll(e)}}function p(e){return function(){return null==(t=e.apply(this,arguments))?[]:Array.isArray(t)?t:Array.from(t);var t}}function v(e){return function(){return this.matches(e)}}function m(e){return function(t){return t.matches(e)}}var y=Array.prototype.find;function x(){return this.firstElementChild}var w=Array.prototype.filter;function b(){return Array.from(this.children)}function S(e){return new Array(e.length)}function C(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function E(e,t,n,o,i,r){for(var a,l=0,s=t.length,c=r.length;l<c;++l)(a=t[l])?(a.__data__=r[l],o[l]=a):n[l]=new C(e,r[l]);for(;l<s;++l)(a=t[l])&&(i[l]=a)}function k(e,t,n,o,i,r,a){var l,s,c,d=new Map,u=t.length,h=r.length,f=new Array(u);for(l=0;l<u;++l)(s=t[l])&&(f[l]=c=a.call(s,s.__data__,l,t)+"",d.has(c)?i[l]=s:d.set(c,s));for(l=0;l<h;++l)c=a.call(e,r[l],l,r)+"",(s=d.get(c))?(o[l]=s,s.__data__=r[l],d.delete(c)):n[l]=new C(e,r[l]);for(l=0;l<u;++l)(s=t[l])&&d.get(f[l])===s&&(i[l]=s)}function M(e){return e.__data__}function N(e){return"object"===typeof e&&"length"in e?e:Array.from(e)}function _(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}C.prototype={constructor:C,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};var A="http://www.w3.org/1999/xhtml";const P={svg:"http://www.w3.org/2000/svg",xhtml:A,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function O(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),P.hasOwnProperty(t)?{space:P[t],local:e}:e}function z(e){return function(){this.removeAttribute(e)}}function I(e){return function(){this.removeAttributeNS(e.space,e.local)}}function D(e,t){return function(){this.setAttribute(e,t)}}function R(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function L(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function B(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function j(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function H(e){return function(){this.style.removeProperty(e)}}function T(e,t,n){return function(){this.style.setProperty(e,t,n)}}
vendor: 4,149 bytes, line 2
2function V(e,t,n){return function(){var o=t.apply(this,arguments);null==o?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function X(e,t){return e.style.getPropertyValue(t)||j(e).getComputedStyle(e,null).getPropertyValue(t)}function Z(e){return function(){delete this[e]}}function Y(e,t){return function(){this[e]=t}}function F(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function W(e){return e.trim().split(/^|\s+/)}function K(e){return e.classList||new G(e)}function G(e){this._node=e,this._names=W(e.getAttribute("class")||"")}function q(e,t){for(var n=K(e),o=-1,i=t.length;++o<i;)n.add(t[o])}function U(e,t){for(var n=K(e),o=-1,i=t.length;++o<i;)n.remove(t[o])}function Q(e){return function(){q(this,e)}}function $(e){return function(){U(this,e)}}function J(e,t){return function(){(t.apply(this,arguments)?q:U)(this,e)}}function ee(){this.textContent=""}function te(e){return function(){this.textContent=e}}function ne(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function oe(){this.innerHTML=""}function ie(e){return function(){this.innerHTML=e}}function re(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function ae(){this.nextSibling&&this.parentNode.appendChild(this)}function le(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function se(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===A&&t.documentElement.namespaceURI===A?t.createElement(e):t.createElementNS(n,e)}}function ce(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function de(e){var t=O(e);return(t.local?ce:se)(t)}function ue(){return null}function he(){var e=this.parentNode;e&&e.removeChild(this)}function fe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function ge(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function pe(e){return function(){var t=this.__on;if(t){for(var n,o=0,i=-1,r=t.length;o<r;++o)n=t[o],e.type&&n.type!==e.type||n.name!==e.name?t[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?t.length=i:delete this.__on}}}function ve(e,t,n){return function(){var o,i=this.__on,r=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(i)for(var a=0,l=i.length;a<l;++a)if((o=i[a]).type===e.type&&o.name===e.name)return this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=r,o.options=n),void(o.value=t);this.addEventListener(e.type,r,n),o={type:e.type,name:e.name,value:t,listener:r,options:n},i?i.push(o):this.__on=[o]}}function me(e,t,n){var o=j(e),i=o.CustomEvent;"function"===typeof i?i=new i(t,n):(i=o.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function ye(e,t){return function(){return me(this,e,t)}}function xe(e,t){return function(){return me(this,e,t.apply(this,arguments))}}G.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var we=[null];function be(e,t){this._groups=e,this._parents=t}function Se(){return new be([[document.documentElement]],we)}be.prototype=Se.prototype={constructor:be,select:function(e){"function"!==typeof e&&(e=h(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a,l=t[i],s=l.length,c=o[i]=new Array(s),d=0;d<s;++d)(r=l[d])&&(a=e.call(r,r.__data__,d,l))&&("__data__"in r&&(a.__data__=r.__data__),c[d]=a);return new be(o,this._parents)},selectAll:function(e){e="function"===typeof e?p(e):g(e);for(var t=this._groups,n=t.length,o=[],i=[],r=0;r<n;++r)for(var a,l=t[r],s=l.length,c=0;c<s;++c)(a=l[c])&&(o.push(e.call(a,a.__data__,c,l)),i.push(a));return new be(o,i)},selectChild:function(e){return this.select(null==e?x:function(e){return function(){return y.c
vendor: 20,894 bytes, line 2
2all(this.children,e)}}("function"===typeof e?e:m(e)))},selectChildren:function(e){return this.selectAll(null==e?b:function(e){return function(){return w.call(this.children,e)}}("function"===typeof e?e:m(e)))},filter:function(e){"function"!==typeof e&&(e=v(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a=t[i],l=a.length,s=o[i]=[],c=0;c<l;++c)(r=a[c])&&e.call(r,r.__data__,c,a)&&s.push(r);return new be(o,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,M);var n,o=t?k:E,i=this._parents,r=this._groups;"function"!==typeof e&&(n=e,e=function(){return n});for(var a=r.length,l=new Array(a),s=new Array(a),c=new Array(a),d=0;d<a;++d){var u=i[d],h=r[d],f=h.length,g=N(e.call(u,u&&u.__data__,d,i)),p=g.length,v=s[d]=new Array(p),m=l[d]=new Array(p);o(u,h,v,m,c[d]=new Array(f),g,t);for(var y,x,w=0,b=0;w<p;++w)if(y=v[w]){for(w>=b&&(b=w+1);!(x=m[b])&&++b<p;);y._next=x||null}}return(l=new be(l,i))._enter=s,l._exit=c,l},enter:function(){return new be(this._enter||this._groups.map(S),this._parents)},exit:function(){return new be(this._exit||this._groups.map(S),this._parents)},join:function(e,t,n){var o=this.enter(),i=this,r=this.exit();return"function"===typeof e?(o=e(o))&&(o=o.selection()):o=o.append(e+""),null!=t&&(i=t(i))&&(i=i.selection()),null==n?r.remove():n(r),o&&i?o.merge(i).order():i},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,i=n.length,r=o.length,a=Math.min(i,r),l=new Array(i),s=0;s<a;++s)for(var c,d=n[s],u=o[s],h=d.length,f=l[s]=new Array(h),g=0;g<h;++g)(c=d[g]||u[g])&&(f[g]=c);for(;s<i;++s)l[s]=n[s];return new be(l,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o,i=e[t],r=i.length-1,a=i[r];--r>=0;)(o=i[r])&&(a&&4^o.compareDocumentPosition(a)&&a.parentNode.insertBefore(o,a),a=o);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=_);for(var n=this._groups,o=n.length,i=new Array(o),r=0;r<o;++r){for(var a,l=n[r],s=l.length,c=i[r]=new Array(s),d=0;d<s;++d)(a=l[d])&&(c[d]=a);c.sort(t)}return new be(i,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],i=0,r=o.length;i<r;++i){var a=o[i];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var i,r=t[n],a=0,l=r.length;a<l;++a)(i=r[a])&&e.call(i,i.__data__,a,r);return this},attr:function(e,t){var n=O(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((null==t?n.local?I:z:"function"===typeof t?n.local?B:L:n.local?R:D)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?H:"function"===typeof t?V:T)(e,t,null==n?"":n)):X(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Z:"function"===typeof t?F:Y)(e,t)):this.node()[e]},classed:function(e,t){var n=W(e+"");if(arguments.length<2){for(var o=K(this.node()),i=-1,r=n.length;++i<r;)if(!o.contains(n[i]))return!1;return!0}return this.each(("function"===typeof t?J:t?Q:$)(n,t))},text:function(e){return arguments.length?this.each(null==e?ee:("function"===typeof e?ne:te)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?oe:("function"===typeof e?re:ie)(e)):this.node().innerHTML},raise:function(){return this.each(ae)},lower:function(){return this.each(le)},append:function(e){var t="function"===typeof e?e:de(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"===typeof e?e:de(e),o=null==t?ue:"function"===typeof t?t:h(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)}))},remove:function(){return this.each(he)},clone:function(e){return this.select(e?ge:fe)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var o,i,r=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),a=r.length;if(!(arguments.length<2)){for(l=t?ve:pe,o=0;o<a;++o)this.each(l(r[o],t,n));return this}var l=this.node().__on;if(l)for(var s,c=0,d=l.length;c<d;++c)for(o=0,s=l[c];o<a;++o)if((i=r[o]).type===s.type&&i.name===s.name)return s.value},dispatch:function(e,t){return this.each(("function"===typeof t?xe:ye)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o,i=e[t],r=0,a=i.length;r<a;++r)(o=i[r])&&(yield o)}};const Ce=Se;function Ee(e){return"string"===typeof e?new be([[document.querySelector(e)]],[document.documentElement]):new be([[e]],we)}function ke(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,[(o=o.matrixTransform(t.getScreenCTM().inverse())).x,o.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const Me={passive:!1},Ne={capture:!0,passive:!1};function _e(e){e.stopImmediatePropagation()}function Ae(e){e.preventDefault(),e.stopImmediatePropagation()}function Pe(e){var t=e.document.documentElement,n=Ee(e).on("dragstart.drag",Ae,Ne);"onselectstart"in t?n.on("selectstart.drag",Ae,Ne):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Oe(e,t){var n=e.document.documentElement,o=Ee(e).on("dragstart.drag",null);t&&(o.on("click.drag",Ae,Ne),setTimeout((function(){o.on("click.drag",null)}),0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const ze=e=>()=>e;function Ie(e,t){let{sourceEvent:n,subject:o,target:i,identifier:r,active:a,x:l,y:s,dx:c,dy:d,dispatch:u}=t;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:o,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:l,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:u}})}function De(e){return!e.ctrlKey&&!e.button}function Re(){return this.parentNode}function Le(e,t){return null==t?{x:e.x,y:e.y}:t}function Be(){return navigator.maxTouchPoints||"ontouchstart"in this}function je(){var e,t,n,o,i=De,r=Re,a=Le,l=Be,s={},c=d("start","drag","end"),u=0,h=0;function f(e){e.on("mousedown.drag",g).filter(l).on("touchstart.drag",m).on("touchmove.drag",y,Me).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(a,l){if(!o&&i.call(this,a,l)){var s=w(this,r.call(this,a,l),a,l,"mouse");s&&(Ee(a.view).on("mousemove.drag",p,Ne).on("mouseup.drag",v,Ne),Pe(a.view),_e(a),n=!1,e=a.clientX,t=a.clientY,s("start",a))}}function p(o){if(Ae(o),!n){var i=o.clientX-e,r=o.clientY-t;n=i*i+r*r>h}s.mouse("drag",o)}function v(e){Ee(e.view).on("mousemove.drag mouseup.drag",null),Oe(e.view,n),Ae(e),s.mouse("end",e)}function m(e,t){if(i.call(this,e,t)){var n,o,a=e.changedTouches,l=r.call(this,e,t),s=a.length;for(n=0;n<s;++n)(o=w(this,l,e,t,a[n].identifier,a[n]))&&(_e(e),o("start",e,a[n]))}}function y(e){var t,n,o=e.changedTouches,i=o.length;for(t=0;t<i;++t)(n=s[o[t].identifier])&&(Ae(e),n("drag",e,o[t]))}function x(e){var t,n,i=e.changedTouches,r=i.length;for(o&&clearTimeout(o),o=setTimeout((function(){o=null}),500),t=0;t<r;++t)(n=s[i[t].identifier])&&(_e(e),n("end",e,i[t]))}function w(e,t,n,o,i,r){var l,d,h,g=c.copy(),p=ke(r||n,t);if(null!=(h=a.call(e,new Ie("beforestart",{sourceEvent:n,target:f,identifier:i,active:u,x:p[0],y:p[1],dx:0,dy:0,dispatch:g}),o)))return l=h.x-p[0]||0,d=h.y-p[1]||0,function n(r,a,c){var v,m=p;switch(r){case"start":s[i]=n,v=u++;break;case"end":delete s[i],--u;case"drag":p=ke(c||a,t),v=u}g.call(r,e,new Ie(r,{sourceEvent:a,subject:h,target:f,identifier:i,active:v,x:p[0]+l,y:p[1]+d,dx:p[0]-m[0],dy:p[1]-m[1],dispatch:g}),o)}}return f.filter=function(e){return arguments.length?(i="function"===typeof e?e:ze(!!e),f):i},f.container=function(e){return arguments.length?(r="function"===typeof e?e:ze(e),f):r},f.subject=function(e){return arguments.length?(a="function"===typeof e?e:ze(e),f):a},f.touchable=function(e){return arguments.length?(l="function"===typeof e?e:ze(!!e),f):l},f.on=function(){var e=c.on.apply(c,arguments);return e===c?f:e},f.clickDistance=function(e){return arguments.length?(h=(e=+e)*e,f):Math.sqrt(h)},f}Ie.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function He(e){return((e=Math.exp(e))+1/e)/2}const Te=function e(t,n,o){function i(e,i){var r,a,l=e[0],s=e[1],c=e[2],d=i[0],u=i[1],h=i[2],f=d-l,g=u-s,p=f*f+g*g;if(p<1e-12)a=Math.log(h/c)/t,r=function(e){return[l+e*f,s+e*g,c*Math.exp(t*e*a)]};else{var v=Math.sqrt(p),m=(h*h-c*c+o*p)/(2*c*n*v),y=(h*h-c*c-o*p)/(2*h*n*v),x=Math.log(Math.sqrt(m*m+1)-m),w=Math.log(Math.sqrt(y*y+1)-y);a=(w-x)/t,r=function(e){var o,i=e*a,r=He(x),d=c/(n*v)*(r*(o=t*i+x,((o=Math.exp(2*o))-1)/(o+1))-function(e){return((e=Math.exp(e))-1/e)/2}(x));return[l+d*f,s+d*g,c*r/He(t*i+x)]}}return r.duration=1e3*a*t/Math.SQRT2,r}return i.rho=function(t){var n=Math.max(.001,+t),o=n*n;return e(n,o,o*o)},i}(Math.SQRT2,2,4);var Ve,Xe,Ze=0,Ye=0,Fe=0,We=1e3,Ke=0,Ge=0,qe=0,Ue="object"===typeof performance&&performance.now?performance:Date,Qe="object"===typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function $e(){return Ge||(Qe(Je),Ge=Ue.now()+qe)}function Je(){Ge=0}function et(){this._call=this._time=this._next=null}function tt(e,t,n){var o=new et;return o.restart(e,t,n),o}function nt(){Ge=(Ke=Ue.now())+qe,Ze=Ye=0;try{!function(){$e(),++Ze;for(var e,t=Ve;t;)(e=Ge-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Ze}()}finally{Ze=0,function(){var e,t,n=Ve,o=1/0;for(;n;)n._call?(o>n._time&&(o=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Ve=t);Xe=e,it(o)}(),Ge=0}}function ot(){var e=Ue.now(),t=e-Ke;t>We&&(qe-=t,Ke=e)}function it(e){Ze||(Ye&&(Ye=clearTimeout(Ye)),e-Ge>24?(e<1/0&&(Ye=setTimeout(nt,e-Ue.now()-qe)),Fe&&(Fe=clearInterval(Fe))):(Fe||(Ke=Ue.now(),Fe=setInterval(ot,We)),Ze=1,Qe(nt)))}function rt(e,t,n){var o=new et;return t=null==t?0:+t,o.restart((n=>{o.stop(),e(n+t)}),t,n),o}et.prototype=tt.prototype={constructor:et,restart:function(e,t,n){if("function"!==typeof e)throw new TypeError("callback is not a function");n=(null==n?$e():+n)+(null==t?0:+t),this._next||Xe===this||(Xe?Xe._next=this:Ve=this,Xe=this),this._call=e,this._time=n,it()},stop:function(){this._call&&(this._call=null,this._time=1/0,it())}};var at=d("start","end","cancel","interrupt"),lt=[],st=0,ct=1,dt=2,ut=3,ht=4,ft=5,gt=6;function pt(e,t,n,o,i,r){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var o,i=e.__transition;function r(e){n.state=ct,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(r){var c,d,u,h;if(n.state!==ct)return s();for(c in i)if((h=i[c]).name===n.name){if(h.state===ut)return rt(a);h.state===ht?(h.state=gt,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete i[c]):+c<t&&(h.state=gt,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete i[c])}if(rt((function(){n.state===ut&&(n.state=ht,n.timer.restart(l,n.delay,n.time),l(r))})),n.state=dt,n.on.call("start",e,e.__data__,n.index,n.group),n.state===dt){for(n.state=ut,o=new Array(u=n.tween.length),c=0,d=-1;c<u;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=h);o.length=d+1}}function l(t){for(var i=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(s),n.state=ft,1),r=-1,a=o.length;++r<a;)o[r].call(e,i);n.state===ft&&(n.on.call("end",e,e.__data__,n.index,n.group),s())}function s(){for(var o in n.state=gt,n.timer.stop(),delete i[t],i)return;delete e.__transition}i[t]=n,n.timer=tt(r,0,n.time)}(e,n,{name:t,index:o,group:i,on:at,tween:lt,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:st})}function vt(e,t){var n=yt(e,t);if(n.state>st)throw new Error("too late; already scheduled");return n}function mt(e,t){var n=yt(e,t);if(n.state>ut)throw new Error("too late; already running");return n}function yt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function xt(e,t){var n,o,i,r=e.__transition,a=!0;if(r){for(i in t=null==t?null:t+"",r)(n=r[i]).name===t?(o=n.state>dt&&n.state<ft,n.state=gt,n.timer.stop(),n.on.call(o?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[i]):a=!1;a&&delete e.__transition}}var wt,bt=n(50010),St=180/Math.PI,Ct={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Et(e,t,n,o,i,r){var a,l,s;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(s=e*n+t*o)&&(n-=e*s,o-=t*s),(l=Math.sqrt(n*n+o*o))&&(n/=l,o/=l,s/=l),e*o<t*n&&(e=-e,t=-t,s=-s,a=-a),{translateX:i,translateY:r,rotate:Math.atan2(t,e)*St,skewX:Math.atan(s)*St,scaleX:a,scaleY:l}}function kt(e,t,n,o){function i(e){return e.length?e.pop()+" ":""}return function(r,a){var l=[],s=[];return r=e(r),a=e(a),function(e,o,i,r,a,l){if(e!==i||o!==r){var s=a.push("translate(",null,t,null,n);l.push({i:s-4,x:(0,bt.A)(e,i)},{i:s-2,x:(0,bt.A)(o,r)})}else(i||r)&&a.push("translate("+i+t+r+n)}(r.translateX,r.translateY,a.translateX,a.translateY,l,s),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(i(n)+"rotate(",null,o)-2,x:(0,bt.A)(e,t)})):t&&n.push(i(n)+"rotate("+t+o)}(r.rotate,a.rotate,l,s),function(e,t,n,r){e!==t?r.push({i:n.push(i(n)+"skewX(",null,o)-2,x:(0,bt.A)(e,t)}):t&&n.push(i(n)+"skewX("+t+o)}(r.skewX,a.skewX,l,s),function(e,t,n,o,r,a){if(e!==n||t!==o){var l=r.push(i(r)+"scale(",null,",",null,")");a.push({i:l-4,x:(0,bt.A)(e,n)},{i:l-2,x:(0,bt.A)(t,o)})}else 1===n&&1===o||r.push(i(r)+"scale("+n+","+o+")")}(r.scaleX,r.scaleY,a.scaleX,a.scaleY,l,s),r=a=null,function(e){for(var t,n=-1,o=s.length;++n<o;)l[(t=s[n]).i]=t.x(e);return l.join("")}}}var Mt=kt((function(e){const t=new("function"===typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ct:Et(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Nt=kt((function(e){return null==e?Ct:(wt||(wt=document.createElementNS("http://www.w3.org/2000/svg","g")),wt.setAttribute("transform",e),(e=wt.transform.baseVal.consolidate())?Et((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Ct)}),", ",")",")");function _t(e,t){var n,o;return function(){var i=mt(this,e),r=i.tween;if(r!==n)for(var a=0,l=(o=n=r).length;a<l;++a)if(o[a].name===t){(o=o.slice()).splice(a,1);break}i.tween=o}}function At(e,t,n){var o,i;if("function"!==typeof n)throw new Error;return function(){var r=mt(this,e),a=r.tween;if(a!==o){i=(o=a).slice();for(var l={name:t,value:n},s=0,c=i.length;s<c;++s)if(i[s].name===t){i[s]=l;break}s===c&&i.push(l)}r.tween=i}}function Pt(e,t,n){var o=e._id;return e.each((function(){var e=mt(this,o);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return yt(e,o).value[t]}}var Ot=n(75206),zt=n(75365),It=n(97162);function Dt(e,t){var n;return("number"===typeof t?bt.A:t instanceof Ot.Ay?zt.Ay:(n=(0,Ot.Ay)(t))?(t=n,zt.Ay):It.A)(e,t)}function Rt(e){return function(){this.removeAttribute(e)}}function Lt(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Bt(e,t,n){var o,i,r=n+"";return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function jt(e,t,n){var o,i,r=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function Ht(e,t,n){var o,i,r;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttribute(e))===(l=s+"")?null:a===o&&l===i?r:(i=l,r=t(o=a,s));this.removeAttribute(e)}}function Tt(e,t,n){var o,i,r;return function(){var a,l,s=n(this);if(null!=s)return(a=this.getAttributeNS(e.space,e.local))===(l=s+"")?null:a===o&&l===i?r:(i=l,r=t(o=a,s));this.removeAttributeNS(e.space,e.local)}}function Vt(e,t){var n,o;function i(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,i)),n}return i._value=t,i}function Xt(e,t){var n,o;function i(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,i)),n}return i._value=t,i}function Zt(e,t){return function(){vt(this,e).delay=+t.apply(this,arguments)}}function Yt(e,t){return t=+t,function(){vt(this,e).delay=t}}function Ft(e,t){return function(){mt(this,e).duration=+t.apply(this,arguments)}}function Wt(e,t){return t=+t,function(){mt(this,e).duration=t}}var Kt=Ce.prototype.constructor;function Gt(e){return function(){this.style.removeProperty(e)}}var qt=0;function Ut(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Qt(){return++qt}var $t=Ce.prototype;Ut.prototype=function(e){return Ce().transition(e)}.prototype={constructor:Ut,select:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=h(e));for(var o=this._groups,i=o.length,r=new Array(i),a=0;a<i;++a)for(var l,s,c=o[a],d=c.length,u=r[a]=new Array(d),f=0;f<d;++f)(l=c[f])&&(s=e.call(l,l.__data__,f,c))&&("__data__"in l&&(s.__data__=l.__data__),u[f]=s,pt(u[f],t,n,f,u,yt(l,n)));return new Ut(r,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!==typeof e&&(e=g(e));for(var o=this._groups,i=o.length,r=[],a=[],l=0;l<i;++l)for(var s,c=o[l],d=c.length,u=0;u<d;++u)if(s=c[u]){for(var h,f=e.call(s,s.__data__,u,c),p=yt(s,n),v=0,m=f.length;v<m;++v)(h=f[v])&&pt(h,t,n,v,f,p);r.push(f),a.push(s)}return new Ut(r,a,t,n)},selectChild:$t.selectChild,selectChildren:$t.selectChildren,filter:function(e){"function"!==typeof e&&(e=v(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i<n;++i)for(var r,a=t[i],l=a.length,s=o[i]=[],c=0;c<l;++c)(r=a[c])&&e.call(r,r.__data__,c,a)&&s.push(r);return new Ut(o,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,i=n.length,r=Math.min(o,i),a=new Array(o),l=0;l<r;++l)for(var s,c=t[l],d=n[l],u=c.length,h=a[l]=new Array(u),f=0;f<u;++f)(s=c[f]||d[f])&&(h[f]=s);for(;l<o;++l)a[l]=t[l];return new Ut(a,this._parents,this._name,this._id)},selection:function(){return new Kt(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Qt(),o=this._groups,i=o.length,r=0;r<i;++r)for(var a,l=o[r],s=l.length,c=0;c<s;++c)if(a=l[c]){var d=yt(a,t);pt(a,e,n,c,l,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Ut(o,this._parents,e,n)},call:$t.call,nodes:$t.nodes,node:$t.node,size:$t.size,empty:$t.empty,each:$t.each,on:function(e,t){var n=this._id;return arguments.length<2?yt(this.node(),n).on.on(e):this.each(function(e,t,n){var o,i,r=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?vt:mt;return function(){var a=r(this,e),l=a.on;l!==o&&(i=(o=l).copy()).on(t,n),a.on=i}}(n,e,t))},attr:function(e,t){var n=O(e),o="transform"===n?Nt:Dt;return this.attrTween(e,"function"===typeof t?(n.local?Tt:Ht)(n,o,Pt(this,"attr."+e,t)):null==t?(n.local?Lt:Rt)(n):(n.local?jt:Bt)(n,o,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!==typeof t)throw new Error;var o=O(e);return this.tween(n,(o.local?Vt:Xt)(o,t))},style:function(e,t,n){var o="transform"===(e+="")?Mt:Dt;return null==t?this.styleTween(e,function(e,t){var n,o,i;return function(){var r=X(this,e),a=(this.style.removeProperty(e),X(this,e));return r===a?null:r===n&&a===o?i:i=t(n=r,o=a)}}(e,o)).on("end.style."+e,Gt(e)):"function"===typeof t?this.styleTween(e,function(e,t,n){var o,i,r;return function(){var a=X(this,e),l=n(this),s=l+"";return null==l&&(this.style.removeProperty(e),s=l=X(this,e)),a===s?null:a===o&&s===i?r:(i=s,r=t(o=a,l))}}(e,o,Pt(this,"style."+e,t))).each(function(e,t){var n,o,i,r,a="style."+t,l="end."+a;return function(){var s=mt(this,e),c=s.on,d=null==s.value[a]?r||(r=Gt(t)):void 0;c===n&&i===d||(o=(n=c).copy()).on(l,i=d),s.on=o}}(this._id,e)):this.styleTween(e,function(e,t,n){var o,i,r=n+"";return function(){var a=X(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}(e,o,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var o="style."+(e+="");
2if(arguments.length<2)return(o=this.tween(o))&&o._value;if(null==t)return this.tween(o,null);if("function"!==typeof t)throw new Error;return this.tween(o,function(e,t,n){var o,i;function r(){var r=t.apply(this,arguments);return r!==i&&(o=(i=r)&&function(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}(e,r,n)),o}return r._value=t,r}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"===typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(Pt(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!==typeof e)throw new Error;return this.tween(t,function(e){var t,n;function o(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&function(e){return function(t){this.textContent=e.call(this,t)}}(o)),t}return o._value=e,o}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o,i=yt(this.node(),n).tween,r=0,a=i.length;r<a;++r)if((o=i[r]).name===e)return o.value;return null}return this.each((null==t?_t:At)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?Zt:Yt)(t,e)):yt(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"===typeof e?Ft:Wt)(t,e)):yt(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!==typeof t)throw new Error;return function(){mt(this,e).ease=t}}(t,e)):yt(this.node(),t).ease},easeVarying:function(e){if("function"!==typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!==typeof n)throw new Error;mt(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,o=n._id,i=n.size();return new Promise((function(r,a){var l={value:a},s={value:function(){0===--i&&r()}};n.each((function(){var n=mt(this,o),i=n.on;i!==e&&((t=(e=i).copy())._.cancel.push(l),t._.interrupt.push(l),t._.end.push(s)),n.on=t})),0===i&&r()}))},[Symbol.iterator]:$t[Symbol.iterator]};var Jt={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function en(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error("transition ".concat(t," not found"));return n}Ce.prototype.interrupt=function(e){return this.each((function(){xt(this,e)}))},Ce.prototype.transition=function(e){var t,n;e instanceof Ut?(t=e._id,e=e._name):(t=Qt(),(n=Jt).time=$e(),e=null==e?null:e+"");for(var o=this._groups,i=o.length,r=0;r<i;++r)for(var a,l=o[r],s=l.length,c=0;c<s;++c)(a=l[c])&&pt(a,e,t,c,l,n||en(a,t));return new Ut(o,this._parents,e,t)};const tn=e=>()=>e;function nn(e,t){let{sourceEvent:n,target:o,transform:i,dispatch:r}=t;Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:r}})}function on(e,t,n){this.k=e,this.x=t,this.y=n}on.prototype={constructor:on,scale:function(e){return 1===e?this:new on(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new on(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};
vendor: 5,591 bytes, line 2
2var rn=new on(1,0,0);function an(e){for(;!e.__zoom;)if(!(e=e.parentNode))return rn;return e.__zoom}function ln(e){e.stopImmediatePropagation()}function sn(e){e.preventDefault(),e.stopImmediatePropagation()}function cn(e){return(!e.ctrlKey||"wheel"===e.type)&&!e.button}function dn(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function un(){return this.__zoom||rn}function hn(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function fn(){return navigator.maxTouchPoints||"ontouchstart"in this}function gn(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],r=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),a>r?(r+a)/2:Math.min(0,r)||Math.max(0,a))}function pn(){var e,t,n,o=cn,i=dn,r=gn,a=hn,l=fn,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,h=Te,f=d("start","zoom","end"),g=500,p=150,v=0,m=10;function y(e){e.property("__zoom",un).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",N).filter(l).on("touchstart.zoom",_).on("touchmove.zoom",A).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(e,t){return(t=Math.max(s[0],Math.min(s[1],t)))===e.k?e:new on(t,e.x,e.y)}function w(e,t,n){var o=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return o===e.x&&i===e.y?e:new on(e.k,o,i)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function S(e,t,n,o){e.on("start.zoom",(function(){C(this,arguments).event(o).start()})).on("interrupt.zoom end.zoom",(function(){C(this,arguments).event(o).end()})).tween("zoom",(function(){var e=this,r=arguments,a=C(e,r).event(o),l=i.apply(e,r),s=null==n?b(l):"function"===typeof n?n.apply(e,r):n,c=Math.max(l[1][0]-l[0][0],l[1][1]-l[0][1]),d=e.__zoom,u="function"===typeof t?t.apply(e,r):t,f=h(d.invert(s).concat(c/d.k),u.invert(s).concat(c/u.k));return function(e){if(1===e)e=u;else{var t=f(e),n=c/t[2];e=new on(n,s[0]-t[0]*n,s[1]-t[1]*n)}a.zoom(null,e)}}))}function C(e,t,n){return!n&&e.__zooming||new E(e,t)}function E(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function k(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];if(o.apply(this,arguments)){var l=C(this,n).event(e),d=this.__zoom,u=Math.max(s[0],Math.min(s[1],d.k*Math.pow(2,a.apply(this,arguments)))),h=ke(e);if(l.wheel)l.mouse[0][0]===h[0]&&l.mouse[0][1]===h[1]||(l.mouse[1]=d.invert(l.mouse[0]=h)),clearTimeout(l.wheel);else{if(d.k===u)return;l.mouse=[h,d.invert(h)],xt(this),l.start()}sn(e),l.wheel=setTimeout((function(){l.wheel=null,l.end()}),p),l.zoom("mouse",r(w(x(d,u),l.mouse[0],l.mouse[1]),l.extent,c))}}function M(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),a=1;a<t;a++)i[a-1]=arguments[a];if(!n&&o.apply(this,arguments)){var l=e.currentTarget,s=C(this,i,!0).event(e),d=Ee(e.view).on("mousemove.zoom",(function(e){if(sn(e),!s.moved){var t=e.clientX-h,n=e.clientY-f;s.moved=t*t+n*n>v}s.event(e).zoom("mouse",r(w(s.that.__zoom,s.mouse[0]=ke(e,l),s.mouse[1]),s.extent,c))}),!0).on("mouseup.zoom",(function(e){d.on("mousemove.zoom mouseup.zoom",null),Oe(e.view,s.moved),sn(e),s.event(e).end()}),!0),u=ke(e,l),h=e.clientX,f=e.clientY;Pe(e.view),ln(e),s.mouse=[u,this.__zoom.invert(u)],xt(this),s.start()}}function N(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];if(o.apply(this,arguments)){var l=this.__zoom,s=ke(e.changedTouches?e.changedTouches[0]:e,this),d=l.invert(s),h=l.k*(e.shiftKey?.5:2),f=r(w(x(l,h),s,d),i.apply(this,n),c);sn(e),u>0?Ee(this).transition().duration(u).call(S,f,s,e):Ee(this).call(y.transform,f,s,e)}}function _(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),a=1;a<i;a++)r[a-1]=arguments[a];if(o.apply(this,arguments)){var l,s,c,d,u=n.touches,h=u.length,f=C(this,r,n.changedTouches.length===h).event(n);for(ln(n),s=0;s<h;++s)d=[d=ke(c=u[s],this),this.__zoom.invert(d),c.identifier],f.touch0?f.touch1||f.touch0[2]===d[2]||(f.touch1=d,f.taps=0):(f.touch0=d,l=!0,f.taps=1+!!e);e&&(e=clearTimeout(e)),l&&(f.taps<2&&(t=d[0],e=setTimeout((function(){e=null}),g)),xt(this),f.start())}}function A(e){if(this.__zooming){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];var i,a,l,s,d=C(this,n).event(e),u=e.changedTouches,h=u.length;for(sn(e),i=0;i<h;++i)l=ke(a=u[i],this),d.touch0&&d.touch0[2]===a.identifier?d.touch0[0]=l:d.touch1&&d.touch1[2]===a.identifier&&(d.touch1[0]=l);if(a=d.that.__zoom,d.touch1){var f=d.touch0[0],g=d.touch0[1],p=d.touch1[0],v=d.touch1[1],m=(m=p[0]-f[0])*m+(m=p[1]-f[1])*m,y=(y=v[0]-g[0])*y+(y=v[1]-g[1])*y;a=x(a,Math.sqrt(m/y)),l=[(f[0]+p[0])/2,(f[1]+p[1])/2],s=[(g[0]+v[0])/2,(g[1]+v[1])/2]}else{if(!d.touch0)return;l=d.touch0[0],s=d.touch0[1]}d.zoom("touch",r(w(a,l,s),d.extent,c))}}function P(e){for(var o=arguments.length,i=new Array(o>1?o-1:0),r=1;r<o;r++)i[r-1]=arguments[r];if(this.__zooming){var a,l,s=C(this,i).event(e),c=e.changedTouches,d=c.length;for(ln(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),g),a=0;a<d;++a)l=c[a],s.touch0&&s.touch0[2]===l.identifier?delete s.touch0:s.touch1&&s.touch1[2]===l.identifier&&delete s.touch1;if(s.touch1&&!s.touch0&&(s.touch0=s.touch1,delete s.touch1),s.touch0)s.touch0[1]=this.__zoom.invert(s.touch0[0]);else if(s.end(),2===s.taps&&(l=ke(l,this),Math.hypot(t[0]-l[0],t[1]-l[1])<m)){var u=Ee(this).on("dblclick.zoom");
2u&&u.apply(this,arguments)}}}return y.transform=function(e,t,n,o){var i=e.selection?e.selection():e;i.property("__zoom",un),e!==i?S(e,t,n,o):i.interrupt().each((function(){C(this,arguments).event(o).start().zoom(null,"function"===typeof t?t.apply(this,arguments):t).end()}))},y.scaleBy=function(e,t,n,o){y.scaleTo(e,(function(){return this.__zoom.k*("function"===typeof t?t.apply(this,arguments):t)}),n,o)},y.scaleTo=function(e,t,n,o){y.transform(e,(function(){var e=i.apply(this,arguments),o=this.__zoom,a=null==n?b(e):"function"===typeof n?n.apply(this,arguments):n,l=o.invert(a),s="function"===typeof t?t.apply(this,arguments):t;return r(w(x(o,s),a,l),e,c)}),n,o)},y.translateBy=function(e,t,n,o){y.transform(e,(function(){return r(this.__zoom.translate("function"===typeof t?t.apply(this,arguments):t,"function"===typeof n?n.apply(this,arguments):n),i.apply(this,arguments),c)}),null,o)},y.translateTo=function(e,t,n,o,a){y.transform(e,(function(){var e=i.apply(this,arguments),a=this.__zoom,l=null==o?b(e):"function"===typeof o?o.apply(this,arguments):o;return r(rn.translate(l[0],l[1]).scale(a.k).translate("function"===typeof t?-t.apply(this,arguments):-t,"function"===typeof n?-n.apply(this,arguments):-n),e,c)}),o,a)},E.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=Ee(this.that).datum();f.call(e,this.that,new nn(e,{sourceEvent:this.sourceEvent,target:y,type:e,transform:this.that.__zoom,dispatch:f}),t)}},y.wheelDelta=function(e){return arguments.length?(a="function"===typeof e?e:tn(+e),y):a},y.filter=function(e){return arguments.length?(o="function"===typeof e?e:tn(!!e),y):o},y.touchable=function(e){return arguments.length?(l="function"===typeof e?e:tn(!!e),y):l},y.extent=function(e){return arguments.length?(i="function"===typeof e?e:tn([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),y):i},y.scaleExtent=function(e){return arguments.length?(s[0]=+e[0],s[1]=+e[1],y):[s[0],s[1]]},y.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],y):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},y.constrain=function(e){return arguments.length?(r=e,y):r},y.duration=function(e){return arguments.length?(u=+e,y):u},y.interpolate=function(e){return arguments.length?(h=e,y):h},y.on=function(){var e=f.on.apply(f,arguments);return e===f?y:e},y.clickDistance=function(e){return arguments.length?(v=(e=+e)*e,y):Math.sqrt(v)},y.tapDistance=function(e){return arguments.length?(m=+e,y):m},y}an.prototype=on.prototype;const vn=["inProgress"],mn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>'Node type "'.concat(e,'" not found. Using fallback type "default".'),error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>"The old edge with id=".concat(e," does not exist."),error009:e=>'Marker type "'.concat(e,"\" doesn't exist."),error008:(e,t)=>{let{id:n,sourceHandle:o,targetHandle:i}=t;return"Couldn't create edge for ".concat(e,' handle id: "').concat("source"===e?o:i,'", edge id: ').concat(n,".")},error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>'Edge type "'.concat(e,'" not found. Using fallback type "default".'),error012:e=>
2'Node with id "'.concat(e,'" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.'),error013:function(){return"It seems that you haven't loaded the styles. Please import '@xyflow/".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"react","/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."},yn=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],xn=["Enter"," ","Escape"];var wn,bn,Sn;!function(e){e.Strict="strict",e.Loose="loose"}(wn||(wn={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(bn||(bn={})),function(e){e.Partial="partial",e.Full="full"}(Sn||(Sn={}));const Cn={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null};var En,kn,Mn;!function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(En||(En={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(kn||(kn={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(Mn||(Mn={}));const Nn={[Mn.Left]:Mn.Right,[Mn.Right]:Mn.Left,[Mn.Top]:Mn.Bottom,[Mn.Bottom]:Mn.Top};function _n(e){return null===e?null:e?"valid":"invalid"}const An=e=>"id"in e&&"source"in e&&"target"in e,Pn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),On=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),zn=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];const{width:o,height:i}=so(e),r=null!==(t=e.origin)&&void 0!==t?t:n,a=o*r[0],l=i*r[1];return{x:e.position.x-a,y:e.position.y-l}},In=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{nodeOrigin:[0,0],nodeLookup:void 0};if(0===e.length)return{x:0,y:0,width:0,height:0};const n=e.reduce(((e,n)=>{const o="string"===typeof n;let i=t.nodeLookup||o?void 0:n;t.nodeLookup&&(i=o?t.nodeLookup.get(n):On(n)?n:t.nodeLookup.get(n.id));const r=i?Un(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Wn(e,r)}),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Gn(n)},Dn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(0===e.size)return{x:0,y:0,width:0,height:0};let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0};return e.forEach((e=>{if(void 0===t.filter||t.filter(e)){const t=Un(e);n=Wn(n,t)}})),Gn(n)},Rn=function(e,t){let[n,o,r]=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[0,0,1],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],l=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=(0,i.A)((0,i.A)({},oo(t,[n,o,r])),{},{width:t.width/r,height:t.height/r}),c=[];for(const i of e.values()){var d,u,h,f,g,p;const{measured:e,selectable:t=!0,hidden:n=!1}=i;if(l&&!t||n)continue;const o=null!==(d=null!==(u=null!==(h=e.width)&&void 0!==h?h:i.width)&&void 0!==u?u:i.initialWidth)&&void 0!==d?d:null,r=null!==(f=null!==(g=null!==(p=e.height)&&void 0!==p?p:i.height)&&void 0!==g?g:i.initialHeight)&&void 0!==f?f:null,v=$n(s,qn(i)),m=(null!==o&&void 0!==o?o:0)*(null!==r&&void 0!==r?r:0),y=a&&v>0;(!i.internals.handleBounds||y||v>=m||i.dragging)&&c.push(i)}return c},Ln=(e,t)=>{const n=new Set;return e.forEach((e=>{n.add(e.id)})),t.filter((e=>n.has(e.source)||n.has(e.target)))};function Bn(e,t){const n=new Map,o=null!==t&&void 0!==t&&t.nodes?new Set(t.nodes.map((e=>e.id))):null;return e.forEach((e=>{!(e.measured.width&&e.measured.height&&((null===t||void 0===t?void 0:t.includeHiddenNodes)||!e.hidden))||o&&!o.has(e.id)||n.set(e.id,e)})),n}async function jn(e,t){var n,o,i;let{nodes:r,width:a,height:l,panZoom:s,minZoom:c,maxZoom:d}=e;if(0===r.size)return Promise.resolve(!1);const u=Dn(r),h=ro(u,a,l,null!==(n=null===t||void 0===t?void 0:t.minZoom)&&void 0!==n?n:c,null!==(o=null===t||void 0===t?void 0:t.maxZoom)&&void 0!==o?o:d,null!==(i=null===t||void 0===t?void 0:t.padding)&&void 0!==i?i:.1);
2return await s.setViewport(h,{duration:null===t||void 0===t?void 0:t.duration}),Promise.resolve(!0)}function Hn(e){var t,n,o;let{nodeId:i,nextPosition:r,nodeLookup:a,nodeOrigin:l=[0,0],nodeExtent:s,onError:c}=e;const d=a.get(i),u=d.parentId?a.get(d.parentId):void 0,{x:h,y:f}=u?u.internals.positionAbsolute:{x:0,y:0},g=null!==(t=d.origin)&&void 0!==t?t:l;let p=s;if("parent"!==d.extent||d.expandParent)u&&lo(d.extent)&&(p=[[d.extent[0][0]+h,d.extent[0][1]+f],[d.extent[1][0]+h,d.extent[1][1]+f]]);else if(u){const e=u.measured.width,t=u.measured.height;e&&t&&(p=[[h,f],[h+e,f+t]])}else null===c||void 0===c||c("005",mn.error005());const v=lo(p)?Xn(r,p,d.measured):r;return void 0!==d.measured.width&&void 0!==d.measured.height||null===c||void 0===c||c("015",mn.error015()),{position:{x:v.x-h+(null!==(n=d.measured.width)&&void 0!==n?n:0)*g[0],y:v.y-f+(null!==(o=d.measured.height)&&void 0!==o?o:0)*g[1]},positionAbsolute:v}}async function Tn(e){let{nodesToRemove:t=[],edgesToRemove:n=[],nodes:o,edges:i,onBeforeDelete:r}=e;const a=new Set(t.map((e=>e.id))),l=[];for(const h of o){if(!1===h.deletable)continue;const e=a.has(h.id),t=!e&&h.parentId&&l.find((e=>e.id===h.parentId));(e||t)&&l.push(h)}const s=new Set(n.map((e=>e.id))),c=i.filter((e=>!1!==e.deletable)),d=Ln(l,c);for(const h of c){s.has(h.id)&&!d.find((e=>e.id===h.id))&&d.push(h)}if(!r)return{edges:d,nodes:l};const u=await r({nodes:l,edges:d});return"boolean"===typeof u?u?{edges:d,nodes:l}:{edges:[],nodes:[]}:u}const Vn=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,t),n)},Xn=function(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0},o=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;return{x:Vn(n.x,o[0][0],o[1][0]-(null!==(e=null===i||void 0===i?void 0:i.width)&&void 0!==e?e:0)),y:Vn(n.y,o[0][1],o[1][1]-(null!==(t=null===i||void 0===i?void 0:i.height)&&void 0!==t?t:0))}};function Zn(e,t,n){const{width:o,height:i}=so(n),{x:r,y:a}=n.internals.positionAbsolute;return Xn(e,[[r,a],[r+o,a+i]],t)}const Yn=(e,t,n)=>e<t?Vn(Math.abs(e-t),1,t)/t:e>n?-Vn(Math.abs(e-n),1,t)/t:0,Fn=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:15,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:40;return[Yn(e.x,o,t.width-o)*n,Yn(e.y,o,t.height-o)*n]},Wn=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),Kn=e=>{let{x:t,y:n,width:o,height:i}=e;return{x:t,y:n,x2:t+o,y2:n+i}},Gn=e=>{let{x:t,y:n,x2:o,y2:i}=e;return{x:t,y:n,width:o-t,height:i-n}},qn=function(e){var t,n,o,i,r,a,l,s;let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];const{x:d,y:u}=On(e)?e.internals.positionAbsolute:zn(e,c);return{x:d,y:u,width:null!==(t=null!==(n=null!==(o=null===(i=e.measured)||void 0===i?void 0:i.width)&&void 0!==o?o:e.width)&&void 0!==n?n:e.initialWidth)&&void 0!==t?t:0,height:null!==(r=null!==(a=null!==(l=null===(s=e.measured)||void 0===s?void 0:s.height)&&void 0!==l?l:e.height)&&void 0!==a?a:e.initialHeight)&&void 0!==r?r:0}},Un=function(e){var t,n,o,i,r,a,l,s;let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,0];const{x:d,y:u}=On(e)?e.internals.positionAbsolute:zn(e,c);return{x:d,y:u,x2:d+(null!==(t=null!==(n=null!==(o=null===(i=e.measured)||void 0===i?void 0:i.width)&&void 0!==o?o:e.width)&&void 0!==n?n:e.initialWidth)&&void 0!==t?t:0),y2:u+(null!==(r=null!==(a=null!==(l=null===(s=e.measured)||void 0===s?void 0:s.height)&&void 0!==l?l:e.height)&&void 0!==a?a:e.initialHeight)&&void 0!==r?r:0)}},Qn=(e,t)=>Gn(Wn(Kn(e),Kn(t))),$n=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},Jn=e=>eo(e.width)&&eo(e.height)&&eo(e.x)&&eo(e.y),eo=e=>!isNaN(e)&&isFinite(e),to=(e,t)=>{0},no=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[1,1];return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}},oo=function(e,t){let{x:n,y:o}=e,[i,r,a]=t;const l={x:(n-i)/a,y:(o-r)/a};return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?no(l,arguments.length>3&&void 0!==arguments[3]?arguments[3]:[1,1]):l},io=(e,t)=>{let{x:n,y:o}=e,[i,r,a]=t;return{x:n*a+i,y:o*a+r}},ro=(e,t,n,o,i,r)=>
2{const a=t/(e.width*(1+r)),l=n/(e.height*(1+r)),s=Math.min(a,l),c=Vn(s,o,i);return{x:t/2-(e.x+e.width/2)*c,y:n/2-(e.y+e.height/2)*c,zoom:c}},ao=()=>{var e;return"undefined"!==typeof navigator&&(null===(e=navigator)||void 0===e||null===(e=e.userAgent)||void 0===e?void 0:e.indexOf("Mac"))>=0};function lo(e){return void 0!==e&&"parent"!==e}function so(e){var t,n,o,i,r,a,l,s;return{width:null!==(t=null!==(n=null!==(o=null===(i=e.measured)||void 0===i?void 0:i.width)&&void 0!==o?o:e.width)&&void 0!==n?n:e.initialWidth)&&void 0!==t?t:0,height:null!==(r=null!==(a=null!==(l=null===(s=e.measured)||void 0===s?void 0:s.height)&&void 0!==l?l:e.height)&&void 0!==a?a:e.initialHeight)&&void 0!==r?r:0}}function co(e){var t,n,o,i,r,a;return void 0!==(null!==(t=null!==(n=null===(o=e.measured)||void 0===o?void 0:o.width)&&void 0!==n?n:e.width)&&void 0!==t?t:e.initialWidth)&&void 0!==(null!==(i=null!==(r=null===(a=e.measured)||void 0===a?void 0:a.height)&&void 0!==r?r:e.height)&&void 0!==i?i:e.initialHeight)}function uo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{width:0,height:0},n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0;const a=(0,i.A)({},e),l=o.get(n);if(l){var s,c;const e=l.origin||r;a.x+=l.internals.positionAbsolute.x-(null!==(s=t.width)&&void 0!==s?s:0)*e[0],a.y+=l.internals.positionAbsolute.y-(null!==(c=t.height)&&void 0!==c?c:0)*e[1]}return a}function ho(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function fo(e,t){var n,o;let{snapGrid:r=[0,0],snapToGrid:a=!1,transform:l,containerBounds:s}=t;const{x:c,y:d}=xo(e),u=oo({x:c-(null!==(n=null===s||void 0===s?void 0:s.left)&&void 0!==n?n:0),y:d-(null!==(o=null===s||void 0===s?void 0:s.top)&&void 0!==o?o:0)},l),{x:h,y:f}=a?no(u,r):u;return(0,i.A)({xSnapped:h,ySnapped:f},u)}const go=e=>({width:e.offsetWidth,height:e.offsetHeight}),po=e=>{var t,n;return(null===e||void 0===e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e))||(null===(n=window)||void 0===n?void 0:n.document)},vo=["INPUT","SELECT","TEXTAREA"];function mo(e){var t;const n=(null===(t=e.composedPath)||void 0===t||null===(t=t.call(e))||void 0===t?void 0:t[0])||e.target;if(1!==(null===n||void 0===n?void 0:n.nodeType))return!1;return vo.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const yo=e=>"clientX"in e,xo=(e,t)=>{var n,o,i,r;const a=yo(e),l=a?e.clientX:null===(n=e.touches)||void 0===n?void 0:n[0].clientX,s=a?e.clientY:null===(o=e.touches)||void 0===o?void 0:o[0].clientY;return{x:l-(null!==(i=null===t||void 0===t?void 0:t.left)&&void 0!==i?i:0),y:s-(null!==(r=null===t||void 0===t?void 0:t.top)&&void 0!==r?r:0)}},wo=(e,t,n,o,r)=>{const a=t.querySelectorAll(".".concat(e));return a&&a.length?Array.from(a).map((t=>{const a=t.getBoundingClientRect();return(0,i.A)({id:t.getAttribute("data-handleid"),type:e,nodeId:r,position:t.getAttribute("data-handlepos"),x:(a.left-n.left)/o,y:(a.top-n.top)/o},go(t))})):null};function bo(e){let{sourceX:t,sourceY:n,targetX:o,targetY:i,sourceControlX:r,sourceControlY:a,targetControlX:l,targetControlY:s}=e;const c=.125*t+.375*r+.375*l+.125*o,d=.125*n+.375*a+.375*s+.125*i;return[c,d,Math.abs(c-t),Math.abs(d-n)]}function So(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function Co(e){let{pos:t,x1:n,y1:o,x2:i,y2:r,c:a}=e;switch(t){case Mn.Left:return[n-So(n-i,a),o];case Mn.Right:return[n+So(i-n,a),o];case Mn.Top:return[n,o-So(o-r,a)];case Mn.Bottom:return[n,o+So(r-o,a)]}}function Eo(e){let{sourceX:t,sourceY:n,sourcePosition:o=Mn.Bottom,targetX:i,targetY:r,targetPosition:a=Mn.Top,curvature:l=.25}=e;const[s,c]=Co({pos:o,x1:t,y1:n,x2:i,y2:r,c:l}),[d,u]=Co({pos:a,x1:i,y1:r,x2:t,y2:n,c:l}),[h,f,g,p]=bo({sourceX:t,sourceY:n,targetX:i,targetY:r,sourceControlX:s,sourceControlY:c,targetControlX:d,targetControlY:u});return["M".concat(t,",").concat(n," C").concat(s,",").concat(c," ").concat(d,",").concat(u," ").concat(i,",").concat(r),h,f,g,p]}function ko(e){let{sourceX:t,sourceY:n,targetX:o,targetY:i}=e;const r=Math.abs(o-t)/2,a=o<t?o+r:o-r,l=Math.abs(i-n)/2;return[a,i<n?i+l:i-l,r,l]}function Mo(e){let{sourceNode:t,targetNode:n,selected:o=!1,zIndex:i=0,elevateOnSelect:r=!1}=e;if(!r)return i;const a=o||n.selected||t.selected,l=Math.max(t.internals.z||0,n.internals.z||0,1e3);return i+(a?l:0)}function No(e){let{sourceNode:t,targetNode:n,width:o,height:i,transform:r}=e;const a=Wn(Un(t),Un(n));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const l={x:-r[0]/r[2],y:-r[1]/r[2],width:o/r[2],height:i/r[2]};return $n(l,Gn(a))>0}const _o=e=>{let{source:t,sourceHandle:n,target:o,targetHandle:i}=e;return"xy-edge__".concat(t).concat(n||"","-").concat(o).concat(i||"")},Ao=(e,t)=>{if(!e.source||!e.target)return to("006",mn.error006()),t;let n;return n=An(e)?(0,i.A)({},e):(0,i.A)((0,i.A)({},e),{},{id:_o(e)}),((e,t)=>t.some((t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle))))(n,t)?t:(null===n.sourceHandle&&delete n.sourceHandle,null===n.targetHandle&&delete n.targetHandle,t.concat(n))};function Po(e){let{sourceX:t,sourceY:n,targetX:o,targetY:i}=e;const[r,a,l,s]=ko({sourceX:t,sourceY:n,targetX:o,targetY:i});return["M ".concat(t,",").concat(n,"L ").concat(o,",").concat(i),r,a,l,s]}const Oo={[Mn.Left]:{x:-1,y:0},[Mn.Right]:{x:1,y:0},[Mn.Top]:{x:0,y:-1},[Mn.Bottom]:{x:0,y:1}},zo=e=>{let{source:t,sourcePosition:n=Mn.Bottom,target:o}=e;return n===Mn.Left||n===Mn.Right?t.x<o.x?{x:1,y:0}:{x:-1,y:0}:t.y<o.y?{x:0,y:1}:{x:0,y:-1}},Io=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Do(e){let{sourceX:t,sourceY:n,sourcePosition:o=Mn.Bottom,targetX:i,targetY:r,targetPosition:a=Mn.Top,borderRadius:l=5,centerX:s,centerY:c,offset:d=20}=e;const[u,h,f,g,p]=function(e){let{source:t,sourcePosition:n=Mn.Bottom,target:o,targetPosition:i=Mn.Top,center:r,offset:a}=e;const l=Oo[n],s=Oo[i],c={x:t.x+l.x*a,y:t.y+l.y*a},d={x:o.x+s.x*a,y:o.y+s.y*a},u=zo({source:c,sourcePosition:n,target:d}),h=0!==u.x?"x":"y",f=u[h];let g,p,v=[];const m={x:0,y:0},y={x:0,y:0},[x,w,b,S]=ko({sourceX:t.x,sourceY:t.y,targetX:o.x,targetY:o.y});if(l[h]*s[h]===-1){var C,E;g=null!==(C=r.x)&&void 0!==C?C:x,p=null!==(E=r.y)&&void 0!==E?E:w;const e=[{x:g,y:c.y},{x:g,y:d.y}],t=[{x:c.x,y:p},{x:d.x,y:p}];v=l[h]===f?"x"===h?e:t:"x"===h?t:e}else{const e=[{x:c.x,y:d.y}],r=[{x:d.x,y:c.y}];if(v="x"===h?l.x===f?r:e:l.y===f?e:r,n===i){const e=Math.abs(t[h]-o[h]);if(e<=a){const n=Math.min(a-1,a-e);l[h]===f?m[h]=(c[h]>t[h]?-1:1)*n:y[h]=(d[h]>o[h]?-1:1)*n}}if(n!==i){const t="x"===h?"y":"x",n=l[h]===s[t],o=c[t]>d[t],i=c[t]<d[t];(1===l[h]&&(!n&&o||n&&i)||1!==l[h]&&(!n&&i||n&&o))&&(v="x"===h?e:r)}const u={x:c.x+m.x,y:c.y+m.y},x={x:d.x+y.x,y:d.y+y.y};Math.max(Math.abs(u.x-v[0].x),Math.abs(x.x-v[0].x))>=Math.max(Math.abs(u.y-v[0].y),Math.abs(x.y-v[0].y))?(g=(u.x+x.x)/2,p=v[0].y):(g=v[0].x,p=(u.y+x.y)/2)}
2return[[t,{x:c.x+m.x,y:c.y+m.y},...v,{x:d.x+y.x,y:d.y+y.y},o],g,p,b,S]}({source:{x:t,y:n},sourcePosition:o,target:{x:i,y:r},targetPosition:a,center:{x:s,y:c},offset:d}),v=u.reduce(((e,t,n)=>{let o="";return o=n>0&&n<u.length-1?function(e,t,n,o){const i=Math.min(Io(e,t)/2,Io(t,n)/2,o),{x:r,y:a}=t;if(e.x===r&&r===n.x||e.y===a&&a===n.y)return"L".concat(r," ").concat(a);if(e.y===a){const t=e.x<n.x?-1:1,o=e.y<n.y?1:-1;return"L ".concat(r+i*t,",").concat(a,"Q ").concat(r,",").concat(a," ").concat(r,",").concat(a+i*o)}const l=e.x<n.x?1:-1,s=e.y<n.y?-1:1;return"L ".concat(r,",").concat(a+i*s,"Q ").concat(r,",").concat(a," ").concat(r+i*l,",").concat(a)}(u[n-1],t,u[n+1],l):"".concat(0===n?"M":"L").concat(t.x," ").concat(t.y),e+=o}),"");return[v,h,f,g,p]}function Ro(e){var t;return e&&!!(e.internals.handleBounds||null!==(t=e.handles)&&void 0!==t&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Lo(e){var t,n,o,i;const{sourceNode:r,targetNode:a}=e;if(!Ro(r)||!Ro(a))return null;const l=r.internals.handleBounds||Bo(r.handles),s=a.internals.handleBounds||Bo(a.handles),c=Ho(null!==(t=null===l||void 0===l?void 0:l.source)&&void 0!==t?t:[],e.sourceHandle),d=Ho(e.connectionMode===wn.Strict?null!==(n=null===s||void 0===s?void 0:s.target)&&void 0!==n?n:[]:(null!==(o=null===s||void 0===s?void 0:s.target)&&void 0!==o?o:[]).concat(null!==(i=null===s||void 0===s?void 0:s.source)&&void 0!==i?i:[]),e.targetHandle);var u;if(!c||!d)return null===(u=e.onError)||void 0===u||u.call(e,"008",mn.error008(c?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const h=(null===c||void 0===c?void 0:c.position)||Mn.Bottom,f=(null===d||void 0===d?void 0:d.position)||Mn.Top,g=jo(r,c,h),p=jo(a,d,f);return{sourceX:g.x,sourceY:g.y,targetX:p.x,targetY:p.y,sourcePosition:h,targetPosition:f}}function Bo(e){if(!e)return null;const t=[],n=[];for(const r of e){var o,i;r.width=null!==(o=r.width)&&void 0!==o?o:1,r.height=null!==(i=r.height)&&void 0!==i?i:1,"source"===r.type?t.push(r):"target"===r.type&&n.push(r)}return{source:t,target:n}}function jo(e,t){var n,o,i;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Mn.Left,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const l=(null!==(n=null===t||void 0===t?void 0:t.x)&&void 0!==n?n:0)+e.internals.positionAbsolute.x,s=(null!==(o=null===t||void 0===t?void 0:t.y)&&void 0!==o?o:0)+e.internals.positionAbsolute.y,{width:c,height:d}=null!==t&&void 0!==t?t:so(e);if(a)return{x:l+c/2,y:s+d/2};switch(null!==(i=null===t||void 0===t?void 0:t.position)&&void 0!==i?i:r){case Mn.Top:return{x:l+c/2,y:s};case Mn.Right:return{x:l+c,y:s+d/2};case Mn.Bottom:return{x:l+c/2,y:s+d};case Mn.Left:return{x:l,y:s+d/2}}}function Ho(e,t){return e&&(t?e.find((e=>e.id===t)):e[0])||null}function To(e,t){if(!e)return"";if("string"===typeof e)return e;const n=t?"".concat(t,"__"):"";return"".concat(n).concat(Object.keys(e).sort().map((t=>"".concat(t,"=").concat(e[t]))).join("&"))}function Vo(e,t){let{id:n,defaultColor:o,defaultMarkerStart:r,defaultMarkerEnd:a}=t;const l=new Set;return e.reduce(((e,t)=>([t.markerStart||r,t.markerEnd||a].forEach((t=>{if(t&&"object"===typeof t){const r=To(t,n);l.has(r)||(e.push((0,i.A)({id:r,color:t.color||o},t)),l.add(r))}})),e)),[]).sort(((e,t)=>e.id.localeCompare(t.id)))}const Xo={nodeOrigin:[0,0],nodeExtent:yn,elevateNodesOnSelect:!0,defaults:{}},Zo=(0,i.A)((0,i.A)({},Xo),{},{checkEquality:!0});function Yo(e,t){const n=(0,i.A)({},e);for(const o in t)void 0!==t[o]&&(n[o]=t[o]);return n}
2function Fo(e,t,n){const o=Yo(Xo,n);for(const i of e.values())if(i.parentId)Ko(i,e,t,o);else{const e=zn(i,o.nodeOrigin),t=lo(i.extent)?i.extent:o.nodeExtent,n=Xn(e,t,so(i));i.internals.positionAbsolute=n}}function Wo(e,t,n,o){const r=Yo(Zo,o),a=new Map(t),l=null!==r&&void 0!==r&&r.elevateNodesOnSelect?1e3:0;t.clear(),n.clear();for(const h of e){var s;let e=a.get(h.id);if(r.checkEquality&&h===(null===(s=e)||void 0===s?void 0:s.internals.userNode))t.set(h.id,e);else{var c,d,u;const n=zn(h,r.nodeOrigin),o=lo(h.extent)?h.extent:r.nodeExtent,a=Xn(n,o,so(h));e=(0,i.A)((0,i.A)((0,i.A)({},r.defaults),h),{},{measured:{width:null===(c=h.measured)||void 0===c?void 0:c.width,height:null===(d=h.measured)||void 0===d?void 0:d.height},internals:{positionAbsolute:a,handleBounds:h.measured?null===(u=e)||void 0===u?void 0:u.internals.handleBounds:void 0,z:Go(h,l),userNode:h}}),t.set(h.id,e)}h.parentId&&Ko(e,t,n,o)}}function Ko(e,t,n,o){const{elevateNodesOnSelect:r,nodeOrigin:a,nodeExtent:l}=Yo(Xo,o),s=e.parentId,c=t.get(s);if(!c)return void console.warn("Parent node ".concat(s," not found. Please make sure that parent nodes are in front of their child nodes in the nodes array."));!function(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}(e,n);const d=r?1e3:0,{x:u,y:h,z:f}=function(e,t,n,o,i){var r;const{x:a,y:l}=t.internals.positionAbsolute,s=so(e),c=zn(e,n),d=lo(e.extent)?Xn(c,e.extent,s):c;let u=Xn({x:a+d.x,y:l+d.y},o,s);"parent"===e.extent&&(u=Zn(u,s,t));const h=Go(e,i),f=null!==(r=t.internals.z)&&void 0!==r?r:0;return{x:u.x,y:u.y,z:f>h?f:h}}(e,c,a,l,d),{positionAbsolute:g}=e.internals,p=u!==g.x||h!==g.y;(p||f!==e.internals.z)&&t.set(e.id,(0,i.A)((0,i.A)({},e),{},{internals:(0,i.A)((0,i.A)({},e.internals),{},{positionAbsolute:p?{x:u,y:h}:g,z:f})}))}function Go(e,t){return(eo(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function qo(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[0,0];const i=[],r=new Map;for(const s of e){var a,l;const e=t.get(s.parentId);if(!e)continue;const n=null!==(a=null===(l=r.get(s.parentId))||void 0===l?void 0:l.expandedRect)&&void 0!==a?a:qn(e),o=Qn(n,s.rect);r.set(s.parentId,{expandedRect:o,parent:e})}return r.size>0&&r.forEach(((t,r)=>{var a;let{expandedRect:l,parent:s}=t;const c=s.internals.positionAbsolute,d=so(s),u=null!==(a=s.origin)&&void 0!==a?a:o,h=l.x<c.x?Math.round(Math.abs(c.x-l.x)):0,f=l.y<c.y?Math.round(Math.abs(c.y-l.y)):0,g=Math.max(d.width,Math.round(l.width)),p=Math.max(d.height,Math.round(l.height)),v=(g-d.width)*u[0],m=(p-d.height)*u[1];var y;(h>0||f>0||v||m)&&(i.push({id:r,type:"position",position:{x:s.position.x-h+v,y:s.position.y-f+m}}),null===(y=n.get(r))||void 0===y||y.forEach((t=>{e.some((e=>e.id===t.id))||i.push({id:t.id,type:"position",position:{x:t.position.x+h,y:t.position.y+f}})})));(d.width<l.width||d.height<l.height||h||f)&&i.push({id:r,type:"dimensions",setAttributes:!0,dimensions:{width:g+(h?u[0]*h-v:0),height:p+(f?u[1]*f-m:0)}})})),i}function Uo(e,t,n,o,r,a){const l=null===o||void 0===o?void 0:o.querySelector(".xyflow__viewport");let s=!1;if(!l)return{changes:[],updatedInternals:s};const c=[],d=window.getComputedStyle(l),{m22:u}=new window.DOMMatrixReadOnly(d.transform),h=[];for(const f of e.values()){const e=t.get(f.id);if(!e)continue;if(e.hidden){t.set(e.id,(0,i.A)((0,i.A)({},e),{},{internals:(0,i.A)((0,i.A)({},e.internals),{},{handleBounds:void 0})})),s=!0;continue}const o=go(f.nodeElement),l=e.measured.width!==o.width||e.measured.height!==o.height;if(!(!o.width||!o.height||!l&&e.internals.handleBounds&&!f.force)){const d=f.nodeElement.getBoundingClientRect(),g=lo(e.extent)?e.extent:a;let{positionAbsolute:p}=e.internals;e.parentId&&"parent"===e.extent?p=Zn(p,o,t.get(e.parentId)):g&&(p=Xn(p,g,o));const v=(0,i.A)((0,i.A)({},e),{},{measured:o,internals:(0,i.A)((0,i.A)({},e.internals),{},{positionAbsolute:p,handleBounds:{source:wo("source",f.nodeElement,d,u,e.id),target:wo("target",f.nodeElement,d,u,e.id)}})});t.set(e.id,v),e.parentId&&Ko(v,t,n,{nodeOrigin:r}),s=!0,l&&(c.push({id:e.id,type:"dimensions",dimensions:o}),e.expandParent&&e.parentId&&h.push({id:e.id,parentId:e.parentId,rect:qn(v,r)}))}}if(h.length>0){const e=qo(h,t,n,r);c.push(...e)}return{changes:c,updatedInternals:s}}async function Qo(e){let{delta:t,panZoom:n,transform:o,translateExtent:i,width:r,height:a}=e;if(!n||!t.x&&!t.y)return Promise.resolve(!1);
2const l=await n.setViewportConstrained({x:o[0]+t.x,y:o[1]+t.y,zoom:o[2]},[[0,0],[r,a]],i),s=!!l&&(l.x!==o[0]||l.y!==o[1]||l.k!==o[2]);return Promise.resolve(s)}function $o(e,t,n,o,i,r){let a=i;const l=o.get(a)||new Map;o.set(a,l.set(n,t)),a="".concat(i,"-").concat(e);const s=o.get(a)||new Map;if(o.set(a,s.set(n,t)),r){a="".concat(i,"-").concat(e,"-").concat(r);const l=o.get(a)||new Map;o.set(a,l.set(n,t))}}function Jo(e,t,n){e.clear(),t.clear();for(const o of n){const{source:n,target:i,sourceHandle:r=null,targetHandle:a=null}=o,l={edgeId:o.id,source:n,target:i,sourceHandle:r,targetHandle:a},s="".concat(n,"-").concat(r,"--").concat(i,"-").concat(a);$o("source",l,"".concat(i,"-").concat(a,"--").concat(n,"-").concat(r),e,n,r),$o("target",l,s,e,i,a),t.set(o.id,o)}}function ei(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return!!n&&(!!n.selected||ei(n,t))}function ti(e,t,n){let o=e;do{var i,r,a;if(null!==(i=o)&&void 0!==i&&null!==(r=i.matches)&&void 0!==r&&r.call(i,t))return!0;if(o===n)return!1;o=null===(a=o)||void 0===a?void 0:a.parentElement}while(o);return!1}function ni(e){var t,n;let{nodeId:o,dragItems:r,nodeLookup:a,dragging:l=!0}=e;const s=[];for(const[u,h]of r){var c;const e=null===(c=a.get(u))||void 0===c?void 0:c.internals.userNode;e&&s.push((0,i.A)((0,i.A)({},e),{},{position:h.position,dragging:l}))}if(!o)return[s[0],s];const d=null===(t=a.get(o))||void 0===t?void 0:t.internals.userNode;return[d?(0,i.A)((0,i.A)({},d),{},{position:(null===(n=r.get(o))||void 0===n?void 0:n.position)||d.position,dragging:l}):s[0],s]}function oi(e){let{onNodeMouseDown:t,getStoreItems:n,onDragStart:o,onDrag:i,onDragStop:r}=e,a={x:null,y:null},l=0,s=new Map,c=!1,d={x:0,y:0},u=null,h=!1,f=null,g=!1;return{update:function(e){let{noDragClassName:p,handleSelector:v,domNode:m,isSelectable:y,nodeId:x,nodeClickDistance:w=0}=e;function b(e,t){let{x:o,y:r}=e;const{nodeLookup:l,nodeExtent:c,snapGrid:d,snapToGrid:u,nodeOrigin:h,onNodeDrag:f,onSelectionDrag:g,onError:p,updateNodePositions:v}=n();a={x:o,y:r};let m=!1,y={x:0,y:0,x2:0,y2:0};if(s.size>1&&c){const e=Dn(s);y=Kn(e)}for(const[n,i]of s){if(!l.has(n))continue;let e={x:o-i.distance.x,y:r-i.distance.y};u&&(e=no(e,d));let t=[[c[0][0],c[0][1]],[c[1][0],c[1][1]]];if(s.size>1&&c&&!i.extent){const{positionAbsolute:e}=i.internals,n=e.x-y.x+c[0][0],o=e.x+i.measured.width-y.x2+c[1][0];t=[[n,e.y-y.y+c[0][1]],[o,e.y+i.measured.height-y.y2+c[1][1]]]}const{position:a,positionAbsolute:f}=Hn({nodeId:n,nextPosition:e,nodeLookup:l,nodeExtent:t,nodeOrigin:h,onError:p});m=m||i.position.x!==a.x||i.position.y!==a.y,i.position=a,i.internals.positionAbsolute=f}if(m&&(v(s,!0),t&&(i||f||!x&&g))){const[e,n]=ni({nodeId:x,dragItems:s,nodeLookup:l});null===i||void 0===i||i(t,s,e,n),null===f||void 0===f||f(t,e,n),x||null===g||void 0===g||g(t,n)}}async function S(){if(!u)return;const{transform:e,panBy:t,autoPanSpeed:o,autoPanOnNodeDrag:i}=n();if(!i)return c=!1,void cancelAnimationFrame(l);const[r,s]=Fn(d,u,o);var h,f;0===r&&0===s||(a.x=(null!==(h=a.x)&&void 0!==h?h:0)-r/e[2],a.y=(null!==(f=a.y)&&void 0!==f?f:0)-s/e[2],await t({x:r,y:s})&&b(a,null));l=requestAnimationFrame(S)}
2function C(e){const{nodeLookup:i,multiSelectionActive:r,nodesDraggable:l,transform:c,snapGrid:d,snapToGrid:f,selectNodesOnDrag:g,onNodeDragStart:p,onSelectionDragStart:v,unselectNodesAndEdges:m}=n();var w;(h=!0,g&&y||r||!x)||(null!==(w=i.get(x))&&void 0!==w&&w.selected||m());y&&g&&x&&(null===t||void 0===t||t(x));const b=fo(e.sourceEvent,{transform:c,snapGrid:d,snapToGrid:f,containerBounds:u});if(a=b,s=function(e,t,n,o){const i=new Map;for(const[l,s]of e)if((s.selected||s.id===o)&&(!s.parentId||!ei(s,e))&&(s.draggable||t&&"undefined"===typeof s.draggable)){const t=e.get(l);var r,a;t&&i.set(l,{id:l,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:null!==(r=t.measured.width)&&void 0!==r?r:0,height:null!==(a=t.measured.height)&&void 0!==a?a:0}})}return i}(i,l,b,x),s.size>0&&(o||p||!x&&v)){const[t,n]=ni({nodeId:x,dragItems:s,nodeLookup:i});null===o||void 0===o||o(e.sourceEvent,s,t,n),null===p||void 0===p||p(e.sourceEvent,t,n),x||null===v||void 0===v||v(e.sourceEvent,n)}}f=Ee(m);const E=je().clickDistance(w).on("start",(e=>{const{domNode:t,nodeDragThreshold:o,transform:i,snapGrid:r,snapToGrid:l}=n();u=(null===t||void 0===t?void 0:t.getBoundingClientRect())||null,g=!1,0===o&&C(e);const s=fo(e.sourceEvent,{transform:i,snapGrid:r,snapToGrid:l,containerBounds:u});a=s,d=xo(e.sourceEvent,u)})).on("drag",(e=>
2{const{autoPanOnNodeDrag:t,transform:o,snapGrid:i,snapToGrid:r,nodeDragThreshold:l,nodeLookup:f}=n(),p=fo(e.sourceEvent,{transform:o,snapGrid:i,snapToGrid:r,containerBounds:u});if(("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1||x&&!f.has(x))&&(g=!0),!g){if(!c&&t&&h&&(c=!0,S()),!h){var v,m;const t=p.xSnapped-(null!==(v=a.x)&&void 0!==v?v:0),n=p.ySnapped-(null!==(m=a.y)&&void 0!==m?m:0);Math.sqrt(t*t+n*n)>l&&C(e)}(a.x!==p.xSnapped||a.y!==p.ySnapped)&&s&&h&&(d=xo(e.sourceEvent,u),b(p,e.sourceEvent))}})).on("end",(e=>{if(h&&!g&&(c=!1,h=!1,cancelAnimationFrame(l),s.size>0)){const{nodeLookup:t,updateNodePositions:o,onNodeDragStop:i,onSelectionDragStop:a}=n();if(o(s,!1),r||i||!x&&a){const[n,o]=ni({nodeId:x,dragItems:s,nodeLookup:t,dragging:!1});null===r||void 0===r||r(e.sourceEvent,s,n,o),null===i||void 0===i||i(e.sourceEvent,n,o),x||null===a||void 0===a||a(e.sourceEvent,o)}}})).filter((e=>{const t=e.target;return!e.button&&(!p||!ti(t,".".concat(p),m))&&(!v||ti(t,v,m))}));f.call(E)},destroy:function(){var e;null===(e=f)||void 0===e||e.on(".drag",null)}}}const ii=250;function ri(e,t,n,o){let r=[],a=1/0;const l=function(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:2*n,height:2*n};for(const r of t.values())$n(i,qn(r))>0&&o.push(r);return o}(e,n,t+ii);for(const f of l){var s,c,d,u;const n=[...null!==(s=null===(c=f.internals.handleBounds)||void 0===c?void 0:c.source)&&void 0!==s?s:[],...null!==(d=null===(u=f.internals.handleBounds)||void 0===u?void 0:u.target)&&void 0!==d?d:[]];for(const l of n){if(o.nodeId===l.nodeId&&o.type===l.type&&o.id===l.id)continue;const{x:n,y:s}=jo(f,l,l.position,!0),c=Math.sqrt(Math.pow(n-e.x,2)+Math.pow(s-e.y,2));c>t||(c<a?(r=[(0,i.A)((0,i.A)({},l),{},{x:n,y:s})],a=c):c===a&&r.push((0,i.A)((0,i.A)({},l),{},{x:n,y:s})))}}if(!r.length)return null;if(r.length>1){var h;const e="source"===o.type?"target":"source";return null!==(h=r.find((t=>t.type===e)))&&void 0!==h?h:r[0]}return r[0]}function ai(e,t,n,o,r){var a,l,s,c,d,u;let h=arguments.length>5&&void 0!==arguments[5]&&arguments[5];const f=o.get(e);if(!f)return null;const g="strict"===r?null===(a=f.internals.handleBounds)||void 0===a?void 0:a[t]:[...null!==(l=null===(s=f.internals.handleBounds)||void 0===s?void 0:s.source)&&void 0!==l?l:[],...null!==(c=null===(d=f.internals.handleBounds)||void 0===d?void 0:d.target)&&void 0!==c?c:[]],p=null!==(u=n?null===g||void 0===g?void 0:g.find((e=>e.id===n)):null===g||void 0===g?void 0:g[0])&&void 0!==u?u:null;return p&&h?(0,i.A)((0,i.A)({},p),jo(f,p,p.position,!0)):p}function li(e,t){return e||(null!==t&&void 0!==t&&t.classList.contains("target")?"target":null!==t&&void 0!==t&&t.classList.contains("source")?"source":null)}const si=()=>!0;function ci(e,t){let{handle:n,connectionMode:o,fromNodeId:i,fromHandleId:r,fromType:a,doc:l,lib:s,flowId:c,isValidConnection:d=si,nodeLookup:u}=t;const h="target"===a,f=n?l.querySelector(".".concat(s,'-flow__handle[data-id="').concat(c,"-").concat(null===n||void 0===n?void 0:n.nodeId,"-").concat(null===n||void 0===n?void 0:n.id,"-").concat(null===n||void 0===n?void 0:n.type,'"]')):null,{x:g,y:p}=xo(e),v=l.elementFromPoint(g,p),m=null!==v&&void 0!==v&&v.classList.contains("".concat(s,"-flow__handle"))?v:f,y={handleDomNode:m,isValid:!1,connection:null,toHandle:null};if(m){const e=li(void 0,m),t=m.getAttribute("data-nodeid"),n=m.getAttribute("data-handleid"),a=m.classList.contains("connectable"),l=m.classList.contains("connectableend");if(!t||!e)return y;const s={source:h?t:i,sourceHandle:h?n:r,target:h?i:t,targetHandle:h?r:n};y.connection=s;const c=a&&l&&(o===wn.Strict?h&&"source"===e||!h&&"target"===e:t!==i||n!==r);y.isValid=c&&d(s),y.toHandle=ai(t,e,n,u,o,!1)}return y}const di={onPointerDown:function(e,t){let{connectionMode:n,connectionRadius:r,handleId:a,nodeId:l,edgeUpdaterType:s,isTarget:c,domNode:d,nodeLookup:u,lib:h,autoPanOnConnect:f,flowId:g,panBy:p,cancelConnection:v,onConnectStart:m,onConnect:y,onConnectEnd:x,isValidConnection:w=si,onReconnectEnd:b,updateConnection:S,getTransform:C,getFromHandle:E,autoPanSpeed:k}=t;const M=po(e.target);let N,_=0;const{x:A,y:P}=xo(e),O=null===M||void 0===M?void 0:M.elementFromPoint(A,P),z=li(s,O),I=null===d||void 0===d?void 0:d.getBoundingClientRect();if(!I||!z)return;const D=ai(l,z,a,u,n);if(!D)return;let R=xo(e,I),L=!1,B=null,j=!1,H=null;function T(){if(!f||!I)return;const[e,t]=Fn(R,I,k);p({x:e,y:t}),_=requestAnimationFrame(T)}const V=(0,i.A)((0,i.A)({},D),{},{nodeId:l,type:z,position:D.position}),X=u.get(l),Z={inProgress:!0,isValid:null,from:jo(X,V,Mn.Left,!0),fromHandle:V,fromPosition:V.position,fromNode:X,to:R,toHandle:null,toPosition:Nn[V.position],toNode:null};S(Z);let Y=Z;function F(e){if(!E()||!V)return void W(e);const t=C();R=xo(e,I),N=ri(oo(R,t,!1,[1,1]),r,u,V),L||(T(),L=!0);const o=ci(e,{handle:N,connectionMode:n,fromNodeId:l,fromHandleId:a,fromType:c?"target":"source",isValidConnection:w,doc:M,lib:h,flowId:g,nodeLookup:u});
2H=o.handleDomNode,B=o.connection,j=function(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}(!!N,o.isValid);const s=(0,i.A)((0,i.A)({},Y),{},{isValid:j,to:N&&j?io({x:N.x,y:N.y},t):R,toHandle:o.toHandle,toPosition:j&&o.toHandle?o.toHandle.position:Nn[V.position],toNode:o.toHandle?u.get(o.toHandle.nodeId):null});j&&N&&Y.toHandle&&s.toHandle&&Y.toHandle.type===s.toHandle.type&&Y.toHandle.nodeId===s.toHandle.nodeId&&Y.toHandle.id===s.toHandle.id&&Y.to.x===s.to.x&&Y.to.y===s.to.y||(S(s),Y=s)}function W(e){(N||H)&&B&&j&&(null===y||void 0===y||y(B));const{inProgress:t}=Y,n=(0,o.A)(Y,vn),r=(0,i.A)((0,i.A)({},n),{},{toPosition:Y.toHandle?Y.toPosition:null});null===x||void 0===x||x(e,r),s&&(null===b||void 0===b||b(e,r)),v(),cancelAnimationFrame(_),L=!1,j=!1,B=null,H=null,M.removeEventListener("mousemove",F),M.removeEventListener("mouseup",W),M.removeEventListener("touchmove",F),M.removeEventListener("touchend",W)}null===m||void 0===m||m(e,{nodeId:l,handleId:a,handleType:z}),M.addEventListener("mousemove",F),M.addEventListener("mouseup",W),M.addEventListener("touchmove",F),M.addEventListener("touchend",W)},isValid:ci};function ui(e){let{domNode:t,panZoom:n,getTransform:o,getViewScale:i}=e;const r=Ee(t);return{update:function(e){let{translateExtent:t,width:a,height:l,zoomStep:s=10,pannable:c=!0,zoomable:d=!0,inversePan:u=!1}=e,h=[0,0];const f=pn().on("start",(e=>{var t,n;"mousedown"!==e.sourceEvent.type&&"touchstart"!==e.sourceEvent.type||(h=[null!==(t=e.sourceEvent.clientX)&&void 0!==t?t:e.sourceEvent.touches[0].clientX,null!==(n=e.sourceEvent.clientY)&&void 0!==n?n:e.sourceEvent.touches[0].clientY])})).on("zoom",c?e=>{var r,s;const c=o();if("mousemove"!==e.sourceEvent.type&&"touchmove"!==e.sourceEvent.type||!n)return;const d=[null!==(r=e.sourceEvent.clientX)&&void 0!==r?r:e.sourceEvent.touches[0].clientX,null!==(s=e.sourceEvent.clientY)&&void 0!==s?s:e.sourceEvent.touches[0].clientY],f=[d[0]-h[0],d[1]-h[1]];h=d;const g=i()*Math.max(c[2],Math.log(c[2]))*(u?-1:1),p={x:c[0]-f[0]*g,y:c[1]-f[1]*g},v=[[0,0],[a,l]];n.setViewportConstrained({x:p.x,y:p.y,zoom:c[2]},v,t)}:null).on("zoom.wheel",d?e=>{const t=o();if("wheel"!==e.sourceEvent.type||!n)return;const i=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*s,r=t[2]*Math.pow(2,i);n.scaleTo(r)}:null);r.call(f,{})},destroy:function(){r.on("zoom",null)},pointer:ke}}const hi=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,fi=e=>({x:e.x,y:e.y,zoom:e.k}),gi=e=>{let{x:t,y:n,zoom:o}=e;return rn.translate(t,n).scale(o)},pi=(e,t)=>e.target.closest(".".concat(t)),vi=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),mi=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const o="number"===typeof t&&t>0;return o||n(),o?e.transition().duration(t).on("end",n):e},yi=e=>{const t=e.ctrlKey&&ao()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t};function xi(e){let{domNode:t,minZoom:n,maxZoom:o,paneClickDistance:i,translateExtent:r,viewport:
2a,onPanZoom:l,onPanZoomStart:s,onPanZoomEnd:c,onDraggingChange:d}=e;const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=t.getBoundingClientRect(),f=pn().clickDistance(!eo(i)||i<0?0:i).scaleExtent([n,o]).translateExtent(r),g=Ee(t).call(f);x({x:a.x,y:a.y,zoom:Vn(a.zoom,n,o)},[[0,0],[h.width,h.height]],r);const p=g.on("wheel.zoom"),v=g.on("dblclick.zoom");function m(e,t){return g?new Promise((n=>{null===f||void 0===f||f.transform(mi(g,null===t||void 0===t?void 0:t.duration,(()=>n(!0))),e)})):Promise.resolve(!1)}function y(){f.on("zoom",null)}async function x(e,t,n){const o=gi(e),i=null===f||void 0===f?void 0:f.constrain()(o,t,n);return i&&await m(i),new Promise((e=>e(i)))}return f.wheelDelta(yi),{update:function(e){let{noWheelClassName:t,noPanClassName:n,onPaneContextMenu:o,userSelectionActive:i,panOnScroll:r,panOnDrag:a,panOnScrollMode:h,panOnScrollSpeed:m,preventScrolling:x,zoomOnPinch:w,zoomOnScroll:b,zoomOnDoubleClick:S,zoomActivationKeyPressed:C,lib:E,onTransformChange:k}=e;i&&!u.isZoomingOrPanning&&y();const M=r&&!C&&!i?function(e){let{zoomPanValues:t,noWheelClassName:n,d3Selection:o,d3Zoom:i,panOnScrollMode:r,panOnScrollSpeed:a,zoomOnPinch:l,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:d}=e;return e=>{if(pi(e,n))return!1;e.preventDefault(),e.stopImmediatePropagation();const u=o.property("__zoom").k||1;if(e.ctrlKey&&l){const t=ke(e),n=yi(e),r=u*Math.pow(2,n);return void i.scaleTo(o,r,t,e)}const h=1===e.deltaMode?20:1;let f=r===bn.Vertical?0:e.deltaX*h,g=r===bn.Horizontal?0:e.deltaY*h;!ao()&&e.shiftKey&&r!==bn.Vertical&&(f=e.deltaY*h,g=0),i.translateBy(o,-f/u*a,-g/u*a,{internal:!0});const p=fi(o.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling||(t.isPanScrolling=!0,null===s||void 0===s||s(e,p)),t.isPanScrolling&&(null===c||void 0===c||c(e,p),t.panScrollTimeout=setTimeout((()=>{null===d||void 0===d||d(e,p),t.isPanScrolling=!1}),150))}}({zoomPanValues:u,noWheelClassName:t,d3Selection:g,d3Zoom:f,panOnScrollMode:h,panOnScrollSpeed:m,zoomOnPinch:w,onPanZoomStart:s,onPanZoom:l,onPanZoomEnd:c}):function(e){let{noWheelClassName:t,preventScrolling:n,d3ZoomHandler:o}=e;return function(e,i){if(!n&&"wheel"===e.type&&!e.ctrlKey||pi(e,t))return null;e.preventDefault(),o.call(this,e,i)}}({noWheelClassName:t,preventScrolling:x,d3ZoomHandler:p});if(g.on("wheel.zoom",M,{passive:!1}),!i){const e=function(e){let{zoomPanValues:t,onDraggingChange:n,onPanZoomStart:o}=e;return e=>{var i,r,a;if(null!==(i=e.sourceEvent)&&void 0!==i&&i.internal)return;const l=fi(e.transform);t.mouseButton=(null===(r=e.sourceEvent)||void 0===r?void 0:r.button)||0,t.isZoomingOrPanning=!0,t.prevViewport=l,"mousedown"===(null===(a=e.sourceEvent)||void 0===a?void 0:a.type)&&n(!0),o&&(null===o||void 0===o||o(e.sourceEvent,l))}}({zoomPanValues:u,onDraggingChange:d,onPanZoomStart:s});f.on("start",e);const t=function(e){let{zoomPanValues:t,panOnDrag:n,onPaneContextMenu:o,onTransformChange:i,onPanZoom:r}=e;return e=>{var a,l,s;t.usedRightMouseButton=!(!o||!vi(n,null!==(a=t.mouseButton)&&void 0!==a?a:0)),null!==(l=e.sourceEvent)&&void 0!==l&&l.sync||i([e.transform.x,e.transform.y,e.transform.k]),!r||null!==(s=e.sourceEvent)&&void 0!==s&&s.internal||null===r||void 0===r||r(e.sourceEvent,fi(e.transform))}}({zoomPanValues:u,panOnDrag:a,onPaneContextMenu:!!o,onPanZoom:l,onTransformChange:k});f.on("zoom",t);const n=function(e){let{zoomPanValues:t,panOnDrag:n,panOnScroll:o,onDraggingChange:i,onPanZoomEnd:r,onPaneContextMenu:a}=e;return e=>{var l,s;if((null===(l=e.sourceEvent)||void 0===l||!l.internal)&&(t.isZoomingOrPanning=!1,a&&vi(n,null!==(s=t.mouseButton)&&void 0!==s?s:0)&&!t.usedRightMouseButton&&e.sourceEvent&&a(e.sourceEvent),t.usedRightMouseButton=!1,i(!1),r&&hi(t.prevViewport,e.transform))){const n=fi(e.transform);t.prevViewport=n,clearTimeout(t.timerId),t.timerId=setTimeout((()=>{null===r||void 0===r||r(e.sourceEvent,n)}),o?150:0)}}}({zoomPanValues:u,panOnDrag:a,panOnScroll:r,onPaneContextMenu:o,onPanZoomEnd:c,onDraggingChange:d});f.on("end",n)}const N=function(e){let{zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:o,panOnDrag:i,panOnScroll:r,zoomOnDoubleClick:a,userSelectionActive:l,noWheelClassName:s,noPanClassName:c,lib:d}=e;return e=>{var u;const h=t||n,f=o&&e.ctrlKey;if(1===e.button&&"mousedown"===e.type&&(pi(e,"".concat(d,"-flow__node"))||pi(e,"".concat(d,"-flow__edge"))))return!0;
2if(!i&&!h&&!r&&!a&&!o)return!1;if(l)return!1;if(pi(e,s)&&"wheel"===e.type)return!1;if(pi(e,c)&&("wheel"!==e.type||r&&"wheel"===e.type&&!t))return!1;if(!o&&e.ctrlKey&&"wheel"===e.type)return!1;if(!o&&"touchstart"===e.type&&(null===(u=e.touches)||void 0===u?void 0:u.length)>1)return e.preventDefault(),!1;if(!h&&!r&&!f&&"wheel"===e.type)return!1;if(!i&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(Array.isArray(i)&&!i.includes(e.button)&&"mousedown"===e.type)return!1;const g=Array.isArray(i)&&i.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||"wheel"===e.type)&&g}}({zoomActivationKeyPressed:C,panOnDrag:a,zoomOnScroll:b,panOnScroll:r,zoomOnDoubleClick:S,zoomOnPinch:w,userSelectionActive:i,noPanClassName:n,noWheelClassName:t,lib:E});f.filter(N),S?g.on("dblclick.zoom",v):g.on("dblclick.zoom",null)},destroy:y,setViewport:async function(e,t){const n=gi(e);return await m(n,t),new Promise((e=>e(n)))},setViewportConstrained:x,getViewport:function(){const e=g?an(g.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}},scaleTo:function(e,t){return g?new Promise((n=>{null===f||void 0===f||f.scaleTo(mi(g,null===t||void 0===t?void 0:t.duration,(()=>n(!0))),e)})):Promise.resolve(!1)},scaleBy:function(e,t){return g?new Promise((n=>{null===f||void 0===f||f.scaleBy(mi(g,null===t||void 0===t?void 0:t.duration,(()=>n(!0))),e)})):Promise.resolve(!1)},setScaleExtent:function(e){null===f||void 0===f||f.scaleExtent(e)},setTranslateExtent:function(e){null===f||void 0===f||f.translateExtent(e)},syncViewport:function(e){if(g){const t=gi(e),n=g.property("__zoom");n.k===e.zoom&&n.x===e.x&&n.y===e.y||null===f||void 0===f||f.transform(g,t,null,{sync:!0})}},setClickDistance:function(e){const t=!eo(e)||e<0?0:e;null===f||void 0===f||f.clickDistance(t)}}}var wi;!function(e){e.Line="line",e.Handle="handle"}(wi||(wi={}));function bi(e,t){return Math.max(0,t-e)}function Si(e,t){return Math.max(0,e-t)}function Ci(e,t,n){return Math.max(0,t-e,e-n)}function Ei(e,t){return e?!t:t}const ki={width:0,height:0,x:0,y:0},Mi=(0,i.A)((0,i.A)({},ki),{},{pointerX:0,pointerY:0,aspectRatio:1});function Ni(e,t,n){var o,i;const r=t.position.x+e.position.x,a=t.position.y+e.position.y,l=null!==(o=e.measured.width)&&void 0!==o?o:0,s=null!==(i=e.measured.height)&&void 0!==i?i:0,c=n[0]*l,d=n[1]*s;return[[r-c,a-d],[r+l-c,a+s-d]]}function _i(e){let{domNode:t,nodeId:n,getStoreItems:o,onChange:r,onEnd:a}=e;const l=Ee(t);return{update:function(e){let{controlPosition:t,boundaries:s,keepAspectRatio:c,onResizeStart:d,onResize:u,onResizeEnd:h,shouldResize:f}=e,g=(0,i.A)({},ki),p=(0,i.A)({},Mi);const v=function(e){return{isHorizontal:e.includes("right")||e.includes("left"),isVertical:e.includes("bottom")||e.includes("top"),affectsX:e.includes("left"),affectsY:e.includes("top")}}(t);let m,y,x,w,b=null,S=[];const C=je().on("start",(e=>{var t,r,a,l,s;const{nodeLookup:c,transform:u,snapGrid:h,snapToGrid:f,nodeOrigin:v,paneDomNode:C}=o();if(m=c.get(n),!m)return;b=null!==(t=null===C||void 0===C?void 0:C.getBoundingClientRect())&&void 0!==t?t:null;const{xSnapped:E,ySnapped:k}=fo(e.sourceEvent,{transform:u,snapGrid:h,snapToGrid:f,containerBounds:b});g={width:null!==(r=m.measured.width)&&void 0!==r?r:0,height:null!==(a=m.measured.height)&&void 0!==a?a:0,x:null!==(l=m.position.x)&&void 0!==l?l:0,y:null!==(s=m.position.y)&&void 0!==s?s:0},p=(0,i.A)((0,i.A)({},g),{},{pointerX:E,pointerY:k,aspectRatio:g.width/g.height}),y=void 0,m.parentId&&("parent"===m.extent||m.expandParent)&&(y=c.get(m.parentId),x=y&&"parent"===m.extent?function(e){return[[0,0],[e.measured.width,e.measured.height]]}(y):void 0),S=[],w=void 0;for(const[o,d]of c)if(d.parentId===n&&(S.push({id:o,position:(0,i.A)({},d.position),extent:d.extent}),"parent"===d.extent||d.expandParent)){var M;const e=Ni(d,m,null!==(M=d.origin)&&void 0!==M?M:v);w=w?[[Math.min(e[0][0],w[0][0]),Math.min(e[0][1],w[0][1])],[Math.max(e[1][0],w[1][0]),Math.max(e[1][1],w[1][1])]]:e}null===d||void 0===d||d(e,(0,i.A)({},g))})).on("drag",(e=>{var t;const{transform:n,snapGrid:a,snapToGrid:l,nodeOrigin:d}
2=o(),h=fo(e.sourceEvent,{transform:n,snapGrid:a,snapToGrid:l,containerBounds:b}),C=[];if(!m)return;const{x:E,y:k,width:M,height:N}=g,_={},A=null!==(t=m.origin)&&void 0!==t?t:d,{width:P,height:O,x:z,y:I}=function(e,t,n,o,i,r,a,l){let{affectsX:s,affectsY:c}=t;const{isHorizontal:d,isVertical:u}=t,h=d&&u,{xSnapped:f,ySnapped:g}=n,{minWidth:p,maxWidth:v,minHeight:m,maxHeight:y}=o,{x:x,y:w,width:b,height:S,aspectRatio:C}=e;let E=Math.floor(d?f-e.pointerX:0),k=Math.floor(u?g-e.pointerY:0);const M=b+(s?-E:E),N=S+(c?-k:k),_=-r[0]*b,A=-r[1]*S;let P=Ci(M,p,v),O=Ci(N,m,y);if(a){let e=0,t=0;s&&E<0?e=bi(x+E+_,a[0][0]):!s&&E>0&&(e=Si(x+M+_,a[1][0])),c&&k<0?t=bi(w+k+A,a[0][1]):!c&&k>0&&(t=Si(w+N+A,a[1][1])),P=Math.max(P,e),O=Math.max(O,t)}if(l){let e=0,t=0;s&&E>0?e=Si(x+E,l[0][0]):!s&&E<0&&(e=bi(x+M,l[1][0])),c&&k>0?t=Si(w+k,l[0][1]):!c&&k<0&&(t=bi(w+N,l[1][1])),P=Math.max(P,e),O=Math.max(O,t)}if(i){if(d){const e=Ci(M/C,m,y)*C;if(P=Math.max(P,e),a){let e=0;e=!s&&!c||s&&!c&&h?Si(w+A+M/C,a[1][1])*C:bi(w+A+(s?E:-E)/C,a[0][1])*C,P=Math.max(P,e)}if(l){let e=0;e=!s&&!c||s&&!c&&h?bi(w+M/C,l[1][1])*C:Si(w+(s?E:-E)/C,l[0][1])*C,P=Math.max(P,e)}}if(u){const e=Ci(N*C,p,v)/C;if(O=Math.max(O,e),a){let e=0;e=!s&&!c||c&&!s&&h?Si(x+N*C+_,a[1][0])/C:bi(x+(c?k:-k)*C+_,a[0][0])/C,O=Math.max(O,e)}if(l){let e=0;e=!s&&!c||c&&!s&&h?bi(x+N*C,l[1][0])/C:Si(x+(c?k:-k)*C,l[0][0])/C,O=Math.max(O,e)}}}k+=k<0?O:-O,E+=E<0?P:-P,i&&(h?M>N*C?k=(Ei(s,c)?-E:E)/C:E=(Ei(s,c)?-k:k)*C:d?(k=E/C,c=s):(E=k*C,s=c));const z=s?x+E:x,I=c?w+k:w;return{width:b+(s?-E:E),height:S+(c?-k:k),x:r[0]*E*(s?-1:1)+z,y:r[1]*k*(c?-1:1)+I}}(p,v,h,s,c,A,x,w),D=P!==M,R=O!==N,L=z!==E&&D,B=I!==k&&R;if(!L&&!B&&!D&&!R)return;if((L||B||1===A[0]||1===A[1])&&(_.x=L?z:g.x,_.y=B?I:g.y,g.x=_.x,g.y=_.y,S.length>0)){const e=z-E,t=I-k;for(const n of S)n.position={x:n.position.x-e+A[0]*(P-M),y:n.position.y-t+A[1]*(O-N)},C.push(n)}if((D||R)&&(_.width=D?P:g.width,_.height=R?O:g.height,g.width=_.width,g.height=_.height),y&&m.expandParent){var j,H;const e=A[0]*(null!==(j=_.width)&&void 0!==j?j:0);_.x&&_.x<e&&(g.x=e,p.x=p.x-(_.x-e));const t=A[1]*(null!==(H=_.height)&&void 0!==H?H:0);_.y&&_.y<t&&(g.y=t,p.y=p.y-(_.y-t))}const T=function(e){let{width:t,prevWidth:n,height:o,prevHeight:i,affectsX:r,affectsY:a}=e;const l=t-n,s=o-i,c=[l>0?1:l<0?-1:0,s>0?1:s<0?-1:0];return l&&r&&(c[0]=-1*c[0]),s&&a&&(c[1]=-1*c[1]),c}({width:g.width,prevWidth:M,height:g.height,prevHeight:N,affectsX:v.affectsX,affectsY:v.affectsY}),V=(0,i.A)((0,i.A)({},g),{},{direction:T});!1!==(null===f||void 0===f?void 0:f(e,V))&&(null===u||void 0===u||u(e,V),r(_,C))})).on("end",(e=>{null===h||void 0===h||h(e,(0,i.A)({},g)),null===a||void 0===a||a()}));l.call(C)},destroy:function(){l.on(".drag",null)}}}},80349:(e,t,n)=>{n.d(t,{Ay:()=>ie});var o=n(65043),i=n(72339),r=n(35296),a=n(50839),l=n(16923),s=n(12499),c=n(78528),d=n(53727),u=n(51376),h=n(13888),f=n(40164),g=n(98139),p=n.n(g),v=n(44082),m=n(78887),y=n(43944),x=n(64980),w=n(94414),b=n(78446),S=n(78855);const C=e=>{const{componentCls:t,notificationMarginEdge:n,animationMaxHeight:o}=e,i="".concat(t,"-notice"),r=new y.Mo("antNotificationFadeIn",{"0%":{transform:"translate3d(100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}}),a=new y.Mo("antNotificationTopFadeIn",{"0%":{top:-o,opacity:0},"100%":{top:0,opacity:1}}),l=new y.Mo("antNotificationBottomFadeIn",{"0%":{bottom:e.calc(o).mul(-1).equal(),opacity:0},"100%":{bottom:0,opacity:1}}),s=new y.Mo("antNotificationLeftFadeIn",{"0%":{transform:"translate3d(-100%, 0, 0)",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",opacity:1}});return{[t]:{["&".concat(t,"-top, &").concat(t,"-bottom")]:{marginInline:0,[i]:{marginInline:"auto auto"}},["&".concat(t,"-top")]:{["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:a}},["&".concat(t,"-bottom")]:{["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:l}},["&".concat(t,"-topRight, &").concat(t,"-bottomRight")]:{["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:r}},["&".concat(t,"-topLeft, &").concat(t,"-bottomLeft")]:{marginRight:{value:0,_skip_check_:!0},marginLeft:{value:n,_skip_check_:!0},[i]:{marginInlineEnd:"auto",marginInlineStart:0},["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationName:s}}}}},E=["top","topLeft","topRight","bottom","bottomLeft","bottomRight"],k={topLeft:"left",topRight:"right",bottomLeft:"left",bottomRight:"right",top:"left",bottom:"left"},M=e=>{const t={};for(let n=1;n<e.notificationStackLayer;n++)t["&:nth-last-child(".concat(n+1,")")]={overflow:"hidden",["& > ".concat(e.componentCls,"-notice")]:{opacity:0,transition:"opacity ".concat(e.motionDurationMid)}};return Object.assign({["&:not(:nth-last-child(-n+".concat(e.notificationStackLayer,"))")]:{opacity:0,overflow:"hidden",color:"transparent",pointerEvents:"none"}},t)},N=e=>{const t={};for(let n=1;n<e.notificationStackLayer;n++)t["&:nth-last-child(".concat(n+1,")")]={background:e.colorBgBlur,backdropFilter:"blur(10px)","-webkit-backdrop-filter":"blur(10px)"};return Object.assign({},t)},_=e=>{const{componentCls:t}=e;return Object.assign({["".concat(t,"-stack")]:{["& > ".concat(t,"-notice-wrapper")]:Object.assign({transition:"transform ".concat(e.motionDurationSlow,", backdrop-filter 0s"),willChange:"transform, opacity",position:"absolute"},M(e))},["".concat(t,"-stack:not(").concat(t,"-stack-expanded)")]:{["& > ".concat(t,"-notice-wrapper")]:Object.assign({},N(e))},["".concat(t,"-stack").concat(t,"-stack-expanded")]:{["& > ".concat(t,"-notice-wrapper")]:{"&:not(:nth-last-child(-n + 1))":{opacity:1,overflow:"unset",color:"inherit",pointerEvents:"auto",["& > ".concat(e.componentCls,"-notice")]:{opacity:1}},"&:after":{content:'""',position:"absolute",height:e.margin,width:"100%",insetInline:0,bottom:e.calc(e.margin).mul(-1).equal(),background:"transparent",pointerEvents:"auto"}}}},E.map((t=>((e,t)=>{const{componentCls:n}=e;return{["".concat(n,"-").concat(t)]:{["&".concat(n,"-stack > ").concat(n,"-notice-wrapper")]:{[t.startsWith("top")?"top":"bottom"]:0,[k[t]]:{value:0,_skip_check_:!0}}}}})(e,t))).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{}))},A=e=>{const{iconCls:t,componentCls:n,boxShadow:o,fontSizeLG:i,notificationMarginBottom:r,borderRadiusLG:a,c
2olorSuccess:l,colorInfo:s,colorWarning:c,colorError:d,colorTextHeading:u,notificationBg:h,notificationPadding:f,notificationMarginEdge:g,notificationProgressBg:p,notificationProgressHeight:v,fontSize:m,lineHeight:x,width:b,notificationIconSize:S,colorText:C}=e,E="".concat(n,"-notice");return{position:"relative",marginBottom:r,marginInlineStart:"auto",background:h,borderRadius:a,boxShadow:o,[E]:{padding:f,width:b,maxWidth:"calc(100vw - ".concat((0,y.zA)(e.calc(g).mul(2).equal()),")"),overflow:"hidden",lineHeight:x,wordWrap:"break-word"},["".concat(E,"-message")]:{marginBottom:e.marginXS,color:u,fontSize:i,lineHeight:e.lineHeightLG},["".concat(E,"-description")]:{fontSize:m,color:C},["".concat(E,"-closable ").concat(E,"-message")]:{paddingInlineEnd:e.paddingLG},["".concat(E,"-with-icon ").concat(E,"-message")]:{marginBottom:e.marginXS,marginInlineStart:e.calc(e.marginSM).add(S).equal(),fontSize:i},["".concat(E,"-with-icon ").concat(E,"-description")]:{marginInlineStart:e.calc(e.marginSM).add(S).equal(),fontSize:m},["".concat(E,"-icon")]:{position:"absolute",fontSize:S,lineHeight:1,["&-success".concat(t)]:{color:l},["&-info".concat(t)]:{color:s},["&-warning".concat(t)]:{color:c},["&-error".concat(t)]:{color:d}},["".concat(E,"-close")]:Object.assign({position:"absolute",top:e.notificationPaddingVertical,insetInlineEnd:e.notificationPaddingHorizontal,color:e.colorIcon,outline:"none",width:e.notificationCloseButtonSize,height:e.notificationCloseButtonSize,borderRadius:e.borderRadiusSM,transition:"background-color ".concat(e.motionDurationMid,", color ").concat(e.motionDurationMid),display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:e.colorIconHover,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},(0,w.K8)(e)),["".concat(E,"-progress")]:{position:"absolute",display:"block",appearance:"none",WebkitAppearance:"none",inlineSize:"calc(100% - ".concat((0,y.zA)(a)," * 2)"),left:{_skip_check_:!0,value:a},right:{_skip_check_:!0,value:a},bottom:0,blockSize:v,border:0,"&, &::-webkit-progress-bar":{borderRadius:a,backgroundColor:"rgba(0, 0, 0, 0.04)"},"&::-moz-progress-bar":{background:p},"&::-webkit-progress-value":{borderRadius:a,background:p}},["".concat(E,"-actions")]:{float:"right",marginTop:e.marginSM}}},P=e=>{const{componentCls:t,notificationMarginBottom:n,notificationMarginEdge:o,motionDurationMid:i,motionEaseInOut:r}=e,a="".concat(t,"-notice"),l=new y.Mo("antNotificationFadeOut",{"0%":{maxHeight:e.animationMaxHeight,marginBottom:n},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[t]:Object.assign(Object.assign({},(0,w.dF)(e)),{position:"fixed",zIndex:e.zIndexPopup,marginRight:{value:o,_skip_check_:!0},["".concat(t,"-hook-holder")]:{position:"relative"},["".concat(t,"-fade-appear-prepare")]:{opacity:"0 !important"},["".concat(t,"-fade-enter, ").concat(t,"-fade-appear")]:{animationDuration:e.motionDurationMid,animationTimingFunction:r,animationFillMode:"both",opacity:0,animationPlayState:"paused"},["".concat(t,"-fade-leave")]:{animationTimingFunction:r,animationFillMode:"both",animationDuration:i,animationPlayState:"paused"},["".concat(t,"-fade-enter").concat(t,"-fade-enter-active, ").concat(t,"-fade-appear").concat(t,"-fade-appear-active")]:{animationPlayState:"running"},["".concat(t,"-fade-leave").concat(t,"-fade-leave-active")]:{animationName:l,animationPlayState:"running"},"&-rtl":{direction:"rtl",["".concat(a,"-actions")]:{float:"left"}}})},{[t]:{["".concat(a,"-wrapper")]:Object.assign({},A(e))}}]},O=e=>({zIndexPopup:e.zIndexPopupBase+x.jH+50,width:384}),z=e=>{const t=e.paddingMD,n=e.paddingLG;return(0,b.oX)(e,{notificationBg:e.colorBgElevated,notificationPaddingVertical:t,notificationPaddingHorizontal:n,notificationIconSize:e.calc(e.fontSizeLG).mul(e.lineHeightLG).equal(),notificationCloseButtonSize:e.calc(e.controlHeightLG).mul(.55).equal(),notificationMarginBottom:e.margin,notificationPadding:"".concat((0,y.zA)(e.paddingMD)," ").concat((0,y.zA)(e.paddingContentHorizontalLG)),notificationMarginEdge:e.marginLG,animationMaxHeight:150,notificationStackLayer:3,notificationProgressHeight:2,notificationProgressBg:"linear-gradient(90deg, ".concat(e.colorPrimaryBorderHover,", ").concat(e.colorPrimary,")")})},I=(0,S.OF)("Notification",(e=>{const t=z(e);return[P(t),C(t),_(t)]}),O),D=(0,S.bf)(["Notification","PurePanel"],(e=>{const t="".concat(e.componentCls,"-notice"),n=z(e);return{["".concat(t,"-pure-panel")]:Object.assign(Object.assign({},A(n)),{width:n.width,maxWidth:"calc(100vw - ".concat((0,y.zA)(e.calc(n.notificationMarginEdge).mul(2).equal()),")"),margin:0})}}),O);var R=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};h.A,s.A,c.A,u.A,f.A;function L(e,t){return null===t||!1===t?null:t||o.createElement(d.A,{className:"".concat(e,"-close-icon")})}const B={success:s.A,info:h.A,error:c.A,warning:u.A},j=e=>{const{prefixCls:t,icon:n,type:i,message:r,description:a,actions:l,role:s="alert"}=e;let c=null;return n?c=o.createElement("span",{className:"".concat(t,"-icon")},n):i&&(c=o.createElement(B[i]||null,{className:p()("".concat(t,"-icon"),"".concat(t,"-icon-").concat(i))})),o.createElement("div",{className:p()({["".concat(t,"-with-icon")]:c}),role:s},c,o.createElement("div",{className:"".concat(t,"-message")},r),o.createElement("div",{className:"".concat(t,"-description")},a),l&&o.createElement("div",{className:"".concat(t,"-actions")},l))},H=e=>{const{prefixCls:t,className:n,icon:i,type:a,message:l,description:s,btn:c,actions:d,closable:u=!0,closeIcon:h,className:f}=e,g=R(e,["prefixCls","className","icon","type","message","description","btn","actions","closable","closeIcon","className"]),{getPrefixCls:y}=o.useContext(r.QO),x=null!==d&&void 0!==d?d:c;const w=t||y("notification"),b="".concat(w,"-notice"),S=(0,m.A)(w),[C,E,k]=I(w,S);return C(o.createElement("div",{className:p()("".concat(b,"-pure-panel"),E,n,k,S)},o.createElement(D,{prefixCls:w}),o.createElement(v.$T,Object.assign({},g,{prefixCls:w,eventKey:"pure",duration:null,closable:u,className:p()({notificationClassName:f}),closeIcon:L(w,h),content:o.createElement(j,{prefixCls:b,icon:i,type:a,message:l,description:s,actions:x})}))))};var T=n(59478),V=n(80167);var X=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n};const Z="topRight",Y=e=>{let{children:t,prefixCls:n}=e;const i=(0,m.A)(n),[r,a,l]=I(n,i);return r(o.createElement(v.ph,{classNames:{list:p()(a,l,i)}},t))},F=(e,t)=>{let{prefixCls:n,key:i}=t;return o.createElement(Y,{prefixCls:n,key:i},e)},W=o.forwardRef(((e,t)=>{const{top:n,bottom:i,prefixCls:a,getContainer:l,maxCount:s,rtl:c,onAllRemoved:d,stack:u,duration:h,pauseOnHover:f=!0,showProgress:g}=e,{getPrefixCls:m,getPopupContainer:y,notification:x,direction:w}=(0,o.useContext)(r.QO),[,b]=(0,V.Ay)(),S=a||m("notification"),[C,E]=(0,v.hN)({prefixCls:S,style:e=>function(e,t,n){let o;switch(e){case"top":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:t,bottom:"auto"};break;case"topLeft":o={left:0,top:t,bottom:"auto"};break;case"topRight":o={right:0,top:t,bottom:"auto"};break;case"bottom":o={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":o={left:0,top:"auto",bottom:n};break;default:o={right:0,top:"auto",bottom:n}}return o}(e,null!==n&&void 0!==n?n:24,null!==i&&void 0!==i?i:24),className:()=>p()({["".concat(S,"-rtl")]:null!==c&&void 0!==c?c:"rtl"===w}),motion:()=>function(e){return{motionName:"".concat(e,"-fade")}}(S),closable:!0,closeIcon:L(S),duration:null!==h&&void 0!==h?h:4.5,getContainer:()=>(null===l||void 0===l?void 0:l())||(null===y||void 0===y?void 0:y())||document.body,maxCount:s,pauseOnHover:f,showProgress:g,onAllRemoved:d,renderNotifications:F,stack:!1!==u&&{threshold:"object"===typeof u?null===u||void 0===u?void 0:u.threshold:void 0,offset:8,gap:b.margin}});return o.useImperativeHandle(t,(()=>Object.assign(Object.assign({},C),{prefixCls:S,notification:x}))),E}));function K(e){const t=o.useRef(null),n=((0,T.rJ)("Notification"),o.useMemo((()=>{const n=n=>{var i;if(!t.current)return;const{open:r,prefixCls:a,notification:l}=t.current,s="".concat(a,"-notice"),{message:c,description:d,icon:u,type:h,btn:f,actions:g,className:v,style:m,role:y="alert",closeIcon:x,closable:w}=n,b=X(n,["message","description","icon","type","btn","actions","className","style","role","closeIcon","closable"]);const S=null!==g&&void 0!==g?g:f,C=L(s,function(e,t,n){return"undefined"!==typeof e?e:"undefined"!==typeof(null===t||void 0===t?void 0:t.closeIcon)?t.closeIcon:null===n||void 0===n?void 0:n.closeIcon}(x,e,l));return r(Object.assign(Object.assign({placement:null!==(i=null===e||void 0===e?void 0:e.placement)&&void 0!==i?i:Z},b),{content:o.createElement(j,{prefixCls:s,icon:u,type:h,message:c,description:d,actions:S,role:y}),className:p()(h&&"".concat(s,"-").concat(h),v,null===l||void 0===l?void 0:l.className),style:Object.assign(Object.assign({},null===l||void 0===l?void 0:l.style),m),closeIcon:C,closable:null!==w&&void 0!==w?w:!!C}))},i={open:n,destroy:e=>{var n,o;void 0!==e?null===(n=t.current)||void 0===n||n.close(e):null===(o=t.current)||void 0===o||o.destroy()}};return["success","info","warning","error"].forEach((e=>{i[e]=t=>n(Object.assign(Object.assign({},t),{type:e}))})),i}),[]));return[n,o.createElement(W,Object.assign({key:"notification-holder"},e,{ref:t}))]}let G=null,q=e=>e(),U=[],Q={};function $(){const{getContainer:e,rtl:t,maxCount:n,top:o,bottom:i,showProgress:r,pauseOnHover:a}=Q,l=(null===e||void 0===e?void 0:e())||document.body;return{getContainer:()=>l,rtl:t,maxCount:n,top:o,bottom:i,showProgress:r,pauseOnHover:a}}const J=o.forwardRef(((e,t)=>{const{notificationConfig:n,sync:a}=e,{getPrefixCls:l}=(0,o.useContext)(r.QO),s=Q.prefixCls||l("notification"),c=(0,o.useContext)(i.B),[d,u]=K(Object.assign(Object.assign(Object.assign({},n),{prefixCls:s}),c.notification));return o.useEffect(a,[]),o.useImperativeHandle(t,(()=>{const e=Object.assign({},d);return Object.keys(e).forEach((t=>{e[t]=function(){return a(),d[t].apply(d,arguments)}})),{instance:e,sync:a}})),u})),ee=o.forwardRef(((e,t)=>{const[n,i]=o.useState($),r=()=>{i($)};o.useEffect(r,[]);const l=(0,a.cr)(),s=l.getRootPrefixCls(),c=l.getIconPrefixCls(),d=l.getTheme(),u=o.createElement(J,{ref:t,sync:r,notificationConfig:n});return o.createElement(a.Ay,{prefixCls:s,iconPrefixCls:c,theme:d},l.holderRender?l.holderRender(u):u)}));function te(){if(!G){const e=document.createDocumentFragment(),t={fragment:e};return G=t,void q((()=>
2{(0,l.K)()(o.createElement(ee,{ref:e=>{const{instance:n,sync:o}=e||{};Promise.resolve().then((()=>{!t.instance&&n&&(t.instance=n,t.sync=o,te())}))}}),e)}))}G.instance&&(U.forEach((e=>{switch(e.type){case"open":q((()=>{G.instance.open(Object.assign(Object.assign({},Q),e.config))}));break;case"destroy":q((()=>{null===G||void 0===G||G.instance.destroy(e.key)}))}})),U=[])}function ne(e){(0,a.cr)();U.push({type:"open",config:e}),te()}const oe={open:ne,destroy:e=>{U.push({type:"destroy",key:e}),te()},config:function(e){Q=Object.assign(Object.assign({},Q),e),q((()=>{var e;null===(e=null===G||void 0===G?void 0:G.sync)||void 0===e||e.call(G)}))},useNotification:function(e){return K(e)},_InternalPanelDoNotUseOrYouWillBeFired:H};["success","info","warning","error"].forEach((e=>{oe[e]=t=>ne(Object.assign(Object.assign({},t),{type:e}))}));const ie=oe},72330:(e,t,n)=>{var o=n(65043);var i="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},r=o.useState,a=o.useEffect,l=o.useLayoutEffect,s=o.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(o){return!0}}var d="undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),o=r({inst:{value:n,getSnapshot:t}}),i=o[0].inst,d=o[1];return l((function(){i.value=n,i.getSnapshot=t,c(i)&&d({inst:i})}),[e,n,t]),a((function(){return c(i)&&d({inst:i}),e((function(){c(i)&&d({inst:i})}))}),[e]),s(n),n};t.useSyncExternalStore=void 0!==o.useSyncExternalStore?o.useSyncExternalStore:d},79717:(e,t,n)=>{var o=n(65043),i=n(29461);var r="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},a=i.useSyncExternalStore,l=o.useRef,s=o.useEffect,c=o.useMemo,d=o.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,o,i){var u=l(null);if(null===u.current){var h={hasValue:!1,value:null};u.current=h}else h=u.current;u=c((function(){function e(e){if(!s){if(s=!0,a=e,e=o(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return l=t}return l=e}if(t=l,r(a,e))return t;var n=o(e);return void 0!==i&&i(t,n)?(a=e,t):(a=e,l=n)}var a,l,s=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,o,i]);var f=a(e,u[0],u[1]);return s((function(){h.hasValue=!0,h.value=f}),[f]),d(f),f}},29461:(e,t,n)=>{e.exports=n(72330)},98443:(e,t,n)=>{e.exports=n(79717)},50411:()=>{},75206:(e,t,n)=>{function o(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function i(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function r(){}n.d(t,{Ay:()=>b,Qh:()=>E});var a=.7,l=1/a,s="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",d="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u=/^#([0-9a-f]{3,8})$/,h=new RegExp("^rgb\\(".concat(s,",").concat(s,",").concat(s,"\\)$")),f=new RegExp("^rgb\\(".concat(d,",").concat(d,",").concat(d,"\\)$")),g=new RegExp("^rgba\\(".concat(s,",").concat(s,",").concat(s,",").concat(c,"\\)$")),p=new RegExp("^rgba\\(".concat(d,",").concat(d,",").concat(d,",").concat(c,"\\)$")),v=new RegExp("^hsl\\(".concat(c,",").concat(d,",").concat(d,"\\)$")),m=new RegExp("^hsla\\(".concat(c,",").concat(d,",").concat(d,",").concat(c,"\\)$")),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function x(){return this.rgb().formatHex()}function w(){return this.rgb().formatRgb()}function b(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=u.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?S(t):3===n?
2new k(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?C(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?C(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=h.exec(e))?new k(t[1],t[2],t[3],1):(t=f.exec(e))?new k(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=g.exec(e))?C(t[1],t[2],t[3],t[4]):(t=p.exec(e))?C(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=v.exec(e))?O(t[1],t[2]/100,t[3]/100,1):(t=m.exec(e))?O(t[1],t[2]/100,t[3]/100,t[4]):y.hasOwnProperty(e)?S(y[e]):"transparent"===e?new k(NaN,NaN,NaN,0):null}function S(e){return new k(e>>16&255,e>>8&255,255&e,1)}function C(e,t,n,o){return o<=0&&(e=t=n=NaN),new k(e,t,n,o)}function E(e,t,n,o){return 1===arguments.length?((i=e)instanceof r||(i=b(i)),i?new k((i=i.rgb()).r,i.g,i.b,i.opacity):new k):new k(e,t,n,null==o?1:o);var i}function k(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}function M(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b))}function N(){const e=_(this.opacity);return"".concat(1===e?"rgb(":"rgba(").concat(A(this.r),", ").concat(A(this.g),", ").concat(A(this.b)).concat(1===e?")":", ".concat(e,")"))}function _(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function A(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function P(e){return((e=A(e))<16?"0":"")+e.toString(16)}function O(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new I(e,t,n,o)}function z(e){if(e instanceof I)return new I(e.h,e.s,e.l,e.opacity);if(e instanceof r||(e=b(e)),!e)return new I;if(e instanceof I)return e;var t=(e=e.rgb()).r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),a=Math.max(t,n,o),l=NaN,s=a-i,c=(a+i)/2;return s?(l=t===a?(n-o)/s+6*(n<o):n===a?(o-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,l*=60):s=c>0&&c<1?0:l,new I(l,s,c,e.opacity)}function I(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}function D(e){return(e=(e||0)%360)<0?e+360:e}function R(e){return Math.max(0,Math.min(1,e||0))}function L(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}o(r,b,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:x,formatHex:x,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return z(this).formatHsl()},formatRgb:w,toString:w}),o(k,E,i(r,{brighter(e){return e=null==e?l:Math.pow(l,e),new k(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?a:Math.pow(a,e),new k(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new k(A(this.r),A(this.g),A(this.b),_(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:M,formatHex:M,formatHex8:function(){return"#".concat(P(this.r)).concat(P(this.g)).concat(P(this.b)).concat(P(255*(isNaN(this.opacity)?1:this.opacity)))},formatRgb:N,toString:N})),o(I,(function(e,t,n,o){return 1===arguments.length?z(e):new I(e,t,n,null==o?1:o)}),i(r,{brighter(e){return e=null==e?l:Math.pow(l,e),new I(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?a:Math.pow(a,e),new I(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new k(L(e>=240?e-240:e+120,i,o),L(e,i,o),L(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new I(D(this.h),R(this.s),R(this.l),_(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=_(this.opacity);return"".concat(1===e?"hsl(":"hsla(").concat(D(this.h),", ").concat(100*R(this.s),"%, ").concat(100*R(this.l),"%").concat(1===e?")":", ".concat(e,")"))}}))},38419:(e,t,n)=>{n.d(t,{A:()=>o});const o=e=>()=>e},50010:(e,t,n)=>{function o(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}n.d(t,{A:()=>o})},75365:(e,t,n)=>{n.d(t,{Ay:()=>c});var o=n(75206);function i(e,t,n,o,i){var r=e*e,a=r*e;return((1-3*e+3*r-a)*t+(4-6*r+3*a)*n+(1+3*e+3*r-3*a)*o+a*i)/6}var r=n(38419);function a(e,t){return function(n){return e+n*t}}function l(e){return 1===(e=+e)?s:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}(t,n,e):(0,r.A)(isNaN(t)?n:t)}}function s(e,t){var n=t-e;return n?a(e,n):(0,r.A)(isNaN(e)?t:e)}const c=function e(t){var n=l(t);function i(e,t){var i=n((e=(0,o.Qh)(e)).r,(t=(0,o.Qh)(t)).r),r=n(e.g,t.g),a=n(e.b,t.b),l=s(e.opacity,t.opacity);return function(t){return e.r=i(t),e.g=r(t),e.b=a(t),e.opacity=l(t),e+""}}return i.gamma=e,i}(1);function d(e){return function(t){var n,i,r=t.length,a=new Array(r),l=new Array(r),s=new Array(r);for(n=0;n<r;++n)i=(0,o.Qh)(t[n]),a[n]=i.r||0,l[n]=i.g||0,s[n]=i.b||0;return a=e(a),l=e(l),s=e(s),i.opacity=1,function(e){return i.r=a(e),i.g=l(e),i.b=s(e),i+""}}}d((function(e){var t=e.length-1;return function(n){var o=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),r=e[o],a=e[o+1],l=o>0?e[o-1]:2*r-a,s=o<t-1?e[o+2]:2*a-r;return i((n-o/t)*t,l,r,a,s)}})),d((function(e){var t=e.length;return function(n){var o=Math.floor(((n%=1)<0?++n:n)*t),r=e[(o+t-1)%t],a=e[o%t],l=e[(o+1)%t],s=e[(o+2)%t];return i((n-o/t)*t,r,a,l,s)}}))}
2,97162:(e,t,n)=>{n.d(t,{A:()=>a});var o=n(50010),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,r=new RegExp(i.source,"g");function a(e,t){var n,a,l,s=i.lastIndex=r.lastIndex=0,c=-1,d=[],u=[];for(e+="",t+="";(n=i.exec(e))&&(a=r.exec(t));)(l=a.index)>s&&(l=t.slice(s,l),d[c]?d[c]+=l:d[++c]=l),(n=n[0])===(a=a[0])?d[c]?d[c]+=a:d[++c]=a:(d[++c]=null,u.push({i:c,x:(0,o.A)(n,a)})),s=r.lastIndex;return s<t.length&&(l=t.slice(s),d[c]?d[c]+=l:d[++c]=l),d.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var n,o=0;o<t;++o)d[(n=u[o]).i]=n.x(e);return d.join("")})}},23156:(e,t,n)=>{n.d(t,{ZmB:()=>i});var o=n(13441);function i(e){return(0,o.k5)({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M288 376.4l.1-.1 26.4 14.1 85.2 45.5-16.5-97.6-4.8-28.7 20.7-20.5 70.1-69.3-96.1-14.2-29.3-4.3-12.9-26.6L288.1 86.9l-.1 .3 0 289.2zm175.1 98.3c2 12-3 24.2-12.9 31.3s-23 8-33.8 2.3L288.1 439.8 159.8 508.3C149 514 135.9 513.1 126 506s-14.9-19.3-12.9-31.3L137.8 329 33.6 225.9c-8.6-8.5-11.7-21.2-7.9-32.7s13.7-19.9 25.7-21.7L195 150.3 259.4 18c5.4-11 16.5-18 28.8-18s23.4 7 28.8 18l64.3 132.3 143.6 21.2c12 1.8 22 10.2 25.7 21.7s.7 24.2-7.9 32.7L438.5 329l24.6 145.7z"},child:[]}]})(e)}},82639:(e,t,n)=>{n.d(t,{qhP:()=>i});var o=n(13441);function i(e){return(0,o.k5)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M400 25c-48.2 0-87 38.84-87 87 0 48.2 38.8 87 87 87s87-38.8 87-87c0-48.16-38.8-87-87-87zm40.5 34.01l15 9.98-70.1 105.11-55.8-55.7 12.8-12.8 40.2 40.3 57.9-86.89zM304.7 156.1L186.4 238H32v36h154.4l118.3 81.9c5.1-11 12.1-21 20.5-29.5L223.6 256l101.6-70.4c-8.4-8.5-15.4-18.5-20.5-29.5zM400 313c-48.2 0-87 38.8-87 87s38.8 87 87 87 87-38.8 87-87-38.8-87-87-87zm-41.6 32.6l41.6 41.6 41.6-41.6 12.8 12.8-41.6 41.6 41.6 41.6-12.8 12.8-41.6-41.6-41.6 41.6-12.8-12.8 41.6-41.6-41.6-41.6 12.8-12.8z"},child:[]}]})(e)}}}]); 3//# sourceMappingURL=9117.ac5bee66.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.