n8n-editor-ui 1.76.0 → 1.77.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-Bk0ZjgAz.js → AnnotationTagsDropdown.ee.vue_vue_type_script_setup_true_lang-C9LVFaJT.js} +1 -1
- package/dist/assets/{AuthView-CQW1x21E.js → AuthView-C383xWYW.js} +2 -2
- package/dist/assets/{CanvasChat-DuJwpZew.js → CanvasChat-BGlghV3T.js} +13 -19
- package/dist/assets/{CanvasControls-Br7x0c2w.js → CanvasControls-Crujpx17.js} +1 -1
- package/dist/assets/{ChangePasswordView-Ck-5oU_m.js → ChangePasswordView-DXzIgEaK.js} +3 -3
- package/dist/assets/CollectionParameter-C_1RVSJv.js +4 -0
- package/dist/assets/{ConcurrentExecutionsHeader-Dfi130Qe.js → ConcurrentExecutionsHeader-D9E-tPI2.js} +2 -2
- package/dist/assets/{CredentialsView-D44diL3J.js → CredentialsView-Db-yh1UW.js} +4 -4
- package/dist/assets/{ErrorView-ub9nQRXV.js → ErrorView-DVEUcXeM.js} +1 -1
- package/dist/assets/{ExecutionsView-DsAXYzOp.js → ExecutionsView-CqcJ1jBb.js} +5 -5
- package/dist/assets/{FileSaver.min-nbqT44De.js → FileSaver.min-DRMcruyG.js} +1 -1
- package/dist/assets/{FixedCollectionParameter-DvdC-9QQ.css → FixedCollectionParameter-BReT5syB.css} +18 -18
- package/dist/assets/{FixedCollectionParameter-DwiBHQQW.js → FixedCollectionParameter-rnJQitY7.js} +27 -3
- package/dist/assets/{ForgotMyPasswordView-CH0wwots.js → ForgotMyPasswordView-CCuBQ23v.js} +3 -3
- package/dist/assets/{Logo-CIYEwVrA.js → Logo-vj6e7OLa.js} +1 -1
- package/dist/assets/{MainHeader-CN6RTCuC.js → MainHeader-Bz40v4tX.js} +9 -9
- package/dist/assets/{MainSidebar-ih4BlE0n.js → MainSidebar-7b7uQIcC.js} +37 -3
- package/dist/assets/{NodeCreation-DQUKwvhM.js → NodeCreation-KBmCqr6_.js} +4 -4
- package/dist/assets/{NodeCreator-B1R35yuN.js → NodeCreator-DTMPwVj5.js} +4 -5
- package/dist/assets/{NodeViewSwitcher-aJwrKS8o.css → NodeViewSwitcher-DApULbEt.css} +15 -18
- package/dist/assets/{NodeViewSwitcher-TsFkW80s.js → NodeViewSwitcher-O6VqzxIl.js} +97 -57
- package/dist/assets/{ProjectCardBadge-BcCHZFJ2.js → ProjectCardBadge-OKM1Xgdw.js} +1 -1
- package/dist/assets/{ProjectHeader-CSOMgkVs.js → ProjectHeader-6S5uaHXh.js} +1 -1
- package/dist/assets/{ProjectSettings-DtqNq5WU.js → ProjectSettings-BnHtiDEV.js} +2 -2
- package/dist/assets/{PushConnectionTracker.vue_vue_type_script_setup_true_lang-CZIKiOsY.js → PushConnectionTracker.vue_vue_type_script_setup_true_lang-IciN-pmV.js} +1 -1
- package/dist/assets/{ResourcesListLayout-CvkkebAN.js → ResourcesListLayout-D4r1wqjJ.js} +1 -1
- package/dist/assets/{RunDataJson-DA1LNZGU.js → RunDataJson-wyo45w7C.js} +14 -15
- package/dist/assets/{RunDataJsonActions-DZzYHsR7.js → RunDataJsonActions-D46WL4YN.js} +2 -2
- package/dist/assets/{RunDataSearch-D6-6kSmI.js → RunDataSearch-B3EyVssL.js} +1 -1
- package/dist/assets/{RunDataTable-bDBgkWN3.js → RunDataTable-DGMN5nF6.js} +18 -20
- package/dist/assets/{SamlOnboarding-ULq0l8s6.js → SamlOnboarding-CnXUkDfT.js} +3 -3
- package/dist/assets/{SettingsApiView-CVRk9yEi.js → SettingsApiView-EFylgnqH.js} +1 -1
- package/dist/assets/{SettingsCommunityNodesView-B6We65ta.js → SettingsCommunityNodesView-9KrggWFu.js} +4 -4
- package/dist/assets/{SettingsExternalSecrets-wrWe6ob7.js → SettingsExternalSecrets-DBPzjP3z.js} +1 -1
- package/dist/assets/{SettingsLdapView-CeKm7XML.js → SettingsLdapView-Bg2KWXN0.js} +1 -1
- package/dist/assets/{SettingsLogStreamingView-DxAoQ7dF.js → SettingsLogStreamingView-tgIsDBAk.js} +1 -1
- package/dist/assets/{SettingsPersonalView-DFcUFc08.js → SettingsPersonalView-CDJ8_Cuz.js} +1 -1
- package/dist/assets/{SettingsSourceControl-D9u9tDhF.js → SettingsSourceControl-ap8XMKcG.js} +1 -1
- package/dist/assets/{SettingsSso-gUSJtFP0.js → SettingsSso-B91oi5bN.js} +1 -1
- package/dist/assets/{SettingsUsageAndPlan-C4rSaxsT.js → SettingsUsageAndPlan-Bb6yK99X.js} +1 -1
- package/dist/assets/{SettingsUsersView-DSaFQg1K.js → SettingsUsersView-Ci2z6Jpz.js} +1 -1
- package/dist/assets/{SettingsView-BcBZpdTs.js → SettingsView-CStRsQ-w.js} +1 -1
- package/dist/assets/{SetupView-BnZ-D6Jy.js → SetupView-B5zAoB3c.js} +3 -3
- package/dist/assets/{SetupWorkflowCredentialsButton-B3DfAGgF.js → SetupWorkflowCredentialsButton-Cro6GHxL.js} +3 -2
- package/dist/assets/{SetupWorkflowFromTemplateView-DVLoF-kN.js → SetupWorkflowFromTemplateView-CcwL92Id.js} +3 -3
- package/dist/assets/{SigninView-BI4UTqFm.js → SigninView-DsPEhU2L.js} +3 -3
- package/dist/assets/{SignoutView-4KEfr3ze.js → SignoutView-BIckw4fs.js} +1 -1
- package/dist/assets/{SignupView-BdxSQxbe.js → SignupView-DdJWtYpI.js} +3 -3
- package/dist/assets/{TemplateDetails-BU5E9lAh.js → TemplateDetails-C41VgGvk.js} +1 -1
- package/dist/assets/{TemplateList-CSyTesvr.js → TemplateList-DkS7PdQW.js} +1 -1
- package/dist/assets/{TemplatesCollectionView-aqqEP8td.js → TemplatesCollectionView-BV7HXuai.js} +5 -5
- package/dist/assets/{TemplatesSearchView-BXQw_aAZ.js → TemplatesSearchView-BKY_Lw-C.js} +3 -3
- package/dist/assets/{TemplatesView-BbVjMkgy.js → TemplatesView-C312c1EZ.js} +1 -1
- package/dist/assets/{TemplatesWorkflowView-Cao3RpEd.js → TemplatesWorkflowView-BfzWwupR.js} +5 -5
- package/dist/assets/{TestDefinitionEditView-CgW-4tTx.js → TestDefinitionEditView-CwoHUF5w.js} +62 -12
- package/dist/assets/{TestDefinitionListView-D3eg62pM.js → TestDefinitionListView-2tWTEUz0.js} +1 -1
- package/dist/assets/{TestDefinitionRootView-DJdsaL4M.js → TestDefinitionRootView-gJRxCHz3.js} +1 -1
- package/dist/assets/{VariablesView-2TmNYpas.js → VariablesView-DqbIksP3.js} +2 -2
- package/dist/assets/{WorkerView-C3LhhFeZ.js → WorkerView-DSPfcsXN.js} +5 -5
- package/dist/assets/{WorkflowActivator-DiOQiQK2.js → WorkflowActivator-Bm8OihqN.js} +2 -2
- package/dist/assets/{WorkflowExecutionsInfoAccordion-BmMiVSHQ.js → WorkflowExecutionsInfoAccordion-B78-cQSW.js} +1 -1
- package/dist/assets/{WorkflowExecutionsLandingPage-CxbfP9Kf.js → WorkflowExecutionsLandingPage-C39BBF2o.js} +2 -2
- package/dist/assets/{WorkflowExecutionsPreview-Cku-ZBQ3.js → WorkflowExecutionsPreview-CdlK3mFb.js} +8 -7
- package/dist/assets/{WorkflowExecutionsView-C0CnXLDW.js → WorkflowExecutionsView-a-Pjy5V5.js} +5 -5
- package/dist/assets/{WorkflowHistory-Bg6AIKXX.js → WorkflowHistory-Bwqmh22i.js} +3 -3
- package/dist/assets/{WorkflowOnboardingView-LXWyp2is.js → WorkflowOnboardingView-CipWLUUf.js} +1 -31
- package/dist/assets/{WorkflowPreview-CsR9t5iY.js → WorkflowPreview-CAjmdxrY.js} +24 -6
- package/dist/assets/{WorkflowsView-DQJAEKqk.js → WorkflowsView-DP6J_TRf.js} +7 -7
- package/dist/assets/{easyAiWorkflowUtils-D3El0FyE.js → easyAiWorkflowUtils-BLdDr_bc.js} +1 -1
- package/dist/assets/{index-DsHZ4yOE.css → index-Bs_8II2j.css} +7 -7
- package/dist/assets/{index-DvkbRfZN.js → index-DablXALM.js} +231618 -231360
- package/dist/assets/{polyfills-DNwgos9f.js → polyfills-DfOJfMlf.js} +257 -847
- package/dist/assets/{pushConnection.store-5KniMGTZ.js → pushConnection.store-DmLr_C_P.js} +1 -1
- package/dist/assets/{templateActions-UGDN8R7F.js → templateActions--1waaCku.js} +1 -1
- package/dist/assets/{useBeforeUnload-BwgAu_Gm.js → useBeforeUnload-C9Q3IFHU.js} +1 -1
- package/dist/assets/{useCanvasOperations-Cw1yjntX.js → useCanvasOperations-CEPzjX8I.js} +554 -708
- package/dist/assets/{useCanvasOperations-Bjf582lB.css → useCanvasOperations-CEWecDkR.css} +4 -4
- package/dist/assets/{useExecutionDebugging-CTzUvS-m.js → useExecutionDebugging-Pzj1BQ1f.js} +1 -1
- package/dist/assets/{useExecutionHelpers-ts_ANr0X.js → useExecutionHelpers-F_WL-Kvp.js} +1 -1
- package/dist/assets/{usePinnedData-CAHmwr13.js → usePinnedData-BEOJK2e-.js} +1 -1
- package/dist/assets/{usePushConnection-BcVRW8VB.js → usePushConnection-BlvBVLFC.js} +3 -3
- package/dist/assets/{useRunWorkflow-DZq8rmMi.js → useRunWorkflow-CoRVHZg2.js} +15 -6
- package/dist/assets/{useWorkflowActivate-y3uHMZeh.js → useWorkflowActivate-wvqU9rPU.js} +1 -1
- package/dist/index.html +3 -3
- package/dist/static/n8n-logo.png +0 -0
- package/package.json +1 -1
- package/dist/assets/CollectionParameter-DRNykodC.js +0 -4
- package/dist/assets/useBugReporting-Bqv4ngy7.js +0 -39
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { gn as createCompounder, go as SetCache, gp as arrayIncludes, gq as cacheHas, gr as baseRest, gs as isArrayLikeObject, gt as baseFlatten, r as ref, K as useUIStore,
|
|
2
|
-
import { u as
|
|
3
|
-
import { c as capitalize, u as usePinnedData } from "./usePinnedData-CAHmwr13.js";
|
|
1
|
+
import { gn as createCompounder, go as SetCache, gp as arrayIncludes, gq as cacheHas, gr as baseRest, gs as isArrayLikeObject, gt as baseFlatten, r as ref, K as useUIStore, bo as useNodeTypesStore, T as useWorkflowsStore, a0 as useSourceControlStore, q as computed, al as getResourcePermissions, cR as isPresent, H as watch, dz as getMousePosition$1, aB as STICKY_NODE_TYPE, g as useI18n, gu as NOT_DUPLICATABLE_NODE_TYPES, d as defineComponent, E as onClickOutside, l as unref, c as openBlock, e as createBlock, j as createBaseVNode, i as createVNode, w as withCtx, n as normalizeClass, gv as N8nActionDropdown, B as normalizeStyle, gw as Teleport, f as createCommentVNode, _ as _export_sfc$1, bk as v4, gx as CORE_NODES_CATEGORY, gy as DEFAULT_SUBCATEGORY, p as useSettingsStore, gz as AI_TRANSFORM_NODE_TYPE, gA as sublimeSearch, ba as AI_SUBCATEGORY, bb as AI_CATEGORY_AGENTS, gB as sortBy, fV as i18n, gC as AI_CATEGORY_OTHER_TOOLS, gD as AI_OTHERS_NODE_CREATOR_VIEW, gE as AI_CATEGORY_DOCUMENT_LOADERS, bh as NodeConnectionType, gF as AI_CATEGORY_LANGUAGE_MODELS, gG as AI_CATEGORY_MEMORY, gH as AI_CATEGORY_OUTPUTPARSER, gI as AI_CATEGORY_RETRIEVERS, gJ as AI_CATEGORY_TEXT_SPLITTERS, gK as AI_CATEGORY_TOOLS, gL as AI_WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE, gM as AI_CODE_TOOL_LANGCHAIN_NODE_TYPE, gN as AI_CATEGORY_EMBEDDING, gO as AI_CATEGORY_VECTOR_STORES, gP as AI_UNCATEGORIZED_CATEGORY, aM as useTemplatesStore, eo as AI_NODE_CREATOR_VIEW, dP as TRIGGER_NODE_CREATOR_VIEW, bI as MANUAL_TRIGGER_NODE_TYPE, bJ as WEBHOOK_NODE_TYPE, gQ as EMAIL_IMAP_NODE_TYPE, gR as SCHEDULE_TRIGGER_NODE_TYPE, by as FORM_TRIGGER_NODE_TYPE, g9 as EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE, b7 as CHAT_TRIGGER_NODE_TYPE, gS as OTHER_TRIGGER_NODES_SUBCATEGORY, eH as REGULAR_NODE_CREATOR_VIEW, gT as RSS_READ_NODE_TYPE, gU as EMAIL_SEND_NODE_TYPE, gV as TRANSFORM_DATA_SUBCATEGORY, gW as FILTER_NODE_TYPE, gX as REMOVE_DUPLICATES_NODE_TYPE, gY as SPLIT_OUT_NODE_TYPE, gZ as LIMIT_NODE_TYPE, g_ as SUMMARIZE_NODE_TYPE, g$ as AGGREGATE_NODE_TYPE, h0 as MERGE_NODE_TYPE, co as HTML_NODE_TYPE, h1 as MARKDOWN_NODE_TYPE, h2 as XML_NODE_TYPE, h3 as CRYPTO_NODE_TYPE, h4 as EXTRACT_FROM_FILE_NODE_TYPE, h5 as CONVERT_TO_FILE_NODE_TYPE, h6 as COMPRESSION_NODE_TYPE, h7 as EDIT_IMAGE_NODE_TYPE, h8 as FLOWS_CONTROL_SUBCATEGORY, h9 as IF_NODE_TYPE, ha as SPLIT_IN_BATCHES_NODE_TYPE, hb as HELPERS_SUBCATEGORY, hc as HTTP_REQUEST_NODE_TYPE, hd as CODE_NODE_TYPE, bc as AI_CATEGORY_CHAINS, he as SET_NODE_TYPE, hf as DATETIME_NODE_TYPE, R as defineStore, $ as useCanvasStore, hg as AI_CATEGORY_ROOT_NODES, y as nextTick, bd as AI_CODE_NODE_TYPE, bK as AI_TRANSFORM_NODE_TYPE$1, eQ as CanvasConnectionMode, hh as isValidCanvasConnectionMode, d7 as isValidNodeConnectionType, S as STORES, as as useNDVStore, dE as NODE_CREATOR_OPEN_SOURCES, hi as isVueFlowConnection, d$ as nodeConnectionTypes, be as getNodeInputs, dp as CUSTOM_API_CALL_KEY, aT as useExternalHooks, aj as useTelemetry, hj as effectScope, cj as toRef, h as createElementBlock, s as renderSlot, ca as useSlots, bq as provide, b4 as onUnmounted, aw as onBeforeMount, o as onMounted, hk as useAttrs, a$ as mergeProps, F as Fragment, d5 as getCurrentInstance, dy as reactive, aW as inject, t as toDisplayString, A as renderList, x as onBeforeUnmount, hl as isMemoSame, hm as getCurrentScope, hn as onScopeDispose, aX as isRef, aY as toRefs$1, ho as customRef, hp as toValue$1, hq as createPropsRestProxy, b0 as resolveDynamicComponent, k as createTextVNode, m as resolveComponent, ap as h, hr as readonly, hs as markRaw, dD as KeyboardShortcutTooltip, ht as CanvasKey, aa as useCssModule, bn as watchEffect, aZ as normalizeProps, hu as CanvasNodeKey, eN as CanvasNodeRenderType, hv as refThrottled, hw as mergeModels, hx as useModel, bp as useNodeHelpers, bH as TitledList, cO as resolveDirective, ax as withDirectives, ac as nodeViewEventBus, hy as CanvasNodeHandleKey, ay as vShow, cZ as Transition$2, br as _sfc_main$y, I as withModifiers, C as createEventBus, bP as isEqual, hz as useActiveElement, d0 as useDeviceSupport, hA as useEventListener$1, aS as createSlots, dk as GRID_SIZE, hB as onKeyDown, hC as onKeyUp, c9 as useThrottleFn, a_ as guardReactiveProps, cr as Suspense, bg as getNodeOutputs, c$ as getTriggerNodeServiceName, eW as sanitizeHtml, bG as nodeIssuesToString, ds as WAIT_NODE_TYPE, dt as SEND_AND_WAIT_OPERATION, du as FORM_NODE_TYPE, dv as WAIT_INDEFINITELY, Z as useRootStore, bR as useCredentialsStore, bU as useHistoryStore, D as useTagsStore, at as useExecutionsStore, a as useToast, a4 as useWorkflowHelpers, b6 as useClipboard, dS as MoveNodeCommand, c3 as RenameNodeCommand, eL as RemoveNodeCommand, eJ as useDataSchema, dZ as NODE_SIZE, hD as AddNodeCommand, b$ as getNodeParameters, dU as getNewNodePosition, hE as DEFAULT_NODE_SIZE, hF as CONFIGURATION_NODE_SIZE, bf as getConnectionTypes, d_ as generateOffsets, hG as CONFIGURABLE_NODE_SIZE, dY as PUSH_NODES_OFFSET, e8 as AddConnectionCommand, ei as RemoveConnectionCommand, dT as UPDATE_WEBHOOK_ID_NODE_TYPES, dN as generateNodesGraph, a8 as EnterpriseEditionFeature, c0 as deepCopy } from "./index-DablXALM.js";
|
|
2
|
+
import { c as capitalize, u as usePinnedData } from "./usePinnedData-BEOJK2e-.js";
|
|
4
3
|
var camelCase = createCompounder(function(result, word, index) {
|
|
5
4
|
word = word.toLowerCase();
|
|
6
5
|
return result + (index ? capitalize(word) : word);
|
|
@@ -5866,36 +5865,27 @@ function calcNextPosition(node2, nextPosition, triggerError, nodeExtent, parentN
|
|
|
5866
5865
|
computedPosition: clampedPos
|
|
5867
5866
|
};
|
|
5868
5867
|
}
|
|
5869
|
-
function getHandlePosition(node2, handle2, fallbackPosition = Position.Left) {
|
|
5868
|
+
function getHandlePosition(node2, handle2, fallbackPosition = Position.Left, center = false) {
|
|
5870
5869
|
const x = ((handle2 == null ? void 0 : handle2.x) ?? 0) + node2.computedPosition.x;
|
|
5871
5870
|
const y = ((handle2 == null ? void 0 : handle2.y) ?? 0) + node2.computedPosition.y;
|
|
5872
5871
|
const { width, height } = handle2 ?? getNodeDimensions(node2);
|
|
5872
|
+
if (center) {
|
|
5873
|
+
return { x: x + width / 2, y: y + height / 2 };
|
|
5874
|
+
}
|
|
5873
5875
|
const position2 = (handle2 == null ? void 0 : handle2.position) ?? fallbackPosition;
|
|
5874
5876
|
switch (position2) {
|
|
5875
5877
|
case Position.Top:
|
|
5876
|
-
return {
|
|
5877
|
-
x: x + width / 2,
|
|
5878
|
-
y
|
|
5879
|
-
};
|
|
5878
|
+
return { x: x + width / 2, y };
|
|
5880
5879
|
case Position.Right:
|
|
5881
|
-
return {
|
|
5882
|
-
x: x + width,
|
|
5883
|
-
y: y + height / 2
|
|
5884
|
-
};
|
|
5880
|
+
return { x: x + width, y: y + height / 2 };
|
|
5885
5881
|
case Position.Bottom:
|
|
5886
|
-
return {
|
|
5887
|
-
x: x + width / 2,
|
|
5888
|
-
y: y + height
|
|
5889
|
-
};
|
|
5882
|
+
return { x: x + width / 2, y: y + height };
|
|
5890
5883
|
case Position.Left:
|
|
5891
|
-
return {
|
|
5892
|
-
x,
|
|
5893
|
-
y: y + height / 2
|
|
5894
|
-
};
|
|
5884
|
+
return { x, y: y + height / 2 };
|
|
5895
5885
|
}
|
|
5896
5886
|
}
|
|
5897
|
-
function
|
|
5898
|
-
if (!bounds
|
|
5887
|
+
function getEdgeHandle(bounds, handleId) {
|
|
5888
|
+
if (!bounds) {
|
|
5899
5889
|
return null;
|
|
5900
5890
|
}
|
|
5901
5891
|
return (!handleId ? bounds[0] : bounds.find((d) => d.id === handleId)) || null;
|
|
@@ -6095,103 +6085,90 @@ function snapPosition(position2, snapGrid = [1, 1]) {
|
|
|
6095
6085
|
y: snapGrid[1] * Math.round(position2.y / snapGrid[1])
|
|
6096
6086
|
};
|
|
6097
6087
|
}
|
|
6098
|
-
|
|
6099
|
-
return {
|
|
6100
|
-
handleDomNode: null,
|
|
6101
|
-
isValid: false,
|
|
6102
|
-
connection: { source: "", target: "", sourceHandle: null, targetHandle: null },
|
|
6103
|
-
endHandle: null
|
|
6104
|
-
};
|
|
6105
|
-
}
|
|
6088
|
+
const alwaysValid$1 = () => true;
|
|
6106
6089
|
function resetRecentHandle(handleDomNode) {
|
|
6107
6090
|
handleDomNode == null ? void 0 : handleDomNode.classList.remove("valid", "connecting", "vue-flow__handle-valid", "vue-flow__handle-connecting");
|
|
6108
6091
|
}
|
|
6109
|
-
function
|
|
6110
|
-
const
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
});
|
|
6092
|
+
function getNodesWithinDistance(position2, nodeLookup, distance2) {
|
|
6093
|
+
const nodes = [];
|
|
6094
|
+
const rect = {
|
|
6095
|
+
x: position2.x - distance2,
|
|
6096
|
+
y: position2.y - distance2,
|
|
6097
|
+
width: distance2 * 2,
|
|
6098
|
+
height: distance2 * 2
|
|
6099
|
+
};
|
|
6100
|
+
for (const node2 of nodeLookup.values()) {
|
|
6101
|
+
if (getOverlappingArea(rect, nodeToRect(node2)) > 0) {
|
|
6102
|
+
nodes.push(node2);
|
|
6121
6103
|
}
|
|
6122
6104
|
}
|
|
6123
|
-
return
|
|
6105
|
+
return nodes;
|
|
6124
6106
|
}
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
const handleBelow = domNodes.find((el) => el.classList.contains("vue-flow__handle"));
|
|
6129
|
-
if (handleBelow) {
|
|
6130
|
-
const handleNodeId = handleBelow.getAttribute("data-nodeid");
|
|
6131
|
-
if (handleNodeId) {
|
|
6132
|
-
const handleType = getHandleType(void 0, handleBelow);
|
|
6133
|
-
const handleId = handleBelow.getAttribute("data-handleid");
|
|
6134
|
-
const validHandleResult = validator({ nodeId: handleNodeId, id: handleId, type: handleType });
|
|
6135
|
-
if (validHandleResult) {
|
|
6136
|
-
const handle2 = handles.find((h2) => h2.nodeId === handleNodeId && h2.type === handleType && h2.id === handleId);
|
|
6137
|
-
return {
|
|
6138
|
-
handle: {
|
|
6139
|
-
id: handleId,
|
|
6140
|
-
type: handleType,
|
|
6141
|
-
nodeId: handleNodeId,
|
|
6142
|
-
x: (handle2 == null ? void 0 : handle2.x) || pos.x,
|
|
6143
|
-
y: (handle2 == null ? void 0 : handle2.y) || pos.y
|
|
6144
|
-
},
|
|
6145
|
-
validHandleResult
|
|
6146
|
-
};
|
|
6147
|
-
}
|
|
6148
|
-
}
|
|
6149
|
-
}
|
|
6107
|
+
const ADDITIONAL_DISTANCE = 250;
|
|
6108
|
+
function getClosestHandle(position2, connectionRadius, nodeLookup, fromHandle) {
|
|
6109
|
+
var _a, _b;
|
|
6150
6110
|
let closestHandles = [];
|
|
6151
6111
|
let minDistance = Number.POSITIVE_INFINITY;
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
|
|
6156
|
-
if (
|
|
6157
|
-
|
|
6158
|
-
|
|
6159
|
-
|
|
6160
|
-
|
|
6161
|
-
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6112
|
+
const closeNodes = getNodesWithinDistance(position2, nodeLookup, connectionRadius + ADDITIONAL_DISTANCE);
|
|
6113
|
+
for (const node2 of closeNodes) {
|
|
6114
|
+
const allHandles = [...((_a = node2.handleBounds) == null ? void 0 : _a.source) ?? [], ...((_b = node2.handleBounds) == null ? void 0 : _b.target) ?? []];
|
|
6115
|
+
for (const handle2 of allHandles) {
|
|
6116
|
+
if (fromHandle.nodeId === handle2.nodeId && fromHandle.type === handle2.type && fromHandle.id === handle2.id) {
|
|
6117
|
+
continue;
|
|
6118
|
+
}
|
|
6119
|
+
const { x, y } = getHandlePosition(node2, handle2, handle2.position, true);
|
|
6120
|
+
const distance2 = Math.sqrt((x - position2.x) ** 2 + (y - position2.y) ** 2);
|
|
6121
|
+
if (distance2 > connectionRadius) {
|
|
6122
|
+
continue;
|
|
6123
|
+
}
|
|
6124
|
+
if (distance2 < minDistance) {
|
|
6125
|
+
closestHandles = [{ ...handle2, x, y }];
|
|
6165
6126
|
minDistance = distance2;
|
|
6127
|
+
} else if (distance2 === minDistance) {
|
|
6128
|
+
closestHandles.push({ ...handle2, x, y });
|
|
6166
6129
|
}
|
|
6167
6130
|
}
|
|
6168
6131
|
}
|
|
6169
6132
|
if (!closestHandles.length) {
|
|
6170
|
-
return
|
|
6171
|
-
}
|
|
6172
|
-
if (closestHandles.length === 1) {
|
|
6173
|
-
return closestHandles[0];
|
|
6133
|
+
return null;
|
|
6174
6134
|
}
|
|
6175
|
-
|
|
6176
|
-
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
}
|
|
6181
|
-
function isValidHandle(event,
|
|
6135
|
+
if (closestHandles.length > 1) {
|
|
6136
|
+
const oppositeHandleType = fromHandle.type === "source" ? "target" : "source";
|
|
6137
|
+
return closestHandles.find((handle2) => handle2.type === oppositeHandleType) ?? closestHandles[0];
|
|
6138
|
+
}
|
|
6139
|
+
return closestHandles[0];
|
|
6140
|
+
}
|
|
6141
|
+
function isValidHandle(event, {
|
|
6142
|
+
handle: handle2,
|
|
6143
|
+
connectionMode,
|
|
6144
|
+
fromNodeId,
|
|
6145
|
+
fromHandleId,
|
|
6146
|
+
fromType,
|
|
6147
|
+
doc,
|
|
6148
|
+
lib,
|
|
6149
|
+
flowId,
|
|
6150
|
+
isValidConnection = alwaysValid$1
|
|
6151
|
+
}, edges, nodes, findNode) {
|
|
6182
6152
|
const isTarget = fromType === "target";
|
|
6183
|
-
const handleDomNode = doc.querySelector(
|
|
6153
|
+
const handleDomNode = handle2 ? doc.querySelector(`.${lib}-flow__handle[data-id="${flowId}-${handle2 == null ? void 0 : handle2.nodeId}-${handle2 == null ? void 0 : handle2.id}-${handle2 == null ? void 0 : handle2.type}"]`) : null;
|
|
6184
6154
|
const { x, y } = getEventPosition(event);
|
|
6185
|
-
const
|
|
6186
|
-
const handleToCheck = (
|
|
6187
|
-
const result =
|
|
6155
|
+
const handleBelow = doc.elementFromPoint(x, y);
|
|
6156
|
+
const handleToCheck = (handleBelow == null ? void 0 : handleBelow.classList.contains(`${lib}-flow__handle`)) ? handleBelow : handleDomNode;
|
|
6157
|
+
const result = {
|
|
6158
|
+
handleDomNode: handleToCheck,
|
|
6159
|
+
isValid: false,
|
|
6160
|
+
connection: null,
|
|
6161
|
+
toHandle: null
|
|
6162
|
+
};
|
|
6188
6163
|
if (handleToCheck) {
|
|
6189
|
-
result.handleDomNode = handleToCheck;
|
|
6190
6164
|
const handleType = getHandleType(void 0, handleToCheck);
|
|
6191
6165
|
const handleNodeId = handleToCheck.getAttribute("data-nodeid");
|
|
6192
6166
|
const handleId = handleToCheck.getAttribute("data-handleid");
|
|
6193
6167
|
const connectable = handleToCheck.classList.contains("connectable");
|
|
6194
6168
|
const connectableEnd = handleToCheck.classList.contains("connectableend");
|
|
6169
|
+
if (!handleNodeId || !handleType) {
|
|
6170
|
+
return result;
|
|
6171
|
+
}
|
|
6195
6172
|
const connection = {
|
|
6196
6173
|
source: isTarget ? handleNodeId : fromNodeId,
|
|
6197
6174
|
sourceHandle: isTarget ? handleId : fromHandleId,
|
|
@@ -6201,38 +6178,16 @@ function isValidHandle(event, handle2, connectionMode, fromNodeId, fromHandleId,
|
|
|
6201
6178
|
result.connection = connection;
|
|
6202
6179
|
const isConnectable = connectable && connectableEnd;
|
|
6203
6180
|
const isValid = isConnectable && (connectionMode === ConnectionMode.Strict ? isTarget && handleType === "source" || !isTarget && handleType === "target" : handleNodeId !== fromNodeId || handleId !== fromHandleId);
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
result.endHandle = {
|
|
6212
|
-
nodeId: handleNodeId,
|
|
6213
|
-
handleId,
|
|
6214
|
-
type: handleType,
|
|
6215
|
-
position: result.isValid ? handleToCheck.getAttribute("data-handlepos") : null
|
|
6216
|
-
};
|
|
6217
|
-
}
|
|
6181
|
+
result.isValid = isValid && isValidConnection(connection, {
|
|
6182
|
+
nodes,
|
|
6183
|
+
edges,
|
|
6184
|
+
sourceNode: findNode(fromNodeId),
|
|
6185
|
+
targetNode: findNode(handleNodeId)
|
|
6186
|
+
});
|
|
6187
|
+
result.toHandle = handle2;
|
|
6218
6188
|
}
|
|
6219
6189
|
return result;
|
|
6220
6190
|
}
|
|
6221
|
-
function getHandleLookup({ nodes, nodeId, handleId, handleType }) {
|
|
6222
|
-
const handleLookup = [];
|
|
6223
|
-
for (let i = 0; i < nodes.length; i++) {
|
|
6224
|
-
const node2 = nodes[i];
|
|
6225
|
-
const { handleBounds } = node2;
|
|
6226
|
-
let sourceHandles = [];
|
|
6227
|
-
let targetHandles = [];
|
|
6228
|
-
if (handleBounds) {
|
|
6229
|
-
sourceHandles = getHandles(node2, handleBounds, "source", `${nodeId}-${handleId}-${handleType}`);
|
|
6230
|
-
targetHandles = getHandles(node2, handleBounds, "target", `${nodeId}-${handleId}-${handleType}`);
|
|
6231
|
-
}
|
|
6232
|
-
handleLookup.push(...sourceHandles, ...targetHandles);
|
|
6233
|
-
}
|
|
6234
|
-
return handleLookup;
|
|
6235
|
-
}
|
|
6236
6191
|
function getHandleType(edgeUpdaterType, handleDomNode) {
|
|
6237
6192
|
if (edgeUpdaterType) {
|
|
6238
6193
|
return edgeUpdaterType;
|
|
@@ -6252,6 +6207,31 @@ function getConnectionStatus(isInsideConnectionRadius, isHandleValid) {
|
|
|
6252
6207
|
}
|
|
6253
6208
|
return connectionStatus;
|
|
6254
6209
|
}
|
|
6210
|
+
function isConnectionValid(isInsideConnectionRadius, isHandleValid) {
|
|
6211
|
+
let isValid = null;
|
|
6212
|
+
if (isHandleValid) {
|
|
6213
|
+
isValid = true;
|
|
6214
|
+
} else if (isInsideConnectionRadius && !isHandleValid) {
|
|
6215
|
+
isValid = false;
|
|
6216
|
+
}
|
|
6217
|
+
return isValid;
|
|
6218
|
+
}
|
|
6219
|
+
function getHandle(nodeId, handleType, handleId, nodeLookup, connectionMode, withAbsolutePosition = false) {
|
|
6220
|
+
var _a, _b, _c;
|
|
6221
|
+
const node2 = nodeLookup.get(nodeId);
|
|
6222
|
+
if (!node2) {
|
|
6223
|
+
return null;
|
|
6224
|
+
}
|
|
6225
|
+
const handles = connectionMode === ConnectionMode.Strict ? (_a = node2.handleBounds) == null ? void 0 : _a[handleType] : [...((_b = node2.handleBounds) == null ? void 0 : _b.source) ?? [], ...((_c = node2.handleBounds) == null ? void 0 : _c.target) ?? []];
|
|
6226
|
+
const handle2 = (handleId ? handles == null ? void 0 : handles.find((h2) => h2.id === handleId) : handles == null ? void 0 : handles[0]) ?? null;
|
|
6227
|
+
return handle2 && withAbsolutePosition ? { ...handle2, ...getHandlePosition(node2, handle2, handle2.position, true) } : handle2;
|
|
6228
|
+
}
|
|
6229
|
+
const oppositePosition = {
|
|
6230
|
+
[Position.Left]: Position.Right,
|
|
6231
|
+
[Position.Right]: Position.Left,
|
|
6232
|
+
[Position.Top]: Position.Bottom,
|
|
6233
|
+
[Position.Bottom]: Position.Top
|
|
6234
|
+
};
|
|
6255
6235
|
const productionEnvs = ["production", "prod"];
|
|
6256
6236
|
function warn(message, ...args) {
|
|
6257
6237
|
if (isDev()) {
|
|
@@ -6261,14 +6241,16 @@ function warn(message, ...args) {
|
|
|
6261
6241
|
function isDev() {
|
|
6262
6242
|
return !productionEnvs.includes("production");
|
|
6263
6243
|
}
|
|
6264
|
-
function getHandleBounds(
|
|
6265
|
-
const handles = nodeElement.querySelectorAll(`.vue-flow__handle
|
|
6244
|
+
function getHandleBounds(type, nodeElement, nodeBounds, zoom2) {
|
|
6245
|
+
const handles = nodeElement.querySelectorAll(`.vue-flow__handle.${type}`);
|
|
6266
6246
|
const handlesArray = Array.from(handles);
|
|
6267
6247
|
return handlesArray.map((handle2) => {
|
|
6268
6248
|
const handleBounds = handle2.getBoundingClientRect();
|
|
6269
6249
|
return {
|
|
6270
6250
|
id: handle2.getAttribute("data-handleid"),
|
|
6271
6251
|
position: handle2.getAttribute("data-handlepos"),
|
|
6252
|
+
nodeId: handle2.getAttribute("data-nodeid"),
|
|
6253
|
+
type,
|
|
6272
6254
|
x: (handleBounds.left - nodeBounds.left) / zoom2,
|
|
6273
6255
|
y: (handleBounds.top - nodeBounds.top) / zoom2,
|
|
6274
6256
|
...getDimensions(handle2)
|
|
@@ -6362,19 +6344,43 @@ function createGraphNodes(nodes, findNode, triggerError) {
|
|
|
6362
6344
|
}
|
|
6363
6345
|
return nextNodes;
|
|
6364
6346
|
}
|
|
6365
|
-
function
|
|
6347
|
+
function addConnectionToLookup(type, connection, connectionKey, connectionLookup, nodeId, handleId) {
|
|
6348
|
+
let key = nodeId;
|
|
6349
|
+
const nodeMap = connectionLookup.get(key) || /* @__PURE__ */ new Map();
|
|
6350
|
+
connectionLookup.set(key, nodeMap.set(connectionKey, connection));
|
|
6351
|
+
key = `${nodeId}-${type}`;
|
|
6352
|
+
const typeMap = connectionLookup.get(key) || /* @__PURE__ */ new Map();
|
|
6353
|
+
connectionLookup.set(key, typeMap.set(connectionKey, connection));
|
|
6354
|
+
if (handleId) {
|
|
6355
|
+
key = `${nodeId}-${type}-${handleId}`;
|
|
6356
|
+
const handleMap = connectionLookup.get(key) || /* @__PURE__ */ new Map();
|
|
6357
|
+
connectionLookup.set(key, handleMap.set(connectionKey, connection));
|
|
6358
|
+
}
|
|
6359
|
+
}
|
|
6360
|
+
function updateConnectionLookup(connectionLookup, edgeLookup, edges) {
|
|
6366
6361
|
connectionLookup.clear();
|
|
6362
|
+
edgeLookup.clear();
|
|
6367
6363
|
for (const edge2 of edges) {
|
|
6368
|
-
const {
|
|
6369
|
-
const
|
|
6370
|
-
const
|
|
6371
|
-
const
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
connectionLookup.set(targetKey, prevTarget.set(`${source}-${sourceHandle}`, connection));
|
|
6364
|
+
const { source: sourceNode, target: targetNode, sourceHandle = null, targetHandle = null } = edge2;
|
|
6365
|
+
const connection = { edgeId: edge2.id, source: sourceNode, target: targetNode, sourceHandle, targetHandle };
|
|
6366
|
+
const sourceKey = `${sourceNode}-${sourceHandle}--${targetNode}-${targetHandle}`;
|
|
6367
|
+
const targetKey = `${targetNode}-${targetHandle}--${sourceNode}-${sourceHandle}`;
|
|
6368
|
+
addConnectionToLookup("source", connection, targetKey, connectionLookup, sourceNode, sourceHandle);
|
|
6369
|
+
addConnectionToLookup("target", connection, sourceKey, connectionLookup, targetNode, targetHandle);
|
|
6370
|
+
edgeLookup.set(edge2.id, edge2);
|
|
6376
6371
|
}
|
|
6377
6372
|
}
|
|
6373
|
+
function areSetsEqual(a, b) {
|
|
6374
|
+
if (a.size !== b.size) {
|
|
6375
|
+
return false;
|
|
6376
|
+
}
|
|
6377
|
+
for (const item of a) {
|
|
6378
|
+
if (!b.has(item)) {
|
|
6379
|
+
return false;
|
|
6380
|
+
}
|
|
6381
|
+
}
|
|
6382
|
+
return true;
|
|
6383
|
+
}
|
|
6378
6384
|
function createGraphEdges(nextEdges, isValidConnection, findNode, findEdge, onError, defaultEdgeOptions, nodes, edges) {
|
|
6379
6385
|
const validEdges = [];
|
|
6380
6386
|
for (const edgeOrConnection of nextEdges) {
|
|
@@ -6713,6 +6719,7 @@ function useHandle({
|
|
|
6713
6719
|
onEdgeUpdateEnd
|
|
6714
6720
|
}) {
|
|
6715
6721
|
const {
|
|
6722
|
+
id: flowId,
|
|
6716
6723
|
vueFlowRef,
|
|
6717
6724
|
connectionMode,
|
|
6718
6725
|
connectionRadius,
|
|
@@ -6730,12 +6737,12 @@ function useHandle({
|
|
|
6730
6737
|
viewport,
|
|
6731
6738
|
edges,
|
|
6732
6739
|
nodes,
|
|
6733
|
-
isValidConnection: isValidConnectionProp
|
|
6740
|
+
isValidConnection: isValidConnectionProp,
|
|
6741
|
+
nodeLookup
|
|
6734
6742
|
} = useVueFlow();
|
|
6735
6743
|
let connection = null;
|
|
6736
6744
|
let isValid = false;
|
|
6737
6745
|
let handleDomNode = null;
|
|
6738
|
-
let previousConnection = null;
|
|
6739
6746
|
function handlePointerDown(event) {
|
|
6740
6747
|
var _a;
|
|
6741
6748
|
const isTarget = toValue$1(type) === "target";
|
|
@@ -6744,35 +6751,47 @@ function useHandle({
|
|
|
6744
6751
|
if (isMouseTriggered && event.button === 0 || !isMouseTriggered) {
|
|
6745
6752
|
let onPointerMove = function(event2) {
|
|
6746
6753
|
connectionPosition = getEventPosition(event2, containerBounds);
|
|
6747
|
-
|
|
6748
|
-
event2,
|
|
6749
|
-
doc,
|
|
6754
|
+
closestHandle = getClosestHandle(
|
|
6750
6755
|
pointToRendererPoint(connectionPosition, viewport.value, false, [1, 1]),
|
|
6751
6756
|
connectionRadius.value,
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
event2,
|
|
6755
|
-
handle22,
|
|
6756
|
-
connectionMode.value,
|
|
6757
|
-
toValue$1(nodeId),
|
|
6758
|
-
toValue$1(handleId),
|
|
6759
|
-
isTarget ? "target" : "source",
|
|
6760
|
-
isValidConnectionHandler,
|
|
6761
|
-
doc,
|
|
6762
|
-
edges.value,
|
|
6763
|
-
nodes.value,
|
|
6764
|
-
findNode
|
|
6765
|
-
)
|
|
6757
|
+
nodeLookup.value,
|
|
6758
|
+
fromHandle
|
|
6766
6759
|
);
|
|
6767
|
-
closestHandle = handle2;
|
|
6768
6760
|
if (!autoPanStarted) {
|
|
6769
6761
|
autoPan();
|
|
6770
6762
|
autoPanStarted = true;
|
|
6771
6763
|
}
|
|
6772
|
-
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6764
|
+
const result = isValidHandle(
|
|
6765
|
+
event2,
|
|
6766
|
+
{
|
|
6767
|
+
handle: closestHandle,
|
|
6768
|
+
connectionMode: connectionMode.value,
|
|
6769
|
+
fromNodeId: toValue$1(nodeId),
|
|
6770
|
+
fromHandleId: toValue$1(handleId),
|
|
6771
|
+
fromType: isTarget ? "target" : "source",
|
|
6772
|
+
isValidConnection: isValidConnectionHandler,
|
|
6773
|
+
doc,
|
|
6774
|
+
lib: "vue",
|
|
6775
|
+
flowId,
|
|
6776
|
+
nodeLookup: nodeLookup.value
|
|
6777
|
+
},
|
|
6778
|
+
edges.value,
|
|
6779
|
+
nodes.value,
|
|
6780
|
+
findNode
|
|
6781
|
+
);
|
|
6782
|
+
handleDomNode = result.handleDomNode;
|
|
6783
|
+
connection = result.connection;
|
|
6784
|
+
isValid = isConnectionValid(!!closestHandle, result.isValid);
|
|
6785
|
+
const newConnection2 = {
|
|
6786
|
+
// from stays the same
|
|
6787
|
+
...previousConnection,
|
|
6788
|
+
isValid,
|
|
6789
|
+
to: closestHandle && isValid ? rendererPointToPoint({ x: closestHandle.x, y: closestHandle.y }, viewport.value) : connectionPosition,
|
|
6790
|
+
toHandle: result.toHandle,
|
|
6791
|
+
toPosition: isValid && result.toHandle ? result.toHandle.position : oppositePosition[fromHandle.position],
|
|
6792
|
+
toNode: result.toHandle ? nodeLookup.value.get(result.toHandle.nodeId) : null
|
|
6793
|
+
};
|
|
6794
|
+
if (isValid && closestHandle && (previousConnection == null ? void 0 : previousConnection.toHandle) && newConnection2.toHandle && previousConnection.toHandle.type === newConnection2.toHandle.type && previousConnection.toHandle.nodeId === newConnection2.toHandle.nodeId && previousConnection.toHandle.id === newConnection2.toHandle.id && previousConnection.to.x === newConnection2.to.x && previousConnection.to.y === newConnection2.to.y) {
|
|
6776
6795
|
return;
|
|
6777
6796
|
}
|
|
6778
6797
|
updateConnection(
|
|
@@ -6783,10 +6802,10 @@ function useHandle({
|
|
|
6783
6802
|
},
|
|
6784
6803
|
viewport.value
|
|
6785
6804
|
) : connectionPosition,
|
|
6786
|
-
|
|
6805
|
+
result.toHandle,
|
|
6787
6806
|
getConnectionStatus(!!closestHandle, isValid)
|
|
6788
6807
|
);
|
|
6789
|
-
previousConnection =
|
|
6808
|
+
previousConnection = newConnection2;
|
|
6790
6809
|
if (!closestHandle && !isValid && !handleDomNode) {
|
|
6791
6810
|
return resetRecentHandle(prevActiveHandle);
|
|
6792
6811
|
}
|
|
@@ -6794,8 +6813,8 @@ function useHandle({
|
|
|
6794
6813
|
resetRecentHandle(prevActiveHandle);
|
|
6795
6814
|
prevActiveHandle = handleDomNode;
|
|
6796
6815
|
handleDomNode.classList.add("connecting", "vue-flow__handle-connecting");
|
|
6797
|
-
handleDomNode.classList.toggle("valid", isValid);
|
|
6798
|
-
handleDomNode.classList.toggle("vue-flow__handle-valid", isValid);
|
|
6816
|
+
handleDomNode.classList.toggle("valid", !!isValid);
|
|
6817
|
+
handleDomNode.classList.toggle("vue-flow__handle-valid", !!isValid);
|
|
6799
6818
|
}
|
|
6800
6819
|
}, onPointerUp = function(event2) {
|
|
6801
6820
|
if ((closestHandle || handleDomNode) && connection && isValid) {
|
|
@@ -6835,15 +6854,13 @@ function useHandle({
|
|
|
6835
6854
|
if (!containerBounds || !handleType) {
|
|
6836
6855
|
return;
|
|
6837
6856
|
}
|
|
6857
|
+
const fromHandleInternal = getHandle(toValue$1(nodeId), handleType, toValue$1(handleId), nodeLookup.value, connectionMode.value);
|
|
6858
|
+
if (!fromHandleInternal) {
|
|
6859
|
+
return;
|
|
6860
|
+
}
|
|
6838
6861
|
let prevActiveHandle;
|
|
6839
6862
|
let connectionPosition = getEventPosition(event, containerBounds);
|
|
6840
6863
|
let autoPanStarted = false;
|
|
6841
|
-
const handleLookup = getHandleLookup({
|
|
6842
|
-
nodes: nodes.value,
|
|
6843
|
-
nodeId: toValue$1(nodeId),
|
|
6844
|
-
handleId: toValue$1(handleId),
|
|
6845
|
-
handleType
|
|
6846
|
-
});
|
|
6847
6864
|
const autoPan = () => {
|
|
6848
6865
|
if (!autoPanOnConnect.value) {
|
|
6849
6866
|
return;
|
|
@@ -6852,10 +6869,30 @@ function useHandle({
|
|
|
6852
6869
|
panBy({ x: xMovement, y: yMovement });
|
|
6853
6870
|
autoPanId = requestAnimationFrame(autoPan);
|
|
6854
6871
|
};
|
|
6872
|
+
const fromHandle = {
|
|
6873
|
+
...fromHandleInternal,
|
|
6874
|
+
nodeId: toValue$1(nodeId),
|
|
6875
|
+
type: handleType,
|
|
6876
|
+
position: fromHandleInternal.position
|
|
6877
|
+
};
|
|
6878
|
+
const fromNodeInternal = nodeLookup.value.get(toValue$1(nodeId));
|
|
6879
|
+
const from = getHandlePosition(fromNodeInternal, fromHandle, Position.Left, true);
|
|
6880
|
+
const newConnection = {
|
|
6881
|
+
inProgress: true,
|
|
6882
|
+
isValid: null,
|
|
6883
|
+
from,
|
|
6884
|
+
fromHandle,
|
|
6885
|
+
fromPosition: fromHandle.position,
|
|
6886
|
+
fromNode: fromNodeInternal,
|
|
6887
|
+
to: connectionPosition,
|
|
6888
|
+
toHandle: null,
|
|
6889
|
+
toPosition: oppositePosition[fromHandle.position],
|
|
6890
|
+
toNode: null
|
|
6891
|
+
};
|
|
6855
6892
|
startConnection(
|
|
6856
6893
|
{
|
|
6857
6894
|
nodeId: toValue$1(nodeId),
|
|
6858
|
-
|
|
6895
|
+
id: toValue$1(handleId),
|
|
6859
6896
|
type: handleType,
|
|
6860
6897
|
position: (clickedHandle == null ? void 0 : clickedHandle.getAttribute("data-handlepos")) || Position.Top
|
|
6861
6898
|
},
|
|
@@ -6865,6 +6902,7 @@ function useHandle({
|
|
|
6865
6902
|
}
|
|
6866
6903
|
);
|
|
6867
6904
|
emits.connectStart({ event, nodeId: toValue$1(nodeId), handleId: toValue$1(handleId), handleType });
|
|
6905
|
+
let previousConnection = newConnection;
|
|
6868
6906
|
doc.addEventListener("mousemove", onPointerMove);
|
|
6869
6907
|
doc.addEventListener("mouseup", onPointerUp);
|
|
6870
6908
|
doc.addEventListener("touchmove", onPointerMove);
|
|
@@ -6872,47 +6910,58 @@ function useHandle({
|
|
|
6872
6910
|
}
|
|
6873
6911
|
}
|
|
6874
6912
|
function handleClick(event) {
|
|
6913
|
+
var _a, _b;
|
|
6875
6914
|
if (!connectOnClick.value) {
|
|
6876
6915
|
return;
|
|
6877
6916
|
}
|
|
6878
6917
|
const isTarget = toValue$1(type) === "target";
|
|
6879
6918
|
if (!connectionClickStartHandle.value) {
|
|
6880
6919
|
emits.clickConnectStart({ event, nodeId: toValue$1(nodeId), handleId: toValue$1(handleId) });
|
|
6881
|
-
startConnection(
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6920
|
+
startConnection(
|
|
6921
|
+
{ nodeId: toValue$1(nodeId), type: toValue$1(type), id: toValue$1(handleId), position: Position.Top },
|
|
6922
|
+
void 0,
|
|
6923
|
+
true
|
|
6924
|
+
);
|
|
6925
|
+
return;
|
|
6926
|
+
}
|
|
6927
|
+
let isValidConnectionHandler = toValue$1(isValidConnection) || isValidConnectionProp.value || alwaysValid;
|
|
6928
|
+
const node2 = findNode(toValue$1(nodeId));
|
|
6929
|
+
if (!isValidConnectionHandler && node2) {
|
|
6930
|
+
isValidConnectionHandler = (!isTarget ? node2.isValidTargetPos : node2.isValidSourcePos) || alwaysValid;
|
|
6931
|
+
}
|
|
6932
|
+
if (node2 && (typeof node2.connectable === "undefined" ? nodesConnectable.value : node2.connectable) === false) {
|
|
6933
|
+
return;
|
|
6934
|
+
}
|
|
6935
|
+
const doc = getHostForElement(event.target);
|
|
6936
|
+
const result = isValidHandle(
|
|
6937
|
+
event,
|
|
6938
|
+
{
|
|
6939
|
+
handle: {
|
|
6895
6940
|
nodeId: toValue$1(nodeId),
|
|
6896
6941
|
id: toValue$1(handleId),
|
|
6897
|
-
type: toValue$1(type)
|
|
6942
|
+
type: toValue$1(type),
|
|
6943
|
+
position: Position.Top
|
|
6898
6944
|
},
|
|
6899
|
-
connectionMode.value,
|
|
6900
|
-
connectionClickStartHandle.value.nodeId,
|
|
6901
|
-
connectionClickStartHandle.value.
|
|
6902
|
-
connectionClickStartHandle.value.type,
|
|
6903
|
-
isValidConnectionHandler,
|
|
6945
|
+
connectionMode: connectionMode.value,
|
|
6946
|
+
fromNodeId: connectionClickStartHandle.value.nodeId,
|
|
6947
|
+
fromHandleId: connectionClickStartHandle.value.id || null,
|
|
6948
|
+
fromType: connectionClickStartHandle.value.type,
|
|
6949
|
+
isValidConnection: isValidConnectionHandler,
|
|
6904
6950
|
doc,
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6951
|
+
lib: "vue",
|
|
6952
|
+
flowId,
|
|
6953
|
+
nodeLookup: nodeLookup.value
|
|
6954
|
+
},
|
|
6955
|
+
edges.value,
|
|
6956
|
+
nodes.value,
|
|
6957
|
+
findNode
|
|
6958
|
+
);
|
|
6959
|
+
const isOwnHandle = ((_a = result.connection) == null ? void 0 : _a.source) === ((_b = result.connection) == null ? void 0 : _b.target);
|
|
6960
|
+
if (result.isValid && result.connection && !isOwnHandle) {
|
|
6961
|
+
emits.connect(result.connection);
|
|
6915
6962
|
}
|
|
6963
|
+
emits.clickConnectEnd(event);
|
|
6964
|
+
endConnection(event, true);
|
|
6916
6965
|
}
|
|
6917
6966
|
return {
|
|
6918
6967
|
handlePointerDown,
|
|
@@ -7747,8 +7796,8 @@ function useActions(state, nodeLookup, edgeLookup) {
|
|
|
7747
7796
|
if (doUpdate) {
|
|
7748
7797
|
const nodeBounds = update.nodeElement.getBoundingClientRect();
|
|
7749
7798
|
node2.dimensions = dimensions;
|
|
7750
|
-
node2.handleBounds.source = getHandleBounds("
|
|
7751
|
-
node2.handleBounds.target = getHandleBounds("
|
|
7799
|
+
node2.handleBounds.source = getHandleBounds("source", update.nodeElement, nodeBounds, zoom2);
|
|
7800
|
+
node2.handleBounds.target = getHandleBounds("target", update.nodeElement, nodeBounds, zoom2);
|
|
7752
7801
|
changes.push({
|
|
7753
7802
|
id: node2.id,
|
|
7754
7803
|
type: "dimensions",
|
|
@@ -7903,7 +7952,7 @@ function useActions(state, nodeLookup, edgeLookup) {
|
|
|
7903
7952
|
state.nodes,
|
|
7904
7953
|
state.edges
|
|
7905
7954
|
);
|
|
7906
|
-
updateConnectionLookup(state.connectionLookup, validEdges);
|
|
7955
|
+
updateConnectionLookup(state.connectionLookup, edgeLookup.value, validEdges);
|
|
7907
7956
|
state.edges = validEdges;
|
|
7908
7957
|
};
|
|
7909
7958
|
const setElements = (elements) => {
|
|
@@ -8041,7 +8090,7 @@ function useActions(state, nodeLookup, edgeLookup) {
|
|
|
8041
8090
|
state.edges
|
|
8042
8091
|
);
|
|
8043
8092
|
state.edges.splice(state.edges.indexOf(prevEdge), 1, validEdge);
|
|
8044
|
-
updateConnectionLookup(state.connectionLookup, [validEdge]);
|
|
8093
|
+
updateConnectionLookup(state.connectionLookup, edgeLookup.value, [validEdge]);
|
|
8045
8094
|
return validEdge;
|
|
8046
8095
|
}
|
|
8047
8096
|
return false;
|
|
@@ -8059,7 +8108,7 @@ function useActions(state, nodeLookup, edgeLookup) {
|
|
|
8059
8108
|
};
|
|
8060
8109
|
const applyEdgeChanges2 = (changes) => {
|
|
8061
8110
|
const changedEdges = applyChanges(changes, state.edges);
|
|
8062
|
-
updateConnectionLookup(state.connectionLookup, changedEdges);
|
|
8111
|
+
updateConnectionLookup(state.connectionLookup, edgeLookup.value, changedEdges);
|
|
8063
8112
|
return changedEdges;
|
|
8064
8113
|
};
|
|
8065
8114
|
const updateNode = (id2, nodeUpdate, options = { replace: false }) => {
|
|
@@ -8371,6 +8420,7 @@ const _sfc_main$f$1 = /* @__PURE__ */ defineComponent({
|
|
|
8371
8420
|
const type = toRef(() => props.type ?? "source");
|
|
8372
8421
|
const isValidConnection = toRef(() => props.isValidConnection ?? null);
|
|
8373
8422
|
const {
|
|
8423
|
+
id: flowId,
|
|
8374
8424
|
connectionStartHandle,
|
|
8375
8425
|
connectionClickStartHandle,
|
|
8376
8426
|
connectionEndHandle,
|
|
@@ -8386,13 +8436,13 @@ const _sfc_main$f$1 = /* @__PURE__ */ defineComponent({
|
|
|
8386
8436
|
const isConnecting = toRef(
|
|
8387
8437
|
() => {
|
|
8388
8438
|
var _a, _b, _c, _d, _e, _f;
|
|
8389
|
-
return ((_a = connectionStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionStartHandle.value) == null ? void 0 : _b.
|
|
8439
|
+
return ((_a = connectionStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionStartHandle.value) == null ? void 0 : _b.id) === __props.id && ((_c = connectionStartHandle.value) == null ? void 0 : _c.type) === type.value || ((_d = connectionEndHandle.value) == null ? void 0 : _d.nodeId) === nodeId && ((_e = connectionEndHandle.value) == null ? void 0 : _e.id) === __props.id && ((_f = connectionEndHandle.value) == null ? void 0 : _f.type) === type.value;
|
|
8390
8440
|
}
|
|
8391
8441
|
);
|
|
8392
8442
|
const isClickConnecting = toRef(
|
|
8393
8443
|
() => {
|
|
8394
8444
|
var _a, _b, _c;
|
|
8395
|
-
return ((_a = connectionClickStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionClickStartHandle.value) == null ? void 0 : _b.
|
|
8445
|
+
return ((_a = connectionClickStartHandle.value) == null ? void 0 : _a.nodeId) === nodeId && ((_b = connectionClickStartHandle.value) == null ? void 0 : _b.id) === __props.id && ((_c = connectionClickStartHandle.value) == null ? void 0 : _c.type) === type.value;
|
|
8396
8446
|
}
|
|
8397
8447
|
);
|
|
8398
8448
|
const { handlePointerDown, handleClick } = useHandle({
|
|
@@ -8447,6 +8497,8 @@ const _sfc_main$f$1 = /* @__PURE__ */ defineComponent({
|
|
|
8447
8497
|
position: __props.position,
|
|
8448
8498
|
x: (handleBounds.left - nodeBounds.left) / zoom2,
|
|
8449
8499
|
y: (handleBounds.top - nodeBounds.top) / zoom2,
|
|
8500
|
+
type: type.value,
|
|
8501
|
+
nodeId,
|
|
8450
8502
|
...getDimensions(handle2.value)
|
|
8451
8503
|
};
|
|
8452
8504
|
node2.handleBounds[type.value] = [...node2.handleBounds[type.value] ?? [], nextBounds];
|
|
@@ -8481,7 +8533,7 @@ const _sfc_main$f$1 = /* @__PURE__ */ defineComponent({
|
|
|
8481
8533
|
return openBlock(), createElementBlock("div", {
|
|
8482
8534
|
ref_key: "handle",
|
|
8483
8535
|
ref: handle2,
|
|
8484
|
-
"data-id": `${unref(nodeId)}-${__props.id}-${type.value}`,
|
|
8536
|
+
"data-id": `${unref(flowId)}-${unref(nodeId)}-${__props.id}-${type.value}`,
|
|
8485
8537
|
"data-handleid": __props.id,
|
|
8486
8538
|
"data-nodeid": unref(nodeId),
|
|
8487
8539
|
"data-handlepos": _ctx.position,
|
|
@@ -8648,15 +8700,13 @@ const _sfc_main$d$1 = /* @__PURE__ */ defineComponent({
|
|
|
8648
8700
|
markerStart: {},
|
|
8649
8701
|
markerEnd: {},
|
|
8650
8702
|
interactionWidth: { default: 20 },
|
|
8651
|
-
style: {},
|
|
8652
8703
|
labelStyle: {},
|
|
8653
|
-
labelShowBg: { type: Boolean
|
|
8704
|
+
labelShowBg: { type: Boolean },
|
|
8654
8705
|
labelBgStyle: {},
|
|
8655
8706
|
labelBgPadding: {},
|
|
8656
8707
|
labelBgBorderRadius: {}
|
|
8657
8708
|
},
|
|
8658
8709
|
setup(__props, { expose: __expose }) {
|
|
8659
|
-
const props = createPropsRestProxy(__props, ["interactionWidth", "labelShowBg"]);
|
|
8660
8710
|
const pathEl = ref(null);
|
|
8661
8711
|
const interactionEl = ref(null);
|
|
8662
8712
|
const labelEl = ref(null);
|
|
@@ -8668,16 +8718,15 @@ const _sfc_main$d$1 = /* @__PURE__ */ defineComponent({
|
|
|
8668
8718
|
});
|
|
8669
8719
|
return (_ctx, _cache) => {
|
|
8670
8720
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
8671
|
-
createBaseVNode("path", {
|
|
8721
|
+
createBaseVNode("path", mergeProps(unref(attrs), {
|
|
8672
8722
|
id: _ctx.id,
|
|
8673
8723
|
ref_key: "pathEl",
|
|
8674
8724
|
ref: pathEl,
|
|
8675
8725
|
d: _ctx.path,
|
|
8676
|
-
|
|
8677
|
-
class: normalizeClass(["vue-flow__edge-path", unref(attrs).class]),
|
|
8726
|
+
class: "vue-flow__edge-path",
|
|
8678
8727
|
"marker-end": _ctx.markerEnd,
|
|
8679
8728
|
"marker-start": _ctx.markerStart
|
|
8680
|
-
}, null,
|
|
8729
|
+
}), null, 16, _hoisted_1$7$1),
|
|
8681
8730
|
_ctx.interactionWidth ? (openBlock(), createElementBlock("path", {
|
|
8682
8731
|
key: 0,
|
|
8683
8732
|
ref_key: "interactionEl",
|
|
@@ -9397,7 +9446,7 @@ class Storage {
|
|
|
9397
9446
|
edgeLookup,
|
|
9398
9447
|
emits,
|
|
9399
9448
|
id: id2,
|
|
9400
|
-
vueFlowVersion: "1.
|
|
9449
|
+
vueFlowVersion: "1.42.1",
|
|
9401
9450
|
$destroy: () => {
|
|
9402
9451
|
this.remove(id2);
|
|
9403
9452
|
}
|
|
@@ -9645,13 +9694,14 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
|
|
|
9645
9694
|
multiSelectionKeyCode,
|
|
9646
9695
|
multiSelectionActive,
|
|
9647
9696
|
edgeLookup,
|
|
9648
|
-
nodeLookup
|
|
9697
|
+
nodeLookup,
|
|
9698
|
+
connectionLookup,
|
|
9699
|
+
defaultEdgeOptions
|
|
9649
9700
|
} = useVueFlow();
|
|
9650
9701
|
const container = ref(null);
|
|
9651
|
-
const
|
|
9652
|
-
const
|
|
9702
|
+
const selectedNodeIds = ref(/* @__PURE__ */ new Set());
|
|
9703
|
+
const selectedEdgeIds = ref(/* @__PURE__ */ new Set());
|
|
9653
9704
|
const containerBounds = ref();
|
|
9654
|
-
const edgeIdLookup = ref(/* @__PURE__ */ new Map());
|
|
9655
9705
|
const hasActiveSelection = toRef(() => elementsSelectable.value && (__props.isSelecting || userSelectionActive.value));
|
|
9656
9706
|
let selectionInProgress = false;
|
|
9657
9707
|
let selectionStarted = false;
|
|
@@ -9676,12 +9726,6 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
|
|
|
9676
9726
|
handler == null ? void 0 : handler(event);
|
|
9677
9727
|
};
|
|
9678
9728
|
}
|
|
9679
|
-
function resetUserSelection() {
|
|
9680
|
-
userSelectionActive.value = false;
|
|
9681
|
-
userSelectionRect.value = null;
|
|
9682
|
-
prevSelectedNodesCount.value = 0;
|
|
9683
|
-
prevSelectedEdgesCount.value = 0;
|
|
9684
|
-
}
|
|
9685
9729
|
function onClick(event) {
|
|
9686
9730
|
if (selectionInProgress) {
|
|
9687
9731
|
selectionInProgress = false;
|
|
@@ -9700,7 +9744,7 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
|
|
|
9700
9744
|
emits.paneScroll(event);
|
|
9701
9745
|
}
|
|
9702
9746
|
function onPointerDown(event) {
|
|
9703
|
-
var _a, _b, _c
|
|
9747
|
+
var _a, _b, _c;
|
|
9704
9748
|
containerBounds.value = (_a = vueFlowRef.value) == null ? void 0 : _a.getBoundingClientRect();
|
|
9705
9749
|
if (!elementsSelectable.value || !__props.isSelecting || event.button !== 0 || event.target !== container.value || !containerBounds.value) {
|
|
9706
9750
|
return;
|
|
@@ -9709,11 +9753,6 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
|
|
|
9709
9753
|
const { x, y } = getMousePosition(event, containerBounds.value);
|
|
9710
9754
|
selectionStarted = true;
|
|
9711
9755
|
selectionInProgress = false;
|
|
9712
|
-
edgeIdLookup.value = /* @__PURE__ */ new Map();
|
|
9713
|
-
for (const [id2, edge2] of edgeLookup.value) {
|
|
9714
|
-
edgeIdLookup.value.set(edge2.source, ((_d = edgeIdLookup.value.get(edge2.source)) == null ? void 0 : _d.add(id2)) || /* @__PURE__ */ new Set([id2]));
|
|
9715
|
-
edgeIdLookup.value.set(edge2.target, ((_e = edgeIdLookup.value.get(edge2.target)) == null ? void 0 : _e.add(id2)) || /* @__PURE__ */ new Set([id2]));
|
|
9716
|
-
}
|
|
9717
9756
|
removeSelectedElements();
|
|
9718
9757
|
userSelectionRect.value = {
|
|
9719
9758
|
width: 0,
|
|
@@ -9726,6 +9765,7 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
|
|
|
9726
9765
|
emits.selectionStart(event);
|
|
9727
9766
|
}
|
|
9728
9767
|
function onPointerMove(event) {
|
|
9768
|
+
var _a;
|
|
9729
9769
|
if (!containerBounds.value || !userSelectionRect.value) {
|
|
9730
9770
|
return;
|
|
9731
9771
|
}
|
|
@@ -9740,32 +9780,33 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
|
|
|
9740
9780
|
width: Math.abs(mouseX - startX),
|
|
9741
9781
|
height: Math.abs(mouseY - startY)
|
|
9742
9782
|
};
|
|
9743
|
-
const
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
viewport.value,
|
|
9747
|
-
|
|
9748
|
-
|
|
9783
|
+
const prevSelectedNodeIds = selectedNodeIds.value;
|
|
9784
|
+
const prevSelectedEdgeIds = selectedEdgeIds.value;
|
|
9785
|
+
selectedNodeIds.value = new Set(
|
|
9786
|
+
getNodesInside(nodes.value, nextUserSelectRect, viewport.value, selectionMode.value === SelectionMode.Partial, true).map(
|
|
9787
|
+
(node2) => node2.id
|
|
9788
|
+
)
|
|
9749
9789
|
);
|
|
9750
|
-
|
|
9751
|
-
const
|
|
9752
|
-
for (const
|
|
9753
|
-
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
|
|
9790
|
+
selectedEdgeIds.value = /* @__PURE__ */ new Set();
|
|
9791
|
+
const edgesSelectable = ((_a = defaultEdgeOptions.value) == null ? void 0 : _a.selectable) ?? true;
|
|
9792
|
+
for (const nodeId of selectedNodeIds.value) {
|
|
9793
|
+
const connections = connectionLookup.value.get(nodeId);
|
|
9794
|
+
if (!connections) {
|
|
9795
|
+
continue;
|
|
9796
|
+
}
|
|
9797
|
+
for (const { edgeId } of connections.values()) {
|
|
9798
|
+
const edge2 = edgeLookup.value.get(edgeId);
|
|
9799
|
+
if (edge2 && (edge2.selectable ?? edgesSelectable)) {
|
|
9800
|
+
selectedEdgeIds.value.add(edgeId);
|
|
9758
9801
|
}
|
|
9759
9802
|
}
|
|
9760
9803
|
}
|
|
9761
|
-
if (
|
|
9762
|
-
|
|
9763
|
-
const changes = getSelectionChanges(nodeLookup.value, selectedNodeIds, true);
|
|
9804
|
+
if (!areSetsEqual(prevSelectedNodeIds, selectedNodeIds.value)) {
|
|
9805
|
+
const changes = getSelectionChanges(nodeLookup.value, selectedNodeIds.value, true);
|
|
9764
9806
|
emits.nodesChange(changes);
|
|
9765
9807
|
}
|
|
9766
|
-
if (
|
|
9767
|
-
|
|
9768
|
-
const changes = getSelectionChanges(edgeLookup.value, selectedEdgeIds);
|
|
9808
|
+
if (!areSetsEqual(prevSelectedEdgeIds, selectedEdgeIds.value)) {
|
|
9809
|
+
const changes = getSelectionChanges(edgeLookup.value, selectedEdgeIds.value);
|
|
9769
9810
|
emits.edgesChange(changes);
|
|
9770
9811
|
}
|
|
9771
9812
|
userSelectionRect.value = nextUserSelectRect;
|
|
@@ -9781,10 +9822,9 @@ const _sfc_main$a$1 = /* @__PURE__ */ defineComponent({
|
|
|
9781
9822
|
if (!userSelectionActive.value && userSelectionRect.value && event.target === container.value) {
|
|
9782
9823
|
onClick(event);
|
|
9783
9824
|
}
|
|
9784
|
-
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
resetUserSelection();
|
|
9825
|
+
userSelectionActive.value = false;
|
|
9826
|
+
userSelectionRect.value = null;
|
|
9827
|
+
nodesSelectionActive.value = selectedNodeIds.value.size > 0;
|
|
9788
9828
|
emits.selectionEnd(event);
|
|
9789
9829
|
if (__props.selectionKeyPressed) {
|
|
9790
9830
|
selectionInProgress = false;
|
|
@@ -10322,14 +10362,14 @@ const EdgeWrapper = defineComponent({
|
|
|
10322
10362
|
} else {
|
|
10323
10363
|
sourceNodeHandles = [...sourceNode.handleBounds.source || [], ...sourceNode.handleBounds.target || []];
|
|
10324
10364
|
}
|
|
10325
|
-
const sourceHandle =
|
|
10365
|
+
const sourceHandle = getEdgeHandle(sourceNodeHandles, edge2.value.sourceHandle);
|
|
10326
10366
|
let targetNodeHandles;
|
|
10327
10367
|
if (connectionMode.value === ConnectionMode.Strict) {
|
|
10328
10368
|
targetNodeHandles = targetNode.handleBounds.target;
|
|
10329
10369
|
} else {
|
|
10330
10370
|
targetNodeHandles = [...targetNode.handleBounds.target || [], ...targetNode.handleBounds.source || []];
|
|
10331
10371
|
}
|
|
10332
|
-
const targetHandle =
|
|
10372
|
+
const targetHandle = getEdgeHandle(targetNodeHandles, edge2.value.targetHandle);
|
|
10333
10373
|
const sourcePosition = (sourceHandle == null ? void 0 : sourceHandle.position) || Position.Bottom;
|
|
10334
10374
|
const targetPosition = (targetHandle == null ? void 0 : targetHandle.position) || Position.Top;
|
|
10335
10375
|
const { x: sourceX, y: sourceY } = getHandlePosition(sourceNode, sourceHandle, sourcePosition);
|
|
@@ -10516,12 +10556,6 @@ const EdgeWrapper = defineComponent({
|
|
|
10516
10556
|
}
|
|
10517
10557
|
});
|
|
10518
10558
|
const EdgeWrapper$1 = EdgeWrapper;
|
|
10519
|
-
const oppositePosition = {
|
|
10520
|
-
[Position.Left]: Position.Right,
|
|
10521
|
-
[Position.Right]: Position.Left,
|
|
10522
|
-
[Position.Top]: Position.Bottom,
|
|
10523
|
-
[Position.Bottom]: Position.Top
|
|
10524
|
-
};
|
|
10525
10559
|
const ConnectionLine = defineComponent({
|
|
10526
10560
|
name: "ConnectionLine",
|
|
10527
10561
|
compatConfig: { MODE: 3 },
|
|
@@ -10562,11 +10596,11 @@ const ConnectionLine = defineComponent({
|
|
|
10562
10596
|
() => connectionLineOptions.value.markerEnd ? `url(#${getMarkerId(connectionLineOptions.value.markerEnd, id2)})` : ""
|
|
10563
10597
|
);
|
|
10564
10598
|
return () => {
|
|
10565
|
-
var _a2, _b, _c
|
|
10599
|
+
var _a2, _b, _c;
|
|
10566
10600
|
if (!fromNode.value || !connectionStartHandle.value) {
|
|
10567
10601
|
return null;
|
|
10568
10602
|
}
|
|
10569
|
-
const startHandleId = connectionStartHandle.value.
|
|
10603
|
+
const startHandleId = connectionStartHandle.value.id;
|
|
10570
10604
|
const handleType = connectionStartHandle.value.type;
|
|
10571
10605
|
const fromHandleBounds = fromNode.value.handleBounds;
|
|
10572
10606
|
let handleBounds = (fromHandleBounds == null ? void 0 : fromHandleBounds[handleType]) || [];
|
|
@@ -10581,24 +10615,24 @@ const ConnectionLine = defineComponent({
|
|
|
10581
10615
|
const fromPosition = (fromHandle == null ? void 0 : fromHandle.position) || Position.Top;
|
|
10582
10616
|
const { x: fromX, y: fromY } = getHandlePosition(fromNode.value, fromHandle, fromPosition);
|
|
10583
10617
|
let toHandle = null;
|
|
10584
|
-
if (toNode.value
|
|
10618
|
+
if (toNode.value) {
|
|
10585
10619
|
if (connectionMode.value === ConnectionMode.Strict) {
|
|
10586
|
-
toHandle = ((
|
|
10620
|
+
toHandle = ((_a2 = toNode.value.handleBounds[handleType === "source" ? "target" : "source"]) == null ? void 0 : _a2.find(
|
|
10587
10621
|
(d) => {
|
|
10588
10622
|
var _a3;
|
|
10589
|
-
return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.
|
|
10623
|
+
return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.id);
|
|
10590
10624
|
}
|
|
10591
10625
|
)) || null;
|
|
10592
10626
|
} else {
|
|
10593
|
-
toHandle = ((
|
|
10627
|
+
toHandle = ((_b = [...toNode.value.handleBounds.source || [], ...toNode.value.handleBounds.target || []]) == null ? void 0 : _b.find(
|
|
10594
10628
|
(d) => {
|
|
10595
10629
|
var _a3;
|
|
10596
|
-
return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.
|
|
10630
|
+
return d.id === ((_a3 = connectionEndHandle.value) == null ? void 0 : _a3.id);
|
|
10597
10631
|
}
|
|
10598
10632
|
)) || null;
|
|
10599
10633
|
}
|
|
10600
10634
|
}
|
|
10601
|
-
const toPosition = ((
|
|
10635
|
+
const toPosition = ((_c = connectionEndHandle.value) == null ? void 0 : _c.position) ?? (fromPosition ? oppositePosition[fromPosition] : null);
|
|
10602
10636
|
if (!fromPosition || !toPosition) {
|
|
10603
10637
|
return null;
|
|
10604
10638
|
}
|
|
@@ -11247,7 +11281,7 @@ function useStylesLoadedWarning() {
|
|
|
11247
11281
|
}
|
|
11248
11282
|
});
|
|
11249
11283
|
}
|
|
11250
|
-
const _hoisted_1$
|
|
11284
|
+
const _hoisted_1$c = /* @__PURE__ */ createBaseVNode("div", { class: "vue-flow__edge-labels" }, null, -1);
|
|
11251
11285
|
const __default__$1$2 = {
|
|
11252
11286
|
name: "VueFlow",
|
|
11253
11287
|
compatConfig: { MODE: 3 }
|
|
@@ -11340,7 +11374,7 @@ const _sfc_main$1$4 = /* @__PURE__ */ defineComponent({
|
|
|
11340
11374
|
createVNode(_sfc_main$8$1, null, {
|
|
11341
11375
|
default: withCtx(() => [
|
|
11342
11376
|
createVNode(_sfc_main$4$1),
|
|
11343
|
-
_hoisted_1$
|
|
11377
|
+
_hoisted_1$c,
|
|
11344
11378
|
createVNode(_sfc_main$2$1),
|
|
11345
11379
|
renderSlot(_ctx.$slots, "zoom-pane")
|
|
11346
11380
|
]),
|
|
@@ -11441,7 +11475,7 @@ function render$1(_ctx, _cache) {
|
|
|
11441
11475
|
return openBlock(), createElementBlock("svg", _hoisted_1$1$2, _hoisted_3$1$1);
|
|
11442
11476
|
}
|
|
11443
11477
|
const Lock = { render: render$1 };
|
|
11444
|
-
const _hoisted_1$
|
|
11478
|
+
const _hoisted_1$b = {
|
|
11445
11479
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11446
11480
|
viewBox: "0 0 25 32"
|
|
11447
11481
|
};
|
|
@@ -11450,7 +11484,7 @@ const _hoisted_3$5 = [
|
|
|
11450
11484
|
_hoisted_2$7
|
|
11451
11485
|
];
|
|
11452
11486
|
function render(_ctx, _cache) {
|
|
11453
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
11487
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$b, _hoisted_3$5);
|
|
11454
11488
|
}
|
|
11455
11489
|
const Unlock = { render };
|
|
11456
11490
|
const __default__$4 = {
|
|
@@ -11573,19 +11607,15 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
11573
11607
|
};
|
|
11574
11608
|
}
|
|
11575
11609
|
});
|
|
11576
|
-
const _hoisted_1$b = ["href"];
|
|
11577
11610
|
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
11578
11611
|
__name: "CanvasControlButtons",
|
|
11579
11612
|
props: {
|
|
11580
|
-
zoom: { default: 1 }
|
|
11581
|
-
showBugReportingButton: { type: Boolean, default: false }
|
|
11613
|
+
zoom: { default: 1 }
|
|
11582
11614
|
},
|
|
11583
11615
|
emits: ["reset-zoom", "zoom-in", "zoom-out", "zoom-to-fit"],
|
|
11584
11616
|
setup(__props, { emit: __emit }) {
|
|
11585
11617
|
const props = __props;
|
|
11586
11618
|
const emit = __emit;
|
|
11587
|
-
const { getReportingURL } = useBugReporting();
|
|
11588
|
-
const telemetry = useTelemetry();
|
|
11589
11619
|
const i18n2 = useI18n();
|
|
11590
11620
|
const isResetZoomVisible = computed(() => props.zoom !== 1);
|
|
11591
11621
|
function onResetZoom() {
|
|
@@ -11600,9 +11630,6 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
11600
11630
|
function onZoomToFit() {
|
|
11601
11631
|
emit("zoom-to-fit");
|
|
11602
11632
|
}
|
|
11603
|
-
function trackBugReport() {
|
|
11604
|
-
telemetry.track("User clicked bug report button in canvas", {}, { withPostHog: true });
|
|
11605
|
-
}
|
|
11606
11633
|
return (_ctx, _cache) => {
|
|
11607
11634
|
const _component_N8nIconButton = resolveComponent("N8nIconButton");
|
|
11608
11635
|
return openBlock(), createBlock(unref(_sfc_main$v), {
|
|
@@ -11670,26 +11697,6 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
11670
11697
|
})
|
|
11671
11698
|
]),
|
|
11672
11699
|
_: 1
|
|
11673
|
-
}, 8, ["label"])) : createCommentVNode("", true),
|
|
11674
|
-
props.showBugReportingButton ? (openBlock(), createBlock(KeyboardShortcutTooltip, {
|
|
11675
|
-
key: 1,
|
|
11676
|
-
label: unref(i18n2).baseText("nodeView.reportBug")
|
|
11677
|
-
}, {
|
|
11678
|
-
default: withCtx(() => [
|
|
11679
|
-
createBaseVNode("a", {
|
|
11680
|
-
href: unref(getReportingURL)(),
|
|
11681
|
-
target: "_blank",
|
|
11682
|
-
onClick: trackBugReport
|
|
11683
|
-
}, [
|
|
11684
|
-
createVNode(_component_N8nIconButton, {
|
|
11685
|
-
type: "tertiary",
|
|
11686
|
-
size: "large",
|
|
11687
|
-
icon: "bug",
|
|
11688
|
-
"data-test-id": "report-bug"
|
|
11689
|
-
})
|
|
11690
|
-
], 8, _hoisted_1$b)
|
|
11691
|
-
]),
|
|
11692
|
-
_: 1
|
|
11693
11700
|
}, 8, ["label"])) : createCommentVNode("", true)
|
|
11694
11701
|
]),
|
|
11695
11702
|
_: 1
|
|
@@ -11832,8 +11839,7 @@ var noop$1 = { value: () => {
|
|
|
11832
11839
|
} };
|
|
11833
11840
|
function dispatch$1() {
|
|
11834
11841
|
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
|
11835
|
-
if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t))
|
|
11836
|
-
throw new Error("illegal type: " + t);
|
|
11842
|
+
if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
|
|
11837
11843
|
_[t] = [];
|
|
11838
11844
|
}
|
|
11839
11845
|
return new Dispatch$1(_);
|
|
@@ -11844,10 +11850,8 @@ function Dispatch$1(_) {
|
|
|
11844
11850
|
function parseTypenames$1$1(typenames, types) {
|
|
11845
11851
|
return typenames.trim().split(/^|\s+/).map(function(t) {
|
|
11846
11852
|
var name = "", i = t.indexOf(".");
|
|
11847
|
-
if (i >= 0)
|
|
11848
|
-
|
|
11849
|
-
if (t && !types.hasOwnProperty(t))
|
|
11850
|
-
throw new Error("unknown type: " + t);
|
|
11853
|
+
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
11854
|
+
if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
|
11851
11855
|
return { type: t, name };
|
|
11852
11856
|
});
|
|
11853
11857
|
}
|
|
@@ -11856,42 +11860,29 @@ Dispatch$1.prototype = dispatch$1.prototype = {
|
|
|
11856
11860
|
on: function(typename, callback) {
|
|
11857
11861
|
var _ = this._, T = parseTypenames$1$1(typename + "", _), t, i = -1, n = T.length;
|
|
11858
11862
|
if (arguments.length < 2) {
|
|
11859
|
-
while (++i < n)
|
|
11860
|
-
if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name)))
|
|
11861
|
-
return t;
|
|
11863
|
+
while (++i < n) if ((t = (typename = T[i]).type) && (t = get$1(_[t], typename.name))) return t;
|
|
11862
11864
|
return;
|
|
11863
11865
|
}
|
|
11864
|
-
if (callback != null && typeof callback !== "function")
|
|
11865
|
-
throw new Error("invalid callback: " + callback);
|
|
11866
|
+
if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
|
|
11866
11867
|
while (++i < n) {
|
|
11867
|
-
if (t = (typename = T[i]).type)
|
|
11868
|
-
|
|
11869
|
-
else if (callback == null)
|
|
11870
|
-
for (t in _)
|
|
11871
|
-
_[t] = set$1(_[t], typename.name, null);
|
|
11868
|
+
if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback);
|
|
11869
|
+
else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null);
|
|
11872
11870
|
}
|
|
11873
11871
|
return this;
|
|
11874
11872
|
},
|
|
11875
11873
|
copy: function() {
|
|
11876
11874
|
var copy = {}, _ = this._;
|
|
11877
|
-
for (var t in _)
|
|
11878
|
-
copy[t] = _[t].slice();
|
|
11875
|
+
for (var t in _) copy[t] = _[t].slice();
|
|
11879
11876
|
return new Dispatch$1(copy);
|
|
11880
11877
|
},
|
|
11881
11878
|
call: function(type, that) {
|
|
11882
|
-
if ((n = arguments.length - 2) > 0)
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
if (!this._.hasOwnProperty(type))
|
|
11886
|
-
throw new Error("unknown type: " + type);
|
|
11887
|
-
for (t = this._[type], i = 0, n = t.length; i < n; ++i)
|
|
11888
|
-
t[i].value.apply(that, args);
|
|
11879
|
+
if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
|
|
11880
|
+
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
11881
|
+
for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
11889
11882
|
},
|
|
11890
11883
|
apply: function(type, that, args) {
|
|
11891
|
-
if (!this._.hasOwnProperty(type))
|
|
11892
|
-
|
|
11893
|
-
for (var t = this._[type], i = 0, n = t.length; i < n; ++i)
|
|
11894
|
-
t[i].value.apply(that, args);
|
|
11884
|
+
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
|
11885
|
+
for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
|
11895
11886
|
}
|
|
11896
11887
|
};
|
|
11897
11888
|
function get$1(type, name) {
|
|
@@ -11908,8 +11899,7 @@ function set$1(type, name, callback) {
|
|
|
11908
11899
|
break;
|
|
11909
11900
|
}
|
|
11910
11901
|
}
|
|
11911
|
-
if (callback != null)
|
|
11912
|
-
type.push({ name, value: callback });
|
|
11902
|
+
if (callback != null) type.push({ name, value: callback });
|
|
11913
11903
|
return type;
|
|
11914
11904
|
}
|
|
11915
11905
|
var xhtml$1 = "http://www.w3.org/1999/xhtml";
|
|
@@ -11922,8 +11912,7 @@ const namespaces$1 = {
|
|
|
11922
11912
|
};
|
|
11923
11913
|
function namespace$1(name) {
|
|
11924
11914
|
var prefix = name += "", i = prefix.indexOf(":");
|
|
11925
|
-
if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns")
|
|
11926
|
-
name = name.slice(i + 1);
|
|
11915
|
+
if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
|
|
11927
11916
|
return namespaces$1.hasOwnProperty(prefix) ? { space: namespaces$1[prefix], local: name } : name;
|
|
11928
11917
|
}
|
|
11929
11918
|
function creatorInherit$1(name) {
|
|
@@ -11949,13 +11938,11 @@ function selector$1(selector2) {
|
|
|
11949
11938
|
};
|
|
11950
11939
|
}
|
|
11951
11940
|
function selection_select$1(select2) {
|
|
11952
|
-
if (typeof select2 !== "function")
|
|
11953
|
-
select2 = selector$1(select2);
|
|
11941
|
+
if (typeof select2 !== "function") select2 = selector$1(select2);
|
|
11954
11942
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
11955
11943
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) {
|
|
11956
11944
|
if ((node2 = group[i]) && (subnode = select2.call(node2, node2.__data__, i, group))) {
|
|
11957
|
-
if ("__data__" in node2)
|
|
11958
|
-
subnode.__data__ = node2.__data__;
|
|
11945
|
+
if ("__data__" in node2) subnode.__data__ = node2.__data__;
|
|
11959
11946
|
subgroup[i] = subnode;
|
|
11960
11947
|
}
|
|
11961
11948
|
}
|
|
@@ -11979,10 +11966,8 @@ function arrayAll$1(select2) {
|
|
|
11979
11966
|
};
|
|
11980
11967
|
}
|
|
11981
11968
|
function selection_selectAll$1(select2) {
|
|
11982
|
-
if (typeof select2 === "function")
|
|
11983
|
-
|
|
11984
|
-
else
|
|
11985
|
-
select2 = selectorAll$1(select2);
|
|
11969
|
+
if (typeof select2 === "function") select2 = arrayAll$1(select2);
|
|
11970
|
+
else select2 = selectorAll$1(select2);
|
|
11986
11971
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
11987
11972
|
for (var group = groups[j], n = group.length, node2, i = 0; i < n; ++i) {
|
|
11988
11973
|
if (node2 = group[i]) {
|
|
@@ -12028,8 +12013,7 @@ function selection_selectChildren$1(match) {
|
|
|
12028
12013
|
return this.selectAll(match == null ? children$1 : childrenFilter$1(typeof match === "function" ? match : childMatcher$1(match)));
|
|
12029
12014
|
}
|
|
12030
12015
|
function selection_filter$1(match) {
|
|
12031
|
-
if (typeof match !== "function")
|
|
12032
|
-
match = matcher$1(match);
|
|
12016
|
+
if (typeof match !== "function") match = matcher$1(match);
|
|
12033
12017
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
12034
12018
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) {
|
|
12035
12019
|
if ((node2 = group[i]) && match.call(node2, node2.__data__, i, group)) {
|
|
@@ -12120,20 +12104,16 @@ function datum$1(node2) {
|
|
|
12120
12104
|
return node2.__data__;
|
|
12121
12105
|
}
|
|
12122
12106
|
function selection_data$1(value, key) {
|
|
12123
|
-
if (!arguments.length)
|
|
12124
|
-
return Array.from(this, datum$1);
|
|
12107
|
+
if (!arguments.length) return Array.from(this, datum$1);
|
|
12125
12108
|
var bind = key ? bindKey$1 : bindIndex$1, parents = this._parents, groups = this._groups;
|
|
12126
|
-
if (typeof value !== "function")
|
|
12127
|
-
value = constant$2(value);
|
|
12109
|
+
if (typeof value !== "function") value = constant$2(value);
|
|
12128
12110
|
for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
|
|
12129
12111
|
var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike$1(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
|
|
12130
12112
|
bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
|
|
12131
12113
|
for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
|
|
12132
12114
|
if (previous = enterGroup[i0]) {
|
|
12133
|
-
if (i0 >= i1)
|
|
12134
|
-
|
|
12135
|
-
while (!(next = updateGroup[i1]) && ++i1 < dataLength)
|
|
12136
|
-
;
|
|
12115
|
+
if (i0 >= i1) i1 = i0 + 1;
|
|
12116
|
+
while (!(next = updateGroup[i1]) && ++i1 < dataLength) ;
|
|
12137
12117
|
previous._next = next || null;
|
|
12138
12118
|
}
|
|
12139
12119
|
}
|
|
@@ -12153,20 +12133,16 @@ function selection_join$1(onenter, onupdate, onexit) {
|
|
|
12153
12133
|
var enter = this.enter(), update = this, exit = this.exit();
|
|
12154
12134
|
if (typeof onenter === "function") {
|
|
12155
12135
|
enter = onenter(enter);
|
|
12156
|
-
if (enter)
|
|
12157
|
-
enter = enter.selection();
|
|
12136
|
+
if (enter) enter = enter.selection();
|
|
12158
12137
|
} else {
|
|
12159
12138
|
enter = enter.append(onenter + "");
|
|
12160
12139
|
}
|
|
12161
12140
|
if (onupdate != null) {
|
|
12162
12141
|
update = onupdate(update);
|
|
12163
|
-
if (update)
|
|
12164
|
-
update = update.selection();
|
|
12142
|
+
if (update) update = update.selection();
|
|
12165
12143
|
}
|
|
12166
|
-
if (onexit == null)
|
|
12167
|
-
|
|
12168
|
-
else
|
|
12169
|
-
onexit(exit);
|
|
12144
|
+
if (onexit == null) exit.remove();
|
|
12145
|
+
else onexit(exit);
|
|
12170
12146
|
return enter && update ? enter.merge(update).order() : update;
|
|
12171
12147
|
}
|
|
12172
12148
|
function selection_merge$1(context) {
|
|
@@ -12187,8 +12163,7 @@ function selection_order$1() {
|
|
|
12187
12163
|
for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
|
|
12188
12164
|
for (var group = groups[j], i = group.length - 1, next = group[i], node2; --i >= 0; ) {
|
|
12189
12165
|
if (node2 = group[i]) {
|
|
12190
|
-
if (next && node2.compareDocumentPosition(next) ^ 4)
|
|
12191
|
-
next.parentNode.insertBefore(node2, next);
|
|
12166
|
+
if (next && node2.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node2, next);
|
|
12192
12167
|
next = node2;
|
|
12193
12168
|
}
|
|
12194
12169
|
}
|
|
@@ -12196,8 +12171,7 @@ function selection_order$1() {
|
|
|
12196
12171
|
return this;
|
|
12197
12172
|
}
|
|
12198
12173
|
function selection_sort$1(compare) {
|
|
12199
|
-
if (!compare)
|
|
12200
|
-
compare = ascending$1;
|
|
12174
|
+
if (!compare) compare = ascending$1;
|
|
12201
12175
|
function compareNode(a, b) {
|
|
12202
12176
|
return a && b ? compare(a.__data__, b.__data__) : !a - !b;
|
|
12203
12177
|
}
|
|
@@ -12227,16 +12201,14 @@ function selection_node$1() {
|
|
|
12227
12201
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
12228
12202
|
for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
|
|
12229
12203
|
var node2 = group[i];
|
|
12230
|
-
if (node2)
|
|
12231
|
-
return node2;
|
|
12204
|
+
if (node2) return node2;
|
|
12232
12205
|
}
|
|
12233
12206
|
}
|
|
12234
12207
|
return null;
|
|
12235
12208
|
}
|
|
12236
12209
|
function selection_size$1() {
|
|
12237
12210
|
let size = 0;
|
|
12238
|
-
for (const node2 of this)
|
|
12239
|
-
++size;
|
|
12211
|
+
for (const node2 of this) ++size;
|
|
12240
12212
|
return size;
|
|
12241
12213
|
}
|
|
12242
12214
|
function selection_empty$1() {
|
|
@@ -12245,8 +12217,7 @@ function selection_empty$1() {
|
|
|
12245
12217
|
function selection_each$1(callback) {
|
|
12246
12218
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
12247
12219
|
for (var group = groups[j], i = 0, n = group.length, node2; i < n; ++i) {
|
|
12248
|
-
if (node2 = group[i])
|
|
12249
|
-
callback.call(node2, node2.__data__, i, group);
|
|
12220
|
+
if (node2 = group[i]) callback.call(node2, node2.__data__, i, group);
|
|
12250
12221
|
}
|
|
12251
12222
|
}
|
|
12252
12223
|
return this;
|
|
@@ -12274,19 +12245,15 @@ function attrConstantNS$1(fullname, value) {
|
|
|
12274
12245
|
function attrFunction$1(name, value) {
|
|
12275
12246
|
return function() {
|
|
12276
12247
|
var v = value.apply(this, arguments);
|
|
12277
|
-
if (v == null)
|
|
12278
|
-
|
|
12279
|
-
else
|
|
12280
|
-
this.setAttribute(name, v);
|
|
12248
|
+
if (v == null) this.removeAttribute(name);
|
|
12249
|
+
else this.setAttribute(name, v);
|
|
12281
12250
|
};
|
|
12282
12251
|
}
|
|
12283
12252
|
function attrFunctionNS$1(fullname, value) {
|
|
12284
12253
|
return function() {
|
|
12285
12254
|
var v = value.apply(this, arguments);
|
|
12286
|
-
if (v == null)
|
|
12287
|
-
|
|
12288
|
-
else
|
|
12289
|
-
this.setAttributeNS(fullname.space, fullname.local, v);
|
|
12255
|
+
if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
|
|
12256
|
+
else this.setAttributeNS(fullname.space, fullname.local, v);
|
|
12290
12257
|
};
|
|
12291
12258
|
}
|
|
12292
12259
|
function selection_attr$1(name, value) {
|
|
@@ -12313,10 +12280,8 @@ function styleConstant$1(name, value, priority) {
|
|
|
12313
12280
|
function styleFunction$1(name, value, priority) {
|
|
12314
12281
|
return function() {
|
|
12315
12282
|
var v = value.apply(this, arguments);
|
|
12316
|
-
if (v == null)
|
|
12317
|
-
|
|
12318
|
-
else
|
|
12319
|
-
this.style.setProperty(name, v, priority);
|
|
12283
|
+
if (v == null) this.style.removeProperty(name);
|
|
12284
|
+
else this.style.setProperty(name, v, priority);
|
|
12320
12285
|
};
|
|
12321
12286
|
}
|
|
12322
12287
|
function selection_style$1(name, value, priority) {
|
|
@@ -12338,10 +12303,8 @@ function propertyConstant$1(name, value) {
|
|
|
12338
12303
|
function propertyFunction$1(name, value) {
|
|
12339
12304
|
return function() {
|
|
12340
12305
|
var v = value.apply(this, arguments);
|
|
12341
|
-
if (v == null)
|
|
12342
|
-
|
|
12343
|
-
else
|
|
12344
|
-
this[name] = v;
|
|
12306
|
+
if (v == null) delete this[name];
|
|
12307
|
+
else this[name] = v;
|
|
12345
12308
|
};
|
|
12346
12309
|
}
|
|
12347
12310
|
function selection_property$1(name, value) {
|
|
@@ -12378,13 +12341,11 @@ ClassList$1.prototype = {
|
|
|
12378
12341
|
};
|
|
12379
12342
|
function classedAdd$1(node2, names) {
|
|
12380
12343
|
var list = classList$1(node2), i = -1, n = names.length;
|
|
12381
|
-
while (++i < n)
|
|
12382
|
-
list.add(names[i]);
|
|
12344
|
+
while (++i < n) list.add(names[i]);
|
|
12383
12345
|
}
|
|
12384
12346
|
function classedRemove$1(node2, names) {
|
|
12385
12347
|
var list = classList$1(node2), i = -1, n = names.length;
|
|
12386
|
-
while (++i < n)
|
|
12387
|
-
list.remove(names[i]);
|
|
12348
|
+
while (++i < n) list.remove(names[i]);
|
|
12388
12349
|
}
|
|
12389
12350
|
function classedTrue$1(names) {
|
|
12390
12351
|
return function() {
|
|
@@ -12405,9 +12366,7 @@ function selection_classed$1(name, value) {
|
|
|
12405
12366
|
var names = classArray$1(name + "");
|
|
12406
12367
|
if (arguments.length < 2) {
|
|
12407
12368
|
var list = classList$1(this.node()), i = -1, n = names.length;
|
|
12408
|
-
while (++i < n)
|
|
12409
|
-
if (!list.contains(names[i]))
|
|
12410
|
-
return false;
|
|
12369
|
+
while (++i < n) if (!list.contains(names[i])) return false;
|
|
12411
12370
|
return true;
|
|
12412
12371
|
}
|
|
12413
12372
|
return this.each((typeof value === "function" ? classedFunction$1 : value ? classedTrue$1 : classedFalse$1)(names, value));
|
|
@@ -12447,15 +12406,13 @@ function selection_html$1(value) {
|
|
|
12447
12406
|
return arguments.length ? this.each(value == null ? htmlRemove$1 : (typeof value === "function" ? htmlFunction$1 : htmlConstant$1)(value)) : this.node().innerHTML;
|
|
12448
12407
|
}
|
|
12449
12408
|
function raise$1() {
|
|
12450
|
-
if (this.nextSibling)
|
|
12451
|
-
this.parentNode.appendChild(this);
|
|
12409
|
+
if (this.nextSibling) this.parentNode.appendChild(this);
|
|
12452
12410
|
}
|
|
12453
12411
|
function selection_raise$1() {
|
|
12454
12412
|
return this.each(raise$1);
|
|
12455
12413
|
}
|
|
12456
12414
|
function lower$1() {
|
|
12457
|
-
if (this.previousSibling)
|
|
12458
|
-
this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
12415
|
+
if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
12459
12416
|
}
|
|
12460
12417
|
function selection_lower$1() {
|
|
12461
12418
|
return this.each(lower$1);
|
|
@@ -12477,8 +12434,7 @@ function selection_insert$1(name, before) {
|
|
|
12477
12434
|
}
|
|
12478
12435
|
function remove$1() {
|
|
12479
12436
|
var parent = this.parentNode;
|
|
12480
|
-
if (parent)
|
|
12481
|
-
parent.removeChild(this);
|
|
12437
|
+
if (parent) parent.removeChild(this);
|
|
12482
12438
|
}
|
|
12483
12439
|
function selection_remove$1() {
|
|
12484
12440
|
return this.each(remove$1);
|
|
@@ -12505,16 +12461,14 @@ function contextListener$1(listener) {
|
|
|
12505
12461
|
function parseTypenames$2(typenames) {
|
|
12506
12462
|
return typenames.trim().split(/^|\s+/).map(function(t) {
|
|
12507
12463
|
var name = "", i = t.indexOf(".");
|
|
12508
|
-
if (i >= 0)
|
|
12509
|
-
name = t.slice(i + 1), t = t.slice(0, i);
|
|
12464
|
+
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
|
12510
12465
|
return { type: t, name };
|
|
12511
12466
|
});
|
|
12512
12467
|
}
|
|
12513
12468
|
function onRemove$1(typename) {
|
|
12514
12469
|
return function() {
|
|
12515
12470
|
var on = this.__on;
|
|
12516
|
-
if (!on)
|
|
12517
|
-
return;
|
|
12471
|
+
if (!on) return;
|
|
12518
12472
|
for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
|
|
12519
12473
|
if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
|
|
12520
12474
|
this.removeEventListener(o.type, o.listener, o.options);
|
|
@@ -12522,49 +12476,42 @@ function onRemove$1(typename) {
|
|
|
12522
12476
|
on[++i] = o;
|
|
12523
12477
|
}
|
|
12524
12478
|
}
|
|
12525
|
-
if (++i)
|
|
12526
|
-
|
|
12527
|
-
else
|
|
12528
|
-
delete this.__on;
|
|
12479
|
+
if (++i) on.length = i;
|
|
12480
|
+
else delete this.__on;
|
|
12529
12481
|
};
|
|
12530
12482
|
}
|
|
12531
12483
|
function onAdd$1(typename, value, options) {
|
|
12532
12484
|
return function() {
|
|
12533
12485
|
var on = this.__on, o, listener = contextListener$1(value);
|
|
12534
|
-
if (on)
|
|
12535
|
-
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
return;
|
|
12541
|
-
}
|
|
12486
|
+
if (on) for (var j = 0, m = on.length; j < m; ++j) {
|
|
12487
|
+
if ((o = on[j]).type === typename.type && o.name === typename.name) {
|
|
12488
|
+
this.removeEventListener(o.type, o.listener, o.options);
|
|
12489
|
+
this.addEventListener(o.type, o.listener = listener, o.options = options);
|
|
12490
|
+
o.value = value;
|
|
12491
|
+
return;
|
|
12542
12492
|
}
|
|
12493
|
+
}
|
|
12543
12494
|
this.addEventListener(typename.type, listener, options);
|
|
12544
12495
|
o = { type: typename.type, name: typename.name, value, listener, options };
|
|
12545
|
-
if (!on)
|
|
12546
|
-
|
|
12547
|
-
else
|
|
12548
|
-
on.push(o);
|
|
12496
|
+
if (!on) this.__on = [o];
|
|
12497
|
+
else on.push(o);
|
|
12549
12498
|
};
|
|
12550
12499
|
}
|
|
12551
12500
|
function selection_on$1(typename, value, options) {
|
|
12552
12501
|
var typenames = parseTypenames$2(typename + ""), i, n = typenames.length, t;
|
|
12553
12502
|
if (arguments.length < 2) {
|
|
12554
12503
|
var on = this.node().__on;
|
|
12555
|
-
if (on)
|
|
12556
|
-
for (
|
|
12557
|
-
|
|
12558
|
-
|
|
12559
|
-
return o.value;
|
|
12560
|
-
}
|
|
12504
|
+
if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
|
|
12505
|
+
for (i = 0, o = on[j]; i < n; ++i) {
|
|
12506
|
+
if ((t = typenames[i]).type === o.type && t.name === o.name) {
|
|
12507
|
+
return o.value;
|
|
12561
12508
|
}
|
|
12562
12509
|
}
|
|
12510
|
+
}
|
|
12563
12511
|
return;
|
|
12564
12512
|
}
|
|
12565
12513
|
on = value ? onAdd$1 : onRemove$1;
|
|
12566
|
-
for (i = 0; i < n; ++i)
|
|
12567
|
-
this.each(on(typenames[i], value, options));
|
|
12514
|
+
for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
|
|
12568
12515
|
return this;
|
|
12569
12516
|
}
|
|
12570
12517
|
function dispatchEvent$1(node2, type, params) {
|
|
@@ -12573,10 +12520,8 @@ function dispatchEvent$1(node2, type, params) {
|
|
|
12573
12520
|
event = new event(type, params);
|
|
12574
12521
|
} else {
|
|
12575
12522
|
event = window2.document.createEvent("Event");
|
|
12576
|
-
if (params)
|
|
12577
|
-
|
|
12578
|
-
else
|
|
12579
|
-
event.initEvent(type, false, false);
|
|
12523
|
+
if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
|
|
12524
|
+
else event.initEvent(type, false, false);
|
|
12580
12525
|
}
|
|
12581
12526
|
node2.dispatchEvent(event);
|
|
12582
12527
|
}
|
|
@@ -12596,8 +12541,7 @@ function selection_dispatch$1(type, params) {
|
|
|
12596
12541
|
function* selection_iterator$1() {
|
|
12597
12542
|
for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
|
|
12598
12543
|
for (var group = groups[j], i = 0, n = group.length, node2; i < n; ++i) {
|
|
12599
|
-
if (node2 = group[i])
|
|
12600
|
-
yield node2;
|
|
12544
|
+
if (node2 = group[i]) yield node2;
|
|
12601
12545
|
}
|
|
12602
12546
|
}
|
|
12603
12547
|
}
|
|
@@ -12655,14 +12599,12 @@ function select$1(selector2) {
|
|
|
12655
12599
|
}
|
|
12656
12600
|
function sourceEvent$1(event) {
|
|
12657
12601
|
let sourceEvent2;
|
|
12658
|
-
while (sourceEvent2 = event.sourceEvent)
|
|
12659
|
-
event = sourceEvent2;
|
|
12602
|
+
while (sourceEvent2 = event.sourceEvent) event = sourceEvent2;
|
|
12660
12603
|
return event;
|
|
12661
12604
|
}
|
|
12662
12605
|
function pointer$1(event, node2) {
|
|
12663
12606
|
event = sourceEvent$1(event);
|
|
12664
|
-
if (node2 === void 0)
|
|
12665
|
-
node2 = event.currentTarget;
|
|
12607
|
+
if (node2 === void 0) node2 = event.currentTarget;
|
|
12666
12608
|
if (node2) {
|
|
12667
12609
|
var svg = node2.ownerSVGElement || node2;
|
|
12668
12610
|
if (svg.createSVGPoint) {
|
|
@@ -12713,8 +12655,7 @@ function define(constructor, factory, prototype) {
|
|
|
12713
12655
|
}
|
|
12714
12656
|
function extend(parent, definition) {
|
|
12715
12657
|
var prototype = Object.create(parent.prototype);
|
|
12716
|
-
for (var key in definition)
|
|
12717
|
-
prototype[key] = definition[key];
|
|
12658
|
+
for (var key in definition) prototype[key] = definition[key];
|
|
12718
12659
|
return prototype;
|
|
12719
12660
|
}
|
|
12720
12661
|
function Color() {
|
|
@@ -12908,15 +12849,12 @@ function rgbn(n) {
|
|
|
12908
12849
|
return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
|
|
12909
12850
|
}
|
|
12910
12851
|
function rgba(r, g, b, a) {
|
|
12911
|
-
if (a <= 0)
|
|
12912
|
-
r = g = b = NaN;
|
|
12852
|
+
if (a <= 0) r = g = b = NaN;
|
|
12913
12853
|
return new Rgb(r, g, b, a);
|
|
12914
12854
|
}
|
|
12915
12855
|
function rgbConvert(o) {
|
|
12916
|
-
if (!(o instanceof Color))
|
|
12917
|
-
|
|
12918
|
-
if (!o)
|
|
12919
|
-
return new Rgb();
|
|
12856
|
+
if (!(o instanceof Color)) o = color$1(o);
|
|
12857
|
+
if (!o) return new Rgb();
|
|
12920
12858
|
o = o.rgb();
|
|
12921
12859
|
return new Rgb(o.r, o.g, o.b, o.opacity);
|
|
12922
12860
|
}
|
|
@@ -12975,32 +12913,22 @@ function hex(value) {
|
|
|
12975
12913
|
return (value < 16 ? "0" : "") + value.toString(16);
|
|
12976
12914
|
}
|
|
12977
12915
|
function hsla(h2, s, l, a) {
|
|
12978
|
-
if (a <= 0)
|
|
12979
|
-
|
|
12980
|
-
else if (
|
|
12981
|
-
h2 = s = NaN;
|
|
12982
|
-
else if (s <= 0)
|
|
12983
|
-
h2 = NaN;
|
|
12916
|
+
if (a <= 0) h2 = s = l = NaN;
|
|
12917
|
+
else if (l <= 0 || l >= 1) h2 = s = NaN;
|
|
12918
|
+
else if (s <= 0) h2 = NaN;
|
|
12984
12919
|
return new Hsl(h2, s, l, a);
|
|
12985
12920
|
}
|
|
12986
12921
|
function hslConvert(o) {
|
|
12987
|
-
if (o instanceof Hsl)
|
|
12988
|
-
|
|
12989
|
-
if (!
|
|
12990
|
-
|
|
12991
|
-
if (!o)
|
|
12992
|
-
return new Hsl();
|
|
12993
|
-
if (o instanceof Hsl)
|
|
12994
|
-
return o;
|
|
12922
|
+
if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
|
|
12923
|
+
if (!(o instanceof Color)) o = color$1(o);
|
|
12924
|
+
if (!o) return new Hsl();
|
|
12925
|
+
if (o instanceof Hsl) return o;
|
|
12995
12926
|
o = o.rgb();
|
|
12996
12927
|
var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h2 = NaN, s = max - min, l = (max + min) / 2;
|
|
12997
12928
|
if (s) {
|
|
12998
|
-
if (r === max)
|
|
12999
|
-
|
|
13000
|
-
else
|
|
13001
|
-
h2 = (b - r) / s + 2;
|
|
13002
|
-
else
|
|
13003
|
-
h2 = (r - g) / s + 4;
|
|
12929
|
+
if (r === max) h2 = (g - b) / s + (g < b) * 6;
|
|
12930
|
+
else if (g === max) h2 = (b - r) / s + 2;
|
|
12931
|
+
else h2 = (r - g) / s + 4;
|
|
13004
12932
|
s /= l < 0.5 ? max + min : 2 - max - min;
|
|
13005
12933
|
h2 *= 60;
|
|
13006
12934
|
} else {
|
|
@@ -13113,16 +13041,12 @@ function interpolateString(a, b) {
|
|
|
13113
13041
|
while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
|
|
13114
13042
|
if ((bs = bm.index) > bi) {
|
|
13115
13043
|
bs = b.slice(bi, bs);
|
|
13116
|
-
if (s[i])
|
|
13117
|
-
|
|
13118
|
-
else
|
|
13119
|
-
s[++i] = bs;
|
|
13044
|
+
if (s[i]) s[i] += bs;
|
|
13045
|
+
else s[++i] = bs;
|
|
13120
13046
|
}
|
|
13121
13047
|
if ((am = am[0]) === (bm = bm[0])) {
|
|
13122
|
-
if (s[i])
|
|
13123
|
-
|
|
13124
|
-
else
|
|
13125
|
-
s[++i] = bm;
|
|
13048
|
+
if (s[i]) s[i] += bm;
|
|
13049
|
+
else s[++i] = bm;
|
|
13126
13050
|
} else {
|
|
13127
13051
|
s[++i] = null;
|
|
13128
13052
|
q.push({ i, x: interpolateNumber(am, bm) });
|
|
@@ -13131,14 +13055,11 @@ function interpolateString(a, b) {
|
|
|
13131
13055
|
}
|
|
13132
13056
|
if (bi < b.length) {
|
|
13133
13057
|
bs = b.slice(bi);
|
|
13134
|
-
if (s[i])
|
|
13135
|
-
|
|
13136
|
-
else
|
|
13137
|
-
s[++i] = bs;
|
|
13058
|
+
if (s[i]) s[i] += bs;
|
|
13059
|
+
else s[++i] = bs;
|
|
13138
13060
|
}
|
|
13139
13061
|
return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function(t) {
|
|
13140
|
-
for (var i2 = 0, o; i2 < b; ++i2)
|
|
13141
|
-
s[(o = q[i2]).i] = o.x(t);
|
|
13062
|
+
for (var i2 = 0, o; i2 < b; ++i2) s[(o = q[i2]).i] = o.x(t);
|
|
13142
13063
|
return s.join("");
|
|
13143
13064
|
});
|
|
13144
13065
|
}
|
|
@@ -13153,14 +13074,10 @@ var identity$1 = {
|
|
|
13153
13074
|
};
|
|
13154
13075
|
function decompose(a, b, c, d, e, f) {
|
|
13155
13076
|
var scaleX, scaleY, skewX;
|
|
13156
|
-
if (scaleX = Math.sqrt(a * a + b * b))
|
|
13157
|
-
|
|
13158
|
-
if (
|
|
13159
|
-
|
|
13160
|
-
if (scaleY = Math.sqrt(c * c + d * d))
|
|
13161
|
-
c /= scaleY, d /= scaleY, skewX /= scaleY;
|
|
13162
|
-
if (a * d < b * c)
|
|
13163
|
-
a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
|
|
13077
|
+
if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
|
|
13078
|
+
if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
|
|
13079
|
+
if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
|
|
13080
|
+
if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
|
|
13164
13081
|
return {
|
|
13165
13082
|
translateX: e,
|
|
13166
13083
|
translateY: f,
|
|
@@ -13176,13 +13093,10 @@ function parseCss(value) {
|
|
|
13176
13093
|
return m.isIdentity ? identity$1 : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
|
|
13177
13094
|
}
|
|
13178
13095
|
function parseSvg(value) {
|
|
13179
|
-
if (value == null)
|
|
13180
|
-
|
|
13181
|
-
if (!svgNode)
|
|
13182
|
-
svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
13096
|
+
if (value == null) return identity$1;
|
|
13097
|
+
if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
13183
13098
|
svgNode.setAttribute("transform", value);
|
|
13184
|
-
if (!(value = svgNode.transform.baseVal.consolidate()))
|
|
13185
|
-
return identity$1;
|
|
13099
|
+
if (!(value = svgNode.transform.baseVal.consolidate())) return identity$1;
|
|
13186
13100
|
value = value.matrix;
|
|
13187
13101
|
return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
|
|
13188
13102
|
}
|
|
@@ -13200,10 +13114,8 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
|
13200
13114
|
}
|
|
13201
13115
|
function rotate(a, b, s, q) {
|
|
13202
13116
|
if (a !== b) {
|
|
13203
|
-
if (a - b > 180)
|
|
13204
|
-
|
|
13205
|
-
else if (b - a > 180)
|
|
13206
|
-
a += 360;
|
|
13117
|
+
if (a - b > 180) b += 360;
|
|
13118
|
+
else if (b - a > 180) a += 360;
|
|
13207
13119
|
q.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a, b) });
|
|
13208
13120
|
} else if (b) {
|
|
13209
13121
|
s.push(pop(s) + "rotate(" + b + degParen);
|
|
@@ -13234,8 +13146,7 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
|
|
|
13234
13146
|
a = b = null;
|
|
13235
13147
|
return function(t) {
|
|
13236
13148
|
var i = -1, n = q.length, o;
|
|
13237
|
-
while (++i < n)
|
|
13238
|
-
s[(o = q[i]).i] = o.x(t);
|
|
13149
|
+
while (++i < n) s[(o = q[i]).i] = o.x(t);
|
|
13239
13150
|
return s.join("");
|
|
13240
13151
|
};
|
|
13241
13152
|
};
|
|
@@ -13300,14 +13211,11 @@ function Timer() {
|
|
|
13300
13211
|
Timer.prototype = timer.prototype = {
|
|
13301
13212
|
constructor: Timer,
|
|
13302
13213
|
restart: function(callback, delay, time) {
|
|
13303
|
-
if (typeof callback !== "function")
|
|
13304
|
-
throw new TypeError("callback is not a function");
|
|
13214
|
+
if (typeof callback !== "function") throw new TypeError("callback is not a function");
|
|
13305
13215
|
time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
|
|
13306
13216
|
if (!this._next && taskTail !== this) {
|
|
13307
|
-
if (taskTail)
|
|
13308
|
-
|
|
13309
|
-
else
|
|
13310
|
-
taskHead = this;
|
|
13217
|
+
if (taskTail) taskTail._next = this;
|
|
13218
|
+
else taskHead = this;
|
|
13311
13219
|
taskTail = this;
|
|
13312
13220
|
}
|
|
13313
13221
|
this._call = callback;
|
|
@@ -13332,8 +13240,7 @@ function timerFlush() {
|
|
|
13332
13240
|
++frame;
|
|
13333
13241
|
var t = taskHead, e;
|
|
13334
13242
|
while (t) {
|
|
13335
|
-
if ((e = clockNow - t._time) >= 0)
|
|
13336
|
-
t._call.call(void 0, e);
|
|
13243
|
+
if ((e = clockNow - t._time) >= 0) t._call.call(void 0, e);
|
|
13337
13244
|
t = t._next;
|
|
13338
13245
|
}
|
|
13339
13246
|
--frame;
|
|
@@ -13351,15 +13258,13 @@ function wake() {
|
|
|
13351
13258
|
}
|
|
13352
13259
|
function poke() {
|
|
13353
13260
|
var now2 = clock.now(), delay = now2 - clockLast;
|
|
13354
|
-
if (delay > pokeDelay)
|
|
13355
|
-
clockSkew -= delay, clockLast = now2;
|
|
13261
|
+
if (delay > pokeDelay) clockSkew -= delay, clockLast = now2;
|
|
13356
13262
|
}
|
|
13357
13263
|
function nap() {
|
|
13358
13264
|
var t0, t1 = taskHead, t2, time = Infinity;
|
|
13359
13265
|
while (t1) {
|
|
13360
13266
|
if (t1._call) {
|
|
13361
|
-
if (time > t1._time)
|
|
13362
|
-
time = t1._time;
|
|
13267
|
+
if (time > t1._time) time = t1._time;
|
|
13363
13268
|
t0 = t1, t1 = t1._next;
|
|
13364
13269
|
} else {
|
|
13365
13270
|
t2 = t1._next, t1._next = null;
|
|
@@ -13370,19 +13275,14 @@ function nap() {
|
|
|
13370
13275
|
sleep(time);
|
|
13371
13276
|
}
|
|
13372
13277
|
function sleep(time) {
|
|
13373
|
-
if (frame)
|
|
13374
|
-
|
|
13375
|
-
if (timeout$1)
|
|
13376
|
-
timeout$1 = clearTimeout(timeout$1);
|
|
13278
|
+
if (frame) return;
|
|
13279
|
+
if (timeout$1) timeout$1 = clearTimeout(timeout$1);
|
|
13377
13280
|
var delay = time - clockNow;
|
|
13378
13281
|
if (delay > 24) {
|
|
13379
|
-
if (time < Infinity)
|
|
13380
|
-
|
|
13381
|
-
if (interval)
|
|
13382
|
-
interval = clearInterval(interval);
|
|
13282
|
+
if (time < Infinity) timeout$1 = setTimeout(wake, time - clock.now() - clockSkew);
|
|
13283
|
+
if (interval) interval = clearInterval(interval);
|
|
13383
13284
|
} else {
|
|
13384
|
-
if (!interval)
|
|
13385
|
-
clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
|
|
13285
|
+
if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
|
|
13386
13286
|
frame = 1, setFrame(wake);
|
|
13387
13287
|
}
|
|
13388
13288
|
}
|
|
@@ -13406,10 +13306,8 @@ var ENDING = 5;
|
|
|
13406
13306
|
var ENDED = 6;
|
|
13407
13307
|
function schedule(node2, name, id2, index, group, timing) {
|
|
13408
13308
|
var schedules = node2.__transition;
|
|
13409
|
-
if (!schedules)
|
|
13410
|
-
|
|
13411
|
-
else if (id2 in schedules)
|
|
13412
|
-
return;
|
|
13309
|
+
if (!schedules) node2.__transition = {};
|
|
13310
|
+
else if (id2 in schedules) return;
|
|
13413
13311
|
create(node2, id2, {
|
|
13414
13312
|
name,
|
|
13415
13313
|
index,
|
|
@@ -13428,20 +13326,17 @@ function schedule(node2, name, id2, index, group, timing) {
|
|
|
13428
13326
|
}
|
|
13429
13327
|
function init(node2, id2) {
|
|
13430
13328
|
var schedule2 = get$2(node2, id2);
|
|
13431
|
-
if (schedule2.state > CREATED)
|
|
13432
|
-
throw new Error("too late; already scheduled");
|
|
13329
|
+
if (schedule2.state > CREATED) throw new Error("too late; already scheduled");
|
|
13433
13330
|
return schedule2;
|
|
13434
13331
|
}
|
|
13435
13332
|
function set$2(node2, id2) {
|
|
13436
13333
|
var schedule2 = get$2(node2, id2);
|
|
13437
|
-
if (schedule2.state > STARTED)
|
|
13438
|
-
throw new Error("too late; already running");
|
|
13334
|
+
if (schedule2.state > STARTED) throw new Error("too late; already running");
|
|
13439
13335
|
return schedule2;
|
|
13440
13336
|
}
|
|
13441
13337
|
function get$2(node2, id2) {
|
|
13442
13338
|
var schedule2 = node2.__transition;
|
|
13443
|
-
if (!schedule2 || !(schedule2 = schedule2[id2]))
|
|
13444
|
-
throw new Error("transition not found");
|
|
13339
|
+
if (!schedule2 || !(schedule2 = schedule2[id2])) throw new Error("transition not found");
|
|
13445
13340
|
return schedule2;
|
|
13446
13341
|
}
|
|
13447
13342
|
function create(node2, id2, self) {
|
|
@@ -13451,19 +13346,15 @@ function create(node2, id2, self) {
|
|
|
13451
13346
|
function schedule2(elapsed) {
|
|
13452
13347
|
self.state = SCHEDULED;
|
|
13453
13348
|
self.timer.restart(start2, self.delay, self.time);
|
|
13454
|
-
if (self.delay <= elapsed)
|
|
13455
|
-
start2(elapsed - self.delay);
|
|
13349
|
+
if (self.delay <= elapsed) start2(elapsed - self.delay);
|
|
13456
13350
|
}
|
|
13457
13351
|
function start2(elapsed) {
|
|
13458
13352
|
var i, j, n, o;
|
|
13459
|
-
if (self.state !== SCHEDULED)
|
|
13460
|
-
return stop();
|
|
13353
|
+
if (self.state !== SCHEDULED) return stop();
|
|
13461
13354
|
for (i in schedules) {
|
|
13462
13355
|
o = schedules[i];
|
|
13463
|
-
if (o.name !== self.name)
|
|
13464
|
-
|
|
13465
|
-
if (o.state === STARTED)
|
|
13466
|
-
return timeout(start2);
|
|
13356
|
+
if (o.name !== self.name) continue;
|
|
13357
|
+
if (o.state === STARTED) return timeout(start2);
|
|
13467
13358
|
if (o.state === RUNNING) {
|
|
13468
13359
|
o.state = ENDED;
|
|
13469
13360
|
o.timer.stop();
|
|
@@ -13485,8 +13376,7 @@ function create(node2, id2, self) {
|
|
|
13485
13376
|
});
|
|
13486
13377
|
self.state = STARTING;
|
|
13487
13378
|
self.on.call("start", node2, node2.__data__, self.index, self.group);
|
|
13488
|
-
if (self.state !== STARTING)
|
|
13489
|
-
return;
|
|
13379
|
+
if (self.state !== STARTING) return;
|
|
13490
13380
|
self.state = STARTED;
|
|
13491
13381
|
tween = new Array(n = self.tween.length);
|
|
13492
13382
|
for (i = 0, j = -1; i < n; ++i) {
|
|
@@ -13510,15 +13400,13 @@ function create(node2, id2, self) {
|
|
|
13510
13400
|
self.state = ENDED;
|
|
13511
13401
|
self.timer.stop();
|
|
13512
13402
|
delete schedules[id2];
|
|
13513
|
-
for (var i in schedules)
|
|
13514
|
-
return;
|
|
13403
|
+
for (var i in schedules) return;
|
|
13515
13404
|
delete node2.__transition;
|
|
13516
13405
|
}
|
|
13517
13406
|
}
|
|
13518
13407
|
function interrupt(node2, name) {
|
|
13519
13408
|
var schedules = node2.__transition, schedule2, active, empty2 = true, i;
|
|
13520
|
-
if (!schedules)
|
|
13521
|
-
return;
|
|
13409
|
+
if (!schedules) return;
|
|
13522
13410
|
name = name == null ? null : name + "";
|
|
13523
13411
|
for (i in schedules) {
|
|
13524
13412
|
if ((schedule2 = schedules[i]).name !== name) {
|
|
@@ -13531,8 +13419,7 @@ function interrupt(node2, name) {
|
|
|
13531
13419
|
schedule2.on.call(active ? "interrupt" : "cancel", node2, node2.__data__, schedule2.index, schedule2.group);
|
|
13532
13420
|
delete schedules[i];
|
|
13533
13421
|
}
|
|
13534
|
-
if (empty2)
|
|
13535
|
-
delete node2.__transition;
|
|
13422
|
+
if (empty2) delete node2.__transition;
|
|
13536
13423
|
}
|
|
13537
13424
|
function selection_interrupt(name) {
|
|
13538
13425
|
return this.each(function() {
|
|
@@ -13558,8 +13445,7 @@ function tweenRemove(id2, name) {
|
|
|
13558
13445
|
}
|
|
13559
13446
|
function tweenFunction(id2, name, value) {
|
|
13560
13447
|
var tween0, tween1;
|
|
13561
|
-
if (typeof value !== "function")
|
|
13562
|
-
throw new Error();
|
|
13448
|
+
if (typeof value !== "function") throw new Error();
|
|
13563
13449
|
return function() {
|
|
13564
13450
|
var schedule2 = set$2(this, id2), tween = schedule2.tween;
|
|
13565
13451
|
if (tween !== tween0) {
|
|
@@ -13570,8 +13456,7 @@ function tweenFunction(id2, name, value) {
|
|
|
13570
13456
|
break;
|
|
13571
13457
|
}
|
|
13572
13458
|
}
|
|
13573
|
-
if (i === n)
|
|
13574
|
-
tween1.push(t);
|
|
13459
|
+
if (i === n) tween1.push(t);
|
|
13575
13460
|
}
|
|
13576
13461
|
schedule2.tween = tween1;
|
|
13577
13462
|
};
|
|
@@ -13632,8 +13517,7 @@ function attrFunction$2(name, interpolate2, value) {
|
|
|
13632
13517
|
var string00, string10, interpolate0;
|
|
13633
13518
|
return function() {
|
|
13634
13519
|
var string0, value1 = value(this), string1;
|
|
13635
|
-
if (value1 == null)
|
|
13636
|
-
return void this.removeAttribute(name);
|
|
13520
|
+
if (value1 == null) return void this.removeAttribute(name);
|
|
13637
13521
|
string0 = this.getAttribute(name);
|
|
13638
13522
|
string1 = value1 + "";
|
|
13639
13523
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
|
|
@@ -13643,8 +13527,7 @@ function attrFunctionNS$2(fullname, interpolate2, value) {
|
|
|
13643
13527
|
var string00, string10, interpolate0;
|
|
13644
13528
|
return function() {
|
|
13645
13529
|
var string0, value1 = value(this), string1;
|
|
13646
|
-
if (value1 == null)
|
|
13647
|
-
return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
13530
|
+
if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
|
|
13648
13531
|
string0 = this.getAttributeNS(fullname.space, fullname.local);
|
|
13649
13532
|
string1 = value1 + "";
|
|
13650
13533
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
|
|
@@ -13668,8 +13551,7 @@ function attrTweenNS(fullname, value) {
|
|
|
13668
13551
|
var t0, i0;
|
|
13669
13552
|
function tween() {
|
|
13670
13553
|
var i = value.apply(this, arguments);
|
|
13671
|
-
if (i !== i0)
|
|
13672
|
-
t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
13554
|
+
if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
|
|
13673
13555
|
return t0;
|
|
13674
13556
|
}
|
|
13675
13557
|
tween._value = value;
|
|
@@ -13679,8 +13561,7 @@ function attrTween(name, value) {
|
|
|
13679
13561
|
var t0, i0;
|
|
13680
13562
|
function tween() {
|
|
13681
13563
|
var i = value.apply(this, arguments);
|
|
13682
|
-
if (i !== i0)
|
|
13683
|
-
t0 = (i0 = i) && attrInterpolate(name, i);
|
|
13564
|
+
if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
|
|
13684
13565
|
return t0;
|
|
13685
13566
|
}
|
|
13686
13567
|
tween._value = value;
|
|
@@ -13688,12 +13569,9 @@ function attrTween(name, value) {
|
|
|
13688
13569
|
}
|
|
13689
13570
|
function transition_attrTween(name, value) {
|
|
13690
13571
|
var key = "attr." + name;
|
|
13691
|
-
if (arguments.length < 2)
|
|
13692
|
-
|
|
13693
|
-
if (value
|
|
13694
|
-
return this.tween(key, null);
|
|
13695
|
-
if (typeof value !== "function")
|
|
13696
|
-
throw new Error();
|
|
13572
|
+
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
13573
|
+
if (value == null) return this.tween(key, null);
|
|
13574
|
+
if (typeof value !== "function") throw new Error();
|
|
13697
13575
|
var fullname = namespace$1(name);
|
|
13698
13576
|
return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
|
|
13699
13577
|
}
|
|
@@ -13726,8 +13604,7 @@ function transition_duration(value) {
|
|
|
13726
13604
|
return arguments.length ? this.each((typeof value === "function" ? durationFunction : durationConstant)(id2, value)) : get$2(this.node(), id2).duration;
|
|
13727
13605
|
}
|
|
13728
13606
|
function easeConstant(id2, value) {
|
|
13729
|
-
if (typeof value !== "function")
|
|
13730
|
-
throw new Error();
|
|
13607
|
+
if (typeof value !== "function") throw new Error();
|
|
13731
13608
|
return function() {
|
|
13732
13609
|
set$2(this, id2).ease = value;
|
|
13733
13610
|
};
|
|
@@ -13739,19 +13616,16 @@ function transition_ease(value) {
|
|
|
13739
13616
|
function easeVarying(id2, value) {
|
|
13740
13617
|
return function() {
|
|
13741
13618
|
var v = value.apply(this, arguments);
|
|
13742
|
-
if (typeof v !== "function")
|
|
13743
|
-
throw new Error();
|
|
13619
|
+
if (typeof v !== "function") throw new Error();
|
|
13744
13620
|
set$2(this, id2).ease = v;
|
|
13745
13621
|
};
|
|
13746
13622
|
}
|
|
13747
13623
|
function transition_easeVarying(value) {
|
|
13748
|
-
if (typeof value !== "function")
|
|
13749
|
-
throw new Error();
|
|
13624
|
+
if (typeof value !== "function") throw new Error();
|
|
13750
13625
|
return this.each(easeVarying(this._id, value));
|
|
13751
13626
|
}
|
|
13752
13627
|
function transition_filter(match) {
|
|
13753
|
-
if (typeof match !== "function")
|
|
13754
|
-
match = matcher$1(match);
|
|
13628
|
+
if (typeof match !== "function") match = matcher$1(match);
|
|
13755
13629
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
13756
13630
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node2, i = 0; i < n; ++i) {
|
|
13757
13631
|
if ((node2 = group[i]) && match.call(node2, node2.__data__, i, group)) {
|
|
@@ -13762,8 +13636,7 @@ function transition_filter(match) {
|
|
|
13762
13636
|
return new Transition(subgroups, this._parents, this._name, this._id);
|
|
13763
13637
|
}
|
|
13764
13638
|
function transition_merge(transition2) {
|
|
13765
|
-
if (transition2._id !== this._id)
|
|
13766
|
-
throw new Error();
|
|
13639
|
+
if (transition2._id !== this._id) throw new Error();
|
|
13767
13640
|
for (var groups0 = this._groups, groups1 = transition2._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
|
|
13768
13641
|
for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node2, i = 0; i < n; ++i) {
|
|
13769
13642
|
if (node2 = group0[i] || group1[i]) {
|
|
@@ -13779,8 +13652,7 @@ function transition_merge(transition2) {
|
|
|
13779
13652
|
function start(name) {
|
|
13780
13653
|
return (name + "").trim().split(/^|\s+/).every(function(t) {
|
|
13781
13654
|
var i = t.indexOf(".");
|
|
13782
|
-
if (i >= 0)
|
|
13783
|
-
t = t.slice(0, i);
|
|
13655
|
+
if (i >= 0) t = t.slice(0, i);
|
|
13784
13656
|
return !t || t === "start";
|
|
13785
13657
|
});
|
|
13786
13658
|
}
|
|
@@ -13788,8 +13660,7 @@ function onFunction(id2, name, listener) {
|
|
|
13788
13660
|
var on0, on1, sit = start(name) ? init : set$2;
|
|
13789
13661
|
return function() {
|
|
13790
13662
|
var schedule2 = sit(this, id2), on = schedule2.on;
|
|
13791
|
-
if (on !== on0)
|
|
13792
|
-
(on1 = (on0 = on).copy()).on(name, listener);
|
|
13663
|
+
if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
|
|
13793
13664
|
schedule2.on = on1;
|
|
13794
13665
|
};
|
|
13795
13666
|
}
|
|
@@ -13800,11 +13671,8 @@ function transition_on(name, listener) {
|
|
|
13800
13671
|
function removeFunction(id2) {
|
|
13801
13672
|
return function() {
|
|
13802
13673
|
var parent = this.parentNode;
|
|
13803
|
-
for (var i in this.__transition)
|
|
13804
|
-
|
|
13805
|
-
return;
|
|
13806
|
-
if (parent)
|
|
13807
|
-
parent.removeChild(this);
|
|
13674
|
+
for (var i in this.__transition) if (+i !== id2) return;
|
|
13675
|
+
if (parent) parent.removeChild(this);
|
|
13808
13676
|
};
|
|
13809
13677
|
}
|
|
13810
13678
|
function transition_remove() {
|
|
@@ -13812,13 +13680,11 @@ function transition_remove() {
|
|
|
13812
13680
|
}
|
|
13813
13681
|
function transition_select(select2) {
|
|
13814
13682
|
var name = this._name, id2 = this._id;
|
|
13815
|
-
if (typeof select2 !== "function")
|
|
13816
|
-
select2 = selector$1(select2);
|
|
13683
|
+
if (typeof select2 !== "function") select2 = selector$1(select2);
|
|
13817
13684
|
for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
|
|
13818
13685
|
for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node2, subnode, i = 0; i < n; ++i) {
|
|
13819
13686
|
if ((node2 = group[i]) && (subnode = select2.call(node2, node2.__data__, i, group))) {
|
|
13820
|
-
if ("__data__" in node2)
|
|
13821
|
-
subnode.__data__ = node2.__data__;
|
|
13687
|
+
if ("__data__" in node2) subnode.__data__ = node2.__data__;
|
|
13822
13688
|
subgroup[i] = subnode;
|
|
13823
13689
|
schedule(subgroup[i], name, id2, i, subgroup, get$2(node2, id2));
|
|
13824
13690
|
}
|
|
@@ -13828,8 +13694,7 @@ function transition_select(select2) {
|
|
|
13828
13694
|
}
|
|
13829
13695
|
function transition_selectAll(select2) {
|
|
13830
13696
|
var name = this._name, id2 = this._id;
|
|
13831
|
-
if (typeof select2 !== "function")
|
|
13832
|
-
select2 = selectorAll$1(select2);
|
|
13697
|
+
if (typeof select2 !== "function") select2 = selectorAll$1(select2);
|
|
13833
13698
|
for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
|
|
13834
13699
|
for (var group = groups[j], n = group.length, node2, i = 0; i < n; ++i) {
|
|
13835
13700
|
if (node2 = group[i]) {
|
|
@@ -13872,8 +13737,7 @@ function styleFunction$2(name, interpolate2, value) {
|
|
|
13872
13737
|
var string00, string10, interpolate0;
|
|
13873
13738
|
return function() {
|
|
13874
13739
|
var string0 = styleValue$1(this, name), value1 = value(this), string1 = value1 + "";
|
|
13875
|
-
if (value1 == null)
|
|
13876
|
-
string1 = value1 = (this.style.removeProperty(name), styleValue$1(this, name));
|
|
13740
|
+
if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue$1(this, name));
|
|
13877
13741
|
return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
|
|
13878
13742
|
};
|
|
13879
13743
|
}
|
|
@@ -13881,8 +13745,7 @@ function styleMaybeRemove(id2, name) {
|
|
|
13881
13745
|
var on0, on1, listener0, key = "style." + name, event = "end." + key, remove2;
|
|
13882
13746
|
return function() {
|
|
13883
13747
|
var schedule2 = set$2(this, id2), on = schedule2.on, listener = schedule2.value[key] == null ? remove2 || (remove2 = styleRemove$2(name)) : void 0;
|
|
13884
|
-
if (on !== on0 || listener0 !== listener)
|
|
13885
|
-
(on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
13748
|
+
if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
|
|
13886
13749
|
schedule2.on = on1;
|
|
13887
13750
|
};
|
|
13888
13751
|
}
|
|
@@ -13899,8 +13762,7 @@ function styleTween(name, value, priority) {
|
|
|
13899
13762
|
var t, i0;
|
|
13900
13763
|
function tween() {
|
|
13901
13764
|
var i = value.apply(this, arguments);
|
|
13902
|
-
if (i !== i0)
|
|
13903
|
-
t = (i0 = i) && styleInterpolate(name, i, priority);
|
|
13765
|
+
if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
|
|
13904
13766
|
return t;
|
|
13905
13767
|
}
|
|
13906
13768
|
tween._value = value;
|
|
@@ -13908,12 +13770,9 @@ function styleTween(name, value, priority) {
|
|
|
13908
13770
|
}
|
|
13909
13771
|
function transition_styleTween(name, value, priority) {
|
|
13910
13772
|
var key = "style." + (name += "");
|
|
13911
|
-
if (arguments.length < 2)
|
|
13912
|
-
|
|
13913
|
-
if (value
|
|
13914
|
-
return this.tween(key, null);
|
|
13915
|
-
if (typeof value !== "function")
|
|
13916
|
-
throw new Error();
|
|
13773
|
+
if (arguments.length < 2) return (key = this.tween(key)) && key._value;
|
|
13774
|
+
if (value == null) return this.tween(key, null);
|
|
13775
|
+
if (typeof value !== "function") throw new Error();
|
|
13917
13776
|
return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
|
|
13918
13777
|
}
|
|
13919
13778
|
function textConstant$2(value) {
|
|
@@ -13939,8 +13798,7 @@ function textTween(value) {
|
|
|
13939
13798
|
var t0, i0;
|
|
13940
13799
|
function tween() {
|
|
13941
13800
|
var i = value.apply(this, arguments);
|
|
13942
|
-
if (i !== i0)
|
|
13943
|
-
t0 = (i0 = i) && textInterpolate(i);
|
|
13801
|
+
if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
|
|
13944
13802
|
return t0;
|
|
13945
13803
|
}
|
|
13946
13804
|
tween._value = value;
|
|
@@ -13948,12 +13806,9 @@ function textTween(value) {
|
|
|
13948
13806
|
}
|
|
13949
13807
|
function transition_textTween(value) {
|
|
13950
13808
|
var key = "text";
|
|
13951
|
-
if (arguments.length < 1)
|
|
13952
|
-
|
|
13953
|
-
if (value
|
|
13954
|
-
return this.tween(key, null);
|
|
13955
|
-
if (typeof value !== "function")
|
|
13956
|
-
throw new Error();
|
|
13809
|
+
if (arguments.length < 1) return (key = this.tween(key)) && key._value;
|
|
13810
|
+
if (value == null) return this.tween(key, null);
|
|
13811
|
+
if (typeof value !== "function") throw new Error();
|
|
13957
13812
|
return this.tween(key, textTween(value));
|
|
13958
13813
|
}
|
|
13959
13814
|
function transition_transition() {
|
|
@@ -13977,8 +13832,7 @@ function transition_end() {
|
|
|
13977
13832
|
var on0, on1, that = this, id2 = that._id, size = that.size();
|
|
13978
13833
|
return new Promise(function(resolve, reject) {
|
|
13979
13834
|
var cancel = { value: reject }, end = { value: function() {
|
|
13980
|
-
if (--size === 0)
|
|
13981
|
-
resolve();
|
|
13835
|
+
if (--size === 0) resolve();
|
|
13982
13836
|
} };
|
|
13983
13837
|
that.each(function() {
|
|
13984
13838
|
var schedule2 = set$2(this, id2), on = schedule2.on;
|
|
@@ -13990,8 +13844,7 @@ function transition_end() {
|
|
|
13990
13844
|
}
|
|
13991
13845
|
schedule2.on = on1;
|
|
13992
13846
|
});
|
|
13993
|
-
if (size === 0)
|
|
13994
|
-
resolve();
|
|
13847
|
+
if (size === 0) resolve();
|
|
13995
13848
|
});
|
|
13996
13849
|
}
|
|
13997
13850
|
var id = 0;
|
|
@@ -14234,8 +14087,7 @@ function zoom() {
|
|
|
14234
14087
|
}).tween("zoom", function() {
|
|
14235
14088
|
var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform === "function" ? transform.apply(that, args) : transform, i = interpolate2(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
|
|
14236
14089
|
return function(t) {
|
|
14237
|
-
if (t === 1)
|
|
14238
|
-
t = b;
|
|
14090
|
+
if (t === 1) t = b;
|
|
14239
14091
|
else {
|
|
14240
14092
|
var l = i(t), k = w / l[2];
|
|
14241
14093
|
t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k);
|
|
@@ -14257,8 +14109,7 @@ function zoom() {
|
|
|
14257
14109
|
}
|
|
14258
14110
|
Gesture.prototype = {
|
|
14259
14111
|
event: function(event) {
|
|
14260
|
-
if (event)
|
|
14261
|
-
this.sourceEvent = event;
|
|
14112
|
+
if (event) this.sourceEvent = event;
|
|
14262
14113
|
return this;
|
|
14263
14114
|
},
|
|
14264
14115
|
start: function() {
|
|
@@ -14269,12 +14120,9 @@ function zoom() {
|
|
|
14269
14120
|
return this;
|
|
14270
14121
|
},
|
|
14271
14122
|
zoom: function(key, transform) {
|
|
14272
|
-
if (this.mouse && key !== "mouse")
|
|
14273
|
-
|
|
14274
|
-
if (this.
|
|
14275
|
-
this.touch0[1] = transform.invert(this.touch0[0]);
|
|
14276
|
-
if (this.touch1 && key !== "touch")
|
|
14277
|
-
this.touch1[1] = transform.invert(this.touch1[0]);
|
|
14123
|
+
if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
|
|
14124
|
+
if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
|
|
14125
|
+
if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
|
|
14278
14126
|
this.that.__zoom = transform;
|
|
14279
14127
|
this.emit("zoom");
|
|
14280
14128
|
return this;
|
|
@@ -14303,16 +14151,14 @@ function zoom() {
|
|
|
14303
14151
|
}
|
|
14304
14152
|
};
|
|
14305
14153
|
function wheeled(event, ...args) {
|
|
14306
|
-
if (!filter2.apply(this, arguments))
|
|
14307
|
-
return;
|
|
14154
|
+
if (!filter2.apply(this, arguments)) return;
|
|
14308
14155
|
var g = gesture(this, args).event(event), t = this.__zoom, k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), p = pointer$1(event);
|
|
14309
14156
|
if (g.wheel) {
|
|
14310
14157
|
if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
|
|
14311
14158
|
g.mouse[1] = t.invert(g.mouse[0] = p);
|
|
14312
14159
|
}
|
|
14313
14160
|
clearTimeout(g.wheel);
|
|
14314
|
-
} else if (t.k === k)
|
|
14315
|
-
return;
|
|
14161
|
+
} else if (t.k === k) return;
|
|
14316
14162
|
else {
|
|
14317
14163
|
g.mouse = [p, t.invert(p)];
|
|
14318
14164
|
interrupt(this);
|
|
@@ -14327,8 +14173,7 @@ function zoom() {
|
|
|
14327
14173
|
}
|
|
14328
14174
|
}
|
|
14329
14175
|
function mousedowned(event, ...args) {
|
|
14330
|
-
if (touchending || !filter2.apply(this, arguments))
|
|
14331
|
-
return;
|
|
14176
|
+
if (touchending || !filter2.apply(this, arguments)) return;
|
|
14332
14177
|
var currentTarget = event.currentTarget, g = gesture(this, args, true).event(event), v = select$1(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), p = pointer$1(event, currentTarget), x0 = event.clientX, y0 = event.clientY;
|
|
14333
14178
|
dragDisable(event.view);
|
|
14334
14179
|
nopropagation$1(event);
|
|
@@ -14351,50 +14196,39 @@ function zoom() {
|
|
|
14351
14196
|
}
|
|
14352
14197
|
}
|
|
14353
14198
|
function dblclicked(event, ...args) {
|
|
14354
|
-
if (!filter2.apply(this, arguments))
|
|
14355
|
-
return;
|
|
14199
|
+
if (!filter2.apply(this, arguments)) return;
|
|
14356
14200
|
var t0 = this.__zoom, p0 = pointer$1(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
|
|
14357
14201
|
noevent$2(event);
|
|
14358
|
-
if (duration > 0)
|
|
14359
|
-
|
|
14360
|
-
else
|
|
14361
|
-
select$1(this).call(zoom2.transform, t1, p0, event);
|
|
14202
|
+
if (duration > 0) select$1(this).transition().duration(duration).call(schedule2, t1, p0, event);
|
|
14203
|
+
else select$1(this).call(zoom2.transform, t1, p0, event);
|
|
14362
14204
|
}
|
|
14363
14205
|
function touchstarted(event, ...args) {
|
|
14364
|
-
if (!filter2.apply(this, arguments))
|
|
14365
|
-
return;
|
|
14206
|
+
if (!filter2.apply(this, arguments)) return;
|
|
14366
14207
|
var touches = event.touches, n = touches.length, g = gesture(this, args, event.changedTouches.length === n).event(event), started, i, t, p;
|
|
14367
14208
|
nopropagation$1(event);
|
|
14368
14209
|
for (i = 0; i < n; ++i) {
|
|
14369
14210
|
t = touches[i], p = pointer$1(t, this);
|
|
14370
14211
|
p = [p, this.__zoom.invert(p), t.identifier];
|
|
14371
|
-
if (!g.touch0)
|
|
14372
|
-
|
|
14373
|
-
else if (!g.touch1 && g.touch0[2] !== p[2])
|
|
14374
|
-
g.touch1 = p, g.taps = 0;
|
|
14212
|
+
if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
|
|
14213
|
+
else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
|
|
14375
14214
|
}
|
|
14376
|
-
if (touchstarting)
|
|
14377
|
-
touchstarting = clearTimeout(touchstarting);
|
|
14215
|
+
if (touchstarting) touchstarting = clearTimeout(touchstarting);
|
|
14378
14216
|
if (started) {
|
|
14379
|
-
if (g.taps < 2)
|
|
14380
|
-
|
|
14381
|
-
|
|
14382
|
-
}, touchDelay);
|
|
14217
|
+
if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() {
|
|
14218
|
+
touchstarting = null;
|
|
14219
|
+
}, touchDelay);
|
|
14383
14220
|
interrupt(this);
|
|
14384
14221
|
g.start();
|
|
14385
14222
|
}
|
|
14386
14223
|
}
|
|
14387
14224
|
function touchmoved(event, ...args) {
|
|
14388
|
-
if (!this.__zooming)
|
|
14389
|
-
return;
|
|
14225
|
+
if (!this.__zooming) return;
|
|
14390
14226
|
var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t, p, l;
|
|
14391
14227
|
noevent$2(event);
|
|
14392
14228
|
for (i = 0; i < n; ++i) {
|
|
14393
14229
|
t = touches[i], p = pointer$1(t, this);
|
|
14394
|
-
if (g.touch0 && g.touch0[2] === t.identifier)
|
|
14395
|
-
|
|
14396
|
-
else if (g.touch1 && g.touch1[2] === t.identifier)
|
|
14397
|
-
g.touch1[0] = p;
|
|
14230
|
+
if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
|
|
14231
|
+
else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
|
|
14398
14232
|
}
|
|
14399
14233
|
t = g.that.__zoom;
|
|
14400
14234
|
if (g.touch1) {
|
|
@@ -14402,41 +14236,32 @@ function zoom() {
|
|
|
14402
14236
|
t = scale(t, Math.sqrt(dp / dl));
|
|
14403
14237
|
p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
|
|
14404
14238
|
l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
|
|
14405
|
-
} else if (g.touch0)
|
|
14406
|
-
|
|
14407
|
-
else
|
|
14408
|
-
return;
|
|
14239
|
+
} else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
|
|
14240
|
+
else return;
|
|
14409
14241
|
g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
|
|
14410
14242
|
}
|
|
14411
14243
|
function touchended(event, ...args) {
|
|
14412
|
-
if (!this.__zooming)
|
|
14413
|
-
return;
|
|
14244
|
+
if (!this.__zooming) return;
|
|
14414
14245
|
var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t;
|
|
14415
14246
|
nopropagation$1(event);
|
|
14416
|
-
if (touchending)
|
|
14417
|
-
clearTimeout(touchending);
|
|
14247
|
+
if (touchending) clearTimeout(touchending);
|
|
14418
14248
|
touchending = setTimeout(function() {
|
|
14419
14249
|
touchending = null;
|
|
14420
14250
|
}, touchDelay);
|
|
14421
14251
|
for (i = 0; i < n; ++i) {
|
|
14422
14252
|
t = touches[i];
|
|
14423
|
-
if (g.touch0 && g.touch0[2] === t.identifier)
|
|
14424
|
-
|
|
14425
|
-
else if (g.touch1 && g.touch1[2] === t.identifier)
|
|
14426
|
-
delete g.touch1;
|
|
14253
|
+
if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
|
|
14254
|
+
else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
|
|
14427
14255
|
}
|
|
14428
|
-
if (g.touch1 && !g.touch0)
|
|
14429
|
-
|
|
14430
|
-
if (g.touch0)
|
|
14431
|
-
g.touch0[1] = this.__zoom.invert(g.touch0[0]);
|
|
14256
|
+
if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
|
|
14257
|
+
if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
|
|
14432
14258
|
else {
|
|
14433
14259
|
g.end();
|
|
14434
14260
|
if (g.taps === 2) {
|
|
14435
14261
|
t = pointer$1(t, this);
|
|
14436
14262
|
if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {
|
|
14437
14263
|
var p = select$1(this).on("dblclick.zoom");
|
|
14438
|
-
if (p)
|
|
14439
|
-
p.apply(this, arguments);
|
|
14264
|
+
if (p) p.apply(this, arguments);
|
|
14440
14265
|
}
|
|
14441
14266
|
}
|
|
14442
14267
|
}
|
|
@@ -14484,7 +14309,8 @@ const Slots = Symbol("MiniMapSlots");
|
|
|
14484
14309
|
const _hoisted_1$1$1 = ["id", "x", "y", "rx", "ry", "width", "height", "fill", "stroke", "stroke-width", "shape-rendering"];
|
|
14485
14310
|
const __default__$1$1 = {
|
|
14486
14311
|
name: "MiniMapNode",
|
|
14487
|
-
compatConfig: { MODE: 3 }
|
|
14312
|
+
compatConfig: { MODE: 3 },
|
|
14313
|
+
inheritAttrs: false
|
|
14488
14314
|
};
|
|
14489
14315
|
const _sfc_main$1$2 = /* @__PURE__ */ defineComponent({
|
|
14490
14316
|
...__default__$1$1,
|
|
@@ -14499,14 +14325,15 @@ const _sfc_main$1$2 = /* @__PURE__ */ defineComponent({
|
|
|
14499
14325
|
color: {},
|
|
14500
14326
|
shapeRendering: {},
|
|
14501
14327
|
strokeColor: {},
|
|
14502
|
-
strokeWidth: {}
|
|
14328
|
+
strokeWidth: {},
|
|
14329
|
+
hidden: { type: Boolean }
|
|
14503
14330
|
},
|
|
14504
14331
|
emits: ["click", "dblclick", "mouseenter", "mousemove", "mouseleave"],
|
|
14505
14332
|
setup(__props, { emit: emits }) {
|
|
14506
14333
|
const props = __props;
|
|
14507
14334
|
const miniMapSlots = inject(Slots);
|
|
14508
14335
|
const attrs = useAttrs();
|
|
14509
|
-
const
|
|
14336
|
+
const style = toRef(() => attrs.style ?? {});
|
|
14510
14337
|
function onClick(event) {
|
|
14511
14338
|
emits("click", event);
|
|
14512
14339
|
}
|
|
@@ -14523,26 +14350,29 @@ const _sfc_main$1$2 = /* @__PURE__ */ defineComponent({
|
|
|
14523
14350
|
emits("mouseleave", event);
|
|
14524
14351
|
}
|
|
14525
14352
|
return (_ctx, _cache) => {
|
|
14526
|
-
return
|
|
14527
|
-
key:
|
|
14528
|
-
|
|
14529
|
-
|
|
14530
|
-
|
|
14531
|
-
|
|
14532
|
-
|
|
14533
|
-
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14537
|
-
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
|
|
14544
|
-
|
|
14545
|
-
|
|
14353
|
+
return !_ctx.hidden && _ctx.dimensions.width !== 0 && _ctx.dimensions.height !== 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
14354
|
+
unref(miniMapSlots)[`node-${props.type}`] ? (openBlock(), createBlock(resolveDynamicComponent(unref(miniMapSlots)[`node-${props.type}`]), normalizeProps(mergeProps({ key: 0 }, { ...props, ..._ctx.$attrs })), null, 16)) : (openBlock(), createElementBlock("rect", mergeProps({
|
|
14355
|
+
key: 1,
|
|
14356
|
+
id: _ctx.id
|
|
14357
|
+
}, _ctx.$attrs, {
|
|
14358
|
+
class: ["vue-flow__minimap-node", { selected: _ctx.selected, dragging: _ctx.dragging }],
|
|
14359
|
+
x: _ctx.position.x,
|
|
14360
|
+
y: _ctx.position.y,
|
|
14361
|
+
rx: _ctx.borderRadius,
|
|
14362
|
+
ry: _ctx.borderRadius,
|
|
14363
|
+
width: _ctx.dimensions.width,
|
|
14364
|
+
height: _ctx.dimensions.height,
|
|
14365
|
+
fill: _ctx.color || style.value.background || style.value.backgroundColor,
|
|
14366
|
+
stroke: _ctx.strokeColor,
|
|
14367
|
+
"stroke-width": _ctx.strokeWidth,
|
|
14368
|
+
"shape-rendering": _ctx.shapeRendering,
|
|
14369
|
+
onClick,
|
|
14370
|
+
onDblclick,
|
|
14371
|
+
onMouseenter: onMouseEnter,
|
|
14372
|
+
onMousemove: onMouseMove,
|
|
14373
|
+
onMouseleave: onMouseLeave
|
|
14374
|
+
}), null, 16, _hoisted_1$1$1))
|
|
14375
|
+
], 64)) : createCommentVNode("", true);
|
|
14546
14376
|
};
|
|
14547
14377
|
}
|
|
14548
14378
|
});
|
|
@@ -14751,12 +14581,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
14751
14581
|
"stroke-width": _ctx.nodeStrokeWidth,
|
|
14752
14582
|
"shape-rendering": unref(shapeRendering),
|
|
14753
14583
|
type: node2.type,
|
|
14584
|
+
hidden: node2.hidden,
|
|
14754
14585
|
onClick: ($event) => onNodeClick($event, node2),
|
|
14755
14586
|
onDblclick: ($event) => onNodeDblClick($event, node2),
|
|
14756
14587
|
onMouseenter: ($event) => onNodeMouseEnter($event, node2),
|
|
14757
14588
|
onMousemove: ($event) => onNodeMouseMove($event, node2),
|
|
14758
14589
|
onMouseleave: ($event) => onNodeMouseLeave($event, node2)
|
|
14759
|
-
}, null, 8, ["id", "position", "dimensions", "selected", "dragging", "style", "class", "color", "border-radius", "stroke-color", "stroke-width", "shape-rendering", "type", "onClick", "onDblclick", "onMouseenter", "onMousemove", "onMouseleave"]);
|
|
14590
|
+
}, null, 8, ["id", "position", "dimensions", "selected", "dragging", "style", "class", "color", "border-radius", "stroke-color", "stroke-width", "shape-rendering", "type", "hidden", "onClick", "onDblclick", "onMouseenter", "onMousemove", "onMouseleave"]);
|
|
14760
14591
|
}), 128)),
|
|
14761
14592
|
createBaseVNode("path", {
|
|
14762
14593
|
class: "vue-flow__minimap-mask",
|
|
@@ -18094,6 +17925,7 @@ const cssModules$2 = {
|
|
|
18094
17925
|
const CanvasEdgeToolbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$6, [["__cssModules", cssModules$2]]);
|
|
18095
17926
|
const _hoisted_1$3 = ["data-source-node-name", "data-target-node-name"];
|
|
18096
17927
|
const _hoisted_2$2 = ["data-source-node-name", "data-target-node-name", "data-edge-status"];
|
|
17928
|
+
const delayedHoveredTimeout = 300;
|
|
18097
17929
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
18098
17930
|
__name: "CanvasEdge",
|
|
18099
17931
|
props: {
|
|
@@ -18140,7 +17972,23 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
18140
17972
|
const connectionType = computed(
|
|
18141
17973
|
() => isValidNodeConnectionType(props.data.source.type) ? props.data.source.type : NodeConnectionType.Main
|
|
18142
17974
|
);
|
|
18143
|
-
const
|
|
17975
|
+
const delayedHovered = ref(props.hovered);
|
|
17976
|
+
const delayedHoveredSetTimeoutRef = ref(null);
|
|
17977
|
+
watch(
|
|
17978
|
+
() => props.hovered,
|
|
17979
|
+
(isHovered) => {
|
|
17980
|
+
if (isHovered) {
|
|
17981
|
+
if (delayedHoveredSetTimeoutRef.value) clearTimeout(delayedHoveredSetTimeoutRef.value);
|
|
17982
|
+
delayedHovered.value = true;
|
|
17983
|
+
} else {
|
|
17984
|
+
delayedHoveredSetTimeoutRef.value = setTimeout(() => {
|
|
17985
|
+
delayedHovered.value = false;
|
|
17986
|
+
}, delayedHoveredTimeout);
|
|
17987
|
+
}
|
|
17988
|
+
},
|
|
17989
|
+
{ immediate: true }
|
|
17990
|
+
);
|
|
17991
|
+
const renderToolbar = computed(() => (props.selected || delayedHovered.value) && !props.readOnly);
|
|
18144
17992
|
const isMainConnection = computed(() => data.value.source.type === NodeConnectionType.Main);
|
|
18145
17993
|
const status2 = computed(() => props.data.status);
|
|
18146
17994
|
const edgeColor = computed(() => {
|
|
@@ -18316,8 +18164,8 @@ const useKeybindings = (keymap, options) => {
|
|
|
18316
18164
|
function toShortcutString(event) {
|
|
18317
18165
|
const { shiftKey, altKey } = event;
|
|
18318
18166
|
const ctrlKey = isCtrlKeyPressed(event);
|
|
18319
|
-
const keys = [event.key];
|
|
18320
|
-
const codes = [keyboardEventCodeToKey(event.code)];
|
|
18167
|
+
const keys = "key" in event ? [event.key] : [];
|
|
18168
|
+
const codes = "code" in event ? [keyboardEventCodeToKey(event.code)] : [];
|
|
18321
18169
|
const modifiers = [];
|
|
18322
18170
|
if (shiftKey) {
|
|
18323
18171
|
modifiers.push("shift");
|
|
@@ -18629,7 +18477,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18629
18477
|
readOnly: { type: Boolean, default: false },
|
|
18630
18478
|
executing: { type: Boolean, default: false },
|
|
18631
18479
|
keyBindings: { type: Boolean, default: true },
|
|
18632
|
-
showBugReportingButton: { type: Boolean },
|
|
18633
18480
|
loading: { type: Boolean, default: false }
|
|
18634
18481
|
},
|
|
18635
18482
|
emits: ["update:modelValue", "update:node:position", "update:nodes:position", "update:node:active", "update:node:enabled", "update:node:selected", "update:node:name", "update:node:parameters", "update:node:inputs", "update:node:outputs", "click:node:add", "run:node", "delete:node", "create:node", "create:sticky", "delete:nodes", "update:nodes:enabled", "copy:nodes", "duplicate:nodes", "update:nodes:pin", "cut:nodes", "delete:connection", "create:connection:start", "create:connection", "create:connection:end", "create:connection:cancelled", "click:connection:add", "click:pane", "run:workflow", "save:workflow", "create:workflow", "drag-and-drop"],
|
|
@@ -19158,13 +19005,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19158
19005
|
class: normalizeClass(unref($style).canvasControls),
|
|
19159
19006
|
position: _ctx.controlsPosition,
|
|
19160
19007
|
"show-interactive": false,
|
|
19161
|
-
"show-bug-reporting-button": _ctx.showBugReportingButton,
|
|
19162
19008
|
zoom: unref(viewport).zoom,
|
|
19163
19009
|
onZoomToFit: onFitView,
|
|
19164
19010
|
onZoomIn,
|
|
19165
19011
|
onZoomOut,
|
|
19166
19012
|
onResetZoom
|
|
19167
|
-
}, null, 8, ["class", "position", "
|
|
19013
|
+
}, null, 8, ["class", "position", "zoom"]),
|
|
19168
19014
|
(openBlock(), createBlock(Suspense, null, {
|
|
19169
19015
|
default: withCtx(() => [
|
|
19170
19016
|
createVNode(ContextMenu, { onAction: onContextMenuAction })
|
|
@@ -19186,7 +19032,7 @@ const style0 = {
|
|
|
19186
19032
|
const cssModules = {
|
|
19187
19033
|
"$style": style0
|
|
19188
19034
|
};
|
|
19189
|
-
const __unplugin_components_0 = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-
|
|
19035
|
+
const __unplugin_components_0 = /* @__PURE__ */ _export_sfc$1(_sfc_main, [["__cssModules", cssModules], ["__scopeId", "data-v-e20cd71d"]]);
|
|
19190
19036
|
function useCanvasMapping({
|
|
19191
19037
|
nodes,
|
|
19192
19038
|
connections,
|