openc3-cosmos-tool-cmdtlmserver 6.9.1 → 6.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/tools/cmdtlmserver/ArrayWidget-C59wpWWk-5c23b659d87f2c68f1f8.js +2 -0
- data/tools/cmdtlmserver/{ArrayplotWidget-CoRsUxHG-cf7fff88417fb2243c3d.js → ArrayplotWidget-tKqIV461-69b93fbe6c96b6fc74c8.js} +1 -1
- data/tools/cmdtlmserver/{BarColumn-DHP-zQ4R-8f7de54e6fbaa25e4ec4.js → BarColumn-CUO9ur6W-a3cf13ae72d2bcaca048.js} +1 -1
- data/tools/cmdtlmserver/BlockWidget-BdlMR_1A-72f9faa443712ec20192.js +2 -0
- data/tools/cmdtlmserver/{ButtonWidget-C3ZWRjZZ-d4f10adaa4d980be147b.js → ButtonWidget-C2JVmh3p-8182fd293966fb57b545.js} +2 -2
- data/tools/cmdtlmserver/{CanvasWidget-CL-XzPF4-5cb52c70d0a7623af62d.js → CanvasWidget-BRbdw1fu-e883370954a0f3c628b6.js} +1 -1
- data/tools/cmdtlmserver/{CanvasdotWidget-D8Y9DgVE-d4ce1b672cfd13141a61.js → CanvasdotWidget-C8T_w03p-9abf39f00eddceb492b2.js} +1 -1
- data/tools/cmdtlmserver/{CanvasimageWidget-DHSGK_tD-b0b463aa2a7854867228.js → CanvasimageWidget-C1w2vSsG-90c81cd3ab87a8825002.js} +1 -1
- data/tools/cmdtlmserver/{CanvasimagevalueWidget-Btt_fQfC-9bad1ce95b773296304d.js → CanvasimagevalueWidget-BMv2SmEq-d6d92e343a2a6105fd90.js} +1 -1
- data/tools/cmdtlmserver/{CanvaslabelWidget-BF_8RTjv-cc491567aedeb0a05962.js → CanvaslabelWidget-LEBZQ3DR-fb14e176d00f00150d8e.js} +1 -1
- data/tools/cmdtlmserver/{CanvaslabelvalueWidget-scbwaujI-921ddd08e78e6a07a01e.js → CanvaslabelvalueWidget-Q6UdEanF-17272a719eefb062c283.js} +1 -1
- data/tools/cmdtlmserver/CanvaslineWidget-BhvBCDoS-d693034562792622b829.js +1 -0
- data/tools/cmdtlmserver/{CanvaslinevalueWidget-CljziRek-55c5928bcdef9cd5c3e1.js → CanvaslinevalueWidget-EaASC9TU-cbb21d5a502c664894f1.js} +1 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-C3bjQwrp-3bf99905f8136eb37d45.js +1 -0
- data/tools/cmdtlmserver/{CmdPacketsTab-2fc1a07bfa4480ac1f08.js → CmdPacketsTab-90b7eafbae0c1ed28430.js} +1 -1
- data/tools/cmdtlmserver/{CmdTlmServer-8583a13b294ed4f3cb46.js → CmdTlmServer-5fa13cb7651202a03c8c.js} +2 -2
- data/tools/cmdtlmserver/{ComboboxWidget-BLXNYFiY-13a3fa2f54e442f31472.js → ComboboxWidget-CmruSbJy-e223f5d0af5d55988d3f.js} +1 -1
- data/tools/cmdtlmserver/{DataFlowsTab-d5417860ccc3925137e9.js → DataFlowsTab-b2e31ee49fd89c2b01c4.js} +1 -1
- data/tools/cmdtlmserver/{DateWidget-BTqLCtLS-8daf3620df3f82d93460.js → DateWidget-CcUxRlJ2-988ead4672c9bff3fd3c.js} +1 -1
- data/tools/cmdtlmserver/{DetailsDialog-BNCS3QAe-321aef533102379472dd.js → DetailsDialog-DxYZre4A-3db5b5e7905643a0fb80.js} +1 -1
- data/tools/cmdtlmserver/{DynamicWidget-CfMtj7H8-c6963e567e7e1f83eb47.js → DynamicWidget-DHL7pbgW-4c1d29fa83848dc6e5d8.js} +1 -1
- data/tools/cmdtlmserver/{FormatvalueWidget-CLYx8qbg-a8b84f8338259639bf3e.js → FormatvalueWidget-Lk5K0wTL-6b725aa76f27d5db94ab.js} +1 -1
- data/tools/cmdtlmserver/Graph-CjEE2WxX-bb7f5ba3af37177d131e.js +1 -0
- data/tools/cmdtlmserver/{GraphWidget-Cb6Ozf54-9a6662f6a20837d0632e.js → GraphWidget-BaO2FpKo-4d4707ab4567aad52098.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalWidget-AY2M01qP-2edc328bb61ab1d8c352.js → HorizontalWidget-D3Q5IUQg-17d375b2b69c785818b6.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalboxWidget-2MEKvq_C-5f3d5a6c63938edc7e25.js → HorizontalboxWidget-D7bUUqfG-95eb191777368357ab5a.js} +1 -1
- data/tools/cmdtlmserver/HorizontallineWidget-DZcIetQh-1b698bc4b69a6cc5b460.js +1 -0
- data/tools/cmdtlmserver/{IframeWidget-UKKUl7k5-d952d6f2121f46bd5cd1.js → IframeWidget-Df7vTYZj-9aeaf295370b58030c56.js} +1 -1
- data/tools/cmdtlmserver/{ImageLoader-C-CIL4YD-5c9f041325968056ecee.js → ImageLoader-DpKY46fX-d37df4bf688051c6e62b.js} +1 -1
- data/tools/cmdtlmserver/{ImageviewerWidget-DhuQH5Io-3ffa4eba2d5ec7fab561.js → ImageviewerWidget-wHbhv08x-c35a4a41bc8347fa46be.js} +1 -1
- data/tools/cmdtlmserver/InterfaceFlowChart-9c58deee6e517473f8c4.js +27 -0
- data/tools/cmdtlmserver/{InterfacesTab-c4826fb489e9ede4a629.js → InterfacesTab-985faadca6eef712e593.js} +1 -1
- data/tools/cmdtlmserver/{LabelWidget-SO9zqcNN-ad11c9cf1f60a49a2e18.js → LabelWidget-BehwzOCR-47adc21706d0e6825f5b.js} +1 -1
- data/tools/cmdtlmserver/LabelledWidget-DJKR8ikj-ac6dcacfa7568ee8041f.js +1 -0
- data/tools/cmdtlmserver/LabelprogressbarWidget-D4Qzq894-ccf7a29fdf6d3a96a8f2.js +1 -0
- data/tools/cmdtlmserver/LabelsparklineWidget-CwCOklZG-8c7ccc992e75f0f32be6.js +1 -0
- data/tools/cmdtlmserver/{LabelvalueWidget-B6BbNFnk-841a2d1e10f7ed6c758b.js → LabelvalueWidget-DW8Q7BTX-24a2c366e17b2a0d986a.js} +1 -1
- data/tools/cmdtlmserver/{LabelvaluedescWidget-CxfL-H9C-8070d7b77c88031486ce.js → LabelvaluedescWidget-DgNX7tK2-32ed7f56c071646d6021.js} +1 -1
- data/tools/cmdtlmserver/{LabelvaluelimitsbarWidget-BT5k9mHv-5ae949fa461b8d83a90b.js → LabelvaluelimitsbarWidget-DAEBW0hU-4a2f141d335fc2396b7e.js} +1 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-Dok-of6n-fb3408cc4e10ea11a8ba.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluerangebarWidget-DexAc2UB-93c700592d4adb69c24f.js → LabelvaluerangebarWidget-CQ0xCUFU-ba4525c34b19d1673724.js} +1 -1
- data/tools/cmdtlmserver/{Layout-Dd6dRf3R-5d9525589ebd67d04af3.js → Layout-CrCMUbtG-8ba11f2f51ce35865950.js} +1 -1
- data/tools/cmdtlmserver/{LedWidget-D1RwHb_V-e70a453d62de53fc4cc4.js → LedWidget-DzQNEDF7-1a86f7864c026403ffce.js} +1 -1
- data/tools/cmdtlmserver/{LimitsbarWidget-ClOmoV50-32e4687296483925ef45.js → LimitsbarWidget-zkoAz9SQ-4b557968f197282b5c2e.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolorWidget-CBUoEYKp-2eda2f669a46488e8a70.js → LimitscolorWidget-dez316Rk-622833252ce09add096f.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolumnWidget-hsHkmY-_-dfe985da8cb1e4fb8f44.js → LimitscolumnWidget-D-IPNDVg-d4c4ba78f86930d43613.js} +1 -1
- data/tools/cmdtlmserver/LinegraphWidget-CicnZgjt-950c059e71af09179822.js +1 -0
- data/tools/cmdtlmserver/{MatrixbycolumnsWidget-CsogVU9c-10fd32777925d9442a96.js → MatrixbycolumnsWidget-D3qN6GTr-9b3e1323688e8d2250c7.js} +1 -1
- data/tools/cmdtlmserver/{ProgressbarWidget-CO6CEkxP-c039479ecf62eded7ca5.js → ProgressbarWidget-CLilcPBe-94014008fbae23a95f6d.js} +1 -1
- data/tools/cmdtlmserver/{RadiobuttonWidget-DrxUclws-bf048676c97fbc5f15f9.js → RadiobuttonWidget-Dsy01RJ--82e43666d0c6f0045450.js} +1 -1
- data/tools/cmdtlmserver/RadiogroupWidget-BNcVGNj1-fab29deaa5fa4eaa585d.js +1 -0
- data/tools/cmdtlmserver/{RangebarWidget-5uQTfLMP-fbf20be901d74457c1e3.js → RangebarWidget-DhcoIdNf-3f0956ef2273c2185b69.js} +1 -1
- data/tools/cmdtlmserver/{RawBuffer-297eb45db5fd466515cf.js → RawBuffer-ac6de873d5cea7850d06.js} +1 -1
- data/tools/cmdtlmserver/{RawDialog-4bd995f9b817bead62bc.js → RawDialog-86087d6f8e22b8945b6d.js} +1 -1
- data/tools/cmdtlmserver/{RollupWidget-B0DCULnu-c1c8709da1baf6ebd6ee.js → RollupWidget-BypuPvE7-52117c9be621dbc973e9.js} +1 -1
- data/tools/cmdtlmserver/{RoutersTab-5b98f50d4e2f63f9dd35.js → RoutersTab-3486e9bb3f7831f1e280.js} +1 -1
- data/tools/cmdtlmserver/{ScrollwindowWidget-BOkZQgtf-e6cc33bc849eb8d7bd65.js → ScrollwindowWidget-DNQgHoNO-618d56cd3f6bc6014130.js} +1 -1
- data/tools/cmdtlmserver/{SignalWidget-Cis0Xkea-d93e29d8a24c7fa83262.js → SignalWidget-BHwyScCG-aeaa41671901e05a8989.js} +1 -1
- data/tools/cmdtlmserver/{SpacerWidget-CLcqC2Qk-5a2784ed86deeb186b04.js → SpacerWidget-CFxXXTm7-20089e05c6aacecc0f18.js} +1 -1
- data/tools/cmdtlmserver/{SparklineWidget-CTp83eZ--d8923fe24ad5454672ea.js → SparklineWidget-C0lRpRrp-43729970d1edf3af29bf.js} +1 -1
- data/tools/cmdtlmserver/{StatusTab-f0d97741c9b81165be4d.js → StatusTab-ae9620bb09c9b607daa7.js} +1 -1
- data/tools/cmdtlmserver/{TabbookWidget-uucd-zsX-9ca00b138ad0410a395d.js → TabbookWidget-CeeBOYOt-2c790812db8c1ef31168.js} +1 -1
- data/tools/cmdtlmserver/{TargetsTab-e73932f8e410c019a7fb.js → TargetsTab-3d3aae0beab7206bd1de.js} +1 -1
- data/tools/cmdtlmserver/TextboxWidget-DoA2b3YU-f1b61ed60a5afc248ebc.js +1 -0
- data/tools/cmdtlmserver/TextfieldWidget-Dj4DV74o-48e1ba9820260a3e2e47.js +1 -0
- data/tools/cmdtlmserver/{TimeWidget-CPNVZaUM-5c584984fa282cb34f7d.js → TimeWidget-DAQDQ0UM-7bdfef740de9e2ada41f.js} +1 -1
- data/tools/cmdtlmserver/TitleWidget-Ct0JlY9s-c24fc13063982ef30e20.js +1 -0
- data/tools/cmdtlmserver/{TlmPacketsTab-e3cc489a1a75be3ad163.js → TlmPacketsTab-809c372993d7ba2d68ba.js} +1 -1
- data/tools/cmdtlmserver/{Updater-837ca86e536f4a3bdfa3.js → Updater-553d513753f29e3810f3.js} +1 -1
- data/tools/cmdtlmserver/{VWidget-DQGJRgAk-5116c4895c75eb64bc95.js → VWidget-A802LGvR-ac28cc03daf8d86d0a13.js} +1 -1
- data/tools/cmdtlmserver/{ValueWidget-Bk1RFjks-bafe9d75ed0ad230977c.js → ValueWidget-QaBYsiZz-882368d57808716f6de0.js} +1 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-CFToRM7w-3fa1f5ff41c95e3035ef.js +1 -0
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-BG7naMYx-ae729c50c05933a5e4a8.js +1 -0
- data/tools/cmdtlmserver/{ValuerangebarWidget-CcQw_XK9-cf89ccb88ad449e8cbae.js → ValuerangebarWidget-CChK2Lmm-8b6741981136504f3321.js} +1 -1
- data/tools/cmdtlmserver/{VerticalWidget-CNtFQv3R-f4938160b8ca4f6f8e29.js → VerticalWidget-C8iN5DJK-2202053d30d577ff94f6.js} +1 -1
- data/tools/cmdtlmserver/{VerticalboxWidget-Yxmz1SnU-e3f9ebb22e5e4d61a3ad.js → VerticalboxWidget-CXwUSWrP-f2515b5fd1433388cb09.js} +1 -1
- data/tools/cmdtlmserver/{Widget-LsyjS7ZS-cdba91229220d626542a.js → Widget-Cx1jBJHK-752645b358a0eb44dbb9.js} +1 -1
- data/tools/cmdtlmserver/main-851cb6e931fb7e4e1ea8.js +1505 -0
- data/tools/cmdtlmserver/main.js +1 -1
- data/tools/cmdtlmserver/services-fb7b2ae749c6cb1388eb.js +7 -0
- metadata +80 -80
- data/tools/cmdtlmserver/ArrayWidget-DLfNWDzN-668cf74ee813dc5f8b4e.js +0 -2
- data/tools/cmdtlmserver/BlockWidget-BmHSFvOq-7972fe8dc7ee035e8bc5.js +0 -2
- data/tools/cmdtlmserver/CanvaslineWidget-gRvm_-TT-3f553128be52acccf4b4.js +0 -1
- data/tools/cmdtlmserver/CheckbuttonWidget-BOabI_jE-7719358d066394c0e656.js +0 -1
- data/tools/cmdtlmserver/Graph-BliBYJxD-4840ff23f489551cb5c6.js +0 -1
- data/tools/cmdtlmserver/HorizontallineWidget-DgpOPA7q-4d2f373e68599c0b3c9a.js +0 -1
- data/tools/cmdtlmserver/InterfaceFlowChart-cf8e7ac29846b6274daf.js +0 -27
- data/tools/cmdtlmserver/LabelledWidget-DWoM5AJ5-5be5b0fc4b1d554cd2c9.js +0 -1
- data/tools/cmdtlmserver/LabelprogressbarWidget-D3vnkvQZ-ecdff8119d3acede9267.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-DO0T-Jot-1037dec1f749b07920ed.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-DUbmxh4p-83f93e14d0e7f5d6567d.js +0 -1
- data/tools/cmdtlmserver/LinegraphWidget-CXrKtxOo-b32b5ac365e8b55b70b1.js +0 -1
- data/tools/cmdtlmserver/RadiogroupWidget-DN9C38cg-d3e6f1038a6500acab63.js +0 -1
- data/tools/cmdtlmserver/TextboxWidget-C2n38ti5-c9817307d1c09190a5a7.js +0 -1
- data/tools/cmdtlmserver/TextfieldWidget--HTv9ddk-68f02460d9d011823773.js +0 -1
- data/tools/cmdtlmserver/TitleWidget-Cp0cb6V8-f81d2e0d0b8018f28841.js +0 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-C0HIBYh2-f90d82733623ccfbbb25.js +0 -1
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-BTT90uyX-9f2d92c01237bf9eac93.js +0 -1
- data/tools/cmdtlmserver/main-65cfe3c3762daf491069.js +0 -1505
- data/tools/cmdtlmserver/services-eb1403f6c88517815ca2.js +0 -7
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var Sv=Object.defineProperty;var kv=(ft,ot,_e)=>ot in ft?Sv(ft,ot,{enumerable:!0,configurable:!0,writable:!0,value:_e}):ft[ot]=_e;var Me=(ft,ot,_e)=>kv(ft,typeof ot!="symbol"?ot+"":ot,_e);System.register(["vue","./Updater-553d513753f29e3810f3.js","./RawBuffer-ac6de873d5cea7850d06.js","./main-851cb6e931fb7e4e1ea8.js","./services-fb7b2ae749c6cb1388eb.js"],function(ft,ot){"use strict";var _e,Gn,rt,Yn,ye,ht,kr,Cr,de,oe,Z,se,ke,ge,ue,$r,Ee,me,fe,Ke,pt,vt,Ir,Pt,Ae,Mr,At,Ve,rn,ze,qn,De,Dr,Oe,Pe,an,Or,Tr,pe,Se,we,Pr,jn,gt,Ye,Rt,Ar,Rr,zr,Br,Vr,it,Lr;return{setters:[re=>{_e=re.defineComponent,Gn=re.getCurrentScope,rt=re.inject,Yn=re.effectScope,ye=re.watch,ht=re.provide,kr=re.useSlots,Cr=re.onUnmounted,de=re.createElementBlock,oe=re.openBlock,Z=re.unref,se=re.createVNode,ke=re.renderSlot,ge=re.withCtx,ue=re.createElementVNode,$r=re.createPropsRestProxy,Ee=re.toRef,me=re.ref,fe=re.computed,Ke=re.onMounted,pt=re.normalizeClass,vt=re.getCurrentInstance,Ir=re.reactive,Pt=re.onScopeDispose,Ae=re.nextTick,Mr=re.onBeforeMount,At=re.shallowRef,Ve=re.Fragment,rn=re.renderList,ze=re.normalizeStyle,qn=re.onBeforeUnmount,De=re.createCommentVNode,Dr=re.isMemoSame,Oe=re.createBlock,Pe=re.toDisplayString,an=re.isRef,Or=re.toRefs,Tr=re.customRef,pe=re.toValue,Se=re.resolveComponent,we=re.h,Pr=re.useAttrs,jn=re.mergeProps,gt=re.resolveDynamicComponent,Ye=re.createTextVNode,Rt=re.markRaw,Ar=re.readonly,Rr=re.normalizeProps,zr=re.guardReactiveProps},re=>{Br=re.U},re=>{Vr=re.R},re=>{it=re._},re=>{Lr=re.y}],execute:function(){var re=document.createElement("style");re.textContent=`.details-table[data-v-0b4171c8]{width:100%;overflow-x:hidden;overflow-y:hidden}.interface-node[data-v-a31e429f]{position:relative;background:#fff;border:2px solid #1d85e1;border-radius:8px;text-align:center;padding:10px;box-shadow:0 2px 8px #0000001a;cursor:pointer}.node-label[data-v-a31e429f]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.router-node[data-v-75db5a9b]{position:relative;background:#fff;border:2px solid #ba1de1;border-radius:8px;text-align:center;padding:10px;box-shadow:0 2px 8px #0000001a;cursor:pointer}.node-label[data-v-75db5a9b]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.cosmos-node[data-v-d2155b1f]{background:#fff;border:2px solid #10b981;border-radius:8px;padding:10px;text-align:center;box-shadow:0 2px 8px #0000001a;height:200px;width:200px}.node-label[data-v-d2155b1f]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.target-node[data-v-b38bbebb]{background:#fff;border:2px solid #10b981;border-radius:8px;padding:10px;text-align:center;box-shadow:0 2px 8px #0000001a;height:200px;width:200px}.node-label[data-v-b38bbebb]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.write-protocol-node[data-v-301d4de9]{background:#fff7ed;border:2px solid #f97316;border-radius:4px;padding:4px 6px;text-align:center;font-size:10px;box-shadow:0 2px 4px #0003;position:absolute;z-index:10;display:flex;align-items:center;justify-content:center;visibility:visible!important;cursor:pointer}.protocol-label[data-v-301d4de9]{font-weight:500;font-size:10px;margin:2px 0;color:#374151}.read-protocol-node[data-v-d8220607]{background:#ecfeff;border:2px solid #06b6d4;border-radius:4px;padding:4px 6px;text-align:center;font-size:10px;box-shadow:0 2px 4px #0003;position:absolute;z-index:10;display:flex;align-items:center;justify-content:center;visibility:visible!important;cursor:pointer}.protocol-label[data-v-d8220607]{font-weight:500;font-size:10px;margin:2px 0;color:#374151}.vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0;direction:ltr}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.selection{cursor:pointer}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4;overflow:clip}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharray:none;animation:none}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.vue-flow__node.draggable{cursor:grab;pointer-events:all}.vue-flow__node.draggable.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{left:50%;bottom:0;transform:translate(-50%,50%)}.vue-flow__handle-top{left:50%;top:0;transform:translate(-50%,-50%)}.vue-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.vue-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}.vue-flow__controls{box-shadow:0 0 2px 1px #00000014}.vue-flow__controls-button{background:#fefefe;border:none;border-bottom:1px solid #eee;box-sizing:content-box;display:flex;justify-content:center;align-items:center;width:16px;height:16px;cursor:pointer;-webkit-user-select:none;user-select:none;padding:5px}.vue-flow__controls-button svg{width:100%;max-width:12px;max-height:12px}.vue-flow__controls-button:hover{background:#f4f4f4}.vue-flow__controls-button:disabled{pointer-events:none}.vue-flow__controls-button:disabled svg{fill-opacity:.4}:root{--vf-node-bg: #fff;--vf-node-text: #222;--vf-connection-path: #b1b1b7;--vf-handle: #555}.vue-flow__edge.updating .vue-flow__edge-path{stroke:#777}.vue-flow__edge-text{font-size:10px}.vue-flow__edge-textbg{fill:#fff}.vue-flow__connection-path{stroke:var(--vf-connection-path)}.vue-flow__node{cursor:grab}.vue-flow__node.selectable:focus,.vue-flow__node.selectable:focus-visible{outline:none}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{padding:10px;border-radius:3px;width:150px;font-size:12px;text-align:center;border-width:1px;border-style:solid;color:var(--vf-node-text);background-color:var(--vf-node-bg);border-color:var(--vf-node-color)}.vue-flow__node-default.selected,.vue-flow__node-default.selected:hover,.vue-flow__node-input.selected,.vue-flow__node-input.selected:hover,.vue-flow__node-output.selected,.vue-flow__node-output.selected:hover{box-shadow:0 0 0 .5px var(--vf-box-shadow)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node-default .vue-flow__handle,.vue-flow__node-input .vue-flow__handle,.vue-flow__node-output .vue-flow__handle{background:var(--vf-handle)}.vue-flow__node-default.selectable:hover,.vue-flow__node-input.selectable:hover,.vue-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.vue-flow__node-input{--vf-node-color: var(--vf-node-color, #0041d0);--vf-handle: var(--vf-node-color, #0041d0);--vf-box-shadow: var(--vf-node-color, #0041d0);background:var(--vf-node-bg);border-color:var(--vf-node-color, #0041d0)}.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible{outline:none;border:1px solid var(--vf-node-color, #0041d0)}.vue-flow__node-default{--vf-handle: var(--vf-node-color, #1a192b);--vf-box-shadow: var(--vf-node-color, #1a192b);background:var(--vf-node-bg);border-color:var(--vf-node-color, #1a192b)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible{outline:none;border:1px solid var(--vf-node-color, #1a192b)}.vue-flow__node-output{--vf-handle: var(--vf-node-color, #ff0072);--vf-box-shadow: var(--vf-node-color, #ff0072);background:var(--vf-node-bg);border-color:var(--vf-node-color, #ff0072)}.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid var(--vf-node-color, #ff0072)}.vue-flow__nodesselection-rect,.vue-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible,.vue-flow__selection:focus,.vue-flow__selection:focus-visible{outline:none}.vue-flow__handle{width:6px;height:6px;background:var(--vf-handle);border:1px solid #fff;border-radius:100%}.interface-flow-chart{height:100%;width:100%}.vue-flow-container{height:100%;width:100%;background-color:#172635;border-radius:4px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#6b7280}.vue-flow__handle{height:24px;width:10px;background:#aaa;border-radius:4px}.vue-flow__node{background-color:#172635}.vue-flow__edges path{stroke-width:2}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(re);function zt(e){return Gn()?(Pt(e),!0):!1}function Qe(e){return typeof e=="function"?e():Z(e)}const zs=typeof window<"u"&&typeof document<"u",Bs=e=>typeof e<"u",Vs=Object.prototype.toString,Ls=e=>Vs.call(e)==="[object Object]",Hs=()=>{};function Fs(e,t){function n(...r){return new Promise((o,a)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(a)})}return n}const Hr=e=>e();function Gs(e=Hr){const t=me(!0);function n(){t.value=!1}function r(){t.value=!0}const o=(...a)=>{t.value&&e(...a)};return{isActive:Ar(t),pause:n,resume:r,eventFilter:o}}function Fr(e,t=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(t?()=>o(n):r,e)})}function Ys(e,t,n={}){const{eventFilter:r=Hr,...o}=n;return ye(e,Fs(r,t),o)}function St(e,t,n={}){const{eventFilter:r,...o}=n,{eventFilter:a,pause:i,resume:s,isActive:l}=Gs(r);return{stop:Ys(e,t,{...o,eventFilter:a}),pause:i,resume:s,isActive:l}}function qs(e,t={}){if(!an(e))return Or(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const r in e.value)n[r]=Tr(()=>({get(){return e.value[r]},set(o){var a;if((a=Qe(t.replaceRef))!=null?a:!0)if(Array.isArray(e.value)){const s=[...e.value];s[r]=o,e.value=s}else{const s={...e.value,[r]:o};Object.setPrototypeOf(s,Object.getPrototypeOf(e.value)),e.value=s}else e.value[r]=o}}));return n}function Wn(e,t=!1){function n(d,{flush:f="sync",deep:h=!1,timeout:m,throwOnTimeout:y}={}){let g=null;const w=[new Promise(v=>{g=ye(e,x=>{d(x)!==t&&(g==null||g(),v(x))},{flush:f,deep:h,immediate:!0})})];return m!=null&&w.push(Fr(m,y).then(()=>Qe(e)).finally(()=>g==null?void 0:g())),Promise.race(w)}function r(d,f){if(!an(d))return n(x=>x===d,f);const{flush:h="sync",deep:m=!1,timeout:y,throwOnTimeout:g}=f??{};let E=null;const v=[new Promise(x=>{E=ye([e,d],([z,B])=>{t!==(z===B)&&(E==null||E(),x(z))},{flush:h,deep:m,immediate:!0})})];return y!=null&&v.push(Fr(y,g).then(()=>Qe(e)).finally(()=>(E==null||E(),Qe(e)))),Promise.race(v)}function o(d){return n(f=>!!f,d)}function a(d){return r(null,d)}function i(d){return r(void 0,d)}function s(d){return n(Number.isNaN,d)}function l(d,f){return n(h=>{const m=Array.from(h);return m.includes(d)||m.includes(Qe(d))},f)}function c(d){return u(1,d)}function u(d=1,f){let h=-1;return n(()=>(h+=1,h>=d),f)}return Array.isArray(Qe(e))?{toMatch:n,toContains:l,changed:c,changedTimes:u,get not(){return Wn(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:a,toBeNaN:s,toBeUndefined:i,changed:c,changedTimes:u,get not(){return Wn(e,!t)}}}function Xn(e){return Wn(e)}function js(e){var t;const n=Qe(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Gr=zs?window:void 0;function Yr(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=Gr):[t,n,r,o]=e,!t)return Hs;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const a=[],i=()=>{a.forEach(u=>u()),a.length=0},s=(u,d,f,h)=>(u.addEventListener(d,f,h),()=>u.removeEventListener(d,f,h)),l=ye(()=>[js(t),Qe(o)],([u,d])=>{if(i(),!u)return;const f=Ls(d)?{...d}:d;a.push(...n.flatMap(h=>r.map(m=>s(u,h,m,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),i()};return zt(c),c}function Ws(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function qr(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:o=Gr,eventName:a="keydown",passive:i=!1,dedupe:s=!1}=r,l=Ws(t);return Yr(o,a,u=>{u.repeat&&Qe(s)||l(u)&&n(u)},i)}function Xs(e){return JSON.parse(JSON.stringify(e))}function Un(e,t,n,r={}){var o,a,i;const{clone:s=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:f}=r,h=vt(),m=n||(h==null?void 0:h.emit)||((o=h==null?void 0:h.$emit)==null?void 0:o.bind(h))||((i=(a=h==null?void 0:h.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(h==null?void 0:h.proxy));let y=c;t||(t="modelValue"),y=y||`update:${t.toString()}`;const g=v=>s?typeof s=="function"?s(v):Xs(v):v,E=()=>Bs(e[t])?g(e[t]):d,w=v=>{f?f(v)&&m(y,v):m(y,v)};if(l){const v=E(),x=me(v);let z=!1;return ye(()=>e[t],B=>{z||(z=!0,x.value=g(B),Ae(()=>z=!1))}),ye(x,B=>{!z&&(B!==e[t]||u)&&w(B)},{deep:u}),x}else return fe({get(){return E()},set(v){w(v)}})}var Us={value:()=>{}};function sn(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ln(n)}function ln(e){this._=e}function Zs(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ln.prototype=sn.prototype={constructor:ln,on:function(e,t){var n=this._,r=Zs(e+"",n),o,a=-1,i=r.length;if(arguments.length<2){for(;++a<i;)if((o=(e=r[a]).type)&&(o=Ks(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<i;)if(o=(e=r[a]).type)n[o]=jr(n[o],e.name,t);else if(t==null)for(o in n)n[o]=jr(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new ln(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,a;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,o=a.length;r<o;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};function Ks(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function jr(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Us,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Zn="http://www.w3.org/1999/xhtml";const Wr={svg:"http://www.w3.org/2000/svg",xhtml:Zn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function un(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),Wr.hasOwnProperty(t)?{space:Wr[t],local:e}:e}function Qs(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Zn&&t.documentElement.namespaceURI===Zn?t.createElement(e):t.createElementNS(n,e)}}function Js(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Xr(e){var t=un(e);return(t.local?Js:Qs)(t)}function el(){}function Kn(e){return e==null?el:function(){return this.querySelector(e)}}function tl(e){typeof e!="function"&&(e=Kn(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a=t[o],i=a.length,s=r[o]=new Array(i),l,c,u=0;u<i;++u)(l=a[u])&&(c=e.call(l,l.__data__,u,a))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new Be(r,this._parents)}function nl(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ol(){return[]}function Ur(e){return e==null?ol:function(){return this.querySelectorAll(e)}}function rl(e){return function(){return nl(e.apply(this,arguments))}}function il(e){typeof e=="function"?e=rl(e):e=Ur(e);for(var t=this._groups,n=t.length,r=[],o=[],a=0;a<n;++a)for(var i=t[a],s=i.length,l,c=0;c<s;++c)(l=i[c])&&(r.push(e.call(l,l.__data__,c,i)),o.push(l));return new Be(r,o)}function Zr(e){return function(){return this.matches(e)}}function Kr(e){return function(t){return t.matches(e)}}var al=Array.prototype.find;function sl(e){return function(){return al.call(this.children,e)}}function ll(){return this.firstElementChild}function ul(e){return this.select(e==null?ll:sl(typeof e=="function"?e:Kr(e)))}var cl=Array.prototype.filter;function dl(){return Array.from(this.children)}function fl(e){return function(){return cl.call(this.children,e)}}function hl(e){return this.selectAll(e==null?dl:fl(typeof e=="function"?e:Kr(e)))}function pl(e){typeof e!="function"&&(e=Zr(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a=t[o],i=a.length,s=r[o]=[],l,c=0;c<i;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Be(r,this._parents)}function Qr(e){return new Array(e.length)}function vl(){return new Be(this._enter||this._groups.map(Qr),this._parents)}function cn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}cn.prototype={constructor:cn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function gl(e){return function(){return e}}function ml(e,t,n,r,o,a){for(var i=0,s,l=t.length,c=a.length;i<c;++i)(s=t[i])?(s.__data__=a[i],r[i]=s):n[i]=new cn(e,a[i]);for(;i<l;++i)(s=t[i])&&(o[i]=s)}function _l(e,t,n,r,o,a,i){var s,l,c=new Map,u=t.length,d=a.length,f=new Array(u),h;for(s=0;s<u;++s)(l=t[s])&&(f[s]=h=i.call(l,l.__data__,s,t)+"",c.has(h)?o[s]=l:c.set(h,l));for(s=0;s<d;++s)h=i.call(e,a[s],s,a)+"",(l=c.get(h))?(r[s]=l,l.__data__=a[s],c.delete(h)):n[s]=new cn(e,a[s]);for(s=0;s<u;++s)(l=t[s])&&c.get(f[s])===l&&(o[s]=l)}function yl(e){return e.__data__}function wl(e,t){if(!arguments.length)return Array.from(this,yl);var n=t?_l:ml,r=this._parents,o=this._groups;typeof e!="function"&&(e=gl(e));for(var a=o.length,i=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=r[c],d=o[c],f=d.length,h=bl(e.call(u,u&&u.__data__,c,r)),m=h.length,y=s[c]=new Array(m),g=i[c]=new Array(m),E=l[c]=new Array(f);n(u,d,y,g,E,h,t);for(var w=0,v=0,x,z;w<m;++w)if(x=y[w]){for(w>=v&&(v=w+1);!(z=g[v])&&++v<m;);x._next=z||null}}return i=new Be(i,r),i._enter=s,i._exit=l,i}function bl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xl(){return new Be(this._exit||this._groups.map(Qr),this._parents)}function El(e,t,n){var r=this.enter(),o=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?a.remove():n(a),r&&o?r.merge(o).order():o}function Nl(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,a=r.length,i=Math.min(o,a),s=new Array(o),l=0;l<i;++l)for(var c=n[l],u=r[l],d=c.length,f=s[l]=new Array(d),h,m=0;m<d;++m)(h=c[m]||u[m])&&(f[m]=h);for(;l<o;++l)s[l]=n[l];return new Be(s,this._parents)}function Sl(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,a=r[o],i;--o>=0;)(i=r[o])&&(a&&i.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(i,a),a=i);return this}function kl(e){e||(e=Cl);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a){for(var i=n[a],s=i.length,l=o[a]=new Array(s),c,u=0;u<s;++u)(c=i[u])&&(l[u]=c);l.sort(t)}return new Be(o,this._parents).order()}function Cl(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function $l(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Il(){return Array.from(this)}function Ml(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null}function Dl(){let e=0;for(const t of this)++e;return e}function Ol(){return!this.node()}function Tl(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],a=0,i=o.length,s;a<i;++a)(s=o[a])&&e.call(s,s.__data__,a,o);return this}function Pl(e){return function(){this.removeAttribute(e)}}function Al(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Rl(e,t){return function(){this.setAttribute(e,t)}}function zl(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Bl(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Vl(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Ll(e,t){var n=un(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Al:Pl:typeof t=="function"?n.local?Vl:Bl:n.local?zl:Rl)(n,t))}function Jr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Hl(e){return function(){this.style.removeProperty(e)}}function Fl(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Gl(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Yl(e,t,n){return arguments.length>1?this.each((t==null?Hl:typeof t=="function"?Gl:Fl)(e,t,n??"")):kt(this.node(),e)}function kt(e,t){return e.style.getPropertyValue(t)||Jr(e).getComputedStyle(e,null).getPropertyValue(t)}function ql(e){return function(){delete this[e]}}function jl(e,t){return function(){this[e]=t}}function Wl(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Xl(e,t){return arguments.length>1?this.each((t==null?ql:typeof t=="function"?Wl:jl)(e,t)):this.node()[e]}function ei(e){return e.trim().split(/^|\s+/)}function Qn(e){return e.classList||new ti(e)}function ti(e){this._node=e,this._names=ei(e.getAttribute("class")||"")}ti.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ni(e,t){for(var n=Qn(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function oi(e,t){for(var n=Qn(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Ul(e){return function(){ni(this,e)}}function Zl(e){return function(){oi(this,e)}}function Kl(e,t){return function(){(t.apply(this,arguments)?ni:oi)(this,e)}}function Ql(e,t){var n=ei(e+"");if(arguments.length<2){for(var r=Qn(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Kl:t?Ul:Zl)(n,t))}function Jl(){this.textContent=""}function eu(e){return function(){this.textContent=e}}function tu(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function nu(e){return arguments.length?this.each(e==null?Jl:(typeof e=="function"?tu:eu)(e)):this.node().textContent}function ou(){this.innerHTML=""}function ru(e){return function(){this.innerHTML=e}}function iu(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function au(e){return arguments.length?this.each(e==null?ou:(typeof e=="function"?iu:ru)(e)):this.node().innerHTML}function su(){this.nextSibling&&this.parentNode.appendChild(this)}function lu(){return this.each(su)}function uu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function cu(){return this.each(uu)}function du(e){var t=typeof e=="function"?e:Xr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fu(){return null}function hu(e,t){var n=typeof e=="function"?e:Xr(e),r=t==null?fu:typeof t=="function"?t:Kn(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function pu(){var e=this.parentNode;e&&e.removeChild(this)}function vu(){return this.each(pu)}function gu(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mu(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function _u(e){return this.select(e?mu:gu)}function yu(e){return arguments.length?this.property("__data__",e):this.node().__data__}function wu(e){return function(t){e.call(this,t,this.__data__)}}function bu(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function xu(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,a;n<o;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Eu(e,t,n){return function(){var r=this.__on,o,a=wu(t);if(r){for(var i=0,s=r.length;i<s;++i)if((o=r[i]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=n),o.value=t;return}}this.addEventListener(e.type,a,n),o={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(o):this.__on=[o]}}function Nu(e,t,n){var r=bu(e+""),o,a=r.length,i;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(o=0,u=s[l];o<a;++o)if((i=r[o]).type===u.type&&i.name===u.name)return u.value}return}for(s=t?Eu:xu,o=0;o<a;++o)this.each(s(r[o],t,n));return this}function ri(e,t,n){var r=Jr(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Su(e,t){return function(){return ri(this,e,t)}}function ku(e,t){return function(){return ri(this,e,t.apply(this,arguments))}}function Cu(e,t){return this.each((typeof t=="function"?ku:Su)(e,t))}function*$u(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length,i;o<a;++o)(i=r[o])&&(yield i)}var ii=[null];function Be(e,t){this._groups=e,this._parents=t}function Bt(){return new Be([[document.documentElement]],ii)}function Iu(){return this}Be.prototype=Bt.prototype={constructor:Be,select:tl,selectAll:il,selectChild:ul,selectChildren:hl,filter:pl,data:wl,enter:vl,exit:xl,join:El,merge:Nl,selection:Iu,order:Sl,sort:kl,call:$l,nodes:Il,node:Ml,size:Dl,empty:Ol,each:Tl,attr:Ll,style:Yl,property:Xl,classed:Ql,text:nu,html:au,raise:lu,lower:cu,append:du,insert:hu,remove:vu,clone:_u,datum:yu,on:Nu,dispatch:Cu,[Symbol.iterator]:$u};function Le(e){return typeof e=="string"?new Be([[document.querySelector(e)]],[document.documentElement]):new Be([[e]],ii)}function Mu(e){let t;for(;t=e.sourceEvent;)e=t;return e}function qe(e,t){if(e=Mu(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Du={passive:!1},Vt={capture:!0,passive:!1};function Jn(e){e.stopImmediatePropagation()}function Ct(e){e.preventDefault(),e.stopImmediatePropagation()}function ai(e){var t=e.document.documentElement,n=Le(e).on("dragstart.drag",Ct,Vt);"onselectstart"in t?n.on("selectstart.drag",Ct,Vt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function si(e,t){var n=e.document.documentElement,r=Le(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ct,Vt),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const dn=e=>()=>e;function eo(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:a,x:i,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}eo.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ou(e){return!e.ctrlKey&&!e.button}function Tu(){return this.parentNode}function Pu(e,t){return t??{x:e.x,y:e.y}}function Au(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ru(){var e=Ou,t=Tu,n=Pu,r=Au,o={},a=sn("start","drag","end"),i=0,s,l,c,u,d=0;function f(x){x.on("mousedown.drag",h).filter(r).on("touchstart.drag",g).on("touchmove.drag",E,Du).on("touchend.drag touchcancel.drag",w).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,z){if(!(u||!e.call(this,x,z))){var B=v(this,t.call(this,x,z),x,z,"mouse");B&&(Le(x.view).on("mousemove.drag",m,Vt).on("mouseup.drag",y,Vt),ai(x.view),Jn(x),c=!1,s=x.clientX,l=x.clientY,B("start",x))}}function m(x){if(Ct(x),!c){var z=x.clientX-s,B=x.clientY-l;c=z*z+B*B>d}o.mouse("drag",x)}function y(x){Le(x.view).on("mousemove.drag mouseup.drag",null),si(x.view,c),Ct(x),o.mouse("end",x)}function g(x,z){if(e.call(this,x,z)){var B=x.changedTouches,$=t.call(this,x,z),b=B.length,I,T;for(I=0;I<b;++I)(T=v(this,$,x,z,B[I].identifier,B[I]))&&(Jn(x),T("start",x,B[I]))}}function E(x){var z=x.changedTouches,B=z.length,$,b;for($=0;$<B;++$)(b=o[z[$].identifier])&&(Ct(x),b("drag",x,z[$]))}function w(x){var z=x.changedTouches,B=z.length,$,b;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),$=0;$<B;++$)(b=o[z[$].identifier])&&(Jn(x),b("end",x,z[$]))}function v(x,z,B,$,b,I){var T=a.copy(),k=qe(I||B,z),p,V,_;if((_=n.call(x,new eo("beforestart",{sourceEvent:B,target:f,identifier:b,active:i,x:k[0],y:k[1],dx:0,dy:0,dispatch:T}),$))!=null)return p=_.x-k[0]||0,V=_.y-k[1]||0,function O(M,L,F){var q=k,Y;switch(M){case"start":o[b]=O,Y=i++;break;case"end":delete o[b],--i;case"drag":k=qe(F||L,z),Y=i;break}T.call(M,x,new eo(M,{sourceEvent:L,subject:_,target:f,identifier:b,active:Y,x:k[0]+p,y:k[1]+V,dx:k[0]-q[0],dy:k[1]-q[1],dispatch:T}),$)}}return f.filter=function(x){return arguments.length?(e=typeof x=="function"?x:dn(!!x),f):e},f.container=function(x){return arguments.length?(t=typeof x=="function"?x:dn(x),f):t},f.subject=function(x){return arguments.length?(n=typeof x=="function"?x:dn(x),f):n},f.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:dn(!!x),f):r},f.on=function(){var x=a.on.apply(a,arguments);return x===a?f:x},f.clickDistance=function(x){return arguments.length?(d=(x=+x)*x,f):Math.sqrt(d)},f}function to(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function li(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Lt(){}var Ht=.7,fn=1/Ht,$t="\\s*([+-]?\\d+)\\s*",Ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zu=/^#([0-9a-f]{3,8})$/,Bu=new RegExp(`^rgb\\(${$t},${$t},${$t}\\)$`),Vu=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),Lu=new RegExp(`^rgba\\(${$t},${$t},${$t},${Ft}\\)$`),Hu=new RegExp(`^rgba\\(${je},${je},${je},${Ft}\\)$`),Fu=new RegExp(`^hsl\\(${Ft},${je},${je}\\)$`),Gu=new RegExp(`^hsla\\(${Ft},${je},${je},${Ft}\\)$`),ui={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};to(Lt,mt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ci,formatHex:ci,formatHex8:Yu,formatHsl:qu,formatRgb:di,toString:di});function ci(){return this.rgb().formatHex()}function Yu(){return this.rgb().formatHex8()}function qu(){return gi(this).formatHsl()}function di(){return this.rgb().formatRgb()}function mt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=zu.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?fi(t):n===3?new Re(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?hn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?hn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Bu.exec(e))?new Re(t[1],t[2],t[3],1):(t=Vu.exec(e))?new Re(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lu.exec(e))?hn(t[1],t[2],t[3],t[4]):(t=Hu.exec(e))?hn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Fu.exec(e))?vi(t[1],t[2]/100,t[3]/100,1):(t=Gu.exec(e))?vi(t[1],t[2]/100,t[3]/100,t[4]):ui.hasOwnProperty(e)?fi(ui[e]):e==="transparent"?new Re(NaN,NaN,NaN,0):null}function fi(e){return new Re(e>>16&255,e>>8&255,e&255,1)}function hn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Re(e,t,n,r)}function ju(e){return e instanceof Lt||(e=mt(e)),e?(e=e.rgb(),new Re(e.r,e.g,e.b,e.opacity)):new Re}function no(e,t,n,r){return arguments.length===1?ju(e):new Re(e,t,n,r??1)}function Re(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}to(Re,no,li(Lt,{brighter(e){return e=e==null?fn:Math.pow(fn,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ht:Math.pow(Ht,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Re(_t(this.r),_t(this.g),_t(this.b),pn(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:hi,formatHex:hi,formatHex8:Wu,formatRgb:pi,toString:pi}));function hi(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}`}function Wu(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}${yt((isNaN(this.opacity)?1:this.opacity)*255)}`}function pi(){const e=pn(this.opacity);return`${e===1?"rgb(":"rgba("}${_t(this.r)}, ${_t(this.g)}, ${_t(this.b)}${e===1?")":`, ${e})`}`}function pn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _t(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yt(e){return e=_t(e),(e<16?"0":"")+e.toString(16)}function vi(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,n,r)}function gi(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof Lt||(e=mt(e)),!e)return new He;if(e instanceof He)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(t===a?i=(n-r)/s+(n<r)*6:n===a?i=(r-t)/s+2:i=(t-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new He(i,s,l,e.opacity)}function Xu(e,t,n,r){return arguments.length===1?gi(e):new He(e,t,n,r??1)}function He(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}to(He,Xu,li(Lt,{brighter(e){return e=e==null?fn:Math.pow(fn,e),new He(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ht:Math.pow(Ht,e),new He(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Re(oo(e>=240?e-240:e+120,o,r),oo(e,o,r),oo(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new He(mi(this.h),vn(this.s),vn(this.l),pn(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=pn(this.opacity);return`${e===1?"hsl(":"hsla("}${mi(this.h)}, ${vn(this.s)*100}%, ${vn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function mi(e){return e=(e||0)%360,e<0?e+360:e}function vn(e){return Math.max(0,Math.min(1,e||0))}function oo(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const ro=e=>()=>e;function Uu(e,t){return function(n){return e+n*t}}function Zu(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Ku(e){return(e=+e)==1?_i:function(t,n){return n-t?Zu(t,n,e):ro(isNaN(t)?n:t)}}function _i(e,t){var n=t-e;return n?Uu(e,n):ro(isNaN(e)?t:e)}const gn=function e(t){var n=Ku(t);function r(o,a){var i=n((o=no(o)).r,(a=no(a)).r),s=n(o.g,a.g),l=n(o.b,a.b),c=_i(o.opacity,a.opacity);return function(u){return o.r=i(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function Qu(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(a){for(o=0;o<n;++o)r[o]=e[o]*(1-a)+t[o]*a;return r}}function Ju(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ec(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),a=new Array(n),i;for(i=0;i<r;++i)o[i]=Gt(e[i],t[i]);for(;i<n;++i)a[i]=t[i];return function(s){for(i=0;i<r;++i)a[i]=o[i](s);return a}}function tc(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function We(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function nc(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=Gt(e[o],t[o]):r[o]=t[o];return function(a){for(o in n)r[o]=n[o](a);return r}}var io=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ao=new RegExp(io.source,"g");function oc(e){return function(){return e}}function rc(e){return function(t){return e(t)+""}}function yi(e,t){var n=io.lastIndex=ao.lastIndex=0,r,o,a,i=-1,s=[],l=[];for(e=e+"",t=t+"";(r=io.exec(e))&&(o=ao.exec(t));)(a=o.index)>n&&(a=t.slice(n,a),s[i]?s[i]+=a:s[++i]=a),(r=r[0])===(o=o[0])?s[i]?s[i]+=o:s[++i]=o:(s[++i]=null,l.push({i,x:We(r,o)})),n=ao.lastIndex;return n<t.length&&(a=t.slice(n),s[i]?s[i]+=a:s[++i]=a),s.length<2?l[0]?rc(l[0].x):oc(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Gt(e,t){var n=typeof t,r;return t==null||n==="boolean"?ro(t):(n==="number"?We:n==="string"?(r=mt(t))?(t=r,gn):yi:t instanceof mt?gn:t instanceof Date?tc:Ju(t)?Qu:Array.isArray(t)?ec:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?nc:We)(e,t)}var wi=180/Math.PI,so={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function bi(e,t,n,r,o,a){var i,s,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*wi,skewX:Math.atan(l)*wi,scaleX:i,scaleY:s}}var mn;function ic(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?so:bi(t.a,t.b,t.c,t.d,t.e,t.f)}function ac(e){return e==null||(mn||(mn=document.createElementNS("http://www.w3.org/2000/svg","g")),mn.setAttribute("transform",e),!(e=mn.transform.baseVal.consolidate()))?so:(e=e.matrix,bi(e.a,e.b,e.c,e.d,e.e,e.f))}function xi(e,t,n,r){function o(c){return c.length?c.pop()+" ":""}function a(c,u,d,f,h,m){if(c!==d||u!==f){var y=h.push("translate(",null,t,null,n);m.push({i:y-4,x:We(c,d)},{i:y-2,x:We(u,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function i(c,u,d,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,r)-2,x:We(c,u)})):u&&d.push(o(d)+"rotate("+u+r)}function s(c,u,d,f){c!==u?f.push({i:d.push(o(d)+"skewX(",null,r)-2,x:We(c,u)}):u&&d.push(o(d)+"skewX("+u+r)}function l(c,u,d,f,h,m){if(c!==d||u!==f){var y=h.push(o(h)+"scale(",null,",",null,")");m.push({i:y-4,x:We(c,d)},{i:y-2,x:We(u,f)})}else(d!==1||f!==1)&&h.push(o(h)+"scale("+d+","+f+")")}return function(c,u){var d=[],f=[];return c=e(c),u=e(u),a(c.translateX,c.translateY,u.translateX,u.translateY,d,f),i(c.rotate,u.rotate,d,f),s(c.skewX,u.skewX,d,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(h){for(var m=-1,y=f.length,g;++m<y;)d[(g=f[m]).i]=g.x(h);return d.join("")}}}var sc=xi(ic,"px, ","px)","deg)"),lc=xi(ac,", ",")",")"),uc=1e-12;function Ei(e){return((e=Math.exp(e))+1/e)/2}function cc(e){return((e=Math.exp(e))-1/e)/2}function dc(e){return((e=Math.exp(2*e))-1)/(e+1)}const _n=function e(t,n,r){function o(a,i){var s=a[0],l=a[1],c=a[2],u=i[0],d=i[1],f=i[2],h=u-s,m=d-l,y=h*h+m*m,g,E;if(y<uc)E=Math.log(f/c)/t,g=function($){return[s+$*h,l+$*m,c*Math.exp(t*$*E)]};else{var w=Math.sqrt(y),v=(f*f-c*c+r*y)/(2*c*n*w),x=(f*f-c*c-r*y)/(2*f*n*w),z=Math.log(Math.sqrt(v*v+1)-v),B=Math.log(Math.sqrt(x*x+1)-x);E=(B-z)/t,g=function($){var b=$*E,I=Ei(z),T=c/(n*w)*(I*dc(t*b+z)-cc(z));return[s+T*h,l+T*m,c*I/Ei(t*b+z)]}}return g.duration=E*1e3*t/Math.SQRT2,g}return o.rho=function(a){var i=Math.max(.001,+a),s=i*i,l=s*s;return e(i,s,l)},o}(Math.SQRT2,2,4);var It=0,Yt=0,qt=0,Ni=1e3,yn,jt,wn=0,wt=0,bn=0,Wt=typeof performance=="object"&&performance.now?performance:Date,Si=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function lo(){return wt||(Si(fc),wt=Wt.now()+bn)}function fc(){wt=0}function xn(){this._call=this._time=this._next=null}xn.prototype=ki.prototype={constructor:xn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?lo():+n)+(t==null?0:+t),!this._next&&jt!==this&&(jt?jt._next=this:yn=this,jt=this),this._call=e,this._time=n,uo()},stop:function(){this._call&&(this._call=null,this._time=1/0,uo())}};function ki(e,t,n){var r=new xn;return r.restart(e,t,n),r}function hc(){lo(),++It;for(var e=yn,t;e;)(t=wt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--It}function Ci(){wt=(wn=Wt.now())+bn,It=Yt=0;try{hc()}finally{It=0,vc(),wt=0}}function pc(){var e=Wt.now(),t=e-wn;t>Ni&&(bn-=t,wn=e)}function vc(){for(var e,t=yn,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:yn=n);jt=e,uo(r)}function uo(e){if(!It){Yt&&(Yt=clearTimeout(Yt));var t=e-wt;t>24?(e<1/0&&(Yt=setTimeout(Ci,e-Wt.now()-bn)),qt&&(qt=clearInterval(qt))):(qt||(wn=Wt.now(),qt=setInterval(pc,Ni)),It=1,Si(Ci))}}function $i(e,t,n){var r=new xn;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var gc=sn("start","end","cancel","interrupt"),mc=[],Ii=0,Mi=1,co=2,En=3,Di=4,fo=5,Nn=6;function Sn(e,t,n,r,o,a){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;_c(e,n,{name:t,index:r,group:o,on:gc,tween:mc,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ii})}function ho(e,t){var n=Fe(e,t);if(n.state>Ii)throw new Error("too late; already scheduled");return n}function Xe(e,t){var n=Fe(e,t);if(n.state>En)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function _c(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=ki(a,0,n.time);function a(c){n.state=Mi,n.timer.restart(i,n.delay,n.time),n.delay<=c&&i(c-n.delay)}function i(c){var u,d,f,h;if(n.state!==Mi)return l();for(u in r)if(h=r[u],h.name===n.name){if(h.state===En)return $i(i);h.state===Di?(h.state=Nn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[u]):+u<t&&(h.state=Nn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[u])}if($i(function(){n.state===En&&(n.state=Di,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=co,n.on.call("start",e,e.__data__,n.index,n.group),n.state===co){for(n.state=En,o=new Array(f=n.tween.length),u=0,d=-1;u<f;++u)(h=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=h);o.length=d+1}}function s(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=fo,1),d=-1,f=o.length;++d<f;)o[d].call(e,u);n.state===fo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=Nn,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function kn(e,t){var n=e.__transition,r,o,a=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((r=n[i]).name!==t){a=!1;continue}o=r.state>co&&r.state<fo,r.state=Nn,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[i]}a&&delete e.__transition}}function yc(e){return this.each(function(){kn(this,e)})}function wc(e,t){var n,r;return function(){var o=Xe(this,e),a=o.tween;if(a!==n){r=n=a;for(var i=0,s=r.length;i<s;++i)if(r[i].name===t){r=r.slice(),r.splice(i,1);break}}o.tween=r}}function bc(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var a=Xe(this,e),i=a.tween;if(i!==r){o=(r=i).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}a.tween=o}}function xc(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fe(this.node(),n).tween,o=0,a=r.length,i;o<a;++o)if((i=r[o]).name===e)return i.value;return null}return this.each((t==null?wc:bc)(n,e,t))}function po(e,t,n){var r=e._id;return e.each(function(){var o=Xe(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Fe(o,r).value[t]}}function Oi(e,t){var n;return(typeof t=="number"?We:t instanceof mt?gn:(n=mt(t))?(t=n,gn):yi)(e,t)}function Ec(e){return function(){this.removeAttribute(e)}}function Nc(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Sc(e,t,n){var r,o=n+"",a;return function(){var i=this.getAttribute(e);return i===o?null:i===r?a:a=t(r=i,n)}}function kc(e,t,n){var r,o=n+"",a;return function(){var i=this.getAttributeNS(e.space,e.local);return i===o?null:i===r?a:a=t(r=i,n)}}function Cc(e,t,n){var r,o,a;return function(){var i,s=n(this),l;return s==null?void this.removeAttribute(e):(i=this.getAttribute(e),l=s+"",i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s)))}}function $c(e,t,n){var r,o,a;return function(){var i,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),l=s+"",i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s)))}}function Ic(e,t){var n=un(e),r=n==="transform"?lc:Oi;return this.attrTween(e,typeof t=="function"?(n.local?$c:Cc)(n,r,po(this,"attr."+e,t)):t==null?(n.local?Nc:Ec)(n):(n.local?kc:Sc)(n,r,t))}function Mc(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Dc(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Oc(e,t){var n,r;function o(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Dc(e,a)),n}return o._value=t,o}function Tc(e,t){var n,r;function o(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Mc(e,a)),n}return o._value=t,o}function Pc(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=un(e);return this.tween(n,(r.local?Oc:Tc)(r,t))}function Ac(e,t){return function(){ho(this,e).delay=+t.apply(this,arguments)}}function Rc(e,t){return t=+t,function(){ho(this,e).delay=t}}function zc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ac:Rc)(t,e)):Fe(this.node(),t).delay}function Bc(e,t){return function(){Xe(this,e).duration=+t.apply(this,arguments)}}function Vc(e,t){return t=+t,function(){Xe(this,e).duration=t}}function Lc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Bc:Vc)(t,e)):Fe(this.node(),t).duration}function Hc(e,t){if(typeof t!="function")throw new Error;return function(){Xe(this,e).ease=t}}function Fc(e){var t=this._id;return arguments.length?this.each(Hc(t,e)):Fe(this.node(),t).ease}function Gc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Xe(this,e).ease=n}}function Yc(e){if(typeof e!="function")throw new Error;return this.each(Gc(this._id,e))}function qc(e){typeof e!="function"&&(e=Zr(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a=t[o],i=a.length,s=r[o]=[],l,c=0;c<i;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Je(r,this._parents,this._name,this._id)}function jc(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,a=Math.min(r,o),i=new Array(r),s=0;s<a;++s)for(var l=t[s],c=n[s],u=l.length,d=i[s]=new Array(u),f,h=0;h<u;++h)(f=l[h]||c[h])&&(d[h]=f);for(;s<r;++s)i[s]=t[s];return new Je(i,this._parents,this._name,this._id)}function Wc(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Xc(e,t,n){var r,o,a=Wc(t)?ho:Xe;return function(){var i=a(this,e),s=i.on;s!==r&&(o=(r=s).copy()).on(t,n),i.on=o}}function Uc(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(Xc(n,e,t))}function Zc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Kc(){return this.on("end.remove",Zc(this._id))}function Qc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Kn(e));for(var r=this._groups,o=r.length,a=new Array(o),i=0;i<o;++i)for(var s=r[i],l=s.length,c=a[i]=new Array(l),u,d,f=0;f<l;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&("__data__"in u&&(d.__data__=u.__data__),c[f]=d,Sn(c[f],t,n,f,c,Fe(u,n)));return new Je(a,this._parents,t,n)}function Jc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Ur(e));for(var r=this._groups,o=r.length,a=[],i=[],s=0;s<o;++s)for(var l=r[s],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var f=e.call(u,u.__data__,d,l),h,m=Fe(u,n),y=0,g=f.length;y<g;++y)(h=f[y])&&Sn(h,t,n,y,f,m);a.push(f),i.push(u)}return new Je(a,i,t,n)}var ed=Bt.prototype.constructor;function td(){return new ed(this._groups,this._parents)}function nd(e,t){var n,r,o;return function(){var a=kt(this,e),i=(this.style.removeProperty(e),kt(this,e));return a===i?null:a===n&&i===r?o:o=t(n=a,r=i)}}function Ti(e){return function(){this.style.removeProperty(e)}}function od(e,t,n){var r,o=n+"",a;return function(){var i=kt(this,e);return i===o?null:i===r?a:a=t(r=i,n)}}function rd(e,t,n){var r,o,a;return function(){var i=kt(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),kt(this,e))),i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s))}}function id(e,t){var n,r,o,a="style."+t,i="end."+a,s;return function(){var l=Xe(this,e),c=l.on,u=l.value[a]==null?s||(s=Ti(t)):void 0;(c!==n||o!==u)&&(r=(n=c).copy()).on(i,o=u),l.on=r}}function ad(e,t,n){var r=(e+="")=="transform"?sc:Oi;return t==null?this.styleTween(e,nd(e,r)).on("end.style."+e,Ti(e)):typeof t=="function"?this.styleTween(e,rd(e,r,po(this,"style."+e,t))).each(id(this._id,e)):this.styleTween(e,od(e,r,t),n).on("end.style."+e,null)}function sd(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function ld(e,t,n){var r,o;function a(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&sd(e,i,n)),r}return a._value=t,a}function ud(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,ld(e,t,n??""))}function cd(e){return function(){this.textContent=e}}function dd(e){return function(){var t=e(this);this.textContent=t??""}}function fd(e){return this.tween("text",typeof e=="function"?dd(po(this,"text",e)):cd(e==null?"":e+""))}function hd(e){return function(t){this.textContent=e.call(this,t)}}function pd(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&hd(o)),t}return r._value=e,r}function vd(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,pd(e))}function gd(){for(var e=this._name,t=this._id,n=Pi(),r=this._groups,o=r.length,a=0;a<o;++a)for(var i=r[a],s=i.length,l,c=0;c<s;++c)if(l=i[c]){var u=Fe(l,t);Sn(l,e,n,c,i,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Je(r,this._parents,e,n)}function md(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(a,i){var s={value:i},l={value:function(){--o===0&&a()}};n.each(function(){var c=Xe(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),o===0&&a()})}var _d=0;function Je(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Pi(){return++_d}var et=Bt.prototype;Je.prototype={constructor:Je,select:Qc,selectAll:Jc,selectChild:et.selectChild,selectChildren:et.selectChildren,filter:qc,merge:jc,selection:td,transition:gd,call:et.call,nodes:et.nodes,node:et.node,size:et.size,empty:et.empty,each:et.each,on:Uc,attr:Ic,attrTween:Pc,style:ad,styleTween:ud,text:fd,textTween:vd,remove:Kc,tween:xc,delay:zc,duration:Lc,ease:Fc,easeVarying:Yc,end:md,[Symbol.iterator]:et[Symbol.iterator]};function yd(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var wd={time:null,delay:0,duration:250,ease:yd};function bd(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function xd(e){var t,n;e instanceof Je?(t=e._id,e=e._name):(t=Pi(),(n=wd).time=lo(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i=r[a],s=i.length,l,c=0;c<s;++c)(l=i[c])&&Sn(l,e,t,c,i,n||bd(l,t));return new Je(r,this._parents,e,t)}Bt.prototype.interrupt=yc,Bt.prototype.transition=xd;const Cn=e=>()=>e;function Ed(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function tt(e,t,n){this.k=e,this.x=t,this.y=n}tt.prototype={constructor:tt,scale:function(e){return e===1?this:new tt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new tt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mt=new tt(1,0,0);tt.prototype;function vo(e){e.stopImmediatePropagation()}function Xt(e){e.preventDefault(),e.stopImmediatePropagation()}function Nd(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Sd(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Ai(){return this.__zoom||Mt}function kd(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Cd(){return navigator.maxTouchPoints||"ontouchstart"in this}function $d(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function Id(){var e=Nd,t=Sd,n=$d,r=kd,o=Cd,a=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],s=250,l=_n,c=sn("start","zoom","end"),u,d,f,h=500,m=150,y=0,g=10;function E(_){_.property("__zoom",Ai).on("wheel.zoom",b,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",T).filter(o).on("touchstart.zoom",k).on("touchmove.zoom",p).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(_,O,M,L){var F=_.selection?_.selection():_;F.property("__zoom",Ai),_!==F?z(_,O,M,L):F.interrupt().each(function(){B(this,arguments).event(L).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},E.scaleBy=function(_,O,M,L){E.scaleTo(_,function(){var F=this.__zoom.k,q=typeof O=="function"?O.apply(this,arguments):O;return F*q},M,L)},E.scaleTo=function(_,O,M,L){E.transform(_,function(){var F=t.apply(this,arguments),q=this.__zoom,Y=M==null?x(F):typeof M=="function"?M.apply(this,arguments):M,j=q.invert(Y),W=typeof O=="function"?O.apply(this,arguments):O;return n(v(w(q,W),Y,j),F,i)},M,L)},E.translateBy=function(_,O,M,L){E.transform(_,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),i)},null,L)},E.translateTo=function(_,O,M,L,F){E.transform(_,function(){var q=t.apply(this,arguments),Y=this.__zoom,j=L==null?x(q):typeof L=="function"?L.apply(this,arguments):L;return n(Mt.translate(j[0],j[1]).scale(Y.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof M=="function"?-M.apply(this,arguments):-M),q,i)},L,F)};function w(_,O){return O=Math.max(a[0],Math.min(a[1],O)),O===_.k?_:new tt(O,_.x,_.y)}function v(_,O,M){var L=O[0]-M[0]*_.k,F=O[1]-M[1]*_.k;return L===_.x&&F===_.y?_:new tt(_.k,L,F)}function x(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function z(_,O,M,L){_.on("start.zoom",function(){B(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){B(this,arguments).event(L).end()}).tween("zoom",function(){var F=this,q=arguments,Y=B(F,q).event(L),j=t.apply(F,q),W=M==null?x(j):typeof M=="function"?M.apply(F,q):M,P=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),A=F.__zoom,R=typeof O=="function"?O.apply(F,q):O,H=l(A.invert(W).concat(P/A.k),R.invert(W).concat(P/R.k));return function(X){if(X===1)X=R;else{var te=H(X),ne=P/te[2];X=new tt(ne,W[0]-te[0]*ne,W[1]-te[1]*ne)}Y.zoom(null,X)}})}function B(_,O,M){return!M&&_.__zooming||new $(_,O)}function $(_,O){this.that=_,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(_,O),this.taps=0}$.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,O){return this.mouse&&_!=="mouse"&&(this.mouse[1]=O.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=O.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=O.invert(this.touch1[0])),this.that.__zoom=O,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var O=Le(this.that).datum();c.call(_,this.that,new Ed(_,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:c}),O)}};function b(_,...O){if(!e.apply(this,arguments))return;var M=B(this,O).event(_),L=this.__zoom,F=Math.max(a[0],Math.min(a[1],L.k*Math.pow(2,r.apply(this,arguments)))),q=qe(_);if(M.wheel)(M.mouse[0][0]!==q[0]||M.mouse[0][1]!==q[1])&&(M.mouse[1]=L.invert(M.mouse[0]=q)),clearTimeout(M.wheel);else{if(L.k===F)return;M.mouse=[q,L.invert(q)],kn(this),M.start()}Xt(_),M.wheel=setTimeout(Y,m),M.zoom("mouse",n(v(w(L,F),M.mouse[0],M.mouse[1]),M.extent,i));function Y(){M.wheel=null,M.end()}}function I(_,...O){if(f||!e.apply(this,arguments))return;var M=_.currentTarget,L=B(this,O,!0).event(_),F=Le(_.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",P,!0),q=qe(_,M),Y=_.clientX,j=_.clientY;ai(_.view),vo(_),L.mouse=[q,this.__zoom.invert(q)],kn(this),L.start();function W(A){if(Xt(A),!L.moved){var R=A.clientX-Y,H=A.clientY-j;L.moved=R*R+H*H>y}L.event(A).zoom("mouse",n(v(L.that.__zoom,L.mouse[0]=qe(A,M),L.mouse[1]),L.extent,i))}function P(A){F.on("mousemove.zoom mouseup.zoom",null),si(A.view,L.moved),Xt(A),L.event(A).end()}}function T(_,...O){if(e.apply(this,arguments)){var M=this.__zoom,L=qe(_.changedTouches?_.changedTouches[0]:_,this),F=M.invert(L),q=M.k*(_.shiftKey?.5:2),Y=n(v(w(M,q),L,F),t.apply(this,O),i);Xt(_),s>0?Le(this).transition().duration(s).call(z,Y,L,_):Le(this).call(E.transform,Y,L,_)}}function k(_,...O){if(e.apply(this,arguments)){var M=_.touches,L=M.length,F=B(this,O,_.changedTouches.length===L).event(_),q,Y,j,W;for(vo(_),Y=0;Y<L;++Y)j=M[Y],W=qe(j,this),W=[W,this.__zoom.invert(W),j.identifier],F.touch0?!F.touch1&&F.touch0[2]!==W[2]&&(F.touch1=W,F.taps=0):(F.touch0=W,q=!0,F.taps=1+!!u);u&&(u=clearTimeout(u)),q&&(F.taps<2&&(d=W[0],u=setTimeout(function(){u=null},h)),kn(this),F.start())}}function p(_,...O){if(this.__zooming){var M=B(this,O).event(_),L=_.changedTouches,F=L.length,q,Y,j,W;for(Xt(_),q=0;q<F;++q)Y=L[q],j=qe(Y,this),M.touch0&&M.touch0[2]===Y.identifier?M.touch0[0]=j:M.touch1&&M.touch1[2]===Y.identifier&&(M.touch1[0]=j);if(Y=M.that.__zoom,M.touch1){var P=M.touch0[0],A=M.touch0[1],R=M.touch1[0],H=M.touch1[1],X=(X=R[0]-P[0])*X+(X=R[1]-P[1])*X,te=(te=H[0]-A[0])*te+(te=H[1]-A[1])*te;Y=w(Y,Math.sqrt(X/te)),j=[(P[0]+R[0])/2,(P[1]+R[1])/2],W=[(A[0]+H[0])/2,(A[1]+H[1])/2]}else if(M.touch0)j=M.touch0[0],W=M.touch0[1];else return;M.zoom("touch",n(v(Y,j,W),M.extent,i))}}function V(_,...O){if(this.__zooming){var M=B(this,O).event(_),L=_.changedTouches,F=L.length,q,Y;for(vo(_),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),q=0;q<F;++q)Y=L[q],M.touch0&&M.touch0[2]===Y.identifier?delete M.touch0:M.touch1&&M.touch1[2]===Y.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(Y=qe(Y,this),Math.hypot(d[0]-Y[0],d[1]-Y[1])<g)){var j=Le(this).on("dblclick.zoom");j&&j.apply(this,arguments)}}}return E.wheelDelta=function(_){return arguments.length?(r=typeof _=="function"?_:Cn(+_),E):r},E.filter=function(_){return arguments.length?(e=typeof _=="function"?_:Cn(!!_),E):e},E.touchable=function(_){return arguments.length?(o=typeof _=="function"?_:Cn(!!_),E):o},E.extent=function(_){return arguments.length?(t=typeof _=="function"?_:Cn([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),E):t},E.scaleExtent=function(_){return arguments.length?(a[0]=+_[0],a[1]=+_[1],E):[a[0],a[1]]},E.translateExtent=function(_){return arguments.length?(i[0][0]=+_[0][0],i[1][0]=+_[1][0],i[0][1]=+_[0][1],i[1][1]=+_[1][1],E):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},E.constrain=function(_){return arguments.length?(n=_,E):n},E.duration=function(_){return arguments.length?(s=+_,E):s},E.interpolate=function(_){return arguments.length?(l=_,E):l},E.on=function(){var _=c.on.apply(c,arguments);return _===c?E:_},E.clickDistance=function(_){return arguments.length?(y=(_=+_)*_,E):Math.sqrt(y)},E.tapDistance=function(_){return arguments.length?(g=+_,E):g},E}var K=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(K||{}),go=(e=>(e.Partial="partial",e.Full="full",e))(go||{}),bt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(bt||{}),at=(e=>(e.Strict="strict",e.Loose="loose",e))(at||{}),mo=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(mo||{}),Ut=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Ut||{}),Ri=(e=>(e.TopLeft="top-left",e.TopCenter="top-center",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomCenter="bottom-center",e.BottomRight="bottom-right",e))(Ri||{});const Md=["INPUT","SELECT","TEXTAREA"],Dd=typeof document<"u"?document:null;function _o(e){var t,n;const r=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,o=typeof(r==null?void 0:r.hasAttribute)=="function"?r.hasAttribute("contenteditable"):!1,a=typeof(r==null?void 0:r.closest)=="function"?r.closest(".nokey"):null;return Md.includes(r==null?void 0:r.nodeName)||o||!!a}function Od(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function zi(e,t,n,r){const o=t.replace("+",`
|
|
3
|
+
`).replace(`
|
|
4
|
+
|
|
5
|
+
`,`
|
|
6
|
+
+`).split(`
|
|
7
|
+
`).map(i=>i.trim().toLowerCase());if(o.length===1)return e.toLowerCase()===t.toLowerCase();r||n.add(e.toLowerCase());const a=o.every((i,s)=>n.has(i)&&Array.from(n.values())[s]===o[s]);return r&&n.delete(e.toLowerCase()),a}function Td(e,t){return n=>{if(!n.code&&!n.key)return!1;const r=Pd(n.code,e);return Array.isArray(e)?e.some(o=>zi(n[r],o,t,n.type==="keyup")):zi(n[r],e,t,n.type==="keyup")}}function Pd(e,t){return t.includes(e)?"code":"key"}function Zt(e,t){const n=fe(()=>pe(t==null?void 0:t.target)??Dd),r=At(pe(e)===!0);let o=!1;const a=new Set;let i=l(pe(e));ye(()=>pe(e),(c,u)=>{typeof u=="boolean"&&typeof c!="boolean"&&s(),i=l(c)},{immediate:!0}),Yr(["blur","contextmenu"],s),qr((...c)=>i(...c),c=>{var u,d;const f=pe(t==null?void 0:t.actInsideInputWithModifier)??!0,h=pe(t==null?void 0:t.preventDefault)??!1;if(o=Od(c),(!o||o&&!f)&&_o(c))return;const y=((d=(u=c.composedPath)==null?void 0:u.call(c))==null?void 0:d[0])||c.target,g=(y==null?void 0:y.nodeName)==="BUTTON"||(y==null?void 0:y.nodeName)==="A";!h&&(o||!g)&&c.preventDefault(),r.value=!0},{eventName:"keydown",target:n}),qr((...c)=>i(...c),c=>{const u=pe(t==null?void 0:t.actInsideInputWithModifier)??!0;if(r.value){if((!o||o&&!u)&&_o(c))return;o=!1,r.value=!1}},{eventName:"keyup",target:n});function s(){o=!1,a.clear(),r.value=pe(e)===!0}function l(c){return c===null?(s(),()=>!1):typeof c=="boolean"?(s(),r.value=c,()=>!1):Array.isArray(c)||typeof c=="string"?Td(c,a):c}return r}const Bi="vue-flow__node-desc",Vi="vue-flow__edge-desc",Ad="vue-flow__aria-live",Li=["Enter"," ","Escape"],Dt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function $n(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function In(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)}function Mn(e){return{width:e.offsetWidth,height:e.offsetHeight}}function xt(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Hi(e,t){return{x:xt(e.x,t[0][0],t[1][0]),y:xt(e.y,t[0][1],t[1][1])}}function Fi(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function st(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function Et(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!st(e)}function Kt(e){return Et(e)&&"computedPosition"in e}function Dn(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Rd(e){return Dn(e.width)&&Dn(e.height)&&Dn(e.x)&&Dn(e.y)}function zd(e,t,n){const r={id:e.id.toString(),type:e.type??"default",dimensions:Rt({width:0,height:0}),computedPosition:Rt({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:$e(e.data)?e.data:{},events:Rt($e(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function Gi(e,t,n){var r,o;const a={id:e.id.toString(),type:e.type??(t==null?void 0:t.type)??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(r=e.sourceHandle)==null?void 0:r.toString(),targetHandle:(o=e.targetHandle)==null?void 0:o.toString(),updatable:e.updatable??(n==null?void 0:n.updatable),selectable:e.selectable??(n==null?void 0:n.selectable),focusable:e.focusable??(n==null?void 0:n.focusable),data:$e(e.data)?e.data:{},events:Rt($e(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??(n==null?void 0:n.interactionWidth),...n??{}};return Object.assign(t??a,e,{id:e.id.toString()})}function Yi(e,t,n,r){const o=typeof e=="string"?e:e.id,a=new Set,i=r==="source"?"target":"source";for(const s of n)s[i]===o&&a.add(s[r]);return t.filter(s=>a.has(s.id))}function Bd(...e){if(e.length===3){const[a,i,s]=e;return Yi(a,i,s,"target")}const[t,n]=e,r=typeof t=="string"?t:t.id;return n.filter(a=>st(a)&&a.source===r).map(a=>n.find(i=>Et(i)&&i.id===a.target))}function Vd(...e){if(e.length===3){const[a,i,s]=e;return Yi(a,i,s,"source")}const[t,n]=e,r=typeof t=="string"?t:t.id;return n.filter(a=>st(a)&&a.target===r).map(a=>n.find(i=>Et(i)&&i.id===a.source))}function qi({source:e,sourceHandle:t,target:n,targetHandle:r}){return`vueflow__edge-${e}${t??""}-${n}${r??""}`}function Ld(e,t){return t.some(n=>st(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function Qt({x:e,y:t},{x:n,y:r,zoom:o}){return{x:e*o+n,y:t*o+r}}function Jt({x:e,y:t},{x:n,y:r,zoom:o},a=!1,i=[1,1]){const s={x:(e-n)/o,y:(t-r)/o};return a?Tn(s,i):s}function Hd(e,t){return{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)}}function ji({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function Fd({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function Wi(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const r=e[n];t=Hd(t,ji({...r.computedPosition,...r.dimensions}))}return Fd(t)}function Xi(e,t,n={x:0,y:0,zoom:1},r=!1,o=!1){const a={...Jt(t,n),width:t.width/n.zoom,height:t.height/n.zoom},i=[];for(const s of e){const{dimensions:l,selectable:c=!0,hidden:u=!1}=s,d=l.width??s.width??null,f=l.height??s.height??null;if(o&&!c||u)continue;const h=In(a,$n(s)),m=d===null||f===null,y=r&&h>0,g=(d??0)*(f??0);(m||y||h>=g||s.dragging)&&i.push(s)}return i}function Ui(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const r of e)n.add(r.id);return t.filter(r=>n.has(r.source)||n.has(r.target))}function Ot(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return tn(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Gd(e,t,n){if(typeof e=="string"||typeof e=="number"){const r=Ot(e,n),o=Ot(e,t);return{top:r,right:o,bottom:r,left:o,x:o*2,y:r*2}}if(typeof e=="object"){const r=Ot(e.top??e.y??0,n),o=Ot(e.bottom??e.y??0,n),a=Ot(e.left??e.x??0,t),i=Ot(e.right??e.x??0,t);return{top:r,right:i,bottom:o,left:a,x:a+i,y:r+o}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Yd(e,t,n,r,o,a){const{x:i,y:s}=Qt(e,{x:t,y:n,zoom:r}),{x:l,y:c}=Qt({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:r}),u=o-l,d=a-c;return{left:Math.floor(i),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}function Zi(e,t,n,r,o,a=.1){const i=Gd(a,t,n),s=(t-i.x)/e.width,l=(n-i.y)/e.height,c=Math.min(s,l),u=xt(c,r,o),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*u,m=n/2-f*u,y=Yd(e,h,m,u,t,n),g={left:Math.min(y.left-i.left,0),top:Math.min(y.top-i.top,0),right:Math.min(y.right-i.right,0),bottom:Math.min(y.bottom-i.bottom,0)};return{x:h-g.left+g.right,y:m-g.top+g.bottom,zoom:u}}function qd(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Ki(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Ki(n,t):!1}function en(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}function Qi(e){const t=e.ctrlKey&&On()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function Ji(e,t,n){return e<t?xt(Math.abs(e-t),1,t)/t:e>n?-xt(Math.abs(e-n),1,t)/t:0}function ea(e,t,n=15,r=40){const o=Ji(e.x,r,t.width-r)*n,a=Ji(e.y,r,t.height-r)*n;return[o,a]}function yo(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,r=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||r>0||e.position.x<0||e.position.y<0){let o={};if(typeof t.style=="function"?o={...t.style(t)}:t.style&&(o={...t.style}),o.width=o.width??`${t.dimensions.width}px`,o.height=o.height??`${t.dimensions.height}px`,n>0)if(typeof o.width=="string"){const a=Number(o.width.replace("px",""));o.width=`${a+n}px`}else o.width+=n;if(r>0)if(typeof o.height=="string"){const a=Number(o.height.replace("px",""));o.height=`${a+r}px`}else o.height+=r;if(e.position.x<0){const a=Math.abs(e.position.x);if(t.position.x=t.position.x-a,typeof o.width=="string"){const i=Number(o.width.replace("px",""));o.width=`${i+a}px`}else o.width+=a;e.position.x=0}if(e.position.y<0){const a=Math.abs(e.position.y);if(t.position.y=t.position.y-a,typeof o.height=="string"){const i=Number(o.height.replace("px",""));o.height=`${i+a}px`}else o.height+=a;e.position.y=0}t.dimensions.width=Number(o.width.toString().replace("px","")),t.dimensions.height=Number(o.height.toString().replace("px","")),typeof t.style=="function"?t.style=a=>{const i=t.style;return{...i(a),...o}}:t.style={...t.style,...o}}}}function ta(e,t){var n,r;const o=e.filter(i=>i.type==="add"||i.type==="remove");for(const i of o)if(i.type==="add")t.findIndex(l=>l.id===i.item.id)===-1&&t.push(i.item);else if(i.type==="remove"){const s=t.findIndex(l=>l.id===i.id);s!==-1&&t.splice(s,1)}const a=t.map(i=>i.id);for(const i of t)for(const s of e)if(s.id===i.id)switch(s.type){case"select":i.selected=s.selected;break;case"position":if(Kt(i)&&(typeof s.position<"u"&&(i.position=s.position),typeof s.dragging<"u"&&(i.dragging=s.dragging),i.expandParent&&i.parentNode)){const l=t[a.indexOf(i.parentNode)];l&&Kt(l)&&yo(i,l)}break;case"dimensions":if(Kt(i)&&(typeof s.dimensions<"u"&&(i.dimensions=s.dimensions),typeof s.updateStyle<"u"&&s.updateStyle&&(i.style={...i.style||{},width:`${(n=s.dimensions)==null?void 0:n.width}px`,height:`${(r=s.dimensions)==null?void 0:r.height}px`}),typeof s.resizing<"u"&&(i.resizing=s.resizing),i.expandParent&&i.parentNode)){const l=t[a.indexOf(i.parentNode)];l&&Kt(l)&&(!!l.dimensions.width&&!!l.dimensions.height?yo(i,l):Ae(()=>{yo(i,l)}))}break}return t}function lt(e,t){return{id:e,type:"select",selected:t}}function na(e){return{item:e,type:"add"}}function oa(e){return{id:e,type:"remove"}}function ra(e,t,n,r,o){return{id:e,source:t,target:n,sourceHandle:r||null,targetHandle:o||null,type:"remove"}}function ut(e,t=new Set,n=!1){const r=[];for(const[o,a]of e){const i=t.has(o);!(a.selected===void 0&&!i)&&a.selected!==i&&(n&&(a.selected=i),r.push(lt(a.id,i)))}return r}const ia=()=>{};function U(e){const t=new Set;let n=ia,r=()=>!1;const o=()=>t.size>0||r(),a=f=>{n=f},i=()=>{n=ia},s=f=>{r=f},l=()=>{r=()=>!1},c=f=>{t.delete(f)};return{on:f=>{t.add(f);const h=()=>c(f);return zt(h),{off:h}},off:c,trigger:f=>{const h=[n];return o()?h.push(...t):e&&h.push(e),Promise.allSettled(h.map(m=>m(f)))},hasListeners:o,listeners:t,setEmitter:a,removeEmitter:i,setHasEmitListeners:s,removeHasEmitListeners:l}}function aa(e,t,n){let r=e;do{if(r&&r.matches(t))return!0;if(r===n)return!1;r=r.parentElement}while(r);return!1}function jd(e,t,n,r){var o,a;const i=new Map;for(const[s,l]of e)(l.selected||l.id===r)&&(!l.parentNode||!Ki(l,e))&&(l.draggable||t&&typeof l.draggable>"u")&&e.get(s)&&i.set(s,{id:l.id,position:l.position||{x:0,y:0},distance:{x:n.x-((o=l.computedPosition)==null?void 0:o.x)||0,y:n.y-((a=l.computedPosition)==null?void 0:a.y)||0},from:{x:l.computedPosition.x,y:l.computedPosition.y},extent:l.extent,parentNode:l.parentNode,dimensions:{...l.dimensions},expandParent:l.expandParent});return Array.from(i.values())}function wo({id:e,dragItems:t,findNode:n}){const r=[];for(const o of t){const a=n(o.id);a&&r.push(a)}return[e?r.find(o=>o.id===e):r[0],r]}function sa(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function Wd(e,t,n){const[r,o,a,i]=typeof e!="string"?sa(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+i,n.computedPosition.y+r],[n.computedPosition.x+n.dimensions.width-o,n.computedPosition.y+n.dimensions.height-a]]:!1}function Xd(e,t,n,r){let o=e.extent||n;if((o==="parent"||!Array.isArray(o)&&(o==null?void 0:o.range)==="parent")&&!e.expandParent)if(e.parentNode&&r&&e.dimensions.width&&e.dimensions.height){const a=Wd(o,e,r);a&&(o=a)}else t(new Te(Ce.NODE_EXTENT_INVALID,e.id)),o=n;else if(Array.isArray(o)){const a=(r==null?void 0:r.computedPosition.x)||0,i=(r==null?void 0:r.computedPosition.y)||0;o=[[o[0][0]+a,o[0][1]+i],[o[1][0]+a,o[1][1]+i]]}else if(o!=="parent"&&(o!=null&&o.range)&&Array.isArray(o.range)){const[a,i,s,l]=sa(o.padding),c=(r==null?void 0:r.computedPosition.x)||0,u=(r==null?void 0:r.computedPosition.y)||0;o=[[o.range[0][0]+c+l,o.range[0][1]+u+a],[o.range[1][0]+c-i,o.range[1][1]+u-s]]}return o==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:o}function Ud({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function bo(e,t,n,r,o){const a=Ud(e.dimensions,Xd(e,n,r,o)),i=Hi(t,a);return{position:{x:i.x-((o==null?void 0:o.computedPosition.x)||0),y:i.y-((o==null?void 0:o.computedPosition.y)||0)},computedPosition:i}}function Tt(e,t,n=K.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.computedPosition.x,a=((t==null?void 0:t.y)??0)+e.computedPosition.y,{width:i,height:s}=t??Jd(e);if(r)return{x:o+i/2,y:a+s/2};switch((t==null?void 0:t.position)??n){case K.Top:return{x:o+i/2,y:a};case K.Right:return{x:o+i,y:a+s/2};case K.Bottom:return{x:o+i/2,y:a+s};case K.Left:return{x:o,y:a+s/2}}}function la(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Zd({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:a,width:i,height:s,viewport:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+a)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=ji({x:(0-l.x)/l.zoom,y:(0-l.y)/l.zoom,width:i/l.zoom,height:s/l.zoom}),d=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),f=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(d*f)>0}function Kd(e,t,n=!1){const r=typeof e.zIndex=="number";let o=r?e.zIndex:0;const a=t(e.source),i=t(e.target);return!a||!i?0:(n&&(o=r?e.zIndex:Math.max(a.computedPosition.z||0,i.computedPosition.z||0)),o)}var Ce=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(Ce||{});const ua={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
|
|
8
|
+
Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
|
|
9
|
+
Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
|
|
10
|
+
Node: ${e}
|
|
11
|
+
Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing
|
|
12
|
+
Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent
|
|
13
|
+
Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target
|
|
14
|
+
Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing
|
|
15
|
+
Edge: ${e}
|
|
16
|
+
Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing
|
|
17
|
+
Edge: ${e}
|
|
18
|
+
Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing
|
|
19
|
+
Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same
|
|
20
|
+
Edge: ${e}
|
|
21
|
+
Source: ${t}
|
|
22
|
+
Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing
|
|
23
|
+
Edge: ${e}
|
|
24
|
+
Source: ${t}
|
|
25
|
+
Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
|
|
26
|
+
Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
|
|
27
|
+
Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class Te extends Error{constructor(t,...n){var r;super((r=ua[t])==null?void 0:r.call(ua,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function xo(e){return"clientX"in e}function Qd(e){return"sourceEvent"in e}function Ue(e,t){const n=xo(e);let r,o;return n?(r=e.clientX,o=e.clientY):"touches"in e&&e.touches.length>0?(r=e.touches[0].clientX,o=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):(r=0,o=0),{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}}const On=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Jd(e){var t,n;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((n=e.dimensions)==null?void 0:n.height)??e.height??0}}function Tn(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const ef=()=>!0;function Eo(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function tf(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())In(o,$n(a))>0&&r.push(a);return r}const nf=250;function of(e,t,n,r){var o,a;let i=[],s=Number.POSITIVE_INFINITY;const l=tf(e,n,t+nf);for(const c of l){const u=[...((o=c.handleBounds)==null?void 0:o.source)??[],...((a=c.handleBounds)==null?void 0:a.target)??[]];for(const d of u){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:f,y:h}=Tt(c,d,d.position,!0),m=Math.sqrt((f-e.x)**2+(h-e.y)**2);m>t||(m<s?(i=[{...d,x:f,y:h}],s=m):m===s&&i.push({...d,x:f,y:h}))}}if(!i.length)return null;if(i.length>1){const c=r.type==="source"?"target":"source";return i.find(u=>u.type===c)??i[0]}return i[0]}function ca(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:a,doc:i,lib:s,flowId:l,isValidConnection:c=ef},u,d,f,h){const m=a==="target",y=t?i.querySelector(`.${s}-flow__handle[data-id="${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:g,y:E}=Ue(e),w=i.elementFromPoint(g,E),v=w!=null&&w.classList.contains(`${s}-flow__handle`)?w:y,x={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const z=da(void 0,v),B=v.getAttribute("data-nodeid"),$=v.getAttribute("data-handleid"),b=v.classList.contains("connectable"),I=v.classList.contains("connectableend");if(!B||!z)return x;const T={source:m?B:r,sourceHandle:m?$:o,target:m?r:B,targetHandle:m?o:$};x.connection=T;const p=b&&I&&(n===at.Strict?m&&z==="source"||!m&&z==="target":B!==r||$!==o);x.isValid=p&&c(T,{nodes:d,edges:u,sourceNode:f(T.source),targetNode:f(T.target)}),x.toHandle=fa(B,z,$,h,n,!0)}return x}function da(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function rf(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function af(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function fa(e,t,n,r,o,a=!1){var i,s,l;const c=r.get(e);if(!c)return null;const u=o===at.Strict?(i=c.handleBounds)==null?void 0:i[t]:[...((s=c.handleBounds)==null?void 0:s.source)??[],...((l=c.handleBounds)==null?void 0:l.target)??[]],d=(n?u==null?void 0:u.find(f=>f.id===n):u==null?void 0:u[0])??null;return d&&a?{...d,...Tt(c,d,d.position,!0)}:d}const No={[K.Left]:K.Right,[K.Right]:K.Left,[K.Top]:K.Bottom,[K.Bottom]:K.Top},sf=["production","prod"];function tn(e,...t){ha()&&console.warn(`[Vue Flow]: ${e}`,...t)}function ha(){return!sf.includes("production")}function pa(e,t,n,r,o){const a=t.querySelectorAll(`.vue-flow__handle.${e}`);return a!=null&&a.length?Array.from(a).map(i=>{const s=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:o,position:i.getAttribute("data-handlepos"),x:(s.left-n.left)/r,y:(s.top-n.top)/r,...Mn(i)}}):null}function So(e,t,n,r,o,a=!1,i){o.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),Ae(()=>{i.blur()})):n([e])}function $e(e){return typeof Z(e)<"u"}function lf(e,t,n,r){if(!e||!e.source||!e.target)return n(new Te(Ce.EDGE_INVALID,(e==null?void 0:e.id)??"[ID UNKNOWN]")),!1;let o;return st(e)?o=e:o={...e,id:qi(e)},o=Gi(o,void 0,r),Ld(o,t)?!1:o}function uf(e,t,n,r,o){if(!t.source||!t.target)return o(new Te(Ce.EDGE_INVALID,e.id)),!1;if(!n)return o(new Te(Ce.EDGE_NOT_FOUND,e.id)),!1;const{id:a,...i}=e;return{...i,id:r?qi(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function va(e,t,n){const r={},o=[];for(let a=0;a<e.length;++a){const i=e[a];if(!Et(i)){n(new Te(Ce.NODE_INVALID,i==null?void 0:i.id)||`[ID UNKNOWN|INDEX ${a}]`);continue}const s=zd(i,t(i.id),i.parentNode);i.parentNode&&(r[i.parentNode]=!0),o[a]=s}for(const a of o){const i=t(a.parentNode)||o.find(s=>s.id===a.parentNode);a.parentNode&&!i&&n(new Te(Ce.NODE_MISSING_PARENT,a.id,a.parentNode)),(a.parentNode||r[a.id])&&(r[a.id]&&(a.isParent=!0),i&&(i.isParent=!0))}return o}function ga(e,t,n,r,o,a){let i=o;const s=r.get(i)||new Map;r.set(i,s.set(n,t)),i=`${o}-${e}`;const l=r.get(i)||new Map;if(r.set(i,l.set(n,t)),a){i=`${o}-${e}-${a}`;const c=r.get(i)||new Map;r.set(i,c.set(n,t))}}function ko(e,t,n){e.clear();for(const r of n){const{source:o,target:a,sourceHandle:i=null,targetHandle:s=null}=r,l={edgeId:r.id,source:o,target:a,sourceHandle:i,targetHandle:s},c=`${o}-${i}--${a}-${s}`,u=`${a}-${s}--${o}-${i}`;ga("source",l,u,e,o,i),ga("target",l,c,e,a,s)}}function ma(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Co(e,t,n,r,o,a,i,s){const l=[];for(const c of e){const u=st(c)?c:lf(c,s,o,a);if(!u)continue;const d=n(u.source),f=n(u.target);if(!d||!f){o(new Te(Ce.EDGE_SOURCE_TARGET_MISSING,u.id,u.source,u.target));continue}if(!d){o(new Te(Ce.EDGE_SOURCE_MISSING,u.id,u.source));continue}if(!f){o(new Te(Ce.EDGE_TARGET_MISSING,u.id,u.target));continue}if(t&&!t(u,{edges:s,nodes:i,sourceNode:d,targetNode:f})){o(new Te(Ce.EDGE_INVALID,u.id));continue}const h=r(u.id);l.push({...Gi(u,h,a),sourceNode:d,targetNode:f})}return l}const _a=Symbol("vueFlow"),ya=Symbol("nodeId"),wa=Symbol("nodeRef"),cf=Symbol("edgeId"),df=Symbol("edgeRef"),Pn=Symbol("slots");function ba(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:r,noDragClassName:o,nodeLookup:a,nodeExtent:i,nodeDragThreshold:s,viewport:l,autoPanOnNodeDrag:c,autoPanSpeed:u,nodesDraggable:d,panBy:f,findNode:h,multiSelectionActive:m,nodesSelectionActive:y,selectNodesOnDrag:g,removeSelectedElements:E,addSelectedNodes:w,updateNodePositions:v,emits:x}=Ne(),{onStart:z,onDrag:B,onStop:$,onClick:b,el:I,disabled:T,id:k,selectable:p,dragHandle:V}=e,_=At(!1);let O=[],M,L=null,F={x:void 0,y:void 0},q={x:0,y:0},Y=null,j=!1,W=!1,P=0,A=!1;const R=pf(),H=({x:ie,y:le})=>{F={x:ie,y:le};let S=!1;if(O=O.map(N=>{const D={x:ie-N.distance.x,y:le-N.distance.y},{computedPosition:C}=bo(N,n.value?Tn(D,r.value):D,x.error,i.value,N.parentNode?h(N.parentNode):void 0);return S=S||N.position.x!==C.x||N.position.y!==C.y,N.position=C,N}),W=W||S,!!S&&(v(O,!0,!0),_.value=!0,Y)){const[N,D]=wo({id:k,dragItems:O,findNode:h});B({event:Y,node:N,nodes:D})}},X=()=>{if(!L)return;const[ie,le]=ea(q,L,u.value);if(ie!==0||le!==0){const S={x:(F.x??0)-ie/l.value.zoom,y:(F.y??0)-le/l.value.zoom};f({x:ie,y:le})&&H(S)}P=requestAnimationFrame(X)},te=(ie,le)=>{j=!0;const S=h(k);!g.value&&!m.value&&S&&(S.selected||E()),S&&pe(p)&&g.value&&So(S,m.value,w,E,y,!1,le);const N=R(ie.sourceEvent);if(F=N,O=jd(a.value,d.value,N,k),O.length){const[D,C]=wo({id:k,dragItems:O,findNode:h});z({event:ie.sourceEvent,node:D,nodes:C})}},ne=(ie,le)=>{var S;ie.sourceEvent.type==="touchmove"&&ie.sourceEvent.touches.length>1||(W=!1,s.value===0&&te(ie,le),F=R(ie.sourceEvent),L=((S=t.value)==null?void 0:S.getBoundingClientRect())||null,q=Ue(ie.sourceEvent,L))},ce=(ie,le)=>{const S=R(ie.sourceEvent);if(!A&&j&&c.value&&(A=!0,X()),!j){const N=S.xSnapped-(F.x??0),D=S.ySnapped-(F.y??0);Math.sqrt(N*N+D*D)>s.value&&te(ie,le)}(F.x!==S.xSnapped||F.y!==S.ySnapped)&&O.length&&j&&(Y=ie.sourceEvent,q=Ue(ie.sourceEvent,L),H(S))},be=ie=>{let le=!1;if(!j&&!_.value&&!m.value){const S=ie.sourceEvent,N=R(S),D=N.xSnapped-(F.x??0),C=N.ySnapped-(F.y??0),G=Math.sqrt(D*D+C*C);G!==0&&G<=s.value&&(b==null||b(S),le=!0)}if(O.length&&!le){W&&(v(O,!1,!1),W=!1);const[S,N]=wo({id:k,dragItems:O,findNode:h});$({event:ie.sourceEvent,node:S,nodes:N})}O=[],_.value=!1,A=!1,j=!1,F={x:void 0,y:void 0},cancelAnimationFrame(P)};return ye([()=>pe(T),I],([ie,le],S,N)=>{if(le){const D=Le(le);ie||(M=Ru().on("start",C=>ne(C,le)).on("drag",C=>ce(C,le)).on("end",C=>be(C)).filter(C=>{const G=C.target,Q=pe(V);return!C.button&&(!o.value||!aa(G,`.${o.value}`,le)&&(!Q||aa(G,Q,le)))}),D.call(M)),N(()=>{D.on(".drag",null),M&&(M.on("start",null),M.on("drag",null),M.on("end",null))})}}),_}function ff(){return{doubleClick:U(),click:U(),mouseEnter:U(),mouseMove:U(),mouseLeave:U(),contextMenu:U(),updateStart:U(),update:U(),updateEnd:U()}}function hf(e,t){const n=ff();return n.doubleClick.on(r=>{var o,a;t.edgeDoubleClick(r),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,r)}),n.click.on(r=>{var o,a;t.edgeClick(r),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,r)}),n.mouseEnter.on(r=>{var o,a;t.edgeMouseEnter(r),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,r)}),n.mouseMove.on(r=>{var o,a;t.edgeMouseMove(r),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,r)}),n.mouseLeave.on(r=>{var o,a;t.edgeMouseLeave(r),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,r)}),n.contextMenu.on(r=>{var o,a;t.edgeContextMenu(r),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,r)}),n.updateStart.on(r=>{var o,a;t.edgeUpdateStart(r),(a=(o=e.events)==null?void 0:o.updateStart)==null||a.call(o,r)}),n.update.on(r=>{var o,a;t.edgeUpdate(r),(a=(o=e.events)==null?void 0:o.update)==null||a.call(o,r)}),n.updateEnd.on(r=>{var o,a;t.edgeUpdateEnd(r),(a=(o=e.events)==null?void 0:o.updateEnd)==null||a.call(o,r)}),Object.entries(n).reduce((r,[o,a])=>(r.emit[o]=a.trigger,r.on[o]=a.on,r),{emit:{},on:{}})}function pf(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:r}=Ne();return o=>{var a;const i=((a=r.value)==null?void 0:a.getBoundingClientRect())??{left:0,top:0},s=Qd(o)?o.sourceEvent:o,{x:l,y:c}=Ue(s,i),u=Jt({x:l,y:c},e.value),{x:d,y:f}=n.value?Tn(u,t.value):u;return{xSnapped:d,ySnapped:f,...u}}}function An(){return!0}function xa({handleId:e,nodeId:t,type:n,isValidConnection:r,edgeUpdaterType:o,onEdgeUpdate:a,onEdgeUpdateEnd:i}){const{id:s,vueFlowRef:l,connectionMode:c,connectionRadius:u,connectOnClick:d,connectionClickStartHandle:f,nodesConnectable:h,autoPanOnConnect:m,autoPanSpeed:y,findNode:g,panBy:E,startConnection:w,updateConnection:v,endConnection:x,emits:z,viewport:B,edges:$,nodes:b,isValidConnection:I,nodeLookup:T}=Ne();let k=null,p=!1,V=null;function _(M){var L;const F=pe(n)==="target",q=xo(M),Y=Fi(M.target),j=M.currentTarget;if(j&&(q&&M.button===0||!q)){let W=function(ae){S=Ue(ae,be),H=of(Jt(S,B.value,!1,[1,1]),u.value,T.value,C),N||(D(),N=!0);const he=ca(ae,{handle:H,connectionMode:c.value,fromNodeId:pe(t),fromHandleId:pe(e),fromType:F?"target":"source",isValidConnection:R,doc:Y,lib:"vue",flowId:s,nodeLookup:T.value},$.value,b.value,g,T.value);V=he.handleDomNode,k=he.connection,p=af(!!H,he.isValid);const ve={...ee,isValid:p,to:he.toHandle&&p?Qt({x:he.toHandle.x,y:he.toHandle.y},B.value):S,toHandle:he.toHandle,toPosition:p&&he.toHandle?he.toHandle.position:No[C.position],toNode:he.toHandle?T.value.get(he.toHandle.nodeId):null};if(p&&H&&(ee!=null&&ee.toHandle)&&ve.toHandle&&ee.toHandle.type===ve.toHandle.type&&ee.toHandle.nodeId===ve.toHandle.nodeId&&ee.toHandle.id===ve.toHandle.id&&ee.to.x===ve.to.x&&ee.to.y===ve.to.y)return;const xe=H??he.toHandle;if(v(xe&&p?Qt({x:xe.x,y:xe.y},B.value):S,he.toHandle,rf(!!xe,p)),ee=ve,!H&&!p&&!V)return Eo(le);k&&k.source!==k.target&&V&&(Eo(le),le=V,V.classList.add("connecting","vue-flow__handle-connecting"),V.classList.toggle("valid",!!p),V.classList.toggle("vue-flow__handle-valid",!!p))},P=function(ae){"touches"in ae&&ae.touches.length>0||((H||V)&&k&&p&&(a?a(ae,k):z.connect(k)),z.connectEnd(ae),o&&(i==null||i(ae)),Eo(le),cancelAnimationFrame(X),x(ae),N=!1,p=!1,k=null,V=null,Y.removeEventListener("mousemove",W),Y.removeEventListener("mouseup",P),Y.removeEventListener("touchmove",W),Y.removeEventListener("touchend",P))};const A=g(pe(t));let R=pe(r)||I.value||An;!R&&A&&(R=(F?A.isValidSourcePos:A.isValidTargetPos)||An);let H,X=0;const{x:te,y:ne}=Ue(M),ce=da(pe(o),j),be=(L=l.value)==null?void 0:L.getBoundingClientRect();if(!be||!ce)return;const ie=fa(pe(t),ce,pe(e),T.value,c.value);if(!ie)return;let le,S=Ue(M,be),N=!1;const D=()=>{if(!m.value)return;const[ae,he]=ea(S,be,y.value);E({x:ae,y:he}),X=requestAnimationFrame(D)},C={...ie,nodeId:pe(t),type:ce,position:ie.position},G=T.value.get(pe(t)),J={inProgress:!0,isValid:null,from:Tt(G,C,K.Left,!0),fromHandle:C,fromPosition:C.position,fromNode:G,to:S,toHandle:null,toPosition:No[C.position],toNode:null};w({nodeId:pe(t),id:pe(e),type:ce,position:(j==null?void 0:j.getAttribute("data-handlepos"))||K.Top,...S},{x:te-be.left,y:ne-be.top}),z.connectStart({event:M,nodeId:pe(t),handleId:pe(e),handleType:ce});let ee=J;Y.addEventListener("mousemove",W),Y.addEventListener("mouseup",P),Y.addEventListener("touchmove",W),Y.addEventListener("touchend",P)}}function O(M){var L,F;if(!d.value)return;const q=pe(n)==="target";if(!f.value){z.clickConnectStart({event:M,nodeId:pe(t),handleId:pe(e)}),w({nodeId:pe(t),type:pe(n),id:pe(e),position:K.Top,...Ue(M)},void 0,!0);return}let Y=pe(r)||I.value||An;const j=g(pe(t));if(!Y&&j&&(Y=(q?j.isValidSourcePos:j.isValidTargetPos)||An),j&&(typeof j.connectable>"u"?h.value:j.connectable)===!1)return;const W=Fi(M.target),P=ca(M,{handle:{nodeId:pe(t),id:pe(e),type:pe(n),position:K.Top,...Ue(M)},connectionMode:c.value,fromNodeId:f.value.nodeId,fromHandleId:f.value.id??null,fromType:f.value.type,isValidConnection:Y,doc:W,lib:"vue",flowId:s,nodeLookup:T.value},$.value,b.value,g,T.value),A=((L=P.connection)==null?void 0:L.source)===((F=P.connection)==null?void 0:F.target);P.isValid&&P.connection&&!A&&z.connect(P.connection),z.clickConnectEnd(M),x(M,!0)}return{handlePointerDown:_,handleClick:O}}function vf(){return rt(ya,"")}function Ea(e){const t=e??vf()??"",n=rt(wa,me(null)),{findNode:r,edges:o,emits:a}=Ne(),i=r(t);return i||a.error(new Te(Ce.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:i,parentNode:fe(()=>r(i.parentNode)),connectedEdges:fe(()=>Ui([i],o.value))}}function gf(){return{doubleClick:U(),click:U(),mouseEnter:U(),mouseMove:U(),mouseLeave:U(),contextMenu:U(),dragStart:U(),drag:U(),dragStop:U()}}function mf(e,t){const n=gf();return n.doubleClick.on(r=>{var o,a;t.nodeDoubleClick(r),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,r)}),n.click.on(r=>{var o,a;t.nodeClick(r),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,r)}),n.mouseEnter.on(r=>{var o,a;t.nodeMouseEnter(r),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,r)}),n.mouseMove.on(r=>{var o,a;t.nodeMouseMove(r),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,r)}),n.mouseLeave.on(r=>{var o,a;t.nodeMouseLeave(r),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,r)}),n.contextMenu.on(r=>{var o,a;t.nodeContextMenu(r),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,r)}),n.dragStart.on(r=>{var o,a;t.nodeDragStart(r),(a=(o=e.events)==null?void 0:o.dragStart)==null||a.call(o,r)}),n.drag.on(r=>{var o,a;t.nodeDrag(r),(a=(o=e.events)==null?void 0:o.drag)==null||a.call(o,r)}),n.dragStop.on(r=>{var o,a;t.nodeDragStop(r),(a=(o=e.events)==null?void 0:o.dragStop)==null||a.call(o,r)}),Object.entries(n).reduce((r,[o,a])=>(r.emit[o]=a.trigger,r.on[o]=a.on,r),{emit:{},on:{}})}function Na(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:r,snapGrid:o,snapToGrid:a,nodesDraggable:i,emits:s}=Ne();return(l,c=!1)=>{const u=a.value?o.value[0]:5,d=a.value?o.value[1]:5,f=c?4:1,h=l.x*u*f,m=l.y*d*f,y=[];for(const g of e.value)if(g.draggable||i&&typeof g.draggable>"u"){const E={x:g.computedPosition.x+h,y:g.computedPosition.y+m},{computedPosition:w}=bo(g,E,s.error,t.value,g.parentNode?r(g.parentNode):void 0);y.push({id:g.id,position:w,from:g.position,distance:{x:l.x,y:l.y},dimensions:g.dimensions})}n(y,!0,!1)}}const Rn=.1,_f=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function ct(){return tn("Viewport not initialized yet."),Promise.resolve(!1)}const yf={zoomIn:ct,zoomOut:ct,zoomTo:ct,fitView:ct,setCenter:ct,fitBounds:ct,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:ct,setTransform:ct,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function wf(e){function t(r,o){return new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate((o==null?void 0:o.interpolate)==="linear"?Gt:_n).scaleBy($o(e.d3Selection,o==null?void 0:o.duration,o==null?void 0:o.ease,()=>{a(!0)}),r):a(!1)})}function n(r,o,a,i){return new Promise(s=>{var l;const{x:c,y:u}=Hi({x:-r,y:-o},e.translateExtent),d=Mt.translate(-c,-u).scale(a);e.d3Selection&&e.d3Zoom?(l=e.d3Zoom)==null||l.interpolate((i==null?void 0:i.interpolate)==="linear"?Gt:_n).transform($o(e.d3Selection,i==null?void 0:i.duration,i==null?void 0:i.ease,()=>{s(!0)}),d):s(!1)})}return fe(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:o=>t(1.2,o),zoomOut:o=>t(1/1.2,o),zoomTo:(o,a)=>new Promise(i=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate((a==null?void 0:a.interpolate)==="linear"?Gt:_n).scaleTo($o(e.d3Selection,a==null?void 0:a.duration,a==null?void 0:a.ease,()=>{i(!0)}),o):i(!1)}),setViewport:(o,a)=>n(o.x,o.y,o.zoom,a),setTransform:(o,a)=>n(o.x,o.y,o.zoom,a),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(o={padding:Rn,includeHiddenNodes:!1,duration:0})=>{var a,i;const s=[];for(const f of e.nodes)f.dimensions.width&&f.dimensions.height&&((o==null?void 0:o.includeHiddenNodes)||!f.hidden)&&(!((a=o.nodes)!=null&&a.length)||(i=o.nodes)!=null&&i.length&&o.nodes.includes(f.id))&&s.push(f);if(!s.length)return Promise.resolve(!1);const l=Wi(s),{x:c,y:u,zoom:d}=Zi(l,e.dimensions.width,e.dimensions.height,o.minZoom??e.minZoom,o.maxZoom??e.maxZoom,o.padding??Rn);return n(c,u,d,o)},setCenter:(o,a,i)=>{const s=typeof(i==null?void 0:i.zoom)<"u"?i.zoom:e.maxZoom,l=e.dimensions.width/2-o*s,c=e.dimensions.height/2-a*s;return n(l,c,s,i)},fitBounds:(o,a={padding:Rn})=>{const{x:i,y:s,zoom:l}=Zi(o,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,a.padding??Rn);return n(i,s,l,a)},project:o=>Jt(o,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:o=>{if(e.vueFlowRef){const{x:a,y:i}=e.vueFlowRef.getBoundingClientRect(),s={x:o.x-a,y:o.y-i};return Jt(s,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:o=>{if(e.vueFlowRef){const{x:a,y:i}=e.vueFlowRef.getBoundingClientRect(),s={x:o.x+a,y:o.y+i};return Qt(s,e.viewport)}return{x:0,y:0}}}:yf)}function $o(e,t=0,n=_f,r=()=>{}){const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e}function bf(e,t,n){const r=Yn(!0);return r.run(()=>{const o=()=>{r.run(()=>{let y,g,E=!!(n.nodes.value.length||n.edges.value.length);y=St([e.modelValue,()=>{var w,v;return(v=(w=e.modelValue)==null?void 0:w.value)==null?void 0:v.length}],([w])=>{w&&Array.isArray(w)&&(g==null||g.pause(),n.setElements(w),!g&&!E&&w.length?E=!0:g==null||g.resume())}),g=St([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([w,v])=>{var x;(x=e.modelValue)!=null&&x.value&&Array.isArray(e.modelValue.value)&&(y==null||y.pause(),e.modelValue.value=[...w,...v],Ae(()=>{y==null||y.resume()}))},{immediate:E}),Pt(()=>{y==null||y.stop(),g==null||g.stop()})})},a=()=>{r.run(()=>{let y,g,E=!!n.nodes.value.length;y=St([e.nodes,()=>{var w,v;return(v=(w=e.nodes)==null?void 0:w.value)==null?void 0:v.length}],([w])=>{w&&Array.isArray(w)&&(g==null||g.pause(),n.setNodes(w),!g&&!E&&w.length?E=!0:g==null||g.resume())}),g=St([n.nodes,()=>n.nodes.value.length],([w])=>{var v;(v=e.nodes)!=null&&v.value&&Array.isArray(e.nodes.value)&&(y==null||y.pause(),e.nodes.value=[...w],Ae(()=>{y==null||y.resume()}))},{immediate:E}),Pt(()=>{y==null||y.stop(),g==null||g.stop()})})},i=()=>{r.run(()=>{let y,g,E=!!n.edges.value.length;y=St([e.edges,()=>{var w,v;return(v=(w=e.edges)==null?void 0:w.value)==null?void 0:v.length}],([w])=>{w&&Array.isArray(w)&&(g==null||g.pause(),n.setEdges(w),!g&&!E&&w.length?E=!0:g==null||g.resume())}),g=St([n.edges,()=>n.edges.value.length],([w])=>{var v;(v=e.edges)!=null&&v.value&&Array.isArray(e.edges.value)&&(y==null||y.pause(),e.edges.value=[...w],Ae(()=>{y==null||y.resume()}))},{immediate:E}),Pt(()=>{y==null||y.stop(),g==null||g.stop()})})},s=()=>{r.run(()=>{ye(()=>t.maxZoom,()=>{t.maxZoom&&$e(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},l=()=>{r.run(()=>{ye(()=>t.minZoom,()=>{t.minZoom&&$e(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},c=()=>{r.run(()=>{ye(()=>t.translateExtent,()=>{t.translateExtent&&$e(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},u=()=>{r.run(()=>{ye(()=>t.nodeExtent,()=>{t.nodeExtent&&$e(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{r.run(()=>{ye(()=>t.applyDefault,()=>{$e(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{r.run(()=>{const y=async g=>{let E=g;typeof t.autoConnect=="function"&&(E=await t.autoConnect(g)),E!==!1&&n.addEdges([E])};ye(()=>t.autoConnect,()=>{$e(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),ye(n.autoConnect,(g,E,w)=>{g?n.onConnect(y):n.hooks.value.connect.off(y),w(()=>{n.hooks.value.connect.off(y)})},{immediate:!0})})},h=()=>{const y=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const g of Object.keys(t)){const E=g;if(!y.includes(E)){const w=Ee(()=>t[E]),v=n[E];an(v)&&r.run(()=>{ye(w,x=>{$e(x)&&(v.value=x)},{immediate:!0})})}}};(()=>{o(),a(),i(),l(),s(),c(),u(),d(),f(),h()})()}),()=>r.stop()}function xf(){return{edgesChange:U(),nodesChange:U(),nodeDoubleClick:U(),nodeClick:U(),nodeMouseEnter:U(),nodeMouseMove:U(),nodeMouseLeave:U(),nodeContextMenu:U(),nodeDragStart:U(),nodeDrag:U(),nodeDragStop:U(),nodesInitialized:U(),miniMapNodeClick:U(),miniMapNodeDoubleClick:U(),miniMapNodeMouseEnter:U(),miniMapNodeMouseMove:U(),miniMapNodeMouseLeave:U(),connect:U(),connectStart:U(),connectEnd:U(),clickConnectStart:U(),clickConnectEnd:U(),paneReady:U(),init:U(),move:U(),moveStart:U(),moveEnd:U(),selectionDragStart:U(),selectionDrag:U(),selectionDragStop:U(),selectionContextMenu:U(),selectionStart:U(),selectionEnd:U(),viewportChangeStart:U(),viewportChange:U(),viewportChangeEnd:U(),paneScroll:U(),paneClick:U(),paneContextMenu:U(),paneMouseEnter:U(),paneMouseMove:U(),paneMouseLeave:U(),edgeContextMenu:U(),edgeMouseEnter:U(),edgeMouseMove:U(),edgeMouseLeave:U(),edgeDoubleClick:U(),edgeClick:U(),edgeUpdateStart:U(),edgeUpdate:U(),edgeUpdateEnd:U(),updateNodeInternals:U(),error:U(e=>tn(e.message))}}function Ef(e,t){const n=vt();Mr(()=>{for(const[o,a]of Object.entries(t.value)){const i=s=>{e(o,s)};a.setEmitter(i),zt(a.removeEmitter),a.setHasEmitListeners(()=>r(o)),zt(a.removeHasEmitListeners)}});function r(o){var a;const i=Nf(o);return!!((a=n==null?void 0:n.vnode.props)==null?void 0:a[i])}}function Nf(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(o,a)=>a.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}function Sa(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:go.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Ut.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:bt.Bezier,style:{}},connectionMode:at.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:On()?"Meta":"Control",zoomActivationKeyCode:On()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:xf(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const Sf=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function kf(e,t,n){const r=wf(e),o=S=>{const N=S??[];e.hooks.updateNodeInternals.trigger(N)},a=S=>Vd(S,e.nodes,e.edges),i=S=>Bd(S,e.nodes,e.edges),s=S=>Ui(S,e.edges),l=({id:S,type:N,nodeId:D})=>{var C;const G=S?`-${N}-${S}`:`-${N}`;return Array.from(((C=e.connectionLookup.get(`${D}${G}`))==null?void 0:C.values())??[])},c=S=>{if(S)return t.value.get(S)},u=S=>{if(S)return n.value.get(S)},d=(S,N,D)=>{var C,G;const Q=[];for(const J of S){const ee={id:J.id,type:"position",dragging:D,from:J.from};if(N&&(ee.position=J.position,J.parentNode)){const ae=c(J.parentNode);ee.position={x:ee.position.x-(((C=ae==null?void 0:ae.computedPosition)==null?void 0:C.x)??0),y:ee.position.y-(((G=ae==null?void 0:ae.computedPosition)==null?void 0:G.y)??0)}}Q.push(ee)}Q!=null&&Q.length&&e.hooks.nodesChange.trigger(Q)},f=S=>{if(!e.vueFlowRef)return;const N=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!N)return;const D=window.getComputedStyle(N),{m22:C}=new window.DOMMatrixReadOnly(D.transform),G=[];for(const Q of S){const J=Q,ee=c(J.id);if(ee){const ae=Mn(J.nodeElement);if(!!(ae.width&&ae.height&&(ee.dimensions.width!==ae.width||ee.dimensions.height!==ae.height||J.forceUpdate))){const ve=J.nodeElement.getBoundingClientRect();ee.dimensions=ae,ee.handleBounds.source=pa("source",J.nodeElement,ve,C,ee.id),ee.handleBounds.target=pa("target",J.nodeElement,ve,C,ee.id),G.push({id:ee.id,type:"dimensions",dimensions:ae})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&r.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),G.length&&e.hooks.nodesChange.trigger(G)},h=(S,N)=>{const D=new Set,C=new Set;for(const J of S)Et(J)?D.add(J.id):st(J)&&C.add(J.id);const G=ut(t.value,D,!0),Q=ut(n.value,C);if(e.multiSelectionActive){for(const J of D)G.push(lt(J,N));for(const J of C)Q.push(lt(J,N))}G.length&&e.hooks.nodesChange.trigger(G),Q.length&&e.hooks.edgesChange.trigger(Q)},m=S=>{if(e.multiSelectionActive){const N=S.map(D=>lt(D.id,!0));e.hooks.nodesChange.trigger(N);return}e.hooks.nodesChange.trigger(ut(t.value,new Set(S.map(N=>N.id)),!0)),e.hooks.edgesChange.trigger(ut(n.value))},y=S=>{if(e.multiSelectionActive){const N=S.map(D=>lt(D.id,!0));e.hooks.edgesChange.trigger(N);return}e.hooks.edgesChange.trigger(ut(n.value,new Set(S.map(N=>N.id)))),e.hooks.nodesChange.trigger(ut(t.value,new Set,!0))},g=S=>{h(S,!0)},E=S=>{const D=(S||e.nodes).map(C=>(C.selected=!1,lt(C.id,!1)));e.hooks.nodesChange.trigger(D)},w=S=>{const D=(S||e.edges).map(C=>(C.selected=!1,lt(C.id,!1)));e.hooks.edgesChange.trigger(D)},v=S=>{if(!S||!S.length)return h([],!1);const N=S.reduce((D,C)=>{const G=lt(C.id,!1);return Et(C)?D.nodes.push(G):D.edges.push(G),D},{nodes:[],edges:[]});N.nodes.length&&e.hooks.nodesChange.trigger(N.nodes),N.edges.length&&e.hooks.edgesChange.trigger(N.edges)},x=S=>{var N;(N=e.d3Zoom)==null||N.scaleExtent([S,e.maxZoom]),e.minZoom=S},z=S=>{var N;(N=e.d3Zoom)==null||N.scaleExtent([e.minZoom,S]),e.maxZoom=S},B=S=>{var N;(N=e.d3Zoom)==null||N.translateExtent(S),e.translateExtent=S},$=S=>{e.nodeExtent=S,o()},b=S=>{var N;(N=e.d3Zoom)==null||N.clickDistance(S)},I=S=>{e.nodesDraggable=S,e.nodesConnectable=S,e.elementsSelectable=S},T=S=>{const N=S instanceof Function?S(e.nodes):S;!e.initialized&&!N.length||(e.nodes=va(N,c,e.hooks.error.trigger))},k=S=>{const N=S instanceof Function?S(e.edges):S;if(!e.initialized&&!N.length)return;const D=Co(N,e.isValidConnection,c,u,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);ko(e.connectionLookup,n.value,D),e.edges=D},p=S=>{const N=S instanceof Function?S([...e.nodes,...e.edges]):S;!e.initialized&&!N.length||(T(N.filter(Et)),k(N.filter(st)))},V=S=>{let N=S instanceof Function?S(e.nodes):S;N=Array.isArray(N)?N:[N];const D=va(N,c,e.hooks.error.trigger),C=[];for(const G of D)C.push(na(G));C.length&&e.hooks.nodesChange.trigger(C)},_=S=>{let N=S instanceof Function?S(e.edges):S;N=Array.isArray(N)?N:[N];const D=Co(N,e.isValidConnection,c,u,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),C=[];for(const G of D)C.push(na(G));C.length&&e.hooks.edgesChange.trigger(C)},O=(S,N=!0,D=!1)=>{const C=S instanceof Function?S(e.nodes):S,G=Array.isArray(C)?C:[C],Q=[],J=[];function ee(he){const ve=s(he);for(const xe of ve)(!$e(xe.deletable)||xe.deletable)&&J.push(ra(xe.id,xe.source,xe.target,xe.sourceHandle,xe.targetHandle))}function ae(he){const ve=[];for(const xe of e.nodes)xe.parentNode===he&&ve.push(xe);if(ve.length){for(const xe of ve)Q.push(oa(xe.id));N&&ee(ve);for(const xe of ve)ae(xe.id)}}for(const he of G){const ve=typeof he=="string"?c(he):he;ve&&($e(ve.deletable)&&!ve.deletable||(Q.push(oa(ve.id)),N&&ee([ve]),D&&ae(ve.id)))}J.length&&e.hooks.edgesChange.trigger(J),Q.length&&e.hooks.nodesChange.trigger(Q)},M=S=>{const N=S instanceof Function?S(e.edges):S,D=Array.isArray(N)?N:[N],C=[];for(const G of D){const Q=typeof G=="string"?u(G):G;Q&&($e(Q.deletable)&&!Q.deletable||C.push(ra(typeof G=="string"?G:G.id,Q.source,Q.target,Q.sourceHandle,Q.targetHandle)))}e.hooks.edgesChange.trigger(C)},L=(S,N,D=!0)=>{const C=u(S.id);if(!C)return!1;const G=e.edges.indexOf(C),Q=uf(S,N,C,D,e.hooks.error.trigger);if(Q){const[J]=Co([Q],e.isValidConnection,c,u,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((ee,ae)=>ae===G?J:ee),ko(e.connectionLookup,n.value,[J]),J}return!1},F=(S,N,D={replace:!1})=>{const C=u(S);if(!C)return;const G=typeof N=="function"?N(C):N;C.data=D.replace?G:{...C.data,...G}},q=S=>ta(S,e.nodes),Y=S=>{const N=ta(S,e.edges);return ko(e.connectionLookup,n.value,N),N},j=(S,N,D={replace:!1})=>{const C=c(S);if(!C)return;const G=typeof N=="function"?N(C):N;D.replace?e.nodes.splice(e.nodes.indexOf(C),1,G):Object.assign(C,G)},W=(S,N,D={replace:!1})=>{const C=c(S);if(!C)return;const G=typeof N=="function"?N(C):N;C.data=D.replace?G:{...C.data,...G}},P=(S,N,D=!1)=>{D?e.connectionClickStartHandle=S:e.connectionStartHandle=S,e.connectionEndHandle=null,e.connectionStatus=null,N&&(e.connectionPosition=N)},A=(S,N=null,D=null)=>{e.connectionStartHandle&&(e.connectionPosition=S,e.connectionEndHandle=N,e.connectionStatus=D)},R=(S,N)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,N?e.connectionClickStartHandle=null:e.connectionStartHandle=null},H=S=>{const N=Rd(S),D=N?null:Kt(S)?S:c(S.id);return!N&&!D?[null,null,N]:[N?S:$n(D),D,N]},X=(S,N=!0,D=e.nodes)=>{const[C,G,Q]=H(S);if(!C)return[];const J=[];for(const ee of D||e.nodes){if(!Q&&(ee.id===G.id||!ee.computedPosition))continue;const ae=$n(ee),he=In(ae,C);(N&&he>0||he>=ae.width*ae.height||he>=Number(C.width)*Number(C.height))&&J.push(ee)}return J},te=(S,N,D=!0)=>{const[C]=H(S);if(!C)return!1;const G=In(C,N);return D&&G>0||G>=Number(C.width)*Number(C.height)},ne=S=>{const{viewport:N,dimensions:D,d3Zoom:C,d3Selection:G,translateExtent:Q}=e;if(!C||!G||!S.x&&!S.y)return!1;const J=Mt.translate(N.x+S.x,N.y+S.y).scale(N.zoom),ee=[[0,0],[D.width,D.height]],ae=C.constrain()(J,ee,Q),he=e.viewport.x!==ae.x||e.viewport.y!==ae.y||e.viewport.zoom!==ae.k;return C.transform(G,ae),he},ce=S=>{const N=S instanceof Function?S(e):S,D=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];$e(N.defaultEdgeOptions)&&(e.defaultEdgeOptions=N.defaultEdgeOptions);const C=N.modelValue||N.nodes||N.edges?[]:void 0;C&&(N.modelValue&&C.push(...N.modelValue),N.nodes&&C.push(...N.nodes),N.edges&&C.push(...N.edges),p(C));const G=()=>{$e(N.maxZoom)&&z(N.maxZoom),$e(N.minZoom)&&x(N.minZoom),$e(N.translateExtent)&&B(N.translateExtent)};for(const Q of Object.keys(N)){const J=Q,ee=N[J];![...Sf,...D].includes(J)&&$e(ee)&&(e[J]=ee)}Xn(()=>e.d3Zoom).not.toBeNull().then(G),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:f,setElements:p,setNodes:T,setEdges:k,addNodes:V,addEdges:_,removeNodes:O,removeEdges:M,findNode:c,findEdge:u,updateEdge:L,updateEdgeData:F,updateNode:j,updateNodeData:W,applyEdgeChanges:Y,applyNodeChanges:q,addSelectedElements:g,addSelectedNodes:m,addSelectedEdges:y,setMinZoom:x,setMaxZoom:z,setTranslateExtent:B,setNodeExtent:$,setPaneClickDistance:b,removeSelectedElements:v,removeSelectedNodes:E,removeSelectedEdges:w,startConnection:P,updateConnection:A,endConnection:R,setInteractive:I,setState:ce,getIntersectingNodes:X,getIncomers:a,getOutgoers:i,getConnectedEdges:s,getHandleConnections:l,isNodeIntersecting:te,panBy:ne,fitView:S=>r.value.fitView(S),zoomIn:S=>r.value.zoomIn(S),zoomOut:S=>r.value.zoomOut(S),zoomTo:(S,N)=>r.value.zoomTo(S,N),setViewport:(S,N)=>r.value.setViewport(S,N),setTransform:(S,N)=>r.value.setTransform(S,N),getViewport:()=>r.value.getViewport(),getTransform:()=>r.value.getTransform(),setCenter:(S,N,D)=>r.value.setCenter(S,N,D),fitBounds:(S,N)=>r.value.fitBounds(S,N),project:S=>r.value.project(S),screenToFlowCoordinate:S=>r.value.screenToFlowCoordinate(S),flowToScreenCoordinate:S=>r.value.flowToScreenCoordinate(S),toObject:()=>{const S=[],N=[];for(const D of e.nodes){const{computedPosition:C,handleBounds:G,selected:Q,dimensions:J,isParent:ee,resizing:ae,dragging:he,events:ve,...xe}=D;S.push(xe)}for(const D of e.edges){const{selected:C,sourceNode:G,targetNode:Q,events:J,...ee}=D;N.push(ee)}return JSON.parse(JSON.stringify({nodes:S,edges:N,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:S=>new Promise(N=>{const{nodes:D,edges:C,position:G,zoom:Q,viewport:J}=S;if(D&&T(D),C&&k(C),J!=null&&J.x&&(J!=null&&J.y)||G){const ee=(J==null?void 0:J.x)||G[0],ae=(J==null?void 0:J.y)||G[1],he=(J==null?void 0:J.zoom)||Q||e.viewport.zoom;return Xn(()=>r.value.viewportInitialized).toBe(!0).then(()=>{r.value.setViewport({x:ee,y:ae,zoom:he}).then(()=>{N(!0)})})}else N(!0)}),updateNodeInternals:o,viewportHelper:r,$reset:()=>{const S=Sa();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const N=Mt.translate(S.defaultViewport.x??0,S.defaultViewport.y??0).scale(xt(S.defaultViewport.zoom??1,S.minZoom,S.maxZoom)),D=e.viewportRef.getBoundingClientRect(),C=[[0,0],[D.width,D.height]],G=e.d3Zoom.constrain()(N,C,S.translateExtent);e.d3Zoom.transform(e.d3Selection,G)}ce(S)},$destroy:()=>{}}}const Cf=["data-id","data-handleid","data-nodeid","data-handlepos"],dt=_e({...{name:"Handle",compatConfig:{MODE:3}},props:{id:{default:null},type:{},position:{default:()=>K.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=$r(e,["position","connectable","connectableStart","connectableEnd","id"]),r=Ee(()=>n.type??"source"),o=Ee(()=>n.isValidConnection??null),{id:a,connectionStartHandle:i,connectionClickStartHandle:s,connectionEndHandle:l,vueFlowRef:c,nodesConnectable:u,noDragClassName:d,noPanClassName:f}=Ne(),{id:h,node:m,nodeEl:y,connectedEdges:g}=Ea(),E=me(),w=Ee(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),v=Ee(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),x=Ee(()=>{var k,p,V,_,O,M;return((k=i.value)==null?void 0:k.nodeId)===h&&((p=i.value)==null?void 0:p.id)===e.id&&((V=i.value)==null?void 0:V.type)===r.value||((_=l.value)==null?void 0:_.nodeId)===h&&((O=l.value)==null?void 0:O.id)===e.id&&((M=l.value)==null?void 0:M.type)===r.value}),z=Ee(()=>{var k,p,V;return((k=s.value)==null?void 0:k.nodeId)===h&&((p=s.value)==null?void 0:p.id)===e.id&&((V=s.value)==null?void 0:V.type)===r.value}),{handlePointerDown:B,handleClick:$}=xa({nodeId:h,handleId:e.id,isValidConnection:o,type:r}),b=fe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!g.value.some(k=>{const p=k[`${r.value}Handle`];return k[r.value]!==h?!1:p?p===e.id:!0}):typeof e.connectable=="number"?g.value.filter(k=>{const p=k[`${r.value}Handle`];return k[r.value]!==h?!1:p?p===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(m,g.value):$e(e.connectable)?e.connectable:u.value);Ke(()=>{var k;if(!m.dimensions.width||!m.dimensions.height)return;const p=(k=m.handleBounds[r.value])==null?void 0:k.find(q=>q.id===e.id);if(!c.value||p)return;const V=c.value.querySelector(".vue-flow__transformationpane");if(!y.value||!E.value||!V||!e.id)return;const _=y.value.getBoundingClientRect(),O=E.value.getBoundingClientRect(),M=window.getComputedStyle(V),{m22:L}=new window.DOMMatrixReadOnly(M.transform),F={id:e.id,position:e.position,x:(O.left-_.left)/L,y:(O.top-_.top)/L,type:r.value,nodeId:h,...Mn(E.value)};m.handleBounds[r.value]=[...m.handleBounds[r.value]??[],F]});function I(k){const p=xo(k);b.value&&w.value&&(p&&k.button===0||!p)&&B(k)}function T(k){!h||!s.value&&!w.value||b.value&&$(k)}return t({handleClick:$,handlePointerDown:B,onClick:T,onPointerDown:I}),(k,p)=>(oe(),de("div",{ref_key:"handle",ref:E,"data-id":`${Z(a)}-${Z(h)}-${e.id}-${r.value}`,"data-handleid":e.id,"data-nodeid":Z(h),"data-handlepos":k.position,class:pt(["vue-flow__handle",[`vue-flow__handle-${k.position}`,`vue-flow__handle-${e.id}`,Z(d),Z(f),r.value,{connectable:b.value,connecting:z.value,connectablestart:w.value,connectableend:v.value,connectionindicator:b.value&&(w.value&&!x.value||v.value&&x.value)}]]),onMousedown:I,onTouchstartPassive:I,onClick:T},[ke(k.$slots,"default",{id:k.id})],42,Cf))}}),zn=function({sourcePosition:e=K.Bottom,targetPosition:t=K.Top,label:n,connectable:r=!0,isValidTargetPos:o,isValidSourcePos:a,data:i}){const s=i.label??n;return[we(dt,{type:"target",position:t,connectable:r,isValidConnection:o}),typeof s!="string"&&s?we(s):we(Ve,[s]),we(dt,{type:"source",position:e,connectable:r,isValidConnection:a})]};zn.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],zn.inheritAttrs=!1,zn.compatConfig={MODE:3};const $f=zn,Bn=function({targetPosition:e=K.Top,label:t,connectable:n=!0,isValidTargetPos:r,data:o}){const a=o.label??t;return[we(dt,{type:"target",position:e,connectable:n,isValidConnection:r}),typeof a!="string"&&a?we(a):we(Ve,[a])]};Bn.props=["targetPosition","label","isValidTargetPos","connectable","data"],Bn.inheritAttrs=!1,Bn.compatConfig={MODE:3};const If=Bn,Vn=function({sourcePosition:e=K.Bottom,label:t,connectable:n=!0,isValidSourcePos:r,data:o}){const a=o.label??t;return[typeof a!="string"&&a?we(a):we(Ve,[a]),we(dt,{type:"source",position:e,connectable:n,isValidConnection:r})]};Vn.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Vn.inheritAttrs=!1,Vn.compatConfig={MODE:3};const Mf=Vn,Df=["transform"],Of=["width","height","x","y","rx","ry"],Tf=["y"],Pf=_e({...{name:"EdgeText",compatConfig:{MODE:3}},props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=me({x:0,y:0,width:0,height:0}),n=me(null),r=fe(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);Ke(o),ye([()=>e.x,()=>e.y,n,()=>e.label],o);function o(){if(!n.value)return;const a=n.value.getBBox();(a.width!==t.value.width||a.height!==t.value.height)&&(t.value=a)}return(a,i)=>(oe(),de("g",{transform:r.value,class:"vue-flow__edge-textwrapper"},[a.labelShowBg?(oe(),de("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*a.labelBgPadding[0]}px`,height:`${t.value.height+2*a.labelBgPadding[1]}px`,x:-a.labelBgPadding[0],y:-a.labelBgPadding[1],style:ze(a.labelBgStyle),rx:a.labelBgBorderRadius,ry:a.labelBgBorderRadius},null,12,Of)):De("",!0),ue("text",jn(a.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:a.labelStyle}),[ke(a.$slots,"default",{},()=>[typeof a.label!="string"?(oe(),Oe(gt(a.label),{key:0})):(oe(),de(Ve,{key:1},[Ye(Pe(a.label),1)],64))])],16,Tf)],8,Df))}}),Af=["id","d","marker-end","marker-start"],Rf=["d","stroke-width"],Ln=_e({...{name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=me(null),r=me(null),o=me(null),a=Pr();return t({pathEl:n,interactionEl:r,labelEl:o}),(i,s)=>(oe(),de(Ve,null,[ue("path",jn(Z(a),{id:i.id,ref_key:"pathEl",ref:n,d:i.path,class:"vue-flow__edge-path","marker-end":i.markerEnd,"marker-start":i.markerStart}),null,16,Af),i.interactionWidth?(oe(),de("path",{key:0,ref_key:"interactionEl",ref:r,fill:"none",d:i.path,"stroke-width":i.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,Rf)):De("",!0),i.label&&i.labelX&&i.labelY?(oe(),Oe(Pf,{key:1,ref_key:"labelEl",ref:o,x:i.labelX,y:i.labelY,label:i.label,"label-show-bg":i.labelShowBg,"label-bg-style":i.labelBgStyle,"label-bg-padding":i.labelBgPadding,"label-bg-border-radius":i.labelBgBorderRadius,"label-style":i.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):De("",!0)],64))}});function ka({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,a=n<e?n+o:n-o,i=Math.abs(r-t)/2,s=r<t?r+i:r-i;return[a,s,o,i]}function Ca({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:a,targetControlX:i,targetControlY:s}){const l=e*.125+o*.375+i*.375+n*.125,c=t*.125+a*.375+s*.375+r*.125,u=Math.abs(l-e),d=Math.abs(c-t);return[l,c,u,d]}function Hn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function $a({pos:e,x1:t,y1:n,x2:r,y2:o,c:a}){let i,s;switch(e){case K.Left:i=t-Hn(t-r,a),s=n;break;case K.Right:i=t+Hn(r-t,a),s=n;break;case K.Top:i=t,s=n-Hn(n-o,a);break;case K.Bottom:i=t,s=n+Hn(o-n,a);break}return[i,s]}function Ia(e){const{sourceX:t,sourceY:n,sourcePosition:r=K.Bottom,targetX:o,targetY:a,targetPosition:i=K.Top,curvature:s=.25}=e,[l,c]=$a({pos:r,x1:t,y1:n,x2:o,y2:a,c:s}),[u,d]=$a({pos:i,x1:o,y1:a,x2:t,y2:n,c:s}),[f,h,m,y]=Ca({sourceX:t,sourceY:n,targetX:o,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${t},${n} C${l},${c} ${u},${d} ${o},${a}`,f,h,m,y]}function Ma({pos:e,x1:t,y1:n,x2:r,y2:o}){let a,i;switch(e){case K.Left:case K.Right:a=.5*(t+r),i=n;break;case K.Top:case K.Bottom:a=t,i=.5*(n+o);break}return[a,i]}function Da(e){const{sourceX:t,sourceY:n,sourcePosition:r=K.Bottom,targetX:o,targetY:a,targetPosition:i=K.Top}=e,[s,l]=Ma({pos:r,x1:t,y1:n,x2:o,y2:a}),[c,u]=Ma({pos:i,x1:o,y1:a,x2:t,y2:n}),[d,f,h,m]=Ca({sourceX:t,sourceY:n,targetX:o,targetY:a,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${t},${n} C${s},${l} ${c},${u} ${o},${a}`,d,f,h,m]}const Oa={[K.Left]:{x:-1,y:0},[K.Right]:{x:1,y:0},[K.Top]:{x:0,y:-1},[K.Bottom]:{x:0,y:1}};function zf({source:e,sourcePosition:t=K.Bottom,target:n}){return t===K.Left||t===K.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}function Ta(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Bf({source:e,sourcePosition:t=K.Bottom,target:n,targetPosition:r=K.Top,center:o,offset:a}){const i=Oa[t],s=Oa[r],l={x:e.x+i.x*a,y:e.y+i.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},u=zf({source:l,sourcePosition:t,target:c}),d=u.x!==0?"x":"y",f=u[d];let h,m,y;const g={x:0,y:0},E={x:0,y:0},[w,v,x,z]=ka({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(i[d]*s[d]===-1){m=o.x??w,y=o.y??v;const $=[{x:m,y:l.y},{x:m,y:c.y}],b=[{x:l.x,y},{x:c.x,y}];i[d]===f?h=d==="x"?$:b:h=d==="x"?b:$}else{const $=[{x:l.x,y:c.y}],b=[{x:c.x,y:l.y}];if(d==="x"?h=i.x===f?b:$:h=i.y===f?$:b,t===r){const V=Math.abs(e[d]-n[d]);if(V<=a){const _=Math.min(a-1,a-V);i[d]===f?g[d]=(l[d]>e[d]?-1:1)*_:E[d]=(c[d]>n[d]?-1:1)*_}}if(t!==r){const V=d==="x"?"y":"x",_=i[d]===s[V],O=l[V]>c[V],M=l[V]<c[V];(i[d]===1&&(!_&&O||_&&M)||i[d]!==1&&(!_&&M||_&&O))&&(h=d==="x"?$:b)}const I={x:l.x+g.x,y:l.y+g.y},T={x:c.x+E.x,y:c.y+E.y},k=Math.max(Math.abs(I.x-h[0].x),Math.abs(T.x-h[0].x)),p=Math.max(Math.abs(I.y-h[0].y),Math.abs(T.y-h[0].y));k>=p?(m=(I.x+T.x)/2,y=h[0].y):(m=h[0].x,y=(I.y+T.y)/2)}return[[e,{x:l.x+g.x,y:l.y+g.y},...h,{x:c.x+E.x,y:c.y+E.y},n],m,y,x,z]}function Vf(e,t,n,r){const o=Math.min(Ta(e,t)/2,Ta(t,n)/2,r),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i){const c=e.x<n.x?-1:1,u=e.y<n.y?1:-1;return`L ${a+o*c},${i}Q ${a},${i} ${a},${i+o*u}`}const s=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${a},${i+o*l}Q ${a},${i} ${a+o*s},${i}`}function Io(e){const{sourceX:t,sourceY:n,sourcePosition:r=K.Bottom,targetX:o,targetY:a,targetPosition:i=K.Top,borderRadius:s=5,centerX:l,centerY:c,offset:u=20}=e,[d,f,h,m,y]=Bf({source:{x:t,y:n},sourcePosition:r,target:{x:o,y:a},targetPosition:i,center:{x:l,y:c},offset:u});return[d.reduce((E,w,v)=>{let x;return v>0&&v<d.length-1?x=Vf(d[v-1],w,d[v+1],s):x=`${v===0?"M":"L"}${w.x} ${w.y}`,E+=x,E},""),f,h,m,y]}function Lf(e){const{sourceX:t,sourceY:n,targetX:r,targetY:o}=e,[a,i,s,l]=ka({sourceX:t,sourceY:n,targetX:r,targetY:o});return[`M ${t},${n}L ${r},${o}`,a,i,s,l]}const Hf=_e({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,r,o]=Lf(e);return we(Ln,{path:n,labelX:r,labelY:o,...t,...e})}}}),Pa=_e({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,r,o]=Io({...e,sourcePosition:e.sourcePosition??K.Bottom,targetPosition:e.targetPosition??K.Top});return we(Ln,{path:n,labelX:r,labelY:o,...t,...e})}}}),Ff=_e({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>we(Pa,{...e,...t,borderRadius:0})}}),Gf=_e({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,r,o]=Ia({...e,sourcePosition:e.sourcePosition??K.Bottom,targetPosition:e.targetPosition??K.Top});return we(Ln,{path:n,labelX:r,labelY:o,...t,...e})}}}),Yf=_e({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,r,o]=Da({...e,sourcePosition:e.sourcePosition??K.Bottom,targetPosition:e.targetPosition??K.Top});return we(Ln,{path:n,labelX:r,labelY:o,...t,...e})}}}),qf={input:Mf,default:$f,output:If},jf={default:Gf,straight:Hf,step:Ff,smoothstep:Pa,simplebezier:Yf};function Wf(e,t,n){const r=fe(()=>y=>t.value.get(y)),o=fe(()=>y=>n.value.get(y)),a=fe(()=>{const y={...jf,...e.edgeTypes},g=Object.keys(y);for(const E of e.edges)E.type&&!g.includes(E.type)&&(y[E.type]=E.type);return y}),i=fe(()=>{const y={...qf,...e.nodeTypes},g=Object.keys(y);for(const E of e.nodes)E.type&&!g.includes(E.type)&&(y[E.type]=E.type);return y}),s=fe(()=>e.onlyRenderVisibleElements?Xi(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),l=fe(()=>{if(e.onlyRenderVisibleElements){const y=[];for(const g of e.edges){const E=t.value.get(g.source),w=t.value.get(g.target);Zd({sourcePos:E.computedPosition||{x:0,y:0},targetPos:w.computedPosition||{x:0,y:0},sourceWidth:E.dimensions.width,sourceHeight:E.dimensions.height,targetWidth:w.dimensions.width,targetHeight:w.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&y.push(g)}return y}return e.edges}),c=fe(()=>[...s.value,...l.value]),u=fe(()=>{const y=[];for(const g of e.nodes)g.selected&&y.push(g);return y}),d=fe(()=>{const y=[];for(const g of e.edges)g.selected&&y.push(g);return y}),f=fe(()=>[...u.value,...d.value]),h=fe(()=>{const y=[];for(const g of e.nodes)g.dimensions.width&&g.dimensions.height&&g.handleBounds!==void 0&&y.push(g);return y}),m=fe(()=>s.value.length>0&&h.value.length===s.value.length);return{getNode:r,getEdge:o,getElements:c,getEdgeTypes:a,getNodeTypes:i,getEdges:l,getNodes:s,getSelectedElements:f,getSelectedNodes:u,getSelectedEdges:d,getNodesInitialized:h,areNodesInitialized:m}}class Nt{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=vt())==null?void 0:t.appContext.app,r=(n==null?void 0:n.config.globalProperties.$vueFlowStorage)??Nt.instance;return Nt.instance=r??new Nt,n&&(n.config.globalProperties.$vueFlowStorage=Nt.instance),Nt.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const r=Sa(),o=Ir(r),a={};for(const[f,h]of Object.entries(o.hooks)){const m=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;a[m]=h.on}const i={};for(const[f,h]of Object.entries(o.hooks))i[f]=h.trigger;const s=fe(()=>{const f=new Map;for(const h of o.nodes)f.set(h.id,h);return f}),l=fe(()=>{const f=new Map;for(const h of o.edges)f.set(h.id,h);return f}),c=Wf(o,s,l),u=kf(o,s,l);u.setState({...o,...n});const d={...a,...c,...u,...qs(o),nodeLookup:s,edgeLookup:l,emits:i,id:t,vueFlowVersion:"1.47.0",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function Ne(e){const t=Nt.getInstance(),n=Gn(),r=typeof e=="object",o=r?e:{id:e},a=o.id,i=a??(n==null?void 0:n.vueFlowId);let s;if(n){const l=rt(_a,null);typeof l<"u"&&l!==null&&(!i||l.id===i)&&(s=l)}if(s||i&&(s=t.get(i)),!s||i&&s.id!==i){const l=a??t.getId(),c=t.create(l,o);s=c,(n??Yn(!0)).run(()=>{ye(c.applyDefault,(d,f,h)=>{const m=g=>{c.applyNodeChanges(g)},y=g=>{c.applyEdgeChanges(g)};d?(c.onNodesChange(m),c.onEdgesChange(y)):(c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(y)),h(()=>{c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(y)})},{immediate:!0}),zt(()=>{if(s){const d=t.get(s.id);d?d.$destroy():tn(`No store instance found for id ${s.id} in storage.`)}})})}else r&&s.setState(o);if(n&&(ht(_a,s),n.vueFlowId=s.id),r){const l=vt();(l==null?void 0:l.type.name)!=="VueFlow"&&s.emits.error(new Te(Ce.USEVUEFLOW_OPTIONS))}return s}function Xf(e){const{emits:t,dimensions:n}=Ne();let r;Ke(()=>{const o=()=>{var a,i;if(!e.value||!(((i=(a=e.value).checkVisibility)==null?void 0:i.call(a))??!0))return;const s=Mn(e.value);(s.width===0||s.height===0)&&t.error(new Te(Ce.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:s.width||500,height:s.height||500}};o(),window.addEventListener("resize",o),e.value&&(r=new ResizeObserver(()=>o()),r.observe(e.value)),qn(()=>{window.removeEventListener("resize",o),r&&e.value&&r.unobserve(e.value)})})}const Uf=_e({...{name:"UserSelection",compatConfig:{MODE:3}},props:{userSelectionRect:{}},setup(e){return(t,n)=>(oe(),de("div",{class:"vue-flow__selection vue-flow__container",style:ze({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),Zf=["tabIndex"],Kf=_e({...{name:"NodesSelection",compatConfig:{MODE:3}},setup(e){const{emits:t,viewport:n,getSelectedNodes:r,noPanClassName:o,disableKeyboardA11y:a,userSelectionActive:i}=Ne(),s=Na(),l=me(null),c=ba({el:l,onStart(m){t.selectionDragStart(m),t.nodeDragStart(m)},onDrag(m){t.selectionDrag(m),t.nodeDrag(m)},onStop(m){t.selectionDragStop(m),t.nodeDragStop(m)}});Ke(()=>{var m;a.value||(m=l.value)==null||m.focus({preventScroll:!0})});const u=fe(()=>Wi(r.value)),d=fe(()=>({width:`${u.value.width}px`,height:`${u.value.height}px`,top:`${u.value.y}px`,left:`${u.value.x}px`}));function f(m){t.selectionContextMenu({event:m,nodes:r.value})}function h(m){a||Dt[m.key]&&(m.preventDefault(),s({x:Dt[m.key].x,y:Dt[m.key].y},m.shiftKey))}return(m,y)=>!Z(i)&&u.value.width&&u.value.height?(oe(),de("div",{key:0,class:pt(["vue-flow__nodesselection vue-flow__container",Z(o)]),style:ze({transform:`translate(${Z(n).x}px,${Z(n).y}px) scale(${Z(n).zoom})`})},[ue("div",{ref_key:"el",ref:l,class:pt([{dragging:Z(c)},"vue-flow__nodesselection-rect"]),style:ze(d.value),tabIndex:Z(a)?void 0:-1,onContextmenu:f,onKeydown:h},null,46,Zf)],6)):De("",!0)}});function Qf(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Jf=_e({...{name:"Pane",compatConfig:{MODE:3}},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:r,emits:o,userSelectionActive:a,removeSelectedElements:i,userSelectionRect:s,elementsSelectable:l,nodesSelectionActive:c,getSelectedEdges:u,getSelectedNodes:d,removeNodes:f,removeEdges:h,selectionMode:m,deleteKeyCode:y,multiSelectionKeyCode:g,multiSelectionActive:E,edgeLookup:w,nodeLookup:v,connectionLookup:x,defaultEdgeOptions:z,connectionStartHandle:B}=Ne(),$=me(null),b=me(new Set),I=me(new Set),T=me(),k=Ee(()=>l.value&&(e.isSelecting||a.value)),p=Ee(()=>B.value!==null);let V=!1,_=!1;const O=Zt(y,{actInsideInputWithModifier:!1}),M=Zt(g);ye(O,A=>{A&&(f(d.value),h(u.value),c.value=!1)}),ye(M,A=>{E.value=A});function L(A,R){return H=>{H.target===R&&(A==null||A(H))}}function F(A){if(V||p.value){V=!1;return}o.paneClick(A),i(),c.value=!1}function q(A){A.preventDefault(),A.stopPropagation(),o.paneContextMenu(A)}function Y(A){o.paneScroll(A)}function j(A){var R,H,X;if(T.value=(R=t.value)==null?void 0:R.getBoundingClientRect(),!l.value||!e.isSelecting||A.button!==0||A.target!==$.value||!T.value)return;(X=(H=A.target)==null?void 0:H.setPointerCapture)==null||X.call(H,A.pointerId);const{x:te,y:ne}=Qf(A,T.value);_=!0,V=!1,i(),s.value={width:0,height:0,startX:te,startY:ne,x:te,y:ne},o.selectionStart(A)}function W(A){var R;if(!T.value||!s.value)return;V=!0;const{x:H,y:X}=Ue(A,T.value),{startX:te=0,startY:ne=0}=s.value,ce={startX:te,startY:ne,x:H<te?H:te,y:X<ne?X:ne,width:Math.abs(H-te),height:Math.abs(X-ne)},be=b.value,ie=I.value;b.value=new Set(Xi(n.value,ce,r.value,m.value===go.Partial,!0).map(S=>S.id)),I.value=new Set;const le=((R=z.value)==null?void 0:R.selectable)??!0;for(const S of b.value){const N=x.value.get(S);if(N)for(const{edgeId:D}of N.values()){const C=w.value.get(D);C&&(C.selectable??le)&&I.value.add(D)}}if(!ma(be,b.value)){const S=ut(v.value,b.value,!0);o.nodesChange(S)}if(!ma(ie,I.value)){const S=ut(w.value,I.value);o.edgesChange(S)}s.value=ce,a.value=!0,c.value=!1}function P(A){var R;A.button!==0||!_||((R=A.target)==null||R.releasePointerCapture(A.pointerId),!a.value&&s.value&&A.target===$.value&&F(A),a.value=!1,s.value=null,c.value=b.value.size>0,o.selectionEnd(A),e.selectionKeyPressed&&(V=!1),_=!1)}return(A,R)=>(oe(),de("div",{ref_key:"container",ref:$,class:pt(["vue-flow__pane vue-flow__container",{selection:A.isSelecting}]),onClick:R[0]||(R[0]=H=>k.value?void 0:L(F,$.value)(H)),onContextmenu:R[1]||(R[1]=H=>L(q,$.value)(H)),onWheelPassive:R[2]||(R[2]=H=>L(Y,$.value)(H)),onPointerenter:R[3]||(R[3]=H=>k.value?void 0:Z(o).paneMouseEnter(H)),onPointerdown:R[4]||(R[4]=H=>k.value?j(H):Z(o).paneMouseMove(H)),onPointermove:R[5]||(R[5]=H=>k.value?W(H):Z(o).paneMouseMove(H)),onPointerup:R[6]||(R[6]=H=>k.value?P(H):void 0),onPointerleave:R[7]||(R[7]=H=>Z(o).paneMouseLeave(H))},[ke(A.$slots,"default"),Z(a)&&Z(s)?(oe(),Oe(Uf,{key:0,"user-selection-rect":Z(s)},null,8,["user-selection-rect"])):De("",!0),Z(c)&&Z(d).length?(oe(),Oe(Kf,{key:1})):De("",!0)],34))}}),eh=_e({...{name:"Transform",compatConfig:{MODE:3}},setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:r}=Ne(),o=fe(()=>n.value?!r.value:!1),a=fe(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(i,s)=>(oe(),de("div",{class:"vue-flow__transformationpane vue-flow__container",style:ze({transform:a.value,opacity:o.value?0:void 0})},[ke(i.$slots,"default")],4))}}),th=_e({...{name:"Viewport",compatConfig:{MODE:3}},setup(e){const{minZoom:t,maxZoom:n,defaultViewport:r,translateExtent:o,zoomActivationKeyCode:a,selectionKeyCode:i,panActivationKeyCode:s,panOnScroll:l,panOnScrollMode:c,panOnScrollSpeed:u,panOnDrag:d,zoomOnDoubleClick:f,zoomOnPinch:h,zoomOnScroll:m,preventScrolling:y,noWheelClassName:g,noPanClassName:E,emits:w,connectionStartHandle:v,userSelectionActive:x,paneDragging:z,d3Zoom:B,d3Selection:$,d3ZoomHandler:b,viewport:I,viewportRef:T,paneClickDistance:k}=Ne();Xf(T);const p=At(!1),V=At(!1);let _=null,O=!1,M=0,L={x:0,y:0,zoom:0};const F=Zt(s),q=Zt(i),Y=Zt(a),j=Ee(()=>(!q.value||q.value&&i.value===!0)&&(F.value||d.value)),W=Ee(()=>F.value||l.value),P=Ee(()=>q.value||i.value===!0&&j.value!==!0),A=Ee(()=>v.value!==null);Ke(()=>{if(!T.value){tn("Viewport element is missing");return}const ne=T.value,ce=ne.getBoundingClientRect(),be=Id().clickDistance(k.value).scaleExtent([t.value,n.value]).translateExtent(o.value),ie=Le(ne).call(be),le=ie.on("wheel.zoom"),S=Mt.translate(r.value.x??0,r.value.y??0).scale(xt(r.value.zoom??1,t.value,n.value)),N=[[0,0],[ce.width,ce.height]],D=be.constrain()(S,N,o.value);be.transform(ie,D),be.wheelDelta(Qi),B.value=be,$.value=ie,b.value=le,I.value={x:D.x,y:D.y,zoom:D.k},be.on("start",C=>{var G;if(!C.sourceEvent)return null;M=C.sourceEvent.button,p.value=!0;const Q=X(C.transform);((G=C.sourceEvent)==null?void 0:G.type)==="mousedown"&&(z.value=!0),L=Q,w.viewportChangeStart(Q),w.moveStart({event:C,flowTransform:Q})}),be.on("end",C=>{if(!C.sourceEvent)return null;if(p.value=!1,z.value=!1,R(j.value,M??0)&&!O&&w.paneContextMenu(C.sourceEvent),O=!1,H(L,C.transform)){const G=X(C.transform);L=G,w.viewportChangeEnd(G),w.moveEnd({event:C,flowTransform:G})}}),be.filter(C=>{var G;const Q=Y.value||m.value,J=h.value&&C.ctrlKey,ee=C.button,ae=C.type==="wheel";if(ee===1&&C.type==="mousedown"&&(te(C,"vue-flow__node")||te(C,"vue-flow__edge")))return!0;if(!j.value&&!Q&&!W.value&&!f.value&&!h.value||x.value||A.value&&!ae||!f.value&&C.type==="dblclick"||te(C,g.value)&&ae||te(C,E.value)&&(!ae||W.value&&ae&&!Y.value)||!h.value&&C.ctrlKey&&ae||!Q&&!W.value&&!J&&ae)return!1;if(!h&&C.type==="touchstart"&&((G=C.touches)==null?void 0:G.length)>1)return C.preventDefault(),!1;if(!j.value&&(C.type==="mousedown"||C.type==="touchstart")||i.value===!0&&Array.isArray(d.value)&&d.value.includes(0)&&ee===0||Array.isArray(d.value)&&!d.value.includes(ee)&&(C.type==="mousedown"||C.type==="touchstart"))return!1;const he=Array.isArray(d.value)&&d.value.includes(ee)||i.value===!0&&Array.isArray(d.value)&&!d.value.includes(0)||!ee||ee<=1;return(!C.ctrlKey||F.value||ae)&&he}),ye([x,j],()=>{x.value&&!p.value?be.on("zoom",null):x.value||be.on("zoom",C=>{I.value={x:C.transform.x,y:C.transform.y,zoom:C.transform.k};const G=X(C.transform);O=R(j.value,M??0),w.viewportChange(G),w.move({event:C,flowTransform:G})})},{immediate:!0}),ye([x,W,c,Y,h,y,g],()=>{W.value&&!Y.value&&!x.value?ie.on("wheel.zoom",C=>{if(te(C,g.value))return!1;const G=Y.value||m.value,Q=h.value&&C.ctrlKey;if(!(!y.value||W.value||G||Q))return!1;C.preventDefault(),C.stopImmediatePropagation();const ee=ie.property("__zoom").k||1,ae=On();if(!F.value&&C.ctrlKey&&h.value&&ae){const on=qe(C),Ev=Qi(C),Nv=ee*2**Ev;be.scaleTo(ie,Nv,on,C);return}const he=C.deltaMode===1?20:1;let ve=c.value===Ut.Vertical?0:C.deltaX*he,xe=c.value===Ut.Horizontal?0:C.deltaY*he;!ae&&C.shiftKey&&c.value!==Ut.Vertical&&!ve&&xe&&(ve=xe,xe=0),be.translateBy(ie,-(ve/ee)*u.value,-(xe/ee)*u.value);const Ze=X(ie.property("__zoom"));_&&clearTimeout(_),V.value?(w.move({event:C,flowTransform:Ze}),w.viewportChange(Ze),_=setTimeout(()=>{w.moveEnd({event:C,flowTransform:Ze}),w.viewportChangeEnd(Ze),V.value=!1},150)):(V.value=!0,w.moveStart({event:C,flowTransform:Ze}),w.viewportChangeStart(Ze))},{passive:!1}):typeof le<"u"&&ie.on("wheel.zoom",function(C,G){const Q=!y.value&&C.type==="wheel"&&!C.ctrlKey,J=Y.value||m.value,ee=h.value&&C.ctrlKey;if(!J&&!l.value&&!ee&&C.type==="wheel"||Q||te(C,g.value))return null;C.preventDefault(),le.call(this,C,G)},{passive:!1})},{immediate:!0})});function R(ne,ce){return ce===2&&Array.isArray(ne)&&ne.includes(2)}function H(ne,ce){return ne.x!==ce.x&&!Number.isNaN(ce.x)||ne.y!==ce.y&&!Number.isNaN(ce.y)||ne.zoom!==ce.k&&!Number.isNaN(ce.k)}function X(ne){return{x:ne.x,y:ne.y,zoom:ne.k}}function te(ne,ce){return ne.target.closest(`.${ce}`)}return(ne,ce)=>(oe(),de("div",{ref_key:"viewportRef",ref:T,class:"vue-flow__viewport vue-flow__container"},[se(Jf,{"is-selecting":P.value,"selection-key-pressed":Z(q),class:pt({connecting:A.value,dragging:Z(z),draggable:Z(d)===!0||Array.isArray(Z(d))&&Z(d).includes(0)})},{default:ge(()=>[se(eh,null,{default:ge(()=>[ke(ne.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),nh=["id"],oh=["id"],rh=["id"],ih=_e({...{name:"A11yDescriptions",compatConfig:{MODE:3}},setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:r}=Ne();return(o,a)=>(oe(),de(Ve,null,[ue("div",{id:`${Z(Bi)}-${Z(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Pe(Z(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,nh),ue("div",{id:`${Z(Vi)}-${Z(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,oh),Z(n)?De("",!0):(oe(),de("div",{key:0,id:`${Z(Ad)}-${Z(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},Pe(Z(r)),9,rh))],64))}});function ah(){const e=Ne();ye(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function sh(e,t,n){return n===K.Left?e-t:n===K.Right?e+t:e}function lh(e,t,n){return n===K.Top?e-t:n===K.Bottom?e+t:e}const Mo=function({radius:e=10,centerX:t=0,centerY:n=0,position:r=K.Top,type:o}){return we("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${o}`,cx:sh(t,e,r),cy:lh(n,e,r),r:e,stroke:"transparent",fill:"transparent"})};Mo.props=["radius","centerX","centerY","position","type"],Mo.compatConfig={MODE:3};const Aa=Mo,uh=_e({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:r,edgeUpdaterRadius:o,emits:a,nodesSelectionActive:i,noPanClassName:s,getEdgeTypes:l,removeSelectedEdges:c,findEdge:u,findNode:d,isValidConnection:f,multiSelectionActive:h,disableKeyboardA11y:m,elementsSelectable:y,edgesUpdatable:g,edgesFocusable:E,hooks:w}=Ne(),v=fe(()=>u(e.id)),{emit:x,on:z}=hf(v.value,a),B=rt(Pn),$=vt(),b=me(!1),I=me(!1),T=me(""),k=me(null),p=me("source"),V=me(null),_=Ee(()=>typeof v.value.selectable>"u"?y.value:v.value.selectable),O=Ee(()=>typeof v.value.updatable>"u"?g.value:v.value.updatable),M=Ee(()=>typeof v.value.focusable>"u"?E.value:v.value.focusable);ht(cf,e.id),ht(df,V);const L=fe(()=>v.value.class instanceof Function?v.value.class(v.value):v.value.class),F=fe(()=>v.value.style instanceof Function?v.value.style(v.value):v.value.style),q=fe(()=>{const N=v.value.type||"default",D=B==null?void 0:B[`edge-${N}`];if(D)return D;let C=v.value.template??l.value[N];if(typeof C=="string"&&$){const G=Object.keys($.appContext.components);G&&G.includes(N)&&(C=Se(N,!1))}return C&&typeof C!="string"?C:(a.error(new Te(Ce.EDGE_TYPE_MISSING,C)),!1)}),{handlePointerDown:Y}=xa({nodeId:T,handleId:k,type:p,isValidConnection:f,edgeUpdaterType:p,onEdgeUpdate:P,onEdgeUpdateEnd:A});return()=>{const N=d(v.value.source),D=d(v.value.target),C="pathOptions"in v.value?v.value.pathOptions:{};if(!N&&!D)return a.error(new Te(Ce.EDGE_SOURCE_TARGET_MISSING,v.value.id,v.value.source,v.value.target)),null;if(!N)return a.error(new Te(Ce.EDGE_SOURCE_MISSING,v.value.id,v.value.source)),null;if(!D)return a.error(new Te(Ce.EDGE_TARGET_MISSING,v.value.id,v.value.target)),null;if(!v.value||v.value.hidden||N.hidden||D.hidden)return null;let G;r.value===at.Strict?G=N.handleBounds.source:G=[...N.handleBounds.source||[],...N.handleBounds.target||[]];const Q=la(G,v.value.sourceHandle);let J;r.value===at.Strict?J=D.handleBounds.target:J=[...D.handleBounds.target||[],...D.handleBounds.source||[]];const ee=la(J,v.value.targetHandle),ae=(Q==null?void 0:Q.position)||K.Bottom,he=(ee==null?void 0:ee.position)||K.Top,{x:ve,y:xe}=Tt(N,Q,ae),{x:Ze,y:on}=Tt(D,ee,he);return v.value.sourceX=ve,v.value.sourceY=xe,v.value.targetX=Ze,v.value.targetY=on,we("g",{ref:V,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${q.value===!1?"default":v.value.type||"default"}`,s.value,L.value,{updating:b.value,selected:v.value.selected,animated:v.value.animated,inactive:!_.value&&!w.value.edgeClick.hasListeners()}],tabIndex:M.value?0:void 0,"aria-label":v.value.ariaLabel===null?void 0:v.value.ariaLabel??`Edge from ${v.value.source} to ${v.value.target}`,"aria-describedby":M.value?`${Vi}-${t}`:void 0,"aria-roledescription":"edge",role:M.value?"group":"img",...v.value.domAttributes,onClick:H,onContextmenu:X,onDblclick:te,onMouseenter:ne,onMousemove:ce,onMouseleave:be,onKeyDown:M.value?S:void 0},[I.value?null:we(q.value===!1?l.value.default:q.value,{id:e.id,sourceNode:N,targetNode:D,source:v.value.source,target:v.value.target,type:v.value.type,updatable:O.value,selected:v.value.selected,animated:v.value.animated,label:v.value.label,labelStyle:v.value.labelStyle,labelShowBg:v.value.labelShowBg,labelBgStyle:v.value.labelBgStyle,labelBgPadding:v.value.labelBgPadding,labelBgBorderRadius:v.value.labelBgBorderRadius,data:v.value.data,events:{...v.value.events,...z},style:F.value,markerStart:`url('#${en(v.value.markerStart,t)}')`,markerEnd:`url('#${en(v.value.markerEnd,t)}')`,sourcePosition:ae,targetPosition:he,sourceX:ve,sourceY:xe,targetX:Ze,targetY:on,sourceHandleId:v.value.sourceHandle,targetHandleId:v.value.targetHandle,interactionWidth:v.value.interactionWidth,...C}),[O.value==="source"||O.value===!0?[we("g",{onMousedown:ie,onMouseenter:j,onMouseout:W},we(Aa,{position:ae,centerX:ve,centerY:xe,radius:o.value,type:"source","data-type":"source"}))]:null,O.value==="target"||O.value===!0?[we("g",{onMousedown:le,onMouseenter:j,onMouseout:W},we(Aa,{position:he,centerX:Ze,centerY:on,radius:o.value,type:"target","data-type":"target"}))]:null]])};function j(){b.value=!0}function W(){b.value=!1}function P(N,D){x.update({event:N,edge:v.value,connection:D})}function A(N){x.updateEnd({event:N,edge:v.value}),I.value=!1}function R(N,D){N.button===0&&(I.value=!0,T.value=D?v.value.target:v.value.source,k.value=(D?v.value.targetHandle:v.value.sourceHandle)??null,p.value=D?"target":"source",x.updateStart({event:N,edge:v.value}),Y(N))}function H(N){var D;const C={event:N,edge:v.value};_.value&&(i.value=!1,v.value.selected&&h.value?(c([v.value]),(D=V.value)==null||D.blur()):n([v.value])),x.click(C)}function X(N){x.contextMenu({event:N,edge:v.value})}function te(N){x.doubleClick({event:N,edge:v.value})}function ne(N){x.mouseEnter({event:N,edge:v.value})}function ce(N){x.mouseMove({event:N,edge:v.value})}function be(N){x.mouseLeave({event:N,edge:v.value})}function ie(N){R(N,!0)}function le(N){R(N,!1)}function S(N){var D;!m.value&&Li.includes(N.key)&&_.value&&(N.key==="Escape"?((D=V.value)==null||D.blur(),c([u(e.id)])):n([u(e.id)]))}}}),ch=_e({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:r,connectionEndHandle:o,connectionPosition:a,connectionLineType:i,connectionLineStyle:s,connectionLineOptions:l,connectionStatus:c,viewport:u,findNode:d}=Ne(),f=(e=rt(Pn))==null?void 0:e["connection-line"],h=fe(()=>{var w;return d((w=r.value)==null?void 0:w.nodeId)}),m=fe(()=>{var w;return d((w=o.value)==null?void 0:w.nodeId)??null}),y=fe(()=>({x:(a.value.x-u.value.x)/u.value.zoom,y:(a.value.y-u.value.y)/u.value.zoom})),g=fe(()=>l.value.markerStart?`url(#${en(l.value.markerStart,t)})`:""),E=fe(()=>l.value.markerEnd?`url(#${en(l.value.markerEnd,t)})`:"");return()=>{var w,v,x;if(!h.value||!r.value)return null;const z=r.value.id,B=r.value.type,$=h.value.handleBounds;let b=($==null?void 0:$[B])??[];if(n.value===at.Loose){const F=($==null?void 0:$[B==="source"?"target":"source"])??[];b=[...b,...F]}if(!b)return null;const I=(z?b.find(F=>F.id===z):b[0])??null,T=(I==null?void 0:I.position)??K.Top,{x:k,y:p}=Tt(h.value,I,T);let V=null;m.value&&(n.value===at.Strict?V=((w=m.value.handleBounds[B==="source"?"target":"source"])==null?void 0:w.find(F=>{var q;return F.id===((q=o.value)==null?void 0:q.id)}))||null:V=((v=[...m.value.handleBounds.source??[],...m.value.handleBounds.target??[]])==null?void 0:v.find(F=>{var q;return F.id===((q=o.value)==null?void 0:q.id)}))||null);const _=((x=o.value)==null?void 0:x.position)??(T?No[T]:null);if(!T||!_)return null;const O=i.value??l.value.type??bt.Bezier;let M="";const L={sourceX:k,sourceY:p,sourcePosition:T,targetX:y.value.x,targetY:y.value.y,targetPosition:_};return O===bt.Bezier?[M]=Ia(L):O===bt.Step?[M]=Io({...L,borderRadius:0}):O===bt.SmoothStep?[M]=Io(L):O===bt.SimpleBezier?[M]=Da(L):M=`M${k},${p} ${y.value.x},${y.value.y}`,we("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},we("g",{class:"vue-flow__connection"},f?we(f,{sourceX:k,sourceY:p,sourcePosition:T,targetX:y.value.x,targetY:y.value.y,targetPosition:_,sourceNode:h.value,sourceHandle:I,targetNode:m.value,targetHandle:V,markerEnd:E.value,markerStart:g.value,connectionStatus:c.value}):we("path",{d:M,class:[l.value.class,c.value,"vue-flow__connection-path"],style:{...s.value,...l.value.style},"marker-end":E.value,"marker-start":g.value})))}}}),dh=["id","markerWidth","markerHeight","markerUnits","orient"],fh=_e({...{name:"MarkerType",compatConfig:{MODE:3}},props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(oe(),de("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===Z(mo).ArrowClosed?(oe(),de("polyline",{key:0,style:ze({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):De("",!0),t.type===Z(mo).Arrow?(oe(),de("polyline",{key:1,style:ze({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):De("",!0)],8,dh))}}),hh={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},ph=_e({...{name:"MarkerDefinitions",compatConfig:{MODE:3}},setup(e){const{id:t,edges:n,connectionLineOptions:r,defaultMarkerColor:o}=Ne(),a=fe(()=>{const i=new Set,s=[],l=c=>{if(c){const u=en(c,t);i.has(u)||(typeof c=="object"?s.push({...c,id:u,color:c.color||o.value}):s.push({id:u,color:o.value,type:c}),i.add(u))}};for(const c of[r.value.markerEnd,r.value.markerStart])l(c);for(const c of n.value)for(const u of[c.markerStart,c.markerEnd])l(u);return s.sort((c,u)=>c.id.localeCompare(u.id))});return(i,s)=>(oe(),de("svg",hh,[ue("defs",null,[(oe(!0),de(Ve,null,rn(a.value,l=>(oe(),Oe(fh,{id:l.id,key:l.id,type:l.type,color:l.color,width:l.width,height:l.height,markerUnits:l.markerUnits,"stroke-width":l.strokeWidth,orient:l.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),vh=_e({...{name:"Edges",compatConfig:{MODE:3}},setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:r}=Ne();return(o,a)=>(oe(),de(Ve,null,[se(ph),(oe(!0),de(Ve,null,rn(Z(n),i=>(oe(),de("svg",{key:i.id,class:"vue-flow__edges vue-flow__container",style:ze({zIndex:Z(Kd)(i,Z(t),Z(r))})},[se(Z(uh),{id:i.id},null,8,["id"])],4))),128)),se(Z(ch))],64))}}),gh=_e({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:r,nodesSelectionActive:o,multiSelectionActive:a,emits:i,removeSelectedNodes:s,addSelectedNodes:l,updateNodeDimensions:c,onUpdateNodeInternals:u,getNodeTypes:d,nodeExtent:f,elevateNodesOnSelect:h,disableKeyboardA11y:m,ariaLiveMessage:y,snapToGrid:g,snapGrid:E,nodeDragThreshold:w,nodesDraggable:v,elementsSelectable:x,nodesConnectable:z,nodesFocusable:B,hooks:$}=Ne(),b=me(null);ht(wa,b),ht(ya,e.id);const I=rt(Pn),T=vt(),k=Na(),{node:p,parentNode:V}=Ea(e.id),{emit:_,on:O}=mf(p,i),M=Ee(()=>typeof p.draggable>"u"?v.value:p.draggable),L=Ee(()=>typeof p.selectable>"u"?x.value:p.selectable),F=Ee(()=>typeof p.connectable>"u"?z.value:p.connectable),q=Ee(()=>typeof p.focusable>"u"?B.value:p.focusable),Y=fe(()=>L.value||M.value||$.value.nodeClick.hasListeners()||$.value.nodeDoubleClick.hasListeners()||$.value.nodeMouseEnter.hasListeners()||$.value.nodeMouseMove.hasListeners()||$.value.nodeMouseLeave.hasListeners()),j=Ee(()=>!!p.dimensions.width&&!!p.dimensions.height),W=fe(()=>{const D=p.type||"default",C=I==null?void 0:I[`node-${D}`];if(C)return C;let G=p.template||d.value[D];if(typeof G=="string"&&T){const Q=Object.keys(T.appContext.components);Q&&Q.includes(D)&&(G=Se(D,!1))}return G&&typeof G!="string"?G:(i.error(new Te(Ce.NODE_TYPE_MISSING,G)),!1)}),P=ba({id:e.id,el:b,disabled:()=>!M.value,selectable:L,dragHandle:()=>p.dragHandle,onStart(D){_.dragStart(D)},onDrag(D){_.drag(D)},onStop(D){_.dragStop(D)},onClick(D){S(D)}}),A=fe(()=>p.class instanceof Function?p.class(p):p.class),R=fe(()=>{const D=(p.style instanceof Function?p.style(p):p.style)||{},C=p.width instanceof Function?p.width(p):p.width,G=p.height instanceof Function?p.height(p):p.height;return!D.width&&C&&(D.width=typeof C=="string"?C:`${C}px`),!D.height&&G&&(D.height=typeof G=="string"?G:`${G}px`),D}),H=Ee(()=>Number(p.zIndex??R.value.zIndex??0));return u(D=>{(D.includes(e.id)||!D.length)&&te()}),Ke(()=>{ye(()=>p.hidden,(D=!1,C,G)=>{!D&&b.value&&(e.resizeObserver.observe(b.value),G(()=>{b.value&&e.resizeObserver.unobserve(b.value)}))},{immediate:!0,flush:"post"})}),ye([()=>p.type,()=>p.sourcePosition,()=>p.targetPosition],()=>{Ae(()=>{c([{id:e.id,nodeElement:b.value,forceUpdate:!0}])})}),ye([()=>p.position.x,()=>p.position.y,()=>{var D;return(D=V.value)==null?void 0:D.computedPosition.x},()=>{var D;return(D=V.value)==null?void 0:D.computedPosition.y},()=>{var D;return(D=V.value)==null?void 0:D.computedPosition.z},H,()=>p.selected,()=>p.dimensions.height,()=>p.dimensions.width,()=>{var D;return(D=V.value)==null?void 0:D.dimensions.height},()=>{var D;return(D=V.value)==null?void 0:D.dimensions.width}],([D,C,G,Q,J,ee])=>{const ae={x:D,y:C,z:ee+(h.value&&p.selected?1e3:0)};typeof G<"u"&&typeof Q<"u"?p.computedPosition=qd({x:G,y:Q,z:J},ae):p.computedPosition=ae},{flush:"post",immediate:!0}),ye([()=>p.extent,f],([D,C],[G,Q])=>{(D!==G||C!==Q)&&X()}),p.extent==="parent"||typeof p.extent=="object"&&"range"in p.extent&&p.extent.range==="parent"?Xn(()=>j).toBe(!0).then(X):X(),()=>p.hidden?null:we("div",{ref:b,"data-id":p.id,class:["vue-flow__node",`vue-flow__node-${W.value===!1?"default":p.type||"default"}`,{[n.value]:M.value,dragging:P==null?void 0:P.value,draggable:M.value,selected:p.selected,selectable:L.value,parent:p.isParent},A.value],style:{visibility:j.value?"visible":"hidden",zIndex:p.computedPosition.z??H.value,transform:`translate(${p.computedPosition.x}px,${p.computedPosition.y}px)`,pointerEvents:Y.value?"all":"none",...R.value},tabIndex:q.value?0:void 0,role:q.value?"group":void 0,"aria-describedby":m.value?void 0:`${Bi}-${t}`,"aria-label":p.ariaLabel,"aria-roledescription":"node",...p.domAttributes,onMouseenter:ne,onMousemove:ce,onMouseleave:be,onContextmenu:ie,onClick:S,onDblclick:le,onKeydown:N},[we(W.value===!1?d.value.default:W.value,{id:p.id,type:p.type,data:p.data,events:{...p.events,...O},selected:p.selected,resizing:p.resizing,dragging:P.value,connectable:F.value,position:p.computedPosition,dimensions:p.dimensions,isValidTargetPos:p.isValidTargetPos,isValidSourcePos:p.isValidSourcePos,parent:p.parentNode,parentNodeId:p.parentNode,zIndex:p.computedPosition.z??H.value,targetPosition:p.targetPosition,sourcePosition:p.sourcePosition,label:p.label,dragHandle:p.dragHandle,onUpdateNodeInternals:te})]);function X(){const D=p.computedPosition,{computedPosition:C,position:G}=bo(p,g.value?Tn(D,E.value):D,i.error,f.value,V.value);(p.computedPosition.x!==C.x||p.computedPosition.y!==C.y)&&(p.computedPosition={...p.computedPosition,...C}),(p.position.x!==G.x||p.position.y!==G.y)&&(p.position=G)}function te(){b.value&&c([{id:e.id,nodeElement:b.value,forceUpdate:!0}])}function ne(D){P!=null&&P.value||_.mouseEnter({event:D,node:p})}function ce(D){P!=null&&P.value||_.mouseMove({event:D,node:p})}function be(D){P!=null&&P.value||_.mouseLeave({event:D,node:p})}function ie(D){return _.contextMenu({event:D,node:p})}function le(D){return _.doubleClick({event:D,node:p})}function S(D){L.value&&(!r.value||!M.value||w.value>0)&&So(p,a.value,l,s,o,!1,b.value),_.click({event:D,node:p})}function N(D){if(!(_o(D)||m.value))if(Li.includes(D.key)&&L.value){const C=D.key==="Escape";So(p,a.value,l,s,o,C,b.value)}else M.value&&p.selected&&Dt[D.key]&&(D.preventDefault(),y.value=`Moved selected node ${D.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~p.position.x}, y: ${~~p.position.y}`,k({x:Dt[D.key].x,y:Dt[D.key].y},D.shiftKey))}}});function mh(e={includeHiddenNodes:!1}){const{nodes:t}=Ne();return fe(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&((n==null?void 0:n.handleBounds)===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const _h={class:"vue-flow__nodes vue-flow__container"},yh=_e({...{name:"Nodes",compatConfig:{MODE:3}},setup(e){const{getNodes:t,updateNodeDimensions:n,emits:r}=Ne(),o=mh(),a=me();return ye(o,i=>{i&&Ae(()=>{r.nodesInitialized(t.value)})},{immediate:!0}),Ke(()=>{a.value=new ResizeObserver(i=>{const s=i.map(l=>({id:l.target.getAttribute("data-id"),nodeElement:l.target,forceUpdate:!0}));Ae(()=>n(s))})}),qn(()=>{var i;return(i=a.value)==null?void 0:i.disconnect()}),(i,s)=>(oe(),de("div",_h,[a.value?(oe(!0),de(Ve,{key:0},rn(Z(t),(l,c,u,d)=>{const f=[l.id];if(d&&d.key===l.id&&Dr(d,f))return d;const h=(oe(),Oe(Z(gh),{id:l.id,key:l.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return h.memo=f,h},s,0),128)):De("",!0)]))}});function wh(){const{emits:e}=Ne();Ke(()=>{if(ha()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new Te(Ce.MISSING_STYLES))}})}const bh=ue("div",{class:"vue-flow__edge-labels"},null,-1),xh=_e({...{name:"VueFlow",compatConfig:{MODE:3}},props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const r=e,o=kr(),a=Un(r,"modelValue",n),i=Un(r,"nodes",n),s=Un(r,"edges",n),l=Ne(r),c=bf({modelValue:a,nodes:i,edges:s},r,l);return Ef(n,l.hooks),ah(),wh(),ht(Pn,o),Cr(c),t(l),(u,d)=>(oe(),de("div",{ref:Z(l).vueFlowRef,class:"vue-flow"},[se(th,null,{default:ge(()=>[se(vh),bh,se(yh),ke(u.$slots,"zoom-pane")]),_:3}),ke(u.$slots,"default"),se(ih)],512))}}),Eh=_e({...{name:"Panel",compatConfig:{MODE:3}},props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Ne(),r=fe(()=>`${t.position}`.split("-"));return(o,a)=>(oe(),de("div",{class:pt(["vue-flow__panel",r.value]),style:ze({pointerEvents:Z(n)?"none":"all"})},[ke(o.$slots,"default")],6))}}),Nh={name:"ControlButton",compatConfig:{MODE:3}},Sh=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},kh={type:"button",class:"vue-flow__controls-button"};function Ch(e,t,n,r,o,a){return oe(),de("button",kh,[ke(e.$slots,"default")])}const nn=Sh(Nh,[["render",Ch]]),$h={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Ih=[ue("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function Mh(e,t){return oe(),de("svg",$h,Ih)}const Dh={render:Mh},Oh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Th=[ue("path",{d:"M0 0h32v4.2H0z"},null,-1)];function Ph(e,t){return oe(),de("svg",Oh,Th)}const Ah={render:Ph},Rh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},zh=[ue("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 0 0 27.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.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"},null,-1)];function Bh(e,t){return oe(),de("svg",Rh,zh)}const Vh={render:Bh},Lh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Hh=[ue("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 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-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"},null,-1)];function Fh(e,t){return oe(),de("svg",Lh,Hh)}const Gh={render:Fh},Yh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},qh=[ue("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 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"},null,-1)];function jh(e,t){return oe(),de("svg",Yh,qh)}const Wh={render:jh},Xh=_e({...{name:"Controls",compatConfig:{MODE:3}},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Ri.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:n,nodesConnectable:r,elementsSelectable:o,setInteractive:a,zoomIn:i,zoomOut:s,fitView:l,viewport:c,minZoom:u,maxZoom:d}=Ne(),f=Ee(()=>n.value||r.value||o.value),h=Ee(()=>c.value.zoom<=u.value),m=Ee(()=>c.value.zoom>=d.value);function y(){i(),t("zoomIn")}function g(){s(),t("zoomOut")}function E(){l(e.fitViewParams),t("fitView")}function w(){a(!f.value),t("interactionChange",!f.value)}return(v,x)=>(oe(),Oe(Z(Eh),{class:"vue-flow__controls",position:v.position},{default:ge(()=>[ke(v.$slots,"top"),v.showZoom?(oe(),de(Ve,{key:0},[ke(v.$slots,"control-zoom-in",{},()=>[se(nn,{class:"vue-flow__controls-zoomin",disabled:m.value,onClick:y},{default:ge(()=>[ke(v.$slots,"icon-zoom-in",{},()=>[(oe(),Oe(gt(Z(Dh))))])]),_:3},8,["disabled"])]),ke(v.$slots,"control-zoom-out",{},()=>[se(nn,{class:"vue-flow__controls-zoomout",disabled:h.value,onClick:g},{default:ge(()=>[ke(v.$slots,"icon-zoom-out",{},()=>[(oe(),Oe(gt(Z(Ah))))])]),_:3},8,["disabled"])])],64)):De("",!0),v.showFitView?ke(v.$slots,"control-fit-view",{key:1},()=>[se(nn,{class:"vue-flow__controls-fitview",onClick:E},{default:ge(()=>[ke(v.$slots,"icon-fit-view",{},()=>[(oe(),Oe(gt(Z(Vh))))])]),_:3})]):De("",!0),v.showInteractive?ke(v.$slots,"control-interactive",{key:2},()=>[v.showInteractive?(oe(),Oe(nn,{key:0,class:"vue-flow__controls-interactive",onClick:w},{default:ge(()=>[f.value?ke(v.$slots,"icon-unlock",{key:0},()=>[(oe(),Oe(gt(Z(Wh))))]):De("",!0),f.value?De("",!0):ke(v.$slots,"icon-lock",{key:1},()=>[(oe(),Oe(gt(Z(Gh))))])]),_:3})):De("",!0)]):De("",!0),ke(v.$slots,"default")]),_:3},8,["position"]))}});var nt=(e=>(e.Lines="lines",e.Dots="dots",e))(nt||{});const Ra=function({dimensions:e,size:t,color:n}){return we("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},za=function({radius:e,color:t}){return we("circle",{cx:e,cy:e,r:e,fill:t})};nt.Lines+"",nt.Dots+"";const Uh={[nt.Dots]:"#81818a",[nt.Lines]:"#eee"},Zh=["id","x","y","width","height","patternTransform"],Kh={key:2,height:"100",width:"100"},Qh=["fill"],Jh=["x","y","fill"],ep=_e({...{name:"Background",compatConfig:{MODE:3}},props:{id:{},variant:{default:()=>nt.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Ne(),r=fe(()=>{const i=n.value.zoom,[s,l]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[s*i||1,l*i||1],u=e.size*i,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[d*i||1+c[0]/2,f*i||1+c[1]/2];return{scaledGap:c,offset:h,size:u}}),o=Ee(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),a=Ee(()=>e.color||e.patternColor||Uh[e.variant||nt.Dots]);return(i,s)=>(oe(),de("svg",{class:"vue-flow__background vue-flow__container",style:ze({height:`${i.height>100?100:i.height}%`,width:`${i.width>100?100:i.width}%`})},[ke(i.$slots,"pattern-container",{id:o.value},()=>[ue("pattern",{id:o.value,x:Z(n).x%r.value.scaledGap[0],y:Z(n).y%r.value.scaledGap[1],width:r.value.scaledGap[0],height:r.value.scaledGap[1],patternTransform:`translate(-${r.value.offset[0]},-${r.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[ke(i.$slots,"pattern",{},()=>[i.variant===Z(nt).Lines?(oe(),Oe(Z(Ra),{key:0,size:i.lineWidth,color:a.value,dimensions:r.value.scaledGap},null,8,["size","color","dimensions"])):i.variant===Z(nt).Dots?(oe(),Oe(Z(za),{key:1,color:a.value,radius:r.value.size/2},null,8,["color","radius"])):De("",!0),i.bgColor?(oe(),de("svg",Kh,[ue("rect",{width:"100%",height:"100%",fill:i.bgColor},null,8,Qh)])):De("",!0)])],8,Zh)]),ue("rect",{x:i.x,y:i.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,Jh),ke(i.$slots,"default",{id:o.value})],4))}}),tp={name:"DetailsTable",components:{RawBuffer:Vr},mixins:[Br],props:{mode:{type:String,default:"Interface"},details:{type:Object,default:null},readProtocolIndex:{type:Number,default:null},writeProtocolIndex:{type:Number,default:null}},emits:["close"],data(){return{api:null,headers:[{title:"Property",key:"key",width:"30%"},{title:"Value",key:"value",width:"70%"}],paused:!1,updatedDetails:null}},computed:{shownDetails(){return this.updatedDetails?this.updatedDetails:this.details},upperData(){let e={};if(!this.shownDetails)return e;if(this.readProtocolIndex!==null){let t=this.shownDetails.read_protocols[this.readProtocolIndex];e.data=t.read_data_input,e.label="Read Data Input",e.time=t.read_data_input_time}else if(this.writeProtocolIndex!==null){let t=this.shownDetails.write_protocols[this.writeProtocolIndex];e.data=t.write_data_input,e.label="Write Data Input",e.time=t.write_data_input_time}else{let t=this.shownDetails;e.data=t.written_raw_data,e.label="Written Raw Data",e.time=t.written_raw_data_time}return e},lowerData(){let e={};if(!this.shownDetails)return e;if(this.readProtocolIndex!==null){let t=this.shownDetails.read_protocols[this.readProtocolIndex];e.data=t.read_data_output,e.label="Read Data Output",e.time=t.read_data_output_time}else if(this.writeProtocolIndex!==null){let t=this.shownDetails.write_protocols[this.writeProtocolIndex];e.data=t.write_data_output,e.label="Write Data Output",e.time=t.write_data_output_time}else{let t=this.shownDetails;e.data=t.read_raw_data,e.label="Read Raw Data",e.time=t.read_raw_data_time}return e},detailsItems(){if(!this.shownDetails)return[];const e=["written_raw_data","read_raw_data","written_raw_data_time","read_raw_data_time","read_protocols","write_protocols","read_data_input","read_data_output","write_data_input","write_data_output","read_data_input_time","read_data_output_time","write_data_input_time","write_data_output_time"];let t=null;return this.readProtocolIndex!==null?t=this.shownDetails.read_protocols[this.readProtocolIndex]:this.writeProtocolIndex!==null?t=this.shownDetails.write_protocols[this.writeProtocolIndex]:t=this.shownDetails,Object.entries(t).filter(([n,r])=>!e.includes(n)).map(([n,r])=>({key:this.formatKey(n),value:this.formatValue(r)}))},buttonIcon:function(){return this.paused?"mdi-play":"mdi-pause"}},methods:{pause:function(){this.paused=!this.paused},closeClick:function(){this.$emit("close")},update:function(){this.paused||this.details&&this.updateDetails(this.details.name)},updateDetails(e){this.mode=="Interface"?this.api.interface_details(e).then(t=>{this.updatedDetails=t}):this.api.router_details(e).then(t=>{this.updatedDetails=t})},formatKey(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())},formatValue(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}}},np={class:"details-table"},op={class:"text-wrap"},rp={key:1,class:"d-flex justify-center align-center pa-4"};function ip(e,t,n,r,o,a){const i=Se("v-btn"),s=Se("v-spacer"),l=Se("v-card-title"),c=Se("v-data-table"),u=Se("v-progress-circular"),d=Se("v-col"),f=Se("raw-buffer"),h=Se("v-row"),m=Se("v-card-text"),y=Se("v-card");return oe(),Oe(y,{"max-height":"80vh",class:"d-flex flex-column"},{default:ge(()=>[se(l,{class:"d-flex align-center flex-shrink-0"},{default:ge(()=>[Ye(Pe(n.mode)+" Properties: "+Pe(a.shownDetails.name)+" ",1),se(i,{icon:a.buttonIcon,variant:"text","data-test":"pause",onClick:a.pause},null,8,["icon","onClick"]),se(s),se(i,{icon:"mdi-close",variant:"text","data-test":"close",onClick:a.closeClick},null,8,["onClick"])]),_:1}),se(m,{class:"overflow-y-auto flex-grow-1 pa-0"},{default:ge(()=>[ue("div",np,[se(h,null,{default:ge(()=>[se(d,{cols:"4"},{default:ge(()=>[a.shownDetails?(oe(),Oe(c,{key:0,headers:o.headers,items:a.detailsItems,"items-per-page":-1,"hide-default-footer":"",density:"compact",class:"details-table"},{"item.value":ge(({item:g})=>[ue("span",op,Pe(g.value),1)]),_:1},8,["headers","items"])):(oe(),de("div",rp,[se(u,{indeterminate:"",color:"primary"})]))]),_:1}),se(d,{cols:"8"},{default:ge(()=>[ue("div",null,Pe(a.upperData.label)+": "+Pe(a.upperData.time),1),se(f,{modelValue:a.upperData.data,"onUpdate:modelValue":t[0]||(t[0]=g=>a.upperData.data=g)},null,8,["modelValue"]),ue("div",null,Pe(a.lowerData.label)+": "+Pe(a.lowerData.time),1),se(f,{modelValue:a.lowerData.data,"onUpdate:modelValue":t[1]||(t[1]=g=>a.lowerData.data=g)},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1})}const ap=it(tp,[["render",ip],["__scopeId","data-v-0b4171c8"]]),sp={name:"InterfaceNode",components:{Handle:dt},props:{data:{type:Object,required:!0}},computed:{interfaceStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}},data(){return{}}},lp={class:"node-label"};function up(e,t,n,r,o,a){const i=Se("v-icon"),s=Se("Handle");return oe(),de("div",{class:"interface-node",style:ze(a.interfaceStyle)},[se(i,{color:"#1d85e1"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-swap-horizontal-bold",-1)])]),_:1}),ue("div",lp,Pe(n.data.label),1),t[1]||(t[1]=ue("div",{class:"node-label"},"Interface",-1)),se(s,{id:"interface__cmd__input",type:"target",position:"left",style:{top:"112px"}}),se(s,{id:"interface__tlm__input",type:"target",position:"left",style:{top:"162px"}}),se(s,{id:"interface__cmd__output",type:"source",position:"right",style:{top:"112px"}}),se(s,{id:"interface__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=ue("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}},"CMD",-1)),t[3]||(t[3]=ue("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}},"TLM",-1)),t[4]||(t[4]=ue("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}},"CMD",-1)),t[5]||(t[5]=ue("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}},"TLM",-1))],4)}const cp=it(sp,[["render",up],["__scopeId","data-v-a31e429f"]]),dp={name:"RouterNode",components:{Handle:dt},props:{data:{type:Object,required:!0}},computed:{routerStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}},data(){return{}}},fp={class:"node-label"};function hp(e,t,n,r,o,a){const i=Se("v-icon"),s=Se("Handle");return oe(),de("div",{class:"router-node",style:ze(a.routerStyle)},[se(i,{color:"#ba1de1"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-call-split",-1)])]),_:1}),ue("div",fp,Pe(n.data.label),1),t[1]||(t[1]=ue("div",{class:"node-label"},"Router",-1)),se(s,{id:"router__cmd__input",type:"target",position:"left",style:{top:"112px"}}),se(s,{id:"router__tlm__input",type:"target",position:"left",style:{top:"162px"}}),se(s,{id:"router__cmd__output",type:"source",position:"right",style:{top:"112px"}}),se(s,{id:"router__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=ue("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}},"CMD",-1)),t[3]||(t[3]=ue("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}},"TLM",-1)),t[4]||(t[4]=ue("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}},"CMD",-1)),t[5]||(t[5]=ue("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}},"TLM",-1))],4)}const pp=it(dp,[["render",hp],["__scopeId","data-v-75db5a9b"]]),vp={name:"TargetNode",components:{Handle:dt},props:{data:{type:Object,required:!0}}},gp={class:"cosmos-node"},mp={class:"node-label"};function _p(e,t,n,r,o,a){const i=Se("Handle"),s=Se("v-icon");return oe(),de("div",gp,[se(i,{id:"cosmos__cmd",type:"target",position:"right",style:{top:"114px"}}),se(i,{id:"cosmos__tlm",type:"target",position:"right",style:{top:"164px"}}),t[1]||(t[1]=ue("div",{style:{position:"absolute",top:"104px",right:"8px",color:"black"}},"CMD",-1)),t[2]||(t[2]=ue("div",{style:{position:"absolute",top:"154px",right:"8px",color:"black"}},"TLM",-1)),se(s,{color:"#10b981"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-rocket-launch",-1)])]),_:1}),ue("div",mp,Pe(n.data.label),1),t[3]||(t[3]=ue("div",{class:"node-label"},"Processing",-1))])}const yp=it(vp,[["render",_p],["__scopeId","data-v-d2155b1f"]]),wp={name:"TargetNode",components:{Handle:dt},props:{data:{type:Object,required:!0}}},bp={class:"target-node"},xp={class:"node-label"};function Ep(e,t,n,r,o,a){const i=Se("Handle"),s=Se("v-icon");return oe(),de("div",bp,[se(i,{id:"target__cmd",type:"target",position:"left",style:{top:"114px"}}),se(i,{id:"target__tlm",type:"target",position:"left",style:{top:"164px"}}),t[1]||(t[1]=ue("div",{style:{position:"absolute",top:"104px",left:"8px",color:"black"}},"CMD",-1)),t[2]||(t[2]=ue("div",{style:{position:"absolute",top:"154px",left:"8px",color:"black"}},"TLM",-1)),se(s,{color:"#10b981"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-target",-1)])]),_:1}),ue("div",xp,Pe(n.data.label),1),t[3]||(t[3]=ue("div",{class:"node-label"},"Target",-1))])}const Np=it(wp,[["render",Ep],["__scopeId","data-v-b38bbebb"]]),Sp={name:"WriteProtocolNode",props:{data:{type:Object,required:!0}}},kp={class:"write-protocol-node"},Cp={class:"protocol-label"};function $p(e,t,n,r,o,a){const i=Se("v-icon");return oe(),de("div",kp,[se(i,{color:"#f97316",size:"small"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-arrow-right-bold",-1)])]),_:1}),ue("div",Cp,Pe(n.data.label),1)])}const Ip=it(Sp,[["render",$p],["__scopeId","data-v-301d4de9"]]),Mp={name:"ReadProtocolNode",props:{data:{type:Object,required:!0}}},Dp={class:"read-protocol-node"},Op={class:"protocol-label"};function Tp(e,t,n,r,o,a){const i=Se("v-icon");return oe(),de("div",Dp,[se(i,{color:"#06b6d4",size:"small"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-arrow-left-bold",-1)])]),_:1}),ue("div",Op,Pe(n.data.label),1)])}const Pp=it(Mp,[["render",Tp],["__scopeId","data-v-d8220607"]]);function Ap(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Do,Ba;function Oo(){if(Ba)return Do;Ba=1;var e="\0",t="\0",n="";class r{constructor(u){Me(this,"_isDirected",!0);Me(this,"_isMultigraph",!1);Me(this,"_isCompound",!1);Me(this,"_label");Me(this,"_defaultNodeLabelFn",()=>{});Me(this,"_defaultEdgeLabelFn",()=>{});Me(this,"_nodes",{});Me(this,"_in",{});Me(this,"_preds",{});Me(this,"_out",{});Me(this,"_sucs",{});Me(this,"_edgeObjs",{});Me(this,"_edgeLabels",{});Me(this,"_nodeCount",0);Me(this,"_edgeCount",0);Me(this,"_parent");Me(this,"_children");u&&(this._isDirected=Object.hasOwn(u,"directed")?u.directed:!0,this._isMultigraph=Object.hasOwn(u,"multigraph")?u.multigraph:!1,this._isCompound=Object.hasOwn(u,"compound")?u.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(u){return this._label=u,this}graph(){return this._label}setDefaultNodeLabel(u){return this._defaultNodeLabelFn=u,typeof u!="function"&&(this._defaultNodeLabelFn=()=>u),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var u=this;return this.nodes().filter(d=>Object.keys(u._in[d]).length===0)}sinks(){var u=this;return this.nodes().filter(d=>Object.keys(u._out[d]).length===0)}setNodes(u,d){var f=arguments,h=this;return u.forEach(function(m){f.length>1?h.setNode(m,d):h.setNode(m)}),this}setNode(u,d){return Object.hasOwn(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=d),this):(this._nodes[u]=arguments.length>1?d:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=t,this._children[u]={},this._children[t][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)}node(u){return this._nodes[u]}hasNode(u){return Object.hasOwn(this._nodes,u)}removeNode(u){var d=this;if(Object.hasOwn(this._nodes,u)){var f=h=>d.removeEdge(d._edgeObjs[h]);delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],this.children(u).forEach(function(h){d.setParent(h)}),delete this._children[u]),Object.keys(this._in[u]).forEach(f),delete this._in[u],delete this._preds[u],Object.keys(this._out[u]).forEach(f),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this}setParent(u,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(d===void 0)d=t;else{d+="";for(var f=d;f!==void 0;f=this.parent(f))if(f===u)throw new Error("Setting "+d+" as parent of "+u+" would create a cycle");this.setNode(d)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=d,this._children[d][u]=!0,this}_removeFromParentsChildList(u){delete this._children[this._parent[u]][u]}parent(u){if(this._isCompound){var d=this._parent[u];if(d!==t)return d}}children(u=t){if(this._isCompound){var d=this._children[u];if(d)return Object.keys(d)}else{if(u===t)return this.nodes();if(this.hasNode(u))return[]}}predecessors(u){var d=this._preds[u];if(d)return Object.keys(d)}successors(u){var d=this._sucs[u];if(d)return Object.keys(d)}neighbors(u){var d=this.predecessors(u);if(d){const h=new Set(d);for(var f of this.successors(u))h.add(f);return Array.from(h.values())}}isLeaf(u){var d;return this.isDirected()?d=this.successors(u):d=this.neighbors(u),d.length===0}filterNodes(u){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var f=this;Object.entries(this._nodes).forEach(function([y,g]){u(y)&&d.setNode(y,g)}),Object.values(this._edgeObjs).forEach(function(y){d.hasNode(y.v)&&d.hasNode(y.w)&&d.setEdge(y,f.edge(y))});var h={};function m(y){var g=f.parent(y);return g===void 0||d.hasNode(g)?(h[y]=g,g):g in h?h[g]:m(g)}return this._isCompound&&d.nodes().forEach(y=>d.setParent(y,m(y))),d}setDefaultEdgeLabel(u){return this._defaultEdgeLabelFn=u,typeof u!="function"&&(this._defaultEdgeLabelFn=()=>u),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(u,d){var f=this,h=arguments;return u.reduce(function(m,y){return h.length>1?f.setEdge(m,y,d):f.setEdge(m,y),y}),this}setEdge(){var u,d,f,h,m=!1,y=arguments[0];typeof y=="object"&&y!==null&&"v"in y?(u=y.v,d=y.w,f=y.name,arguments.length===2&&(h=arguments[1],m=!0)):(u=y,d=arguments[1],f=arguments[3],arguments.length>2&&(h=arguments[2],m=!0)),u=""+u,d=""+d,f!==void 0&&(f=""+f);var g=i(this._isDirected,u,d,f);if(Object.hasOwn(this._edgeLabels,g))return m&&(this._edgeLabels[g]=h),this;if(f!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(d),this._edgeLabels[g]=m?h:this._defaultEdgeLabelFn(u,d,f);var E=s(this._isDirected,u,d,f);return u=E.v,d=E.w,Object.freeze(E),this._edgeObjs[g]=E,o(this._preds[d],u),o(this._sucs[u],d),this._in[d][g]=E,this._out[u][g]=E,this._edgeCount++,this}edge(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):i(this._isDirected,u,d,f);return this._edgeLabels[h]}edgeAsObj(){const u=this.edge(...arguments);return typeof u!="object"?{label:u}:u}hasEdge(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):i(this._isDirected,u,d,f);return Object.hasOwn(this._edgeLabels,h)}removeEdge(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):i(this._isDirected,u,d,f),m=this._edgeObjs[h];return m&&(u=m.v,d=m.w,delete this._edgeLabels[h],delete this._edgeObjs[h],a(this._preds[d],u),a(this._sucs[u],d),delete this._in[d][h],delete this._out[u][h],this._edgeCount--),this}inEdges(u,d){var f=this._in[u];if(f){var h=Object.values(f);return d?h.filter(m=>m.v===d):h}}outEdges(u,d){var f=this._out[u];if(f){var h=Object.values(f);return d?h.filter(m=>m.w===d):h}}nodeEdges(u,d){var f=this.inEdges(u,d);if(f)return f.concat(this.outEdges(u,d))}}function o(c,u){c[u]?c[u]++:c[u]=1}function a(c,u){--c[u]||delete c[u]}function i(c,u,d,f){var h=""+u,m=""+d;if(!c&&h>m){var y=h;h=m,m=y}return h+n+m+n+(f===void 0?e:f)}function s(c,u,d,f){var h=""+u,m=""+d;if(!c&&h>m){var y=h;h=m,m=y}var g={v:h,w:m};return f&&(g.name=f),g}function l(c,u){return i(c,u.v,u.w,u.name)}return Do=r,Do}var To,Va;function Rp(){return Va||(Va=1,To="2.2.4"),To}var Po,La;function zp(){return La||(La=1,Po={Graph:Oo(),version:Rp()}),Po}var Ao,Ha;function Bp(){if(Ha)return Ao;Ha=1;var e=Oo();Ao={write:t,read:o};function t(a){var i={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:r(a)};return a.graph()!==void 0&&(i.value=structuredClone(a.graph())),i}function n(a){return a.nodes().map(function(i){var s=a.node(i),l=a.parent(i),c={v:i};return s!==void 0&&(c.value=s),l!==void 0&&(c.parent=l),c})}function r(a){return a.edges().map(function(i){var s=a.edge(i),l={v:i.v,w:i.w};return i.name!==void 0&&(l.name=i.name),s!==void 0&&(l.value=s),l})}function o(a){var i=new e(a.options).setGraph(a.value);return a.nodes.forEach(function(s){i.setNode(s.v,s.value),s.parent&&i.setParent(s.v,s.parent)}),a.edges.forEach(function(s){i.setEdge({v:s.v,w:s.w,name:s.name},s.value)}),i}return Ao}var Ro,Fa;function Vp(){if(Fa)return Ro;Fa=1,Ro=e;function e(t){var n={},r=[],o;function a(i){Object.hasOwn(n,i)||(n[i]=!0,o.push(i),t.successors(i).forEach(a),t.predecessors(i).forEach(a))}return t.nodes().forEach(function(i){o=[],a(i),o.length&&r.push(o)}),r}return Ro}var zo,Ga;function Ya(){if(Ga)return zo;Ga=1;class e{constructor(){Me(this,"_arr",[]);Me(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,r){var o=this._keyIndices;if(n=String(n),!Object.hasOwn(o,n)){var a=this._arr,i=a.length;return o[n]=i,a.push({key:n,priority:r}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,r){var o=this._keyIndices[n];if(r>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+r);this._arr[o].priority=r,this._decrease(o)}_heapify(n){var r=this._arr,o=2*n,a=o+1,i=n;o<r.length&&(i=r[o].priority<r[i].priority?o:i,a<r.length&&(i=r[a].priority<r[i].priority?a:i),i!==n&&(this._swap(n,i),this._heapify(i)))}_decrease(n){for(var r=this._arr,o=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<o));)this._swap(n,a),n=a}_swap(n,r){var o=this._arr,a=this._keyIndices,i=o[n],s=o[r];o[n]=s,o[r]=i,a[s.key]=n,a[i.key]=r}}return zo=e,zo}var Bo,qa;function ja(){if(qa)return Bo;qa=1;var e=Ya();Bo=n;var t=()=>1;function n(o,a,i,s){return r(o,String(a),i||t,s||function(l){return o.outEdges(l)})}function r(o,a,i,s){var l={},c=new e,u,d,f=function(h){var m=h.v!==u?h.v:h.w,y=l[m],g=i(h),E=d.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+h+" Weight: "+g);E<y.distance&&(y.distance=E,y.predecessor=u,c.decrease(m,E))};for(o.nodes().forEach(function(h){var m=h===a?0:Number.POSITIVE_INFINITY;l[h]={distance:m},c.add(h,m)});c.size()>0&&(u=c.removeMin(),d=l[u],d.distance!==Number.POSITIVE_INFINITY);)s(u).forEach(f);return l}return Bo}var Vo,Wa;function Lp(){if(Wa)return Vo;Wa=1;var e=ja();Vo=t;function t(n,r,o){return n.nodes().reduce(function(a,i){return a[i]=e(n,i,r,o),a},{})}return Vo}var Lo,Xa;function Ua(){if(Xa)return Lo;Xa=1,Lo=e;function e(t){var n=0,r=[],o={},a=[];function i(s){var l=o[s]={onStack:!0,lowlink:n,index:n++};if(r.push(s),t.successors(s).forEach(function(d){Object.hasOwn(o,d)?o[d].onStack&&(l.lowlink=Math.min(l.lowlink,o[d].index)):(i(d),l.lowlink=Math.min(l.lowlink,o[d].lowlink))}),l.lowlink===l.index){var c=[],u;do u=r.pop(),o[u].onStack=!1,c.push(u);while(s!==u);a.push(c)}}return t.nodes().forEach(function(s){Object.hasOwn(o,s)||i(s)}),a}return Lo}var Ho,Za;function Hp(){if(Za)return Ho;Za=1;var e=Ua();Ho=t;function t(n){return e(n).filter(function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return Ho}var Fo,Ka;function Fp(){if(Ka)return Fo;Ka=1,Fo=t;var e=()=>1;function t(r,o,a){return n(r,o||e,a||function(i){return r.outEdges(i)})}function n(r,o,a){var i={},s=r.nodes();return s.forEach(function(l){i[l]={},i[l][l]={distance:0},s.forEach(function(c){l!==c&&(i[l][c]={distance:Number.POSITIVE_INFINITY})}),a(l).forEach(function(c){var u=c.v===l?c.w:c.v,d=o(c);i[l][u]={distance:d,predecessor:l}})}),s.forEach(function(l){var c=i[l];s.forEach(function(u){var d=i[u];s.forEach(function(f){var h=d[l],m=c[f],y=d[f],g=h.distance+m.distance;g<y.distance&&(y.distance=g,y.predecessor=m.predecessor)})})}),i}return Fo}var Go,Qa;function Ja(){if(Qa)return Go;Qa=1;function e(n){var r={},o={},a=[];function i(s){if(Object.hasOwn(o,s))throw new t;Object.hasOwn(r,s)||(o[s]=!0,r[s]=!0,n.predecessors(s).forEach(i),delete o[s],a.push(s))}if(n.sinks().forEach(i),Object.keys(r).length!==n.nodeCount())throw new t;return a}class t extends Error{constructor(){super(...arguments)}}return Go=e,e.CycleException=t,Go}var Yo,es;function Gp(){if(es)return Yo;es=1;var e=Ja();Yo=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return Yo}var qo,ts;function ns(){if(ts)return qo;ts=1,qo=e;function e(o,a,i){Array.isArray(a)||(a=[a]);var s=o.isDirected()?d=>o.successors(d):d=>o.neighbors(d),l=i==="post"?t:n,c=[],u={};return a.forEach(d=>{if(!o.hasNode(d))throw new Error("Graph does not have node: "+d);l(d,s,u,c)}),c}function t(o,a,i,s){for(var l=[[o,!1]];l.length>0;){var c=l.pop();c[1]?s.push(c[0]):Object.hasOwn(i,c[0])||(i[c[0]]=!0,l.push([c[0],!0]),r(a(c[0]),u=>l.push([u,!1])))}}function n(o,a,i,s){for(var l=[o];l.length>0;){var c=l.pop();Object.hasOwn(i,c)||(i[c]=!0,s.push(c),r(a(c),u=>l.push(u)))}}function r(o,a){for(var i=o.length;i--;)a(o[i],i,o);return o}return qo}var jo,os;function Yp(){if(os)return jo;os=1;var e=ns();jo=t;function t(n,r){return e(n,r,"post")}return jo}var Wo,rs;function qp(){if(rs)return Wo;rs=1;var e=ns();Wo=t;function t(n,r){return e(n,r,"pre")}return Wo}var Xo,is;function jp(){if(is)return Xo;is=1;var e=Oo(),t=Ya();Xo=n;function n(r,o){var a=new e,i={},s=new t,l;function c(d){var f=d.v===l?d.w:d.v,h=s.priority(f);if(h!==void 0){var m=o(d);m<h&&(i[f]=l,s.decrease(f,m))}}if(r.nodeCount()===0)return a;r.nodes().forEach(function(d){s.add(d,Number.POSITIVE_INFINITY),a.setNode(d)}),s.decrease(r.nodes()[0],0);for(var u=!1;s.size()>0;){if(l=s.removeMin(),Object.hasOwn(i,l))a.setEdge(l,i[l]);else{if(u)throw new Error("Input graph is not connected: "+r);u=!0}r.nodeEdges(l).forEach(c)}return a}return Xo}var Uo,as;function Wp(){return as||(as=1,Uo={components:Vp(),dijkstra:ja(),dijkstraAll:Lp(),findCycles:Hp(),floydWarshall:Fp(),isAcyclic:Gp(),postorder:Yp(),preorder:qp(),prim:jp(),tarjan:Ua(),topsort:Ja()}),Uo}var Zo,ss;function Ge(){if(ss)return Zo;ss=1;var e=zp();return Zo={Graph:e.Graph,json:Bp(),alg:Wp(),version:e.version},Zo}var Ko,ls;function Xp(){if(ls)return Ko;ls=1;class e{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,a=o._prev;if(a!==o)return t(a),a}enqueue(o){let a=this._sentinel;o._prev&&o._next&&t(o),o._next=a._next,a._next._prev=o,a._next=o,o._prev=a}toString(){let o=[],a=this._sentinel,i=a._prev;for(;i!==a;)o.push(JSON.stringify(i,n)),i=i._prev;return"["+o.join(", ")+"]"}}function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,o){if(r!=="_next"&&r!=="_prev")return o}return Ko=e,Ko}var Qo,us;function Up(){if(us)return Qo;us=1;let e=Ge().Graph,t=Xp();Qo=r;let n=()=>1;function r(c,u){if(c.nodeCount()<=1)return[];let d=i(c,u||n);return o(d.graph,d.buckets,d.zeroIdx).flatMap(h=>c.outEdges(h.v,h.w))}function o(c,u,d){let f=[],h=u[u.length-1],m=u[0],y;for(;c.nodeCount();){for(;y=m.dequeue();)a(c,u,d,y);for(;y=h.dequeue();)a(c,u,d,y);if(c.nodeCount()){for(let g=u.length-2;g>0;--g)if(y=u[g].dequeue(),y){f=f.concat(a(c,u,d,y,!0));break}}}return f}function a(c,u,d,f,h){let m=h?[]:void 0;return c.inEdges(f.v).forEach(y=>{let g=c.edge(y),E=c.node(y.v);h&&m.push({v:y.v,w:y.w}),E.out-=g,s(u,d,E)}),c.outEdges(f.v).forEach(y=>{let g=c.edge(y),E=y.w,w=c.node(E);w.in-=g,s(u,d,w)}),c.removeNode(f.v),m}function i(c,u){let d=new e,f=0,h=0;c.nodes().forEach(g=>{d.setNode(g,{v:g,in:0,out:0})}),c.edges().forEach(g=>{let E=d.edge(g.v,g.w)||0,w=u(g),v=E+w;d.setEdge(g.v,g.w,v),h=Math.max(h,d.node(g.v).out+=w),f=Math.max(f,d.node(g.w).in+=w)});let m=l(h+f+3).map(()=>new t),y=f+1;return d.nodes().forEach(g=>{s(m,y,d.node(g))}),{graph:d,buckets:m,zeroIdx:y}}function s(c,u,d){d.out?d.in?c[d.out-d.in+u].enqueue(d):c[c.length-1].enqueue(d):c[0].enqueue(d)}function l(c){const u=[];for(let d=0;d<c;d++)u.push(d);return u}return Qo}var Jo,cs;function Ie(){if(cs)return Jo;cs=1;let e=Ge().Graph;Jo={addBorderNode:u,addDummyNode:t,applyWithChunking:h,asNonCompoundGraph:r,buildLayerMatrix:s,intersectRect:i,mapValues:B,maxRank:m,normalizeRanks:l,notime:E,partition:y,pick:z,predecessorWeights:a,range:x,removeEmptyRanks:c,simplify:n,successorWeights:o,time:g,uniqueId:v,zipObject:$};function t(b,I,T,k){for(var p=k;b.hasNode(p);)p=v(k);return T.dummy=I,b.setNode(p,T),p}function n(b){let I=new e().setGraph(b.graph());return b.nodes().forEach(T=>I.setNode(T,b.node(T))),b.edges().forEach(T=>{let k=I.edge(T.v,T.w)||{weight:0,minlen:1},p=b.edge(T);I.setEdge(T.v,T.w,{weight:k.weight+p.weight,minlen:Math.max(k.minlen,p.minlen)})}),I}function r(b){let I=new e({multigraph:b.isMultigraph()}).setGraph(b.graph());return b.nodes().forEach(T=>{b.children(T).length||I.setNode(T,b.node(T))}),b.edges().forEach(T=>{I.setEdge(T,b.edge(T))}),I}function o(b){let I=b.nodes().map(T=>{let k={};return b.outEdges(T).forEach(p=>{k[p.w]=(k[p.w]||0)+b.edge(p).weight}),k});return $(b.nodes(),I)}function a(b){let I=b.nodes().map(T=>{let k={};return b.inEdges(T).forEach(p=>{k[p.v]=(k[p.v]||0)+b.edge(p).weight}),k});return $(b.nodes(),I)}function i(b,I){let T=b.x,k=b.y,p=I.x-T,V=I.y-k,_=b.width/2,O=b.height/2;if(!p&&!V)throw new Error("Not possible to find intersection inside of the rectangle");let M,L;return Math.abs(V)*_>Math.abs(p)*O?(V<0&&(O=-O),M=O*p/V,L=O):(p<0&&(_=-_),M=_,L=_*V/p),{x:T+M,y:k+L}}function s(b){let I=x(m(b)+1).map(()=>[]);return b.nodes().forEach(T=>{let k=b.node(T),p=k.rank;p!==void 0&&(I[p][k.order]=T)}),I}function l(b){let I=b.nodes().map(k=>{let p=b.node(k).rank;return p===void 0?Number.MAX_VALUE:p}),T=h(Math.min,I);b.nodes().forEach(k=>{let p=b.node(k);Object.hasOwn(p,"rank")&&(p.rank-=T)})}function c(b){let I=b.nodes().map(_=>b.node(_).rank),T=h(Math.min,I),k=[];b.nodes().forEach(_=>{let O=b.node(_).rank-T;k[O]||(k[O]=[]),k[O].push(_)});let p=0,V=b.graph().nodeRankFactor;Array.from(k).forEach((_,O)=>{_===void 0&&O%V!==0?--p:_!==void 0&&p&&_.forEach(M=>b.node(M).rank+=p)})}function u(b,I,T,k){let p={width:0,height:0};return arguments.length>=4&&(p.rank=T,p.order=k),t(b,"border",p,I)}function d(b,I=f){const T=[];for(let k=0;k<b.length;k+=I){const p=b.slice(k,k+I);T.push(p)}return T}const f=65535;function h(b,I){if(I.length>f){const T=d(I);return b.apply(null,T.map(k=>b.apply(null,k)))}else return b.apply(null,I)}function m(b){const T=b.nodes().map(k=>{let p=b.node(k).rank;return p===void 0?Number.MIN_VALUE:p});return h(Math.max,T)}function y(b,I){let T={lhs:[],rhs:[]};return b.forEach(k=>{I(k)?T.lhs.push(k):T.rhs.push(k)}),T}function g(b,I){let T=Date.now();try{return I()}finally{console.log(b+" time: "+(Date.now()-T)+"ms")}}function E(b,I){return I()}let w=0;function v(b){var I=++w;return b+(""+I)}function x(b,I,T=1){I==null&&(I=b,b=0);let k=V=>V<I;T<0&&(k=V=>I<V);const p=[];for(let V=b;k(V);V+=T)p.push(V);return p}function z(b,I){const T={};for(const k of I)b[k]!==void 0&&(T[k]=b[k]);return T}function B(b,I){let T=I;return typeof I=="string"&&(T=k=>k[I]),Object.entries(b).reduce((k,[p,V])=>(k[p]=T(V,p),k),{})}function $(b,I){return b.reduce((T,k,p)=>(T[k]=I[p],T),{})}return Jo}var er,ds;function Zp(){if(ds)return er;ds=1;let e=Up(),t=Ie().uniqueId;er={run:n,undo:o};function n(a){(a.graph().acyclicer==="greedy"?e(a,s(a)):r(a)).forEach(l=>{let c=a.edge(l);a.removeEdge(l),c.forwardName=l.name,c.reversed=!0,a.setEdge(l.w,l.v,c,t("rev"))});function s(l){return c=>l.edge(c).weight}}function r(a){let i=[],s={},l={};function c(u){Object.hasOwn(l,u)||(l[u]=!0,s[u]=!0,a.outEdges(u).forEach(d=>{Object.hasOwn(s,d.w)?i.push(d):c(d.w)}),delete s[u])}return a.nodes().forEach(c),i}function o(a){a.edges().forEach(i=>{let s=a.edge(i);if(s.reversed){a.removeEdge(i);let l=s.forwardName;delete s.reversed,delete s.forwardName,a.setEdge(i.w,i.v,s,l)}})}return er}var tr,fs;function Kp(){if(fs)return tr;fs=1;let e=Ie();tr={run:t,undo:r};function t(o){o.graph().dummyChains=[],o.edges().forEach(a=>n(o,a))}function n(o,a){let i=a.v,s=o.node(i).rank,l=a.w,c=o.node(l).rank,u=a.name,d=o.edge(a),f=d.labelRank;if(c===s+1)return;o.removeEdge(a);let h,m,y;for(y=0,++s;s<c;++y,++s)d.points=[],m={width:0,height:0,edgeLabel:d,edgeObj:a,rank:s},h=e.addDummyNode(o,"edge",m,"_d"),s===f&&(m.width=d.width,m.height=d.height,m.dummy="edge-label",m.labelpos=d.labelpos),o.setEdge(i,h,{weight:d.weight},u),y===0&&o.graph().dummyChains.push(h),i=h;o.setEdge(i,l,{weight:d.weight},u)}function r(o){o.graph().dummyChains.forEach(a=>{let i=o.node(a),s=i.edgeLabel,l;for(o.setEdge(i.edgeObj,s);i.dummy;)l=o.successors(a)[0],o.removeNode(a),s.points.push({x:i.x,y:i.y}),i.dummy==="edge-label"&&(s.x=i.x,s.y=i.y,s.width=i.width,s.height=i.height),a=l,i=o.node(a)})}return tr}var nr,hs;function Fn(){if(hs)return nr;hs=1;const{applyWithChunking:e}=Ie();nr={longestPath:t,slack:n};function t(r){var o={};function a(i){var s=r.node(i);if(Object.hasOwn(o,i))return s.rank;o[i]=!0;let l=r.outEdges(i).map(u=>u==null?Number.POSITIVE_INFINITY:a(u.w)-r.edge(u).minlen);var c=e(Math.min,l);return c===Number.POSITIVE_INFINITY&&(c=0),s.rank=c}r.sources().forEach(a)}function n(r,o){return r.node(o.w).rank-r.node(o.v).rank-r.edge(o).minlen}return nr}var or,ps;function vs(){if(ps)return or;ps=1;var e=Ge().Graph,t=Fn().slack;or=n;function n(i){var s=new e({directed:!1}),l=i.nodes()[0],c=i.nodeCount();s.setNode(l,{});for(var u,d;r(s,i)<c;)u=o(s,i),d=s.hasNode(u.v)?t(i,u):-t(i,u),a(s,i,d);return s}function r(i,s){function l(c){s.nodeEdges(c).forEach(u=>{var d=u.v,f=c===d?u.w:d;!i.hasNode(f)&&!t(s,u)&&(i.setNode(f,{}),i.setEdge(c,f,{}),l(f))})}return i.nodes().forEach(l),i.nodeCount()}function o(i,s){return s.edges().reduce((c,u)=>{let d=Number.POSITIVE_INFINITY;return i.hasNode(u.v)!==i.hasNode(u.w)&&(d=t(s,u)),d<c[0]?[d,u]:c},[Number.POSITIVE_INFINITY,null])[1]}function a(i,s,l){i.nodes().forEach(c=>s.node(c).rank+=l)}return or}var rr,gs;function Qp(){if(gs)return rr;gs=1;var e=vs(),t=Fn().slack,n=Fn().longestPath,r=Ge().alg.preorder,o=Ge().alg.postorder,a=Ie().simplify;rr=i,i.initLowLimValues=u,i.initCutValues=s,i.calcCutValue=c,i.leaveEdge=f,i.enterEdge=h,i.exchangeEdges=m;function i(w){w=a(w),n(w);var v=e(w);u(v),s(v,w);for(var x,z;x=f(v);)z=h(v,w,x),m(v,w,x,z)}function s(w,v){var x=o(w,w.nodes());x=x.slice(0,x.length-1),x.forEach(z=>l(w,v,z))}function l(w,v,x){var z=w.node(x),B=z.parent;w.edge(x,B).cutvalue=c(w,v,x)}function c(w,v,x){var z=w.node(x),B=z.parent,$=!0,b=v.edge(x,B),I=0;return b||($=!1,b=v.edge(B,x)),I=b.weight,v.nodeEdges(x).forEach(T=>{var k=T.v===x,p=k?T.w:T.v;if(p!==B){var V=k===$,_=v.edge(T).weight;if(I+=V?_:-_,g(w,x,p)){var O=w.edge(x,p).cutvalue;I+=V?-O:O}}}),I}function u(w,v){arguments.length<2&&(v=w.nodes()[0]),d(w,{},1,v)}function d(w,v,x,z,B){var $=x,b=w.node(z);return v[z]=!0,w.neighbors(z).forEach(I=>{Object.hasOwn(v,I)||(x=d(w,v,x,I,z))}),b.low=$,b.lim=x++,B?b.parent=B:delete b.parent,x}function f(w){return w.edges().find(v=>w.edge(v).cutvalue<0)}function h(w,v,x){var z=x.v,B=x.w;v.hasEdge(z,B)||(z=x.w,B=x.v);var $=w.node(z),b=w.node(B),I=$,T=!1;$.lim>b.lim&&(I=b,T=!0);var k=v.edges().filter(p=>T===E(w,w.node(p.v),I)&&T!==E(w,w.node(p.w),I));return k.reduce((p,V)=>t(v,V)<t(v,p)?V:p)}function m(w,v,x,z){var B=x.v,$=x.w;w.removeEdge(B,$),w.setEdge(z.v,z.w,{}),u(w),s(w,v),y(w,v)}function y(w,v){var x=w.nodes().find(B=>!v.node(B).parent),z=r(w,x);z=z.slice(1),z.forEach(B=>{var $=w.node(B).parent,b=v.edge(B,$),I=!1;b||(b=v.edge($,B),I=!0),v.node(B).rank=v.node($).rank+(I?b.minlen:-b.minlen)})}function g(w,v,x){return w.hasEdge(v,x)}function E(w,v,x){return x.low<=v.lim&&v.lim<=x.lim}return rr}var ir,ms;function Jp(){if(ms)return ir;ms=1;var e=Fn(),t=e.longestPath,n=vs(),r=Qp();ir=o;function o(l){var c=l.graph().ranker;if(c instanceof Function)return c(l);switch(l.graph().ranker){case"network-simplex":s(l);break;case"tight-tree":i(l);break;case"longest-path":a(l);break;case"none":break;default:s(l)}}var a=t;function i(l){t(l),n(l)}function s(l){r(l)}return ir}var ar,_s;function ev(){if(_s)return ar;_s=1,ar=e;function e(r){let o=n(r);r.graph().dummyChains.forEach(a=>{let i=r.node(a),s=i.edgeObj,l=t(r,o,s.v,s.w),c=l.path,u=l.lca,d=0,f=c[d],h=!0;for(;a!==s.w;){if(i=r.node(a),h){for(;(f=c[d])!==u&&r.node(f).maxRank<i.rank;)d++;f===u&&(h=!1)}if(!h){for(;d<c.length-1&&r.node(f=c[d+1]).minRank<=i.rank;)d++;f=c[d]}r.setParent(a,f),a=r.successors(a)[0]}})}function t(r,o,a,i){let s=[],l=[],c=Math.min(o[a].low,o[i].low),u=Math.max(o[a].lim,o[i].lim),d,f;d=a;do d=r.parent(d),s.push(d);while(d&&(o[d].low>c||u>o[d].lim));for(f=d,d=i;(d=r.parent(d))!==f;)l.push(d);return{path:s.concat(l.reverse()),lca:f}}function n(r){let o={},a=0;function i(s){let l=a;r.children(s).forEach(i),o[s]={low:l,lim:a++}}return r.children().forEach(i),o}return ar}var sr,ys;function tv(){if(ys)return sr;ys=1;let e=Ie();sr={run:t,cleanup:a};function t(i){let s=e.addDummyNode(i,"root",{},"_root"),l=r(i),c=Object.values(l),u=e.applyWithChunking(Math.max,c)-1,d=2*u+1;i.graph().nestingRoot=s,i.edges().forEach(h=>i.edge(h).minlen*=d);let f=o(i)+1;i.children().forEach(h=>n(i,s,d,f,u,l,h)),i.graph().nodeRankFactor=d}function n(i,s,l,c,u,d,f){let h=i.children(f);if(!h.length){f!==s&&i.setEdge(s,f,{weight:0,minlen:l});return}let m=e.addBorderNode(i,"_bt"),y=e.addBorderNode(i,"_bb"),g=i.node(f);i.setParent(m,f),g.borderTop=m,i.setParent(y,f),g.borderBottom=y,h.forEach(E=>{n(i,s,l,c,u,d,E);let w=i.node(E),v=w.borderTop?w.borderTop:E,x=w.borderBottom?w.borderBottom:E,z=w.borderTop?c:2*c,B=v!==x?1:u-d[f]+1;i.setEdge(m,v,{weight:z,minlen:B,nestingEdge:!0}),i.setEdge(x,y,{weight:z,minlen:B,nestingEdge:!0})}),i.parent(f)||i.setEdge(s,m,{weight:0,minlen:u+d[f]})}function r(i){var s={};function l(c,u){var d=i.children(c);d&&d.length&&d.forEach(f=>l(f,u+1)),s[c]=u}return i.children().forEach(c=>l(c,1)),s}function o(i){return i.edges().reduce((s,l)=>s+i.edge(l).weight,0)}function a(i){var s=i.graph();i.removeNode(s.nestingRoot),delete s.nestingRoot,i.edges().forEach(l=>{var c=i.edge(l);c.nestingEdge&&i.removeEdge(l)})}return sr}var lr,ws;function nv(){if(ws)return lr;ws=1;let e=Ie();lr=t;function t(r){function o(a){let i=r.children(a),s=r.node(a);if(i.length&&i.forEach(o),Object.hasOwn(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(let l=s.minRank,c=s.maxRank+1;l<c;++l)n(r,"borderLeft","_bl",a,s,l),n(r,"borderRight","_br",a,s,l)}}r.children().forEach(o)}function n(r,o,a,i,s,l){let c={width:0,height:0,rank:l,borderType:o},u=s[o][l-1],d=e.addDummyNode(r,"border",c,a);s[o][l]=d,r.setParent(d,i),u&&r.setEdge(u,d,{weight:1})}return lr}var ur,bs;function ov(){if(bs)return ur;bs=1,ur={adjust:e,undo:t};function e(l){let c=l.graph().rankdir.toLowerCase();(c==="lr"||c==="rl")&&n(l)}function t(l){let c=l.graph().rankdir.toLowerCase();(c==="bt"||c==="rl")&&o(l),(c==="lr"||c==="rl")&&(i(l),n(l))}function n(l){l.nodes().forEach(c=>r(l.node(c))),l.edges().forEach(c=>r(l.edge(c)))}function r(l){let c=l.width;l.width=l.height,l.height=c}function o(l){l.nodes().forEach(c=>a(l.node(c))),l.edges().forEach(c=>{let u=l.edge(c);u.points.forEach(a),Object.hasOwn(u,"y")&&a(u)})}function a(l){l.y=-l.y}function i(l){l.nodes().forEach(c=>s(l.node(c))),l.edges().forEach(c=>{let u=l.edge(c);u.points.forEach(s),Object.hasOwn(u,"x")&&s(u)})}function s(l){let c=l.x;l.x=l.y,l.y=c}return ur}var cr,xs;function rv(){if(xs)return cr;xs=1;let e=Ie();cr=t;function t(n){let r={},o=n.nodes().filter(u=>!n.children(u).length),a=o.map(u=>n.node(u).rank),i=e.applyWithChunking(Math.max,a),s=e.range(i+1).map(()=>[]);function l(u){if(r[u])return;r[u]=!0;let d=n.node(u);s[d.rank].push(u),n.successors(u).forEach(l)}return o.sort((u,d)=>n.node(u).rank-n.node(d).rank).forEach(l),s}return cr}var dr,Es;function iv(){if(Es)return dr;Es=1;let e=Ie().zipObject;dr=t;function t(r,o){let a=0;for(let i=1;i<o.length;++i)a+=n(r,o[i-1],o[i]);return a}function n(r,o,a){let i=e(a,a.map((f,h)=>h)),s=o.flatMap(f=>r.outEdges(f).map(h=>({pos:i[h.w],weight:r.edge(h).weight})).sort((h,m)=>h.pos-m.pos)),l=1;for(;l<a.length;)l<<=1;let c=2*l-1;l-=1;let u=new Array(c).fill(0),d=0;return s.forEach(f=>{let h=f.pos+l;u[h]+=f.weight;let m=0;for(;h>0;)h%2&&(m+=u[h+1]),h=h-1>>1,u[h]+=f.weight;d+=f.weight*m}),d}return dr}var fr,Ns;function av(){if(Ns)return fr;Ns=1,fr=e;function e(t,n=[]){return n.map(r=>{let o=t.inEdges(r);if(o.length){let a=o.reduce((i,s)=>{let l=t.edge(s),c=t.node(s.v);return{sum:i.sum+l.weight*c.order,weight:i.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}return fr}var hr,Ss;function sv(){if(Ss)return hr;Ss=1;let e=Ie();hr=t;function t(o,a){let i={};o.forEach((l,c)=>{let u=i[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:c};l.barycenter!==void 0&&(u.barycenter=l.barycenter,u.weight=l.weight)}),a.edges().forEach(l=>{let c=i[l.v],u=i[l.w];c!==void 0&&u!==void 0&&(u.indegree++,c.out.push(i[l.w]))});let s=Object.values(i).filter(l=>!l.indegree);return n(s)}function n(o){let a=[];function i(l){return c=>{c.merged||(c.barycenter===void 0||l.barycenter===void 0||c.barycenter>=l.barycenter)&&r(l,c)}}function s(l){return c=>{c.in.push(l),--c.indegree===0&&o.push(c)}}for(;o.length;){let l=o.pop();a.push(l),l.in.reverse().forEach(i(l)),l.out.forEach(s(l))}return a.filter(l=>!l.merged).map(l=>e.pick(l,["vs","i","barycenter","weight"]))}function r(o,a){let i=0,s=0;o.weight&&(i+=o.barycenter*o.weight,s+=o.weight),a.weight&&(i+=a.barycenter*a.weight,s+=a.weight),o.vs=a.vs.concat(o.vs),o.barycenter=i/s,o.weight=s,o.i=Math.min(a.i,o.i),a.merged=!0}return hr}var pr,ks;function lv(){if(ks)return pr;ks=1;let e=Ie();pr=t;function t(o,a){let i=e.partition(o,m=>Object.hasOwn(m,"barycenter")),s=i.lhs,l=i.rhs.sort((m,y)=>y.i-m.i),c=[],u=0,d=0,f=0;s.sort(r(!!a)),f=n(c,l,f),s.forEach(m=>{f+=m.vs.length,c.push(m.vs),u+=m.barycenter*m.weight,d+=m.weight,f=n(c,l,f)});let h={vs:c.flat(!0)};return d&&(h.barycenter=u/d,h.weight=d),h}function n(o,a,i){let s;for(;a.length&&(s=a[a.length-1]).i<=i;)a.pop(),o.push(s.vs),i++;return i}function r(o){return(a,i)=>a.barycenter<i.barycenter?-1:a.barycenter>i.barycenter?1:o?i.i-a.i:a.i-i.i}return pr}var vr,Cs;function uv(){if(Cs)return vr;Cs=1;let e=av(),t=sv(),n=lv();vr=r;function r(i,s,l,c){let u=i.children(s),d=i.node(s),f=d?d.borderLeft:void 0,h=d?d.borderRight:void 0,m={};f&&(u=u.filter(w=>w!==f&&w!==h));let y=e(i,u);y.forEach(w=>{if(i.children(w.v).length){let v=r(i,w.v,l,c);m[w.v]=v,Object.hasOwn(v,"barycenter")&&a(w,v)}});let g=t(y,l);o(g,m);let E=n(g,c);if(f&&(E.vs=[f,E.vs,h].flat(!0),i.predecessors(f).length)){let w=i.node(i.predecessors(f)[0]),v=i.node(i.predecessors(h)[0]);Object.hasOwn(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+w.order+v.order)/(E.weight+2),E.weight+=2}return E}function o(i,s){i.forEach(l=>{l.vs=l.vs.flatMap(c=>s[c]?s[c].vs:c)})}function a(i,s){i.barycenter!==void 0?(i.barycenter=(i.barycenter*i.weight+s.barycenter*s.weight)/(i.weight+s.weight),i.weight+=s.weight):(i.barycenter=s.barycenter,i.weight=s.weight)}return vr}var gr,$s;function cv(){if($s)return gr;$s=1;let e=Ge().Graph,t=Ie();gr=n;function n(o,a,i){let s=r(o),l=new e({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(c=>o.node(c));return o.nodes().forEach(c=>{let u=o.node(c),d=o.parent(c);(u.rank===a||u.minRank<=a&&a<=u.maxRank)&&(l.setNode(c),l.setParent(c,d||s),o[i](c).forEach(f=>{let h=f.v===c?f.w:f.v,m=l.edge(h,c),y=m!==void 0?m.weight:0;l.setEdge(h,c,{weight:o.edge(f).weight+y})}),Object.hasOwn(u,"minRank")&&l.setNode(c,{borderLeft:u.borderLeft[a],borderRight:u.borderRight[a]}))}),l}function r(o){for(var a;o.hasNode(a=t.uniqueId("_root")););return a}return gr}var mr,Is;function dv(){if(Is)return mr;Is=1,mr=e;function e(t,n,r){let o={},a;r.forEach(i=>{let s=t.parent(i),l,c;for(;s;){if(l=t.parent(s),l?(c=o[l],o[l]=s):(c=a,a=s),c&&c!==s){n.setEdge(c,s);return}s=l}})}return mr}var _r,Ms;function fv(){if(Ms)return _r;Ms=1;let e=rv(),t=iv(),n=uv(),r=cv(),o=dv(),a=Ge().Graph,i=Ie();_r=s;function s(d,f){if(f&&typeof f.customOrder=="function"){f.customOrder(d,s);return}let h=i.maxRank(d),m=l(d,i.range(1,h+1),"inEdges"),y=l(d,i.range(h-1,-1,-1),"outEdges"),g=e(d);if(u(d,g),f&&f.disableOptimalOrderHeuristic)return;let E=Number.POSITIVE_INFINITY,w;for(let v=0,x=0;x<4;++v,++x){c(v%2?m:y,v%4>=2),g=i.buildLayerMatrix(d);let z=t(d,g);z<E&&(x=0,w=Object.assign({},g),E=z)}u(d,w)}function l(d,f,h){return f.map(function(m){return r(d,m,h)})}function c(d,f){let h=new a;d.forEach(function(m){let y=m.graph().root,g=n(m,y,h,f);g.vs.forEach((E,w)=>m.node(E).order=w),o(m,h,g.vs)})}function u(d,f){Object.values(f).forEach(h=>h.forEach((m,y)=>d.node(m).order=y))}return _r}var yr,Ds;function hv(){if(Ds)return yr;Ds=1;let e=Ge().Graph,t=Ie();yr={positionX:h,findType1Conflicts:n,findType2Conflicts:r,addConflict:a,hasConflict:i,verticalAlignment:s,horizontalCompaction:l,alignCoordinates:d,findSmallestWidthAlignment:u,balance:f};function n(g,E){let w={};function v(x,z){let B=0,$=0,b=x.length,I=z[z.length-1];return z.forEach((T,k)=>{let p=o(g,T),V=p?g.node(p).order:b;(p||T===I)&&(z.slice($,k+1).forEach(_=>{g.predecessors(_).forEach(O=>{let M=g.node(O),L=M.order;(L<B||V<L)&&!(M.dummy&&g.node(_).dummy)&&a(w,O,_)})}),$=k+1,B=V)}),z}return E.length&&E.reduce(v),w}function r(g,E){let w={};function v(z,B,$,b,I){let T;t.range(B,$).forEach(k=>{T=z[k],g.node(T).dummy&&g.predecessors(T).forEach(p=>{let V=g.node(p);V.dummy&&(V.order<b||V.order>I)&&a(w,p,T)})})}function x(z,B){let $=-1,b,I=0;return B.forEach((T,k)=>{if(g.node(T).dummy==="border"){let p=g.predecessors(T);p.length&&(b=g.node(p[0]).order,v(B,I,k,$,b),I=k,$=b)}v(B,I,B.length,b,z.length)}),B}return E.length&&E.reduce(x),w}function o(g,E){if(g.node(E).dummy)return g.predecessors(E).find(w=>g.node(w).dummy)}function a(g,E,w){if(E>w){let x=E;E=w,w=x}let v=g[E];v||(g[E]=v={}),v[w]=!0}function i(g,E,w){if(E>w){let v=E;E=w,w=v}return!!g[E]&&Object.hasOwn(g[E],w)}function s(g,E,w,v){let x={},z={},B={};return E.forEach($=>{$.forEach((b,I)=>{x[b]=b,z[b]=b,B[b]=I})}),E.forEach($=>{let b=-1;$.forEach(I=>{let T=v(I);if(T.length){T=T.sort((p,V)=>B[p]-B[V]);let k=(T.length-1)/2;for(let p=Math.floor(k),V=Math.ceil(k);p<=V;++p){let _=T[p];z[I]===I&&b<B[_]&&!i(w,I,_)&&(z[_]=I,z[I]=x[I]=x[_],b=B[_])}}})}),{root:x,align:z}}function l(g,E,w,v,x){let z={},B=c(g,E,w,x),$=x?"borderLeft":"borderRight";function b(k,p){let V=B.nodes(),_=V.pop(),O={};for(;_;)O[_]?k(_):(O[_]=!0,V.push(_),V=V.concat(p(_))),_=V.pop()}function I(k){z[k]=B.inEdges(k).reduce((p,V)=>Math.max(p,z[V.v]+B.edge(V)),0)}function T(k){let p=B.outEdges(k).reduce((_,O)=>Math.min(_,z[O.w]-B.edge(O)),Number.POSITIVE_INFINITY),V=g.node(k);p!==Number.POSITIVE_INFINITY&&V.borderType!==$&&(z[k]=Math.max(z[k],p))}return b(I,B.predecessors.bind(B)),b(T,B.successors.bind(B)),Object.keys(v).forEach(k=>z[k]=z[w[k]]),z}function c(g,E,w,v){let x=new e,z=g.graph(),B=m(z.nodesep,z.edgesep,v);return E.forEach($=>{let b;$.forEach(I=>{let T=w[I];if(x.setNode(T),b){var k=w[b],p=x.edge(k,T);x.setEdge(k,T,Math.max(B(g,I,b),p||0))}b=I})}),x}function u(g,E){return Object.values(E).reduce((w,v)=>{let x=Number.NEGATIVE_INFINITY,z=Number.POSITIVE_INFINITY;Object.entries(v).forEach(([$,b])=>{let I=y(g,$)/2;x=Math.max(b+I,x),z=Math.min(b-I,z)});const B=x-z;return B<w[0]&&(w=[B,v]),w},[Number.POSITIVE_INFINITY,null])[1]}function d(g,E){let w=Object.values(E),v=t.applyWithChunking(Math.min,w),x=t.applyWithChunking(Math.max,w);["u","d"].forEach(z=>{["l","r"].forEach(B=>{let $=z+B,b=g[$];if(b===E)return;let I=Object.values(b),T=v-t.applyWithChunking(Math.min,I);B!=="l"&&(T=x-t.applyWithChunking(Math.max,I)),T&&(g[$]=t.mapValues(b,k=>k+T))})})}function f(g,E){return t.mapValues(g.ul,(w,v)=>{if(E)return g[E.toLowerCase()][v];{let x=Object.values(g).map(z=>z[v]).sort((z,B)=>z-B);return(x[1]+x[2])/2}})}function h(g){let E=t.buildLayerMatrix(g),w=Object.assign(n(g,E),r(g,E)),v={},x;["u","d"].forEach(B=>{x=B==="u"?E:Object.values(E).reverse(),["l","r"].forEach($=>{$==="r"&&(x=x.map(k=>Object.values(k).reverse()));let b=(B==="u"?g.predecessors:g.successors).bind(g),I=s(g,x,w,b),T=l(g,x,I.root,I.align,$==="r");$==="r"&&(T=t.mapValues(T,k=>-k)),v[B+$]=T})});let z=u(g,v);return d(v,z),f(v,g.graph().align)}function m(g,E,w){return(v,x,z)=>{let B=v.node(x),$=v.node(z),b=0,I;if(b+=B.width/2,Object.hasOwn(B,"labelpos"))switch(B.labelpos.toLowerCase()){case"l":I=-B.width/2;break;case"r":I=B.width/2;break}if(I&&(b+=w?I:-I),I=0,b+=(B.dummy?E:g)/2,b+=($.dummy?E:g)/2,b+=$.width/2,Object.hasOwn($,"labelpos"))switch($.labelpos.toLowerCase()){case"l":I=$.width/2;break;case"r":I=-$.width/2;break}return I&&(b+=w?I:-I),I=0,b}}function y(g,E){return g.node(E).width}return yr}var wr,Os;function pv(){if(Os)return wr;Os=1;let e=Ie(),t=hv().positionX;wr=n;function n(o){o=e.asNonCompoundGraph(o),r(o),Object.entries(t(o)).forEach(([a,i])=>o.node(a).x=i)}function r(o){let a=e.buildLayerMatrix(o),i=o.graph().ranksep,s=0;a.forEach(l=>{const c=l.reduce((u,d)=>{const f=o.node(d).height;return u>f?u:f},0);l.forEach(u=>o.node(u).y=s+c/2),s+=c+i})}return wr}var br,Ts;function vv(){if(Ts)return br;Ts=1;let e=Zp(),t=Kp(),n=Jp(),r=Ie().normalizeRanks,o=ev(),a=Ie().removeEmptyRanks,i=tv(),s=nv(),l=ov(),c=fv(),u=pv(),d=Ie(),f=Ge().Graph;br=h;function h(P,A){let R=A&&A.debugTiming?d.time:d.notime;R("layout",()=>{let H=R(" buildLayoutGraph",()=>b(P));R(" runLayout",()=>m(H,R,A)),R(" updateInputGraph",()=>y(P,H))})}function m(P,A,R){A(" makeSpaceForEdgeLabels",()=>I(P)),A(" removeSelfEdges",()=>F(P)),A(" acyclic",()=>e.run(P)),A(" nestingGraph.run",()=>i.run(P)),A(" rank",()=>n(d.asNonCompoundGraph(P))),A(" injectEdgeLabelProxies",()=>T(P)),A(" removeEmptyRanks",()=>a(P)),A(" nestingGraph.cleanup",()=>i.cleanup(P)),A(" normalizeRanks",()=>r(P)),A(" assignRankMinMax",()=>k(P)),A(" removeEdgeLabelProxies",()=>p(P)),A(" normalize.run",()=>t.run(P)),A(" parentDummyChains",()=>o(P)),A(" addBorderSegments",()=>s(P)),A(" order",()=>c(P,R)),A(" insertSelfEdges",()=>q(P)),A(" adjustCoordinateSystem",()=>l.adjust(P)),A(" position",()=>u(P)),A(" positionSelfEdges",()=>Y(P)),A(" removeBorderNodes",()=>L(P)),A(" normalize.undo",()=>t.undo(P)),A(" fixupEdgeLabelCoords",()=>O(P)),A(" undoCoordinateSystem",()=>l.undo(P)),A(" translateGraph",()=>V(P)),A(" assignNodeIntersects",()=>_(P)),A(" reversePoints",()=>M(P)),A(" acyclic.undo",()=>e.undo(P))}function y(P,A){P.nodes().forEach(R=>{let H=P.node(R),X=A.node(R);H&&(H.x=X.x,H.y=X.y,H.rank=X.rank,A.children(R).length&&(H.width=X.width,H.height=X.height))}),P.edges().forEach(R=>{let H=P.edge(R),X=A.edge(R);H.points=X.points,Object.hasOwn(X,"x")&&(H.x=X.x,H.y=X.y)}),P.graph().width=A.graph().width,P.graph().height=A.graph().height}let g=["nodesep","edgesep","ranksep","marginx","marginy"],E={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],v=["width","height","rank"],x={width:0,height:0},z=["minlen","weight","width","height","labeloffset"],B={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$=["labelpos"];function b(P){let A=new f({multigraph:!0,compound:!0}),R=W(P.graph());return A.setGraph(Object.assign({},E,j(R,g),d.pick(R,w))),P.nodes().forEach(H=>{let X=W(P.node(H));const te=j(X,v);Object.keys(x).forEach(ne=>{te[ne]===void 0&&(te[ne]=x[ne])}),A.setNode(H,te),A.setParent(H,P.parent(H))}),P.edges().forEach(H=>{let X=W(P.edge(H));A.setEdge(H,Object.assign({},B,j(X,z),d.pick(X,$)))}),A}function I(P){let A=P.graph();A.ranksep/=2,P.edges().forEach(R=>{let H=P.edge(R);H.minlen*=2,H.labelpos.toLowerCase()!=="c"&&(A.rankdir==="TB"||A.rankdir==="BT"?H.width+=H.labeloffset:H.height+=H.labeloffset)})}function T(P){P.edges().forEach(A=>{let R=P.edge(A);if(R.width&&R.height){let H=P.node(A.v),te={rank:(P.node(A.w).rank-H.rank)/2+H.rank,e:A};d.addDummyNode(P,"edge-proxy",te,"_ep")}})}function k(P){let A=0;P.nodes().forEach(R=>{let H=P.node(R);H.borderTop&&(H.minRank=P.node(H.borderTop).rank,H.maxRank=P.node(H.borderBottom).rank,A=Math.max(A,H.maxRank))}),P.graph().maxRank=A}function p(P){P.nodes().forEach(A=>{let R=P.node(A);R.dummy==="edge-proxy"&&(P.edge(R.e).labelRank=R.rank,P.removeNode(A))})}function V(P){let A=Number.POSITIVE_INFINITY,R=0,H=Number.POSITIVE_INFINITY,X=0,te=P.graph(),ne=te.marginx||0,ce=te.marginy||0;function be(ie){let le=ie.x,S=ie.y,N=ie.width,D=ie.height;A=Math.min(A,le-N/2),R=Math.max(R,le+N/2),H=Math.min(H,S-D/2),X=Math.max(X,S+D/2)}P.nodes().forEach(ie=>be(P.node(ie))),P.edges().forEach(ie=>{let le=P.edge(ie);Object.hasOwn(le,"x")&&be(le)}),A-=ne,H-=ce,P.nodes().forEach(ie=>{let le=P.node(ie);le.x-=A,le.y-=H}),P.edges().forEach(ie=>{let le=P.edge(ie);le.points.forEach(S=>{S.x-=A,S.y-=H}),Object.hasOwn(le,"x")&&(le.x-=A),Object.hasOwn(le,"y")&&(le.y-=H)}),te.width=R-A+ne,te.height=X-H+ce}function _(P){P.edges().forEach(A=>{let R=P.edge(A),H=P.node(A.v),X=P.node(A.w),te,ne;R.points?(te=R.points[0],ne=R.points[R.points.length-1]):(R.points=[],te=X,ne=H),R.points.unshift(d.intersectRect(H,te)),R.points.push(d.intersectRect(X,ne))})}function O(P){P.edges().forEach(A=>{let R=P.edge(A);if(Object.hasOwn(R,"x"))switch((R.labelpos==="l"||R.labelpos==="r")&&(R.width-=R.labeloffset),R.labelpos){case"l":R.x-=R.width/2+R.labeloffset;break;case"r":R.x+=R.width/2+R.labeloffset;break}})}function M(P){P.edges().forEach(A=>{let R=P.edge(A);R.reversed&&R.points.reverse()})}function L(P){P.nodes().forEach(A=>{if(P.children(A).length){let R=P.node(A),H=P.node(R.borderTop),X=P.node(R.borderBottom),te=P.node(R.borderLeft[R.borderLeft.length-1]),ne=P.node(R.borderRight[R.borderRight.length-1]);R.width=Math.abs(ne.x-te.x),R.height=Math.abs(X.y-H.y),R.x=te.x+R.width/2,R.y=H.y+R.height/2}}),P.nodes().forEach(A=>{P.node(A).dummy==="border"&&P.removeNode(A)})}function F(P){P.edges().forEach(A=>{if(A.v===A.w){var R=P.node(A.v);R.selfEdges||(R.selfEdges=[]),R.selfEdges.push({e:A,label:P.edge(A)}),P.removeEdge(A)}})}function q(P){var A=d.buildLayerMatrix(P);A.forEach(R=>{var H=0;R.forEach((X,te)=>{var ne=P.node(X);ne.order=te+H,(ne.selfEdges||[]).forEach(ce=>{d.addDummyNode(P,"selfedge",{width:ce.label.width,height:ce.label.height,rank:ne.rank,order:te+ ++H,e:ce.e,label:ce.label},"_se")}),delete ne.selfEdges})})}function Y(P){P.nodes().forEach(A=>{var R=P.node(A);if(R.dummy==="selfedge"){var H=P.node(R.e.v),X=H.x+H.width/2,te=H.y,ne=R.x-X,ce=H.height/2;P.setEdge(R.e,R.label),P.removeNode(A),R.label.points=[{x:X+2*ne/3,y:te-ce},{x:X+5*ne/6,y:te-ce},{x:X+ne,y:te},{x:X+5*ne/6,y:te+ce},{x:X+2*ne/3,y:te+ce}],R.label.x=R.x,R.label.y=R.y}})}function j(P,A){return d.mapValues(d.pick(P,A),Number)}function W(P){var A={};return P&&Object.entries(P).forEach(([R,H])=>{typeof R=="string"&&(R=R.toLowerCase()),A[R]=H}),A}return br}var xr,Ps;function gv(){if(Ps)return xr;Ps=1;let e=Ie(),t=Ge().Graph;xr={debugOrdering:n};function n(r){let o=e.buildLayerMatrix(r),a=new t({compound:!0,multigraph:!0}).setGraph({});return r.nodes().forEach(i=>{a.setNode(i,{label:i}),a.setParent(i,"layer"+r.node(i).rank)}),r.edges().forEach(i=>a.setEdge(i.v,i.w,{},i.name)),o.forEach((i,s)=>{let l="layer"+s;a.setNode(l,{rank:"same"}),i.reduce((c,u)=>(a.setEdge(c,u,{style:"invis"}),u))}),a}return xr}var Er,As;function mv(){return As||(As=1,Er="1.1.5"),Er}var Nr,Rs;function _v(){return Rs||(Rs=1,Nr={graphlib:Ge(),layout:vv(),debug:gv(),util:{time:Ie().time,notime:Ie().notime},version:mv()}),Nr}var yv=_v();const Sr=Ap(yv);function wv(){const{findNode:e}=Ne(),t=me(new Sr.graphlib.Graph),n=me("LR");function r(o,a,i){const s=new Sr.graphlib.Graph;t.value=s,s.setDefaultEdgeLabel(()=>({}));const l=i==="LR";s.setGraph({rankdir:i}),n.value=i;for(const c of o){const u=e(c.id);s.setNode(c.id,{width:u.dimensions.width,height:u.dimensions.height})}for(const c of a)s.setEdge(c.source,c.target);return s.graph().ranksep=200,Sr.layout(s),o.map(c=>{const u=s.node(c.id);return c.type=="cosmos"||c.type=="interface"||c.type=="router"||c.type=="target"?{...c,targetPosition:l?K.Left:K.Top,sourcePosition:l?K.Right:K.Bottom,position:{x:u.x,y:u.y}}:c})}return{graph:t,layout:r,previousDirection:n}}const bv={class:"interface-flow-chart"},xv={key:1,class:"empty-state"},og=ft("_",{__name:"InterfaceFlowChart",props:["interfaceDetails","routerDetails"],setup(e){const{layout:t}=wv(),{onConnect:n,addEdges:r,onNodesChange:o,applyNodeChanges:a,onEdgesChange:i,applyEdgeChanges:s,fitView:l}=Ne(),c=rt("dialog"),u=new Lr,d=e,f=me([]),h=me([]);let m=!1;async function y($,b=!1){(m||b)&&(f.value=t(f.value,h.value,$),m=!1,Ae(()=>{l()}))}n($=>{let b=$.source.startsWith("interface__"),I=$.target.startsWith("interface__"),T=$.source.startsWith("router__"),k=$.target.startsWith("router__"),p=$.source.startsWith("cosmos__"),V=$.target.startsWith("cosmos__"),_=$.source.startsWith("target__"),O=$.target.startsWith("target__"),M=$.sourceHandle.split("__")[1],L=$.targetHandle.split("__")[1];if(M!==L||b&&I||T&&k||T&&I||b&&k||p&&V||_&&O||p&&O||_&&V)return;let F="";p&&(F=F+`cosmos__${$.source.split("__")[1]}`),V&&(F=F+`cosmos__${$.target.split("__")[1]}`),F.length==0&&(b&&(F=F+`interface__${$.source.split("__")[1]}`),I&&(F=F+`interface__${$.target.split("__")[1]}`),T&&(F=F+`router__${$.source.split("__")[1]}`),k&&(F=F+`router__${$.target.split("__")[1]}`)),F.startsWith("cosmos__")&&(b&&(F=F+`__interface__${$.source.split("__")[1]}`),I&&(F=F+`__interface__${$.target.split("__")[1]}`),T&&(F=F+`__router__${$.source.split("__")[1]}`),k&&(F=F+`__router__${$.target.split("__")[1]}`)),_&&(F=F+`__target__${$.source.split("__")[1]}`),O&&(F=F+`__target__${$.target.split("__")[1]}`),F=F+`__${M}`,$.id=F;let q=!1;if(h.value.forEach(H=>{if(H.id===F){q=!0;return}}),q)return;let Y="",j="",W="",P=F.split("__"),A=P[0],R=P[4];A==="cosmos"?(j=P[1],Y=P[2],W=P[3],R=="cmd"?($.type="default",$.label="CMD Enable",$.markerStart={type:"arrowclosed"}):($.type="default",$.label="Tlm Enable",$.markerEnd={type:"arrowclosed"}),Y==="interface"?u.interface_target_enable(W,j,R==="cmd",R==="tlm").then(H=>{r($),h.value.push($)}):u.router_target_enable(W,j,R==="cmd",R==="tlm").then(H=>{r($),h.value.push($)})):(Y=P[0],W=P[1],j=P[3],R=="cmd"?($.type="default",$.label="CMD Map",$.markerStart={type:"arrowclosed"}):($.type="default",$.label="Tlm Map",$.markerEnd={type:"arrowclosed"}),Y==="interface"?c.confirm(`${$.label} target ${j} to interface ${W}? Note this will cause the interface to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{u.map_target_to_interface(j,W,R==="cmd",R==="tlm",!1).then(H=>{r($),h.value.push($)})}):c.confirm(`${$.label} target ${j} to router ${W}? Note this will cause the router to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{u.map_target_to_router(j,W,R==="cmd",R==="tlm",!1).then(H=>{r($),h.value.push($)})}))}),o(async $=>{const b=[];for(const I of $)I.type!=="remove"&&b.push(I),I.type==="dimensions"&&(m=!0,Ae(()=>{y("LR")}));a(b)}),i(async $=>{const b=[];for(const I of $)if(I.type!=="remove")b.push(I);else{let T="",k="",p="",V="",_="",O=I.id.split("__"),M=O[0],L=O[4];M==="cosmos"?(p=O[1],V=O[2],_=O[3],T=`Disable ${p} ${L} with ${V} ${_}?`,k="Disable"):(V=O[0],_=O[1],p=O[3],T=`Unmap ${p} ${L} with ${V} ${_}? Note this will cause the ${V} to restart.`,k="Unmap"),c.confirm(T,{okText:k,cancelText:"Cancel"}).then(()=>{M=="cosmos"?V=="interface"?u.interface_target_disable(_,p,L==="cmd",L==="tlm").then(F=>{s([I]),h.value.forEach((q,Y)=>{if(q.id===I.id){h.value.splice(Y,1);return}})}):u.router_target_disable(_,p,L==="cmd",L==="tlm").then(F=>{s([I]),h.value.forEach((q,Y)=>{if(q.id===I.id){h.value.splice(Y,1);return}})}):V=="interface"?u.unmap_target_from_interface(p,_,L==="cmd",L==="tlm").then(F=>{s([I]),h.value.forEach((q,Y)=>{if(q.id===I.id){h.value.splice(Y,1);return}})}):u.unmap_target_from_router(p,_,L==="cmd",L==="tlm").then(F=>{s([I]),h.value.forEach((q,Y)=>{if(q.id===I.id){h.value.splice(Y,1);return}})})})}s(b)});const g=me(!1),E=me(null),w=me(null),v=me(null),x=me(null);function z($){$.node.type==="interface"?(E.value="Interface",w.value=d.interfaceDetails[$.node.data.label],v.value=null,x.value=null,g.value=!0):$.node.type=="router"?(E.value="Router",w.value=d.routerDetails[$.node.data.label],v.value=null,x.value=null,g.value=!0):($.node.type==="read-protocol"||$.node.type=="write-protocol")&&($.node.data.interface?(E.value="Interface",w.value=d.interfaceDetails[$.node.data.interface]):(E.value="Router",w.value=d.routerDetails[$.node.data.router]),v.value=null,x.value=$.node.data.index,g.value=!0)}function B(){f.value=[],h.value=[];const $=[];let b=d.interfaceDetails||{};for(const p in b){(d.interfaceDetails[p].cmd_target_names||[]).forEach(O=>{$.includes(O)||$.push(O);const M={id:`interface__${p}__target__${O}__cmd`,source:`interface__${p}`,target:`target__${O}`,sourceHandle:"interface__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};h.value.push(M)});for(const[O,M]of Object.entries(d.interfaceDetails[p].cmd_target_enabled)){if(O==="UNKNOWN"||!M)continue;const L={id:`cosmos__${O}__interface__${p}__cmd`,target:`interface__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__cmd",targetHandle:"interface__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};h.value.push(L)}(d.interfaceDetails[p].tlm_target_names||[]).forEach(O=>{$.includes(O)||$.push(O);const M={id:`interface__${p}__target__${O}__tlm`,source:`interface__${p}`,target:`target__${O}`,sourceHandle:"interface__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};h.value.push(M)});for(const[O,M]of Object.entries(d.interfaceDetails[p].tlm_target_enabled)){if(O==="UNKNOWN"||!M)continue;const L={id:`cosmos__${O}__interface__${p}__tlm`,target:`interface__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__tlm",targetHandle:"interface__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};h.value.push(L)}}let I=d.routerDetails||{};for(const p in I){(d.routerDetails[p].cmd_target_names||[]).forEach(O=>{$.includes(O)||$.push(O);const M={id:`router__${p}__target__${O}__cmd`,source:`router__${p}`,target:`target__${O}`,sourceHandle:"router__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};h.value.push(M)});for(const[O,M]of Object.entries(d.routerDetails[p].cmd_target_enabled)){if(O==="UNKNOWN"||!M)continue;const L={id:`cosmos__${O}__router__${p}__cmd`,target:`router__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__cmd",targetHandle:"router__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};h.value.push(L)}(d.routerDetails[p].tlm_target_names||[]).forEach(O=>{$.includes(O)||$.push(O);const M={id:`router__${p}__target__${O}__tlm`,source:`router__${p}`,target:`target__${O}`,sourceHandle:"router__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};h.value.push(M)});for(const[O,M]of Object.entries(d.routerDetails[p].tlm_target_enabled)){if(O==="UNKNOWN"||!M)continue;const L={id:`cosmos__${O}__router__${p}__tlm`,target:`router__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__tlm",targetHandle:"router__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};h.value.push(L)}}$.forEach((p,V)=>{let _,O;_=0,O=V*250;const M={id:`cosmos__${p}`,type:"cosmos",position:{x:_,y:O},data:{label:p},draggable:!0};f.value.push(M)});let T=0,k=200;for(const p in b){let V=d.interfaceDetails[p].write_protocols||[],_=d.interfaceDetails[p].read_protocols||[];const O=Math.max(V.length,_.length,1),M=Math.max(200,80+O*70);M>k&&(k=M);const L=200,F={id:`interface__${p}`,type:"interface",position:{x:400,y:(L+50)*T},data:{label:p,width:M,height:L},draggable:!0};f.value.push(F),T+=1;const q=50;V.forEach((Y,j)=>{let W=Y.name;Y.name.slice(-8)==="Protocol"&&(W=Y.name.slice(0,-8));const P={id:`write-protocol__interface__${p}__${j}`,type:"write-protocol",position:{x:q+j*70,y:98},data:{index:j,interface:p,label:W},draggable:!1,parentNode:`interface__${p}`,extent:"parent"};f.value.push(P)}),_.forEach((Y,j)=>{let W=Y.name;Y.name.slice(-8)==="Protocol"&&(W=Y.name.slice(0,-8));const P={id:`read-protocol__interface__${p}__${j}`,type:"read-protocol",position:{x:q+j*70,y:148},data:{index:j,interface:p,label:W},draggable:!1,parentNode:`interface__${p}`,extent:"parent"};f.value.push(P)})}for(const p in I){let V=d.routerDetails[p].write_protocols||[],_=d.routerDetails[p].read_protocols||[];const O=Math.max(V.length,_.length,1),M=Math.max(200,80+O*70);M>k&&(k=M);const L=200,F={id:`router__${p}`,type:"router",position:{x:400,y:(L+50)*T},data:{label:p,width:M,height:L},draggable:!0};f.value.push(F),T+=1;const q=50;V.forEach((Y,j)=>{let W=Y.name;Y.name.slice(-8)==="Protocol"&&(W=Y.name.slice(0,-8));const P={id:`write-protocol__router__${p}__${j}`,type:"write-protocol",position:{x:q+j*70,y:98},data:{index:j,router:p,label:W},draggable:!1,parentNode:`router__${p}`,extent:"parent"};f.value.push(P)}),_.forEach((Y,j)=>{let W=Y.name;Y.name.slice(-8)==="Protocol"&&(W=Y.name.slice(0,-8));const P={id:`read-protocol__router__${p}__${j}`,type:"read-protocol",position:{x:q+j*70,y:148},data:{index:j,router:p,label:W},draggable:!1,parentNode:`router__${p}`,extent:"parent"};f.value.push(P)})}$.forEach((p,V)=>{let _,O;_=400+k+200,O=V*250;const M={id:`target__${p}`,type:"target",position:{x:_,y:O},data:{label:p},draggable:!0};f.value.push(M)}),m=!0}return ye(()=>d.interfaceDetails,async()=>{d.interfaceDetails!==null&&(B(),Ae(()=>{y("LR")}))},{immediate:!0}),ye(()=>d.routerDetails,async()=>{d.routerDetails!==null&&(B(),Ae(()=>{y("LR")}))},{immediate:!0}),($,b)=>{const I=Se("v-icon"),T=Se("v-dialog");return oe(),de("div",bv,[f.value.length>0?(oe(),Oe(Z(xh),{key:0,nodes:f.value,edges:h.value,"max-zoom":4,"min-zoom":.01,class:"vue-flow-container","elevate-edges-on-select":"","apply-default":!1,onNodeClick:z},{"node-interface":ge(({data:k})=>[se(cp,{data:k},null,8,["data"])]),"node-router":ge(({data:k})=>[se(pp,{data:k},null,8,["data"])]),"node-target":ge(({data:k})=>[se(Np,{data:k},null,8,["data"])]),"node-cosmos":ge(k=>[se(yp,Rr(zr(k)),null,16)]),"node-write-protocol":ge(({data:k})=>[se(Ip,{data:k},null,8,["data"])]),"node-read-protocol":ge(({data:k})=>[se(Pp,{data:k},null,8,["data"])]),default:ge(()=>[se(Z(ep),{"pattern-color":"#aaa",gap:16}),se(Z(Xh),null,{default:ge(()=>[se(Z(nn),{title:"Reset",onClick:b[0]||(b[0]=k=>y("LR",!0))},{default:ge(()=>[...b[3]||(b[3]=[ue("svg",{width:"16",height:"16",viewBox:"0 0 32 32"},[ue("path",{d:"M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10Z"})],-1)])]),_:1})]),_:1})]),_:1},8,["nodes","edges"])):(oe(),de("div",xv,[se(I,{large:"",color:"grey"},{default:ge(()=>[...b[4]||(b[4]=[Ye("mdi-lan-disconnect",-1)])]),_:1}),b[5]||(b[5]=ue("div",{class:"text-grey mt-2"},"Nothing to show",-1))])),se(T,{modelValue:g.value,"onUpdate:modelValue":b[2]||(b[2]=k=>g.value=k),"max-width":"80vw","max-height":"80vh"},{default:ge(()=>[se(ap,{mode:E.value,details:w.value,"read-protocol-index":x.value,"write-protocol-index":v.value,onClose:b[1]||(b[1]=k=>g.value=!1)},null,8,["mode","details","read-protocol-index","write-protocol-index"])]),_:1},8,["modelValue"])])}}})}}});
|