@powerhousedao/workflow 6.2.3-dev.11
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/LICENSE +661 -0
- package/README.md +94 -0
- package/dist/browser/PieceMarkdown-CZYNY1qQ.js +21401 -0
- package/dist/browser/PieceMarkdown-CZYNY1qQ.js.map +1 -0
- package/dist/browser/ap-layout-DLTZBpE7.js +331 -0
- package/dist/browser/ap-layout-DLTZBpE7.js.map +1 -0
- package/dist/browser/assets/entry-4n9sWkpV.js +314 -0
- package/dist/browser/assets/projection-entry-Bzn-Fath.js +404 -0
- package/dist/browser/chunk-BoAXSpZd.js +33 -0
- package/dist/browser/connection-DEe5aDuU.js +90 -0
- package/dist/browser/connection-DEe5aDuU.js.map +1 -0
- package/dist/browser/connection-form-B_3_LFlh.js +453 -0
- package/dist/browser/connection-form-B_3_LFlh.js.map +1 -0
- package/dist/browser/document-models/connection/index.js +3 -0
- package/dist/browser/document-models/index.js +4 -0
- package/dist/browser/document-models/workflow/index.js +3 -0
- package/dist/browser/document-models-vmNTCrKx.js +51 -0
- package/dist/browser/document-models-vmNTCrKx.js.map +1 -0
- package/dist/browser/editor-BCxZ5i20.js +18978 -0
- package/dist/browser/editor-BCxZ5i20.js.map +1 -0
- package/dist/browser/editor-DJX9NpD5.js +134 -0
- package/dist/browser/editor-DJX9NpD5.js.map +1 -0
- package/dist/browser/editor-Hh1cyIIW.js +1550 -0
- package/dist/browser/editor-Hh1cyIIW.js.map +1 -0
- package/dist/browser/editors/connection-editor/module.js +15 -0
- package/dist/browser/editors/connection-editor/module.js.map +1 -0
- package/dist/browser/editors/index.js +4 -0
- package/dist/browser/editors/workflow-editor/module.js +15 -0
- package/dist/browser/editors/workflow-editor/module.js.map +1 -0
- package/dist/browser/editors/workflow-studio/module.js +15 -0
- package/dist/browser/editors/workflow-studio/module.js.map +1 -0
- package/dist/browser/index.js +330 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/module-12vI18HY.js +483 -0
- package/dist/browser/module-12vI18HY.js.map +1 -0
- package/dist/browser/module-CYQnNZWl.js +1141 -0
- package/dist/browser/module-CYQnNZWl.js.map +1 -0
- package/dist/browser/reactor/index.js +8 -0
- package/dist/browser/reactor/index.js.map +1 -0
- package/dist/browser/runtime-api-DQa04P3e.js +545 -0
- package/dist/browser/runtime-api-DQa04P3e.js.map +1 -0
- package/dist/browser/status-kpDX5CIA.js +11 -0
- package/dist/browser/status-kpDX5CIA.js.map +1 -0
- package/dist/browser/style.css +641 -0
- package/dist/browser/upgrade-manifests-Cnpfo6kC.js +8 -0
- package/dist/browser/upgrade-manifests-Cnpfo6kC.js.map +1 -0
- package/dist/browser/use-runtime-url-DzYskFkw.js +181 -0
- package/dist/browser/use-runtime-url-DzYskFkw.js.map +1 -0
- package/dist/browser/workflow-CFZUezoY.js +107 -0
- package/dist/browser/workflow-CFZUezoY.js.map +1 -0
- package/dist/node/PieceMarkdown-Q9C9CPGu.mjs +23249 -0
- package/dist/node/PieceMarkdown-Q9C9CPGu.mjs.map +1 -0
- package/dist/node/ap-layout-DDOX4Vxv.mjs +331 -0
- package/dist/node/ap-layout-DDOX4Vxv.mjs.map +1 -0
- package/dist/node/chunk-BSw8zbkd.mjs +37 -0
- package/dist/node/connection-DGsS2Db3.mjs +90 -0
- package/dist/node/connection-DGsS2Db3.mjs.map +1 -0
- package/dist/node/connection-form-CTNkgu_d.mjs +453 -0
- package/dist/node/connection-form-CTNkgu_d.mjs.map +1 -0
- package/dist/node/document-models/connection/index.mjs +3 -0
- package/dist/node/document-models/index.mjs +4 -0
- package/dist/node/document-models/workflow/index.mjs +3 -0
- package/dist/node/editor-CS8ttjKp.mjs +20351 -0
- package/dist/node/editor-CS8ttjKp.mjs.map +1 -0
- package/dist/node/editor-DQUie3HQ.mjs +1550 -0
- package/dist/node/editor-DQUie3HQ.mjs.map +1 -0
- package/dist/node/editor-DhgG3VOa.mjs +134 -0
- package/dist/node/editor-DhgG3VOa.mjs.map +1 -0
- package/dist/node/editors/connection-editor/module.mjs +15 -0
- package/dist/node/editors/connection-editor/module.mjs.map +1 -0
- package/dist/node/editors/index.mjs +4 -0
- package/dist/node/editors/workflow-editor/module.mjs +15 -0
- package/dist/node/editors/workflow-editor/module.mjs.map +1 -0
- package/dist/node/editors/workflow-studio/module.mjs +15 -0
- package/dist/node/editors/workflow-studio/module.mjs.map +1 -0
- package/dist/node/index.mjs +377 -0
- package/dist/node/index.mjs.map +1 -0
- package/dist/node/module-IA-Ay7ig.mjs +483 -0
- package/dist/node/module-IA-Ay7ig.mjs.map +1 -0
- package/dist/node/module-IRMgzJC1.mjs +1141 -0
- package/dist/node/module-IRMgzJC1.mjs.map +1 -0
- package/dist/node/pieces/index.mjs +10 -0
- package/dist/node/pieces/index.mjs.map +1 -0
- package/dist/node/pieces/reactor/index.mjs +2021 -0
- package/dist/node/pieces/reactor/index.mjs.map +1 -0
- package/dist/node/runtime-api-JQ6lSS1Y.mjs +545 -0
- package/dist/node/runtime-api-JQ6lSS1Y.mjs.map +1 -0
- package/dist/node/status-CDRcDUMS.mjs +11 -0
- package/dist/node/status-CDRcDUMS.mjs.map +1 -0
- package/dist/node/style.css +641 -0
- package/dist/node/upgrade-manifests-3VN0Bfcf.mjs +8 -0
- package/dist/node/upgrade-manifests-3VN0Bfcf.mjs.map +1 -0
- package/dist/node/use-runtime-url-C_adivge.mjs +181 -0
- package/dist/node/use-runtime-url-C_adivge.mjs.map +1 -0
- package/dist/node/workflow-fFvyypuu.mjs +107 -0
- package/dist/node/workflow-fFvyypuu.mjs.map +1 -0
- package/dist/powerhouse.manifest.json +47 -0
- package/dist/style.css +2324 -0
- package/dist/types/ai/runtime-url.d.ts +2 -0
- package/dist/types/ai/runtime-url.d.ts.map +1 -0
- package/dist/types/ai/runtime-url.test.d.ts +2 -0
- package/dist/types/ai/runtime-url.test.d.ts.map +1 -0
- package/dist/types/ai/tools.d.ts +59 -0
- package/dist/types/ai/tools.d.ts.map +1 -0
- package/dist/types/ai/tools.test.d.ts +2 -0
- package/dist/types/ai/tools.test.d.ts.map +1 -0
- package/dist/types/ai/workflow-tools.d.ts +9 -0
- package/dist/types/ai/workflow-tools.d.ts.map +1 -0
- package/dist/types/ai/workflow-tools.live.test.d.ts +2 -0
- package/dist/types/ai/workflow-tools.live.test.d.ts.map +1 -0
- package/dist/types/ai/workflow-tools.test.d.ts +2 -0
- package/dist/types/ai/workflow-tools.test.d.ts.map +1 -0
- package/dist/types/build.d.ts +2 -0
- package/dist/types/build.d.ts.map +1 -0
- package/dist/types/document-models/connection/index.d.ts +3 -0
- package/dist/types/document-models/connection/index.d.ts.map +1 -0
- package/dist/types/document-models/connection/upgrades/index.d.ts +3 -0
- package/dist/types/document-models/connection/upgrades/index.d.ts.map +1 -0
- package/dist/types/document-models/connection/upgrades/upgrade-manifest.d.ts +8 -0
- package/dist/types/document-models/connection/upgrades/upgrade-manifest.d.ts.map +1 -0
- package/dist/types/document-models/connection/upgrades/versions.d.ts +3 -0
- package/dist/types/document-models/connection/upgrades/versions.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/actions.d.ts +24 -0
- package/dist/types/document-models/connection/v1/actions.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/actions.d.ts +12 -0
- package/dist/types/document-models/connection/v1/gen/actions.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/config/actions.d.ts +20 -0
- package/dist/types/document-models/connection/v1/gen/config/actions.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/config/creators.d.ts +6 -0
- package/dist/types/document-models/connection/v1/gen/config/creators.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/config/error.d.ts +14 -0
- package/dist/types/document-models/connection/v1/gen/config/error.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/config/operations.d.ts +13 -0
- package/dist/types/document-models/connection/v1/gen/config/operations.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/connection/actions.d.ts +20 -0
- package/dist/types/document-models/connection/v1/gen/connection/actions.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/connection/creators.d.ts +6 -0
- package/dist/types/document-models/connection/v1/gen/connection/creators.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/connection/error.d.ts +2 -0
- package/dist/types/document-models/connection/v1/gen/connection/error.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/connection/operations.d.ts +13 -0
- package/dist/types/document-models/connection/v1/gen/connection/operations.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/controller.d.ts +8 -0
- package/dist/types/document-models/connection/v1/gen/controller.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/creators.d.ts +11 -0
- package/dist/types/document-models/connection/v1/gen/creators.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/document-model.d.ts +3 -0
- package/dist/types/document-models/connection/v1/gen/document-model.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/document-schema.d.ts +68 -0
- package/dist/types/document-models/connection/v1/gen/document-schema.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/document-type.d.ts +6 -0
- package/dist/types/document-models/connection/v1/gen/document-type.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/health/actions.d.ts +12 -0
- package/dist/types/document-models/connection/v1/gen/health/actions.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/health/creators.d.ts +4 -0
- package/dist/types/document-models/connection/v1/gen/health/creators.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/health/error.d.ts +2 -0
- package/dist/types/document-models/connection/v1/gen/health/error.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/health/operations.d.ts +11 -0
- package/dist/types/document-models/connection/v1/gen/health/operations.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/index.d.ts +19 -0
- package/dist/types/document-models/connection/v1/gen/index.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/ph-factories.d.ts +25 -0
- package/dist/types/document-models/connection/v1/gen/ph-factories.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/reducer.d.ts +4 -0
- package/dist/types/document-models/connection/v1/gen/reducer.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/schema/index.d.ts +7 -0
- package/dist/types/document-models/connection/v1/gen/schema/index.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/schema/types.d.ts +200 -0
- package/dist/types/document-models/connection/v1/gen/schema/types.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/schema/zod.d.ts +33 -0
- package/dist/types/document-models/connection/v1/gen/schema/zod.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/types.d.ts +16 -0
- package/dist/types/document-models/connection/v1/gen/types.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/gen/utils.d.ts +10 -0
- package/dist/types/document-models/connection/v1/gen/utils.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/hooks.d.ts +18 -0
- package/dist/types/document-models/connection/v1/hooks.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/index.d.ts +11 -0
- package/dist/types/document-models/connection/v1/index.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/module.d.ts +31 -0
- package/dist/types/document-models/connection/v1/module.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/src/index.d.ts +6 -0
- package/dist/types/document-models/connection/v1/src/index.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/src/reducers/config.d.ts +3 -0
- package/dist/types/document-models/connection/v1/src/reducers/config.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/src/reducers/connection.d.ts +3 -0
- package/dist/types/document-models/connection/v1/src/reducers/connection.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/src/reducers/health.d.ts +3 -0
- package/dist/types/document-models/connection/v1/src/reducers/health.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/src/utils.d.ts +2 -0
- package/dist/types/document-models/connection/v1/src/utils.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/tests/config.test.d.ts +2 -0
- package/dist/types/document-models/connection/v1/tests/config.test.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/tests/connection-scenarios.test.d.ts +2 -0
- package/dist/types/document-models/connection/v1/tests/connection-scenarios.test.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/tests/connection.test.d.ts +2 -0
- package/dist/types/document-models/connection/v1/tests/connection.test.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/tests/document-model.test.d.ts +10 -0
- package/dist/types/document-models/connection/v1/tests/document-model.test.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/tests/health.test.d.ts +2 -0
- package/dist/types/document-models/connection/v1/tests/health.test.d.ts.map +1 -0
- package/dist/types/document-models/connection/v1/utils.d.ts +9 -0
- package/dist/types/document-models/connection/v1/utils.d.ts.map +1 -0
- package/dist/types/document-models/document-models.d.ts +68 -0
- package/dist/types/document-models/document-models.d.ts.map +1 -0
- package/dist/types/document-models/index.d.ts +4 -0
- package/dist/types/document-models/index.d.ts.map +1 -0
- package/dist/types/document-models/upgrade-manifests.d.ts +7 -0
- package/dist/types/document-models/upgrade-manifests.d.ts.map +1 -0
- package/dist/types/document-models/workflow/index.d.ts +3 -0
- package/dist/types/document-models/workflow/index.d.ts.map +1 -0
- package/dist/types/document-models/workflow/upgrades/index.d.ts +3 -0
- package/dist/types/document-models/workflow/upgrades/index.d.ts.map +1 -0
- package/dist/types/document-models/workflow/upgrades/upgrade-manifest.d.ts +8 -0
- package/dist/types/document-models/workflow/upgrades/upgrade-manifest.d.ts.map +1 -0
- package/dist/types/document-models/workflow/upgrades/versions.d.ts +3 -0
- package/dist/types/document-models/workflow/upgrades/versions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/actions.d.ts +32 -0
- package/dist/types/document-models/workflow/v1/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/actions.d.ts +20 -0
- package/dist/types/document-models/workflow/v1/gen/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/controller.d.ts +8 -0
- package/dist/types/document-models/workflow/v1/gen/controller.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/creators.d.ts +19 -0
- package/dist/types/document-models/workflow/v1/gen/creators.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/document-model.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/gen/document-model.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/document-schema.d.ts +74 -0
- package/dist/types/document-models/workflow/v1/gen/document-schema.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/document-type.d.ts +6 -0
- package/dist/types/document-models/workflow/v1/gen/document-type.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/edges/actions.d.ts +16 -0
- package/dist/types/document-models/workflow/v1/gen/edges/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/edges/creators.d.ts +5 -0
- package/dist/types/document-models/workflow/v1/gen/edges/creators.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/edges/error.d.ts +36 -0
- package/dist/types/document-models/workflow/v1/gen/edges/error.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/edges/operations.d.ts +12 -0
- package/dist/types/document-models/workflow/v1/gen/edges/operations.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/index.d.ts +23 -0
- package/dist/types/document-models/workflow/v1/gen/index.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/ph-factories.d.ts +25 -0
- package/dist/types/document-models/workflow/v1/gen/ph-factories.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/policy/actions.d.ts +12 -0
- package/dist/types/document-models/workflow/v1/gen/policy/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/policy/creators.d.ts +4 -0
- package/dist/types/document-models/workflow/v1/gen/policy/creators.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/policy/error.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/gen/policy/error.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/policy/operations.d.ts +11 -0
- package/dist/types/document-models/workflow/v1/gen/policy/operations.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/reducer.d.ts +4 -0
- package/dist/types/document-models/workflow/v1/gen/reducer.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/runtime/actions.d.ts +12 -0
- package/dist/types/document-models/workflow/v1/gen/runtime/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/runtime/creators.d.ts +4 -0
- package/dist/types/document-models/workflow/v1/gen/runtime/creators.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/runtime/error.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/gen/runtime/error.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/runtime/operations.d.ts +11 -0
- package/dist/types/document-models/workflow/v1/gen/runtime/operations.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/schema/index.d.ts +7 -0
- package/dist/types/document-models/workflow/v1/gen/schema/index.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts +352 -0
- package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts +67 -0
- package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/steps/actions.d.ts +24 -0
- package/dist/types/document-models/workflow/v1/gen/steps/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/steps/creators.d.ts +7 -0
- package/dist/types/document-models/workflow/v1/gen/steps/creators.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/steps/error.d.ts +45 -0
- package/dist/types/document-models/workflow/v1/gen/steps/error.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/steps/operations.d.ts +14 -0
- package/dist/types/document-models/workflow/v1/gen/steps/operations.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/trigger/actions.d.ts +16 -0
- package/dist/types/document-models/workflow/v1/gen/trigger/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/trigger/creators.d.ts +5 -0
- package/dist/types/document-models/workflow/v1/gen/trigger/creators.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts +14 -0
- package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/trigger/operations.d.ts +12 -0
- package/dist/types/document-models/workflow/v1/gen/trigger/operations.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/types.d.ts +16 -0
- package/dist/types/document-models/workflow/v1/gen/types.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/utils.d.ts +10 -0
- package/dist/types/document-models/workflow/v1/gen/utils.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/variables/actions.d.ts +16 -0
- package/dist/types/document-models/workflow/v1/gen/variables/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/variables/creators.d.ts +5 -0
- package/dist/types/document-models/workflow/v1/gen/variables/creators.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/variables/error.d.ts +14 -0
- package/dist/types/document-models/workflow/v1/gen/variables/error.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/variables/operations.d.ts +12 -0
- package/dist/types/document-models/workflow/v1/gen/variables/operations.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/workflow/actions.d.ts +20 -0
- package/dist/types/document-models/workflow/v1/gen/workflow/actions.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/workflow/creators.d.ts +6 -0
- package/dist/types/document-models/workflow/v1/gen/workflow/creators.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/workflow/error.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/gen/workflow/error.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/gen/workflow/operations.d.ts +13 -0
- package/dist/types/document-models/workflow/v1/gen/workflow/operations.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/hooks.d.ts +18 -0
- package/dist/types/document-models/workflow/v1/hooks.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/index.d.ts +11 -0
- package/dist/types/document-models/workflow/v1/index.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/module.d.ts +39 -0
- package/dist/types/document-models/workflow/v1/module.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/index.d.ts +6 -0
- package/dist/types/document-models/workflow/v1/src/index.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/reducers/edges.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/src/reducers/edges.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/reducers/policy.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/src/reducers/policy.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/reducers/runtime.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/src/reducers/runtime.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/reducers/steps.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/src/reducers/steps.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/reducers/trigger.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/src/reducers/trigger.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/reducers/variables.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/src/reducers/variables.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/reducers/workflow.d.ts +3 -0
- package/dist/types/document-models/workflow/v1/src/reducers/workflow.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/src/utils.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/src/utils.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/document-model.test.d.ts +10 -0
- package/dist/types/document-models/workflow/v1/tests/document-model.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/edges.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/edges.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/policy.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/policy.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/runtime.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/runtime.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/steps.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/steps.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/trigger.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/trigger.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/variables.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/variables.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/workflow-scenarios.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/workflow-scenarios.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/tests/workflow.test.d.ts +2 -0
- package/dist/types/document-models/workflow/v1/tests/workflow.test.d.ts.map +1 -0
- package/dist/types/document-models/workflow/v1/utils.d.ts +9 -0
- package/dist/types/document-models/workflow/v1/utils.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts +8 -0
- package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/connection-callbacks.d.ts +5 -0
- package/dist/types/editors/connection-editor/connection-callbacks.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/connection-form.d.ts +15 -0
- package/dist/types/editors/connection-editor/connection-form.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/editor.d.ts +2 -0
- package/dist/types/editors/connection-editor/editor.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/module.d.ts +8 -0
- package/dist/types/editors/connection-editor/module.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/piece-auth.d.ts +26 -0
- package/dist/types/editors/connection-editor/piece-auth.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/piece-auth.test.d.ts +2 -0
- package/dist/types/editors/connection-editor/piece-auth.test.d.ts.map +1 -0
- package/dist/types/editors/connection-editor/status.d.ts +3 -0
- package/dist/types/editors/connection-editor/status.d.ts.map +1 -0
- package/dist/types/editors/editors.d.ts +7 -0
- package/dist/types/editors/editors.d.ts.map +1 -0
- package/dist/types/editors/index.d.ts +4 -0
- package/dist/types/editors/index.d.ts.map +1 -0
- package/dist/types/editors/shared/DocumentErrorBoundary.d.ts +35 -0
- package/dist/types/editors/shared/DocumentErrorBoundary.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/document/useWorkflowModel.d.ts +6 -0
- package/dist/types/editors/workflow-editor/document/useWorkflowModel.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/editor.d.ts +5 -0
- package/dist/types/editors/workflow-editor/editor.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/module.d.ts +8 -0
- package/dist/types/editors/workflow-editor/module.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/runtime-api.d.ts +134 -0
- package/dist/types/editors/workflow-editor/runtime-api.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/runtime-api.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/runtime-api.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/runtime-piece-source.d.ts +2 -0
- package/dist/types/editors/workflow-editor/runtime-piece-source.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/ActionListEditor.d.ts +6 -0
- package/dist/types/editors/workflow-editor/ui/ActionListEditor.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/Autocomplete.d.ts +19 -0
- package/dist/types/editors/workflow-editor/ui/Autocomplete.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts +26 -0
- package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/CanvasContextMenu.d.ts +14 -0
- package/dist/types/editors/workflow-editor/ui/CanvasContextMenu.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/ConnectionField.d.ts +8 -0
- package/dist/types/editors/workflow-editor/ui/ConnectionField.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/CreateConnectionModal.d.ts +7 -0
- package/dist/types/editors/workflow-editor/ui/CreateConnectionModal.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/ExpressionPicker.d.ts +50 -0
- package/dist/types/editors/workflow-editor/ui/ExpressionPicker.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/PieceMarkdown.d.ts +4 -0
- package/dist/types/editors/workflow-editor/ui/PieceMarkdown.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts +21 -0
- package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts +16 -0
- package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/VariablesEditor.d.ts +8 -0
- package/dist/types/editors/workflow-editor/ui/VariablesEditor.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/WorkflowCanvas.d.ts +11 -0
- package/dist/types/editors/workflow-editor/ui/WorkflowCanvas.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts +8 -0
- package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/action-template.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/action-template.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/action-template.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/action-template.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/ap-edge.d.ts +8 -0
- package/dist/types/editors/workflow-editor/ui/ap-edge.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/ap-layout.d.ts +18 -0
- package/dist/types/editors/workflow-editor/ui/ap-layout.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/ap-layout.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/ap-layout.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/ap-nodes.d.ts +39 -0
- package/dist/types/editors/workflow-editor/ui/ap-nodes.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/block-meta.d.ts +17 -0
- package/dist/types/editors/workflow-editor/ui/block-meta.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/block-meta.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/block-meta.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/block-selector-chips.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/block-selector-chips.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/blocks.d.ts +10 -0
- package/dist/types/editors/workflow-editor/ui/blocks.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/canvas-menu.d.ts +33 -0
- package/dist/types/editors/workflow-editor/ui/canvas-menu.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/canvas-menu.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/canvas-menu.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/connection-create.d.ts +18 -0
- package/dist/types/editors/workflow-editor/ui/connection-create.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/connection-create.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/connection-create.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/expression-scope.d.ts +29 -0
- package/dist/types/editors/workflow-editor/ui/expression-scope.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/expression-scope.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/expression-scope.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/expression-tokens.d.ts +18 -0
- package/dist/types/editors/workflow-editor/ui/expression-tokens.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/expression-tokens.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/expression-tokens.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/forms.d.ts +71 -0
- package/dist/types/editors/workflow-editor/ui/forms.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/model.d.ts +111 -0
- package/dist/types/editors/workflow-editor/ui/model.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/piece-placeholders.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/piece-placeholders.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/piece-source.d.ts +47 -0
- package/dist/types/editors/workflow-editor/ui/piece-source.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/reactor-piece-form.d.ts +5 -0
- package/dist/types/editors/workflow-editor/ui/reactor-piece-form.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/reactor-piece-form.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/reactor-piece-form.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/step-drag.d.ts +13 -0
- package/dist/types/editors/workflow-editor/ui/step-drag.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/step-drag.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/step-drag.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/trigger-strategy.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/trigger-strategy.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/validation.d.ts +6 -0
- package/dist/types/editors/workflow-editor/ui/validation.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/ui/validation.test.d.ts +2 -0
- package/dist/types/editors/workflow-editor/ui/validation.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-editor/use-runtime-url.d.ts +3 -0
- package/dist/types/editors/workflow-editor/use-runtime-url.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/ConnectionView.d.ts +7 -0
- package/dist/types/editors/workflow-studio/components/ConnectionView.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/EditorToolbar.d.ts +8 -0
- package/dist/types/editors/workflow-studio/components/EditorToolbar.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/RunsTable.d.ts +7 -0
- package/dist/types/editors/workflow-studio/components/RunsTable.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/RunsView.d.ts +10 -0
- package/dist/types/editors/workflow-studio/components/RunsView.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/Sidebar.d.ts +16 -0
- package/dist/types/editors/workflow-studio/components/Sidebar.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/WorkflowHeader.d.ts +8 -0
- package/dist/types/editors/workflow-studio/components/WorkflowHeader.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/WorkflowSteps.d.ts +8 -0
- package/dist/types/editors/workflow-studio/components/WorkflowSteps.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/WorkflowStudio.d.ts +6 -0
- package/dist/types/editors/workflow-studio/components/WorkflowStudio.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/connection-usage.d.ts +24 -0
- package/dist/types/editors/workflow-studio/components/connection-usage.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/connection-usage.test.d.ts +2 -0
- package/dist/types/editors/workflow-studio/components/connection-usage.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/run-format.d.ts +23 -0
- package/dist/types/editors/workflow-studio/components/run-format.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/step-outline.d.ts +25 -0
- package/dist/types/editors/workflow-studio/components/step-outline.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/step-outline.test.d.ts +2 -0
- package/dist/types/editors/workflow-studio/components/step-outline.test.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/use-hash-selection.d.ts +5 -0
- package/dist/types/editors/workflow-studio/components/use-hash-selection.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/components/useRuns.d.ts +8 -0
- package/dist/types/editors/workflow-studio/components/useRuns.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/config.d.ts +3 -0
- package/dist/types/editors/workflow-studio/config.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/editor.d.ts +4 -0
- package/dist/types/editors/workflow-studio/editor.d.ts.map +1 -0
- package/dist/types/editors/workflow-studio/module.d.ts +8 -0
- package/dist/types/editors/workflow-studio/module.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/pieces/index.d.ts +4 -0
- package/dist/types/pieces/index.d.ts.map +1 -0
- package/dist/types/pieces/reactor/index.d.ts +3 -0
- package/dist/types/pieces/reactor/index.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-create.d.ts +9 -0
- package/dist/types/pieces/reactor/lib/actions/document-create.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts +9 -0
- package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-find.d.ts +10 -0
- package/dist/types/pieces/reactor/lib/actions/document-find.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-get.d.ts +5 -0
- package/dist/types/pieces/reactor/lib/actions/document-get.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts +6 -0
- package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/actions/document-types.d.ts +2 -0
- package/dist/types/pieces/reactor/lib/actions/document-types.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/logo.d.ts +2 -0
- package/dist/types/pieces/reactor/lib/logo.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/parse.d.ts +22 -0
- package/dist/types/pieces/reactor/lib/parse.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/parse.test.d.ts +2 -0
- package/dist/types/pieces/reactor/lib/parse.test.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/reactor.d.ts +6 -0
- package/dist/types/pieces/reactor/lib/reactor.d.ts.map +1 -0
- package/dist/types/pieces/reactor/lib/triggers/document-event.d.ts +45 -0
- package/dist/types/pieces/reactor/lib/triggers/document-event.d.ts.map +1 -0
- package/dist/types/reactor/index.d.ts +5 -0
- package/dist/types/reactor/index.d.ts.map +1 -0
- package/dist/types/vitest.config.d.ts +3 -0
- package/dist/types/vitest.config.d.ts.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-CS8ttjKp.mjs","names":["actions","Chip","React","React","React","React","useLayoutEffect","createSlot","React","isSlottable","createSlotClone","getElementRef","mergeProps","SLOTTABLE_IDENTIFIER","Primitive","createSlot","React","React","React","Primitive","count","React","Primitive","React","useId","PORTAL_NAME","Portal","React","Primitive","React","React2","getElementRef","react_1","React","react_1","React","React","React","React","React","React","React","React","React","useId","Primitive","PortalPrimitive","createSlot","RemoveScroll","Fragment","createContext","Root","React","React","React","Portal$1","Content$1","Root$2","inputClass","insertAtCursor","inputClass","stringifyValue","inputClass","parseTypenames","get","set","namespaces","namespace","selector","Selection","selectorAll","Selection","matcher","Selection","Selection","sparse","constant","Selection","Selection","sparse","Selection","Selection","attrRemove","attrRemoveNS","attrConstant","attrConstantNS","attrFunction","attrFunctionNS","namespace","styleRemove","styleConstant","styleFunction","defaultView","textConstant","textFunction","creator","creator","selector","defaultView","Selection","selection_select","selection_selectAll","selection_selectChild","selection_selectChildren","selection_filter","selection_data","selection_enter","selection_exit","selection_join","selection_merge","selection_order","selection_sort","selection_call","selection_nodes","selection_node","selection_size","selection_empty","selection_each","selection_attr","selection_style","selection_property","selection_classed","selection_text","selection_html","selection_raise","selection_lower","selection_append","selection_insert","selection_remove","selection_clone","selection_datum","selection_on","selection_dispatch","selection_iterator","Selection","sourceEvent","nopropagation","select","noevent","defaultFilter","defaultTouchable","pointer","constant","define","constant","rgb","colorRgb","basis","basisClosed","value","value","number","constant","number","rgb","string","date","numberArray","object","identity","identity","decompose","number","timeout","interpolateNumber","interpolateRgb","interpolateString","namespace","interpolateTransform","interpolate","namespace","matcher","selector","selectorAll","style","interpolateTransform","interpolate","transition_select","transition_selectAll","transition_filter","transition_merge","transition_selection","transition_transition","transition_on","transition_attr","transition_attrTween","transition_style","transition_styleTween","transition_text","transition_textTween","transition_remove","transition_tween","transition_delay","transition_duration","transition_ease","transition_easeVarying","transition_end","easeCubicInOut","selection_interrupt","selection_transition","identity","identity","interpolateZoom","select","pointer","constant","addEdge","select","drag","zoom","zoomIdentity","pointer","interpolate","interpolateZoom","transform","zoomTransform","initPrevValues","React","createStore","useSyncExternalStoreExports","createStore","Fragment","shallow","ReactFlow"],"sources":["../../editors/workflow-editor/ui/model.ts","../../editors/workflow-editor/document/useWorkflowModel.ts","../../editors/workflow-editor/ui/expression-scope.ts","../../editors/workflow-editor/ui/BlockSelector.tsx","../../editors/workflow-editor/ui/canvas-menu.ts","../../editors/workflow-editor/ui/expression-tokens.ts","../../editors/workflow-editor/ui/ExpressionPicker.tsx","../../editors/workflow-editor/ui/connection-create.ts","../../../../node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs","../../../../node_modules/.pnpm/@radix-ui+primitive@1.1.3/node_modules/@radix-ui/primitive/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-compose-refs/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-context/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.14__@types+re_0935c7b95cefcdb4f10a34e92035e5e3/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-use-callback-ref@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-use-escape-keydown@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.14___9e4771d0900293d89694eff7a0933149/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-focus-guards@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-focus-guards/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.14__@types+_c6061abe6ab403e0e04cce9bd67455fb/node_modules/@radix-ui/react-focus-scope/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-id/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react_266ca67294f168fbf2e025541d323e69/node_modules/@radix-ui/react-portal/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.2.3_@types+react@19.2.14__@types+rea_abbc8bcf75333b39bfe32b13ef7abc0e/node_modules/@radix-ui/react-presence/dist/index.mjs","../../../../node_modules/.pnpm/aria-hidden@1.2.6/node_modules/aria-hidden/dist/es5/index.js","../../../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs","../../../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll-bar/dist/es5/constants.js","../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es5/assignRef.js","../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es5/useRef.js","../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es5/createRef.js","../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es5/mergeRef.js","../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es5/useMergeRef.js","../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es5/useTransformRef.js","../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es5/transformRef.js","../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es5/refToCallback.js","../../../../node_modules/.pnpm/use-callback-ref@1.3.3_@types+react@19.2.14_react@19.2.6/node_modules/use-callback-ref/dist/es5/index.js","../../../../node_modules/.pnpm/detect-node-es@1.1.0/node_modules/detect-node-es/es5/node.js","../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/use-sidecar/dist/es5/env.js","../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/use-sidecar/dist/es5/hook.js","../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/use-sidecar/dist/es5/hoc.js","../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/use-sidecar/dist/es5/config.js","../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/use-sidecar/dist/es5/medium.js","../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/use-sidecar/dist/es5/renderProp.js","../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/use-sidecar/dist/es5/exports.js","../../../../node_modules/.pnpm/use-sidecar@1.1.3_@types+react@19.2.14_react@19.2.6/node_modules/use-sidecar/dist/es5/index.js","../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es5/medium.js","../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es5/UI.js","../../../../node_modules/.pnpm/get-nonce@1.0.1/node_modules/get-nonce/dist/es5/index.js","../../../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.14_react@19.2.6/node_modules/react-style-singleton/dist/es5/singleton.js","../../../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.14_react@19.2.6/node_modules/react-style-singleton/dist/es5/hook.js","../../../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.14_react@19.2.6/node_modules/react-style-singleton/dist/es5/component.js","../../../../node_modules/.pnpm/react-style-singleton@2.2.3_@types+react@19.2.14_react@19.2.6/node_modules/react-style-singleton/dist/es5/index.js","../../../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll-bar/dist/es5/utils.js","../../../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll-bar/dist/es5/component.js","../../../../node_modules/.pnpm/react-remove-scroll-bar@2.3.8_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll-bar/dist/es5/index.js","../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es5/aggresiveCapture.js","../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es5/handleScroll.js","../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es5/SideEffect.js","../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es5/sidecar.js","../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es5/Combination.js","../../../../node_modules/.pnpm/react-remove-scroll@2.7.2_@types+react@19.2.14_react@19.2.6/node_modules/react-remove-scroll/dist/es5/index.js","../../../../node_modules/.pnpm/@radix-ui+react-dialog@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.14__@types+reac_340425d8afbecb0b8c61fd2281bc18a1/node_modules/@radix-ui/react-dialog/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-slot@1.2.4_@types+react@19.2.14_react@19.2.6/node_modules/@radix-ui/react-slot/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.4_@types+react-dom@19.2.3_@types+react@19.2.14__@types+re_c8c8fd2647f03197dbf56370d7498033/node_modules/@radix-ui/react-primitive/dist/index.mjs","../../../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.4_@types+react-dom@19.2.3_@types+react@19.2.14__@ty_c96f9879086bb31d068780de3c4b72ff/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs","../../../design-system/dist/src-CVV6HzQZ.js","../../editors/workflow-editor/ui/CreateConnectionModal.tsx","../../editors/workflow-editor/ui/ConnectionField.tsx","../../editors/workflow-editor/ui/action-template.ts","../../editors/workflow-editor/ui/ActionListEditor.tsx","../../editors/workflow-editor/ui/validation.ts","../../editors/workflow-editor/ui/PropertyForm.tsx","../../editors/workflow-editor/ui/StepPanel.tsx","../../editors/workflow-editor/ui/VariablesEditor.tsx","../../../../node_modules/.pnpm/classcat@5.0.5/node_modules/classcat/index.js","../../../../node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespaces.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/creator.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selector.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/select.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/array.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectorAll.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectAll.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/matcher.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChild.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChildren.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/filter.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sparse.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/enter.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/data.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/exit.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/join.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/merge.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/order.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sort.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/call.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/nodes.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/node.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/empty.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/each.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/attr.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/window.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/style.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/property.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/classed.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/text.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/html.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/raise.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/lower.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/append.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/insert.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/remove.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/clone.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/datum.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/on.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/dispatch.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/iterator.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/sourceEvent.js","../../../../node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/pointer.js","../../../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/noevent.js","../../../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/nodrag.js","../../../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/constant.js","../../../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/event.js","../../../../node_modules/.pnpm/d3-drag@3.0.0/node_modules/d3-drag/src/drag.js","../../../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js","../../../../node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basis.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/basisClosed.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/numberArray.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/array.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/date.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/object.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/value.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js","../../../../node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/zoom.js","../../../../node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js","../../../../node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js","../../../../node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js","../../../../node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js","../../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/constant.js","../../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/event.js","../../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/transform.js","../../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/noevent.js","../../../../node_modules/.pnpm/d3-zoom@3.0.0/node_modules/d3-zoom/src/zoom.js","../../../../node_modules/.pnpm/@xyflow+system@0.0.82/node_modules/@xyflow/system/dist/esm/index.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/shim/index.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.6/node_modules/use-sync-external-store/shim/with-selector.js","../../../../node_modules/.pnpm/zustand@4.5.7_@types+react@19.2.14_react@19.2.6/node_modules/zustand/esm/vanilla.mjs","../../../../node_modules/.pnpm/zustand@4.5.7_@types+react@19.2.14_react@19.2.6/node_modules/zustand/esm/traditional.mjs","../../../../node_modules/.pnpm/zustand@4.5.7_@types+react@19.2.14_react@19.2.6/node_modules/zustand/esm/shallow.mjs","../../../../node_modules/.pnpm/@xyflow+react@12.11.6_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@19.2.1_4b9d8a368098ff3c381e691ebf38dc2a/node_modules/@xyflow/react/dist/esm/index.js","../../editors/workflow-editor/ui/blocks.ts","../../editors/workflow-editor/ui/step-drag.ts","../../editors/workflow-editor/ui/ap-nodes.tsx","../../editors/workflow-editor/ui/ap-edge.tsx","../../editors/workflow-editor/ui/CanvasContextMenu.tsx","../../editors/workflow-editor/ui/WorkflowCanvas.tsx","../../editors/workflow-editor/ui/WorkflowEditorApp.tsx","../../editors/workflow-editor/editor.tsx"],"sourcesContent":["// Plain view model + callbacks; no document-model imports so the UI layer\n// stays independent of Powerhouse document plumbing.\n\nexport type WorkflowStatusValue = \"DRAFT\" | \"ENABLED\" | \"DISABLED\" | \"ARCHIVED\";\n\nexport interface PointModel {\n x: number;\n y: number;\n}\n\nexport interface TriggerModel {\n id: string;\n blockType: string;\n config: unknown;\n connectionId: string | null;\n}\n\nexport type BackoffKindValue = \"FIXED\" | \"EXPONENTIAL\";\n\nexport interface RetryPolicyModel {\n maxAttempts: number;\n backoff: BackoffKindValue;\n initialDelaySeconds: number;\n maxDelaySeconds: number;\n retryOn: string[];\n}\n\nexport interface StepModel {\n id: string;\n key: string;\n name: string;\n blockType: string;\n connectionId: string | null;\n config: unknown;\n retry: RetryPolicyModel | null;\n timeoutSeconds: number | null;\n idempotencyKeyExpression: string | null;\n position: PointModel | null;\n}\n\nexport interface EdgeModel {\n id: string;\n from: string;\n to: string;\n port: string;\n condition: string | null;\n}\n\nexport interface VariableModel {\n id: string;\n key: string;\n value: unknown;\n description: string | null;\n}\n\nexport interface WorkflowModel {\n name: string;\n status: WorkflowStatusValue;\n version: number;\n trigger: TriggerModel | null;\n steps: StepModel[];\n edges: EdgeModel[];\n variables: VariableModel[];\n}\n\nexport interface AddStepInputModel {\n key: string;\n name: string;\n blockType: string;\n config: unknown;\n position?: PointModel;\n}\n\nexport interface UpdateStepInputModel {\n id: string;\n key?: string;\n name?: string;\n blockType?: string;\n // null clears the step's connection.\n connectionId?: string | null;\n config?: unknown;\n // null clears each of these; undefined leaves them unchanged.\n retry?: RetryPolicyModel | null;\n timeoutSeconds?: number | null;\n idempotencyKeyExpression?: string | null;\n position?: PointModel;\n}\n\nexport interface WorkflowEditorCallbacks {\n setName: (name: string) => void;\n setStatus: (status: WorkflowStatusValue) => void;\n setTrigger: (input: {\n blockType: string;\n config: unknown;\n connectionId?: string | null;\n }) => void;\n clearTrigger: () => void;\n addStep: (input: AddStepInputModel) => void;\n updateStep: (input: UpdateStepInputModel) => void;\n removeStep: (id: string) => void;\n addEdge: (input: {\n from: string;\n to: string;\n port: string;\n condition?: string;\n }) => void;\n removeEdge: (id: string) => void;\n // Upserts by key (the reducer matches existing variables on key).\n setVariable: (input: {\n id?: string;\n key: string;\n value: unknown;\n description?: string;\n }) => void;\n removeVariable: (id: string) => void;\n // Composite operations backing the canvas add buttons.\n insertStepOnEdge: (edgeId: string, input: AddStepInputModel) => void;\n appendStep: (fromId: string, port: string, input: AddStepInputModel) => void;\n // Copies a step with its config and advanced settings, detached from the\n // graph so no port ends up with two edges.\n duplicateStep: (id: string) => void;\n // Re-parents a step onto a port, keeping whatever follows it.\n moveStep: (move: {\n stepId: string;\n toParentId: string;\n port: string;\n }) => void;\n}\n\n// Slugified step key derived from a label, suffixed until it is free.\nexport function uniqueStepKey(taken: string[], label: string): string {\n const base =\n label\n .toLowerCase()\n .replaceAll(/[^a-z0-9]+/g, \"_\")\n .replaceAll(/^_+|_+$/g, \"\") || \"step\";\n const keys = new Set(taken);\n let key = base;\n let suffix = 2;\n while (keys.has(key)) key = `${base}_${suffix++}`;\n return key;\n}\n\n// Output ports a step exposes, mirroring the engine's routing semantics.\nexport function stepPorts(blockType: string): string[] {\n if (blockType === \"core#branch\") return [\"true\", \"false\", \"error\"];\n return [\"next\", \"error\"];\n}\n\n// The ports that carry the flow onwards. `error` is left out: it is a failure\n// route, edited separately.\nexport function flowPorts(blockType: string): string[] {\n return stepPorts(blockType).filter((port) => port !== \"error\");\n}\n","// The only file coupling the editor UI to the Powerhouse document: maps the\n// workflow document state to the plain view model and callbacks to actions.\nimport { generateId } from \"document-model\";\nimport {\n actions,\n useSelectedWorkflowDocument,\n type WorkflowState,\n} from \"document-models/workflow\";\nimport { useMemo } from \"react\";\nimport {\n uniqueStepKey,\n type WorkflowEditorCallbacks,\n type WorkflowModel,\n} from \"../ui/model.js\";\n\nfunction toModel(state: WorkflowState): WorkflowModel {\n return {\n name: state.name,\n status: state.status,\n version: state.version,\n trigger: state.trigger\n ? {\n id: state.trigger.id,\n blockType: state.trigger.blockType,\n config: state.trigger.config,\n connectionId: state.trigger.connectionId ?? null,\n }\n : null,\n steps: state.steps.map((step) => ({\n id: step.id,\n key: step.key,\n name: step.name,\n blockType: step.blockType,\n connectionId: step.connectionId ?? null,\n config: step.config,\n retry: step.retry\n ? {\n maxAttempts: step.retry.maxAttempts,\n backoff: step.retry.backoff,\n initialDelaySeconds: step.retry.initialDelaySeconds,\n maxDelaySeconds: step.retry.maxDelaySeconds,\n retryOn: [...step.retry.retryOn],\n }\n : null,\n timeoutSeconds: step.timeoutSeconds ?? null,\n idempotencyKeyExpression: step.idempotencyKeyExpression ?? null,\n position: step.position\n ? { x: step.position.x, y: step.position.y }\n : null,\n })),\n edges: state.edges.map((edge) => ({\n id: edge.id,\n from: edge.from,\n to: edge.to,\n port: edge.port,\n condition: edge.condition ?? null,\n })),\n variables: state.variables.map((variable) => ({\n id: variable.id,\n key: variable.key,\n value: variable.value ?? null,\n description: variable.description ?? null,\n })),\n };\n}\n\nexport function useWorkflowModel(): {\n model: WorkflowModel;\n callbacks: WorkflowEditorCallbacks;\n} {\n const [document, dispatch] = useSelectedWorkflowDocument();\n const state = document.state.global;\n\n const model = useMemo(() => toModel(state), [state]);\n\n const callbacks = useMemo<WorkflowEditorCallbacks>(\n () => ({\n setName: (name) => {\n dispatch(actions.setWorkflowName({ name }));\n // Base action keeps the document header name in sync for drive views.\n dispatch(actions.setName(name));\n },\n setStatus: (status) => dispatch(actions.setWorkflowStatus({ status })),\n setTrigger: (input) =>\n dispatch(\n actions.setTrigger({\n // Keep the trigger id stable so edges from it survive edits.\n id: state.trigger?.id ?? generateId(),\n blockType: input.blockType,\n config: input.config,\n connectionId: input.connectionId,\n }),\n ),\n clearTrigger: () => dispatch(actions.clearTrigger({})),\n addStep: (input) =>\n dispatch(\n actions.addStep({\n id: generateId(),\n key: input.key,\n name: input.name,\n blockType: input.blockType,\n config: input.config,\n position: input.position,\n }),\n ),\n updateStep: (input) => dispatch(actions.updateStep(input)),\n removeStep: (id) => dispatch(actions.removeStep({ id })),\n addEdge: (input) =>\n dispatch(\n actions.addEdge({\n id: generateId(),\n from: input.from,\n to: input.to,\n port: input.port,\n condition: input.condition,\n }),\n ),\n removeEdge: (id) => dispatch(actions.removeEdge({ id })),\n moveStep: (move) => {\n // Re-parent only: the step keeps its own outgoing edges, and the port\n // it used to hang off simply becomes free again.\n for (const edge of state.edges.filter(\n (entry) => entry.to === move.stepId,\n )) {\n dispatch(actions.removeEdge({ id: edge.id }));\n }\n dispatch(\n actions.addEdge({\n id: generateId(),\n from: move.toParentId,\n to: move.stepId,\n port: move.port,\n }),\n );\n },\n setVariable: (input) =>\n dispatch(\n actions.setVariable({\n id: input.id ?? generateId(),\n key: input.key,\n value: input.value,\n description: input.description,\n }),\n ),\n removeVariable: (id) => dispatch(actions.removeVariable({ id })),\n insertStepOnEdge: (edgeId, input) => {\n const edge = state.edges.find((entry) => entry.id === edgeId);\n if (!edge) return;\n const stepId = generateId();\n dispatch(\n actions.addStep({\n id: stepId,\n key: input.key,\n name: input.name,\n blockType: input.blockType,\n config: input.config,\n }),\n );\n dispatch(actions.removeEdge({ id: edgeId }));\n dispatch(\n actions.addEdge({\n id: generateId(),\n from: edge.from,\n to: stepId,\n port: edge.port,\n condition: edge.condition,\n }),\n );\n dispatch(\n actions.addEdge({\n id: generateId(),\n from: stepId,\n to: edge.to,\n port: \"next\",\n }),\n );\n },\n duplicateStep: (id) => {\n const step = state.steps.find((entry) => entry.id === id);\n if (!step) return;\n dispatch(\n actions.addStep({\n id: generateId(),\n key: uniqueStepKey(\n state.steps.map((entry) => entry.key),\n step.key,\n ),\n name: step.name,\n blockType: step.blockType,\n connectionId: step.connectionId,\n config: step.config,\n retry: step.retry,\n timeoutSeconds: step.timeoutSeconds,\n idempotencyKeyExpression: step.idempotencyKeyExpression,\n position: step.position,\n }),\n );\n },\n appendStep: (fromId, port, input) => {\n const stepId = generateId();\n dispatch(\n actions.addStep({\n id: stepId,\n key: input.key,\n name: input.name,\n blockType: input.blockType,\n config: input.config,\n }),\n );\n dispatch(\n actions.addEdge({\n id: generateId(),\n from: fromId,\n to: stepId,\n port,\n }),\n );\n },\n }),\n [dispatch, state],\n );\n\n return { model, callbacks };\n}\n","// Builds the {} picker scope for a step: upstream step outputs and the\n// trigger payload from the latest run when journaled, authored shapes otherwise.\nimport type { WorkflowModel } from \"./model.js\";\n\nexport interface ExpressionScope {\n // { trigger: { payload }, steps: { key: { output } }, variables: {...} }.\n value: Record<string, unknown>;\n // Caption per subtree root path, e.g. \"steps.fetch.output\" → \"from run 09:14\".\n captions: Record<string, string>;\n}\n\nexport const EMPTY_SCOPE: ExpressionScope = { value: {}, captions: {} };\n\nexport interface ScopeRunStep {\n stepKey: string;\n blockType: string;\n status: string;\n output: unknown;\n}\n\nexport interface ScopeRun {\n startedAt: string;\n triggerPayload: unknown;\n steps: ScopeRunStep[];\n}\n\nexport interface BuildScopeOptions {\n model: WorkflowModel;\n stepId: string;\n latestRun?: ScopeRun;\n // Authored output shape of a block (declared types as leaves).\n authoredOutput: (blockType: string, config: unknown) => Promise<unknown>;\n now?: Date;\n}\n\nconst MAX_DEPTH = 6;\nconst MAX_ARRAY_ITEMS = 25;\n\n// Run outputs can be huge; the picker only needs a browsable prefix.\nexport function capValue(value: unknown, depth = 0): unknown {\n if (value === null || typeof value !== \"object\") return value;\n if (depth >= MAX_DEPTH) return Array.isArray(value) ? \"[…]\" : \"{…}\";\n if (Array.isArray(value)) {\n return value\n .slice(0, MAX_ARRAY_ITEMS)\n .map((item) => capValue(item, depth + 1));\n }\n return Object.fromEntries(\n Object.entries(value as Record<string, unknown>).map(([key, entry]) => [\n key,\n capValue(entry, depth + 1),\n ]),\n );\n}\n\nexport function upstreamStepIds(\n model: WorkflowModel,\n stepId: string,\n): Set<string> {\n const incoming = new Map<string, string[]>();\n for (const edge of model.edges) {\n incoming.set(edge.to, [...(incoming.get(edge.to) ?? []), edge.from]);\n }\n const upstream = new Set<string>();\n const queue = [stepId];\n while (queue.length > 0) {\n for (const from of incoming.get(queue.pop()!) ?? []) {\n if (!upstream.has(from)) {\n upstream.add(from);\n queue.push(from);\n }\n }\n }\n return upstream;\n}\n\nexport function formatRunTime(startedAt: string, now = new Date()): string {\n const date = new Date(startedAt);\n if (Number.isNaN(date.getTime())) return startedAt;\n const sameDay = date.toDateString() === now.toDateString();\n const time = date.toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n });\n return sameDay\n ? time\n : `${date.toLocaleDateString([], { month: \"short\", day: \"numeric\" })} ${time}`;\n}\n\nconst hasOutput = (step: ScopeRunStep) =>\n (step.status === \"SUCCEEDED\" || step.status === \"REPLAYED\") &&\n step.output !== undefined &&\n step.output !== null;\n\nexport async function buildExpressionScope(\n options: BuildScopeOptions,\n): Promise<ExpressionScope> {\n const { model, latestRun } = options;\n const runCaption = latestRun\n ? `from run ${formatRunTime(latestRun.startedAt, options.now)}`\n : undefined;\n const runSteps = new Map(\n (latestRun?.steps ?? [])\n .filter(hasOutput)\n .map((step) => [step.stepKey, step]),\n );\n const value: Record<string, unknown> = {};\n const captions: Record<string, string> = {};\n\n if (model.trigger) {\n if (\n runCaption &&\n latestRun?.triggerPayload !== undefined &&\n latestRun.triggerPayload !== null\n ) {\n value.trigger = { payload: capValue(latestRun.triggerPayload) };\n captions[\"trigger.payload\"] = runCaption;\n } else {\n value.trigger = {\n payload: await options.authoredOutput(\n model.trigger.blockType,\n model.trigger.config,\n ),\n };\n captions[\"trigger.payload\"] = \"declared type\";\n }\n }\n\n const upstream = upstreamStepIds(model, options.stepId);\n const steps: Record<string, unknown> = {};\n await Promise.all(\n model.steps\n .filter((step) => upstream.has(step.id))\n .map(async (step) => {\n const journaled = runSteps.get(step.key);\n // A renamed/retyped step's old output would mislead: match on both.\n if (runCaption && journaled && journaled.blockType === step.blockType) {\n steps[step.key] = { output: capValue(journaled.output) };\n captions[`steps.${step.key}.output`] = runCaption;\n return;\n }\n steps[step.key] = {\n output: await options.authoredOutput(step.blockType, step.config),\n };\n captions[`steps.${step.key}.output`] = \"declared type\";\n }),\n );\n // Omit empty groups so the picker never offers a bare {{steps}}.\n if (Object.keys(steps).length > 0) value.steps = steps;\n\n if (model.variables.length > 0) {\n value.variables = Object.fromEntries(\n model.variables.map((variable) => [variable.key, variable.value ?? null]),\n );\n captions.variables = \"workflow variables\";\n }\n return { value, captions };\n}\n","// Piece-selector-style popover, adapted from the Activepieces builder\n// pieces-selector (MIT, activepieces packages/web).\nimport { useEffect, useMemo, useRef, useState } from \"react\";\nimport { useBlockMeta } from \"./block-meta.js\";\nimport type { BlockPreset } from \"./blocks.js\";\nimport type { StepModel } from \"./model.js\";\nimport {\n getPieceSource,\n triggerStrategyRuns,\n type BlockSearchHitUi,\n type BlockSearchResultUi,\n type PieceActionUi,\n type PieceSummaryUi,\n type PieceTriggerUi,\n} from \"./piece-source.js\";\n\nexport type PieceMode = \"actions\" | \"triggers\";\n\n// Logo size for the picker's rows: presets, pieces, search hits and attach.\nconst ROW_LOGO = 24;\n\nexport function BlockLogo(props: { blockType: string; size?: number }) {\n const meta = useBlockMeta(props.blockType);\n return (\n <LogoFrame\n src={meta.logoUrl}\n alt={meta.displayName}\n size={props.size ?? 36}\n glyph={meta.glyph}\n />\n );\n}\n\nfunction GlyphBadge(props: { glyph?: string; size: number }) {\n return (\n <div\n className=\"flex shrink-0 items-center justify-center rounded-sm border border-solid border-slate-200 bg-slate-50 text-slate-600\"\n style={{\n width: props.size,\n height: props.size,\n fontSize: props.size / 2,\n }}\n >\n {props.glyph ?? \"?\"}\n </div>\n );\n}\n\n// Falls back to the glyph badge when the piece metadata carries no logo, or\n// when the CDN image fails to load (Activepieces retires logo files).\nfunction LogoFrame(props: {\n src?: string;\n alt: string;\n size: number;\n glyph?: string;\n}) {\n const [broken, setBroken] = useState(false);\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- a new src gets a fresh chance to load\n setBroken(false);\n }, [props.src]);\n if (!props.src || broken) {\n return <GlyphBadge glyph={props.glyph} size={props.size} />;\n }\n // No frame and no padding around a logo: a piece's artwork is its own tile,\n // with its own corner radius and its own margin.\n\n // Framing it drew our border through corners that were already rounded —\n // and no single radius matches every piece, so the frame is left to the\n // glyph badge, which is the only case where we draw the tile ourselves.\n return (\n <div\n className=\"flex shrink-0 items-center justify-center\"\n style={{ width: props.size, height: props.size }}\n >\n <img\n src={props.src}\n alt={props.alt}\n // drop-shadow, not a border or a ring: it follows the image's alpha,\n // so it traces the artwork's own silhouette — rounded corners and all\n // — and gives a white-on-transparent logo an edge on a white row.\n className=\"h-full w-full object-contain drop-shadow-sm\"\n onError={() => setBroken(true)}\n />\n </div>\n );\n}\n\nfunction Row(props: {\n logo: React.ReactNode;\n label: string;\n description: string;\n onClick: () => void;\n disabled?: boolean;\n}) {\n return (\n <button\n type=\"button\"\n className={`flex w-full items-center gap-2 px-3 py-1.5 text-left ${\n props.disabled ? \"cursor-not-allowed opacity-50\" : \"hover:bg-slate-50\"\n }`}\n disabled={props.disabled}\n onClick={props.onClick}\n >\n {props.logo}\n <span className=\"min-w-0\">\n <span className=\"block truncate text-xs font-medium text-slate-800\">\n {props.label}\n </span>\n <span className=\"block truncate text-[11px] text-slate-400\">\n {props.description}\n </span>\n </span>\n </button>\n );\n}\n\nfunction SectionLabel(props: { children: string }) {\n return (\n <div className=\"px-3 pb-0.5 pt-2 text-[10px] font-semibold uppercase tracking-wide text-slate-300\">\n {props.children}\n </div>\n );\n}\n\n// null while loading.\ninterface CatalogState {\n pieces: PieceSummaryUi[];\n error?: string;\n}\n\n// Activepieces category ids → chip labels; AI variants share one chip and\n// their CORE/FLOW_CONTROL utilities are renamed so \"Core\" stays ours.\nconst CATEGORY_LABELS: Record<string, string> = {\n ARTIFICIAL_INTELLIGENCE: \"AI\",\n UNIVERSAL_AI: \"AI\",\n PRODUCTIVITY: \"Productivity\",\n MARKETING: \"Marketing\",\n COMMUNICATION: \"Communication\",\n SALES_AND_CRM: \"Sales & CRM\",\n DEVELOPER_TOOLS: \"Developer tools\",\n CONTENT_AND_FILES: \"Content & files\",\n BUSINESS_INTELLIGENCE: \"Business intelligence\",\n CORE: \"Utilities\",\n FLOW_CONTROL: \"Utilities\",\n COMMERCE: \"Commerce\",\n FORMS_AND_SURVEYS: \"Forms & surveys\",\n ACCOUNTING: \"Accounting\",\n CUSTOMER_SUPPORT: \"Customer support\",\n PAYMENT_PROCESSING: \"Payments\",\n HUMAN_RESOURCES: \"HR\",\n};\n\nexport const CORE_CHIP = \"Core\";\n// The reactor's own blocks: its own chip, beside Core, because they are a\n// piece rather than an engine built-in and an author looks for them by name.\nexport const POWERHOUSE_CHIP = \"Powerhouse\";\nconst AI_CHIP = \"AI\";\n\nfunction categoryLabel(id: string): string {\n return (\n CATEGORY_LABELS[id] ??\n id\n .toLowerCase()\n .replaceAll(\"_\", \" \")\n .replace(/^\\w/, (char) => char.toUpperCase())\n );\n}\n\nexport function chipsOf(piece: { categories: string[] }): Set<string> {\n return new Set(piece.categories.map(categoryLabel));\n}\n\n// Chip order: Core and Powerhouse pinned, AI next, then by piece count.\nexport function orderChips(pieces: { categories: string[] }[]): string[] {\n const counts = new Map<string, number>();\n for (const piece of pieces) {\n for (const chip of chipsOf(piece)) {\n counts.set(chip, (counts.get(chip) ?? 0) + 1);\n }\n }\n const rest = [...counts.entries()]\n .filter(([chip]) => chip !== AI_CHIP)\n .sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))\n .map(([chip]) => chip);\n return [\n CORE_CHIP,\n POWERHOUSE_CHIP,\n ...(counts.has(AI_CHIP) ? [AI_CHIP] : []),\n ...rest,\n ];\n}\n\n// Drill-in view: one piece's actions or triggers, per mode.\nfunction PieceEntries(props: {\n piece: PieceSummaryUi;\n mode: PieceMode;\n onPick: (preset: BlockPreset) => void;\n onBack: () => void;\n}) {\n const [entries, setEntries] = useState<\n (PieceActionUi & Partial<PieceTriggerUi>)[] | null\n >(null);\n const [error, setError] = useState<string | null>(null);\n\n useEffect(() => {\n let cancelled = false;\n const pieceSource = getPieceSource();\n const load =\n props.mode === \"triggers\"\n ? pieceSource?.loadTriggers(props.piece.name)\n : pieceSource?.loadActions(props.piece.name);\n load\n ?.then((result) => {\n if (!cancelled) setEntries(result);\n })\n .catch((loadError: unknown) => {\n if (!cancelled) {\n setError(\n loadError instanceof Error ? loadError.message : String(loadError),\n );\n }\n });\n return () => {\n cancelled = true;\n };\n }, [props.piece.name, props.mode]);\n\n return (\n <div className=\"max-h-80 overflow-y-auto py-1\">\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-1 px-3 py-1 text-[11px] text-slate-400 hover:text-slate-600\"\n onClick={props.onBack}\n >\n ← {props.piece.displayName}\n </button>\n {error ? (\n <div className=\"px-3 py-2 text-xs text-red-500\">{error}</div>\n ) : entries === null ? (\n <div className=\"px-3 py-2 text-xs text-slate-400\">Loading…</div>\n ) : (\n entries.map((entry) => {\n // Visible but inert: picking one would arm a trigger that never fires.\n const strategy = entry.strategy ?? \"POLLING\";\n const unsupported =\n props.mode === \"triggers\" && !triggerStrategyRuns(strategy);\n return (\n <Row\n key={entry.name}\n logo={\n <LogoFrame\n src={props.piece.logoUrl}\n alt={props.piece.displayName}\n size={ROW_LOGO}\n />\n }\n label={entry.displayName}\n description={\n unsupported\n ? `${strategy.toLowerCase()} — not supported yet`\n : entry.description\n }\n disabled={unsupported}\n onClick={() =>\n props.onPick({\n label: entry.displayName,\n blockType: entry.blockType,\n description: entry.description,\n defaultConfig: {},\n })\n }\n />\n );\n })\n )}\n </div>\n );\n}\n\nconst SEARCH_MIN_CHARS = 2;\nconst SEARCH_DEBOUNCE_MS = 250;\nconst INDEXING_RETRY_MS = 2000;\n\ntype SearchState =\n | { kind: \"idle\" }\n | { kind: \"loading\" }\n | { kind: \"done\"; result: BlockSearchResultUi }\n | { kind: \"error\"; message: string };\n\n// Debounced catalog-wide search; keeps polling while the runtime indexes.\nfunction useBlockSearch(query: string, enabled: boolean): SearchState {\n const [state, setState] = useState<SearchState>({ kind: \"idle\" });\n const [attempt, setAttempt] = useState(0);\n const trimmed = query.trim();\n const active = enabled && trimmed.length >= SEARCH_MIN_CHARS;\n\n useEffect(() => {\n const search = getPieceSource()?.searchBlocks;\n if (!active || !search) {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- drops a finished search when the query goes inactive\n setState({ kind: \"idle\" });\n return;\n }\n let alive = true;\n let retry: ReturnType<typeof setTimeout> | undefined;\n const timer = setTimeout(() => {\n setState((previous) =>\n previous.kind === \"done\" ? previous : { kind: \"loading\" },\n );\n search(trimmed).then(\n (result) => {\n if (!alive) return;\n setState({ kind: \"done\", result });\n if (result.status === \"indexing\") {\n retry = setTimeout(\n () => setAttempt((value) => value + 1),\n INDEXING_RETRY_MS,\n );\n }\n },\n (error: unknown) => {\n if (alive) {\n setState({\n kind: \"error\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n },\n );\n }, SEARCH_DEBOUNCE_MS);\n return () => {\n alive = false;\n clearTimeout(timer);\n if (retry) clearTimeout(retry);\n };\n }, [active, trimmed, attempt]);\n\n return active ? state : { kind: \"idle\" };\n}\n\nfunction Chip(props: { label: string; active: boolean; onClick: () => void }) {\n return (\n <button\n type=\"button\"\n className={`rounded-full border px-2 py-0.5 text-[10px] font-medium ${\n props.active\n ? \"border-slate-800 bg-slate-800 text-white\"\n : \"border-slate-200 text-slate-500 hover:border-slate-400\"\n }`}\n onClick={props.onClick}\n >\n {props.label}\n </button>\n );\n}\n\nexport function BlockSelector(props: {\n title: string;\n presets: BlockPreset[];\n onPick: (preset: BlockPreset) => void;\n onClose: () => void;\n // Show the Activepieces catalog below the presets.\n showPieces?: boolean;\n // Which piece entries the drill-in offers; defaults to actions.\n pieceMode?: PieceMode;\n // Detached steps offered for re-attachment at this insertion point.\n attachSteps?: StepModel[];\n onAttach?: (stepId: string) => void;\n}) {\n const [query, setQuery] = useState(\"\");\n const [chip, setChip] = useState<string | null>(null);\n const [catalog, setCatalog] = useState<CatalogState | null>(null);\n const [piece, setPiece] = useState<PieceSummaryUi | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handler = (event: MouseEvent) => {\n if (!containerRef.current?.contains(event.target as globalThis.Node)) {\n props.onClose();\n }\n };\n window.addEventListener(\"mousedown\", handler);\n return () => window.removeEventListener(\"mousedown\", handler);\n }, [props]);\n\n const pieceSource = props.showPieces ? getPieceSource() : undefined;\n useEffect(() => {\n if (!pieceSource) return;\n let cancelled = false;\n pieceSource\n .loadCatalog()\n .then((pieces) => {\n if (!cancelled) setCatalog({ pieces });\n })\n .catch((error: unknown) => {\n if (!cancelled) {\n setCatalog({\n pieces: [],\n error: error instanceof Error ? error.message : String(error),\n });\n }\n });\n return () => {\n cancelled = true;\n };\n }, [pieceSource]);\n\n const mode: PieceMode = props.pieceMode ?? \"actions\";\n const lowered = query.toLowerCase();\n const modePieces = useMemo(\n () =>\n (catalog?.pieces ?? []).filter(\n (entry) =>\n (mode === \"triggers\" ? entry.triggerCount : entry.actionCount) > 0,\n ),\n [catalog, mode],\n );\n const chips = useMemo(() => orderChips(modePieces), [modePieces]);\n const chipsByPiece = useMemo(\n () => new Map(modePieces.map((entry) => [entry.name, chipsOf(entry)])),\n [modePieces],\n );\n const inChip = (pieceName: string) =>\n chip === null || chip === CORE_CHIP\n ? true\n : (chipsByPiece.get(pieceName)?.has(chip) ?? false);\n\n const presetChip = chip === CORE_CHIP || chip === POWERHOUSE_CHIP;\n const showCatalog = pieceSource !== undefined && !presetChip;\n const matching = props.presets.filter((preset) =>\n `${preset.label} ${preset.blockType}`.toLowerCase().includes(lowered),\n );\n // The engine's own blocks, then the reactor's. Two sections rather than one\n // \"Core\": the document blocks are a piece, and saying so is honest.\n const corePresets =\n chip === null || chip === CORE_CHIP\n ? matching.filter((preset) => preset.group !== \"powerhouse\")\n : [];\n const powerhousePresets =\n chip === null || chip === POWERHOUSE_CHIP\n ? matching.filter((preset) => preset.group === \"powerhouse\")\n : [];\n const filteredAttach = (\n props.onAttach ? (props.attachSteps ?? []) : []\n ).filter((step) =>\n `${step.name} ${step.key} ${step.blockType}`\n .toLowerCase()\n .includes(lowered),\n );\n const filteredPieces = showCatalog\n ? modePieces.filter(\n (entry) =>\n inChip(entry.name) &&\n `${entry.displayName} ${entry.name} ${entry.description}`\n .toLowerCase()\n .includes(lowered),\n )\n : [];\n\n const search = useBlockSearch(query, showCatalog && !piece);\n\n const presetRow = (preset: BlockPreset) => (\n <Row\n key={preset.blockType + preset.label}\n logo={<BlockLogo blockType={preset.blockType} size={ROW_LOGO} />}\n label={preset.label}\n description={preset.description}\n onClick={() => props.onPick(preset)}\n />\n );\n // Labels earn their place once there is more than one thing to tell apart.\n const labelPresets =\n showCatalog ||\n filteredAttach.length > 0 ||\n (corePresets.length > 0 && powerhousePresets.length > 0);\n const wantedKind = mode === \"triggers\" ? \"trigger\" : \"action\";\n const hits: BlockSearchHitUi[] =\n search.kind === \"done\"\n ? search.result.hits.filter(\n (hit) => hit.kind === wantedKind && inChip(hit.pieceName),\n )\n : [];\n const searchActive = search.kind !== \"idle\";\n\n return (\n <div\n ref={containerRef}\n className=\"nodrag nopan nowheel w-80 rounded-md border border-solid border-slate-200 bg-white shadow-lg\"\n onClick={(event) => event.stopPropagation()}\n >\n <div className=\"border-b border-slate-100 p-2\">\n <div className=\"mb-1 px-1 text-[11px] font-semibold uppercase tracking-wide text-slate-400\">\n {props.title}\n </div>\n {piece ? null : (\n <>\n <input\n autoFocus\n className=\"w-full rounded border border-slate-200 px-2 py-1 text-xs\"\n placeholder={\n pieceSource ? \"Search pieces, actions, triggers…\" : \"Search…\"\n }\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n />\n {pieceSource && catalog && !catalog.error ? (\n <div className=\"mt-1.5 flex flex-wrap gap-1 px-0.5\">\n {chips.map((label) => (\n <Chip\n key={label}\n label={label}\n active={chip === label}\n onClick={() => setChip(chip === label ? null : label)}\n />\n ))}\n </div>\n ) : null}\n </>\n )}\n </div>\n {piece ? (\n <PieceEntries\n piece={piece}\n mode={mode}\n onPick={props.onPick}\n onBack={() => setPiece(null)}\n />\n ) : (\n <div className=\"max-h-80 overflow-y-auto py-1\">\n {filteredAttach.length > 0 ? (\n <>\n <SectionLabel>Attach existing step</SectionLabel>\n {filteredAttach.map((step) => (\n <Row\n key={step.id}\n logo={\n <BlockLogo blockType={step.blockType} size={ROW_LOGO} />\n }\n label={step.name}\n description={`{{steps.${step.key}}} · detached`}\n onClick={() => props.onAttach?.(step.id)}\n />\n ))}\n </>\n ) : null}\n {corePresets.length > 0 && labelPresets ? (\n <SectionLabel>Core</SectionLabel>\n ) : null}\n {corePresets.map(presetRow)}\n {powerhousePresets.length > 0 && labelPresets ? (\n <SectionLabel>Powerhouse</SectionLabel>\n ) : null}\n {powerhousePresets.map(presetRow)}\n {searchActive ? (\n <>\n <SectionLabel>\n {mode === \"triggers\" ? \"Triggers\" : \"Actions & triggers\"}\n </SectionLabel>\n {search.kind === \"loading\" ? (\n <div className=\"px-3 py-1 text-xs text-slate-400\">\n Searching…\n </div>\n ) : search.kind === \"error\" ? (\n <div className=\"px-3 py-1 text-xs text-red-500\">\n {search.message}\n </div>\n ) : (\n <>\n {hits.map((hit) => {\n const strategy = hit.strategy ?? \"POLLING\";\n const unsupported =\n hit.kind === \"trigger\" && !triggerStrategyRuns(strategy);\n return (\n <Row\n key={hit.blockType}\n logo={\n <LogoFrame\n src={hit.logoUrl}\n alt={hit.pieceDisplayName}\n size={ROW_LOGO}\n />\n }\n label={`${hit.displayName} · ${hit.pieceDisplayName}`}\n description={\n unsupported\n ? `${strategy.toLowerCase()} — not supported yet`\n : hit.description || hit.pieceDisplayName\n }\n disabled={unsupported}\n onClick={() =>\n props.onPick({\n label: hit.displayName,\n blockType: hit.blockType,\n description: hit.description,\n defaultConfig: {},\n })\n }\n />\n );\n })}\n {/* Status describes the published catalog only. Blocks this\n reactor ships are already listed above it. */}\n {search.result.status === \"indexing\" ? (\n <div className=\"px-3 py-1 text-xs text-slate-400\">\n Indexing the catalog… more results appear shortly.\n </div>\n ) : search.result.status === \"error\" ? (\n <div className=\"px-3 py-1 text-xs text-red-500\">\n {search.result.error ?? \"Search failed\"}\n </div>\n ) : hits.length === 0 ? (\n <div className=\"px-3 py-1 text-xs text-slate-400\">\n No matching {wantedKind}s\n </div>\n ) : null}\n </>\n )}\n </>\n ) : null}\n {showCatalog ? (\n <>\n <SectionLabel>Pieces</SectionLabel>\n {catalog === null ? (\n <div className=\"px-3 py-2 text-xs text-slate-400\">\n Loading catalog…\n </div>\n ) : catalog.error ? (\n <div className=\"px-3 py-2 text-xs text-red-500\">\n {catalog.error}\n </div>\n ) : (\n filteredPieces.map((entry) => (\n <Row\n key={entry.name}\n logo={\n <LogoFrame\n src={entry.logoUrl}\n alt={entry.displayName}\n size={ROW_LOGO}\n />\n }\n label={entry.displayName}\n description={\n mode === \"triggers\"\n ? `${entry.triggerCount} trigger${entry.triggerCount === 1 ? \"\" : \"s\"} · ${entry.description}`\n : `${entry.actionCount} action${entry.actionCount === 1 ? \"\" : \"s\"} · ${entry.description}`\n }\n onClick={() => setPiece(entry)}\n />\n ))\n )}\n </>\n ) : null}\n {corePresets.length + powerhousePresets.length === 0 &&\n filteredPieces.length === 0 &&\n filteredAttach.length === 0 &&\n !searchActive ? (\n <div className=\"px-3 py-2 text-xs text-slate-400\">No matches</div>\n ) : null}\n </div>\n )}\n </div>\n );\n}\n","// Right-click menu contents and placement; pure so the canvas only has to\n// map an action id onto the editor callbacks.\nimport type { PointModel, WorkflowModel } from \"./model.js\";\n\nexport type ContextMenuTarget =\n | { kind: \"step\"; id: string }\n | { kind: \"trigger\" }\n | { kind: \"edge\"; id: string }\n | { kind: \"pane\" };\n\nexport type ContextMenuActionId =\n | \"open\"\n | \"addBelow\"\n | \"duplicate\"\n | \"removeStep\"\n | \"changeTrigger\"\n | \"removeTrigger\"\n | \"insertStep\"\n | \"removeEdge\"\n | \"addStep\"\n | \"selectAll\"\n | \"fitView\";\n\nexport interface ContextMenuItem {\n id: ContextMenuActionId;\n label: string;\n disabled?: boolean;\n}\n\n// Branches route through true/false, so they have no \"next\" port to add to.\n// A port that already has an edge is fine: the engine fans out to every\n// successor on a taken port.\nfunction hasNextPort(model: WorkflowModel, id: string): boolean {\n if (model.trigger?.id === id) return true;\n const step = model.steps.find((entry) => entry.id === id);\n return step ? step.blockType !== \"core#branch\" : false;\n}\n\nexport function contextMenuItems(\n target: ContextMenuTarget,\n model: WorkflowModel,\n): ContextMenuItem[] {\n switch (target.kind) {\n case \"step\":\n return [\n { id: \"open\", label: \"Open settings\" },\n {\n id: \"addBelow\",\n label: \"Add step below\",\n disabled: !hasNextPort(model, target.id),\n },\n { id: \"duplicate\", label: \"Duplicate step\" },\n { id: \"removeStep\", label: \"Remove step\" },\n ];\n case \"trigger\":\n return [\n { id: \"open\", label: \"Open settings\" },\n {\n id: \"addBelow\",\n label: \"Add step below\",\n disabled: !model.trigger,\n },\n { id: \"changeTrigger\", label: \"Change trigger\" },\n { id: \"removeTrigger\", label: \"Remove trigger\" },\n ];\n case \"edge\":\n return [\n { id: \"insertStep\", label: \"Insert step here\" },\n { id: \"removeEdge\", label: \"Remove edge\" },\n ];\n case \"pane\":\n return [\n { id: \"addStep\", label: \"Add step here\" },\n {\n id: \"selectAll\",\n label: \"Select all steps\",\n disabled: model.steps.length === 0,\n },\n { id: \"fitView\", label: \"Fit view\" },\n ];\n }\n}\n\nexport const MENU_WIDTH = 176;\nconst MENU_ITEM_HEIGHT = 28;\nconst MENU_PADDING = 4;\nconst VIEWPORT_MARGIN = 8;\n\nexport function menuHeight(items: number): number {\n return items * MENU_ITEM_HEIGHT + MENU_PADDING * 2;\n}\n\nexport interface MenuSize {\n width: number;\n height: number;\n}\n\nfunction clampToViewport(\n at: number,\n extent: number,\n available: number,\n): number {\n return Math.max(\n VIEWPORT_MARGIN,\n Math.min(at, available - extent - VIEWPORT_MARGIN),\n );\n}\n\n// Anchors the menu at the pointer, flipping it back over the pointer near the\n// right/bottom edges and clamping so it always stays inside the viewport.\nexport function menuPosition(\n point: PointModel,\n size: MenuSize,\n viewport: MenuSize,\n): PointModel {\n const place = (at: number, extent: number, available: number): number =>\n clampToViewport(\n at + extent > available - VIEWPORT_MARGIN ? at - extent : at,\n extent,\n available,\n );\n return {\n x: place(point.x, size.width, viewport.width),\n y: place(point.y, size.height, viewport.height),\n };\n}\n\n// The box a side-panel popup hangs off: only the edges placement reads.\nexport interface MenuAnchor {\n left: number;\n right: number;\n top: number;\n}\n\nconst ANCHOR_GAP = 8;\n\n// Places a popup beside its anchor: right edge at the anchor's left edge,\n// flipped to the anchor's right side when the left has no room, top aligned\n// with the anchor, and clamped into the viewport on both axes.\nexport function anchorLeftPosition(\n anchor: MenuAnchor,\n size: MenuSize,\n viewport: MenuSize,\n): PointModel {\n const left = anchor.left - ANCHOR_GAP - size.width;\n return {\n x: clampToViewport(\n left >= VIEWPORT_MARGIN ? left : anchor.right + ANCHOR_GAP,\n size.width,\n viewport.width,\n ),\n y: clampToViewport(anchor.top, size.height, viewport.height),\n };\n}\n","// Splits authored text into literal and {{expression}} runs for highlighting.\n// Pattern copied from the workflow engine's expression parser (node-only pkg).\nconst EMBEDDED_EXPRESSION = /\\{\\{\\s*([^{}]+?)\\s*\\}\\}/g;\n\nexport type ExpressionToken =\n | { kind: \"text\"; text: string }\n | { kind: \"expression\"; text: string; expression: string };\n\nexport function splitExpressionTokens(value: string): ExpressionToken[] {\n const tokens: ExpressionToken[] = [];\n let last = 0;\n for (const match of value.matchAll(EMBEDDED_EXPRESSION)) {\n const index = match.index;\n if (index > last) {\n tokens.push({ kind: \"text\", text: value.slice(last, index) });\n }\n tokens.push({ kind: \"expression\", text: match[0], expression: match[1] });\n last = index + match[0].length;\n }\n if (last < value.length) {\n tokens.push({ kind: \"text\", text: value.slice(last) });\n }\n return tokens;\n}\n\nexport function hasExpressions(value: unknown): value is string {\n return (\n typeof value === \"string\" && new RegExp(EMBEDDED_EXPRESSION).test(value)\n );\n}\n\nexport interface ExpressionRef {\n // \"steps\" carries the step key; the others keep the remaining path.\n root: \"steps\" | \"trigger\" | \"variables\" | \"other\";\n stepKey?: string;\n // Path after the root (and step key), dotted; \"\" for the whole subtree.\n rest: string;\n // Only the first `||` term is described; fallbacks stay literal.\n hasFallback: boolean;\n}\n\n// Describes the leading term of an expression for a compact chip label.\nexport function describeExpression(expression: string): ExpressionRef {\n const terms = expression.split(\"||\");\n const path = terms[0].trim();\n const hasFallback = terms.length > 1;\n const segments = path.split(\".\");\n switch (segments[0]) {\n case \"steps\":\n return {\n root: \"steps\",\n stepKey: segments[1] ?? \"\",\n rest: segments.slice(2).join(\".\"),\n hasFallback,\n };\n case \"trigger\":\n return {\n root: \"trigger\",\n rest: segments.slice(1).join(\".\"),\n hasFallback,\n };\n case \"variables\":\n return {\n root: \"variables\",\n rest: segments.slice(1).join(\".\"),\n hasFallback,\n };\n default:\n return { root: \"other\", rest: path, hasFallback };\n }\n}\n","// Expression picker popup: opens beside the focused config field and inserts\n// {{path}} expressions from the run scope (trigger.payload / steps.* / variables.*).\nimport {\n createContext,\n useContext,\n useEffect,\n useId,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { blockMeta } from \"./block-meta.js\";\nimport { BlockLogo } from \"./BlockSelector.js\";\nimport { anchorLeftPosition, type MenuAnchor } from \"./canvas-menu.js\";\nimport { EMPTY_SCOPE, type ExpressionScope } from \"./expression-scope.js\";\nimport {\n describeExpression,\n splitExpressionTokens,\n} from \"./expression-tokens.js\";\n\nexport interface ExpressionScopeSource {\n // Scope for the field being edited; stepId limits steps to its ancestors.\n load: (context: { stepId?: string }) => Promise<ExpressionScope>;\n}\n\nlet scopeSource: ExpressionScopeSource | undefined;\nconst scopeListeners = new Set<() => void>();\n\nexport function registerExpressionScopeSource(next: ExpressionScopeSource) {\n scopeSource = next;\n for (const listener of scopeListeners) listener();\n}\n\n// The field the popup inserts into, plus the box it hangs off.\nexport interface ExpressionTarget {\n id: string;\n stepId?: string;\n label: string;\n anchor: MenuAnchor;\n insert: (expression: string) => void;\n}\n\ninterface TargetContextValue {\n target: ExpressionTarget | null;\n setTarget: (target: ExpressionTarget | null) => void;\n // Step key → block type, so chips can show the referenced step's logo.\n stepBlockTypes: Record<string, string>;\n // The trigger's block type, for the same reason on the trigger's own node.\n triggerBlockType?: string;\n}\n\nconst TargetContext = createContext<TargetContextValue | null>(null);\n\nexport function ExpressionTargetProvider(props: {\n stepBlockTypes: Record<string, string>;\n triggerBlockType?: string;\n children: ReactNode;\n}) {\n const [target, setTarget] = useState<ExpressionTarget | null>(null);\n const value = useMemo(\n () => ({\n target,\n setTarget,\n stepBlockTypes: props.stepBlockTypes,\n triggerBlockType: props.triggerBlockType,\n }),\n [target, props.stepBlockTypes, props.triggerBlockType],\n );\n return (\n <TargetContext.Provider value={value}>\n {props.children}\n </TargetContext.Provider>\n );\n}\n\nexport function useExpressionTarget(): TargetContextValue | null {\n return useContext(TargetContext);\n}\n\n// The \"{}\" button sits at the field's right edge, so the popup anchors on the\n// field row instead: its left edge clears the whole side panel.\nfunction fieldAnchor(element: Element | undefined): MenuAnchor {\n const row = element?.closest(\"label,div\") ?? element;\n const rect = row?.getBoundingClientRect();\n if (!rect) {\n return { left: window.innerWidth, right: window.innerWidth, top: 0 };\n }\n return { left: rect.left, right: rect.right, top: rect.top };\n}\n\n// Registers a config field as an insertion target; call focus() when the\n// user focuses it — the focus/click event supplies the popup's anchor.\n// `insert` is read through a ref so it never goes stale.\nexport function useExpressionField(options: {\n stepId?: string;\n label: string;\n insert: (expression: string) => void;\n}): {\n active: boolean;\n focus: (event?: { currentTarget: Element }) => void;\n} {\n const id = useId();\n const context = useExpressionTarget();\n const insertRef = useRef(options.insert);\n // eslint-disable-next-line react-hooks/refs -- latest-value ref, only read from the focus callback\n insertRef.current = options.insert;\n const { stepId, label } = options;\n return {\n active: context?.target?.id === id,\n focus: (event) => {\n context?.setTarget({\n id,\n stepId,\n label,\n anchor: fieldAnchor(event?.currentTarget),\n insert: (expression) => insertRef.current(expression),\n });\n },\n };\n}\n\nfunction preview(value: unknown): string {\n if (value === null) return \"null\";\n if (value === undefined) return \"\";\n if (Array.isArray(value)) return `[${value.length}]`;\n if (typeof value === \"object\") return \"{…}\";\n const text =\n typeof value === \"string\"\n ? value\n : ((JSON.stringify(value) as string | undefined) ?? \"\");\n return text.length > 28 ? `${text.slice(0, 28)}…` : text;\n}\n\nfunction isExpandable(value: unknown): boolean {\n return (\n value !== null && typeof value === \"object\" && Object.keys(value).length > 0\n );\n}\n\nfunction entriesOf(value: unknown): [string, unknown][] {\n if (Array.isArray(value)) return value.map((item, i) => [String(i), item]);\n if (value !== null && typeof value === \"object\") {\n return Object.entries(value as Record<string, unknown>);\n }\n return [];\n}\n\nfunction Caption(props: { text?: string }) {\n if (!props.text) return null;\n return (\n <span className=\"ml-auto shrink-0 pl-2 text-[10px] italic text-slate-400\">\n {props.text}\n </span>\n );\n}\n\nfunction ValueNode(props: {\n name: string;\n path: string;\n value: unknown;\n depth: number;\n captions: Record<string, string>;\n onPick: (path: string) => void;\n}) {\n const context = useExpressionTarget();\n const [open, setOpen] = useState(props.depth < 2);\n const expandable = isExpandable(props.value);\n // A step's own node reads as the block it runs; the key stays in the tooltip\n // alongside the expression it inserts.\n const stepKey = /^steps\\.([^.]+)$/.exec(props.path)?.[1];\n const nodeBlockType = stepKey\n ? context?.stepBlockTypes[stepKey]\n : props.path === \"trigger\"\n ? context?.triggerBlockType\n : undefined;\n return (\n <div>\n <div\n className=\"flex items-center gap-1 rounded px-1 py-0.5 hover:bg-slate-50\"\n style={{ paddingLeft: props.depth * 14 + 4 }}\n >\n {expandable ? (\n <button\n type=\"button\"\n className=\"w-3 shrink-0 text-[10px] text-slate-400\"\n onClick={() => setOpen((value) => !value)}\n >\n {open ? \"▾\" : \"▸\"}\n </button>\n ) : (\n <span className=\"w-3 shrink-0\" />\n )}\n <button\n type=\"button\"\n className=\"flex min-w-0 flex-1 items-baseline gap-2 text-left\"\n title={`{{${props.path}}}`}\n onClick={() => props.onPick(props.path)}\n >\n {nodeBlockType ? (\n <>\n <BlockLogo blockType={nodeBlockType} size={16} />\n <span className=\"shrink-0 text-xs font-medium text-slate-700\">\n {blockMeta(nodeBlockType).displayName}\n </span>\n </>\n ) : (\n <span className=\"shrink-0 font-mono text-xs text-slate-700\">\n {props.name}\n </span>\n )}\n <span className=\"truncate text-[11px] text-slate-400\">\n {preview(props.value)}\n </span>\n </button>\n <Caption text={props.captions[props.path]} />\n </div>\n {expandable && open\n ? entriesOf(props.value).map(([key, child]) => (\n <ValueNode\n key={key}\n name={key}\n path={`${props.path}.${key}`}\n value={child}\n depth={props.depth + 1}\n captions={props.captions}\n onPick={props.onPick}\n />\n ))\n : null}\n </div>\n );\n}\n\ninterface FlatEntry {\n path: string;\n value: unknown;\n}\n\nconst SEARCH_DEPTH = 6;\nconst SEARCH_LIMIT = 200;\n\nfunction flatten(\n value: unknown,\n path: string,\n depth: number,\n out: FlatEntry[],\n) {\n for (const [key, child] of entriesOf(value)) {\n const childPath = path ? `${path}.${key}` : key;\n out.push({ path: childPath, value: child });\n if (depth < SEARCH_DEPTH && isExpandable(child)) {\n flatten(child, childPath, depth + 1, out);\n }\n }\n}\n\nfunction SearchResults(props: {\n scope: ExpressionScope;\n query: string;\n onPick: (path: string) => void;\n}) {\n const matches = useMemo(() => {\n const all: FlatEntry[] = [];\n flatten(props.scope.value, \"\", 0, all);\n const lowered = props.query.toLowerCase();\n return all\n .filter((entry) => entry.path.toLowerCase().includes(lowered))\n .slice(0, SEARCH_LIMIT);\n }, [props.scope, props.query]);\n if (matches.length === 0) {\n return <div className=\"px-2 py-1 text-xs text-slate-400\">No matches</div>;\n }\n return (\n <>\n {matches.map((entry) => (\n <button\n key={entry.path}\n type=\"button\"\n className=\"flex w-full items-baseline gap-2 rounded px-2 py-0.5 text-left hover:bg-slate-50\"\n title={`{{${entry.path}}}`}\n onClick={() => props.onPick(entry.path)}\n >\n <span className=\"min-w-0 truncate font-mono text-[11px] text-slate-700\">\n {entry.path}\n </span>\n <span className=\"truncate text-[10px] text-slate-400\">\n {preview(entry.value)}\n </span>\n </button>\n ))}\n </>\n );\n}\n\nconst POPUP_SIZE = { width: 420, height: 520 };\n\n// Anchored beside the focused field; portalled to <body> so the side panel's\n// scroll container cannot clip it.\nexport function ExpressionPickerPopup() {\n const context = useExpressionTarget();\n const target = context?.target ?? null;\n const [query, setQuery] = useState(\"\");\n const [state, setState] = useState<\n | { kind: \"idle\" }\n | { kind: \"loading\" }\n | { kind: \"ready\"; scope: ExpressionScope }\n | { kind: \"error\"; message: string }\n >({ kind: \"idle\" });\n const [sourceVersion, setSourceVersion] = useState(0);\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const listener = () => setSourceVersion((value) => value + 1);\n scopeListeners.add(listener);\n return () => {\n scopeListeners.delete(listener);\n };\n }, []);\n\n const stepId = target?.stepId;\n const hasTarget = target !== null;\n useEffect(() => {\n if (!hasTarget || !scopeSource) return;\n let alive = true;\n // eslint-disable-next-line react-hooks/set-state-in-effect -- marks the load that starts on this very line\n setState({ kind: \"loading\" });\n scopeSource.load({ stepId }).then(\n (scope) => {\n if (alive) setState({ kind: \"ready\", scope });\n },\n (error: unknown) => {\n if (alive) {\n setState({\n kind: \"error\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n },\n );\n return () => {\n alive = false;\n };\n }, [hasTarget, stepId, sourceVersion]);\n\n // A fresh field starts from an unfiltered tree.\n const targetId = target?.id;\n // eslint-disable-next-line react-hooks/set-state-in-effect -- a fresh field starts from an unfiltered tree\n useEffect(() => setQuery(\"\"), [targetId]);\n\n const close = context?.setTarget;\n useEffect(() => {\n if (!hasTarget || !close) return;\n const dismiss = () => close(null);\n const outside = (event: Event) =>\n !containerRef.current?.contains(event.target as globalThis.Node);\n const onMouseDown = (event: MouseEvent) => {\n if (outside(event)) dismiss();\n };\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") dismiss();\n };\n // Scrolling the popup's own tree must not dismiss it.\n const onScroll = (event: Event) => {\n if (outside(event)) dismiss();\n };\n window.addEventListener(\"mousedown\", onMouseDown);\n window.addEventListener(\"keydown\", onKeyDown);\n window.addEventListener(\"scroll\", onScroll, true);\n return () => {\n window.removeEventListener(\"mousedown\", onMouseDown);\n window.removeEventListener(\"keydown\", onKeyDown);\n window.removeEventListener(\"scroll\", onScroll, true);\n };\n }, [hasTarget, close]);\n\n if (!context || !scopeSource || !target) return null;\n\n const pick = (path: string) => {\n target.insert(`{{${path}}}`);\n context.setTarget(null);\n };\n const scope = state.kind === \"ready\" ? state.scope : EMPTY_SCOPE;\n const empty = entriesOf(scope.value).length === 0;\n const position = anchorLeftPosition(target.anchor, POPUP_SIZE, {\n width: window.innerWidth,\n height: window.innerHeight,\n });\n\n return createPortal(\n <div\n ref={containerRef}\n className=\"workflow-expression-popup fixed flex flex-col rounded-md border border-solid border-slate-200 bg-white shadow-lg\"\n style={{\n left: position.x,\n top: position.y,\n width: POPUP_SIZE.width,\n maxHeight: POPUP_SIZE.height,\n }}\n >\n <div className=\"flex items-center gap-2 px-3 py-1.5\">\n <span className=\"font-mono text-[11px] text-slate-500\">{\"{}\"}</span>\n <span className=\"min-w-0 truncate text-xs text-slate-500\">\n Insert into{\" \"}\n <span className=\"font-semibold text-slate-700\">{target.label}</span>\n </span>\n <button\n type=\"button\"\n className=\"ml-auto text-[11px] text-slate-400 hover:text-slate-600\"\n title=\"Close\"\n onClick={() => context.setTarget(null)}\n >\n ✕\n </button>\n </div>\n <div className=\"px-3 pb-1.5\">\n <input\n className=\"w-full rounded border border-slate-200 px-2 py-1.5 text-sm\"\n placeholder=\"Search paths…\"\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n />\n </div>\n <div className=\"min-h-0 flex-1 overflow-y-auto px-1 pb-1\">\n {state.kind === \"error\" ? (\n <div className=\"px-2 py-1 text-xs text-red-500\">{state.message}</div>\n ) : state.kind === \"loading\" ? (\n <div className=\"px-2 py-1 text-xs text-slate-400\">Loading…</div>\n ) : empty ? (\n <div className=\"px-2 py-1 text-xs text-slate-400\">\n No values available for this field yet.\n </div>\n ) : query.trim() ? (\n <SearchResults scope={scope} query={query.trim()} onPick={pick} />\n ) : (\n entriesOf(scope.value).map(([key, value]) => (\n <ValueNode\n key={key}\n name={key}\n path={key}\n value={value}\n depth={0}\n captions={scope.captions}\n onPick={pick}\n />\n ))\n )}\n </div>\n </div>,\n document.body,\n );\n}\n\n// Per-field \"{}\" affordance: focuses the docked panel on this field.\nexport function ExpressionPickerButton(props: {\n active: boolean;\n onFocusField: (event: { currentTarget: Element }) => void;\n}) {\n if (!scopeSource) return null;\n return (\n <button\n type=\"button\"\n title=\"Insert value from trigger or previous steps\"\n className={`shrink-0 rounded border px-1.5 py-1 font-mono text-[11px] ${\n props.active\n ? \"border-blue-500 text-blue-600\"\n : \"border-slate-300 text-slate-500 hover:border-slate-400\"\n }`}\n onClick={props.onFocusField}\n >\n {\"{}\"}\n </button>\n );\n}\n\nfunction Chip(props: {\n expression: string;\n stepBlockTypes: Record<string, string>;\n}) {\n const ref = describeExpression(props.expression);\n const blockType = ref.stepKey ? props.stepBlockTypes[ref.stepKey] : undefined;\n const head =\n ref.root === \"steps\"\n ? ref.stepKey\n : ref.root === \"trigger\"\n ? \"trigger\"\n : ref.root === \"variables\"\n ? \"var\"\n : \"\";\n return (\n <span\n className=\"inline-flex max-w-full items-center gap-1 rounded border border-solid border-blue-200 bg-blue-50 px-1 py-px font-mono text-[10px] text-blue-700\"\n title={`{{${props.expression}}}`}\n >\n {blockType ? <BlockLogo blockType={blockType} size={12} /> : null}\n {head ? <span className=\"font-semibold\">{head}</span> : null}\n <span className=\"truncate\">\n {ref.root === \"other\" ? ref.rest : ref.rest || \"*\"}\n </span>\n {ref.hasFallback ? <span className=\"text-blue-400\">||…</span> : null}\n </span>\n );\n}\n\n// Read-only line under a text field: literal runs plus a chip per {{token}}.\nexport function ExpressionTokenLine(props: { value: string }) {\n const context = useExpressionTarget();\n const tokens = splitExpressionTokens(props.value);\n if (!tokens.some((token) => token.kind === \"expression\")) return null;\n return (\n <div className=\"mt-1 flex flex-wrap items-center gap-1 text-[11px] text-slate-500\">\n {tokens.map((token, index) =>\n token.kind === \"text\" ? (\n <span key={index} className=\"max-w-40 truncate whitespace-pre\">\n {token.text}\n </span>\n ) : (\n <Chip\n key={index}\n expression={token.expression}\n stepBlockTypes={context?.stepBlockTypes ?? {}}\n />\n ),\n )}\n </div>\n );\n}\n","// When the connection picker offers to create a connection, and what the new\n// powerhouse/connection document gets prefilled with.\nimport { connectorIdForPiece } from \"../../connection-editor/piece-auth.js\";\n\nexport const CONNECTION_TYPE = \"powerhouse/connection\";\n\n// \"@scope/pkg@1.2.3#name\" -> \"@scope/pkg\" (works for connectorIds too).\nexport function packageOf(id: string): string {\n const head = id.split(\"#\")[0];\n const at = head.lastIndexOf(\"@\");\n return at > 0 ? head.slice(0, at) : head;\n}\n\n// A connection is usable by a block when it configures the block's own piece.\n// Everything else is noise: picking it would just fail at run time.\nexport function compatibleConnections<T extends { connectorId: string }>(\n connections: T[],\n blockType: string,\n): T[] {\n const piecePackage = packageOf(blockType);\n return connections.filter(\n (connection) => packageOf(connection.connectorId) === piecePackage,\n );\n}\n\n// The picker lists only compatible connections, so pasting a document id stays\n// the escape hatch for anything it does not offer.\nexport function looksLikeDocumentId(value: string): boolean {\n const trimmed = value.trim();\n return trimmed.length >= 8 && !/\\s/.test(trimmed);\n}\n\nexport interface ConnectionDraft {\n piecePackage: string;\n connectorId: string;\n name: string;\n}\n\n// \"@activepieces/piece-google-sheets\" -> \"Google Sheets connection\"\nexport function connectionNameFor(piecePackage: string): string {\n const short =\n piecePackage\n .split(\"/\")\n .pop()\n ?.replace(/^piece-/, \"\") ?? piecePackage;\n const words = short\n .split(/[-_]/)\n .filter(Boolean)\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1));\n return `${words.join(\" \") || piecePackage} connection`;\n}\n\n// Only piece blocks that take a connection and have none for their own package\n// yet: everything else already has a better answer in the list.\nexport function connectionDraftFor(input: {\n blockType: string;\n authMode: \"loading\" | \"none\" | \"optional\" | \"required\";\n matchingCount: number;\n}): ConnectionDraft | null {\n if (input.authMode === \"none\" || input.authMode === \"loading\") return null;\n if (input.matchingCount > 0) return null;\n if (!input.blockType.includes(\"#\")) return null;\n const piecePackage = packageOf(input.blockType);\n if (!piecePackage || piecePackage === \"core\") return null;\n return {\n piecePackage,\n connectorId: connectorIdForPiece(piecePackage),\n name: connectionNameFor(piecePackage),\n };\n}\n","/**\n * Concatenates two arrays faster than the array spread operator.\n */\nconst concatArrays = (array1, array2) => {\n // Pre-allocate for better V8 optimization\n const combinedArray = new Array(array1.length + array2.length);\n for (let i = 0; i < array1.length; i++) {\n combinedArray[i] = array1[i];\n }\n for (let i = 0; i < array2.length; i++) {\n combinedArray[array1.length + i] = array2[i];\n }\n return combinedArray;\n};\n\n// Factory function ensures consistent object shapes\nconst createClassValidatorObject = (classGroupId, validator) => ({\n classGroupId,\n validator\n});\n// Factory ensures consistent ClassPartObject shape\nconst createClassPartObject = (nextPart = new Map(), validators = null, classGroupId) => ({\n nextPart,\n validators,\n classGroupId\n});\nconst CLASS_PART_SEPARATOR = '-';\nconst EMPTY_CONFLICTS = [];\n// I use two dots here because one dot is used as prefix for class groups in plugins\nconst ARBITRARY_PROPERTY_PREFIX = 'arbitrary..';\nconst createClassGroupUtils = config => {\n const classMap = createClassMap(config);\n const {\n conflictingClassGroups,\n conflictingClassGroupModifiers\n } = config;\n const getClassGroupId = className => {\n if (className.startsWith('[') && className.endsWith(']')) {\n return getGroupIdForArbitraryProperty(className);\n }\n const classParts = className.split(CLASS_PART_SEPARATOR);\n // Classes like `-inset-1` produce an empty string as first classPart. We assume that classes for negative values are used correctly and skip it.\n const startIndex = classParts[0] === '' && classParts.length > 1 ? 1 : 0;\n return getGroupRecursive(classParts, startIndex, classMap);\n };\n const getConflictingClassGroupIds = (classGroupId, hasPostfixModifier) => {\n if (hasPostfixModifier) {\n const modifierConflicts = conflictingClassGroupModifiers[classGroupId];\n const baseConflicts = conflictingClassGroups[classGroupId];\n if (modifierConflicts) {\n if (baseConflicts) {\n // Merge base conflicts with modifier conflicts\n return concatArrays(baseConflicts, modifierConflicts);\n }\n // Only modifier conflicts\n return modifierConflicts;\n }\n // Fall back to without postfix if no modifier conflicts\n return baseConflicts || EMPTY_CONFLICTS;\n }\n return conflictingClassGroups[classGroupId] || EMPTY_CONFLICTS;\n };\n return {\n getClassGroupId,\n getConflictingClassGroupIds\n };\n};\nconst getGroupRecursive = (classParts, startIndex, classPartObject) => {\n const classPathsLength = classParts.length - startIndex;\n if (classPathsLength === 0) {\n return classPartObject.classGroupId;\n }\n const currentClassPart = classParts[startIndex];\n const nextClassPartObject = classPartObject.nextPart.get(currentClassPart);\n if (nextClassPartObject) {\n const result = getGroupRecursive(classParts, startIndex + 1, nextClassPartObject);\n if (result) return result;\n }\n const validators = classPartObject.validators;\n if (validators === null) {\n return undefined;\n }\n // Build classRest string efficiently by joining from startIndex onwards\n const classRest = startIndex === 0 ? classParts.join(CLASS_PART_SEPARATOR) : classParts.slice(startIndex).join(CLASS_PART_SEPARATOR);\n const validatorsLength = validators.length;\n for (let i = 0; i < validatorsLength; i++) {\n const validatorObj = validators[i];\n if (validatorObj.validator(classRest)) {\n return validatorObj.classGroupId;\n }\n }\n return undefined;\n};\n/**\n * Get the class group ID for an arbitrary property.\n *\n * @param className - The class name to get the group ID for. Is expected to be string starting with `[` and ending with `]`.\n */\nconst getGroupIdForArbitraryProperty = className => className.slice(1, -1).indexOf(':') === -1 ? undefined : (() => {\n const content = className.slice(1, -1);\n const colonIndex = content.indexOf(':');\n const property = content.slice(0, colonIndex);\n return property ? ARBITRARY_PROPERTY_PREFIX + property : undefined;\n})();\n/**\n * Exported for testing only\n */\nconst createClassMap = config => {\n const {\n theme,\n classGroups\n } = config;\n return processClassGroups(classGroups, theme);\n};\n// Split into separate functions to maintain monomorphic call sites\nconst processClassGroups = (classGroups, theme) => {\n const classMap = createClassPartObject();\n for (const classGroupId in classGroups) {\n const group = classGroups[classGroupId];\n processClassesRecursively(group, classMap, classGroupId, theme);\n }\n return classMap;\n};\nconst processClassesRecursively = (classGroup, classPartObject, classGroupId, theme) => {\n const len = classGroup.length;\n for (let i = 0; i < len; i++) {\n const classDefinition = classGroup[i];\n processClassDefinition(classDefinition, classPartObject, classGroupId, theme);\n }\n};\n// Split into separate functions for each type to maintain monomorphic call sites\nconst processClassDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (typeof classDefinition === 'string') {\n processStringDefinition(classDefinition, classPartObject, classGroupId);\n return;\n }\n if (typeof classDefinition === 'function') {\n processFunctionDefinition(classDefinition, classPartObject, classGroupId, theme);\n return;\n }\n processObjectDefinition(classDefinition, classPartObject, classGroupId, theme);\n};\nconst processStringDefinition = (classDefinition, classPartObject, classGroupId) => {\n const classPartObjectToEdit = classDefinition === '' ? classPartObject : getPart(classPartObject, classDefinition);\n classPartObjectToEdit.classGroupId = classGroupId;\n};\nconst processFunctionDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n if (isThemeGetter(classDefinition)) {\n processClassesRecursively(classDefinition(theme), classPartObject, classGroupId, theme);\n return;\n }\n if (classPartObject.validators === null) {\n classPartObject.validators = [];\n }\n classPartObject.validators.push(createClassValidatorObject(classGroupId, classDefinition));\n};\nconst processObjectDefinition = (classDefinition, classPartObject, classGroupId, theme) => {\n const entries = Object.entries(classDefinition);\n const len = entries.length;\n for (let i = 0; i < len; i++) {\n const [key, value] = entries[i];\n processClassesRecursively(value, getPart(classPartObject, key), classGroupId, theme);\n }\n};\nconst getPart = (classPartObject, path) => {\n let current = classPartObject;\n const parts = path.split(CLASS_PART_SEPARATOR);\n const len = parts.length;\n for (let i = 0; i < len; i++) {\n const part = parts[i];\n let next = current.nextPart.get(part);\n if (!next) {\n next = createClassPartObject();\n current.nextPart.set(part, next);\n }\n current = next;\n }\n return current;\n};\n// Type guard maintains monomorphic check\nconst isThemeGetter = func => 'isThemeGetter' in func && func.isThemeGetter === true;\n\n// LRU cache implementation using plain objects for simplicity\nconst createLruCache = maxCacheSize => {\n if (maxCacheSize < 1) {\n return {\n get: () => undefined,\n set: () => {}\n };\n }\n let cacheSize = 0;\n let cache = Object.create(null);\n let previousCache = Object.create(null);\n const update = (key, value) => {\n cache[key] = value;\n cacheSize++;\n if (cacheSize > maxCacheSize) {\n cacheSize = 0;\n previousCache = cache;\n cache = Object.create(null);\n }\n };\n return {\n get(key) {\n let value = cache[key];\n if (value !== undefined) {\n return value;\n }\n if ((value = previousCache[key]) !== undefined) {\n update(key, value);\n return value;\n }\n },\n set(key, value) {\n if (key in cache) {\n cache[key] = value;\n } else {\n update(key, value);\n }\n }\n };\n};\nconst IMPORTANT_MODIFIER = '!';\nconst MODIFIER_SEPARATOR = ':';\nconst EMPTY_MODIFIERS = [];\n// Pre-allocated result object shape for consistency\nconst createResultObject = (modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition, isExternal) => ({\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition,\n isExternal\n});\nconst createParseClassName = config => {\n const {\n prefix,\n experimentalParseClassName\n } = config;\n /**\n * Parse class name into parts.\n *\n * Inspired by `splitAtTopLevelOnly` used in Tailwind CSS\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v3.2.2/src/util/splitAtTopLevelOnly.js\n */\n let parseClassName = className => {\n // Use simple array with push for better performance\n const modifiers = [];\n let bracketDepth = 0;\n let parenDepth = 0;\n let modifierStart = 0;\n let postfixModifierPosition;\n const len = className.length;\n for (let index = 0; index < len; index++) {\n const currentCharacter = className[index];\n if (bracketDepth === 0 && parenDepth === 0) {\n if (currentCharacter === MODIFIER_SEPARATOR) {\n modifiers.push(className.slice(modifierStart, index));\n modifierStart = index + 1;\n continue;\n }\n if (currentCharacter === '/') {\n postfixModifierPosition = index;\n continue;\n }\n }\n if (currentCharacter === '[') bracketDepth++;else if (currentCharacter === ']') bracketDepth--;else if (currentCharacter === '(') parenDepth++;else if (currentCharacter === ')') parenDepth--;\n }\n const baseClassNameWithImportantModifier = modifiers.length === 0 ? className : className.slice(modifierStart);\n // Inline important modifier check\n let baseClassName = baseClassNameWithImportantModifier;\n let hasImportantModifier = false;\n if (baseClassNameWithImportantModifier.endsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(0, -1);\n hasImportantModifier = true;\n } else if (\n /**\n * In Tailwind CSS v3 the important modifier was at the start of the base class name. This is still supported for legacy reasons.\n * @see https://github.com/dcastil/tailwind-merge/issues/513#issuecomment-2614029864\n */\n baseClassNameWithImportantModifier.startsWith(IMPORTANT_MODIFIER)) {\n baseClassName = baseClassNameWithImportantModifier.slice(1);\n hasImportantModifier = true;\n }\n const maybePostfixModifierPosition = postfixModifierPosition && postfixModifierPosition > modifierStart ? postfixModifierPosition - modifierStart : undefined;\n return createResultObject(modifiers, hasImportantModifier, baseClassName, maybePostfixModifierPosition);\n };\n if (prefix) {\n const fullPrefix = prefix + MODIFIER_SEPARATOR;\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => className.startsWith(fullPrefix) ? parseClassNameOriginal(className.slice(fullPrefix.length)) : createResultObject(EMPTY_MODIFIERS, false, className, undefined, true);\n }\n if (experimentalParseClassName) {\n const parseClassNameOriginal = parseClassName;\n parseClassName = className => experimentalParseClassName({\n className,\n parseClassName: parseClassNameOriginal\n });\n }\n return parseClassName;\n};\n\n/**\n * Sorts modifiers according to following schema:\n * - Predefined modifiers are sorted alphabetically\n * - When an arbitrary variant appears, it must be preserved which modifiers are before and after it\n */\nconst createSortModifiers = config => {\n // Pre-compute weights for all known modifiers for O(1) comparison\n const modifierWeights = new Map();\n // Assign weights to sensitive modifiers (highest priority, but preserve order)\n config.orderSensitiveModifiers.forEach((mod, index) => {\n modifierWeights.set(mod, 1000000 + index); // High weights for sensitive mods\n });\n return modifiers => {\n const result = [];\n let currentSegment = [];\n // Process modifiers in one pass\n for (let i = 0; i < modifiers.length; i++) {\n const modifier = modifiers[i];\n // Check if modifier is sensitive (starts with '[' or in orderSensitiveModifiers)\n const isArbitrary = modifier[0] === '[';\n const isOrderSensitive = modifierWeights.has(modifier);\n if (isArbitrary || isOrderSensitive) {\n // Sort and flush current segment alphabetically\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n currentSegment = [];\n }\n result.push(modifier);\n } else {\n // Regular modifier - add to current segment for batch sorting\n currentSegment.push(modifier);\n }\n }\n // Sort and add any remaining segment items\n if (currentSegment.length > 0) {\n currentSegment.sort();\n result.push(...currentSegment);\n }\n return result;\n };\n};\nconst createConfigUtils = config => ({\n cache: createLruCache(config.cacheSize),\n parseClassName: createParseClassName(config),\n sortModifiers: createSortModifiers(config),\n ...createClassGroupUtils(config)\n});\nconst SPLIT_CLASSES_REGEX = /\\s+/;\nconst mergeClassList = (classList, configUtils) => {\n const {\n parseClassName,\n getClassGroupId,\n getConflictingClassGroupIds,\n sortModifiers\n } = configUtils;\n /**\n * Set of classGroupIds in following format:\n * `{importantModifier}{variantModifiers}{classGroupId}`\n * @example 'float'\n * @example 'hover:focus:bg-color'\n * @example 'md:!pr'\n */\n const classGroupsInConflict = [];\n const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);\n let result = '';\n for (let index = classNames.length - 1; index >= 0; index -= 1) {\n const originalClassName = classNames[index];\n const {\n isExternal,\n modifiers,\n hasImportantModifier,\n baseClassName,\n maybePostfixModifierPosition\n } = parseClassName(originalClassName);\n if (isExternal) {\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n let hasPostfixModifier = !!maybePostfixModifierPosition;\n let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);\n if (!classGroupId) {\n if (!hasPostfixModifier) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n classGroupId = getClassGroupId(baseClassName);\n if (!classGroupId) {\n // Not a Tailwind class\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n continue;\n }\n hasPostfixModifier = false;\n }\n // Fast path: skip sorting for empty or single modifier\n const variantModifier = modifiers.length === 0 ? '' : modifiers.length === 1 ? modifiers[0] : sortModifiers(modifiers).join(':');\n const modifierId = hasImportantModifier ? variantModifier + IMPORTANT_MODIFIER : variantModifier;\n const classId = modifierId + classGroupId;\n if (classGroupsInConflict.indexOf(classId) > -1) {\n // Tailwind class omitted due to conflict\n continue;\n }\n classGroupsInConflict.push(classId);\n const conflictGroups = getConflictingClassGroupIds(classGroupId, hasPostfixModifier);\n for (let i = 0; i < conflictGroups.length; ++i) {\n const group = conflictGroups[i];\n classGroupsInConflict.push(modifierId + group);\n }\n // Tailwind class not in conflict\n result = originalClassName + (result.length > 0 ? ' ' + result : result);\n }\n return result;\n};\n\n/**\n * The code in this file is copied from https://github.com/lukeed/clsx and modified to suit the needs of tailwind-merge better.\n *\n * Specifically:\n * - Runtime code from https://github.com/lukeed/clsx/blob/v1.2.1/src/index.js\n * - TypeScript types from https://github.com/lukeed/clsx/blob/v1.2.1/clsx.d.ts\n *\n * Original code has MIT license: Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)\n */\nconst twJoin = (...classLists) => {\n let index = 0;\n let argument;\n let resolvedValue;\n let string = '';\n while (index < classLists.length) {\n if (argument = classLists[index++]) {\n if (resolvedValue = toValue(argument)) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nconst toValue = mix => {\n // Fast path for strings\n if (typeof mix === 'string') {\n return mix;\n }\n let resolvedValue;\n let string = '';\n for (let k = 0; k < mix.length; k++) {\n if (mix[k]) {\n if (resolvedValue = toValue(mix[k])) {\n string && (string += ' ');\n string += resolvedValue;\n }\n }\n }\n return string;\n};\nconst createTailwindMerge = (createConfigFirst, ...createConfigRest) => {\n let configUtils;\n let cacheGet;\n let cacheSet;\n let functionToCall;\n const initTailwindMerge = classList => {\n const config = createConfigRest.reduce((previousConfig, createConfigCurrent) => createConfigCurrent(previousConfig), createConfigFirst());\n configUtils = createConfigUtils(config);\n cacheGet = configUtils.cache.get;\n cacheSet = configUtils.cache.set;\n functionToCall = tailwindMerge;\n return tailwindMerge(classList);\n };\n const tailwindMerge = classList => {\n const cachedResult = cacheGet(classList);\n if (cachedResult) {\n return cachedResult;\n }\n const result = mergeClassList(classList, configUtils);\n cacheSet(classList, result);\n return result;\n };\n functionToCall = initTailwindMerge;\n return (...args) => functionToCall(twJoin(...args));\n};\nconst fallbackThemeArr = [];\nconst fromTheme = key => {\n const themeGetter = theme => theme[key] || fallbackThemeArr;\n themeGetter.isThemeGetter = true;\n return themeGetter;\n};\nconst arbitraryValueRegex = /^\\[(?:(\\w[\\w-]*):)?(.+)\\]$/i;\nconst arbitraryVariableRegex = /^\\((?:(\\w[\\w-]*):)?(.+)\\)$/i;\nconst fractionRegex = /^\\d+\\/\\d+$/;\nconst tshirtUnitRegex = /^(\\d+(\\.\\d+)?)?(xs|sm|md|lg|xl)$/;\nconst lengthUnitRegex = /\\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\\b(calc|min|max|clamp)\\(.+\\)|^0$/;\nconst colorFunctionRegex = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\\(.+\\)$/;\n// Shadow always begins with x and y offset separated by underscore optionally prepended by inset\nconst shadowRegex = /^(inset_)?-?((\\d+)?\\.?(\\d+)[a-z]+|0)_-?((\\d+)?\\.?(\\d+)[a-z]+|0)/;\nconst imageRegex = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\\(.+\\)$/;\nconst isFraction = value => fractionRegex.test(value);\nconst isNumber = value => !!value && !Number.isNaN(Number(value));\nconst isInteger = value => !!value && Number.isInteger(Number(value));\nconst isPercent = value => value.endsWith('%') && isNumber(value.slice(0, -1));\nconst isTshirtSize = value => tshirtUnitRegex.test(value);\nconst isAny = () => true;\nconst isLengthOnly = value =>\n// `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.\n// For example, `hsl(0 0% 0%)` would be classified as a length without this check.\n// I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.\nlengthUnitRegex.test(value) && !colorFunctionRegex.test(value);\nconst isNever = () => false;\nconst isShadow = value => shadowRegex.test(value);\nconst isImage = value => imageRegex.test(value);\nconst isAnyNonArbitrary = value => !isArbitraryValue(value) && !isArbitraryVariable(value);\nconst isArbitrarySize = value => getIsArbitraryValue(value, isLabelSize, isNever);\nconst isArbitraryValue = value => arbitraryValueRegex.test(value);\nconst isArbitraryLength = value => getIsArbitraryValue(value, isLabelLength, isLengthOnly);\nconst isArbitraryNumber = value => getIsArbitraryValue(value, isLabelNumber, isNumber);\nconst isArbitraryPosition = value => getIsArbitraryValue(value, isLabelPosition, isNever);\nconst isArbitraryImage = value => getIsArbitraryValue(value, isLabelImage, isImage);\nconst isArbitraryShadow = value => getIsArbitraryValue(value, isLabelShadow, isShadow);\nconst isArbitraryVariable = value => arbitraryVariableRegex.test(value);\nconst isArbitraryVariableLength = value => getIsArbitraryVariable(value, isLabelLength);\nconst isArbitraryVariableFamilyName = value => getIsArbitraryVariable(value, isLabelFamilyName);\nconst isArbitraryVariablePosition = value => getIsArbitraryVariable(value, isLabelPosition);\nconst isArbitraryVariableSize = value => getIsArbitraryVariable(value, isLabelSize);\nconst isArbitraryVariableImage = value => getIsArbitraryVariable(value, isLabelImage);\nconst isArbitraryVariableShadow = value => getIsArbitraryVariable(value, isLabelShadow, true);\n// Helpers\nconst getIsArbitraryValue = (value, testLabel, testValue) => {\n const result = arbitraryValueRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return testValue(result[2]);\n }\n return false;\n};\nconst getIsArbitraryVariable = (value, testLabel, shouldMatchNoLabel = false) => {\n const result = arbitraryVariableRegex.exec(value);\n if (result) {\n if (result[1]) {\n return testLabel(result[1]);\n }\n return shouldMatchNoLabel;\n }\n return false;\n};\n// Labels\nconst isLabelPosition = label => label === 'position' || label === 'percentage';\nconst isLabelImage = label => label === 'image' || label === 'url';\nconst isLabelSize = label => label === 'length' || label === 'size' || label === 'bg-size';\nconst isLabelLength = label => label === 'length';\nconst isLabelNumber = label => label === 'number';\nconst isLabelFamilyName = label => label === 'family-name';\nconst isLabelShadow = label => label === 'shadow';\nconst validators = /*#__PURE__*/Object.defineProperty({\n __proto__: null,\n isAny,\n isAnyNonArbitrary,\n isArbitraryImage,\n isArbitraryLength,\n isArbitraryNumber,\n isArbitraryPosition,\n isArbitraryShadow,\n isArbitrarySize,\n isArbitraryValue,\n isArbitraryVariable,\n isArbitraryVariableFamilyName,\n isArbitraryVariableImage,\n isArbitraryVariableLength,\n isArbitraryVariablePosition,\n isArbitraryVariableShadow,\n isArbitraryVariableSize,\n isFraction,\n isInteger,\n isNumber,\n isPercent,\n isTshirtSize\n}, Symbol.toStringTag, {\n value: 'Module'\n});\nconst getDefaultConfig = () => {\n /**\n * Theme getters for theme variable namespaces\n * @see https://tailwindcss.com/docs/theme#theme-variable-namespaces\n */\n /***/\n const themeColor = fromTheme('color');\n const themeFont = fromTheme('font');\n const themeText = fromTheme('text');\n const themeFontWeight = fromTheme('font-weight');\n const themeTracking = fromTheme('tracking');\n const themeLeading = fromTheme('leading');\n const themeBreakpoint = fromTheme('breakpoint');\n const themeContainer = fromTheme('container');\n const themeSpacing = fromTheme('spacing');\n const themeRadius = fromTheme('radius');\n const themeShadow = fromTheme('shadow');\n const themeInsetShadow = fromTheme('inset-shadow');\n const themeTextShadow = fromTheme('text-shadow');\n const themeDropShadow = fromTheme('drop-shadow');\n const themeBlur = fromTheme('blur');\n const themePerspective = fromTheme('perspective');\n const themeAspect = fromTheme('aspect');\n const themeEase = fromTheme('ease');\n const themeAnimate = fromTheme('animate');\n /**\n * Helpers to avoid repeating the same scales\n *\n * We use functions that create a new array every time they're called instead of static arrays.\n * This ensures that users who modify any scale by mutating the array (e.g. with `array.push(element)`) don't accidentally mutate arrays in other parts of the config.\n */\n /***/\n const scaleBreak = () => ['auto', 'avoid', 'all', 'avoid-page', 'page', 'left', 'right', 'column'];\n const scalePosition = () => ['center', 'top', 'bottom', 'left', 'right', 'top-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-top', 'top-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-top', 'bottom-right',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'right-bottom', 'bottom-left',\n // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378\n 'left-bottom'];\n const scalePositionWithArbitrary = () => [...scalePosition(), isArbitraryVariable, isArbitraryValue];\n const scaleOverflow = () => ['auto', 'hidden', 'clip', 'visible', 'scroll'];\n const scaleOverscroll = () => ['auto', 'contain', 'none'];\n const scaleUnambiguousSpacing = () => [isArbitraryVariable, isArbitraryValue, themeSpacing];\n const scaleInset = () => [isFraction, 'full', 'auto', ...scaleUnambiguousSpacing()];\n const scaleGridTemplateColsRows = () => [isInteger, 'none', 'subgrid', isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartAndEnd = () => ['auto', {\n span: ['full', isInteger, isArbitraryVariable, isArbitraryValue]\n }, isInteger, isArbitraryVariable, isArbitraryValue];\n const scaleGridColRowStartOrEnd = () => [isInteger, 'auto', isArbitraryVariable, isArbitraryValue];\n const scaleGridAutoColsRows = () => ['auto', 'min', 'max', 'fr', isArbitraryVariable, isArbitraryValue];\n const scaleAlignPrimaryAxis = () => ['start', 'end', 'center', 'between', 'around', 'evenly', 'stretch', 'baseline', 'center-safe', 'end-safe'];\n const scaleAlignSecondaryAxis = () => ['start', 'end', 'center', 'stretch', 'center-safe', 'end-safe'];\n const scaleMargin = () => ['auto', ...scaleUnambiguousSpacing()];\n const scaleSizing = () => [isFraction, 'auto', 'full', 'dvw', 'dvh', 'lvw', 'lvh', 'svw', 'svh', 'min', 'max', 'fit', ...scaleUnambiguousSpacing()];\n const scaleColor = () => [themeColor, isArbitraryVariable, isArbitraryValue];\n const scaleBgPosition = () => [...scalePosition(), isArbitraryVariablePosition, isArbitraryPosition, {\n position: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleBgRepeat = () => ['no-repeat', {\n repeat: ['', 'x', 'y', 'space', 'round']\n }];\n const scaleBgSize = () => ['auto', 'cover', 'contain', isArbitraryVariableSize, isArbitrarySize, {\n size: [isArbitraryVariable, isArbitraryValue]\n }];\n const scaleGradientStopPosition = () => [isPercent, isArbitraryVariableLength, isArbitraryLength];\n const scaleRadius = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', 'full', themeRadius, isArbitraryVariable, isArbitraryValue];\n const scaleBorderWidth = () => ['', isNumber, isArbitraryVariableLength, isArbitraryLength];\n const scaleLineStyle = () => ['solid', 'dashed', 'dotted', 'double'];\n const scaleBlendMode = () => ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\n const scaleMaskImagePosition = () => [isNumber, isPercent, isArbitraryVariablePosition, isArbitraryPosition];\n const scaleBlur = () => [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeBlur, isArbitraryVariable, isArbitraryValue];\n const scaleRotate = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleScale = () => ['none', isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleSkew = () => [isNumber, isArbitraryVariable, isArbitraryValue];\n const scaleTranslate = () => [isFraction, 'full', ...scaleUnambiguousSpacing()];\n return {\n cacheSize: 500,\n theme: {\n animate: ['spin', 'ping', 'pulse', 'bounce'],\n aspect: ['video'],\n blur: [isTshirtSize],\n breakpoint: [isTshirtSize],\n color: [isAny],\n container: [isTshirtSize],\n 'drop-shadow': [isTshirtSize],\n ease: ['in', 'out', 'in-out'],\n font: [isAnyNonArbitrary],\n 'font-weight': ['thin', 'extralight', 'light', 'normal', 'medium', 'semibold', 'bold', 'extrabold', 'black'],\n 'inset-shadow': [isTshirtSize],\n leading: ['none', 'tight', 'snug', 'normal', 'relaxed', 'loose'],\n perspective: ['dramatic', 'near', 'normal', 'midrange', 'distant', 'none'],\n radius: [isTshirtSize],\n shadow: [isTshirtSize],\n spacing: ['px', isNumber],\n text: [isTshirtSize],\n 'text-shadow': [isTshirtSize],\n tracking: ['tighter', 'tight', 'normal', 'wide', 'wider', 'widest']\n },\n classGroups: {\n // --------------\n // --- Layout ---\n // --------------\n /**\n * Aspect Ratio\n * @see https://tailwindcss.com/docs/aspect-ratio\n */\n aspect: [{\n aspect: ['auto', 'square', isFraction, isArbitraryValue, isArbitraryVariable, themeAspect]\n }],\n /**\n * Container\n * @see https://tailwindcss.com/docs/container\n * @deprecated since Tailwind CSS v4.0.0\n */\n container: ['container'],\n /**\n * Columns\n * @see https://tailwindcss.com/docs/columns\n */\n columns: [{\n columns: [isNumber, isArbitraryValue, isArbitraryVariable, themeContainer]\n }],\n /**\n * Break After\n * @see https://tailwindcss.com/docs/break-after\n */\n 'break-after': [{\n 'break-after': scaleBreak()\n }],\n /**\n * Break Before\n * @see https://tailwindcss.com/docs/break-before\n */\n 'break-before': [{\n 'break-before': scaleBreak()\n }],\n /**\n * Break Inside\n * @see https://tailwindcss.com/docs/break-inside\n */\n 'break-inside': [{\n 'break-inside': ['auto', 'avoid', 'avoid-page', 'avoid-column']\n }],\n /**\n * Box Decoration Break\n * @see https://tailwindcss.com/docs/box-decoration-break\n */\n 'box-decoration': [{\n 'box-decoration': ['slice', 'clone']\n }],\n /**\n * Box Sizing\n * @see https://tailwindcss.com/docs/box-sizing\n */\n box: [{\n box: ['border', 'content']\n }],\n /**\n * Display\n * @see https://tailwindcss.com/docs/display\n */\n display: ['block', 'inline-block', 'inline', 'flex', 'inline-flex', 'table', 'inline-table', 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row-group', 'table-row', 'flow-root', 'grid', 'inline-grid', 'contents', 'list-item', 'hidden'],\n /**\n * Screen Reader Only\n * @see https://tailwindcss.com/docs/display#screen-reader-only\n */\n sr: ['sr-only', 'not-sr-only'],\n /**\n * Floats\n * @see https://tailwindcss.com/docs/float\n */\n float: [{\n float: ['right', 'left', 'none', 'start', 'end']\n }],\n /**\n * Clear\n * @see https://tailwindcss.com/docs/clear\n */\n clear: [{\n clear: ['left', 'right', 'both', 'none', 'start', 'end']\n }],\n /**\n * Isolation\n * @see https://tailwindcss.com/docs/isolation\n */\n isolation: ['isolate', 'isolation-auto'],\n /**\n * Object Fit\n * @see https://tailwindcss.com/docs/object-fit\n */\n 'object-fit': [{\n object: ['contain', 'cover', 'fill', 'none', 'scale-down']\n }],\n /**\n * Object Position\n * @see https://tailwindcss.com/docs/object-position\n */\n 'object-position': [{\n object: scalePositionWithArbitrary()\n }],\n /**\n * Overflow\n * @see https://tailwindcss.com/docs/overflow\n */\n overflow: [{\n overflow: scaleOverflow()\n }],\n /**\n * Overflow X\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-x': [{\n 'overflow-x': scaleOverflow()\n }],\n /**\n * Overflow Y\n * @see https://tailwindcss.com/docs/overflow\n */\n 'overflow-y': [{\n 'overflow-y': scaleOverflow()\n }],\n /**\n * Overscroll Behavior\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n overscroll: [{\n overscroll: scaleOverscroll()\n }],\n /**\n * Overscroll Behavior X\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-x': [{\n 'overscroll-x': scaleOverscroll()\n }],\n /**\n * Overscroll Behavior Y\n * @see https://tailwindcss.com/docs/overscroll-behavior\n */\n 'overscroll-y': [{\n 'overscroll-y': scaleOverscroll()\n }],\n /**\n * Position\n * @see https://tailwindcss.com/docs/position\n */\n position: ['static', 'fixed', 'absolute', 'relative', 'sticky'],\n /**\n * Top / Right / Bottom / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n inset: [{\n inset: scaleInset()\n }],\n /**\n * Right / Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-x': [{\n 'inset-x': scaleInset()\n }],\n /**\n * Top / Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n 'inset-y': [{\n 'inset-y': scaleInset()\n }],\n /**\n * Start\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n start: [{\n start: scaleInset()\n }],\n /**\n * End\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n end: [{\n end: scaleInset()\n }],\n /**\n * Top\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n top: [{\n top: scaleInset()\n }],\n /**\n * Right\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n right: [{\n right: scaleInset()\n }],\n /**\n * Bottom\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n bottom: [{\n bottom: scaleInset()\n }],\n /**\n * Left\n * @see https://tailwindcss.com/docs/top-right-bottom-left\n */\n left: [{\n left: scaleInset()\n }],\n /**\n * Visibility\n * @see https://tailwindcss.com/docs/visibility\n */\n visibility: ['visible', 'invisible', 'collapse'],\n /**\n * Z-Index\n * @see https://tailwindcss.com/docs/z-index\n */\n z: [{\n z: [isInteger, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------------\n // --- Flexbox and Grid ---\n // ------------------------\n /**\n * Flex Basis\n * @see https://tailwindcss.com/docs/flex-basis\n */\n basis: [{\n basis: [isFraction, 'full', 'auto', themeContainer, ...scaleUnambiguousSpacing()]\n }],\n /**\n * Flex Direction\n * @see https://tailwindcss.com/docs/flex-direction\n */\n 'flex-direction': [{\n flex: ['row', 'row-reverse', 'col', 'col-reverse']\n }],\n /**\n * Flex Wrap\n * @see https://tailwindcss.com/docs/flex-wrap\n */\n 'flex-wrap': [{\n flex: ['nowrap', 'wrap', 'wrap-reverse']\n }],\n /**\n * Flex\n * @see https://tailwindcss.com/docs/flex\n */\n flex: [{\n flex: [isNumber, isFraction, 'auto', 'initial', 'none', isArbitraryValue]\n }],\n /**\n * Flex Grow\n * @see https://tailwindcss.com/docs/flex-grow\n */\n grow: [{\n grow: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Flex Shrink\n * @see https://tailwindcss.com/docs/flex-shrink\n */\n shrink: [{\n shrink: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Order\n * @see https://tailwindcss.com/docs/order\n */\n order: [{\n order: [isInteger, 'first', 'last', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Grid Template Columns\n * @see https://tailwindcss.com/docs/grid-template-columns\n */\n 'grid-cols': [{\n 'grid-cols': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Column Start / End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start-end': [{\n col: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Column Start\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-start': [{\n 'col-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Column End\n * @see https://tailwindcss.com/docs/grid-column\n */\n 'col-end': [{\n 'col-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Template Rows\n * @see https://tailwindcss.com/docs/grid-template-rows\n */\n 'grid-rows': [{\n 'grid-rows': scaleGridTemplateColsRows()\n }],\n /**\n * Grid Row Start / End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start-end': [{\n row: scaleGridColRowStartAndEnd()\n }],\n /**\n * Grid Row Start\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-start': [{\n 'row-start': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Row End\n * @see https://tailwindcss.com/docs/grid-row\n */\n 'row-end': [{\n 'row-end': scaleGridColRowStartOrEnd()\n }],\n /**\n * Grid Auto Flow\n * @see https://tailwindcss.com/docs/grid-auto-flow\n */\n 'grid-flow': [{\n 'grid-flow': ['row', 'col', 'dense', 'row-dense', 'col-dense']\n }],\n /**\n * Grid Auto Columns\n * @see https://tailwindcss.com/docs/grid-auto-columns\n */\n 'auto-cols': [{\n 'auto-cols': scaleGridAutoColsRows()\n }],\n /**\n * Grid Auto Rows\n * @see https://tailwindcss.com/docs/grid-auto-rows\n */\n 'auto-rows': [{\n 'auto-rows': scaleGridAutoColsRows()\n }],\n /**\n * Gap\n * @see https://tailwindcss.com/docs/gap\n */\n gap: [{\n gap: scaleUnambiguousSpacing()\n }],\n /**\n * Gap X\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-x': [{\n 'gap-x': scaleUnambiguousSpacing()\n }],\n /**\n * Gap Y\n * @see https://tailwindcss.com/docs/gap\n */\n 'gap-y': [{\n 'gap-y': scaleUnambiguousSpacing()\n }],\n /**\n * Justify Content\n * @see https://tailwindcss.com/docs/justify-content\n */\n 'justify-content': [{\n justify: [...scaleAlignPrimaryAxis(), 'normal']\n }],\n /**\n * Justify Items\n * @see https://tailwindcss.com/docs/justify-items\n */\n 'justify-items': [{\n 'justify-items': [...scaleAlignSecondaryAxis(), 'normal']\n }],\n /**\n * Justify Self\n * @see https://tailwindcss.com/docs/justify-self\n */\n 'justify-self': [{\n 'justify-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n /**\n * Align Content\n * @see https://tailwindcss.com/docs/align-content\n */\n 'align-content': [{\n content: ['normal', ...scaleAlignPrimaryAxis()]\n }],\n /**\n * Align Items\n * @see https://tailwindcss.com/docs/align-items\n */\n 'align-items': [{\n items: [...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Align Self\n * @see https://tailwindcss.com/docs/align-self\n */\n 'align-self': [{\n self: ['auto', ...scaleAlignSecondaryAxis(), {\n baseline: ['', 'last']\n }]\n }],\n /**\n * Place Content\n * @see https://tailwindcss.com/docs/place-content\n */\n 'place-content': [{\n 'place-content': scaleAlignPrimaryAxis()\n }],\n /**\n * Place Items\n * @see https://tailwindcss.com/docs/place-items\n */\n 'place-items': [{\n 'place-items': [...scaleAlignSecondaryAxis(), 'baseline']\n }],\n /**\n * Place Self\n * @see https://tailwindcss.com/docs/place-self\n */\n 'place-self': [{\n 'place-self': ['auto', ...scaleAlignSecondaryAxis()]\n }],\n // Spacing\n /**\n * Padding\n * @see https://tailwindcss.com/docs/padding\n */\n p: [{\n p: scaleUnambiguousSpacing()\n }],\n /**\n * Padding X\n * @see https://tailwindcss.com/docs/padding\n */\n px: [{\n px: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Y\n * @see https://tailwindcss.com/docs/padding\n */\n py: [{\n py: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Start\n * @see https://tailwindcss.com/docs/padding\n */\n ps: [{\n ps: scaleUnambiguousSpacing()\n }],\n /**\n * Padding End\n * @see https://tailwindcss.com/docs/padding\n */\n pe: [{\n pe: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Top\n * @see https://tailwindcss.com/docs/padding\n */\n pt: [{\n pt: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Right\n * @see https://tailwindcss.com/docs/padding\n */\n pr: [{\n pr: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Bottom\n * @see https://tailwindcss.com/docs/padding\n */\n pb: [{\n pb: scaleUnambiguousSpacing()\n }],\n /**\n * Padding Left\n * @see https://tailwindcss.com/docs/padding\n */\n pl: [{\n pl: scaleUnambiguousSpacing()\n }],\n /**\n * Margin\n * @see https://tailwindcss.com/docs/margin\n */\n m: [{\n m: scaleMargin()\n }],\n /**\n * Margin X\n * @see https://tailwindcss.com/docs/margin\n */\n mx: [{\n mx: scaleMargin()\n }],\n /**\n * Margin Y\n * @see https://tailwindcss.com/docs/margin\n */\n my: [{\n my: scaleMargin()\n }],\n /**\n * Margin Start\n * @see https://tailwindcss.com/docs/margin\n */\n ms: [{\n ms: scaleMargin()\n }],\n /**\n * Margin End\n * @see https://tailwindcss.com/docs/margin\n */\n me: [{\n me: scaleMargin()\n }],\n /**\n * Margin Top\n * @see https://tailwindcss.com/docs/margin\n */\n mt: [{\n mt: scaleMargin()\n }],\n /**\n * Margin Right\n * @see https://tailwindcss.com/docs/margin\n */\n mr: [{\n mr: scaleMargin()\n }],\n /**\n * Margin Bottom\n * @see https://tailwindcss.com/docs/margin\n */\n mb: [{\n mb: scaleMargin()\n }],\n /**\n * Margin Left\n * @see https://tailwindcss.com/docs/margin\n */\n ml: [{\n ml: scaleMargin()\n }],\n /**\n * Space Between X\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x': [{\n 'space-x': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between X Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-x-reverse': ['space-x-reverse'],\n /**\n * Space Between Y\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y': [{\n 'space-y': scaleUnambiguousSpacing()\n }],\n /**\n * Space Between Y Reverse\n * @see https://tailwindcss.com/docs/margin#adding-space-between-children\n */\n 'space-y-reverse': ['space-y-reverse'],\n // --------------\n // --- Sizing ---\n // --------------\n /**\n * Size\n * @see https://tailwindcss.com/docs/width#setting-both-width-and-height\n */\n size: [{\n size: scaleSizing()\n }],\n /**\n * Width\n * @see https://tailwindcss.com/docs/width\n */\n w: [{\n w: [themeContainer, 'screen', ...scaleSizing()]\n }],\n /**\n * Min-Width\n * @see https://tailwindcss.com/docs/min-width\n */\n 'min-w': [{\n 'min-w': [themeContainer, 'screen', /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'none', ...scaleSizing()]\n }],\n /**\n * Max-Width\n * @see https://tailwindcss.com/docs/max-width\n */\n 'max-w': [{\n 'max-w': [themeContainer, 'screen', 'none', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n 'prose', /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n {\n screen: [themeBreakpoint]\n }, ...scaleSizing()]\n }],\n /**\n * Height\n * @see https://tailwindcss.com/docs/height\n */\n h: [{\n h: ['screen', 'lh', ...scaleSizing()]\n }],\n /**\n * Min-Height\n * @see https://tailwindcss.com/docs/min-height\n */\n 'min-h': [{\n 'min-h': ['screen', 'lh', 'none', ...scaleSizing()]\n }],\n /**\n * Max-Height\n * @see https://tailwindcss.com/docs/max-height\n */\n 'max-h': [{\n 'max-h': ['screen', 'lh', ...scaleSizing()]\n }],\n // ------------------\n // --- Typography ---\n // ------------------\n /**\n * Font Size\n * @see https://tailwindcss.com/docs/font-size\n */\n 'font-size': [{\n text: ['base', themeText, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Font Smoothing\n * @see https://tailwindcss.com/docs/font-smoothing\n */\n 'font-smoothing': ['antialiased', 'subpixel-antialiased'],\n /**\n * Font Style\n * @see https://tailwindcss.com/docs/font-style\n */\n 'font-style': ['italic', 'not-italic'],\n /**\n * Font Weight\n * @see https://tailwindcss.com/docs/font-weight\n */\n 'font-weight': [{\n font: [themeFontWeight, isArbitraryVariable, isArbitraryNumber]\n }],\n /**\n * Font Stretch\n * @see https://tailwindcss.com/docs/font-stretch\n */\n 'font-stretch': [{\n 'font-stretch': ['ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded', 'ultra-expanded', isPercent, isArbitraryValue]\n }],\n /**\n * Font Family\n * @see https://tailwindcss.com/docs/font-family\n */\n 'font-family': [{\n font: [isArbitraryVariableFamilyName, isArbitraryValue, themeFont]\n }],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-normal': ['normal-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-ordinal': ['ordinal'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-slashed-zero': ['slashed-zero'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-figure': ['lining-nums', 'oldstyle-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-spacing': ['proportional-nums', 'tabular-nums'],\n /**\n * Font Variant Numeric\n * @see https://tailwindcss.com/docs/font-variant-numeric\n */\n 'fvn-fraction': ['diagonal-fractions', 'stacked-fractions'],\n /**\n * Letter Spacing\n * @see https://tailwindcss.com/docs/letter-spacing\n */\n tracking: [{\n tracking: [themeTracking, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Line Clamp\n * @see https://tailwindcss.com/docs/line-clamp\n */\n 'line-clamp': [{\n 'line-clamp': [isNumber, 'none', isArbitraryVariable, isArbitraryNumber]\n }],\n /**\n * Line Height\n * @see https://tailwindcss.com/docs/line-height\n */\n leading: [{\n leading: [/** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */\n themeLeading, ...scaleUnambiguousSpacing()]\n }],\n /**\n * List Style Image\n * @see https://tailwindcss.com/docs/list-style-image\n */\n 'list-image': [{\n 'list-image': ['none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * List Style Position\n * @see https://tailwindcss.com/docs/list-style-position\n */\n 'list-style-position': [{\n list: ['inside', 'outside']\n }],\n /**\n * List Style Type\n * @see https://tailwindcss.com/docs/list-style-type\n */\n 'list-style-type': [{\n list: ['disc', 'decimal', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Alignment\n * @see https://tailwindcss.com/docs/text-align\n */\n 'text-alignment': [{\n text: ['left', 'center', 'right', 'justify', 'start', 'end']\n }],\n /**\n * Placeholder Color\n * @deprecated since Tailwind CSS v3.0.0\n * @see https://v3.tailwindcss.com/docs/placeholder-color\n */\n 'placeholder-color': [{\n placeholder: scaleColor()\n }],\n /**\n * Text Color\n * @see https://tailwindcss.com/docs/text-color\n */\n 'text-color': [{\n text: scaleColor()\n }],\n /**\n * Text Decoration\n * @see https://tailwindcss.com/docs/text-decoration\n */\n 'text-decoration': ['underline', 'overline', 'line-through', 'no-underline'],\n /**\n * Text Decoration Style\n * @see https://tailwindcss.com/docs/text-decoration-style\n */\n 'text-decoration-style': [{\n decoration: [...scaleLineStyle(), 'wavy']\n }],\n /**\n * Text Decoration Thickness\n * @see https://tailwindcss.com/docs/text-decoration-thickness\n */\n 'text-decoration-thickness': [{\n decoration: [isNumber, 'from-font', 'auto', isArbitraryVariable, isArbitraryLength]\n }],\n /**\n * Text Decoration Color\n * @see https://tailwindcss.com/docs/text-decoration-color\n */\n 'text-decoration-color': [{\n decoration: scaleColor()\n }],\n /**\n * Text Underline Offset\n * @see https://tailwindcss.com/docs/text-underline-offset\n */\n 'underline-offset': [{\n 'underline-offset': [isNumber, 'auto', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Text Transform\n * @see https://tailwindcss.com/docs/text-transform\n */\n 'text-transform': ['uppercase', 'lowercase', 'capitalize', 'normal-case'],\n /**\n * Text Overflow\n * @see https://tailwindcss.com/docs/text-overflow\n */\n 'text-overflow': ['truncate', 'text-ellipsis', 'text-clip'],\n /**\n * Text Wrap\n * @see https://tailwindcss.com/docs/text-wrap\n */\n 'text-wrap': [{\n text: ['wrap', 'nowrap', 'balance', 'pretty']\n }],\n /**\n * Text Indent\n * @see https://tailwindcss.com/docs/text-indent\n */\n indent: [{\n indent: scaleUnambiguousSpacing()\n }],\n /**\n * Vertical Alignment\n * @see https://tailwindcss.com/docs/vertical-align\n */\n 'vertical-align': [{\n align: ['baseline', 'top', 'middle', 'bottom', 'text-top', 'text-bottom', 'sub', 'super', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Whitespace\n * @see https://tailwindcss.com/docs/whitespace\n */\n whitespace: [{\n whitespace: ['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces']\n }],\n /**\n * Word Break\n * @see https://tailwindcss.com/docs/word-break\n */\n break: [{\n break: ['normal', 'words', 'all', 'keep']\n }],\n /**\n * Overflow Wrap\n * @see https://tailwindcss.com/docs/overflow-wrap\n */\n wrap: [{\n wrap: ['break-word', 'anywhere', 'normal']\n }],\n /**\n * Hyphens\n * @see https://tailwindcss.com/docs/hyphens\n */\n hyphens: [{\n hyphens: ['none', 'manual', 'auto']\n }],\n /**\n * Content\n * @see https://tailwindcss.com/docs/content\n */\n content: [{\n content: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // -------------------\n // --- Backgrounds ---\n // -------------------\n /**\n * Background Attachment\n * @see https://tailwindcss.com/docs/background-attachment\n */\n 'bg-attachment': [{\n bg: ['fixed', 'local', 'scroll']\n }],\n /**\n * Background Clip\n * @see https://tailwindcss.com/docs/background-clip\n */\n 'bg-clip': [{\n 'bg-clip': ['border', 'padding', 'content', 'text']\n }],\n /**\n * Background Origin\n * @see https://tailwindcss.com/docs/background-origin\n */\n 'bg-origin': [{\n 'bg-origin': ['border', 'padding', 'content']\n }],\n /**\n * Background Position\n * @see https://tailwindcss.com/docs/background-position\n */\n 'bg-position': [{\n bg: scaleBgPosition()\n }],\n /**\n * Background Repeat\n * @see https://tailwindcss.com/docs/background-repeat\n */\n 'bg-repeat': [{\n bg: scaleBgRepeat()\n }],\n /**\n * Background Size\n * @see https://tailwindcss.com/docs/background-size\n */\n 'bg-size': [{\n bg: scaleBgSize()\n }],\n /**\n * Background Image\n * @see https://tailwindcss.com/docs/background-image\n */\n 'bg-image': [{\n bg: ['none', {\n linear: [{\n to: ['t', 'tr', 'r', 'br', 'b', 'bl', 'l', 'tl']\n }, isInteger, isArbitraryVariable, isArbitraryValue],\n radial: ['', isArbitraryVariable, isArbitraryValue],\n conic: [isInteger, isArbitraryVariable, isArbitraryValue]\n }, isArbitraryVariableImage, isArbitraryImage]\n }],\n /**\n * Background Color\n * @see https://tailwindcss.com/docs/background-color\n */\n 'bg-color': [{\n bg: scaleColor()\n }],\n /**\n * Gradient Color Stops From Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from-pos': [{\n from: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops Via Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via-pos': [{\n via: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops To Position\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to-pos': [{\n to: scaleGradientStopPosition()\n }],\n /**\n * Gradient Color Stops From\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-from': [{\n from: scaleColor()\n }],\n /**\n * Gradient Color Stops Via\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-via': [{\n via: scaleColor()\n }],\n /**\n * Gradient Color Stops To\n * @see https://tailwindcss.com/docs/gradient-color-stops\n */\n 'gradient-to': [{\n to: scaleColor()\n }],\n // ---------------\n // --- Borders ---\n // ---------------\n /**\n * Border Radius\n * @see https://tailwindcss.com/docs/border-radius\n */\n rounded: [{\n rounded: scaleRadius()\n }],\n /**\n * Border Radius Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-s': [{\n 'rounded-s': scaleRadius()\n }],\n /**\n * Border Radius End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-e': [{\n 'rounded-e': scaleRadius()\n }],\n /**\n * Border Radius Top\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-t': [{\n 'rounded-t': scaleRadius()\n }],\n /**\n * Border Radius Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-r': [{\n 'rounded-r': scaleRadius()\n }],\n /**\n * Border Radius Bottom\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-b': [{\n 'rounded-b': scaleRadius()\n }],\n /**\n * Border Radius Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-l': [{\n 'rounded-l': scaleRadius()\n }],\n /**\n * Border Radius Start Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ss': [{\n 'rounded-ss': scaleRadius()\n }],\n /**\n * Border Radius Start End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-se': [{\n 'rounded-se': scaleRadius()\n }],\n /**\n * Border Radius End End\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-ee': [{\n 'rounded-ee': scaleRadius()\n }],\n /**\n * Border Radius End Start\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-es': [{\n 'rounded-es': scaleRadius()\n }],\n /**\n * Border Radius Top Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tl': [{\n 'rounded-tl': scaleRadius()\n }],\n /**\n * Border Radius Top Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-tr': [{\n 'rounded-tr': scaleRadius()\n }],\n /**\n * Border Radius Bottom Right\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-br': [{\n 'rounded-br': scaleRadius()\n }],\n /**\n * Border Radius Bottom Left\n * @see https://tailwindcss.com/docs/border-radius\n */\n 'rounded-bl': [{\n 'rounded-bl': scaleRadius()\n }],\n /**\n * Border Width\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w': [{\n border: scaleBorderWidth()\n }],\n /**\n * Border Width X\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-x': [{\n 'border-x': scaleBorderWidth()\n }],\n /**\n * Border Width Y\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-y': [{\n 'border-y': scaleBorderWidth()\n }],\n /**\n * Border Width Start\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-s': [{\n 'border-s': scaleBorderWidth()\n }],\n /**\n * Border Width End\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-e': [{\n 'border-e': scaleBorderWidth()\n }],\n /**\n * Border Width Top\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-t': [{\n 'border-t': scaleBorderWidth()\n }],\n /**\n * Border Width Right\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-r': [{\n 'border-r': scaleBorderWidth()\n }],\n /**\n * Border Width Bottom\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-b': [{\n 'border-b': scaleBorderWidth()\n }],\n /**\n * Border Width Left\n * @see https://tailwindcss.com/docs/border-width\n */\n 'border-w-l': [{\n 'border-l': scaleBorderWidth()\n }],\n /**\n * Divide Width X\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x': [{\n 'divide-x': scaleBorderWidth()\n }],\n /**\n * Divide Width X Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-x-reverse': ['divide-x-reverse'],\n /**\n * Divide Width Y\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y': [{\n 'divide-y': scaleBorderWidth()\n }],\n /**\n * Divide Width Y Reverse\n * @see https://tailwindcss.com/docs/border-width#between-children\n */\n 'divide-y-reverse': ['divide-y-reverse'],\n /**\n * Border Style\n * @see https://tailwindcss.com/docs/border-style\n */\n 'border-style': [{\n border: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Divide Style\n * @see https://tailwindcss.com/docs/border-style#setting-the-divider-style\n */\n 'divide-style': [{\n divide: [...scaleLineStyle(), 'hidden', 'none']\n }],\n /**\n * Border Color\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color': [{\n border: scaleColor()\n }],\n /**\n * Border Color X\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-x': [{\n 'border-x': scaleColor()\n }],\n /**\n * Border Color Y\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-y': [{\n 'border-y': scaleColor()\n }],\n /**\n * Border Color S\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-s': [{\n 'border-s': scaleColor()\n }],\n /**\n * Border Color E\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-e': [{\n 'border-e': scaleColor()\n }],\n /**\n * Border Color Top\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-t': [{\n 'border-t': scaleColor()\n }],\n /**\n * Border Color Right\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-r': [{\n 'border-r': scaleColor()\n }],\n /**\n * Border Color Bottom\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-b': [{\n 'border-b': scaleColor()\n }],\n /**\n * Border Color Left\n * @see https://tailwindcss.com/docs/border-color\n */\n 'border-color-l': [{\n 'border-l': scaleColor()\n }],\n /**\n * Divide Color\n * @see https://tailwindcss.com/docs/divide-color\n */\n 'divide-color': [{\n divide: scaleColor()\n }],\n /**\n * Outline Style\n * @see https://tailwindcss.com/docs/outline-style\n */\n 'outline-style': [{\n outline: [...scaleLineStyle(), 'none', 'hidden']\n }],\n /**\n * Outline Offset\n * @see https://tailwindcss.com/docs/outline-offset\n */\n 'outline-offset': [{\n 'outline-offset': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Outline Width\n * @see https://tailwindcss.com/docs/outline-width\n */\n 'outline-w': [{\n outline: ['', isNumber, isArbitraryVariableLength, isArbitraryLength]\n }],\n /**\n * Outline Color\n * @see https://tailwindcss.com/docs/outline-color\n */\n 'outline-color': [{\n outline: scaleColor()\n }],\n // ---------------\n // --- Effects ---\n // ---------------\n /**\n * Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow\n */\n shadow: [{\n shadow: [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-shadow-color\n */\n 'shadow-color': [{\n shadow: scaleColor()\n }],\n /**\n * Inset Box Shadow\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-shadow\n */\n 'inset-shadow': [{\n 'inset-shadow': ['none', themeInsetShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Inset Box Shadow Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-shadow-color\n */\n 'inset-shadow-color': [{\n 'inset-shadow': scaleColor()\n }],\n /**\n * Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-a-ring\n */\n 'ring-w': [{\n ring: scaleBorderWidth()\n }],\n /**\n * Ring Width Inset\n * @see https://v3.tailwindcss.com/docs/ring-width#inset-rings\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-w-inset': ['ring-inset'],\n /**\n * Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-ring-color\n */\n 'ring-color': [{\n ring: scaleColor()\n }],\n /**\n * Ring Offset Width\n * @see https://v3.tailwindcss.com/docs/ring-offset-width\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-w': [{\n 'ring-offset': [isNumber, isArbitraryLength]\n }],\n /**\n * Ring Offset Color\n * @see https://v3.tailwindcss.com/docs/ring-offset-color\n * @deprecated since Tailwind CSS v4.0.0\n * @see https://github.com/tailwindlabs/tailwindcss/blob/v4.0.0/packages/tailwindcss/src/utilities.ts#L4158\n */\n 'ring-offset-color': [{\n 'ring-offset': scaleColor()\n }],\n /**\n * Inset Ring Width\n * @see https://tailwindcss.com/docs/box-shadow#adding-an-inset-ring\n */\n 'inset-ring-w': [{\n 'inset-ring': scaleBorderWidth()\n }],\n /**\n * Inset Ring Color\n * @see https://tailwindcss.com/docs/box-shadow#setting-the-inset-ring-color\n */\n 'inset-ring-color': [{\n 'inset-ring': scaleColor()\n }],\n /**\n * Text Shadow\n * @see https://tailwindcss.com/docs/text-shadow\n */\n 'text-shadow': [{\n 'text-shadow': ['none', themeTextShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Text Shadow Color\n * @see https://tailwindcss.com/docs/text-shadow#setting-the-shadow-color\n */\n 'text-shadow-color': [{\n 'text-shadow': scaleColor()\n }],\n /**\n * Opacity\n * @see https://tailwindcss.com/docs/opacity\n */\n opacity: [{\n opacity: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Mix Blend Mode\n * @see https://tailwindcss.com/docs/mix-blend-mode\n */\n 'mix-blend': [{\n 'mix-blend': [...scaleBlendMode(), 'plus-darker', 'plus-lighter']\n }],\n /**\n * Background Blend Mode\n * @see https://tailwindcss.com/docs/background-blend-mode\n */\n 'bg-blend': [{\n 'bg-blend': scaleBlendMode()\n }],\n /**\n * Mask Clip\n * @see https://tailwindcss.com/docs/mask-clip\n */\n 'mask-clip': [{\n 'mask-clip': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }, 'mask-no-clip'],\n /**\n * Mask Composite\n * @see https://tailwindcss.com/docs/mask-composite\n */\n 'mask-composite': [{\n mask: ['add', 'subtract', 'intersect', 'exclude']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image-linear-pos': [{\n 'mask-linear': [isNumber]\n }],\n 'mask-image-linear-from-pos': [{\n 'mask-linear-from': scaleMaskImagePosition()\n }],\n 'mask-image-linear-to-pos': [{\n 'mask-linear-to': scaleMaskImagePosition()\n }],\n 'mask-image-linear-from-color': [{\n 'mask-linear-from': scaleColor()\n }],\n 'mask-image-linear-to-color': [{\n 'mask-linear-to': scaleColor()\n }],\n 'mask-image-t-from-pos': [{\n 'mask-t-from': scaleMaskImagePosition()\n }],\n 'mask-image-t-to-pos': [{\n 'mask-t-to': scaleMaskImagePosition()\n }],\n 'mask-image-t-from-color': [{\n 'mask-t-from': scaleColor()\n }],\n 'mask-image-t-to-color': [{\n 'mask-t-to': scaleColor()\n }],\n 'mask-image-r-from-pos': [{\n 'mask-r-from': scaleMaskImagePosition()\n }],\n 'mask-image-r-to-pos': [{\n 'mask-r-to': scaleMaskImagePosition()\n }],\n 'mask-image-r-from-color': [{\n 'mask-r-from': scaleColor()\n }],\n 'mask-image-r-to-color': [{\n 'mask-r-to': scaleColor()\n }],\n 'mask-image-b-from-pos': [{\n 'mask-b-from': scaleMaskImagePosition()\n }],\n 'mask-image-b-to-pos': [{\n 'mask-b-to': scaleMaskImagePosition()\n }],\n 'mask-image-b-from-color': [{\n 'mask-b-from': scaleColor()\n }],\n 'mask-image-b-to-color': [{\n 'mask-b-to': scaleColor()\n }],\n 'mask-image-l-from-pos': [{\n 'mask-l-from': scaleMaskImagePosition()\n }],\n 'mask-image-l-to-pos': [{\n 'mask-l-to': scaleMaskImagePosition()\n }],\n 'mask-image-l-from-color': [{\n 'mask-l-from': scaleColor()\n }],\n 'mask-image-l-to-color': [{\n 'mask-l-to': scaleColor()\n }],\n 'mask-image-x-from-pos': [{\n 'mask-x-from': scaleMaskImagePosition()\n }],\n 'mask-image-x-to-pos': [{\n 'mask-x-to': scaleMaskImagePosition()\n }],\n 'mask-image-x-from-color': [{\n 'mask-x-from': scaleColor()\n }],\n 'mask-image-x-to-color': [{\n 'mask-x-to': scaleColor()\n }],\n 'mask-image-y-from-pos': [{\n 'mask-y-from': scaleMaskImagePosition()\n }],\n 'mask-image-y-to-pos': [{\n 'mask-y-to': scaleMaskImagePosition()\n }],\n 'mask-image-y-from-color': [{\n 'mask-y-from': scaleColor()\n }],\n 'mask-image-y-to-color': [{\n 'mask-y-to': scaleColor()\n }],\n 'mask-image-radial': [{\n 'mask-radial': [isArbitraryVariable, isArbitraryValue]\n }],\n 'mask-image-radial-from-pos': [{\n 'mask-radial-from': scaleMaskImagePosition()\n }],\n 'mask-image-radial-to-pos': [{\n 'mask-radial-to': scaleMaskImagePosition()\n }],\n 'mask-image-radial-from-color': [{\n 'mask-radial-from': scaleColor()\n }],\n 'mask-image-radial-to-color': [{\n 'mask-radial-to': scaleColor()\n }],\n 'mask-image-radial-shape': [{\n 'mask-radial': ['circle', 'ellipse']\n }],\n 'mask-image-radial-size': [{\n 'mask-radial': [{\n closest: ['side', 'corner'],\n farthest: ['side', 'corner']\n }]\n }],\n 'mask-image-radial-pos': [{\n 'mask-radial-at': scalePosition()\n }],\n 'mask-image-conic-pos': [{\n 'mask-conic': [isNumber]\n }],\n 'mask-image-conic-from-pos': [{\n 'mask-conic-from': scaleMaskImagePosition()\n }],\n 'mask-image-conic-to-pos': [{\n 'mask-conic-to': scaleMaskImagePosition()\n }],\n 'mask-image-conic-from-color': [{\n 'mask-conic-from': scaleColor()\n }],\n 'mask-image-conic-to-color': [{\n 'mask-conic-to': scaleColor()\n }],\n /**\n * Mask Mode\n * @see https://tailwindcss.com/docs/mask-mode\n */\n 'mask-mode': [{\n mask: ['alpha', 'luminance', 'match']\n }],\n /**\n * Mask Origin\n * @see https://tailwindcss.com/docs/mask-origin\n */\n 'mask-origin': [{\n 'mask-origin': ['border', 'padding', 'content', 'fill', 'stroke', 'view']\n }],\n /**\n * Mask Position\n * @see https://tailwindcss.com/docs/mask-position\n */\n 'mask-position': [{\n mask: scaleBgPosition()\n }],\n /**\n * Mask Repeat\n * @see https://tailwindcss.com/docs/mask-repeat\n */\n 'mask-repeat': [{\n mask: scaleBgRepeat()\n }],\n /**\n * Mask Size\n * @see https://tailwindcss.com/docs/mask-size\n */\n 'mask-size': [{\n mask: scaleBgSize()\n }],\n /**\n * Mask Type\n * @see https://tailwindcss.com/docs/mask-type\n */\n 'mask-type': [{\n 'mask-type': ['alpha', 'luminance']\n }],\n /**\n * Mask Image\n * @see https://tailwindcss.com/docs/mask-image\n */\n 'mask-image': [{\n mask: ['none', isArbitraryVariable, isArbitraryValue]\n }],\n // ---------------\n // --- Filters ---\n // ---------------\n /**\n * Filter\n * @see https://tailwindcss.com/docs/filter\n */\n filter: [{\n filter: [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Blur\n * @see https://tailwindcss.com/docs/blur\n */\n blur: [{\n blur: scaleBlur()\n }],\n /**\n * Brightness\n * @see https://tailwindcss.com/docs/brightness\n */\n brightness: [{\n brightness: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Contrast\n * @see https://tailwindcss.com/docs/contrast\n */\n contrast: [{\n contrast: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Drop Shadow\n * @see https://tailwindcss.com/docs/drop-shadow\n */\n 'drop-shadow': [{\n 'drop-shadow': [\n // Deprecated since Tailwind CSS v4.0.0\n '', 'none', themeDropShadow, isArbitraryVariableShadow, isArbitraryShadow]\n }],\n /**\n * Drop Shadow Color\n * @see https://tailwindcss.com/docs/filter-drop-shadow#setting-the-shadow-color\n */\n 'drop-shadow-color': [{\n 'drop-shadow': scaleColor()\n }],\n /**\n * Grayscale\n * @see https://tailwindcss.com/docs/grayscale\n */\n grayscale: [{\n grayscale: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Hue Rotate\n * @see https://tailwindcss.com/docs/hue-rotate\n */\n 'hue-rotate': [{\n 'hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Invert\n * @see https://tailwindcss.com/docs/invert\n */\n invert: [{\n invert: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Saturate\n * @see https://tailwindcss.com/docs/saturate\n */\n saturate: [{\n saturate: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Sepia\n * @see https://tailwindcss.com/docs/sepia\n */\n sepia: [{\n sepia: ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Filter\n * @see https://tailwindcss.com/docs/backdrop-filter\n */\n 'backdrop-filter': [{\n 'backdrop-filter': [\n // Deprecated since Tailwind CSS v3.0.0\n '', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Blur\n * @see https://tailwindcss.com/docs/backdrop-blur\n */\n 'backdrop-blur': [{\n 'backdrop-blur': scaleBlur()\n }],\n /**\n * Backdrop Brightness\n * @see https://tailwindcss.com/docs/backdrop-brightness\n */\n 'backdrop-brightness': [{\n 'backdrop-brightness': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Contrast\n * @see https://tailwindcss.com/docs/backdrop-contrast\n */\n 'backdrop-contrast': [{\n 'backdrop-contrast': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Grayscale\n * @see https://tailwindcss.com/docs/backdrop-grayscale\n */\n 'backdrop-grayscale': [{\n 'backdrop-grayscale': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Hue Rotate\n * @see https://tailwindcss.com/docs/backdrop-hue-rotate\n */\n 'backdrop-hue-rotate': [{\n 'backdrop-hue-rotate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Invert\n * @see https://tailwindcss.com/docs/backdrop-invert\n */\n 'backdrop-invert': [{\n 'backdrop-invert': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Opacity\n * @see https://tailwindcss.com/docs/backdrop-opacity\n */\n 'backdrop-opacity': [{\n 'backdrop-opacity': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Saturate\n * @see https://tailwindcss.com/docs/backdrop-saturate\n */\n 'backdrop-saturate': [{\n 'backdrop-saturate': [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Backdrop Sepia\n * @see https://tailwindcss.com/docs/backdrop-sepia\n */\n 'backdrop-sepia': [{\n 'backdrop-sepia': ['', isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n // --------------\n // --- Tables ---\n // --------------\n /**\n * Border Collapse\n * @see https://tailwindcss.com/docs/border-collapse\n */\n 'border-collapse': [{\n border: ['collapse', 'separate']\n }],\n /**\n * Border Spacing\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing': [{\n 'border-spacing': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing X\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-x': [{\n 'border-spacing-x': scaleUnambiguousSpacing()\n }],\n /**\n * Border Spacing Y\n * @see https://tailwindcss.com/docs/border-spacing\n */\n 'border-spacing-y': [{\n 'border-spacing-y': scaleUnambiguousSpacing()\n }],\n /**\n * Table Layout\n * @see https://tailwindcss.com/docs/table-layout\n */\n 'table-layout': [{\n table: ['auto', 'fixed']\n }],\n /**\n * Caption Side\n * @see https://tailwindcss.com/docs/caption-side\n */\n caption: [{\n caption: ['top', 'bottom']\n }],\n // ---------------------------------\n // --- Transitions and Animation ---\n // ---------------------------------\n /**\n * Transition Property\n * @see https://tailwindcss.com/docs/transition-property\n */\n transition: [{\n transition: ['', 'all', 'colors', 'opacity', 'shadow', 'transform', 'none', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Behavior\n * @see https://tailwindcss.com/docs/transition-behavior\n */\n 'transition-behavior': [{\n transition: ['normal', 'discrete']\n }],\n /**\n * Transition Duration\n * @see https://tailwindcss.com/docs/transition-duration\n */\n duration: [{\n duration: [isNumber, 'initial', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Timing Function\n * @see https://tailwindcss.com/docs/transition-timing-function\n */\n ease: [{\n ease: ['linear', 'initial', themeEase, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Transition Delay\n * @see https://tailwindcss.com/docs/transition-delay\n */\n delay: [{\n delay: [isNumber, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Animation\n * @see https://tailwindcss.com/docs/animation\n */\n animate: [{\n animate: ['none', themeAnimate, isArbitraryVariable, isArbitraryValue]\n }],\n // ------------------\n // --- Transforms ---\n // ------------------\n /**\n * Backface Visibility\n * @see https://tailwindcss.com/docs/backface-visibility\n */\n backface: [{\n backface: ['hidden', 'visible']\n }],\n /**\n * Perspective\n * @see https://tailwindcss.com/docs/perspective\n */\n perspective: [{\n perspective: [themePerspective, isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Perspective Origin\n * @see https://tailwindcss.com/docs/perspective-origin\n */\n 'perspective-origin': [{\n 'perspective-origin': scalePositionWithArbitrary()\n }],\n /**\n * Rotate\n * @see https://tailwindcss.com/docs/rotate\n */\n rotate: [{\n rotate: scaleRotate()\n }],\n /**\n * Rotate X\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-x': [{\n 'rotate-x': scaleRotate()\n }],\n /**\n * Rotate Y\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-y': [{\n 'rotate-y': scaleRotate()\n }],\n /**\n * Rotate Z\n * @see https://tailwindcss.com/docs/rotate\n */\n 'rotate-z': [{\n 'rotate-z': scaleRotate()\n }],\n /**\n * Scale\n * @see https://tailwindcss.com/docs/scale\n */\n scale: [{\n scale: scaleScale()\n }],\n /**\n * Scale X\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-x': [{\n 'scale-x': scaleScale()\n }],\n /**\n * Scale Y\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-y': [{\n 'scale-y': scaleScale()\n }],\n /**\n * Scale Z\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-z': [{\n 'scale-z': scaleScale()\n }],\n /**\n * Scale 3D\n * @see https://tailwindcss.com/docs/scale\n */\n 'scale-3d': ['scale-3d'],\n /**\n * Skew\n * @see https://tailwindcss.com/docs/skew\n */\n skew: [{\n skew: scaleSkew()\n }],\n /**\n * Skew X\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-x': [{\n 'skew-x': scaleSkew()\n }],\n /**\n * Skew Y\n * @see https://tailwindcss.com/docs/skew\n */\n 'skew-y': [{\n 'skew-y': scaleSkew()\n }],\n /**\n * Transform\n * @see https://tailwindcss.com/docs/transform\n */\n transform: [{\n transform: [isArbitraryVariable, isArbitraryValue, '', 'none', 'gpu', 'cpu']\n }],\n /**\n * Transform Origin\n * @see https://tailwindcss.com/docs/transform-origin\n */\n 'transform-origin': [{\n origin: scalePositionWithArbitrary()\n }],\n /**\n * Transform Style\n * @see https://tailwindcss.com/docs/transform-style\n */\n 'transform-style': [{\n transform: ['3d', 'flat']\n }],\n /**\n * Translate\n * @see https://tailwindcss.com/docs/translate\n */\n translate: [{\n translate: scaleTranslate()\n }],\n /**\n * Translate X\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-x': [{\n 'translate-x': scaleTranslate()\n }],\n /**\n * Translate Y\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-y': [{\n 'translate-y': scaleTranslate()\n }],\n /**\n * Translate Z\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-z': [{\n 'translate-z': scaleTranslate()\n }],\n /**\n * Translate None\n * @see https://tailwindcss.com/docs/translate\n */\n 'translate-none': ['translate-none'],\n // ---------------------\n // --- Interactivity ---\n // ---------------------\n /**\n * Accent Color\n * @see https://tailwindcss.com/docs/accent-color\n */\n accent: [{\n accent: scaleColor()\n }],\n /**\n * Appearance\n * @see https://tailwindcss.com/docs/appearance\n */\n appearance: [{\n appearance: ['none', 'auto']\n }],\n /**\n * Caret Color\n * @see https://tailwindcss.com/docs/just-in-time-mode#caret-color-utilities\n */\n 'caret-color': [{\n caret: scaleColor()\n }],\n /**\n * Color Scheme\n * @see https://tailwindcss.com/docs/color-scheme\n */\n 'color-scheme': [{\n scheme: ['normal', 'dark', 'light', 'light-dark', 'only-dark', 'only-light']\n }],\n /**\n * Cursor\n * @see https://tailwindcss.com/docs/cursor\n */\n cursor: [{\n cursor: ['auto', 'default', 'pointer', 'wait', 'text', 'move', 'help', 'not-allowed', 'none', 'context-menu', 'progress', 'cell', 'crosshair', 'vertical-text', 'alias', 'copy', 'no-drop', 'grab', 'grabbing', 'all-scroll', 'col-resize', 'row-resize', 'n-resize', 'e-resize', 's-resize', 'w-resize', 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize', 'ew-resize', 'ns-resize', 'nesw-resize', 'nwse-resize', 'zoom-in', 'zoom-out', isArbitraryVariable, isArbitraryValue]\n }],\n /**\n * Field Sizing\n * @see https://tailwindcss.com/docs/field-sizing\n */\n 'field-sizing': [{\n 'field-sizing': ['fixed', 'content']\n }],\n /**\n * Pointer Events\n * @see https://tailwindcss.com/docs/pointer-events\n */\n 'pointer-events': [{\n 'pointer-events': ['auto', 'none']\n }],\n /**\n * Resize\n * @see https://tailwindcss.com/docs/resize\n */\n resize: [{\n resize: ['none', '', 'y', 'x']\n }],\n /**\n * Scroll Behavior\n * @see https://tailwindcss.com/docs/scroll-behavior\n */\n 'scroll-behavior': [{\n scroll: ['auto', 'smooth']\n }],\n /**\n * Scroll Margin\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-m': [{\n 'scroll-m': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin X\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mx': [{\n 'scroll-mx': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Y\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-my': [{\n 'scroll-my': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Start\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ms': [{\n 'scroll-ms': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin End\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-me': [{\n 'scroll-me': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Top\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mt': [{\n 'scroll-mt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Right\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mr': [{\n 'scroll-mr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Bottom\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-mb': [{\n 'scroll-mb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Margin Left\n * @see https://tailwindcss.com/docs/scroll-margin\n */\n 'scroll-ml': [{\n 'scroll-ml': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-p': [{\n 'scroll-p': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding X\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-px': [{\n 'scroll-px': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Y\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-py': [{\n 'scroll-py': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Start\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-ps': [{\n 'scroll-ps': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding End\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pe': [{\n 'scroll-pe': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Top\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pt': [{\n 'scroll-pt': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Right\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pr': [{\n 'scroll-pr': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Bottom\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pb': [{\n 'scroll-pb': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Padding Left\n * @see https://tailwindcss.com/docs/scroll-padding\n */\n 'scroll-pl': [{\n 'scroll-pl': scaleUnambiguousSpacing()\n }],\n /**\n * Scroll Snap Align\n * @see https://tailwindcss.com/docs/scroll-snap-align\n */\n 'snap-align': [{\n snap: ['start', 'end', 'center', 'align-none']\n }],\n /**\n * Scroll Snap Stop\n * @see https://tailwindcss.com/docs/scroll-snap-stop\n */\n 'snap-stop': [{\n snap: ['normal', 'always']\n }],\n /**\n * Scroll Snap Type\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-type': [{\n snap: ['none', 'x', 'y', 'both']\n }],\n /**\n * Scroll Snap Type Strictness\n * @see https://tailwindcss.com/docs/scroll-snap-type\n */\n 'snap-strictness': [{\n snap: ['mandatory', 'proximity']\n }],\n /**\n * Touch Action\n * @see https://tailwindcss.com/docs/touch-action\n */\n touch: [{\n touch: ['auto', 'none', 'manipulation']\n }],\n /**\n * Touch Action X\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-x': [{\n 'touch-pan': ['x', 'left', 'right']\n }],\n /**\n * Touch Action Y\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-y': [{\n 'touch-pan': ['y', 'up', 'down']\n }],\n /**\n * Touch Action Pinch Zoom\n * @see https://tailwindcss.com/docs/touch-action\n */\n 'touch-pz': ['touch-pinch-zoom'],\n /**\n * User Select\n * @see https://tailwindcss.com/docs/user-select\n */\n select: [{\n select: ['none', 'text', 'all', 'auto']\n }],\n /**\n * Will Change\n * @see https://tailwindcss.com/docs/will-change\n */\n 'will-change': [{\n 'will-change': ['auto', 'scroll', 'contents', 'transform', isArbitraryVariable, isArbitraryValue]\n }],\n // -----------\n // --- SVG ---\n // -----------\n /**\n * Fill\n * @see https://tailwindcss.com/docs/fill\n */\n fill: [{\n fill: ['none', ...scaleColor()]\n }],\n /**\n * Stroke Width\n * @see https://tailwindcss.com/docs/stroke-width\n */\n 'stroke-w': [{\n stroke: [isNumber, isArbitraryVariableLength, isArbitraryLength, isArbitraryNumber]\n }],\n /**\n * Stroke\n * @see https://tailwindcss.com/docs/stroke\n */\n stroke: [{\n stroke: ['none', ...scaleColor()]\n }],\n // ---------------------\n // --- Accessibility ---\n // ---------------------\n /**\n * Forced Color Adjust\n * @see https://tailwindcss.com/docs/forced-color-adjust\n */\n 'forced-color-adjust': [{\n 'forced-color-adjust': ['auto', 'none']\n }]\n },\n conflictingClassGroups: {\n overflow: ['overflow-x', 'overflow-y'],\n overscroll: ['overscroll-x', 'overscroll-y'],\n inset: ['inset-x', 'inset-y', 'start', 'end', 'top', 'right', 'bottom', 'left'],\n 'inset-x': ['right', 'left'],\n 'inset-y': ['top', 'bottom'],\n flex: ['basis', 'grow', 'shrink'],\n gap: ['gap-x', 'gap-y'],\n p: ['px', 'py', 'ps', 'pe', 'pt', 'pr', 'pb', 'pl'],\n px: ['pr', 'pl'],\n py: ['pt', 'pb'],\n m: ['mx', 'my', 'ms', 'me', 'mt', 'mr', 'mb', 'ml'],\n mx: ['mr', 'ml'],\n my: ['mt', 'mb'],\n size: ['w', 'h'],\n 'font-size': ['leading'],\n 'fvn-normal': ['fvn-ordinal', 'fvn-slashed-zero', 'fvn-figure', 'fvn-spacing', 'fvn-fraction'],\n 'fvn-ordinal': ['fvn-normal'],\n 'fvn-slashed-zero': ['fvn-normal'],\n 'fvn-figure': ['fvn-normal'],\n 'fvn-spacing': ['fvn-normal'],\n 'fvn-fraction': ['fvn-normal'],\n 'line-clamp': ['display', 'overflow'],\n rounded: ['rounded-s', 'rounded-e', 'rounded-t', 'rounded-r', 'rounded-b', 'rounded-l', 'rounded-ss', 'rounded-se', 'rounded-ee', 'rounded-es', 'rounded-tl', 'rounded-tr', 'rounded-br', 'rounded-bl'],\n 'rounded-s': ['rounded-ss', 'rounded-es'],\n 'rounded-e': ['rounded-se', 'rounded-ee'],\n 'rounded-t': ['rounded-tl', 'rounded-tr'],\n 'rounded-r': ['rounded-tr', 'rounded-br'],\n 'rounded-b': ['rounded-br', 'rounded-bl'],\n 'rounded-l': ['rounded-tl', 'rounded-bl'],\n 'border-spacing': ['border-spacing-x', 'border-spacing-y'],\n 'border-w': ['border-w-x', 'border-w-y', 'border-w-s', 'border-w-e', 'border-w-t', 'border-w-r', 'border-w-b', 'border-w-l'],\n 'border-w-x': ['border-w-r', 'border-w-l'],\n 'border-w-y': ['border-w-t', 'border-w-b'],\n 'border-color': ['border-color-x', 'border-color-y', 'border-color-s', 'border-color-e', 'border-color-t', 'border-color-r', 'border-color-b', 'border-color-l'],\n 'border-color-x': ['border-color-r', 'border-color-l'],\n 'border-color-y': ['border-color-t', 'border-color-b'],\n translate: ['translate-x', 'translate-y', 'translate-none'],\n 'translate-none': ['translate', 'translate-x', 'translate-y', 'translate-z'],\n 'scroll-m': ['scroll-mx', 'scroll-my', 'scroll-ms', 'scroll-me', 'scroll-mt', 'scroll-mr', 'scroll-mb', 'scroll-ml'],\n 'scroll-mx': ['scroll-mr', 'scroll-ml'],\n 'scroll-my': ['scroll-mt', 'scroll-mb'],\n 'scroll-p': ['scroll-px', 'scroll-py', 'scroll-ps', 'scroll-pe', 'scroll-pt', 'scroll-pr', 'scroll-pb', 'scroll-pl'],\n 'scroll-px': ['scroll-pr', 'scroll-pl'],\n 'scroll-py': ['scroll-pt', 'scroll-pb'],\n touch: ['touch-x', 'touch-y', 'touch-pz'],\n 'touch-x': ['touch'],\n 'touch-y': ['touch'],\n 'touch-pz': ['touch']\n },\n conflictingClassGroupModifiers: {\n 'font-size': ['leading']\n },\n orderSensitiveModifiers: ['*', '**', 'after', 'backdrop', 'before', 'details-content', 'file', 'first-letter', 'first-line', 'marker', 'placeholder', 'selection']\n };\n};\n\n/**\n * @param baseConfig Config where other config will be merged into. This object will be mutated.\n * @param configExtension Partial config to merge into the `baseConfig`.\n */\nconst mergeConfigs = (baseConfig, {\n cacheSize,\n prefix,\n experimentalParseClassName,\n extend = {},\n override = {}\n}) => {\n overrideProperty(baseConfig, 'cacheSize', cacheSize);\n overrideProperty(baseConfig, 'prefix', prefix);\n overrideProperty(baseConfig, 'experimentalParseClassName', experimentalParseClassName);\n overrideConfigProperties(baseConfig.theme, override.theme);\n overrideConfigProperties(baseConfig.classGroups, override.classGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroups, override.conflictingClassGroups);\n overrideConfigProperties(baseConfig.conflictingClassGroupModifiers, override.conflictingClassGroupModifiers);\n overrideProperty(baseConfig, 'orderSensitiveModifiers', override.orderSensitiveModifiers);\n mergeConfigProperties(baseConfig.theme, extend.theme);\n mergeConfigProperties(baseConfig.classGroups, extend.classGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroups, extend.conflictingClassGroups);\n mergeConfigProperties(baseConfig.conflictingClassGroupModifiers, extend.conflictingClassGroupModifiers);\n mergeArrayProperties(baseConfig, extend, 'orderSensitiveModifiers');\n return baseConfig;\n};\nconst overrideProperty = (baseObject, overrideKey, overrideValue) => {\n if (overrideValue !== undefined) {\n baseObject[overrideKey] = overrideValue;\n }\n};\nconst overrideConfigProperties = (baseObject, overrideObject) => {\n if (overrideObject) {\n for (const key in overrideObject) {\n overrideProperty(baseObject, key, overrideObject[key]);\n }\n }\n};\nconst mergeConfigProperties = (baseObject, mergeObject) => {\n if (mergeObject) {\n for (const key in mergeObject) {\n mergeArrayProperties(baseObject, mergeObject, key);\n }\n }\n};\nconst mergeArrayProperties = (baseObject, mergeObject, key) => {\n const mergeValue = mergeObject[key];\n if (mergeValue !== undefined) {\n baseObject[key] = baseObject[key] ? baseObject[key].concat(mergeValue) : mergeValue;\n }\n};\nconst extendTailwindMerge = (configExtension, ...createConfig) => typeof configExtension === 'function' ? createTailwindMerge(getDefaultConfig, configExtension, ...createConfig) : createTailwindMerge(() => mergeConfigs(getDefaultConfig(), configExtension), ...createConfig);\nconst twMerge = /*#__PURE__*/createTailwindMerge(getDefaultConfig);\nexport { createTailwindMerge, extendTailwindMerge, fromTheme, getDefaultConfig, mergeConfigs, twJoin, twMerge, validators };\n//# sourceMappingURL=bundle-mjs.mjs.map\n","// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/compose-refs/src/compose-refs.tsx\nimport * as React from \"react\";\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n return ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => {\n let hasCleanup = false;\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node);\n if (!hasCleanup && typeof cleanup == \"function\") {\n hasCleanup = true;\n }\n return cleanup;\n });\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i];\n if (typeof cleanup == \"function\") {\n cleanup();\n } else {\n setRef(refs[i], null);\n }\n }\n };\n }\n };\n}\nfunction useComposedRefs(...refs) {\n return React.useCallback(composeRefs(...refs), refs);\n}\nexport {\n composeRefs,\n useComposedRefs\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/context/src/create-context.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = React.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = React.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = React.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ jsx(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = React.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return React.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return React.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return React.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\nexport {\n createContext2 as createContext,\n createContextScope\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-layout-effect/src/use-layout-effect.tsx\nimport * as React from \"react\";\nvar useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {\n};\nexport {\n useLayoutEffect2 as useLayoutEffect\n};\n//# sourceMappingURL=index.mjs.map\n","// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/dismissable-layer.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive, dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = React.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = React.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = React.useContext(DismissableLayerContext);\n const [node, setNode] = React.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = React.useState({});\n const composedRefs = useComposedRefs(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n useEscapeKeydown((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n React.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n React.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n React.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ jsx(\n Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: composeEventHandlers(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {\n const context = React.useContext(DismissableLayerContext);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ jsx(Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);\n const isPointerInsideReactTreeRef = React.useRef(false);\n const handleClickRef = React.useRef(() => {\n });\n React.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = useCallbackRef(onFocusOutside);\n const isFocusInsideReactTreeRef = React.useRef(false);\n React.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n dispatchDiscreteCustomEvent(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\nexport {\n Branch,\n DismissableLayer,\n DismissableLayerBranch,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-guards.tsx\nimport * as React from \"react\";\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n React.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nexport {\n FocusGuards,\n FocusGuards as Root,\n useFocusGuards\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/focus-scope.tsx\nimport * as React from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { jsx } from \"react/jsx-runtime\";\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = React.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = React.useState(null);\n const onMountAutoFocus = useCallbackRef(onMountAutoFocusProp);\n const onUnmountAutoFocus = useCallbackRef(onUnmountAutoFocusProp);\n const lastFocusedElementRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContainer(node));\n const focusScope = React.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n React.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n React.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = React.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ jsx(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\nexport {\n FocusScope,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","// packages/react/id/src/id.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useReactId = React[\" useId \".trim().toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = React.useState(useReactId());\n useLayoutEffect(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\nexport {\n useId\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/portal.tsx\nimport * as React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { jsx } from \"react/jsx-runtime\";\nvar PORTAL_NAME = \"Portal\";\nvar Portal = React.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = React.useState(false);\n useLayoutEffect(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? ReactDOM.createPortal(/* @__PURE__ */ jsx(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\nexport {\n Portal,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.suppressOthers = exports.supportsInert = exports.inertOthers = exports.hideOthers = void 0;\nvar getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nvar hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10\n // and script elements, as they have no impact on accessibility.\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\nexports.hideOthers = hideOthers;\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nvar inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\nexports.inertOthers = inertOthers;\n/**\n * @returns if current browser supports inert\n */\nvar supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\nexports.supportsInert = supportsInert;\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nvar suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return ((0, exports.supportsInert)() ? exports.inertOthers : exports.hideOthers)(originalTarget, parentNode, markerName);\n};\nexports.suppressOthers = suppressOthers;\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.removedBarSizeVariable = exports.noScrollbarsClassName = exports.fullWidthClassName = exports.zeroRightClassName = void 0;\nexports.zeroRightClassName = 'right-scroll-bar-position';\nexports.fullWidthClassName = 'width-before-scroll-bar';\nexports.noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexports.removedBarSizeVariable = '--removed-body-scroll-bar-size';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.assignRef = void 0;\n/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nfunction assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\nexports.assignRef = assignRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useCallbackRef = void 0;\nvar react_1 = require(\"react\");\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nfunction useCallbackRef(initialValue, callback) {\n var ref = (0, react_1.useState)(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\nexports.useCallbackRef = useCallbackRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createCallbackRef = void 0;\n/**\n * creates a Ref object with on change callback\n * @param callback\n * @returns {RefObject}\n *\n * @see {@link useCallbackRef}\n * @see https://reactjs.org/docs/refs-and-the-dom.html#creating-refs\n */\nfunction createCallbackRef(callback) {\n var current = null;\n return {\n get current() {\n return current;\n },\n set current(value) {\n var last = current;\n if (last !== value) {\n current = value;\n callback(value, last);\n }\n },\n };\n}\nexports.createCallbackRef = createCallbackRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mergeRefs = void 0;\nvar assignRef_1 = require(\"./assignRef\");\nvar createRef_1 = require(\"./createRef\");\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link useMergeRefs} to be used in ReactComponents\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = mergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nfunction mergeRefs(refs) {\n return (0, createRef_1.createCallbackRef)(function (newValue) { return refs.forEach(function (ref) { return (0, assignRef_1.assignRef)(ref, newValue); }); });\n}\nexports.mergeRefs = mergeRefs;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useMergeRefs = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar assignRef_1 = require(\"./assignRef\");\nvar useRef_1 = require(\"./useRef\");\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nvar currentValues = new WeakMap();\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return <div ref={domRef}>...</div>\n * }\n */\nfunction useMergeRefs(refs, defaultValue) {\n var callbackRef = (0, useRef_1.useCallbackRef)(defaultValue || null, function (newValue) {\n return refs.forEach(function (ref) { return (0, assignRef_1.assignRef)(ref, newValue); });\n });\n // handle refs changes - added or removed\n useIsomorphicLayoutEffect(function () {\n var oldValue = currentValues.get(callbackRef);\n if (oldValue) {\n var prevRefs_1 = new Set(oldValue);\n var nextRefs_1 = new Set(refs);\n var current_1 = callbackRef.current;\n prevRefs_1.forEach(function (ref) {\n if (!nextRefs_1.has(ref)) {\n (0, assignRef_1.assignRef)(ref, null);\n }\n });\n nextRefs_1.forEach(function (ref) {\n if (!prevRefs_1.has(ref)) {\n (0, assignRef_1.assignRef)(ref, current_1);\n }\n });\n }\n currentValues.set(callbackRef, refs);\n }, [refs]);\n return callbackRef;\n}\nexports.useMergeRefs = useMergeRefs;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useTransformRef = void 0;\nvar assignRef_1 = require(\"./assignRef\");\nvar useRef_1 = require(\"./useRef\");\n/**\n * Create a _lense_ on Ref, making it possible to transform ref value\n * @param {ReactRef} ref\n * @param {Function} transformer. 👉 Ref would be __NOT updated__ on `transformer` update.\n * @returns {RefObject}\n *\n * @see https://github.com/theKashey/use-callback-ref#usetransformref-to-replace-reactuseimperativehandle\n * @example\n *\n * const ResizableWithRef = forwardRef((props, ref) =>\n * <Resizable {...props} ref={useTransformRef(ref, i => i ? i.resizable : null)}/>\n * );\n */\nfunction useTransformRef(ref, transformer) {\n return (0, useRef_1.useCallbackRef)(null, function (value) { return (0, assignRef_1.assignRef)(ref, transformer(value)); });\n}\nexports.useTransformRef = useTransformRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.transformRef = void 0;\nvar assignRef_1 = require(\"./assignRef\");\nvar createRef_1 = require(\"./createRef\");\n/**\n * Transforms one ref to another\n * @example\n * ```tsx\n * const ResizableWithRef = forwardRef((props, ref) =>\n * <Resizable {...props} ref={transformRef(ref, i => i ? i.resizable : null)}/>\n * );\n * ```\n */\nfunction transformRef(ref, transformer) {\n return (0, createRef_1.createCallbackRef)(function (value) { return (0, assignRef_1.assignRef)(ref, transformer(value)); });\n}\nexports.transformRef = transformRef;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useRefToCallback = exports.refToCallback = void 0;\n/**\n * Unmemoized version of {@link useRefToCallback}\n * @see {@link useRefToCallback}\n * @param ref\n */\nfunction refToCallback(ref) {\n return function (newValue) {\n if (typeof ref === 'function') {\n ref(newValue);\n }\n else if (ref) {\n ref.current = newValue;\n }\n };\n}\nexports.refToCallback = refToCallback;\nvar nullCallback = function () { return null; };\n// lets maintain a weak ref to, well, ref :)\n// not using `kashe` to keep this package small\nvar weakMem = new WeakMap();\nvar weakMemoize = function (ref) {\n var usedRef = ref || nullCallback;\n var storedRef = weakMem.get(usedRef);\n if (storedRef) {\n return storedRef;\n }\n var cb = refToCallback(usedRef);\n weakMem.set(usedRef, cb);\n return cb;\n};\n/**\n * Transforms a given `ref` into `callback`.\n *\n * To transform `callback` into ref use {@link useCallbackRef|useCallbackRef(undefined, callback)}\n *\n * @param {ReactRef} ref\n * @returns {Function}\n *\n * @see https://github.com/theKashey/use-callback-ref#reftocallback\n *\n * @example\n * const ref = useRef(0);\n * const setRef = useRefToCallback(ref);\n * 👉 setRef(10);\n * ✅ ref.current === 10\n */\nfunction useRefToCallback(ref) {\n return weakMemoize(ref);\n}\nexports.useRefToCallback = useRefToCallback;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useRefToCallback = exports.refToCallback = exports.transformRef = exports.useTransformRef = exports.useMergeRefs = exports.mergeRefs = exports.createCallbackRef = exports.useCallbackRef = exports.assignRef = void 0;\nvar assignRef_1 = require(\"./assignRef\");\nObject.defineProperty(exports, \"assignRef\", { enumerable: true, get: function () { return assignRef_1.assignRef; } });\n// callback ref\nvar useRef_1 = require(\"./useRef\");\nObject.defineProperty(exports, \"useCallbackRef\", { enumerable: true, get: function () { return useRef_1.useCallbackRef; } });\nvar createRef_1 = require(\"./createRef\");\nObject.defineProperty(exports, \"createCallbackRef\", { enumerable: true, get: function () { return createRef_1.createCallbackRef; } });\n// merge ref\nvar mergeRef_1 = require(\"./mergeRef\");\nObject.defineProperty(exports, \"mergeRefs\", { enumerable: true, get: function () { return mergeRef_1.mergeRefs; } });\nvar useMergeRef_1 = require(\"./useMergeRef\");\nObject.defineProperty(exports, \"useMergeRefs\", { enumerable: true, get: function () { return useMergeRef_1.useMergeRefs; } });\n// transform ref\nvar useTransformRef_1 = require(\"./useTransformRef\");\nObject.defineProperty(exports, \"useTransformRef\", { enumerable: true, get: function () { return useTransformRef_1.useTransformRef; } });\nvar transformRef_1 = require(\"./transformRef\");\nObject.defineProperty(exports, \"transformRef\", { enumerable: true, get: function () { return transformRef_1.transformRef; } });\n// refToCallback\nvar refToCallback_1 = require(\"./refToCallback\");\nObject.defineProperty(exports, \"refToCallback\", { enumerable: true, get: function () { return refToCallback_1.refToCallback; } });\nObject.defineProperty(exports, \"useRefToCallback\", { enumerable: true, get: function () { return refToCallback_1.useRefToCallback; } });\n","// Only Node.JS has a process variable that is of [[Class]] process\nmodule.exports.isNode = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.env = void 0;\nvar detect_node_es_1 = require(\"detect-node-es\");\nexports.env = {\n isNode: detect_node_es_1.isNode,\n forceCache: false,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useSidecar = void 0;\nvar react_1 = require(\"react\");\nvar env_1 = require(\"./env\");\nvar cache = new WeakMap();\nvar NO_OPTIONS = {};\nfunction useSidecar(importer, effect) {\n var options = (effect && effect.options) || NO_OPTIONS;\n if (env_1.env.isNode && !options.ssr) {\n return [null, null];\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useRealSidecar(importer, effect);\n}\nexports.useSidecar = useSidecar;\nfunction useRealSidecar(importer, effect) {\n var options = (effect && effect.options) || NO_OPTIONS;\n var couldUseCache = env_1.env.forceCache || (env_1.env.isNode && !!options.ssr) || !options.async;\n var _a = (0, react_1.useState)(couldUseCache ? function () { return cache.get(importer); } : undefined), Car = _a[0], setCar = _a[1];\n var _b = (0, react_1.useState)(null), error = _b[0], setError = _b[1];\n (0, react_1.useEffect)(function () {\n if (!Car) {\n importer().then(function (car) {\n var resolved = effect ? effect.read() : car.default || car;\n if (!resolved) {\n console.error('Sidecar error: with importer', importer);\n var error_1;\n if (effect) {\n console.error('Sidecar error: with medium', effect);\n error_1 = new Error('Sidecar medium was not found');\n }\n else {\n error_1 = new Error('Sidecar was not found in exports');\n }\n setError(function () { return error_1; });\n throw error_1;\n }\n cache.set(importer, resolved);\n setCar(function () { return resolved; });\n }, function (e) { return setError(function () { return e; }); });\n }\n }, []);\n return [Car, error];\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sidecar = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar hook_1 = require(\"./hook\");\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction sidecar(importer, errorComponent) {\n var ErrorCase = function () { return errorComponent; };\n return function Sidecar(props) {\n var _a = (0, hook_1.useSidecar)(importer, props.sideCar), Car = _a[0], error = _a[1];\n if (error && errorComponent) {\n return ErrorCase;\n }\n // @ts-expect-error type shenanigans\n return Car ? React.createElement(Car, tslib_1.__assign({}, props)) : null;\n };\n}\nexports.sidecar = sidecar;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setConfig = exports.config = void 0;\nexports.config = {\n onError: function (e) { return console.error(e); },\n};\nvar setConfig = function (conf) {\n Object.assign(exports.config, conf);\n};\nexports.setConfig = setConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createSidecarMedium = exports.createMedium = void 0;\nvar tslib_1 = require(\"tslib\");\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nfunction createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\nexports.createMedium = createMedium;\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = tslib_1.__assign({ async: true, ssr: false }, options);\n return medium;\n}\nexports.createSidecarMedium = createSidecarMedium;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.renderCar = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar react_1 = require(\"react\");\nfunction renderCar(WrappedComponent, defaults) {\n function State(_a) {\n var stateRef = _a.stateRef, props = _a.props;\n var renderTarget = (0, react_1.useCallback)(function SideTarget() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n (0, react_1.useLayoutEffect)(function () {\n stateRef.current(args);\n });\n return null;\n }, []);\n // @ts-ignore\n return React.createElement(WrappedComponent, tslib_1.__assign({}, props, { children: renderTarget }));\n }\n var Children = React.memo(function (_a) {\n var stateRef = _a.stateRef, defaultState = _a.defaultState, children = _a.children;\n var _b = (0, react_1.useState)(defaultState.current), state = _b[0], setState = _b[1];\n (0, react_1.useEffect)(function () {\n stateRef.current = setState;\n }, []);\n return children.apply(void 0, state);\n }, function () { return true; });\n return function Combiner(props) {\n var defaultState = React.useRef(defaults(props));\n var ref = React.useRef(function (state) { return (defaultState.current = state); });\n return (React.createElement(React.Fragment, null,\n React.createElement(State, { stateRef: ref, props: props }),\n React.createElement(Children, { stateRef: ref, defaultState: defaultState, children: props.children })));\n };\n}\nexports.renderCar = renderCar;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exportSidecar = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = tslib_1.__rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, tslib_1.__assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nfunction exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\nexports.exportSidecar = exportSidecar;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.exportSidecar = exports.renderCar = exports.createSidecarMedium = exports.createMedium = exports.setConfig = exports.useSidecar = exports.sidecar = void 0;\nvar hoc_1 = require(\"./hoc\");\nObject.defineProperty(exports, \"sidecar\", { enumerable: true, get: function () { return hoc_1.sidecar; } });\nvar hook_1 = require(\"./hook\");\nObject.defineProperty(exports, \"useSidecar\", { enumerable: true, get: function () { return hook_1.useSidecar; } });\nvar config_1 = require(\"./config\");\nObject.defineProperty(exports, \"setConfig\", { enumerable: true, get: function () { return config_1.setConfig; } });\nvar medium_1 = require(\"./medium\");\nObject.defineProperty(exports, \"createMedium\", { enumerable: true, get: function () { return medium_1.createMedium; } });\nObject.defineProperty(exports, \"createSidecarMedium\", { enumerable: true, get: function () { return medium_1.createSidecarMedium; } });\nvar renderProp_1 = require(\"./renderProp\");\nObject.defineProperty(exports, \"renderCar\", { enumerable: true, get: function () { return renderProp_1.renderCar; } });\nvar exports_1 = require(\"./exports\");\nObject.defineProperty(exports, \"exportSidecar\", { enumerable: true, get: function () { return exports_1.exportSidecar; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.effectCar = void 0;\nvar use_sidecar_1 = require(\"use-sidecar\");\nexports.effectCar = (0, use_sidecar_1.createSidecarMedium)();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RemoveScroll = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar constants_1 = require(\"react-remove-scroll-bar/constants\");\nvar use_callback_ref_1 = require(\"use-callback-ref\");\nvar medium_1 = require(\"./medium\");\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = tslib_1.__rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noRelative\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = (0, use_callback_ref_1.useMergeRefs)([ref, parentRef]);\n var containerProps = tslib_1.__assign(tslib_1.__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: medium_1.effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),\n forwardProps ? (React.cloneElement(React.Children.only(children), tslib_1.__assign(tslib_1.__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, tslib_1.__assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nexports.RemoveScroll = RemoveScroll;\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: constants_1.fullWidthClassName,\n zeroRight: constants_1.zeroRightClassName,\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar currentNonce;\nexports.setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexports.getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stylesheetSingleton = void 0;\nvar get_nonce_1 = require(\"get-nonce\");\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = (0, get_nonce_1.getNonce)();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nvar stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\nexports.stylesheetSingleton = stylesheetSingleton;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.styleHookSingleton = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar singleton_1 = require(\"./singleton\");\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nvar styleHookSingleton = function () {\n var sheet = (0, singleton_1.stylesheetSingleton)();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\nexports.styleHookSingleton = styleHookSingleton;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.styleSingleton = void 0;\nvar hook_1 = require(\"./hook\");\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nvar styleSingleton = function () {\n var useStyle = (0, hook_1.styleHookSingleton)();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\nexports.styleSingleton = styleSingleton;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.styleHookSingleton = exports.stylesheetSingleton = exports.styleSingleton = void 0;\nvar component_1 = require(\"./component\");\nObject.defineProperty(exports, \"styleSingleton\", { enumerable: true, get: function () { return component_1.styleSingleton; } });\nvar singleton_1 = require(\"./singleton\");\nObject.defineProperty(exports, \"stylesheetSingleton\", { enumerable: true, get: function () { return singleton_1.stylesheetSingleton; } });\nvar hook_1 = require(\"./hook\");\nObject.defineProperty(exports, \"styleHookSingleton\", { enumerable: true, get: function () { return hook_1.styleHookSingleton; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getGapWidth = exports.zeroGap = void 0;\nexports.zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nvar getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return exports.zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\nexports.getGapWidth = getGapWidth;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RemoveScrollBar = exports.useLockAttribute = exports.lockAttribute = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar react_style_singleton_1 = require(\"react-style-singleton\");\nvar constants_1 = require(\"./constants\");\nvar utils_1 = require(\"./utils\");\nvar Style = (0, react_style_singleton_1.styleSingleton)();\nexports.lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(constants_1.noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(exports.lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(constants_1.zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(constants_1.fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(constants_1.zeroRightClassName, \" .\").concat(constants_1.zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(constants_1.fullWidthClassName, \" .\").concat(constants_1.fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(exports.lockAttribute, \"] {\\n \").concat(constants_1.removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(exports.lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nvar useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(exports.lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(exports.lockAttribute);\n }\n else {\n document.body.setAttribute(exports.lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\nexports.useLockAttribute = useLockAttribute;\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nvar RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n (0, exports.useLockAttribute)();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return (0, utils_1.getGapWidth)(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\nexports.RemoveScrollBar = RemoveScrollBar;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getGapWidth = exports.removedBarSizeVariable = exports.noScrollbarsClassName = exports.fullWidthClassName = exports.zeroRightClassName = exports.RemoveScrollBar = void 0;\nvar component_1 = require(\"./component\");\nObject.defineProperty(exports, \"RemoveScrollBar\", { enumerable: true, get: function () { return component_1.RemoveScrollBar; } });\nvar constants_1 = require(\"./constants\");\nObject.defineProperty(exports, \"zeroRightClassName\", { enumerable: true, get: function () { return constants_1.zeroRightClassName; } });\nObject.defineProperty(exports, \"fullWidthClassName\", { enumerable: true, get: function () { return constants_1.fullWidthClassName; } });\nObject.defineProperty(exports, \"noScrollbarsClassName\", { enumerable: true, get: function () { return constants_1.noScrollbarsClassName; } });\nObject.defineProperty(exports, \"removedBarSizeVariable\", { enumerable: true, get: function () { return constants_1.removedBarSizeVariable; } });\nvar utils_1 = require(\"./utils\");\nObject.defineProperty(exports, \"getGapWidth\", { enumerable: true, get: function () { return utils_1.getGapWidth; } });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.nonPassive = void 0;\nvar passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexports.nonPassive = passiveSupported ? { passive: false } : false;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.handleScroll = exports.locationCouldBeScrolled = void 0;\nvar alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nvar locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nexports.locationCouldBeScrolled = locationCouldBeScrolled;\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nvar handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n if (!target) {\n break;\n }\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n var parent_1 = target.parentNode;\n // we will \"bubble\" from ShadowDom in case we are, or just to the parent in normal case\n // this is the same logic used in focus-lock\n target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\nexports.handleScroll = handleScroll;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RemoveScrollSideCar = exports.getDeltaXY = exports.getTouchXY = void 0;\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar react_remove_scroll_bar_1 = require(\"react-remove-scroll-bar\");\nvar react_style_singleton_1 = require(\"react-style-singleton\");\nvar aggresiveCapture_1 = require(\"./aggresiveCapture\");\nvar handleScroll_1 = require(\"./handleScroll\");\nvar getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexports.getTouchXY = getTouchXY;\nvar getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nexports.getDeltaXY = getDeltaXY;\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nfunction RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(react_style_singleton_1.styleSingleton)[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = tslib_1.__spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = (0, exports.getTouchXY)(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n // allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target\n var selection = window.getSelection();\n var anchorNode = selection && selection.anchorNode;\n var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;\n if (isTouchingSelection) {\n return false;\n }\n var canBeScrolledInMainDirection = (0, handleScroll_1.locationCouldBeScrolled)(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = (0, handleScroll_1.locationCouldBeScrolled)(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return (0, handleScroll_1.handleScroll)(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? (0, exports.getDeltaXY)(event) : (0, exports.getTouchXY)(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = (0, exports.getTouchXY)(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, (0, exports.getDeltaXY)(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, (0, exports.getTouchXY)(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, aggresiveCapture_1.nonPassive);\n document.addEventListener('touchmove', shouldPrevent, aggresiveCapture_1.nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, aggresiveCapture_1.nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, aggresiveCapture_1.nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, aggresiveCapture_1.nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, aggresiveCapture_1.nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(react_remove_scroll_bar_1.RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));\n}\nexports.RemoveScrollSideCar = RemoveScrollSideCar;\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar use_sidecar_1 = require(\"use-sidecar\");\nvar SideEffect_1 = require(\"./SideEffect\");\nvar medium_1 = require(\"./medium\");\nexports.default = (0, use_sidecar_1.exportSidecar)(medium_1.effectCar, SideEffect_1.RemoveScrollSideCar);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar tslib_1 = require(\"tslib\");\nvar React = tslib_1.__importStar(require(\"react\"));\nvar UI_1 = require(\"./UI\");\nvar sidecar_1 = tslib_1.__importDefault(require(\"./sidecar\"));\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(UI_1.RemoveScroll, tslib_1.__assign({}, props, { ref: ref, sideCar: sidecar_1.default }))); });\nReactRemoveScroll.classNames = UI_1.RemoveScroll.classNames;\nexports.default = ReactRemoveScroll;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RemoveScroll = void 0;\nvar tslib_1 = require(\"tslib\");\nvar Combination_1 = tslib_1.__importDefault(require(\"./Combination\"));\nexports.RemoveScroll = Combination_1.default;\n","\"use client\";\n\n// src/dialog.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContext, createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { hideOthers } from \"aria-hidden\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { Fragment, jsx, jsxs } from \"react/jsx-runtime\";\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = React.useRef(null);\n const contentRef = React.useRef(null);\n const [open, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen ?? false,\n onChange: onOpenChange,\n caller: DIALOG_NAME\n });\n return /* @__PURE__ */ jsx(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: useId(),\n titleId: useId(),\n descriptionId: useId(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar Slot = createSlot(\"DialogOverlay.RemoveScroll\");\nvar DialogOverlayImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n useFocusGuards();\n return /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ jsxs(Fragment, { children: [\n /* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = createContext(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n React.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n React.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\nexport {\n Close,\n Content,\n Description,\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n WarningProvider,\n createDialogScope\n};\n//# sourceMappingURL=index.mjs.map\n","// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\nvar REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nvar use = React[\" use \".trim().toString()];\nfunction isPromiseLike(value) {\n return typeof value === \"object\" && value !== null && \"then\" in value;\n}\nfunction isLazyComponent(element) {\n return element != null && typeof element === \"object\" && \"$$typeof\" in element && element.$$typeof === REACT_LAZY_TYPE && \"_payload\" in element && isPromiseLike(element._payload);\n}\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n let { children, ...slotProps } = props;\n if (isLazyComponent(children) && typeof use === \"function\") {\n children = use(children._payload);\n }\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n","// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n","// src/visually-hidden.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar VISUALLY_HIDDEN_STYLES = Object.freeze({\n // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss\n position: \"absolute\",\n border: 0,\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0, 0, 0, 0)\",\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n});\nvar NAME = \"VisuallyHidden\";\nvar VisuallyHidden = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(\n Primitive.span,\n {\n ...props,\n ref: forwardedRef,\n style: { ...VISUALLY_HIDDEN_STYLES, ...props.style }\n }\n );\n }\n);\nVisuallyHidden.displayName = NAME;\nvar Root = VisuallyHidden;\nexport {\n Root,\n VISUALLY_HIDDEN_STYLES,\n VisuallyHidden\n};\n//# sourceMappingURL=index.mjs.map\n","import { t as Icon } from \"./icon-C4QOpsdI.js\";\nimport { forwardRef, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from \"react\";\nimport { twJoin, twMerge } from \"tailwind-merge\";\nimport { Fragment as Fragment$1, jsx, jsxs } from \"react/jsx-runtime\";\nimport { Content, Item, Label, Portal, Root, Trigger } from \"@radix-ui/react-dropdown-menu\";\nimport { Content as Content$1, Description, Overlay, Portal as Portal$1, Root as Root$1, Title } from \"@radix-ui/react-dialog\";\nimport { Root as Root$2 } from \"@radix-ui/react-visually-hidden\";\nimport ReactDOM from \"react-dom\";\n//#region src/powerhouse/components/button/button.tsx\nconst PowerhouseButton = /* @__PURE__ */ forwardRef(function PowerhouseButton(props, ref) {\n\tconst { color = \"dark\", size = \"medium\", className = \"\", children, icon, iconPosition = \"left\", ...delegatedProps } = props;\n\treturn /* @__PURE__ */ jsxs(\"button\", {\n\t\tclassName: twMerge(\"flex items-center justify-center gap-2 border border-none transition outline-none disabled:disabled-effect\", twJoin({\n\t\t\tlight: \"bg-secondary text-foreground hover:hover-effect active:active-effect disabled:disabled-effect\",\n\t\t\tdark: \"bg-primary text-primary-foreground hover:hover-effect active:active-effect disabled:disabled-effect\",\n\t\t\tred: \"bg-destructive text-destructive-foreground hover:hover-effect active:active-effect disabled:disabled-effect disabled:opacity-100\",\n\t\t\tblue: \"bg-info text-info-foreground hover:hover-effect active:active-effect disabled:disabled-effect disabled:opacity-100\"\n\t\t}[color], {\n\t\t\tsmall: \"px-2 py-1.5 text-xs rounded-md font-medium\",\n\t\t\tmedium: \"px-6 py-3 text-base rounded-xl font-semibold tracking-wide\"\n\t\t}[size]), className),\n\t\tref,\n\t\t...delegatedProps,\n\t\tchildren: [\n\t\t\ticonPosition === \"left\" && icon,\n\t\t\tchildren,\n\t\t\ticonPosition === \"right\" && icon\n\t\t]\n\t});\n});\n//#endregion\n//#region src/powerhouse/components/dropdown-menu/dropdown-menu.tsx\nconst DropdownMenu = Root;\nconst DropdownMenuTrigger = Trigger;\nconst DropdownMenuContent = /* @__PURE__ */ forwardRef(function DropdownMenuContent({ children, ...delegatedProps }, forwardedRef) {\n\treturn /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Content, {\n\t\t...delegatedProps,\n\t\tref: forwardedRef,\n\t\tchildren\n\t}) });\n});\nconst DropdownMenuLabel = Label;\nconst DropdownMenuItem = Item;\n//#endregion\n//#region src/powerhouse/components/modal/modal.tsx\nfunction Modal(props) {\n\tconst { title, open, onOpenChange, contentProps, overlayProps, children, ...delegated } = props;\n\treturn /* @__PURE__ */ jsx(Root$1, {\n\t\tdefaultOpen: open,\n\t\tonOpenChange,\n\t\topen,\n\t\tchildren: /* @__PURE__ */ jsx(Portal$1, { children: /* @__PURE__ */ jsx(Overlay, {\n\t\t\t...overlayProps,\n\t\t\tclassName: twMerge(\"fixed inset-0 grid place-items-center overflow-y-auto bg-background/50 data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in\", overlayProps?.className),\n\t\t\tchildren: /* @__PURE__ */ jsxs(Content$1, {\n\t\t\t\t...delegated,\n\t\t\t\t...contentProps,\n\t\t\t\tclassName: twMerge(\"overflow-hidden rounded-3xl bg-background shadow-modal data-[state=closed]:animate-zoom-out data-[state=open]:animate-zoom-in dark:shadow-modal-dark\", contentProps?.className),\n\t\t\t\tchildren: [/* @__PURE__ */ jsxs(Root$2, { children: [/* @__PURE__ */ jsx(Title, { children: title || \"Modal\" }), /* @__PURE__ */ jsx(Description, { children: title || \"Modal\" })] }), children]\n\t\t\t})\n\t\t}) })\n\t});\n}\n//#endregion\n//#region src/powerhouse/components/package-animation/package-animation.tsx\nconst FRAME_DURATION = 60;\nconst HOLD_LAST_FRAME = 800;\nconst frames = [\n\t(color) => /* @__PURE__ */ jsxs(\"svg\", {\n\t\twidth: \"32\",\n\t\theight: \"32\",\n\t\tviewBox: \"0 0 32 32\",\n\t\tfill: \"none\",\n\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M15.3998 27.782C15.6431 27.9224 15.919 27.9963 16.1998 27.9963C16.4807 27.9963 16.7566 27.9224 16.9998 27.782L22.5997 24.5821C22.8427 24.4418 23.0445 24.24 23.1849 23.9971C23.3253 23.7542 23.3994 23.4787 23.3996 23.1981V16.7982C23.3994 16.5177 23.3253 16.2421 23.1849 15.9992C23.0445 15.7563 22.8427 15.5546 22.5997 15.4143L16.9998 12.2144C16.7566 12.0739 16.4807 12 16.1998 12C15.919 12 15.6431 12.0739 15.3998 12.2144L9.79998 15.4143C9.557 15.5546 9.35518 15.7563 9.21476 15.9992C9.07435 16.2421 9.00029 16.5177 9 16.7982V23.1981C9.00029 23.4787 9.07435 23.7542 9.21476 23.9971C9.35518 24.24 9.557 24.4418 9.79998 24.5821L15.3999 27.782Z\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.1997 27.9979V19.998\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M9.23193 15.9985L16.1998 19.9984L23.1676 15.9985\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M12.6001 13.8145L19.7999 17.9344\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t})\n\t\t]\n\t}),\n\t(color) => /* @__PURE__ */ jsxs(\"svg\", {\n\t\twidth: \"32\",\n\t\theight: \"32\",\n\t\tviewBox: \"0 0 32 32\",\n\t\tfill: \"none\",\n\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M19.7996 13.8145L16.8801 15.5\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M12.9998 14L18.9998 17.5\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.1998 27.9963C16.4807 27.9963 16.7566 27.9224 16.9998 27.782L22.5997 24.5821C22.8427 24.4418 23.0445 24.24 23.1849 23.9971C23.3253 23.7542 23.3994 23.4787 23.3997 23.1981V16.7982C23.3994 16.5177 23.3253 16.2421 23.1849 15.9992C23.0445 15.7563 22.8427 15.5546 22.5997 15.4143L16.9998 12.2144C16.7566 12.0739 16.4807 12 16.1998 12C15.919 12 15.6431 12.0739 15.3999 12.2144L9.79999 15.4143C9.55701 15.5546 9 16 9 16.5L9.00001 20.5V23.1981C9.0003 23.4787 9.07436 23.7542 9.21477 23.9971C9.35518 24.24 9.55701 24.4418 9.79999 24.5821L15.3999 27.782C15.6431 27.9224 15.919 27.9963 16.1998 27.9963Z\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.1997 27.9979V19.998\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M23.1677 15.9985L16.1999 19.9984L9.23207 15.9985\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.001 11.8061V9.76617C16.001 8.98888 16.8489 8.50877 17.5155 8.90867L22.4298 11.8572C23.0322 12.2186 23.4008 12.8697 23.4008 13.5722V16.8833\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\"\n\t\t\t})\n\t\t]\n\t}),\n\t(color) => /* @__PURE__ */ jsxs(\"svg\", {\n\t\twidth: \"32\",\n\t\theight: \"32\",\n\t\tviewBox: \"0 0 32 32\",\n\t\tfill: \"none\",\n\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M9.00001 20.5V23.1981C9.0003 23.4787 9.07436 23.7542 9.21477 23.9971C9.35518 24.24 9.55701 24.4418 9.79999 24.5821L15.3999 27.782C15.6431 27.9224 15.919 27.9963 16.1998 27.9963C16.4807 27.9963 16.7566 27.9224 16.9998 27.782L22.5997 24.5821C22.8427 24.4418 23.0445 24.24 23.1849 23.9971C23.3253 23.7542 23.3994 23.4787 23.3997 23.1981V16.7982C23.3994 16.5177 23.3253 16.2421 23.1849 15.9992C23.0445 15.7563 22.8427 15.5546 22.5997 15.4143L16.9998 12.2144C16.7566 12.0739 16.4807 12 16.1998 12C15.919 12 15.6431 12.0739 15.3999 12.2144\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.2 27.9979V19.998\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M23.1677 15.9985L16.1999 19.9984L9.23207 15.9985\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M19.7998 13.8145L16.0143 16\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.5002 19.7472L24.1167 15.3498C24.385 15.1982 24.6081 14.978 24.7634 14.7118C24.9187 14.4456 25.0005 14.143 25.0005 13.8348C25.0005 13.5266 24.9187 13.224 24.7634 12.9578C24.6081 12.6916 24.385 12.4715 24.1167 12.3198L20.3291 10.1915C20.1045 10.0659 19.8515 10 19.5941 10C19.3368 10 19.0837 10.0659 18.8591 10.1915L12.5487 13.8348\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M9.00024 20.8833V13.7662C9.00024 12.9889 9.84821 12.5088 10.5147 12.9087L15.2265 15.7357C15.8289 16.0971 16.1975 16.7481 16.1975 17.4507V20.7618\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\"\n\t\t\t})\n\t\t]\n\t}),\n\t(color) => /* @__PURE__ */ jsxs(\"svg\", {\n\t\twidth: \"32\",\n\t\theight: \"32\",\n\t\tviewBox: \"0 0 32 32\",\n\t\tfill: \"none\",\n\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M9.79998 15.4143L15.3998 12.2144C15.6431 12.0739 15.919 12 16.1998 12C16.4807 12 16.7566 12.0739 16.9998 12.2144L22.5997 15.4143C22.8427 15.5546 23.0445 15.7563 23.1849 15.9992C23.3253 16.2421 23.3994 16.5177 23.3996 16.7982V23.1981C23.3994 23.4787 23.3253 23.7542 23.1849 23.9971C23.0445 24.24 22.8427 24.4418 22.5997 24.5821L16.9998 27.782C16.7566 27.9224 16.4807 27.9963 16.1998 27.9963C15.919 27.9963 15.6431 27.9224 15.3998 27.782L9.79998 24.5821C9.557 24.4418 9.35518 24.24 9.21476 23.9971C9.07435 23.7542 9.00029 23.4787 9 23.1981V19.9982\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.1997 27.9979V19.998\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M9.23193 15.9985L16.1998 19.9984L23.1676 15.9985\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M19.0996 14L12.5997 17.7527\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M18.8589 10.0099C19.0835 9.8843 19.3365 9.81836 19.5939 9.81836C19.8512 9.81836 20.1042 9.8843 20.3289 10.0099L24.1165 12.1381C24.3847 12.2898 24.6079 12.51 24.7632 12.7762C24.9185 13.0424 25.0003 13.345 25.0003 13.6532C25.0003 13.9613 24.9185 14.264 24.7632 14.5301C24.6079 14.7963 24.3847 15.0165 24.1165 15.1682L13.1324 21.3546C12.9071 21.4831 12.6522 21.5506 12.3929 21.5506C12.1335 21.5506 11.8787 21.4831 11.6534 21.3546L7.88378 19.2263C7.61553 19.0746 7.39237 18.8544 7.23709 18.5883C7.08182 18.3221 7 18.0194 7 17.7113C7 17.4031 7.08182 17.1005 7.23709 16.8343C7.39237 16.5681 7.61553 16.3479 7.88378 16.1963L18.8589 10.0099Z\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.2463 11.1364L16.2179 8.7419C16.2087 7.96996 15.3654 7.49911 14.7034 7.89629L9.98488 10.7274C9.37494 11.0933 9.00526 11.7557 9.01401 12.467L9.04907 15.3181\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\"\n\t\t\t})\n\t\t]\n\t}),\n\t(color) => /* @__PURE__ */ jsxs(\"svg\", {\n\t\twidth: \"32\",\n\t\theight: \"32\",\n\t\tviewBox: \"0 0 32 32\",\n\t\tfill: \"none\",\n\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M23.1849 15.9993C23.3253 16.2422 23.3994 16.5177 23.3996 16.7983V23.1982C23.3994 23.4787 23.3253 23.7543 23.1849 23.9972C23.0445 24.2401 22.8427 24.4418 22.5997 24.5821L16.9998 27.782C16.7566 27.9225 16.4807 27.9964 16.1998 27.9964C15.919 27.9964 15.6431 27.9225 15.3998 27.782L9.79998 24.5821C9.557 24.4418 9.35518 24.2401 9.21476 23.9972C9.07435 23.7543 9.00029 23.4787 9 23.1982V20.5001\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.1997 27.9979V19.998\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M18.8589 10.2045C19.0835 10.0789 19.3365 10.0129 19.5939 10.0129C19.8512 10.0129 20.1042 10.0789 20.3289 10.2045L24.1165 12.3327C24.3847 12.4844 24.6079 12.7046 24.7632 12.9708C24.9185 13.2369 25.0003 13.5396 25.0003 13.8477C25.0003 14.1559 24.9185 14.4585 24.7632 14.7247C24.6079 14.9909 24.3847 15.2111 24.1165 15.3628L13.1324 21.5491C12.9071 21.6776 12.6522 21.7452 12.3929 21.7452C12.1335 21.7452 11.8787 21.6776 11.6534 21.5491L7.88378 19.4209C7.61553 19.2692 7.39237 19.049 7.23709 18.7828C7.08182 18.5167 7 18.214 7 17.9059C7 17.5977 7.08182 17.2951 7.23709 17.0289C7.39237 16.7627 7.61553 16.5425 7.88378 16.3908L18.8589 10.2045Z\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M18.8649 13.5L13.1414 10.1956C12.9176 10.0674 12.6642 10 12.4064 10C12.1485 10 11.8952 10.0674 11.6714 10.1956L7.88378 12.3328C7.61553 12.4845 7.39237 12.7047 7.23709 12.9709C7.08182 13.2371 7 13.5397 7 13.8479C7 14.156 7.08182 14.4587 7.23709 14.7248C7.39237 14.991 7.61553 15.2112 7.88378 15.3629L16 20\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M23.1972 15.5L23.1972 12.7662C23.1972 11.9889 22.3493 11.5088 21.6827 11.9087L16.971 14.7357C16.3686 15.0971 16 15.7482 16 16.4507L16.0001 19.5\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\"\n\t\t\t})\n\t\t]\n\t}),\n\t(color) => /* @__PURE__ */ jsxs(\"svg\", {\n\t\twidth: \"32\",\n\t\theight: \"32\",\n\t\tviewBox: \"0 0 32 32\",\n\t\tfill: \"none\",\n\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M23.3996 20V23.1982C23.3994 23.4788 23.3253 23.7543 23.1849 23.9972C23.0445 24.2401 22.8427 24.4419 22.5997 24.5821L16.9998 27.7821C16.7566 27.9225 16.4807 27.9964 16.1998 27.9964C15.919 27.9964 15.6431 27.9225 15.3998 27.7821L9.79998 24.5821C9.557 24.4419 9.35518 24.2401 9.21476 23.9972C9.07435 23.7543 9.00029 23.4788 9 23.1982V20.5001\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.1997 27.9979V19.998\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M18.8589 10.2045C19.0835 10.0789 19.3365 10.0129 19.5939 10.0129C19.8512 10.0129 20.1042 10.0789 20.3289 10.2045L24.1165 12.3327C24.3847 12.4844 24.6079 12.7046 24.7632 12.9708C24.9185 13.2369 25.0003 13.5396 25.0003 13.8477C25.0003 14.1559 24.9185 14.4585 24.7632 14.7247C24.6079 14.9909 24.3847 15.2111 24.1165 15.3628L13.1324 21.5491C12.9071 21.6776 12.6522 21.7452 12.3929 21.7452C12.1335 21.7452 11.8787 21.6776 11.6534 21.5491L7.88378 19.4209C7.61553 19.2692 7.39237 19.049 7.23709 18.7828C7.08182 18.5167 7 18.214 7 17.9059C7 17.5977 7.08182 17.2951 7.23709 17.0289C7.39237 16.7627 7.61553 16.5425 7.88378 16.3908L18.8589 10.2045Z\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M24.1162 19.4209C24.3845 19.2693 24.6076 19.0491 24.7629 18.7829C24.9182 18.5167 25 18.2141 25 17.9059C25 17.5978 24.9182 17.2951 24.7629 17.029C24.6076 16.7628 24.3845 16.5426 24.1162 16.3909L13.1413 10.1955C12.9175 10.0674 12.6642 10 12.4063 10C12.1485 10 11.8951 10.0674 11.6713 10.1955L7.88377 12.3328C7.61552 12.4845 7.39236 12.7047 7.23709 12.9709C7.08182 13.237 7 13.5397 7 13.8478C7 14.156 7.08182 14.4586 7.23709 14.7248C7.39236 14.991 7.61552 15.2112 7.88377 15.3629L18.8677 21.5492C19.0914 21.6777 19.3448 21.7453 19.6027 21.7453C19.8606 21.7453 20.114 21.6777 20.3377 21.5492L24.1162 19.4209Z\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t})\n\t\t]\n\t}),\n\t(color) => /* @__PURE__ */ jsxs(\"svg\", {\n\t\twidth: \"32\",\n\t\theight: \"32\",\n\t\tviewBox: \"0 0 32 32\",\n\t\tfill: \"none\",\n\t\txmlns: \"http://www.w3.org/2000/svg\",\n\t\tchildren: [\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M23.3996 20V23.1982C23.3994 23.4788 23.3253 23.7543 23.1849 23.9972C23.0445 24.2401 22.8427 24.4419 22.5997 24.5821L16.9998 27.7821C16.7566 27.9225 16.4807 27.9964 16.1998 27.9964C15.919 27.9964 15.6431 27.9225 15.3998 27.7821L9.79998 24.5821C9.557 24.4419 9.35518 24.2401 9.21476 23.9972C9.07435 23.7543 9.00029 23.4788 9 23.1982V20.5001\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16.1997 27.9979V19.998\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.59996\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M18.8589 10.2045C19.0835 10.0789 19.3365 10.0129 19.5939 10.0129C19.8512 10.0129 20.1042 10.0789 20.3289 10.2045L24.1165 12.3327C24.3847 12.4844 24.6079 12.7046 24.7632 12.9708C24.9185 13.2369 25.0003 13.5396 25.0003 13.8477C25.0003 14.1559 24.9185 14.4585 24.7632 14.7247C24.6079 14.9909 24.3847 15.2111 24.1165 15.3628L13.1324 21.5491C12.9071 21.6776 12.6522 21.7452 12.3929 21.7452C12.1335 21.7452 11.8787 21.6776 11.6534 21.5491L7.88378 19.4209C7.61553 19.2692 7.39237 19.049 7.23709 18.7828C7.08182 18.5167 7 18.214 7 17.9059C7 17.5977 7.08182 17.2951 7.23709 17.0289C7.39237 16.7627 7.61553 16.5425 7.88378 16.3908L18.8589 10.2045Z\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M24.1162 19.4209C24.3845 19.2693 24.6076 19.0491 24.7629 18.7829C24.9182 18.5167 25 18.2141 25 17.9059C25 17.5978 24.9182 17.2951 24.7629 17.029C24.6076 16.7628 24.3845 16.5426 24.1162 16.3909L13.1413 10.1955C12.9175 10.0674 12.6642 10 12.4063 10C12.1485 10 11.8951 10.0674 11.6713 10.1955L7.88377 12.3328C7.61552 12.4845 7.39236 12.7047 7.23709 12.9709C7.08182 13.237 7 13.5397 7 13.8478C7 14.156 7.08182 14.4586 7.23709 14.7248C7.39236 14.991 7.61552 15.2112 7.88377 15.3629L18.8677 21.5492C19.0914 21.6777 19.3448 21.7453 19.6027 21.7453C19.8606 21.7453 20.114 21.6777 20.3377 21.5492L24.1162 19.4209Z\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\",\n\t\t\t\tstrokeLinejoin: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M16 7V4\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M19 8L21 7\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\"\n\t\t\t}),\n\t\t\t/* @__PURE__ */ jsx(\"path\", {\n\t\t\t\td: \"M13 8L11 7\",\n\t\t\t\tstroke: color,\n\t\t\t\tstrokeWidth: \"1.6\",\n\t\t\t\tstrokeLinecap: \"round\"\n\t\t\t})\n\t\t]\n\t})\n];\nfunction PackageAnimation({ animate = false, loop = false, color = \"currentColor\", size = 32, onComplete }) {\n\tconst [frameIndex, setFrameIndex] = useState(0);\n\tconst timerRef = useRef(null);\n\tconst isRunning = useRef(false);\n\tuseEffect(() => {\n\t\tif (!animate || isRunning.current) return;\n\t\tisRunning.current = true;\n\t\tsetFrameIndex(0);\n\t\tlet current = 0;\n\t\tconst totalFrames = frames.length;\n\t\tconst tick = () => {\n\t\t\tcurrent += 1;\n\t\t\tif (current < totalFrames - 1) {\n\t\t\t\tsetFrameIndex(current);\n\t\t\t\ttimerRef.current = setTimeout(tick, FRAME_DURATION);\n\t\t\t} else {\n\t\t\t\tsetFrameIndex(totalFrames - 1);\n\t\t\t\ttimerRef.current = setTimeout(() => {\n\t\t\t\t\tif (loop) {\n\t\t\t\t\t\tcurrent = 0;\n\t\t\t\t\t\tsetFrameIndex(0);\n\t\t\t\t\t\ttimerRef.current = setTimeout(tick, FRAME_DURATION);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tisRunning.current = false;\n\t\t\t\t\t\tonComplete?.();\n\t\t\t\t\t}\n\t\t\t\t}, HOLD_LAST_FRAME);\n\t\t\t}\n\t\t};\n\t\ttimerRef.current = setTimeout(tick, FRAME_DURATION);\n\t\treturn () => {\n\t\t\tisRunning.current = false;\n\t\t\tif (timerRef.current) clearTimeout(timerRef.current);\n\t\t};\n\t}, [animate, loop]);\n\treturn /* @__PURE__ */ jsx(\"span\", {\n\t\tstyle: {\n\t\t\tdisplay: \"inline-flex\",\n\t\t\talignItems: \"center\",\n\t\t\tjustifyContent: \"center\",\n\t\t\twidth: size,\n\t\t\theight: size,\n\t\t\tflexShrink: 0\n\t\t},\n\t\tchildren: /* @__PURE__ */ jsx(\"span\", {\n\t\t\tstyle: {\n\t\t\t\ttransform: `scale(${size / 32})`,\n\t\t\t\ttransformOrigin: \"center\",\n\t\t\t\tdisplay: \"block\",\n\t\t\t\twidth: 32,\n\t\t\t\theight: 32\n\t\t\t},\n\t\t\tchildren: frames[frameIndex](color)\n\t\t})\n\t});\n}\n//#endregion\n//#region src/powerhouse/components/pagination/pagination-button.tsx\nconst PaginationButton = ({ active = false, ...props }) => {\n\tconst { className: propClassName, ...restProps } = props;\n\treturn /* @__PURE__ */ jsx(PowerhouseButton, {\n\t\tcolor: \"light\",\n\t\tsize: \"small\",\n\t\tclassName: twMerge(\"h-8 min-w-8 border border-solid border-border bg-background px-3 py-1 text-xs text-foreground hover:hover-effect\", !active && \"border-0\", typeof propClassName === \"string\" && propClassName),\n\t\t...restProps,\n\t\tchildren: props.children\n\t});\n};\n//#endregion\n//#region src/powerhouse/components/pagination/pagination.tsx\nconst Pagination = (props) => {\n\tconst { pages = [], goToFirstPage, goToLastPage, goToNextPage, goToPreviousPage, goToPage, isNextPageAvailable, isPreviousPageAvailable, hiddenNextPages, firstPageLabel = \"First\", lastPageLabel = \"Last\", nextPageLabel = \"Next\", previousPageLabel = \"Previous\" } = props;\n\treturn /* @__PURE__ */ jsxs(\"div\", {\n\t\tclassName: \"flex gap-x-1\",\n\t\tchildren: [\n\t\t\tfirstPageLabel ? /* @__PURE__ */ jsx(PaginationButton, {\n\t\t\t\tdisabled: !isPreviousPageAvailable,\n\t\t\t\tonClick: () => goToFirstPage(),\n\t\t\t\tchildren: firstPageLabel\n\t\t\t}) : null,\n\t\t\tpreviousPageLabel ? /* @__PURE__ */ jsxs(PaginationButton, {\n\t\t\t\tdisabled: !isPreviousPageAvailable,\n\t\t\t\tonClick: () => goToPreviousPage(),\n\t\t\t\tchildren: [/* @__PURE__ */ jsx(Icon, {\n\t\t\t\t\tclassName: \"rotate-90\",\n\t\t\t\t\tname: \"ChevronDown\",\n\t\t\t\t\tsize: 16\n\t\t\t\t}), previousPageLabel]\n\t\t\t}) : null,\n\t\t\tpages.map((page) => /* @__PURE__ */ jsx(PaginationButton, {\n\t\t\t\tactive: page.active,\n\t\t\t\tonClick: () => goToPage(page.index),\n\t\t\t\tchildren: page.number\n\t\t\t}, page.index)),\n\t\t\thiddenNextPages ? /* @__PURE__ */ jsx(\"span\", {\n\t\t\t\tclassName: \"flex items-center justify-center px-2\",\n\t\t\t\tchildren: \"...\"\n\t\t\t}) : null,\n\t\t\tnextPageLabel ? /* @__PURE__ */ jsxs(PaginationButton, {\n\t\t\t\tdisabled: !isNextPageAvailable,\n\t\t\t\tonClick: () => goToNextPage(),\n\t\t\t\tchildren: [nextPageLabel, /* @__PURE__ */ jsx(Icon, {\n\t\t\t\t\tclassName: \"-rotate-90\",\n\t\t\t\t\tname: \"ChevronDown\",\n\t\t\t\t\tsize: 16\n\t\t\t\t})]\n\t\t\t}) : null,\n\t\t\tlastPageLabel ? /* @__PURE__ */ jsx(PaginationButton, {\n\t\t\t\tdisabled: !isNextPageAvailable,\n\t\t\t\tonClick: () => goToLastPage(),\n\t\t\t\tchildren: lastPageLabel\n\t\t\t}) : null\n\t\t]\n\t});\n};\n//#endregion\n//#region src/powerhouse/components/sidebar/sidebar-panel.tsx\nfunction SidebarPanel({ className, children, ...props }) {\n\tconst [hasScroll, setHasScroll] = useState(false);\n\tfunction checkContentScroll(target) {\n\t\tsetHasScroll(target.scrollHeight - target.scrollTop - target.clientHeight > 1);\n\t}\n\tconst containerRef = useRef(null);\n\tuseEffect(() => {\n\t\tif (!containerRef.current) return;\n\t\tconst observer = new ResizeObserver((entries) => {\n\t\t\tconst entry = entries.pop();\n\t\t\tif (!entry) return;\n\t\t\tconst { target } = entry;\n\t\t\tcheckContentScroll(target);\n\t\t});\n\t\tobserver.observe(containerRef.current);\n\t\treturn () => {\n\t\t\tobserver.disconnect();\n\t\t};\n\t}, []);\n\treturn /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(\"div\", {\n\t\tclassName: twMerge(\"scrollbar-none flex-1 overflow-auto text-foreground transition-shadow\", className),\n\t\tonScroll: (e) => checkContentScroll(e.currentTarget),\n\t\tref: containerRef,\n\t\t...props,\n\t\tchildren\n\t}), hasScroll ? /* @__PURE__ */ jsx(\"div\", {\n\t\tclassName: \"pointer-events-none z-10 -mt-12 h-12 w-full\",\n\t\tstyle: { boxShadow: \"inset 0px -33px 32px -16px rgba(0,0,0,0.1)\" }\n\t}) : null] });\n}\n//#endregion\n//#region src/powerhouse/components/sidebar/sidebar.tsx\nfunction SidebarHeader({ className, ...props }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\tclassName: twMerge(\"shrink-0\", className),\n\t\t...props\n\t});\n}\nfunction SidebarFooter({ className, ...props }) {\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\tclassName: twMerge(\"shrink-0\", className),\n\t\t...props\n\t});\n}\nfunction Sidebar({ maxWidth: _maxWidth = \"304px\", minWidth = \"80px\", className, children, ...props }) {\n\tconst ref = useRef(null);\n\treturn /* @__PURE__ */ jsx(\"div\", {\n\t\t...props,\n\t\tclassName: twMerge(`group z-1 flex h-full flex-col bg-sidebar text-sidebar-foreground`, className),\n\t\tref,\n\t\tstyle: { width: minWidth },\n\t\tchildren\n\t});\n}\n//#endregion\n//#region src/powerhouse/hooks/animation.ts\nfunction useEnterAnimation(ref, isReady = true) {\n\tconst [isEntering, setEntering] = useState(true);\n\tuseAnimation(ref, isEntering && isReady, useCallback(() => setEntering(false), []));\n\treturn isEntering && isReady;\n}\nfunction useExitAnimation(ref, isOpen) {\n\tconst [isExiting, setExiting] = useState(false);\n\tconst [exitState, setExitState] = useState(\"idle\");\n\tif (!isOpen && ref.current && exitState === \"idle\") {\n\t\tsetExiting(true);\n\t\tsetExitState(\"exiting\");\n\t}\n\tif (!ref.current && exitState === \"exited\") setExitState(\"idle\");\n\tuseAnimation(ref, isExiting, useCallback(() => {\n\t\tsetExitState(\"exited\");\n\t\tsetExiting(false);\n\t}, []));\n\treturn isExiting;\n}\nfunction useAnimation(ref, isActive, onEnd) {\n\tconst prevAnimation = useRef(null);\n\tif (isActive && ref.current) prevAnimation.current = window.getComputedStyle(ref.current).animation;\n\tuseLayoutEffect(() => {\n\t\tif (isActive && ref.current) {\n\t\t\tconst computedStyle = window.getComputedStyle(ref.current);\n\t\t\tif (computedStyle.animationName !== \"none\" && computedStyle.animation !== prevAnimation.current) {\n\t\t\t\tconst onAnimationEnd = (e) => {\n\t\t\t\t\tif (e.target === ref.current) {\n\t\t\t\t\t\telement.removeEventListener(\"animationend\", onAnimationEnd);\n\t\t\t\t\t\tReactDOM.flushSync(() => {\n\t\t\t\t\t\t\tonEnd();\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tconst element = ref.current;\n\t\t\t\telement.addEventListener(\"animationend\", onAnimationEnd);\n\t\t\t\treturn () => {\n\t\t\t\t\telement.removeEventListener(\"animationend\", onAnimationEnd);\n\t\t\t\t};\n\t\t\t} else onEnd();\n\t\t}\n\t}, [\n\t\tref,\n\t\tisActive,\n\t\tonEnd\n\t]);\n}\n//#endregion\n//#region src/powerhouse/hooks/usePagination.ts\n/**\n* Custom hook for pagination.\n*\n* @template T - The type of items in the pagination.\n* @param {T[]} items - The array of items to paginate.\n* @param {UsePaginationOptions} [options] - The pagination options.\n* @returns {{\n* pages: PageItem[]; - The array of page items.\n* goToPage: (page: number) => void; - The function to go to a specific page.\n* pageItems: T[]; - The array of items for the current page.\n* pageCount: number; - The total number of pages.\n* currentPage: number; - The current page index.\n* goToLastPage: () => void; - The function to go to the last page.\n* goToFirstPage: () => void; - The function to go to the first page.\n* goToNextPage: () => void; - The function to go to the next page.\n* goToPreviousPage: () => void; - The function to go to the previous page.\n* isNextPageAvailable: boolean; - The flag to indicate if the next page is available.\n* isPreviousPageAvailable: boolean; - The flag to indicate if the previous page is available.\n* }} - The pagination object with various functions and properties.\n*/\nfunction usePagination(items, options) {\n\tconst { itemsPerPage = 20, initialPage = 0, pageRange = 3 } = options || {};\n\tconst [currentPage, setCurrentPage] = useState(initialPage);\n\tconst pageCount = Math.ceil(items.length / itemsPerPage);\n\tconst isNextPageAvailable = currentPage < pageCount - 1;\n\tconst isPreviousPageAvailable = currentPage > 0;\n\tconst goToNextPage = useCallback(() => {\n\t\tif (isNextPageAvailable) setCurrentPage((prev) => prev + 1);\n\t}, [isNextPageAvailable, setCurrentPage]);\n\tconst goToPreviousPage = useCallback(() => {\n\t\tif (isPreviousPageAvailable) setCurrentPage((prev) => prev - 1);\n\t}, [isPreviousPageAvailable, setCurrentPage]);\n\tconst goToLastPage = useCallback(() => {\n\t\tsetCurrentPage(pageCount - 1);\n\t}, [pageCount]);\n\tconst goToFirstPage = useCallback(() => {\n\t\tsetCurrentPage(0);\n\t}, []);\n\tconst goToPage = useCallback((page) => {\n\t\tif (page >= 0 && page < pageCount) setCurrentPage(page);\n\t}, [pageCount]);\n\tconst pageOffset = Math.floor((pageRange - 1) / 2);\n\tconst availableRange = Math.min(pageRange, pageCount);\n\tconst maxStartIndex = Math.max(pageCount - availableRange);\n\tconst startIndex = Math.min(maxStartIndex, Math.max(currentPage - pageOffset, 0));\n\tconst pages = useMemo(() => {\n\t\tconst range = [];\n\t\tfor (let i = startIndex; i < availableRange + startIndex; i++) range.push({\n\t\t\tindex: i,\n\t\t\tactive: i === currentPage,\n\t\t\tnumber: i + 1\n\t\t});\n\t\treturn range;\n\t}, [\n\t\tavailableRange,\n\t\tstartIndex,\n\t\tcurrentPage\n\t]);\n\treturn {\n\t\tpages,\n\t\tgoToPage,\n\t\tpageItems: items.slice(currentPage * itemsPerPage, (currentPage + 1) * itemsPerPage),\n\t\tpageCount,\n\t\tcurrentPage,\n\t\tgoToLastPage,\n\t\tgoToFirstPage,\n\t\tgoToNextPage,\n\t\thiddenNextPages: pages.length > 0 && pages.slice(-1)[0].index < pageCount - 1,\n\t\tgoToPreviousPage,\n\t\tisNextPageAvailable,\n\t\tisPreviousPageAvailable\n\t};\n}\n//#endregion\n//#region src/powerhouse/hooks/useWindowSize.ts\nconst useWindowSize = () => {\n\tconst [windowSize, setWindowSize] = useState({\n\t\tinnerWidth: window.innerWidth,\n\t\tinnerHeight: window.innerHeight\n\t});\n\tuseEffect(() => {\n\t\tconst windowSizeHandler = () => {\n\t\t\tsetWindowSize({\n\t\t\t\tinnerWidth: window.innerWidth,\n\t\t\t\tinnerHeight: window.innerHeight\n\t\t\t});\n\t\t};\n\t\twindow.addEventListener(\"resize\", windowSizeHandler);\n\t\treturn () => {\n\t\t\twindow.removeEventListener(\"resize\", windowSizeHandler);\n\t\t};\n\t}, []);\n\treturn windowSize;\n};\n//#endregion\nexport { DropdownMenuTrigger as _, useExitAnimation as a, SidebarHeader as c, PackageAnimation as d, Modal as f, DropdownMenuLabel as g, DropdownMenuItem as h, useEnterAnimation as i, SidebarPanel as l, DropdownMenuContent as m, usePagination as n, Sidebar as o, DropdownMenu as p, useAnimation as r, SidebarFooter as s, useWindowSize as t, Pagination as u, PowerhouseButton as v };\n\n//# sourceMappingURL=src-CVV6HzQZ.js.map","// The connection editor's own form over a just-created document, hosted in the\n// host modal so binding a step never leaves the workflow editor.\nimport { Modal } from \"@powerhousedao/design-system\";\nimport { actions, useConnectionDocumentById } from \"document-models/connection\";\nimport { useEffect, useState } from \"react\";\nimport { connectionCallbacks } from \"../../connection-editor/connection-callbacks.js\";\nimport { ConnectionForm } from \"../../connection-editor/connection-form.js\";\nimport { planFromAuth } from \"../../connection-editor/piece-auth.js\";\nimport { fetchPieceCatalog } from \"../runtime-api.js\";\nimport type { ConnectionDraft } from \"./connection-create.js\";\n\nexport function CreateConnectionModal(props: {\n connectionId: string;\n draft: ConnectionDraft;\n onDone: (connectionId: string) => void;\n}) {\n const [document, dispatch] = useConnectionDocumentById(props.connectionId);\n const [prefilled, setPrefilled] = useState(false);\n const state = document?.state.global;\n\n // The picker knows the piece; the connector is prefilled once, exactly as\n // picking it by hand would, so only the credentials are left to fill in.\n useEffect(() => {\n if (!dispatch || prefilled || state === undefined) return;\n if (state.connectorId) return;\n // eslint-disable-next-line react-hooks/set-state-in-effect -- one-shot latch so the prefill dispatches exactly once\n setPrefilled(true);\n dispatch(actions.setConnectionName({ name: props.draft.name }));\n dispatch(actions.setName(props.draft.name));\n const setConnector = (auth: unknown) =>\n dispatch(\n actions.setConnector({\n connectorId: props.draft.connectorId,\n authType: planFromAuth(auth).authType,\n }),\n );\n fetchPieceCatalog().then(\n (pieces) =>\n setConnector(\n pieces.find((piece) => piece.name === props.draft.piecePackage)?.auth,\n ),\n // Unreachable catalog: the connector still points at the piece and the\n // form recovers the auth kind once the catalog loads.\n () => setConnector(null),\n );\n }, [dispatch, prefilled, props.draft, state]);\n\n const callbacks =\n state && dispatch ? connectionCallbacks(state, dispatch) : null;\n\n return (\n <Modal\n open\n title=\"New connection\"\n onOpenChange={(open) => {\n if (!open) props.onDone(props.connectionId);\n }}\n contentProps={{\n className: \"max-h-[85vh] w-[36rem] max-w-[92vw] overflow-y-auto\",\n }}\n >\n <div className=\"flex flex-col gap-4 p-6\">\n <div className=\"flex items-center gap-2\">\n <input\n key={state?.name}\n className=\"min-w-0 flex-1 rounded border border-transparent px-1 py-0.5 text-sm font-semibold text-slate-800 hover:border-slate-200 focus:border-slate-300 focus:outline-none\"\n defaultValue={state?.name ?? props.draft.name}\n placeholder=\"Untitled connection\"\n spellCheck={false}\n aria-label=\"Connection name\"\n onKeyDown={(event) => {\n if (event.key === \"Enter\") event.currentTarget.blur();\n }}\n onBlur={(event) => {\n const name = event.target.value.trim();\n if (name && name !== state?.name) callbacks?.setName(name);\n }}\n />\n <button\n type=\"button\"\n className=\"shrink-0 rounded bg-slate-800 px-3 py-1.5 text-xs font-medium text-white\"\n onClick={() => props.onDone(props.connectionId)}\n >\n Use this connection\n </button>\n </div>\n {state && callbacks ? (\n <ConnectionForm state={state} callbacks={callbacks} />\n ) : (\n <p className=\"text-xs text-slate-400\">\n Loading the new connection document…\n </p>\n )}\n </div>\n </Modal>\n );\n}\n","// Connection picker: autocomplete over the powerhouse/connection documents\n// that configure this block's own piece.\nimport {\n addDocument,\n useSelectedDriveId,\n} from \"@powerhousedao/reactor-browser\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { pieceLogo, usePieceLogos } from \"./block-meta.js\";\nimport {\n CONNECTION_TYPE,\n compatibleConnections,\n connectionDraftFor,\n looksLikeDocumentId,\n packageOf,\n type ConnectionDraft,\n} from \"./connection-create.js\";\nimport { CreateConnectionModal } from \"./CreateConnectionModal.js\";\nimport type {\n BlockForm,\n ConnectionSummary,\n DesignTimeService,\n} from \"./forms.js\";\n\nconst STATUS_DOT: Record<string, string> = {\n OK: \"bg-emerald-500\",\n UNCONFIGURED: \"bg-amber-400\",\n ERROR: \"bg-red-500\",\n REVOKED: \"bg-red-500\",\n};\n\n// The piece's own logo, falling back to its initial until the catalog lands.\nfunction ConnectorIcon(props: { connectorId: string }) {\n usePieceLogos();\n const [broken, setBroken] = useState(false);\n const piecePackage = packageOf(props.connectorId);\n const src = broken ? undefined : pieceLogo(piecePackage);\n if (!src) {\n const short =\n piecePackage\n .split(\"/\")\n .pop()\n ?.replace(/^piece-/, \"\") ?? \"\";\n return (\n <span className=\"flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-solid border-slate-200 bg-slate-50 text-[9px] text-slate-500\">\n {short.slice(0, 1).toUpperCase() || \"?\"}\n </span>\n );\n }\n return (\n <img\n src={src}\n alt=\"\"\n className=\"h-4 w-4 shrink-0 object-contain\"\n onError={() => setBroken(true)}\n />\n );\n}\n\nfunction ConnectionRow(props: {\n connection: ConnectionSummary;\n onPick: (connection: ConnectionSummary) => void;\n}) {\n const { connection } = props;\n return (\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-slate-50\"\n // mousedown so the pick lands before the input's blur.\n onMouseDown={(event) => {\n event.preventDefault();\n props.onPick(connection);\n }}\n >\n <ConnectorIcon connectorId={connection.connectorId} />\n <span className=\"min-w-0 flex-1 truncate text-xs font-medium text-slate-700\">\n {connection.name}\n {connection.accountLabel ? (\n <span className=\"font-normal text-slate-400\">\n {\" \"}\n · {connection.accountLabel}\n </span>\n ) : null}\n </span>\n <span\n className={`h-2 w-2 shrink-0 rounded-full ${STATUS_DOT[connection.status] ?? \"bg-slate-300\"}`}\n title={connection.status}\n />\n </button>\n );\n}\n\nfunction CreateRow(props: {\n draft: ConnectionDraft;\n busy: boolean;\n onCreate: () => void;\n}) {\n return (\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-slate-50 disabled:opacity-50\"\n disabled={props.busy}\n // mousedown so the click lands before the input's blur.\n onMouseDown={(event) => {\n event.preventDefault();\n props.onCreate();\n }}\n >\n <span className=\"flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border border-solid border-slate-300 text-[10px] text-slate-500\">\n +\n </span>\n <span className=\"min-w-0 flex-1 truncate text-xs font-medium text-slate-700\">\n {props.busy ? \"Creating connection…\" : \"Create connection\"}\n </span>\n </button>\n );\n}\n\nexport function ConnectionField(props: {\n blockType: string;\n value: string;\n onChange: (connectionId: string | null) => void;\n designTime?: DesignTimeService;\n}) {\n const [form, setForm] = useState<BlockForm | null | \"loading\">(\n props.designTime ? \"loading\" : null,\n );\n const [connections, setConnections] = useState<ConnectionSummary[]>([]);\n const [open, setOpen] = useState(false);\n const [query, setQuery] = useState(\"\");\n const [creating, setCreating] = useState(false);\n const [createError, setCreateError] = useState<string | null>(null);\n const [draftId, setDraftId] = useState<string | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const driveId = useSelectedDriveId();\n\n useEffect(() => {\n let alive = true;\n props.designTime?.getBlockForm(props.blockType).then(\n (result) => {\n if (alive) setForm(result);\n },\n () => {\n if (alive) setForm(null);\n },\n );\n return () => {\n alive = false;\n };\n }, [props.blockType, props.designTime]);\n\n useEffect(() => {\n if (!open) return;\n let alive = true;\n props.designTime?.listConnections?.().then(\n (result) => {\n if (alive) setConnections(result);\n },\n () => undefined,\n );\n const handler = (event: MouseEvent) => {\n if (!containerRef.current?.contains(event.target as globalThis.Node)) {\n setOpen(false);\n }\n };\n window.addEventListener(\"mousedown\", handler);\n return () => {\n alive = false;\n window.removeEventListener(\"mousedown\", handler);\n };\n }, [open, props.designTime]);\n\n // The selected connection may configure another piece (a stale value, or one\n // pasted by hand), so it is resolved against the whole listing.\n const selected = connections.find(\n (connection) => connection.id === props.value,\n );\n\n const authMode = form === \"loading\" ? \"loading\" : (form?.auth ?? \"optional\");\n // Blocks that take no connection only show the field to clear a stale one.\n if (authMode === \"none\" && !props.value) return null;\n\n const compatible = compatibleConnections(connections, props.blockType);\n const needle = query.trim().toLowerCase();\n const visible = needle\n ? compatible.filter((connection) =>\n [connection.name, connection.accountLabel ?? \"\"].some((candidate) =>\n candidate.toLowerCase().includes(needle),\n ),\n )\n : compatible;\n const draft = driveId\n ? connectionDraftFor({\n blockType: props.blockType,\n authMode,\n // The unfiltered set, so typing cannot summon the create entry for a\n // piece that already has a connection.\n matchingCount: compatible.length,\n })\n : null;\n\n const create = (pending: ConnectionDraft) => {\n if (!driveId || creating) return;\n setCreating(true);\n setCreateError(null);\n addDocument(driveId, pending.name, CONNECTION_TYPE)\n .then((node) => setDraftId(node.id))\n .catch((error: unknown) => {\n setCreateError(error instanceof Error ? error.message : String(error));\n })\n .finally(() => setCreating(false));\n };\n\n const pick = (connectionId: string) => {\n setQuery(\"\");\n setOpen(false);\n if (connectionId !== props.value) props.onChange(connectionId);\n };\n\n const clear = () => {\n setQuery(\"\");\n setOpen(false);\n if (props.value) props.onChange(null);\n };\n\n const finishCreate = (connectionId: string) => {\n setDraftId(null);\n pick(connectionId);\n // The listing is cached, so the new document has to be pulled in for the\n // name and icon below the input to resolve it.\n props.designTime?.refreshConnections?.();\n props.designTime?.listConnections?.().then(\n (result) => setConnections(result),\n () => undefined,\n );\n };\n\n const label =\n authMode === \"required\"\n ? \"Connection (required)\"\n : authMode === \"loading\"\n ? \"Connection\"\n : \"Connection (optional)\";\n\n return (\n <div ref={containerRef} className=\"relative\">\n <span className=\"mb-1 block text-xs font-semibold uppercase tracking-wide text-slate-500\">\n {label}\n </span>\n {open ? (\n <input\n autoFocus\n className=\"w-full rounded border border-slate-300 px-2 py-1.5 text-xs text-slate-800\"\n value={query}\n placeholder=\"Search connections or paste a document id\"\n onChange={(event) => setQuery(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Escape\") {\n setQuery(\"\");\n setOpen(false);\n }\n }}\n />\n ) : (\n // Closed, the field reads as the chosen connection rather than its id.\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 rounded border border-solid border-slate-300 px-2 py-1.5 text-left text-xs hover:bg-slate-50\"\n onClick={() => setOpen(true)}\n >\n {selected ? (\n <>\n <ConnectorIcon connectorId={selected.connectorId} />\n <span className=\"min-w-0 flex-1 truncate text-slate-800\">\n {selected.name}\n {selected.accountLabel ? (\n <span className=\"text-slate-400\">\n {\" \"}\n · {selected.accountLabel}\n </span>\n ) : null}\n </span>\n <span\n className={`h-2 w-2 shrink-0 rounded-full ${STATUS_DOT[selected.status] ?? \"bg-slate-300\"}`}\n title={selected.status}\n />\n </>\n ) : (\n <span className=\"flex-1 truncate text-slate-400\">\n {props.value ? props.value : \"Select a connection\"}\n </span>\n )}\n </button>\n )}\n {props.value && !open ? (\n <button\n type=\"button\"\n className=\"mt-1 text-[11px] text-slate-400 hover:text-slate-600\"\n onClick={clear}\n >\n Clear\n </button>\n ) : null}\n {props.value && !selected ? (\n <p className=\"mt-1 text-[11px] text-slate-400\">\n Not a known connection document.\n </p>\n ) : null}\n {selected &&\n packageOf(selected.connectorId) !== packageOf(props.blockType) ? (\n <p className=\"mt-1 text-[11px] text-amber-600\">\n Configures {selected.connectorId}, not this block's piece.\n </p>\n ) : null}\n {!props.value && authMode === \"required\" ? (\n <p className=\"mt-1 text-[11px] text-amber-600\">\n This block requires a connection.\n </p>\n ) : null}\n {createError ? (\n <p className=\"mt-1 text-[11px] font-medium text-red-600\">\n {createError}\n </p>\n ) : null}\n {open ? (\n <div className=\"absolute left-0 right-0 top-full z-50 mt-1 max-h-64 overflow-y-auto rounded-md border border-solid border-slate-200 bg-white py-1 shadow-lg\">\n {visible.map((connection) => (\n <ConnectionRow\n key={connection.id}\n connection={connection}\n onPick={(picked) => pick(picked.id)}\n />\n ))}\n {draft && !needle ? (\n <CreateRow\n draft={draft}\n busy={creating}\n onCreate={() => create(draft)}\n />\n ) : null}\n {visible.length === 0 && looksLikeDocumentId(query) ? (\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 px-2 py-1.5 text-left hover:bg-slate-50\"\n onMouseDown={(event) => {\n event.preventDefault();\n pick(query.trim());\n }}\n >\n <span className=\"min-w-0 flex-1 truncate text-xs text-slate-700\">\n Use document id{\" \"}\n <span className=\"font-mono text-slate-500\">{query.trim()}</span>\n </span>\n </button>\n ) : null}\n {visible.length === 0 && !draft && !looksLikeDocumentId(query) ? (\n <p className=\"px-2 py-1.5 text-xs text-slate-400\">\n {needle\n ? \"No matching connection.\"\n : \"No connection for this piece yet.\"}\n </p>\n ) : null}\n </div>\n ) : null}\n {draftId && draft ? (\n <CreateConnectionModal\n connectionId={draftId}\n draft={draft}\n onDone={finishCreate}\n />\n ) : null}\n </div>\n );\n}\n","// Builds a starter input object for an action from its GraphQL input SDL.\n\nfunction pascalCase(actionType: string): string {\n return actionType\n .toLowerCase()\n .split(/[_\\s]+/)\n .filter(Boolean)\n .map((part) => part[0].toUpperCase() + part.slice(1))\n .join(\"\");\n}\n\nfunction placeholderFor(type: string): unknown {\n const bare = type.replace(/!/g, \"\").trim();\n if (bare.startsWith(\"[\")) return [];\n switch (bare) {\n case \"Int\":\n case \"Float\":\n return 0;\n case \"Boolean\":\n return false;\n case \"String\":\n case \"OID\":\n case \"PHID\":\n case \"OLabel\":\n case \"URL\":\n case \"DateTime\":\n case \"Date\":\n case \"EmailAddress\":\n case \"EthereumAddress\":\n case \"Currency\":\n return \"\";\n default:\n return null;\n }\n}\n\n// Extracts the root `input <ActionType>Input { ... }` block and returns one\n// placeholder per field; null when the schema doesn't parse.\nexport function inputTemplateFromSchema(\n schema: string,\n actionType: string,\n): Record<string, unknown> | null {\n const rootName = `${pascalCase(actionType)}Input`;\n const blockMatch = new RegExp(`input\\\\s+${rootName}\\\\s*\\\\{([^}]*)\\\\}`).exec(\n schema,\n );\n const body = blockMatch?.[1];\n if (!body) return null;\n const template: Record<string, unknown> = {};\n for (const line of body.split(\"\\n\")) {\n const cleaned = line\n .replace(/#.*$/, \"\")\n .replace(/\"[^\"]*\"/g, \"\")\n .trim();\n const fieldMatch = /^(\\w+)\\s*:\\s*([\\w[\\]!]+)/.exec(cleaned);\n if (!fieldMatch) continue;\n const [, name, type] = fieldMatch;\n if (name === \"_\") continue; // empty-input dummy field\n template[name] = type.endsWith(\"!\") ? placeholderFor(type) : null;\n }\n return Object.keys(template).length > 0 ? template : {};\n}\n","// List editor for document actions: action types come from the target\n// document model, and picking one prefills its input from the schema.\nimport { useState } from \"react\";\nimport { inputTemplateFromSchema } from \"./action-template.js\";\nimport { AutocompleteInput } from \"./Autocomplete.js\";\n\ninterface ActionRow {\n type: string;\n input: unknown;\n}\n\nfunction toRows(value: unknown): ActionRow[] {\n if (!Array.isArray(value)) return [];\n return value.map((entry) => {\n const record = (entry ?? {}) as Record<string, unknown>;\n return {\n type: typeof record.type === \"string\" ? record.type : \"\",\n input: record.input ?? {},\n };\n });\n}\n\nfunction stringifyInput(input: unknown): string {\n try {\n return JSON.stringify(input ?? {}, null, 2);\n } catch {\n return \"{}\";\n }\n}\n\nconst inputClass =\n \"w-full rounded border border-slate-300 px-2 py-1.5 text-sm text-slate-800\";\n\nfunction ActionRowEditor(props: {\n row: ActionRow;\n onChange: (row: ActionRow) => void;\n onRemove: () => void;\n loadActionTypes?: () => Promise<unknown>;\n}) {\n const { row } = props;\n const [jsonText, setJsonText] = useState(() => stringifyInput(row.input));\n const [prevInput, setPrevInput] = useState(row.input);\n if (row.input !== prevInput) {\n setPrevInput(row.input);\n setJsonText(stringifyInput(row.input));\n }\n const [jsonError, setJsonError] = useState<string | null>(null);\n\n return (\n <div className=\"rounded border border-slate-200 p-2\">\n <div className=\"flex items-start gap-1\">\n <div className=\"grow\">\n <AutocompleteInput\n className={`${inputClass} font-mono text-xs`}\n value={row.type}\n placeholder=\"Action type\"\n loadOptions={props.loadActionTypes}\n onCommit={(type) => props.onChange({ ...row, type })}\n onPick={(option) => {\n const empty =\n row.input === null ||\n row.input === undefined ||\n (typeof row.input === \"object\" &&\n Object.keys(row.input).length === 0);\n const template = option.inputSchema\n ? inputTemplateFromSchema(option.inputSchema, option.value)\n : null;\n props.onChange({\n type: option.value,\n input: empty && template ? template : row.input,\n });\n }}\n />\n </div>\n <button\n type=\"button\"\n className=\"shrink-0 rounded border border-slate-200 px-2 py-1 text-xs text-slate-400 hover:text-red-500\"\n onClick={props.onRemove}\n title=\"Remove action\"\n >\n ✕\n </button>\n </div>\n <textarea\n className={`${inputClass} mt-1 min-h-16 font-mono text-xs`}\n value={jsonText}\n spellCheck={false}\n onChange={(event) => setJsonText(event.target.value)}\n onBlur={() => {\n try {\n props.onChange({\n ...row,\n input: jsonText.trim() === \"\" ? {} : JSON.parse(jsonText),\n });\n setJsonError(null);\n } catch {\n setJsonError(\"Invalid JSON — input not saved\");\n }\n }}\n />\n {jsonError ? (\n <p className=\"mt-0.5 text-[11px] text-red-500\">{jsonError}</p>\n ) : null}\n </div>\n );\n}\n\nexport function ActionListEditor(props: {\n value: unknown;\n onCommit: (value: unknown) => void;\n loadActionTypes?: () => Promise<unknown>;\n}) {\n const rows = toRows(props.value);\n const commit = (next: ActionRow[]) => {\n props.onCommit(next.length > 0 ? next : undefined);\n };\n return (\n <div className=\"flex flex-col gap-2\">\n {rows.map((row, index) => (\n <ActionRowEditor\n key={index}\n row={row}\n loadActionTypes={props.loadActionTypes}\n onChange={(next) =>\n commit(rows.map((entry, i) => (i === index ? next : entry)))\n }\n onRemove={() => commit(rows.filter((_, i) => i !== index))}\n />\n ))}\n <button\n type=\"button\"\n className=\"self-start rounded border border-slate-300 px-2 py-1 text-xs font-medium text-slate-600\"\n onClick={() => commit([...rows, { type: \"\", input: {} }])}\n >\n + Add action\n </button>\n </div>\n );\n}\n","// Lean required-field check shared by the property form, the side panel\n// header and the canvas badge. No schema validation: {{}} values defeat it.\nimport type { BlockForm, BlockFormProp } from \"./forms.js\";\n\nexport function isEmptyValue(value: unknown): boolean {\n if (value === undefined || value === null) return true;\n if (typeof value === \"string\") return value.trim() === \"\";\n if (Array.isArray(value)) return value.length === 0;\n return false;\n}\n\n// Whether a prop's `showWhen` is met; shared with the property form so one rule\n// decides render and required — else a hidden field warns with nothing to fix.\nexport function isPropVisible(\n prop: BlockFormProp,\n config: Record<string, unknown>,\n): boolean {\n if (!prop.showWhen) return true;\n return prop.showWhen.oneOf.includes(config[prop.showWhen.prop] ?? undefined);\n}\n\n// Display names of required props with no value; MARKDOWN is informational.\nexport function missingRequired(\n props: BlockFormProp[],\n config: unknown,\n): string[] {\n const record =\n config !== null && typeof config === \"object\" && !Array.isArray(config)\n ? (config as Record<string, unknown>)\n : {};\n return props\n .filter(\n (prop) =>\n prop.required &&\n prop.type !== \"MARKDOWN\" &&\n isPropVisible(prop, record) &&\n isEmptyValue(record[prop.name] ?? prop.defaultValue),\n )\n .map((prop) => prop.displayName);\n}\n\n// Everything a block still needs before it can run; a loading (or unknown)\n// form counts as complete so async fetches never flash warnings.\nexport function missingForBlock(\n form: BlockForm | null | \"loading\" | undefined,\n config: unknown,\n connectionId: string | null | undefined,\n): string[] {\n if (!form || form === \"loading\") return [];\n const missing = missingRequired(form.props, config);\n if (form.auth === \"required\" && !connectionId) missing.unshift(\"Connection\");\n return missing;\n}\n","// Property-driven config form, modeled on the Activepieces piece-properties\n// panel: one control per prop, typed by the descriptor.\nimport {\n lazy,\n Suspense,\n useEffect,\n useRef,\n useState,\n type ReactNode,\n} from \"react\";\nimport { ActionListEditor } from \"./ActionListEditor.js\";\nimport { AutocompleteInput } from \"./Autocomplete.js\";\nimport {\n ExpressionPickerButton,\n ExpressionTokenLine,\n useExpressionField,\n} from \"./ExpressionPicker.js\";\nimport { hasExpressions } from \"./expression-tokens.js\";\nimport { isPropVisible } from \"./validation.js\";\nimport type { BlockFormProp, SecretFormService, SecretStat } from \"./forms.js\";\nimport { isEmptyValue } from \"./validation.js\";\n\n// Splices text at the field's cursor and returns the updated value.\nfunction insertAtCursor(\n element: HTMLInputElement | HTMLTextAreaElement,\n text: string,\n): string {\n const start = element.selectionStart ?? element.value.length;\n const end = element.selectionEnd ?? start;\n element.value =\n element.value.slice(0, start) + text + element.value.slice(end);\n return element.value;\n}\n\nconst inputClass =\n \"w-full rounded border border-slate-300 px-2 py-1.5 text-sm text-slate-800\";\nconst invalidClass = \"border-red-400\";\nconst smallButtonClass =\n \"shrink-0 rounded border border-slate-300 px-2 text-xs text-slate-600 hover:border-slate-400\";\n\nconst WHOLE_EXPRESSION = /^\\{\\{\\s*[^{}]+?\\s*\\}\\}$/;\n\nfunction stringifyValue(value: unknown): string {\n if (value === undefined || value === null) return \"\";\n if (typeof value === \"string\") return value;\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value as number | boolean);\n }\n}\n\ninterface DropdownResult {\n options: { label: string; value: unknown }[];\n placeholder?: string;\n disabled?: boolean;\n}\n\nfunction parseDropdownResult(result: unknown): DropdownResult {\n const record = result as {\n options?: { label?: unknown; value?: unknown }[];\n placeholder?: string;\n disabled?: boolean;\n } | null;\n if (!record || !Array.isArray(record.options)) {\n throw new Error(\"Unexpected options result\");\n }\n return {\n options: record.options.map((option) => ({\n label: stringifyValue(option.label ?? option.value),\n value: option.value,\n })),\n placeholder: record.placeholder,\n disabled: record.disabled,\n };\n}\n\nfunction parseDescriptorList(result: unknown): BlockFormProp[] {\n if (!Array.isArray(result)) throw new Error(\"Unexpected properties result\");\n return result.filter(\n (entry): entry is BlockFormProp =>\n entry !== null &&\n typeof entry === \"object\" &&\n typeof (entry as BlockFormProp).name === \"string\",\n );\n}\n\ntype LoadState<T> =\n | { kind: \"idle\" }\n | { kind: \"loading\" }\n | { kind: \"ready\"; result: T }\n | { kind: \"error\"; message: string };\n\nconst RELOAD_DEBOUNCE_MS = 400;\n\n// Auto-loads on mount, re-loads (debounced) whenever `key` changes; the\n// returned reload is the manual retry.\nfunction useResolvedProp<T>(\n load: (() => Promise<unknown>) | undefined,\n parse: (raw: unknown) => T,\n key: string,\n): { state: LoadState<T>; reload: () => void } {\n const [state, setState] = useState<LoadState<T>>({ kind: \"idle\" });\n const [attempt, setAttempt] = useState(0);\n const loadRef = useRef(load);\n // eslint-disable-next-line react-hooks/refs -- latest-value refs, only read inside the effect below\n loadRef.current = load;\n const parseRef = useRef(parse);\n // eslint-disable-next-line react-hooks/refs -- latest-value refs, only read inside the effect below\n parseRef.current = parse;\n const first = useRef(true);\n\n useEffect(() => {\n if (!loadRef.current) return;\n let alive = true;\n const run = () => {\n setState({ kind: \"loading\" });\n loadRef\n .current?.()\n .then((raw) => {\n if (alive) setState({ kind: \"ready\", result: parseRef.current(raw) });\n })\n .catch((error: unknown) => {\n if (alive) {\n setState({\n kind: \"error\",\n message: error instanceof Error ? error.message : String(error),\n });\n }\n });\n };\n const delay = first.current ? 0 : RELOAD_DEBOUNCE_MS;\n first.current = false;\n const timer = setTimeout(run, delay);\n return () => {\n alive = false;\n clearTimeout(timer);\n };\n }, [key, attempt]);\n\n return { state, reload: () => setAttempt((value) => value + 1) };\n}\n\n// Deferred: react-markdown's remark chain is a large graph, and most blocks\n// carry no markdown at all.\nconst PieceMarkdown = lazy(() => import(\"./PieceMarkdown.js\"));\n\n// Substituted when the endpoint is not available, rather than left as the raw\n// placeholder: an author must not be told to paste \"{{webhookUrl}}\".\nconst NO_ENDPOINT = \"[no endpoint yet — see Endpoint URL above]\";\n\n// Activepieces writes its setup instructions as markdown carrying these\n// placeholders; unsubstituted, an author is told to paste \"{{webhookUrl}}\".\nexport function fillPiecePlaceholders(\n text: string,\n values: { webhookUrl?: string; webhookTimeoutSeconds?: number },\n): string {\n return text\n .replace(/\\{\\{\\s*webhookUrl\\s*\\}\\}/g, values.webhookUrl ?? NO_ENDPOINT)\n .replace(\n /\\{\\{\\s*webhookTimeoutSeconds\\s*\\}\\}/g,\n values.webhookTimeoutSeconds === undefined\n ? \"{{webhookTimeoutSeconds}}\"\n : String(values.webhookTimeoutSeconds),\n );\n}\n\n// Marks controls whose runtime support has not landed yet.\nexport function AvailableSoon(props: { children?: ReactNode }) {\n return (\n <span\n className=\"inline-flex items-center gap-1 rounded bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium normal-case tracking-normal text-amber-700\"\n title=\"Not supported by the runtime yet\"\n >\n Available soon{props.children ? <span>· {props.children}</span> : null}\n </span>\n );\n}\n\nfunction FieldShell(props: {\n prop: BlockFormProp;\n invalid: boolean;\n picker?: ReactNode;\n children: ReactNode;\n error?: string | null;\n as?: \"label\" | \"div\";\n}) {\n const { prop } = props;\n const Tag = props.as ?? \"label\";\n return (\n <Tag className=\"block\">\n <span className=\"mb-1 flex items-end justify-between gap-1\">\n <span className=\"block text-xs font-semibold uppercase tracking-wide text-slate-500\">\n {prop.displayName}\n {prop.required ? <span className=\"text-red-500\"> *</span> : null}\n {props.invalid ? (\n <span className=\"ml-2 font-normal normal-case tracking-normal text-red-500\">\n Required\n </span>\n ) : null}\n </span>\n {props.picker}\n </span>\n {props.children}\n {props.error ? (\n <p className=\"mt-0.5 text-[11px] text-red-500\">{props.error}</p>\n ) : null}\n {prop.description ? (\n <p className=\"mt-0.5 text-[11px] text-slate-400\">{prop.description}</p>\n ) : null}\n </Tag>\n );\n}\n\nfunction OptionList(props: {\n options: { label: string; value: unknown }[];\n selected: unknown[];\n onChange: (next: unknown[]) => void;\n invalid: boolean;\n}) {\n const keyOf = (value: unknown) => stringifyValue(value);\n const selectedKeys = new Set(props.selected.map(keyOf));\n return (\n <div\n className={`max-h-40 overflow-y-auto rounded border bg-white px-2 py-1 ${\n props.invalid ? invalidClass : \"border-slate-300\"\n }`}\n >\n {props.options.length === 0 ? (\n <p className=\"py-0.5 text-xs text-slate-400\">No options</p>\n ) : null}\n {props.options.map((option) => {\n const key = keyOf(option.value);\n return (\n <label\n key={key}\n className=\"flex items-center gap-2 py-0.5 text-sm text-slate-700\"\n >\n <input\n type=\"checkbox\"\n checked={selectedKeys.has(key)}\n onChange={(event) => {\n const next = props.selected.filter(\n (entry) => keyOf(entry) !== key,\n );\n if (event.target.checked) next.push(option.value);\n props.onChange(next);\n }}\n />\n {option.label}\n </label>\n );\n })}\n </div>\n );\n}\n\n// Rows of nested forms for an ARRAY prop with item properties.\nfunction ArrayRows(props: {\n prop: BlockFormProp;\n value: unknown;\n onCommit: (value: unknown) => void;\n scopeStepId?: string;\n invalid: boolean;\n}) {\n const fields = props.prop.properties ?? [];\n const rows = Array.isArray(props.value)\n ? props.value.map((item) =>\n item !== null && typeof item === \"object\"\n ? (item as Record<string, unknown>)\n : {},\n )\n : [];\n const update = (next: Record<string, unknown>[]) =>\n props.onCommit(next.length > 0 ? next : undefined);\n return (\n <div\n className={`flex flex-col gap-2 rounded border p-2 ${\n props.invalid ? invalidClass : \"border-slate-200\"\n }`}\n >\n {rows.map((row, index) => (\n <div\n key={index}\n className=\"rounded border border-solid border-slate-200 bg-white p-2\"\n >\n <div className=\"mb-1 flex items-center justify-between\">\n <span className=\"text-[10px] font-semibold uppercase tracking-wide text-slate-400\">\n Item {index + 1}\n </span>\n <button\n type=\"button\"\n className=\"text-[11px] text-red-500\"\n onClick={() => update(rows.filter((_, i) => i !== index))}\n >\n Remove\n </button>\n </div>\n <PropertyForm\n props={fields}\n value={row}\n onChange={(next) =>\n update(rows.map((entry, i) => (i === index ? next : entry)))\n }\n scopeStepId={props.scopeStepId}\n nested\n />\n </div>\n ))}\n <button\n type=\"button\"\n className=\"self-start rounded border border-slate-300 px-2 py-0.5 text-xs text-slate-600\"\n onClick={() => update([...rows, {}])}\n >\n + Add item\n </button>\n </div>\n );\n}\n\n// Key/value rows for an OBJECT dictionary; values stay strings.\nfunction ObjectRows(props: {\n value: Record<string, unknown>;\n onCommit: (value: Record<string, unknown> | undefined) => void;\n invalid: boolean;\n}) {\n const [rows, setRows] = useState(() =>\n Object.entries(props.value).map(([key, value]) => ({\n key,\n value: stringifyValue(value),\n })),\n );\n const [prevValue, setPrevValue] = useState(props.value);\n if (props.value !== prevValue) {\n setPrevValue(props.value);\n setRows(\n Object.entries(props.value).map(([key, value]) => ({\n key,\n value: stringifyValue(value),\n })),\n );\n }\n const commit = (next: { key: string; value: string }[]) => {\n setRows(next);\n const record: Record<string, unknown> = {};\n for (const row of next) {\n if (row.key.trim() !== \"\") record[row.key.trim()] = row.value;\n }\n props.onCommit(Object.keys(record).length > 0 ? record : undefined);\n };\n return (\n <div\n className={`flex flex-col gap-1 rounded border p-2 ${\n props.invalid ? invalidClass : \"border-slate-200\"\n }`}\n >\n {rows.map((row, index) => (\n <div key={index} className=\"flex items-center gap-1\">\n <input\n className={`${inputClass} font-mono text-xs`}\n placeholder=\"key\"\n value={row.key}\n onChange={(event) =>\n setRows(\n rows.map((entry, i) =>\n i === index ? { ...entry, key: event.target.value } : entry,\n ),\n )\n }\n onBlur={() => commit(rows)}\n />\n <input\n className={`${inputClass} font-mono text-xs`}\n placeholder=\"value\"\n value={row.value}\n onChange={(event) =>\n setRows(\n rows.map((entry, i) =>\n i === index ? { ...entry, value: event.target.value } : entry,\n ),\n )\n }\n onBlur={() => commit(rows)}\n />\n <button\n type=\"button\"\n className=\"shrink-0 text-[11px] text-red-500\"\n onClick={() => commit(rows.filter((_, i) => i !== index))}\n >\n ✕\n </button>\n </div>\n ))}\n <button\n type=\"button\"\n className=\"self-start rounded border border-slate-300 px-2 py-0.5 text-xs text-slate-600\"\n onClick={() => setRows([...rows, { key: \"\", value: \"\" }])}\n >\n + Add entry\n </button>\n </div>\n );\n}\n\n// ISO ↔ the local wall-clock string a datetime-local input speaks.\nfunction isoToLocalInput(value: unknown): string {\n if (typeof value !== \"string\" || value === \"\") return \"\";\n const date = new Date(value);\n if (Number.isNaN(date.getTime())) return \"\";\n const pad = (n: number) => String(n).padStart(2, \"0\");\n return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}T${pad(date.getHours())}:${pad(date.getMinutes())}`;\n}\n\nfunction localInputToIso(value: string): string | undefined {\n if (value === \"\") return undefined;\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? value : date.toISOString();\n}\n\nconst TEXT_MODE_TYPES = new Set([\n \"SHORT_TEXT\",\n \"LONG_TEXT\",\n \"NUMBER\",\n \"SECRET_TEXT\",\n \"FILE\",\n \"JSON\",\n \"DATE_TIME\",\n \"OBJECT\",\n]);\n\nconst SECRET_REF_PREFIX = \"secret://v1:\";\n\n// Mirrors the connection editor's SecretField: the input takes the VALUE and\n// only the minted ref reaches the config. Pasting over a ref rotates it.\nfunction SecretRefField(props: {\n prop: BlockFormProp;\n value: unknown;\n onCommit: (value: unknown) => void;\n invalid: boolean;\n secrets?: SecretFormService;\n}) {\n const { secrets } = props;\n const ref = typeof props.value === \"string\" ? props.value : \"\";\n const managed = ref.startsWith(SECRET_REF_PREFIX);\n const [draft, setDraft] = useState(\"\");\n const [busy, setBusy] = useState(false);\n const [error, setError] = useState<string | null>(null);\n const [stat, setStat] = useState<SecretStat | null>(null);\n\n useEffect(() => {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- clears the stale stat before the ref's own fetch\n setStat(null);\n if (!managed || !secrets) return;\n let cancelled = false;\n secrets.stat(ref).then(\n (result) => {\n if (!cancelled) setStat(result);\n },\n () => undefined,\n );\n return () => {\n cancelled = true;\n };\n }, [ref, managed, secrets]);\n\n const commit = () => {\n if (draft === \"\" || busy || !secrets) return;\n setBusy(true);\n setError(null);\n secrets\n .save({\n ref: managed ? ref : undefined,\n value: draft,\n label: props.prop.displayName,\n })\n .then((result) => {\n setDraft(\"\");\n if (result.ref !== ref) props.onCommit(result.ref);\n else setStat(result);\n })\n .catch((requestError: unknown) => {\n setError(\n requestError instanceof Error\n ? requestError.message\n : String(requestError),\n );\n })\n .finally(() => setBusy(false));\n };\n\n if (!secrets) {\n return (\n <FieldShell prop={props.prop} invalid={props.invalid} as=\"div\">\n <p className=\"text-[11px] text-slate-400\">\n Managed secrets are unavailable in this session.\n </p>\n </FieldShell>\n );\n }\n return (\n <FieldShell\n prop={props.prop}\n invalid={props.invalid}\n as=\"div\"\n error={error}\n >\n {managed ? (\n <p className=\"mb-1 text-[11px] text-slate-500\">\n <span className=\"font-medium text-slate-600\">\n {stat?.label ?? ref}\n </span>\n {stat ? <span> · v{stat.version}</span> : null}\n {stat?.status === \"DELETED\" ? (\n <span className=\"font-medium text-red-600\"> · deleted</span>\n ) : null}\n </p>\n ) : null}\n <div className=\"flex gap-1\">\n <input\n className={`${inputClass} ${props.invalid ? invalidClass : \"\"}`}\n type=\"password\"\n value={draft}\n disabled={busy}\n placeholder={\n managed\n ? \"•••••••• — paste a new value to rotate\"\n : \"Paste the secret value\"\n }\n autoComplete=\"off\"\n spellCheck={false}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") commit();\n }}\n onBlur={commit}\n />\n {ref ? (\n <button\n type=\"button\"\n className={smallButtonClass}\n title=\"Remove secret ref\"\n onClick={() => props.onCommit(undefined)}\n >\n ✕\n </button>\n ) : null}\n </div>\n </FieldShell>\n );\n}\n\nfunction PropField(props: {\n prop: BlockFormProp;\n value: unknown;\n onCommit: (value: unknown) => void;\n loadOptions?: (propName: string) => Promise<unknown>;\n secrets?: SecretFormService;\n scopeStepId?: string;\n // Changes whenever a refresher value or the connection changes.\n refresherKey: string;\n // Inside an ARRAY item or DYNAMIC result: options cannot load yet.\n nested?: boolean;\n // Substituted into MARKDOWN props; absent until the endpoint is minted.\n webhookUrl?: string;\n}) {\n const { prop, value, onCommit } = props;\n const optionsUnavailable = Boolean(\n props.nested && prop.hasDynamicResolver && !props.loadOptions,\n );\n const fieldRef = useRef<HTMLInputElement | HTMLTextAreaElement>(null);\n const invalid =\n prop.required && prop.type !== \"MARKDOWN\" && isEmptyValue(value);\n\n // Live text of the field for token highlighting (inputs are uncontrolled).\n const [draft, setDraft] = useState(() => stringifyValue(value));\n const [prevValue, setPrevValue] = useState(value);\n if (value !== prevValue) {\n setPrevValue(value);\n setDraft(stringifyValue(value));\n }\n const [jsonError, setJsonError] = useState<string | null>(null);\n // DATE_TIME / OBJECT flip to a text input when bound to an expression.\n const [textMode, setTextMode] = useState(() => hasExpressions(value));\n\n // JSON-ish fields only splice the text; their blur handler parses/commits.\n const commitsOnInsert = prop.type !== \"JSON\";\n const field = useExpressionField({\n stepId: props.scopeStepId,\n label: prop.displayName,\n insert: (expression) => {\n if ((prop.type === \"DATE_TIME\" || prop.type === \"OBJECT\") && !textMode) {\n setTextMode(true);\n setDraft(expression);\n onCommit(expression);\n return;\n }\n if (!fieldRef.current) return;\n const next = insertAtCursor(fieldRef.current, expression);\n setDraft(next);\n if (commitsOnInsert) onCommit(next);\n },\n });\n const picker = TEXT_MODE_TYPES.has(prop.type) ? (\n <ExpressionPickerButton active={field.active} onFocusField={field.focus} />\n ) : undefined;\n\n const dynamicLoad =\n props.loadOptions && prop.hasDynamicResolver\n ? () => props.loadOptions!(prop.name)\n : undefined;\n const isDropdown =\n prop.type === \"DROPDOWN\" || prop.type === \"MULTI_SELECT_DROPDOWN\";\n const dropdown = useResolvedProp(\n isDropdown ? dynamicLoad : undefined,\n parseDropdownResult,\n props.refresherKey,\n );\n const dynamic = useResolvedProp(\n prop.type === \"DYNAMIC\" ? dynamicLoad : undefined,\n parseDescriptorList,\n props.refresherKey,\n );\n\n const retryButton = (state: LoadState<unknown>, reload: () => void) => (\n <button\n type=\"button\"\n className={smallButtonClass}\n title=\"Reload options\"\n disabled={state.kind === \"loading\"}\n onClick={reload}\n >\n {state.kind === \"loading\" ? \"…\" : \"↻\"}\n </button>\n );\n const loadError = (state: LoadState<unknown>) =>\n state.kind === \"error\" ? state.message : null;\n\n const textInput = (extra: {\n type?: string;\n mono?: boolean;\n placeholder?: string;\n commit: (raw: string) => void;\n }) => (\n <>\n <div className=\"flex items-center gap-1\">\n <input\n ref={fieldRef as React.RefObject<HTMLInputElement>}\n type={extra.type ?? \"text\"}\n className={`${inputClass} ${extra.mono ? \"font-mono text-xs\" : \"\"} ${\n invalid ? invalidClass : \"\"\n }`}\n defaultValue={stringifyValue(value)}\n placeholder={extra.placeholder ?? prop.placeholder}\n spellCheck={false}\n onFocus={field.focus}\n onChange={(event) => setDraft(event.target.value)}\n onBlur={(event) => extra.commit(event.target.value)}\n />\n </div>\n {extra.type === \"password\" ? null : <ExpressionTokenLine value={draft} />}\n </>\n );\n\n switch (prop.type) {\n case \"PH_SECRET_REF\":\n return (\n <SecretRefField\n prop={prop}\n value={value}\n onCommit={onCommit}\n invalid={invalid}\n secrets={props.secrets}\n />\n );\n case \"PH_AUTOCOMPLETE\":\n return (\n <FieldShell prop={prop} invalid={invalid}>\n <AutocompleteInput\n className={`${inputClass} ${invalid ? invalidClass : \"\"}`}\n value={typeof value === \"string\" ? value : stringifyValue(value)}\n onCommit={(next) => onCommit(next === \"\" ? undefined : next)}\n loadOptions={\n props.loadOptions\n ? () => props.loadOptions!(prop.name)\n : undefined\n }\n />\n </FieldShell>\n );\n case \"PH_ACTIONS\":\n return (\n <FieldShell prop={prop} invalid={invalid} as=\"div\">\n <ActionListEditor\n value={value}\n onCommit={onCommit}\n loadActionTypes={\n props.loadOptions\n ? () => props.loadOptions!(\"actionType\")\n : undefined\n }\n />\n </FieldShell>\n );\n case \"MARKDOWN\": {\n const markdown = fillPiecePlaceholders(\n stringifyValue(\n prop.description ?? prop.defaultValue ?? prop.displayName,\n ),\n { webhookUrl: props.webhookUrl },\n );\n // The fallback keeps the text readable while the chunk loads, rather\n // than collapsing the panel's height and reflowing it.\n return (\n <Suspense\n fallback={\n <p className=\"whitespace-pre-wrap rounded bg-slate-100 px-2 py-1.5 text-xs text-slate-500\">\n {markdown}\n </p>\n }\n >\n <PieceMarkdown text={markdown} />\n </Suspense>\n );\n }\n case \"CHECKBOX\":\n return (\n <label className=\"flex items-center gap-2 text-sm text-slate-700\">\n <input\n type=\"checkbox\"\n checked={Boolean(value)}\n onChange={(event) => onCommit(event.target.checked)}\n />\n {prop.displayName}\n {prop.description ? (\n <span className=\"text-[11px] text-slate-400\">\n {prop.description}\n </span>\n ) : null}\n </label>\n );\n case \"NUMBER\":\n // Text input so expressions stay possible; numeric text commits a number.\n return (\n <FieldShell prop={prop} invalid={invalid} picker={picker}>\n {textInput({\n commit: (raw) => {\n const trimmed = raw.trim();\n if (trimmed === \"\") return onCommit(undefined);\n const parsed = Number(trimmed);\n onCommit(Number.isFinite(parsed) ? parsed : trimmed);\n },\n })}\n </FieldShell>\n );\n case \"SECRET_TEXT\":\n return (\n <FieldShell prop={prop} invalid={invalid} picker={picker}>\n {textInput({\n type: \"password\",\n commit: (raw) => onCommit(raw === \"\" ? undefined : raw),\n })}\n </FieldShell>\n );\n case \"FILE\":\n return (\n <FieldShell prop={prop} invalid={invalid} picker={picker}>\n {textInput({\n mono: true,\n placeholder: prop.placeholder ?? \"https://… or data:…;base64,…\",\n commit: (raw) =>\n onCommit(raw.trim() === \"\" ? undefined : raw.trim()),\n })}\n </FieldShell>\n );\n case \"DATE_TIME\":\n if (textMode) {\n return (\n <FieldShell prop={prop} invalid={invalid} picker={picker}>\n {textInput({\n mono: true,\n placeholder: \"ISO 8601 or {{expression}}\",\n commit: (raw) => {\n const trimmed = raw.trim();\n if (trimmed === \"\") {\n setTextMode(false);\n return onCommit(undefined);\n }\n onCommit(\n hasExpressions(trimmed) ? trimmed : localInputToIso(trimmed),\n );\n },\n })}\n </FieldShell>\n );\n }\n return (\n <FieldShell prop={prop} invalid={invalid} picker={picker}>\n <input\n type=\"datetime-local\"\n className={`${inputClass} ${invalid ? invalidClass : \"\"}`}\n defaultValue={isoToLocalInput(value)}\n onFocus={field.focus}\n onBlur={(event) => onCommit(localInputToIso(event.target.value))}\n />\n </FieldShell>\n );\n case \"STATIC_DROPDOWN\":\n return (\n <FieldShell prop={prop} invalid={invalid}>\n <select\n className={`${inputClass} ${invalid ? invalidClass : \"\"}`}\n value={stringifyValue(value)}\n onChange={(event) => {\n const picked = prop.staticOptions?.find(\n (option) => stringifyValue(option.value) === event.target.value,\n );\n onCommit(\n picked\n ? picked.value\n : event.target.value === \"\"\n ? undefined\n : event.target.value,\n );\n }}\n >\n <option value=\"\">{prop.placeholder ?? \"—\"}</option>\n {(prop.staticOptions ?? []).map((option) => (\n <option\n key={stringifyValue(option.value)}\n value={stringifyValue(option.value)}\n >\n {option.label}\n </option>\n ))}\n </select>\n </FieldShell>\n );\n case \"STATIC_MULTI_SELECT_DROPDOWN\":\n return (\n <FieldShell prop={prop} invalid={invalid} as=\"div\">\n <OptionList\n options={prop.staticOptions ?? []}\n selected={Array.isArray(value) ? (value as unknown[]) : []}\n onChange={(next) => onCommit(next.length > 0 ? next : undefined)}\n invalid={invalid}\n />\n </FieldShell>\n );\n case \"DROPDOWN\": {\n const result =\n dropdown.state.kind === \"ready\" ? dropdown.state.result : null;\n const current = stringifyValue(value);\n const known = result?.options.some(\n (option) => stringifyValue(option.value) === current,\n );\n return (\n <FieldShell\n prop={prop}\n invalid={invalid}\n error={loadError(dropdown.state)}\n picker={\n optionsUnavailable ? (\n <AvailableSoon />\n ) : dynamicLoad ? (\n retryButton(dropdown.state, dropdown.reload)\n ) : undefined\n }\n >\n <select\n className={`${inputClass} ${invalid ? invalidClass : \"\"}`}\n value={current}\n disabled={(result?.disabled && !current) || optionsUnavailable}\n onChange={(event) => {\n const picked = result?.options.find(\n (option) => stringifyValue(option.value) === event.target.value,\n );\n onCommit(\n picked\n ? picked.value\n : event.target.value === \"\"\n ? undefined\n : event.target.value,\n );\n }}\n >\n <option value=\"\">\n {optionsUnavailable\n ? \"Options for nested fields are available soon\"\n : (result?.placeholder ??\n prop.placeholder ??\n (dropdown.state.kind === \"loading\" ? \"Loading…\" : \"—\"))}\n </option>\n {current && !known ? (\n <option value={current}>{current}</option>\n ) : null}\n {(result?.options ?? []).map((option) => (\n <option\n key={stringifyValue(option.value)}\n value={stringifyValue(option.value)}\n >\n {option.label}\n </option>\n ))}\n </select>\n </FieldShell>\n );\n }\n case \"MULTI_SELECT_DROPDOWN\": {\n const result =\n dropdown.state.kind === \"ready\" ? dropdown.state.result : null;\n const selected: unknown[] = Array.isArray(value) ? value : [];\n // Keep selections the current options don't list so they stay visible.\n const listed = new Set(\n (result?.options ?? []).map((o) => stringifyValue(o.value)),\n );\n const extra = selected\n .filter((entry) => !listed.has(stringifyValue(entry)))\n .map((entry) => ({ label: stringifyValue(entry), value: entry }));\n return (\n <FieldShell\n prop={prop}\n invalid={invalid}\n as=\"div\"\n error={loadError(dropdown.state)}\n picker={\n optionsUnavailable ? (\n <AvailableSoon />\n ) : dynamicLoad ? (\n retryButton(dropdown.state, dropdown.reload)\n ) : undefined\n }\n >\n {optionsUnavailable ? (\n <p className=\"text-xs text-slate-400\">\n Options for nested fields are available soon.\n </p>\n ) : dropdown.state.kind === \"loading\" && !result ? (\n <p className=\"text-xs text-slate-400\">Loading options…</p>\n ) : (\n <OptionList\n options={[...extra, ...(result?.options ?? [])]}\n selected={selected}\n onChange={(next) => onCommit(next.length > 0 ? next : undefined)}\n invalid={invalid}\n />\n )}\n </FieldShell>\n );\n }\n case \"DYNAMIC\": {\n const fields =\n dynamic.state.kind === \"ready\" ? dynamic.state.result : null;\n const record =\n value !== null && typeof value === \"object\" && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : {};\n return (\n <FieldShell\n prop={prop}\n invalid={invalid && fields !== null && fields.length > 0}\n as=\"div\"\n error={loadError(dynamic.state)}\n picker={\n optionsUnavailable ? (\n <AvailableSoon />\n ) : dynamicLoad ? (\n retryButton(dynamic.state, dynamic.reload)\n ) : undefined\n }\n >\n {optionsUnavailable ? (\n <p className=\"text-xs text-slate-400\">\n Nested dynamic properties are available soon.\n </p>\n ) : dynamic.state.kind === \"loading\" && !fields ? (\n <p className=\"text-xs text-slate-400\">Resolving properties…</p>\n ) : !dynamicLoad ? (\n <p className=\"text-xs text-slate-400\">\n Properties resolve once the runtime is reachable.\n </p>\n ) : fields && fields.length > 0 ? (\n <div className=\"rounded border border-slate-200 p-2\">\n <PropertyForm\n props={fields}\n value={record}\n onChange={(next) =>\n onCommit(Object.keys(next).length > 0 ? next : undefined)\n }\n scopeStepId={props.scopeStepId}\n nested\n />\n </div>\n ) : fields ? (\n <p className=\"text-xs text-slate-400\">\n No properties for the current selection.\n </p>\n ) : null}\n </FieldShell>\n );\n }\n case \"ARRAY\": {\n if (prop.properties && prop.properties.length > 0) {\n return (\n <FieldShell prop={prop} invalid={invalid} as=\"div\">\n <ArrayRows\n prop={prop}\n value={value}\n onCommit={onCommit}\n scopeStepId={props.scopeStepId}\n invalid={invalid}\n />\n </FieldShell>\n );\n }\n // Plain list: one item per line; a lone whole expression binds the list.\n const lines = Array.isArray(value)\n ? value.map((item) => stringifyValue(item)).join(\"\\n\")\n : stringifyValue(value);\n return (\n <FieldShell\n prop={prop}\n invalid={invalid}\n picker={\n <ExpressionPickerButton\n active={field.active}\n onFocusField={field.focus}\n />\n }\n >\n <textarea\n ref={fieldRef as React.RefObject<HTMLTextAreaElement>}\n className={`${inputClass} min-h-20 font-mono text-xs ${\n invalid ? invalidClass : \"\"\n }`}\n defaultValue={lines}\n placeholder={prop.placeholder ?? \"One item per line\"}\n spellCheck={false}\n onFocus={field.focus}\n onChange={(event) => setDraft(event.target.value)}\n onBlur={(event) => {\n const items = event.target.value\n .split(\"\\n\")\n .map((line) => line.trim())\n .filter((line) => line !== \"\");\n if (items.length === 0) return onCommit(undefined);\n if (items.length === 1 && WHOLE_EXPRESSION.test(items[0])) {\n return onCommit(items[0]);\n }\n onCommit(items);\n }}\n />\n <ExpressionTokenLine value={draft} />\n </FieldShell>\n );\n }\n case \"OBJECT\": {\n if (textMode) {\n return (\n <FieldShell prop={prop} invalid={invalid} picker={picker}>\n {textInput({\n mono: true,\n placeholder: \"{{expression}} yielding an object\",\n commit: (raw) => {\n const trimmed = raw.trim();\n if (trimmed === \"\") {\n setTextMode(false);\n return onCommit(undefined);\n }\n onCommit(trimmed);\n },\n })}\n </FieldShell>\n );\n }\n const record =\n value !== null && typeof value === \"object\" && !Array.isArray(value)\n ? (value as Record<string, unknown>)\n : {};\n return (\n <FieldShell prop={prop} invalid={invalid} as=\"div\" picker={picker}>\n <ObjectRows value={record} onCommit={onCommit} invalid={invalid} />\n </FieldShell>\n );\n }\n case \"LONG_TEXT\":\n case \"JSON\": {\n const isJson = prop.type === \"JSON\";\n return (\n <FieldShell\n prop={prop}\n invalid={invalid}\n picker={picker}\n error={jsonError}\n >\n <textarea\n ref={fieldRef as React.RefObject<HTMLTextAreaElement>}\n className={`${inputClass} min-h-20 ${isJson ? \"font-mono text-xs\" : \"\"} ${\n invalid ? invalidClass : \"\"\n }`}\n defaultValue={stringifyValue(value)}\n placeholder={prop.placeholder}\n spellCheck={false}\n onFocus={field.focus}\n onChange={(event) => setDraft(event.target.value)}\n onBlur={(event) => {\n const raw = event.target.value;\n if (!isJson) return onCommit(raw === \"\" ? undefined : raw);\n const trimmed = raw.trim();\n if (trimmed === \"\") {\n setJsonError(null);\n return onCommit(undefined);\n }\n // A whole expression resolves to the value at run time.\n if (WHOLE_EXPRESSION.test(trimmed)) {\n setJsonError(null);\n return onCommit(trimmed);\n }\n try {\n onCommit(JSON.parse(trimmed));\n setJsonError(null);\n } catch {\n setJsonError(\"Invalid JSON — value not saved\");\n }\n }}\n />\n <ExpressionTokenLine value={draft} />\n </FieldShell>\n );\n }\n default:\n return (\n <FieldShell prop={prop} invalid={invalid} picker={picker}>\n {textInput({\n commit: (raw) => onCommit(raw === \"\" ? undefined : raw),\n })}\n </FieldShell>\n );\n }\n}\n\n// Serialises the values a prop's resolver depends on (+ the connection).\nfunction refresherKeyFor(\n prop: BlockFormProp,\n current: Record<string, unknown>,\n connectionId: string | undefined,\n): string {\n const refreshers = (prop.refreshers ?? []).filter((name) => name !== \"auth\");\n const values = refreshers.map((name) => current[name]);\n try {\n return JSON.stringify([connectionId ?? null, values]);\n } catch {\n return String(connectionId);\n }\n}\n\nexport function PropertyForm(props: {\n props: BlockFormProp[];\n value: Record<string, unknown>;\n onChange: (next: Record<string, unknown>) => void;\n loadOptions?: (\n propName: string,\n current: Record<string, unknown>,\n ) => Promise<unknown>;\n // Backs PH_SECRET_REF props.\n secrets?: SecretFormService;\n // Step whose config is being edited; scopes the expression picker.\n scopeStepId?: string;\n // Auth-dependent resolvers re-run when this changes.\n connectionId?: string;\n // Rendered inside another field; nested resolvers are not loadable yet.\n nested?: boolean;\n // This workflow's endpoint URL, for a piece's setup markdown.\n webhookUrl?: string;\n}) {\n // Track the latest committed config so sequential field edits accumulate;\n // derive-during-render resets it when the document value changes.\n const [current, setCurrent] = useState(props.value);\n const [prevValue, setPrevValue] = useState(props.value);\n if (props.value !== prevValue) {\n setPrevValue(props.value);\n setCurrent(props.value);\n }\n\n const commitField = (name: string, value: unknown) => {\n const next = { ...current };\n if (value === undefined) delete next[name];\n else next[name] = value;\n setCurrent(next);\n props.onChange(next);\n };\n\n // A hidden field's value is not cleared: switching scheme to None and back\n // must not silently discard the secret ref the author already minted.\n const visible = props.props.filter((prop) => isPropVisible(prop, current));\n const essential = visible.filter((prop) => !prop.advanced);\n const advanced = visible.filter((prop) => prop.advanced);\n const [showAdvanced, setShowAdvanced] = useState(false);\n // Closed even when advanced fields hold values, so the count goes in the\n // label — else config already in effect reads as config that is not there.\n const advancedSet = advanced.filter(\n (prop) => current[prop.name] !== undefined,\n ).length;\n\n const field = (prop: BlockFormProp) => (\n <PropField\n key={prop.name}\n prop={prop}\n value={current[prop.name] ?? prop.defaultValue}\n onCommit={(value) => commitField(prop.name, value)}\n loadOptions={\n props.loadOptions\n ? (propName) => props.loadOptions!(propName, current)\n : undefined\n }\n secrets={props.secrets}\n scopeStepId={props.scopeStepId}\n refresherKey={refresherKeyFor(prop, current, props.connectionId)}\n nested={props.nested}\n webhookUrl={props.webhookUrl}\n />\n );\n\n return (\n <div className=\"flex flex-col gap-3\">\n {essential.map(field)}\n {advanced.length > 0 ? (\n <div className=\"flex flex-col gap-3\">\n <button\n type=\"button\"\n className=\"self-start text-[11px] font-medium text-slate-500 hover:text-slate-700\"\n aria-expanded={showAdvanced}\n onClick={() => setShowAdvanced((open) => !open)}\n >\n {showAdvanced ? \"▾\" : \"▸\"} Advanced\n {advancedSet > 0 ? ` · ${advancedSet} set` : \"\"}\n </button>\n <div hidden={!showAdvanced} className=\"flex flex-col gap-3\">\n {advanced.map(field)}\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n","import { useEffect, useRef, useState } from \"react\";\nimport { acyclicTargets, reachableFrom } from \"./ap-layout.js\";\nimport { ConnectionField } from \"./ConnectionField.js\";\nimport {\n ExpressionPickerButton,\n ExpressionTokenLine,\n useExpressionField,\n} from \"./ExpressionPicker.js\";\nimport type { BlockForm, DesignTimeService, WebhookEndpoint } from \"./forms.js\";\nimport {\n flowPorts,\n type RetryPolicyModel,\n type StepModel,\n type TriggerModel,\n type WorkflowEditorCallbacks,\n type WorkflowModel,\n} from \"./model.js\";\nimport { AvailableSoon, PropertyForm } from \"./PropertyForm.js\";\nimport { missingForBlock } from \"./validation.js\";\n\nfunction stringify(value: unknown): string {\n try {\n return JSON.stringify(value ?? {}, null, 2);\n } catch {\n return \"{}\";\n }\n}\n\nfunction Field(props: {\n label: string;\n hint?: string;\n children: React.ReactNode;\n}) {\n return (\n <label className=\"block\">\n <span className=\"mb-1 block text-xs font-semibold uppercase tracking-wide text-slate-500\">\n {props.label}\n </span>\n {props.children}\n {props.hint ? (\n <p className=\"mt-0.5 text-[11px] text-slate-400\">{props.hint}</p>\n ) : null}\n </label>\n );\n}\n\nconst inputClass =\n \"w-full rounded border border-slate-300 px-2 py-1.5 text-sm text-slate-800\";\n\nfunction RawConfigEditor(props: {\n value: unknown;\n onApply: (config: unknown) => void;\n}) {\n const [text, setText] = useState(() => stringify(props.value));\n const [error, setError] = useState<string | null>(null);\n const [prevValue, setPrevValue] = useState(props.value);\n if (props.value !== prevValue) {\n setPrevValue(props.value);\n setText(stringify(props.value));\n }\n return (\n <div>\n <textarea\n className={`${inputClass} min-h-32 font-mono text-xs`}\n value={text}\n onChange={(event) => setText(event.target.value)}\n spellCheck={false}\n />\n {error ? <p className=\"mt-1 text-xs text-red-600\">{error}</p> : null}\n <button\n type=\"button\"\n className=\"mt-1 rounded bg-slate-800 px-3 py-1 text-xs font-medium text-white\"\n onClick={() => {\n try {\n props.onApply(JSON.parse(text));\n setError(null);\n } catch (parseError) {\n setError(\n parseError instanceof Error ? parseError.message : \"Invalid JSON\",\n );\n }\n }}\n >\n Apply JSON\n </button>\n </div>\n );\n}\n\n// Loads the block's form descriptor; null means \"no form, fall back to JSON\".\nfunction useBlockForm(\n blockType: string,\n designTime?: DesignTimeService,\n): BlockForm | null | \"loading\" {\n const [state, setState] = useState<{\n blockType: string;\n form: BlockForm | null | \"loading\";\n }>({ blockType, form: designTime ? \"loading\" : null });\n if (state.blockType !== blockType) {\n setState({ blockType, form: designTime ? \"loading\" : null });\n }\n useEffect(() => {\n if (!designTime) return;\n let alive = true;\n designTime.getBlockForm(blockType).then(\n (result) => {\n if (alive) setState({ blockType, form: result });\n },\n () => {\n if (alive) setState({ blockType, form: null });\n },\n );\n return () => {\n alive = false;\n };\n }, [blockType, designTime]);\n return state.form;\n}\n\nfunction ConfigSection(props: {\n blockType: string;\n form: BlockForm | null | \"loading\";\n config: unknown;\n onChange: (config: unknown) => void;\n designTime?: DesignTimeService;\n connectionId?: string;\n // Step whose config this is; scopes the expression picker to its ancestors.\n scopeStepId?: string;\n // Substituted into a piece's setup markdown; triggers only.\n webhookUrl?: string;\n}) {\n const { form } = props;\n const configRecord = (props.config ?? {}) as Record<string, unknown>;\n\n return (\n <div className=\"flex flex-col gap-3\">\n {form === \"loading\" ? (\n <p className=\"text-xs text-slate-400\">Loading block properties…</p>\n ) : null}\n {form && form !== \"loading\" && form.props.length > 0 ? (\n <PropertyForm\n props={form.props}\n value={configRecord}\n onChange={props.onChange}\n scopeStepId={props.scopeStepId}\n connectionId={props.connectionId}\n secrets={props.designTime?.secrets}\n webhookUrl={props.webhookUrl}\n loadOptions={\n props.designTime\n ? (propName, current) =>\n props.designTime!.loadOptions(\n props.blockType,\n propName,\n current,\n props.connectionId,\n )\n : undefined\n }\n />\n ) : null}\n {form && form !== \"loading\" && form.props.length === 0 ? (\n <p className=\"text-xs text-slate-400\">\n This block has no configuration.\n </p>\n ) : null}\n <details className=\"mt-1\">\n <summary className=\"cursor-pointer text-[11px] text-slate-400\">\n Raw JSON\n </summary>\n <div className=\"mt-2\">\n <RawConfigEditor value={props.config} onApply={props.onChange} />\n </div>\n </details>\n </div>\n );\n}\n\nfunction PanelHeader(props: {\n title: string;\n missing: string[];\n onClose: () => void;\n}) {\n return (\n <div className=\"flex items-center justify-between\">\n <h3 className=\"flex items-center gap-2 text-sm font-semibold text-slate-700\">\n {props.title}\n {props.missing.length > 0 ? (\n <span\n className=\"rounded bg-amber-100 px-1.5 py-0.5 text-[10px] font-medium text-amber-700\"\n title={props.missing.join(\", \")}\n >\n {props.missing.length} required\n </span>\n ) : null}\n </h3>\n <button\n type=\"button\"\n className=\"text-xs text-slate-400\"\n onClick={props.onClose}\n >\n Close\n </button>\n </div>\n );\n}\n\nconst DEFAULT_RETRY: RetryPolicyModel = {\n maxAttempts: 3,\n backoff: \"EXPONENTIAL\",\n initialDelaySeconds: 5,\n maxDelaySeconds: 300,\n retryOn: [],\n};\n\nfunction intOrUndefined(raw: string): number | undefined {\n const parsed = Number.parseInt(raw.trim(), 10);\n return Number.isFinite(parsed) && parsed >= 0 ? parsed : undefined;\n}\n\nfunction RetryEditor(props: {\n value: RetryPolicyModel | null;\n onChange: (value: RetryPolicyModel | null) => void;\n}) {\n const retry = props.value;\n const patch = (partial: Partial<RetryPolicyModel>) =>\n props.onChange({ ...(retry ?? DEFAULT_RETRY), ...partial });\n return (\n <div className=\"flex flex-col gap-2\">\n <label className=\"flex items-center gap-2 text-sm text-slate-700\">\n <input\n type=\"checkbox\"\n checked={retry !== null}\n onChange={(event) =>\n props.onChange(event.target.checked ? DEFAULT_RETRY : null)\n }\n />\n Override retry policy\n </label>\n {retry ? (\n <div className=\"grid grid-cols-2 gap-2 rounded border border-slate-200 p-2\">\n <Field label=\"Max attempts\">\n <input\n key={`attempts-${retry.maxAttempts}`}\n type=\"number\"\n min={1}\n className={inputClass}\n defaultValue={retry.maxAttempts}\n onBlur={(event) => {\n const next = intOrUndefined(event.target.value);\n if (next !== undefined && next >= 1)\n patch({ maxAttempts: next });\n }}\n />\n </Field>\n <Field label=\"Backoff\">\n <select\n className={inputClass}\n value={retry.backoff}\n onChange={(event) =>\n patch({\n backoff: event.target.value as RetryPolicyModel[\"backoff\"],\n })\n }\n >\n <option value=\"FIXED\">Fixed</option>\n <option value=\"EXPONENTIAL\">Exponential</option>\n </select>\n </Field>\n <Field label=\"Initial delay (s)\">\n <input\n key={`initial-${retry.initialDelaySeconds}`}\n type=\"number\"\n min={0}\n className={inputClass}\n defaultValue={retry.initialDelaySeconds}\n onBlur={(event) => {\n const next = intOrUndefined(event.target.value);\n if (next !== undefined) patch({ initialDelaySeconds: next });\n }}\n />\n </Field>\n <Field label=\"Max delay (s)\">\n <input\n key={`max-${retry.maxDelaySeconds}`}\n type=\"number\"\n min={0}\n className={inputClass}\n defaultValue={retry.maxDelaySeconds}\n onBlur={(event) => {\n const next = intOrUndefined(event.target.value);\n if (next !== undefined) patch({ maxDelaySeconds: next });\n }}\n />\n </Field>\n <div className=\"col-span-2\">\n <Field\n label=\"Retry on\"\n hint=\"Comma-separated error classes; empty retries everything\"\n >\n <input\n key={`on-${retry.retryOn.join(\",\")}`}\n className={`${inputClass} font-mono text-xs`}\n defaultValue={retry.retryOn.join(\", \")}\n placeholder=\"TRANSIENT, RATE_LIMIT\"\n onBlur={(event) =>\n patch({\n retryOn: event.target.value\n .split(\",\")\n .map((entry) => entry.trim())\n .filter((entry) => entry !== \"\"),\n })\n }\n />\n </Field>\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\nconst PORT_LABEL: Record<string, string> = {\n next: \"Next step\",\n true: \"When true\",\n false: \"When false\",\n};\n\n// A port may hold several edges: the engine runs every successor on a taken\n// port. acyclicTargets offers any step that is not an ancestor.\nfunction FlowPortEditor(props: {\n step: StepModel;\n model: WorkflowModel;\n callbacks: WorkflowEditorCallbacks;\n}) {\n const { step, model, callbacks } = props;\n const ports = flowPorts(step.blockType);\n const stepName = (id: string) => {\n const target = model.steps.find((entry) => entry.id === id);\n return target ? target.name || target.key : id;\n };\n const attached = model.trigger\n ? reachableFrom(model.trigger.id, model.edges)\n : new Set<string>();\n const candidates = acyclicTargets(model, step.id);\n return (\n <Field\n label={ports.length > 1 ? \"Branches\" : \"Connects to\"}\n hint=\"Any step that is not upstream of this one, connected or not\"\n >\n <div className=\"flex flex-col gap-2\">\n {ports.map((port) => {\n const edges = model.edges.filter(\n (candidate) =>\n candidate.from === step.id && candidate.port === port,\n );\n const targets = candidates.filter(\n (candidate) => !edges.some((edge) => edge.to === candidate.id),\n );\n return (\n <div key={port} className=\"flex flex-col gap-1\">\n {ports.length > 1 ? (\n <span className=\"text-[11px] font-medium text-slate-500\">\n {PORT_LABEL[port] ?? port}\n </span>\n ) : null}\n {edges.map((edge) => (\n <div\n key={edge.id}\n className=\"flex min-w-0 items-center justify-between rounded border border-solid border-slate-200 bg-slate-50 px-2 py-1 text-xs text-slate-700\"\n >\n <span className=\"truncate\">→ {stepName(edge.to)}</span>\n <button\n type=\"button\"\n className=\"ml-2 shrink-0 text-[11px] text-red-500\"\n onClick={() => callbacks.removeEdge(edge.id)}\n >\n Disconnect\n </button>\n </div>\n ))}\n <select\n className={inputClass}\n value=\"\"\n disabled={targets.length === 0}\n onChange={(event) => {\n if (event.target.value === \"\") return;\n callbacks.addEdge({\n from: step.id,\n to: event.target.value,\n port,\n });\n }}\n >\n <option value=\"\">\n {targets.length === 0\n ? \"No other step to connect to\"\n : edges.length > 0\n ? \"Also connect to…\"\n : \"Connect to…\"}\n </option>\n {targets.map((target) => (\n <option key={target.id} value={target.id}>\n {target.name || target.key}\n {attached.has(target.id) ? \"\" : \" · detached\"}\n </option>\n ))}\n </select>\n </div>\n );\n })}\n </div>\n </Field>\n );\n}\n\nfunction ErrorPortEditor(props: {\n step: StepModel;\n model: WorkflowModel;\n callbacks: WorkflowEditorCallbacks;\n}) {\n const { step, model, callbacks } = props;\n const errorEdges = model.edges.filter(\n (edge) => edge.from === step.id && edge.port === \"error\",\n );\n const stepName = (id: string) => {\n const target = model.steps.find((entry) => entry.id === id);\n return target ? target.name || target.key : id;\n };\n const targets = acyclicTargets(model, step.id).filter(\n (candidate) => !errorEdges.some((edge) => edge.to === candidate.id),\n );\n return (\n <Field\n label=\"On error\"\n hint=\"Route failures to another step instead of failing the run\"\n >\n <div className=\"flex flex-col gap-1\">\n {errorEdges.map((edge) => (\n <div\n key={edge.id}\n className=\"flex items-center justify-between rounded border border-amber-200 bg-amber-50 px-2 py-1 text-xs text-amber-800\"\n >\n <span>→ {stepName(edge.to)}</span>\n <button\n type=\"button\"\n className=\"text-[11px] text-red-500\"\n onClick={() => callbacks.removeEdge(edge.id)}\n >\n Remove\n </button>\n </div>\n ))}\n <select\n className={inputClass}\n value=\"\"\n disabled={targets.length === 0}\n onChange={(event) => {\n if (event.target.value === \"\") return;\n callbacks.addEdge({\n from: step.id,\n to: event.target.value,\n port: \"error\",\n });\n }}\n >\n <option value=\"\">\n {targets.length === 0\n ? \"No other step to route to\"\n : errorEdges.length > 0\n ? \"Add another error target…\"\n : \"Route errors to…\"}\n </option>\n {targets.map((target) => (\n <option key={target.id} value={target.id}>\n {target.name || target.key}\n </option>\n ))}\n </select>\n </div>\n </Field>\n );\n}\n\n// Splices text at the field's cursor and returns the updated value.\nfunction insertAtCursor(element: HTMLInputElement, text: string): string {\n const start = element.selectionStart ?? element.value.length;\n const end = element.selectionEnd ?? start;\n element.value =\n element.value.slice(0, start) + text + element.value.slice(end);\n return element.value;\n}\n\nfunction IdempotencyField(props: {\n step: StepModel;\n callbacks: WorkflowEditorCallbacks;\n}) {\n const { step, callbacks } = props;\n const ref = useRef<HTMLInputElement>(null);\n const [draft, setDraft] = useState(step.idempotencyKeyExpression ?? \"\");\n const commit = (raw: string) => {\n const next = raw.trim() || null;\n if (next !== step.idempotencyKeyExpression) {\n callbacks.updateStep({ id: step.id, idempotencyKeyExpression: next });\n }\n };\n const field = useExpressionField({\n stepId: step.id,\n label: \"Idempotency key\",\n insert: (expression) => {\n if (!ref.current) return;\n const next = insertAtCursor(ref.current, expression);\n setDraft(next);\n commit(next);\n },\n });\n return (\n <label className=\"block\">\n <span className=\"mb-1 flex items-end justify-between gap-1\">\n <span className=\"block text-xs font-semibold uppercase tracking-wide text-slate-500\">\n Idempotency key\n </span>\n <ExpressionPickerButton\n active={field.active}\n onFocusField={field.focus}\n />\n </span>\n <input\n ref={ref}\n key={`${step.id}-idem`}\n className={`${inputClass} font-mono text-xs`}\n defaultValue={step.idempotencyKeyExpression ?? \"\"}\n placeholder=\"{{trigger.payload.id}}\"\n spellCheck={false}\n onFocus={field.focus}\n onChange={(event) => setDraft(event.target.value)}\n onBlur={(event) => commit(event.target.value)}\n />\n <ExpressionTokenLine value={draft} />\n <p className=\"mt-0.5 text-[11px] text-slate-400\">\n Two executions with the same key count as one side effect\n </p>\n </label>\n );\n}\n\nfunction AdvancedSection(props: {\n step: StepModel;\n model: WorkflowModel;\n callbacks: WorkflowEditorCallbacks;\n}) {\n const { step, callbacks } = props;\n const customised =\n step.retry !== null ||\n step.timeoutSeconds !== null ||\n step.idempotencyKeyExpression !== null ||\n props.model.edges.some(\n (edge) => edge.from === step.id && edge.port === \"error\",\n );\n return (\n <details\n className=\"rounded border border-slate-200 bg-white\"\n open={customised}\n >\n <summary className=\"cursor-pointer px-3 py-2 text-xs font-semibold uppercase tracking-wide text-slate-500\">\n Advanced\n {customised ? (\n <span className=\"ml-2 font-normal normal-case tracking-normal text-slate-400\">\n customised\n </span>\n ) : null}\n </summary>\n <div className=\"flex flex-col gap-3 border-t border-slate-100 p-3\">\n <Field label=\"Timeout (seconds)\" hint=\"Empty uses the runtime default\">\n <input\n key={`${step.id}-timeout-${step.timeoutSeconds ?? \"\"}`}\n type=\"number\"\n min={1}\n className={inputClass}\n defaultValue={step.timeoutSeconds ?? \"\"}\n onBlur={(event) => {\n const raw = event.target.value.trim();\n const next = raw === \"\" ? null : intOrUndefined(raw);\n if (next === undefined || next === 0) return;\n if (next !== step.timeoutSeconds) {\n callbacks.updateStep({ id: step.id, timeoutSeconds: next });\n }\n }}\n />\n </Field>\n {/* Stored on the step, but the runtime does not enforce them yet. */}\n <fieldset\n disabled\n className=\"m-0 flex min-w-0 flex-col gap-3 rounded border border-dashed border-amber-200 p-2 opacity-80\"\n >\n <legend className=\"px-1\">\n <AvailableSoon>retry policy and idempotency key</AvailableSoon>\n </legend>\n <RetryEditor\n value={step.retry}\n onChange={(retry) => callbacks.updateStep({ id: step.id, retry })}\n />\n <IdempotencyField step={step} callbacks={callbacks} />\n </fieldset>\n <ErrorPortEditor\n step={step}\n model={props.model}\n callbacks={callbacks}\n />\n </div>\n </details>\n );\n}\n\nexport function StepPanel(props: {\n step: StepModel;\n model: WorkflowModel;\n callbacks: WorkflowEditorCallbacks;\n onClose: () => void;\n designTime?: DesignTimeService;\n}) {\n const { step, callbacks } = props;\n const form = useBlockForm(step.blockType, props.designTime);\n const missing = missingForBlock(form, step.config, step.connectionId);\n return (\n <div className=\"flex flex-col gap-3 p-4\">\n <PanelHeader title=\"Step\" missing={missing} onClose={props.onClose} />\n <Field label=\"Name\">\n <input\n key={`${step.id}-name`}\n className={inputClass}\n defaultValue={step.name}\n onBlur={(event) => {\n const name = event.target.value.trim();\n if (name && name !== step.name)\n callbacks.updateStep({ id: step.id, name });\n }}\n />\n </Field>\n <Field label=\"Key (used in expressions)\">\n <input\n key={`${step.id}-key`}\n className={inputClass}\n defaultValue={step.key}\n onBlur={(event) => {\n const key = event.target.value.trim();\n if (key && key !== step.key)\n callbacks.updateStep({ id: step.id, key });\n }}\n />\n </Field>\n <ConnectionField\n key={`${step.id}-conn`}\n blockType={step.blockType}\n value={step.connectionId ?? \"\"}\n onChange={(connectionId) =>\n callbacks.updateStep({ id: step.id, connectionId })\n }\n designTime={props.designTime}\n />\n <ConfigSection\n key={`${step.id}-config`}\n blockType={step.blockType}\n form={form}\n config={step.config}\n onChange={(config) => callbacks.updateStep({ id: step.id, config })}\n designTime={props.designTime}\n connectionId={step.connectionId ?? undefined}\n scopeStepId={step.id}\n />\n <FlowPortEditor\n key={`${step.id}-flow`}\n step={step}\n model={props.model}\n callbacks={callbacks}\n />\n <AdvancedSection step={step} model={props.model} callbacks={callbacks} />\n <button\n type=\"button\"\n className=\"mt-2 rounded border border-red-300 px-3 py-1.5 text-xs font-medium text-red-600\"\n onClick={() => {\n callbacks.removeStep(step.id);\n props.onClose();\n }}\n >\n Remove step\n </button>\n </div>\n );\n}\n\nfunction TestTriggerSection(props: { onTest: () => Promise<unknown> }) {\n const [state, setState] = useState<\n { kind: \"idle\" } | { kind: \"loading\" } | { kind: \"done\"; result: string }\n >({ kind: \"idle\" });\n return (\n <div>\n <button\n type=\"button\"\n className=\"rounded bg-slate-800 px-3 py-1.5 text-xs font-medium text-white disabled:opacity-50\"\n disabled={state.kind === \"loading\"}\n onClick={() => {\n setState({ kind: \"loading\" });\n props.onTest().then(\n (result) =>\n setState({\n kind: \"done\",\n result: JSON.stringify(result, null, 2),\n }),\n (error: unknown) =>\n setState({\n kind: \"done\",\n result: error instanceof Error ? error.message : String(error),\n }),\n );\n }}\n >\n {state.kind === \"loading\" ? \"Testing…\" : \"Test trigger\"}\n </button>\n {state.kind === \"done\" ? (\n <pre className=\"mt-2 max-h-48 overflow-auto rounded border border-slate-200 bg-slate-50 p-2 text-[11px] text-slate-700\">\n {state.result}\n </pre>\n ) : null}\n </div>\n );\n}\n\ntype EndpointState =\n | { kind: \"loading\" }\n | { kind: \"empty\" }\n | { kind: \"error\"; message: string }\n | { kind: \"ready\"; endpoint: WebhookEndpoint };\n\n// Loaded once in the panel: the URL box shows it and a piece's setup markdown\n// substitutes it, and two fetches would mint against two reads of `armed`.\nfunction useWebhookEndpoint(\n load: (() => Promise<WebhookEndpoint | null>) | undefined,\n): EndpointState {\n const [state, setState] = useState<EndpointState>({ kind: \"loading\" });\n\n useEffect(() => {\n if (!load) return;\n let cancelled = false;\n // eslint-disable-next-line react-hooks/set-state-in-effect -- marks the load that starts on this very line\n setState({ kind: \"loading\" });\n load().then(\n (endpoint) => {\n if (cancelled) return;\n setState(endpoint ? { kind: \"ready\", endpoint } : { kind: \"empty\" });\n },\n (error: unknown) => {\n if (cancelled) return;\n setState({\n kind: \"error\",\n message: error instanceof Error ? error.message : String(error),\n });\n },\n );\n return () => {\n cancelled = true;\n };\n }, [load]);\n\n return state;\n}\n\n// The endpoint URL is the whole credential, so it is read from the runtime\n// rather than derived here, and only exists once the workflow is enabled.\nfunction WebhookUrlSection(props: { state: EndpointState }) {\n const [copied, setCopied] = useState(false);\n const state = props.state;\n\n return (\n <div>\n <span className=\"mb-1 block text-xs font-semibold uppercase tracking-wide text-slate-500\">\n Endpoint URL\n </span>\n {state.kind === \"loading\" ? (\n <p className=\"text-xs text-slate-400\">Loading…</p>\n ) : null}\n {state.kind === \"empty\" ? (\n <p className=\"text-[11px] text-slate-400\">\n Enable the workflow to mint its endpoint.\n </p>\n ) : null}\n {state.kind === \"error\" ? (\n <p className=\"text-[11px] text-red-600\">{state.message}</p>\n ) : null}\n {state.kind === \"ready\" ? (\n <>\n <div className=\"flex gap-1\">\n <input\n readOnly\n className=\"w-full rounded border border-slate-300 bg-slate-50 px-2 py-1.5 font-mono text-[11px] text-slate-700\"\n value={state.endpoint.url}\n onFocus={(event) => event.currentTarget.select()}\n />\n <button\n type=\"button\"\n className=\"shrink-0 rounded border border-slate-300 px-2 text-xs text-slate-600 hover:border-slate-400\"\n onClick={() => {\n navigator.clipboard.writeText(state.endpoint.url).then(\n () => setCopied(true),\n () => undefined,\n );\n }}\n >\n {copied ? \"Copied\" : \"Copy\"}\n </button>\n </div>\n {!state.endpoint.armed ? (\n <p className=\"mt-1 rounded bg-amber-50 px-2 py-1 text-[11px] text-amber-700\">\n Not accepting deliveries: the workflow is disabled or its webhook\n config is invalid.\n </p>\n ) : null}\n {!state.endpoint.absoluteUrl ? (\n <p className=\"mt-1 rounded bg-amber-50 px-2 py-1 text-[11px] text-amber-700\">\n This reactor does not know its own public address, so the path\n above is missing its origin. Prefix it with the host the provider\n can reach.\n </p>\n ) : null}\n <p className=\"mt-1 text-[11px] text-slate-400\">\n Treat this URL as a secret; anyone holding it can reach the\n endpoint.\n </p>\n </>\n ) : null}\n </div>\n );\n}\n\nexport function TriggerPanel(props: {\n trigger: TriggerModel;\n callbacks: WorkflowEditorCallbacks;\n onClose: () => void;\n designTime?: DesignTimeService;\n}) {\n const { trigger, callbacks } = props;\n const isPieceTrigger = trigger.blockType.includes(\"#trigger:\");\n const form = useBlockForm(trigger.blockType, props.designTime);\n // core#webhook, and any piece trigger the provider pushes to: both are\n // reached through this workflow's endpoint URL.\n const isWebhookTrigger =\n trigger.blockType === \"core#webhook\" ||\n (form !== \"loading\" && form?.triggerStrategy === \"WEBHOOK\");\n // Only a webhook trigger asks. The query mints on first ask, so opening\n // this panel on a schedule or document trigger must not create an endpoint.\n const endpoint = useWebhookEndpoint(\n isWebhookTrigger ? props.designTime?.webhookEndpoint : undefined,\n );\n const missing = missingForBlock(form, trigger.config, trigger.connectionId);\n const setTrigger = (patch: {\n config?: unknown;\n connectionId?: string | null;\n }) =>\n callbacks.setTrigger({\n blockType: trigger.blockType,\n config: patch.config === undefined ? trigger.config : patch.config,\n connectionId:\n patch.connectionId === undefined\n ? trigger.connectionId\n : patch.connectionId,\n });\n return (\n <div className=\"flex flex-col gap-3 p-4\">\n <PanelHeader title=\"Trigger\" missing={missing} onClose={props.onClose} />\n {isWebhookTrigger && props.designTime?.webhookEndpoint ? (\n <WebhookUrlSection state={endpoint} />\n ) : null}\n {isPieceTrigger ? (\n <ConnectionField\n key={`${trigger.id}-conn`}\n blockType={trigger.blockType}\n value={trigger.connectionId ?? \"\"}\n onChange={(connectionId) => setTrigger({ connectionId })}\n designTime={props.designTime}\n />\n ) : null}\n <ConfigSection\n key={trigger.id}\n blockType={trigger.blockType}\n form={form}\n config={trigger.config}\n onChange={(config) => setTrigger({ config })}\n designTime={props.designTime}\n connectionId={trigger.connectionId ?? undefined}\n webhookUrl={\n endpoint.kind === \"ready\" ? endpoint.endpoint.url : undefined\n }\n />\n {isPieceTrigger && props.designTime?.testTrigger ? (\n <TestTriggerSection onTest={props.designTime.testTrigger} />\n ) : null}\n <button\n type=\"button\"\n className=\"mt-2 rounded border border-red-300 px-3 py-1.5 text-xs font-medium text-red-600\"\n onClick={() => {\n callbacks.clearTrigger();\n props.onClose();\n }}\n >\n Remove trigger\n </button>\n </div>\n );\n}\n","// Workflow-level variables: name/value rows exposed to expressions as\n// {{variables.<name>}}. Values are JSON when they parse, strings otherwise.\nimport { useState } from \"react\";\nimport type { VariableModel, WorkflowEditorCallbacks } from \"./model.js\";\n\nconst inputClass =\n \"w-full rounded border border-slate-300 px-2 py-1.5 text-sm text-slate-800\";\n\nconst KEY_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;\n\nfunction stringifyValue(value: unknown): string {\n if (value === undefined || value === null) return \"\";\n if (typeof value === \"string\") return value;\n try {\n return JSON.stringify(value);\n } catch {\n return String(value as number | boolean);\n }\n}\n\n// Numbers, booleans, objects and arrays typed as JSON become values; the\n// rest stays text so \"007\" or a URL never gets mangled.\nexport function parseVariableValue(raw: string): unknown {\n const trimmed = raw.trim();\n if (trimmed === \"\") return null;\n if (/^(-?\\d+(\\.\\d+)?|true|false|null|[[{\"])/.test(trimmed)) {\n try {\n return JSON.parse(trimmed) as unknown;\n } catch {\n return raw;\n }\n }\n return raw;\n}\n\nfunction VariableRow(props: {\n variable: VariableModel;\n callbacks: WorkflowEditorCallbacks;\n}) {\n const { variable, callbacks } = props;\n return (\n <div className=\"flex items-start gap-1\">\n <input\n key={`${variable.id}-key`}\n className={`${inputClass} w-2/5 font-mono text-xs`}\n defaultValue={variable.key}\n readOnly\n title=\"Keys are fixed once created; remove and re-add to rename\"\n />\n <input\n key={`${variable.id}-value-${stringifyValue(variable.value)}`}\n className={`${inputClass} font-mono text-xs`}\n defaultValue={stringifyValue(variable.value)}\n placeholder=\"value\"\n spellCheck={false}\n onBlur={(event) => {\n const next = parseVariableValue(event.target.value);\n if (stringifyValue(next) !== stringifyValue(variable.value)) {\n callbacks.setVariable({\n id: variable.id,\n key: variable.key,\n value: next,\n });\n }\n }}\n />\n <button\n type=\"button\"\n className=\"mt-1.5 shrink-0 text-[11px] text-red-500\"\n title=\"Remove variable\"\n onClick={() => callbacks.removeVariable(variable.id)}\n >\n ✕\n </button>\n </div>\n );\n}\n\nexport function VariablesEditor(props: {\n variables: VariableModel[];\n callbacks: WorkflowEditorCallbacks;\n onClose: () => void;\n}) {\n const [key, setKey] = useState(\"\");\n const [value, setValue] = useState(\"\");\n const trimmedKey = key.trim();\n const keyError =\n trimmedKey === \"\"\n ? null\n : !KEY_PATTERN.test(trimmedKey)\n ? \"Letters, digits and _ only; must not start with a digit\"\n : props.variables.some((variable) => variable.key === trimmedKey)\n ? \"A variable with this name already exists\"\n : null;\n const canAdd = trimmedKey !== \"\" && keyError === null;\n const add = () => {\n if (!canAdd) return;\n props.callbacks.setVariable({\n key: trimmedKey,\n value: parseVariableValue(value),\n });\n setKey(\"\");\n setValue(\"\");\n };\n\n return (\n <div className=\"flex flex-col gap-3 p-4\">\n <div className=\"flex items-center justify-between\">\n <h3 className=\"text-sm font-semibold text-slate-700\">Variables</h3>\n <button\n type=\"button\"\n className=\"text-xs text-slate-400\"\n onClick={props.onClose}\n >\n Close\n </button>\n </div>\n <p className=\"text-[11px] text-slate-400\">\n Reference a variable in any step field as{\" \"}\n <code className=\"font-mono\">{\"{{variables.name}}\"}</code>.\n </p>\n {props.variables.length === 0 ? (\n <p className=\"text-xs text-slate-400\">No variables yet.</p>\n ) : (\n <div className=\"flex flex-col gap-1\">\n {props.variables.map((variable) => (\n <VariableRow\n key={variable.id}\n variable={variable}\n callbacks={props.callbacks}\n />\n ))}\n </div>\n )}\n <div className=\"rounded border border-slate-200 bg-white p-2\">\n <div className=\"mb-1 text-[10px] font-semibold uppercase tracking-wide text-slate-400\">\n Add variable\n </div>\n <div className=\"flex items-start gap-1\">\n <input\n className={`${inputClass} w-2/5 font-mono text-xs`}\n placeholder=\"name\"\n value={key}\n spellCheck={false}\n onChange={(event) => setKey(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") add();\n }}\n />\n <input\n className={`${inputClass} font-mono text-xs`}\n placeholder=\"value\"\n value={value}\n spellCheck={false}\n onChange={(event) => setValue(event.target.value)}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") add();\n }}\n />\n <button\n type=\"button\"\n className=\"mt-0.5 shrink-0 rounded bg-slate-800 px-2 py-1 text-xs font-medium text-white disabled:opacity-40\"\n disabled={!canAdd}\n onClick={add}\n >\n Add\n </button>\n </div>\n {keyError ? (\n <p className=\"mt-1 text-[11px] text-red-500\">{keyError}</p>\n ) : null}\n </div>\n </div>\n );\n}\n","export default function cc(names) {\n if (typeof names === \"string\" || typeof names === \"number\") return \"\" + names\n\n let out = \"\"\n\n if (Array.isArray(names)) {\n for (let i = 0, tmp; i < names.length; i++) {\n if ((tmp = cc(names[i])) !== \"\") {\n out += (out && \" \") + tmp\n }\n }\n } else {\n for (let k in names) {\n if (names[k]) out += (out && \" \") + k\n }\n }\n\n return out\n}\n","var noop = {value: () => {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _) || /[\\s.]/.test(t)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n","import namespaces from \"./namespaces.js\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins\n}\n","import namespace from \"./namespace.js\";\nimport {xhtml} from \"./namespaces.js\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","import {Selection} from \"./index.js\";\nimport selector from \"../selector.js\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","// Given something array like (or null), returns something that is strictly an\n// array. This is used to ensure that array-like objects passed to d3.selectAll\n// or selection.selectAll are converted into proper arrays when creating a\n// selection; we don’t ever want to create a selection backed by a live\n// HTMLCollection or NodeList. However, note that selection.selectAll will use a\n// static NodeList as a group, since it safely derived from querySelectorAll.\nexport default function array(x) {\n return x == null ? [] : Array.isArray(x) ? x : Array.from(x);\n}\n","function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n","import {Selection} from \"./index.js\";\nimport array from \"../array.js\";\nimport selectorAll from \"../selectorAll.js\";\n\nfunction arrayAll(select) {\n return function() {\n return array(select.apply(this, arguments));\n };\n}\n\nexport default function(select) {\n if (typeof select === \"function\") select = arrayAll(select);\n else select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n\nexport function childMatcher(selector) {\n return function(node) {\n return node.matches(selector);\n };\n}\n\n","import {childMatcher} from \"../matcher.js\";\n\nvar find = Array.prototype.find;\n\nfunction childFind(match) {\n return function() {\n return find.call(this.children, match);\n };\n}\n\nfunction childFirst() {\n return this.firstElementChild;\n}\n\nexport default function(match) {\n return this.select(match == null ? childFirst\n : childFind(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {childMatcher} from \"../matcher.js\";\n\nvar filter = Array.prototype.filter;\n\nfunction children() {\n return Array.from(this.children);\n}\n\nfunction childrenFilter(match) {\n return function() {\n return filter.call(this.children, match);\n };\n}\n\nexport default function(match) {\n return this.selectAll(match == null ? children\n : childrenFilter(typeof match === \"function\" ? match : childMatcher(match)));\n}\n","import {Selection} from \"./index.js\";\nimport matcher from \"../matcher.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {Selection} from \"./index.js\";\nimport {EnterNode} from \"./enter.js\";\nimport constant from \"../constant.js\";\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = new Map,\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + \"\";\n if (nodeByKeyValue.has(keyValue)) {\n exit[i] = node;\n } else {\n nodeByKeyValue.set(keyValue, node);\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = key.call(parent, data[i], i, data) + \"\";\n if (node = nodeByKeyValue.get(keyValue)) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue.delete(keyValue);\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) {\n exit[i] = node;\n }\n }\n}\n\nfunction datum(node) {\n return node.__data__;\n}\n\nexport default function(value, key) {\n if (!arguments.length) return Array.from(this, datum);\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = arraylike(value.call(parent, parent && parent.__data__, j, parents)),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n\n// Given some data, this returns an array-like view of it: an object that\n// exposes a length property and allows numeric indexing. Note that unlike\n// selectAll, this isn’t worried about “live” collections because the resulting\n// array will only be used briefly while data is being bound. (It is possible to\n// cause the data to change while iterating by using a key function, but please\n// don’t; we’d rather avoid a gratuitous copy.)\nfunction arraylike(data) {\n return typeof data === \"object\" && \"length\" in data\n ? data // Array, TypedArray, NodeList, array-like\n : Array.from(data); // Map, Set, iterable, string, or anything else\n}\n","import sparse from \"./sparse.js\";\nimport {Selection} from \"./index.js\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n if (typeof onenter === \"function\") {\n enter = onenter(enter);\n if (enter) enter = enter.selection();\n } else {\n enter = enter.append(onenter + \"\");\n }\n if (onupdate != null) {\n update = onupdate(update);\n if (update) update = update.selection();\n }\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(context) {\n var selection = context.selection ? context.selection() : context;\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n","export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n","import {Selection} from \"./index.js\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n","export default function() {\n return Array.from(this);\n}\n","export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n","export default function() {\n let size = 0;\n for (const node of this) ++size; // eslint-disable-line no-unused-vars\n return size;\n}\n","export default function() {\n return !this.node();\n}\n","export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n","import namespace from \"../namespace.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n","import defaultView from \"../window.js\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n","import creator from \"../creator.js\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n","import creator from \"../creator.js\";\nimport selector from \"../selector.js\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n","function selection_cloneShallow() {\n var clone = this.cloneNode(false), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nfunction selection_cloneDeep() {\n var clone = this.cloneNode(true), parent = this.parentNode;\n return parent ? parent.insertBefore(clone, this.nextSibling) : clone;\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n","function contextListener(listener) {\n return function(event) {\n listener.call(this, event, this.__data__);\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, options) {\n return function() {\n var on = this.__on, o, listener = contextListener(value);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.options);\n this.addEventListener(o.type, o.listener = listener, o.options = options);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, options);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, options) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));\n return this;\n}\n","import defaultView from \"../window.js\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n","export default function*() {\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) yield node;\n }\n }\n}\n","import selection_select from \"./select.js\";\nimport selection_selectAll from \"./selectAll.js\";\nimport selection_selectChild from \"./selectChild.js\";\nimport selection_selectChildren from \"./selectChildren.js\";\nimport selection_filter from \"./filter.js\";\nimport selection_data from \"./data.js\";\nimport selection_enter from \"./enter.js\";\nimport selection_exit from \"./exit.js\";\nimport selection_join from \"./join.js\";\nimport selection_merge from \"./merge.js\";\nimport selection_order from \"./order.js\";\nimport selection_sort from \"./sort.js\";\nimport selection_call from \"./call.js\";\nimport selection_nodes from \"./nodes.js\";\nimport selection_node from \"./node.js\";\nimport selection_size from \"./size.js\";\nimport selection_empty from \"./empty.js\";\nimport selection_each from \"./each.js\";\nimport selection_attr from \"./attr.js\";\nimport selection_style from \"./style.js\";\nimport selection_property from \"./property.js\";\nimport selection_classed from \"./classed.js\";\nimport selection_text from \"./text.js\";\nimport selection_html from \"./html.js\";\nimport selection_raise from \"./raise.js\";\nimport selection_lower from \"./lower.js\";\nimport selection_append from \"./append.js\";\nimport selection_insert from \"./insert.js\";\nimport selection_remove from \"./remove.js\";\nimport selection_clone from \"./clone.js\";\nimport selection_datum from \"./datum.js\";\nimport selection_on from \"./on.js\";\nimport selection_dispatch from \"./dispatch.js\";\nimport selection_iterator from \"./iterator.js\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nfunction selection_selection() {\n return this;\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n selectChild: selection_selectChild,\n selectChildren: selection_selectChildren,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n selection: selection_selection,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch,\n [Symbol.iterator]: selection_iterator\n};\n\nexport default selection;\n","import {Selection, root} from \"./selection/index.js\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n","export default function(event) {\n let sourceEvent;\n while (sourceEvent = event.sourceEvent) event = sourceEvent;\n return event;\n}\n","import sourceEvent from \"./sourceEvent.js\";\n\nexport default function(event, node) {\n event = sourceEvent(event);\n if (node === undefined) node = event.currentTarget;\n if (node) {\n var svg = node.ownerSVGElement || node;\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n if (node.getBoundingClientRect) {\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n }\n }\n return [event.pageX, event.pageY];\n}\n","// These are typically used in conjunction with noevent to ensure that we can\n// preventDefault on the event.\nexport const nonpassive = {passive: false};\nexport const nonpassivecapture = {capture: true, passive: false};\n\nexport function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {select} from \"d3-selection\";\nimport noevent, {nonpassivecapture} from \"./noevent.js\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, nonpassivecapture);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, nonpassivecapture);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, nonpassivecapture);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","export default x => () => x;\n","export default function DragEvent(type, {\n sourceEvent,\n subject,\n target,\n identifier,\n active,\n x, y, dx, dy,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n subject: {value: subject, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n identifier: {value: identifier, enumerable: true, configurable: true},\n active: {value: active, enumerable: true, configurable: true},\n x: {value: x, enumerable: true, configurable: true},\n y: {value: y, enumerable: true, configurable: true},\n dx: {value: dx, enumerable: true, configurable: true},\n dy: {value: dy, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\n","import {dispatch} from \"d3-dispatch\";\nimport {select, pointer} from \"d3-selection\";\nimport nodrag, {yesdrag} from \"./nodrag.js\";\nimport noevent, {nonpassive, nonpassivecapture, nopropagation} from \"./noevent.js\";\nimport constant from \"./constant.js\";\nimport DragEvent from \"./event.js\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter(event) {\n return !event.ctrlKey && !event.button;\n}\n\nfunction defaultContainer() {\n return this.parentNode;\n}\n\nfunction defaultSubject(event, d) {\n return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nexport default function() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved, nonpassive)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned(event, d) {\n if (touchending || !filter.call(this, event, d)) return;\n var gesture = beforestart(this, container.call(this, event, d), event, d, \"mouse\");\n if (!gesture) return;\n select(event.view)\n .on(\"mousemove.drag\", mousemoved, nonpassivecapture)\n .on(\"mouseup.drag\", mouseupped, nonpassivecapture);\n nodrag(event.view);\n nopropagation(event);\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\", event);\n }\n\n function mousemoved(event) {\n noevent(event);\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\", event);\n }\n\n function mouseupped(event) {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent(event);\n gestures.mouse(\"end\", event);\n }\n\n function touchstarted(event, d) {\n if (!filter.call(this, event, d)) return;\n var touches = event.changedTouches,\n c = container.call(this, event, d),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {\n nopropagation(event);\n gesture(\"start\", event, touches[i]);\n }\n }\n }\n\n function touchmoved(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent(event);\n gesture(\"drag\", event, touches[i]);\n }\n }\n }\n\n function touchended(event) {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation(event);\n gesture(\"end\", event, touches[i]);\n }\n }\n }\n\n function beforestart(that, container, event, d, identifier, touch) {\n var dispatch = listeners.copy(),\n p = pointer(touch || event, container), dx, dy,\n s;\n\n if ((s = subject.call(that, new DragEvent(\"beforestart\", {\n sourceEvent: event,\n target: drag,\n identifier,\n active,\n x: p[0],\n y: p[1],\n dx: 0,\n dy: 0,\n dispatch\n }), d)) == null) return;\n\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n\n return function gesture(type, event, touch) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[identifier] = gesture, n = active++; break;\n case \"end\": delete gestures[identifier], --active; // falls through\n case \"drag\": p = pointer(touch || event, container), n = active; break;\n }\n dispatch.call(\n type,\n that,\n new DragEvent(type, {\n sourceEvent: event,\n subject: s,\n target: drag,\n identifier,\n active: n,\n x: p[0] + dx,\n y: p[1] + dy,\n dx: p[0] - p0[0],\n dy: p[1] - p0[1],\n dispatch\n }),\n d\n );\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n}\n","export default function(constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\n\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n for (var key in definition) prototype[key] = definition[key];\n return prototype;\n}\n","import define, {extend} from \"./define.js\";\n\nexport function Color() {}\n\nexport var darker = 0.7;\nexport var brighter = 1 / darker;\n\nvar reI = \"\\\\s*([+-]?\\\\d+)\\\\s*\",\n reN = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)\\\\s*\",\n reP = \"\\\\s*([+-]?(?:\\\\d*\\\\.)?\\\\d+(?:[eE][+-]?\\\\d+)?)%\\\\s*\",\n reHex = /^#([0-9a-f]{3,8})$/,\n reRgbInteger = new RegExp(`^rgb\\\\(${reI},${reI},${reI}\\\\)$`),\n reRgbPercent = new RegExp(`^rgb\\\\(${reP},${reP},${reP}\\\\)$`),\n reRgbaInteger = new RegExp(`^rgba\\\\(${reI},${reI},${reI},${reN}\\\\)$`),\n reRgbaPercent = new RegExp(`^rgba\\\\(${reP},${reP},${reP},${reN}\\\\)$`),\n reHslPercent = new RegExp(`^hsl\\\\(${reN},${reP},${reP}\\\\)$`),\n reHslaPercent = new RegExp(`^hsla\\\\(${reN},${reP},${reP},${reN}\\\\)$`);\n\nvar named = {\n aliceblue: 0xf0f8ff,\n antiquewhite: 0xfaebd7,\n aqua: 0x00ffff,\n aquamarine: 0x7fffd4,\n azure: 0xf0ffff,\n beige: 0xf5f5dc,\n bisque: 0xffe4c4,\n black: 0x000000,\n blanchedalmond: 0xffebcd,\n blue: 0x0000ff,\n blueviolet: 0x8a2be2,\n brown: 0xa52a2a,\n burlywood: 0xdeb887,\n cadetblue: 0x5f9ea0,\n chartreuse: 0x7fff00,\n chocolate: 0xd2691e,\n coral: 0xff7f50,\n cornflowerblue: 0x6495ed,\n cornsilk: 0xfff8dc,\n crimson: 0xdc143c,\n cyan: 0x00ffff,\n darkblue: 0x00008b,\n darkcyan: 0x008b8b,\n darkgoldenrod: 0xb8860b,\n darkgray: 0xa9a9a9,\n darkgreen: 0x006400,\n darkgrey: 0xa9a9a9,\n darkkhaki: 0xbdb76b,\n darkmagenta: 0x8b008b,\n darkolivegreen: 0x556b2f,\n darkorange: 0xff8c00,\n darkorchid: 0x9932cc,\n darkred: 0x8b0000,\n darksalmon: 0xe9967a,\n darkseagreen: 0x8fbc8f,\n darkslateblue: 0x483d8b,\n darkslategray: 0x2f4f4f,\n darkslategrey: 0x2f4f4f,\n darkturquoise: 0x00ced1,\n darkviolet: 0x9400d3,\n deeppink: 0xff1493,\n deepskyblue: 0x00bfff,\n dimgray: 0x696969,\n dimgrey: 0x696969,\n dodgerblue: 0x1e90ff,\n firebrick: 0xb22222,\n floralwhite: 0xfffaf0,\n forestgreen: 0x228b22,\n fuchsia: 0xff00ff,\n gainsboro: 0xdcdcdc,\n ghostwhite: 0xf8f8ff,\n gold: 0xffd700,\n goldenrod: 0xdaa520,\n gray: 0x808080,\n green: 0x008000,\n greenyellow: 0xadff2f,\n grey: 0x808080,\n honeydew: 0xf0fff0,\n hotpink: 0xff69b4,\n indianred: 0xcd5c5c,\n indigo: 0x4b0082,\n ivory: 0xfffff0,\n khaki: 0xf0e68c,\n lavender: 0xe6e6fa,\n lavenderblush: 0xfff0f5,\n lawngreen: 0x7cfc00,\n lemonchiffon: 0xfffacd,\n lightblue: 0xadd8e6,\n lightcoral: 0xf08080,\n lightcyan: 0xe0ffff,\n lightgoldenrodyellow: 0xfafad2,\n lightgray: 0xd3d3d3,\n lightgreen: 0x90ee90,\n lightgrey: 0xd3d3d3,\n lightpink: 0xffb6c1,\n lightsalmon: 0xffa07a,\n lightseagreen: 0x20b2aa,\n lightskyblue: 0x87cefa,\n lightslategray: 0x778899,\n lightslategrey: 0x778899,\n lightsteelblue: 0xb0c4de,\n lightyellow: 0xffffe0,\n lime: 0x00ff00,\n limegreen: 0x32cd32,\n linen: 0xfaf0e6,\n magenta: 0xff00ff,\n maroon: 0x800000,\n mediumaquamarine: 0x66cdaa,\n mediumblue: 0x0000cd,\n mediumorchid: 0xba55d3,\n mediumpurple: 0x9370db,\n mediumseagreen: 0x3cb371,\n mediumslateblue: 0x7b68ee,\n mediumspringgreen: 0x00fa9a,\n mediumturquoise: 0x48d1cc,\n mediumvioletred: 0xc71585,\n midnightblue: 0x191970,\n mintcream: 0xf5fffa,\n mistyrose: 0xffe4e1,\n moccasin: 0xffe4b5,\n navajowhite: 0xffdead,\n navy: 0x000080,\n oldlace: 0xfdf5e6,\n olive: 0x808000,\n olivedrab: 0x6b8e23,\n orange: 0xffa500,\n orangered: 0xff4500,\n orchid: 0xda70d6,\n palegoldenrod: 0xeee8aa,\n palegreen: 0x98fb98,\n paleturquoise: 0xafeeee,\n palevioletred: 0xdb7093,\n papayawhip: 0xffefd5,\n peachpuff: 0xffdab9,\n peru: 0xcd853f,\n pink: 0xffc0cb,\n plum: 0xdda0dd,\n powderblue: 0xb0e0e6,\n purple: 0x800080,\n rebeccapurple: 0x663399,\n red: 0xff0000,\n rosybrown: 0xbc8f8f,\n royalblue: 0x4169e1,\n saddlebrown: 0x8b4513,\n salmon: 0xfa8072,\n sandybrown: 0xf4a460,\n seagreen: 0x2e8b57,\n seashell: 0xfff5ee,\n sienna: 0xa0522d,\n silver: 0xc0c0c0,\n skyblue: 0x87ceeb,\n slateblue: 0x6a5acd,\n slategray: 0x708090,\n slategrey: 0x708090,\n snow: 0xfffafa,\n springgreen: 0x00ff7f,\n steelblue: 0x4682b4,\n tan: 0xd2b48c,\n teal: 0x008080,\n thistle: 0xd8bfd8,\n tomato: 0xff6347,\n turquoise: 0x40e0d0,\n violet: 0xee82ee,\n wheat: 0xf5deb3,\n white: 0xffffff,\n whitesmoke: 0xf5f5f5,\n yellow: 0xffff00,\n yellowgreen: 0x9acd32\n};\n\ndefine(Color, color, {\n copy(channels) {\n return Object.assign(new this.constructor, this, channels);\n },\n displayable() {\n return this.rgb().displayable();\n },\n hex: color_formatHex, // Deprecated! Use color.formatHex.\n formatHex: color_formatHex,\n formatHex8: color_formatHex8,\n formatHsl: color_formatHsl,\n formatRgb: color_formatRgb,\n toString: color_formatRgb\n});\n\nfunction color_formatHex() {\n return this.rgb().formatHex();\n}\n\nfunction color_formatHex8() {\n return this.rgb().formatHex8();\n}\n\nfunction color_formatHsl() {\n return hslConvert(this).formatHsl();\n}\n\nfunction color_formatRgb() {\n return this.rgb().formatRgb();\n}\n\nexport default function color(format) {\n var m, l;\n format = (format + \"\").trim().toLowerCase();\n return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000\n : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00\n : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000\n : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000\n : null) // invalid hex\n : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0)\n : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%)\n : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1)\n : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1)\n : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%)\n : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1)\n : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins\n : format === \"transparent\" ? new Rgb(NaN, NaN, NaN, 0)\n : null;\n}\n\nfunction rgbn(n) {\n return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1);\n}\n\nfunction rgba(r, g, b, a) {\n if (a <= 0) r = g = b = NaN;\n return new Rgb(r, g, b, a);\n}\n\nexport function rgbConvert(o) {\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Rgb;\n o = o.rgb();\n return new Rgb(o.r, o.g, o.b, o.opacity);\n}\n\nexport function rgb(r, g, b, opacity) {\n return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity);\n}\n\nexport function Rgb(r, g, b, opacity) {\n this.r = +r;\n this.g = +g;\n this.b = +b;\n this.opacity = +opacity;\n}\n\ndefine(Rgb, rgb, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity);\n },\n rgb() {\n return this;\n },\n clamp() {\n return new Rgb(clampi(this.r), clampi(this.g), clampi(this.b), clampa(this.opacity));\n },\n displayable() {\n return (-0.5 <= this.r && this.r < 255.5)\n && (-0.5 <= this.g && this.g < 255.5)\n && (-0.5 <= this.b && this.b < 255.5)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n hex: rgb_formatHex, // Deprecated! Use color.formatHex.\n formatHex: rgb_formatHex,\n formatHex8: rgb_formatHex8,\n formatRgb: rgb_formatRgb,\n toString: rgb_formatRgb\n}));\n\nfunction rgb_formatHex() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}`;\n}\n\nfunction rgb_formatHex8() {\n return `#${hex(this.r)}${hex(this.g)}${hex(this.b)}${hex((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;\n}\n\nfunction rgb_formatRgb() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"rgb(\" : \"rgba(\"}${clampi(this.r)}, ${clampi(this.g)}, ${clampi(this.b)}${a === 1 ? \")\" : `, ${a})`}`;\n}\n\nfunction clampa(opacity) {\n return isNaN(opacity) ? 1 : Math.max(0, Math.min(1, opacity));\n}\n\nfunction clampi(value) {\n return Math.max(0, Math.min(255, Math.round(value) || 0));\n}\n\nfunction hex(value) {\n value = clampi(value);\n return (value < 16 ? \"0\" : \"\") + value.toString(16);\n}\n\nfunction hsla(h, s, l, a) {\n if (a <= 0) h = s = l = NaN;\n else if (l <= 0 || l >= 1) h = s = NaN;\n else if (s <= 0) h = NaN;\n return new Hsl(h, s, l, a);\n}\n\nexport function hslConvert(o) {\n if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);\n if (!(o instanceof Color)) o = color(o);\n if (!o) return new Hsl;\n if (o instanceof Hsl) return o;\n o = o.rgb();\n var r = o.r / 255,\n g = o.g / 255,\n b = o.b / 255,\n min = Math.min(r, g, b),\n max = Math.max(r, g, b),\n h = NaN,\n s = max - min,\n l = (max + min) / 2;\n if (s) {\n if (r === max) h = (g - b) / s + (g < b) * 6;\n else if (g === max) h = (b - r) / s + 2;\n else h = (r - g) / s + 4;\n s /= l < 0.5 ? max + min : 2 - max - min;\n h *= 60;\n } else {\n s = l > 0 && l < 1 ? 0 : h;\n }\n return new Hsl(h, s, l, o.opacity);\n}\n\nexport function hsl(h, s, l, opacity) {\n return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity);\n}\n\nfunction Hsl(h, s, l, opacity) {\n this.h = +h;\n this.s = +s;\n this.l = +l;\n this.opacity = +opacity;\n}\n\ndefine(Hsl, hsl, extend(Color, {\n brighter(k) {\n k = k == null ? brighter : Math.pow(brighter, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n darker(k) {\n k = k == null ? darker : Math.pow(darker, k);\n return new Hsl(this.h, this.s, this.l * k, this.opacity);\n },\n rgb() {\n var h = this.h % 360 + (this.h < 0) * 360,\n s = isNaN(h) || isNaN(this.s) ? 0 : this.s,\n l = this.l,\n m2 = l + (l < 0.5 ? l : 1 - l) * s,\n m1 = 2 * l - m2;\n return new Rgb(\n hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2),\n hsl2rgb(h, m1, m2),\n hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2),\n this.opacity\n );\n },\n clamp() {\n return new Hsl(clamph(this.h), clampt(this.s), clampt(this.l), clampa(this.opacity));\n },\n displayable() {\n return (0 <= this.s && this.s <= 1 || isNaN(this.s))\n && (0 <= this.l && this.l <= 1)\n && (0 <= this.opacity && this.opacity <= 1);\n },\n formatHsl() {\n const a = clampa(this.opacity);\n return `${a === 1 ? \"hsl(\" : \"hsla(\"}${clamph(this.h)}, ${clampt(this.s) * 100}%, ${clampt(this.l) * 100}%${a === 1 ? \")\" : `, ${a})`}`;\n }\n}));\n\nfunction clamph(value) {\n value = (value || 0) % 360;\n return value < 0 ? value + 360 : value;\n}\n\nfunction clampt(value) {\n return Math.max(0, Math.min(1, value || 0));\n}\n\n/* From FvD 13.37, CSS Color Module Level 3 */\nfunction hsl2rgb(h, m1, m2) {\n return (h < 60 ? m1 + (m2 - m1) * h / 60\n : h < 180 ? m2\n : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60\n : m1) * 255;\n}\n","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1, t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0\n + (4 - 6 * t2 + 3 * t3) * v1\n + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2\n + t3 * v3) / 6;\n}\n\nexport default function(values) {\n var n = values.length - 1;\n return function(t) {\n var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","import {basis} from \"./basis.js\";\n\nexport default function(values) {\n var n = values.length;\n return function(t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}\n","export default x => () => x;\n","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function(t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\n\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function(a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\n\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}\n","import {rgb as colorRgb} from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, {gamma} from \"./color.js\";\n\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function(t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function(colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i, color;\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function(t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);\n","export default function(a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function(t) {\n for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;\n return c;\n };\n}\n\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}\n","import value from \"./value.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\n\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);\n for (; i < nb; ++i) c[i] = b[i];\n\n return function(t) {\n for (i = 0; i < na; ++i) c[i] = x[i](t);\n return c;\n };\n}\n","export default function(a, b) {\n var d = new Date;\n return a = +a, b = +b, function(t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}\n","export default function(a, b) {\n return a = +a, b = +b, function(t) {\n return a * (1 - t) + b * t;\n };\n}\n","import value from \"./value.js\";\n\nexport default function(a, b) {\n var i = {},\n c = {},\n k;\n\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function(t) {\n for (k in i) c[k] = i[k](t);\n return c;\n };\n}\n","import number from \"./number.js\";\n\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function() {\n return b;\n };\n}\n\nfunction one(b) {\n return function(t) {\n return b(t) + \"\";\n };\n}\n\nexport default function(a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b\n am, // current match in a\n bm, // current match in b\n bs, // string preceding current number in b, if any\n i = -1, // index in s\n s = [], // string constants and placeholders\n q = []; // number interpolators\n\n // Coerce inputs to strings.\n a = a + \"\", b = b + \"\";\n\n // Interpolate pairs of numbers in a & b.\n while ((am = reA.exec(a))\n && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) { // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else { // interpolate non-matching numbers\n s[++i] = null;\n q.push({i: i, x: number(am, bm)});\n }\n bi = reB.lastIndex;\n }\n\n // Add remains of b.\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n return s.length < 2 ? (q[0]\n ? one(q[0].x)\n : zero(b))\n : (b = q.length, function(t) {\n for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n });\n}\n","import {color} from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport {genericArray} from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, {isNumberArray} from \"./numberArray.js\";\n\nexport default function(a, b) {\n var t = typeof b, c;\n return b == null || t === \"boolean\" ? constant(b)\n : (t === \"number\" ? number\n : t === \"string\" ? ((c = color(b)) ? (b = c, rgb) : string)\n : b instanceof color ? rgb\n : b instanceof Date ? date\n : isNumberArray(b) ? numberArray\n : Array.isArray(b) ? genericArray\n : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object\n : number)(a, b);\n}\n","var degrees = 180 / Math.PI;\n\nexport var identity = {\n translateX: 0,\n translateY: 0,\n rotate: 0,\n skewX: 0,\n scaleX: 1,\n scaleY: 1\n};\n\nexport default function(a, b, c, d, e, f) {\n var scaleX, scaleY, skewX;\n if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;\n if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;\n if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;\n if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;\n return {\n translateX: e,\n translateY: f,\n rotate: Math.atan2(b, a) * degrees,\n skewX: Math.atan(skewX) * degrees,\n scaleX: scaleX,\n scaleY: scaleY\n };\n}\n","import decompose, {identity} from \"./decompose.js\";\n\nvar svgNode;\n\n/* eslint-disable no-undef */\nexport function parseCss(value) {\n const m = new (typeof DOMMatrix === \"function\" ? DOMMatrix : WebKitCSSMatrix)(value + \"\");\n return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);\n}\n\nexport function parseSvg(value) {\n if (value == null) return identity;\n if (!svgNode) svgNode = document.createElementNS(\"http://www.w3.org/2000/svg\", \"g\");\n svgNode.setAttribute(\"transform\", value);\n if (!(value = svgNode.transform.baseVal.consolidate())) return identity;\n value = value.matrix;\n return decompose(value.a, value.b, value.c, value.d, value.e, value.f);\n}\n","import number from \"../number.js\";\nimport {parseCss, parseSvg} from \"./parse.js\";\n\nfunction interpolateTransform(parse, pxComma, pxParen, degParen) {\n\n function pop(s) {\n return s.length ? s.pop() + \" \" : \"\";\n }\n\n function translate(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(\"translate(\", null, pxComma, null, pxParen);\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb || yb) {\n s.push(\"translate(\" + xb + pxComma + yb + pxParen);\n }\n }\n\n function rotate(a, b, s, q) {\n if (a !== b) {\n if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path\n q.push({i: s.push(pop(s) + \"rotate(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"rotate(\" + b + degParen);\n }\n }\n\n function skewX(a, b, s, q) {\n if (a !== b) {\n q.push({i: s.push(pop(s) + \"skewX(\", null, degParen) - 2, x: number(a, b)});\n } else if (b) {\n s.push(pop(s) + \"skewX(\" + b + degParen);\n }\n }\n\n function scale(xa, ya, xb, yb, s, q) {\n if (xa !== xb || ya !== yb) {\n var i = s.push(pop(s) + \"scale(\", null, \",\", null, \")\");\n q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)});\n } else if (xb !== 1 || yb !== 1) {\n s.push(pop(s) + \"scale(\" + xb + \",\" + yb + \")\");\n }\n }\n\n return function(a, b) {\n var s = [], // string constants and placeholders\n q = []; // number interpolators\n a = parse(a), b = parse(b);\n translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q);\n rotate(a.rotate, b.rotate, s, q);\n skewX(a.skewX, b.skewX, s, q);\n scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q);\n a = b = null; // gc\n return function(t) {\n var i = -1, n = q.length, o;\n while (++i < n) s[(o = q[i]).i] = o.x(t);\n return s.join(\"\");\n };\n };\n}\n\nexport var interpolateTransformCss = interpolateTransform(parseCss, \"px, \", \"px)\", \"deg)\");\nexport var interpolateTransformSvg = interpolateTransform(parseSvg, \", \", \")\", \")\");\n","var epsilon2 = 1e-12;\n\nfunction cosh(x) {\n return ((x = Math.exp(x)) + 1 / x) / 2;\n}\n\nfunction sinh(x) {\n return ((x = Math.exp(x)) - 1 / x) / 2;\n}\n\nfunction tanh(x) {\n return ((x = Math.exp(2 * x)) - 1) / (x + 1);\n}\n\nexport default (function zoomRho(rho, rho2, rho4) {\n\n // p0 = [ux0, uy0, w0]\n // p1 = [ux1, uy1, w1]\n function zoom(p0, p1) {\n var ux0 = p0[0], uy0 = p0[1], w0 = p0[2],\n ux1 = p1[0], uy1 = p1[1], w1 = p1[2],\n dx = ux1 - ux0,\n dy = uy1 - uy0,\n d2 = dx * dx + dy * dy,\n i,\n S;\n\n // Special case for u0 ≅ u1.\n if (d2 < epsilon2) {\n S = Math.log(w1 / w0) / rho;\n i = function(t) {\n return [\n ux0 + t * dx,\n uy0 + t * dy,\n w0 * Math.exp(rho * t * S)\n ];\n }\n }\n\n // General case.\n else {\n var d1 = Math.sqrt(d2),\n b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),\n b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),\n r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),\n r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);\n S = (r1 - r0) / rho;\n i = function(t) {\n var s = t * S,\n coshr0 = cosh(r0),\n u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));\n return [\n ux0 + u * dx,\n uy0 + u * dy,\n w0 * coshr0 / cosh(rho * s + r0)\n ];\n }\n }\n\n i.duration = S * 1000 * rho / Math.SQRT2;\n\n return i;\n }\n\n zoom.rho = function(_) {\n var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2;\n return zoomRho(_1, _2, _4);\n };\n\n return zoom;\n})(Math.SQRT2, 2, 4);\n","var frame = 0, // is an animation frame pending?\n timeout = 0, // is a timeout pending?\n interval = 0, // are any timers active?\n pokeDelay = 1000, // how frequently we check for clock skew\n taskHead,\n taskTail,\n clockLast = 0,\n clockNow = 0,\n clockSkew = 0,\n clock = typeof performance === \"object\" && performance.now ? performance : Date,\n setFrame = typeof window === \"object\" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };\n\nexport function now() {\n return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);\n}\n\nfunction clearNow() {\n clockNow = 0;\n}\n\nexport function Timer() {\n this._call =\n this._time =\n this._next = null;\n}\n\nTimer.prototype = timer.prototype = {\n constructor: Timer,\n restart: function(callback, delay, time) {\n if (typeof callback !== \"function\") throw new TypeError(\"callback is not a function\");\n time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);\n if (!this._next && taskTail !== this) {\n if (taskTail) taskTail._next = this;\n else taskHead = this;\n taskTail = this;\n }\n this._call = callback;\n this._time = time;\n sleep();\n },\n stop: function() {\n if (this._call) {\n this._call = null;\n this._time = Infinity;\n sleep();\n }\n }\n};\n\nexport function timer(callback, delay, time) {\n var t = new Timer;\n t.restart(callback, delay, time);\n return t;\n}\n\nexport function timerFlush() {\n now(); // Get the current time, if not already set.\n ++frame; // Pretend we’ve set an alarm, if we haven’t already.\n var t = taskHead, e;\n while (t) {\n if ((e = clockNow - t._time) >= 0) t._call.call(undefined, e);\n t = t._next;\n }\n --frame;\n}\n\nfunction wake() {\n clockNow = (clockLast = clock.now()) + clockSkew;\n frame = timeout = 0;\n try {\n timerFlush();\n } finally {\n frame = 0;\n nap();\n clockNow = 0;\n }\n}\n\nfunction poke() {\n var now = clock.now(), delay = now - clockLast;\n if (delay > pokeDelay) clockSkew -= delay, clockLast = now;\n}\n\nfunction nap() {\n var t0, t1 = taskHead, t2, time = Infinity;\n while (t1) {\n if (t1._call) {\n if (time > t1._time) time = t1._time;\n t0 = t1, t1 = t1._next;\n } else {\n t2 = t1._next, t1._next = null;\n t1 = t0 ? t0._next = t2 : taskHead = t2;\n }\n }\n taskTail = t0;\n sleep(time);\n}\n\nfunction sleep(time) {\n if (frame) return; // Soonest alarm already set, or will be.\n if (timeout) timeout = clearTimeout(timeout);\n var delay = time - clockNow; // Strictly less than if we recomputed clockNow.\n if (delay > 24) {\n if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);\n if (interval) interval = clearInterval(interval);\n } else {\n if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);\n frame = 1, setFrame(wake);\n }\n}\n","import {Timer} from \"./timer.js\";\n\nexport default function(callback, delay, time) {\n var t = new Timer;\n delay = delay == null ? 0 : +delay;\n t.restart(elapsed => {\n t.stop();\n callback(elapsed + delay);\n }, delay, time);\n return t;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer, timeout} from \"d3-timer\";\n\nvar emptyOn = dispatch(\"start\", \"end\", \"cancel\", \"interrupt\");\nvar emptyTween = [];\n\nexport var CREATED = 0;\nexport var SCHEDULED = 1;\nexport var STARTING = 2;\nexport var STARTED = 3;\nexport var RUNNING = 4;\nexport var ENDING = 5;\nexport var ENDED = 6;\n\nexport default function(node, name, id, index, group, timing) {\n var schedules = node.__transition;\n if (!schedules) node.__transition = {};\n else if (id in schedules) return;\n create(node, id, {\n name: name,\n index: index, // For context during callback.\n group: group, // For context during callback.\n on: emptyOn,\n tween: emptyTween,\n time: timing.time,\n delay: timing.delay,\n duration: timing.duration,\n ease: timing.ease,\n timer: null,\n state: CREATED\n });\n}\n\nexport function init(node, id) {\n var schedule = get(node, id);\n if (schedule.state > CREATED) throw new Error(\"too late; already scheduled\");\n return schedule;\n}\n\nexport function set(node, id) {\n var schedule = get(node, id);\n if (schedule.state > STARTED) throw new Error(\"too late; already running\");\n return schedule;\n}\n\nexport function get(node, id) {\n var schedule = node.__transition;\n if (!schedule || !(schedule = schedule[id])) throw new Error(\"transition not found\");\n return schedule;\n}\n\nfunction create(node, id, self) {\n var schedules = node.__transition,\n tween;\n\n // Initialize the self timer when the transition is created.\n // Note the actual delay is not known until the first callback!\n schedules[id] = self;\n self.timer = timer(schedule, 0, self.time);\n\n function schedule(elapsed) {\n self.state = SCHEDULED;\n self.timer.restart(start, self.delay, self.time);\n\n // If the elapsed delay is less than our first sleep, start immediately.\n if (self.delay <= elapsed) start(elapsed - self.delay);\n }\n\n function start(elapsed) {\n var i, j, n, o;\n\n // If the state is not SCHEDULED, then we previously errored on start.\n if (self.state !== SCHEDULED) return stop();\n\n for (i in schedules) {\n o = schedules[i];\n if (o.name !== self.name) continue;\n\n // While this element already has a starting transition during this frame,\n // defer starting an interrupting transition until that transition has a\n // chance to tick (and possibly end); see d3/d3-transition#54!\n if (o.state === STARTED) return timeout(start);\n\n // Interrupt the active transition, if any.\n if (o.state === RUNNING) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"interrupt\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n\n // Cancel any pre-empted transitions.\n else if (+i < id) {\n o.state = ENDED;\n o.timer.stop();\n o.on.call(\"cancel\", node, node.__data__, o.index, o.group);\n delete schedules[i];\n }\n }\n\n // Defer the first tick to end of the current frame; see d3/d3#1576.\n // Note the transition may be canceled after start and before the first tick!\n // Note this must be scheduled before the start event; see d3/d3-transition#16!\n // Assuming this is successful, subsequent callbacks go straight to tick.\n timeout(function() {\n if (self.state === STARTED) {\n self.state = RUNNING;\n self.timer.restart(tick, self.delay, self.time);\n tick(elapsed);\n }\n });\n\n // Dispatch the start event.\n // Note this must be done before the tween are initialized.\n self.state = STARTING;\n self.on.call(\"start\", node, node.__data__, self.index, self.group);\n if (self.state !== STARTING) return; // interrupted\n self.state = STARTED;\n\n // Initialize the tween, deleting null tween.\n tween = new Array(n = self.tween.length);\n for (i = 0, j = -1; i < n; ++i) {\n if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) {\n tween[++j] = o;\n }\n }\n tween.length = j + 1;\n }\n\n function tick(elapsed) {\n var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1),\n i = -1,\n n = tween.length;\n\n while (++i < n) {\n tween[i].call(node, t);\n }\n\n // Dispatch the end event.\n if (self.state === ENDING) {\n self.on.call(\"end\", node, node.__data__, self.index, self.group);\n stop();\n }\n }\n\n function stop() {\n self.state = ENDED;\n self.timer.stop();\n delete schedules[id];\n for (var i in schedules) return; // eslint-disable-line no-unused-vars\n delete node.__transition;\n }\n}\n","import {STARTING, ENDING, ENDED} from \"./transition/schedule.js\";\n\nexport default function(node, name) {\n var schedules = node.__transition,\n schedule,\n active,\n empty = true,\n i;\n\n if (!schedules) return;\n\n name = name == null ? null : name + \"\";\n\n for (i in schedules) {\n if ((schedule = schedules[i]).name !== name) { empty = false; continue; }\n active = schedule.state > STARTING && schedule.state < ENDING;\n schedule.state = ENDED;\n schedule.timer.stop();\n schedule.on.call(active ? \"interrupt\" : \"cancel\", node, node.__data__, schedule.index, schedule.group);\n delete schedules[i];\n }\n\n if (empty) delete node.__transition;\n}\n","import interrupt from \"../interrupt.js\";\n\nexport default function(name) {\n return this.each(function() {\n interrupt(this, name);\n });\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction tweenRemove(id, name) {\n var tween0, tween1;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = tween0 = tween;\n for (var i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1 = tween1.slice();\n tween1.splice(i, 1);\n break;\n }\n }\n }\n\n schedule.tween = tween1;\n };\n}\n\nfunction tweenFunction(id, name, value) {\n var tween0, tween1;\n if (typeof value !== \"function\") throw new Error;\n return function() {\n var schedule = set(this, id),\n tween = schedule.tween;\n\n // If this node shared tween with the previous node,\n // just assign the updated shared tween and we’re done!\n // Otherwise, copy-on-write.\n if (tween !== tween0) {\n tween1 = (tween0 = tween).slice();\n for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) {\n if (tween1[i].name === name) {\n tween1[i] = t;\n break;\n }\n }\n if (i === n) tween1.push(t);\n }\n\n schedule.tween = tween1;\n };\n}\n\nexport default function(name, value) {\n var id = this._id;\n\n name += \"\";\n\n if (arguments.length < 2) {\n var tween = get(this.node(), id).tween;\n for (var i = 0, n = tween.length, t; i < n; ++i) {\n if ((t = tween[i]).name === name) {\n return t.value;\n }\n }\n return null;\n }\n\n return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value));\n}\n\nexport function tweenValue(transition, name, value) {\n var id = transition._id;\n\n transition.each(function() {\n var schedule = set(this, id);\n (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments);\n });\n\n return function(node) {\n return get(node, id).value[name];\n };\n}\n","import {color} from \"d3-color\";\nimport {interpolateNumber, interpolateRgb, interpolateString} from \"d3-interpolate\";\n\nexport default function(a, b) {\n var c;\n return (typeof b === \"number\" ? interpolateNumber\n : b instanceof color ? interpolateRgb\n : (c = color(b)) ? (b = c, interpolateRgb)\n : interpolateString)(a, b);\n}\n","import {interpolateTransformSvg as interpolateTransform} from \"d3-interpolate\";\nimport {namespace} from \"d3-selection\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttribute(name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrConstantNS(fullname, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = this.getAttributeNS(fullname.space, fullname.local);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction attrFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttribute(name);\n string0 = this.getAttribute(name);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction attrFunctionNS(fullname, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0, value1 = value(this), string1;\n if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);\n string0 = this.getAttributeNS(fullname.space, fullname.local);\n string1 = value1 + \"\";\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name), i = fullname === \"transform\" ? interpolateTransform : interpolate;\n return this.attrTween(name, typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, \"attr.\" + name, value))\n : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname)\n : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value));\n}\n","import {namespace} from \"d3-selection\";\n\nfunction attrInterpolate(name, i) {\n return function(t) {\n this.setAttribute(name, i.call(this, t));\n };\n}\n\nfunction attrInterpolateNS(fullname, i) {\n return function(t) {\n this.setAttributeNS(fullname.space, fullname.local, i.call(this, t));\n };\n}\n\nfunction attrTweenNS(fullname, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nfunction attrTween(name, value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value) {\n var key = \"attr.\" + name;\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n var fullname = namespace(name);\n return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));\n}\n","import {get, init} from \"./schedule.js\";\n\nfunction delayFunction(id, value) {\n return function() {\n init(this, id).delay = +value.apply(this, arguments);\n };\n}\n\nfunction delayConstant(id, value) {\n return value = +value, function() {\n init(this, id).delay = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? delayFunction\n : delayConstant)(id, value))\n : get(this.node(), id).delay;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction durationFunction(id, value) {\n return function() {\n set(this, id).duration = +value.apply(this, arguments);\n };\n}\n\nfunction durationConstant(id, value) {\n return value = +value, function() {\n set(this, id).duration = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each((typeof value === \"function\"\n ? durationFunction\n : durationConstant)(id, value))\n : get(this.node(), id).duration;\n}\n","import {get, set} from \"./schedule.js\";\n\nfunction easeConstant(id, value) {\n if (typeof value !== \"function\") throw new Error;\n return function() {\n set(this, id).ease = value;\n };\n}\n\nexport default function(value) {\n var id = this._id;\n\n return arguments.length\n ? this.each(easeConstant(id, value))\n : get(this.node(), id).ease;\n}\n","import {set} from \"./schedule.js\";\n\nfunction easeVarying(id, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (typeof v !== \"function\") throw new Error;\n set(this, id).ease = v;\n };\n}\n\nexport default function(value) {\n if (typeof value !== \"function\") throw new Error;\n return this.each(easeVarying(this._id, value));\n}\n","import {matcher} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Transition(subgroups, this._parents, this._name, this._id);\n}\n","import {Transition} from \"./index.js\";\n\nexport default function(transition) {\n if (transition._id !== this._id) throw new Error;\n\n for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Transition(merges, this._parents, this._name, this._id);\n}\n","import {get, set, init} from \"./schedule.js\";\n\nfunction start(name) {\n return (name + \"\").trim().split(/^|\\s+/).every(function(t) {\n var i = t.indexOf(\".\");\n if (i >= 0) t = t.slice(0, i);\n return !t || t === \"start\";\n });\n}\n\nfunction onFunction(id, name, listener) {\n var on0, on1, sit = start(name) ? init : set;\n return function() {\n var schedule = sit(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, listener) {\n var id = this._id;\n\n return arguments.length < 2\n ? get(this.node(), id).on.on(name)\n : this.each(onFunction(id, name, listener));\n}\n","function removeFunction(id) {\n return function() {\n var parent = this.parentNode;\n for (var i in this.__transition) if (+i !== id) return;\n if (parent) parent.removeChild(this);\n };\n}\n\nexport default function() {\n return this.on(\"end.remove\", removeFunction(this._id));\n}\n","import {selector} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n schedule(subgroup[i], name, id, i, subgroup, get(node, id));\n }\n }\n }\n\n return new Transition(subgroups, this._parents, name, id);\n}\n","import {selectorAll} from \"d3-selection\";\nimport {Transition} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function(select) {\n var name = this._name,\n id = this._id;\n\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) {\n if (child = children[k]) {\n schedule(child, name, id, k, children, inherit);\n }\n }\n subgroups.push(children);\n parents.push(node);\n }\n }\n }\n\n return new Transition(subgroups, parents, name, id);\n}\n","import {selection} from \"d3-selection\";\n\nvar Selection = selection.prototype.constructor;\n\nexport default function() {\n return new Selection(this._groups, this._parents);\n}\n","import {interpolateTransformCss as interpolateTransform} from \"d3-interpolate\";\nimport {style} from \"d3-selection\";\nimport {set} from \"./schedule.js\";\nimport {tweenValue} from \"./tween.js\";\nimport interpolate from \"./interpolate.js\";\n\nfunction styleNull(name, interpolate) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n string1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, string10 = string1);\n };\n}\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, interpolate, value1) {\n var string00,\n string1 = value1 + \"\",\n interpolate0;\n return function() {\n var string0 = style(this, name);\n return string0 === string1 ? null\n : string0 === string00 ? interpolate0\n : interpolate0 = interpolate(string00 = string0, value1);\n };\n}\n\nfunction styleFunction(name, interpolate, value) {\n var string00,\n string10,\n interpolate0;\n return function() {\n var string0 = style(this, name),\n value1 = value(this),\n string1 = value1 + \"\";\n if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name));\n return string0 === string1 ? null\n : string0 === string00 && string1 === string10 ? interpolate0\n : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1));\n };\n}\n\nfunction styleMaybeRemove(id, name) {\n var on0, on1, listener0, key = \"style.\" + name, event = \"end.\" + key, remove;\n return function() {\n var schedule = set(this, id),\n on = schedule.on,\n listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);\n\n schedule.on = on1;\n };\n}\n\nexport default function(name, value, priority) {\n var i = (name += \"\") === \"transform\" ? interpolateTransform : interpolate;\n return value == null ? this\n .styleTween(name, styleNull(name, i))\n .on(\"end.style.\" + name, styleRemove(name))\n : typeof value === \"function\" ? this\n .styleTween(name, styleFunction(name, i, tweenValue(this, \"style.\" + name, value)))\n .each(styleMaybeRemove(this._id, name))\n : this\n .styleTween(name, styleConstant(name, i, value), priority)\n .on(\"end.style.\" + name, null);\n}\n","function styleInterpolate(name, i, priority) {\n return function(t) {\n this.style.setProperty(name, i.call(this, t), priority);\n };\n}\n\nfunction styleTween(name, value, priority) {\n var t, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);\n return t;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(name, value, priority) {\n var key = \"style.\" + (name += \"\");\n if (arguments.length < 2) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, styleTween(name, value, priority == null ? \"\" : priority));\n}\n","import {tweenValue} from \"./tween.js\";\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var value1 = value(this);\n this.textContent = value1 == null ? \"\" : value1;\n };\n}\n\nexport default function(value) {\n return this.tween(\"text\", typeof value === \"function\"\n ? textFunction(tweenValue(this, \"text\", value))\n : textConstant(value == null ? \"\" : value + \"\"));\n}\n","function textInterpolate(i) {\n return function(t) {\n this.textContent = i.call(this, t);\n };\n}\n\nfunction textTween(value) {\n var t0, i0;\n function tween() {\n var i = value.apply(this, arguments);\n if (i !== i0) t0 = (i0 = i) && textInterpolate(i);\n return t0;\n }\n tween._value = value;\n return tween;\n}\n\nexport default function(value) {\n var key = \"text\";\n if (arguments.length < 1) return (key = this.tween(key)) && key._value;\n if (value == null) return this.tween(key, null);\n if (typeof value !== \"function\") throw new Error;\n return this.tween(key, textTween(value));\n}\n","import {Transition, newId} from \"./index.js\";\nimport schedule, {get} from \"./schedule.js\";\n\nexport default function() {\n var name = this._name,\n id0 = this._id,\n id1 = newId();\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n var inherit = get(node, id0);\n schedule(node, name, id1, i, group, {\n time: inherit.time + inherit.delay + inherit.duration,\n delay: 0,\n duration: inherit.duration,\n ease: inherit.ease\n });\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id1);\n}\n","import {set} from \"./schedule.js\";\n\nexport default function() {\n var on0, on1, that = this, id = that._id, size = that.size();\n return new Promise(function(resolve, reject) {\n var cancel = {value: reject},\n end = {value: function() { if (--size === 0) resolve(); }};\n\n that.each(function() {\n var schedule = set(this, id),\n on = schedule.on;\n\n // If this node shared a dispatch with the previous node,\n // just assign the updated shared dispatch and we’re done!\n // Otherwise, copy-on-write.\n if (on !== on0) {\n on1 = (on0 = on).copy();\n on1._.cancel.push(cancel);\n on1._.interrupt.push(cancel);\n on1._.end.push(end);\n }\n\n schedule.on = on1;\n });\n\n // The selection was empty, resolve end immediately\n if (size === 0) resolve();\n });\n}\n","import {selection} from \"d3-selection\";\nimport transition_attr from \"./attr.js\";\nimport transition_attrTween from \"./attrTween.js\";\nimport transition_delay from \"./delay.js\";\nimport transition_duration from \"./duration.js\";\nimport transition_ease from \"./ease.js\";\nimport transition_easeVarying from \"./easeVarying.js\";\nimport transition_filter from \"./filter.js\";\nimport transition_merge from \"./merge.js\";\nimport transition_on from \"./on.js\";\nimport transition_remove from \"./remove.js\";\nimport transition_select from \"./select.js\";\nimport transition_selectAll from \"./selectAll.js\";\nimport transition_selection from \"./selection.js\";\nimport transition_style from \"./style.js\";\nimport transition_styleTween from \"./styleTween.js\";\nimport transition_text from \"./text.js\";\nimport transition_textTween from \"./textTween.js\";\nimport transition_transition from \"./transition.js\";\nimport transition_tween from \"./tween.js\";\nimport transition_end from \"./end.js\";\n\nvar id = 0;\n\nexport function Transition(groups, parents, name, id) {\n this._groups = groups;\n this._parents = parents;\n this._name = name;\n this._id = id;\n}\n\nexport default function transition(name) {\n return selection().transition(name);\n}\n\nexport function newId() {\n return ++id;\n}\n\nvar selection_prototype = selection.prototype;\n\nTransition.prototype = transition.prototype = {\n constructor: Transition,\n select: transition_select,\n selectAll: transition_selectAll,\n selectChild: selection_prototype.selectChild,\n selectChildren: selection_prototype.selectChildren,\n filter: transition_filter,\n merge: transition_merge,\n selection: transition_selection,\n transition: transition_transition,\n call: selection_prototype.call,\n nodes: selection_prototype.nodes,\n node: selection_prototype.node,\n size: selection_prototype.size,\n empty: selection_prototype.empty,\n each: selection_prototype.each,\n on: transition_on,\n attr: transition_attr,\n attrTween: transition_attrTween,\n style: transition_style,\n styleTween: transition_styleTween,\n text: transition_text,\n textTween: transition_textTween,\n remove: transition_remove,\n tween: transition_tween,\n delay: transition_delay,\n duration: transition_duration,\n ease: transition_ease,\n easeVarying: transition_easeVarying,\n end: transition_end,\n [Symbol.iterator]: selection_prototype[Symbol.iterator]\n};\n","export function cubicIn(t) {\n return t * t * t;\n}\n\nexport function cubicOut(t) {\n return --t * t * t + 1;\n}\n\nexport function cubicInOut(t) {\n return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\n}\n","import {Transition, newId} from \"../transition/index.js\";\nimport schedule from \"../transition/schedule.js\";\nimport {easeCubicInOut} from \"d3-ease\";\nimport {now} from \"d3-timer\";\n\nvar defaultTiming = {\n time: null, // Set on use.\n delay: 0,\n duration: 250,\n ease: easeCubicInOut\n};\n\nfunction inherit(node, id) {\n var timing;\n while (!(timing = node.__transition) || !(timing = timing[id])) {\n if (!(node = node.parentNode)) {\n throw new Error(`transition ${id} not found`);\n }\n }\n return timing;\n}\n\nexport default function(name) {\n var id,\n timing;\n\n if (name instanceof Transition) {\n id = name._id, name = name._name;\n } else {\n id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + \"\";\n }\n\n for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n schedule(node, name, id, i, group, timing || inherit(node, id));\n }\n }\n }\n\n return new Transition(groups, this._parents, name, id);\n}\n","import {selection} from \"d3-selection\";\nimport selection_interrupt from \"./interrupt.js\";\nimport selection_transition from \"./transition.js\";\n\nselection.prototype.interrupt = selection_interrupt;\nselection.prototype.transition = selection_transition;\n","export default x => () => x;\n","export default function ZoomEvent(type, {\n sourceEvent,\n target,\n transform,\n dispatch\n}) {\n Object.defineProperties(this, {\n type: {value: type, enumerable: true, configurable: true},\n sourceEvent: {value: sourceEvent, enumerable: true, configurable: true},\n target: {value: target, enumerable: true, configurable: true},\n transform: {value: transform, enumerable: true, configurable: true},\n _: {value: dispatch}\n });\n}\n","export function Transform(k, x, y) {\n this.k = k;\n this.x = x;\n this.y = y;\n}\n\nTransform.prototype = {\n constructor: Transform,\n scale: function(k) {\n return k === 1 ? this : new Transform(this.k * k, this.x, this.y);\n },\n translate: function(x, y) {\n return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y);\n },\n apply: function(point) {\n return [point[0] * this.k + this.x, point[1] * this.k + this.y];\n },\n applyX: function(x) {\n return x * this.k + this.x;\n },\n applyY: function(y) {\n return y * this.k + this.y;\n },\n invert: function(location) {\n return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k];\n },\n invertX: function(x) {\n return (x - this.x) / this.k;\n },\n invertY: function(y) {\n return (y - this.y) / this.k;\n },\n rescaleX: function(x) {\n return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x));\n },\n rescaleY: function(y) {\n return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y));\n },\n toString: function() {\n return \"translate(\" + this.x + \",\" + this.y + \") scale(\" + this.k + \")\";\n }\n};\n\nexport var identity = new Transform(1, 0, 0);\n\ntransform.prototype = Transform.prototype;\n\nexport default function transform(node) {\n while (!node.__zoom) if (!(node = node.parentNode)) return identity;\n return node.__zoom;\n}\n","export function nopropagation(event) {\n event.stopImmediatePropagation();\n}\n\nexport default function(event) {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {dragDisable, dragEnable} from \"d3-drag\";\nimport {interpolateZoom} from \"d3-interpolate\";\nimport {select, pointer} from \"d3-selection\";\nimport {interrupt} from \"d3-transition\";\nimport constant from \"./constant.js\";\nimport ZoomEvent from \"./event.js\";\nimport {Transform, identity} from \"./transform.js\";\nimport noevent, {nopropagation} from \"./noevent.js\";\n\n// Ignore right-click, since that should open the context menu.\n// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event\nfunction defaultFilter(event) {\n return (!event.ctrlKey || event.type === 'wheel') && !event.button;\n}\n\nfunction defaultExtent() {\n var e = this;\n if (e instanceof SVGElement) {\n e = e.ownerSVGElement || e;\n if (e.hasAttribute(\"viewBox\")) {\n e = e.viewBox.baseVal;\n return [[e.x, e.y], [e.x + e.width, e.y + e.height]];\n }\n return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]];\n }\n return [[0, 0], [e.clientWidth, e.clientHeight]];\n}\n\nfunction defaultTransform() {\n return this.__zoom || identity;\n}\n\nfunction defaultWheelDelta(event) {\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1);\n}\n\nfunction defaultTouchable() {\n return navigator.maxTouchPoints || (\"ontouchstart\" in this);\n}\n\nfunction defaultConstrain(transform, extent, translateExtent) {\n var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],\n dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],\n dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],\n dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];\n return transform.translate(\n dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),\n dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)\n );\n}\n\nexport default function() {\n var filter = defaultFilter,\n extent = defaultExtent,\n constrain = defaultConstrain,\n wheelDelta = defaultWheelDelta,\n touchable = defaultTouchable,\n scaleExtent = [0, Infinity],\n translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]],\n duration = 250,\n interpolate = interpolateZoom,\n listeners = dispatch(\"start\", \"zoom\", \"end\"),\n touchstarting,\n touchfirst,\n touchending,\n touchDelay = 500,\n wheelDelay = 150,\n clickDistance2 = 0,\n tapDistance = 10;\n\n function zoom(selection) {\n selection\n .property(\"__zoom\", defaultTransform)\n .on(\"wheel.zoom\", wheeled, {passive: false})\n .on(\"mousedown.zoom\", mousedowned)\n .on(\"dblclick.zoom\", dblclicked)\n .filter(touchable)\n .on(\"touchstart.zoom\", touchstarted)\n .on(\"touchmove.zoom\", touchmoved)\n .on(\"touchend.zoom touchcancel.zoom\", touchended)\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n zoom.transform = function(collection, transform, point, event) {\n var selection = collection.selection ? collection.selection() : collection;\n selection.property(\"__zoom\", defaultTransform);\n if (collection !== selection) {\n schedule(collection, transform, point, event);\n } else {\n selection.interrupt().each(function() {\n gesture(this, arguments)\n .event(event)\n .start()\n .zoom(null, typeof transform === \"function\" ? transform.apply(this, arguments) : transform)\n .end();\n });\n }\n };\n\n zoom.scaleBy = function(selection, k, p, event) {\n zoom.scaleTo(selection, function() {\n var k0 = this.__zoom.k,\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return k0 * k1;\n }, p, event);\n };\n\n zoom.scaleTo = function(selection, k, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t0 = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p,\n p1 = t0.invert(p0),\n k1 = typeof k === \"function\" ? k.apply(this, arguments) : k;\n return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent);\n }, p, event);\n };\n\n zoom.translateBy = function(selection, x, y, event) {\n zoom.transform(selection, function() {\n return constrain(this.__zoom.translate(\n typeof x === \"function\" ? x.apply(this, arguments) : x,\n typeof y === \"function\" ? y.apply(this, arguments) : y\n ), extent.apply(this, arguments), translateExtent);\n }, null, event);\n };\n\n zoom.translateTo = function(selection, x, y, p, event) {\n zoom.transform(selection, function() {\n var e = extent.apply(this, arguments),\n t = this.__zoom,\n p0 = p == null ? centroid(e) : typeof p === \"function\" ? p.apply(this, arguments) : p;\n return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate(\n typeof x === \"function\" ? -x.apply(this, arguments) : -x,\n typeof y === \"function\" ? -y.apply(this, arguments) : -y\n ), e, translateExtent);\n }, p, event);\n };\n\n function scale(transform, k) {\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));\n return k === transform.k ? transform : new Transform(k, transform.x, transform.y);\n }\n\n function translate(transform, p0, p1) {\n var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;\n return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);\n }\n\n function centroid(extent) {\n return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];\n }\n\n function schedule(transition, transform, point, event) {\n transition\n .on(\"start.zoom\", function() { gesture(this, arguments).event(event).start(); })\n .on(\"interrupt.zoom end.zoom\", function() { gesture(this, arguments).event(event).end(); })\n .tween(\"zoom\", function() {\n var that = this,\n args = arguments,\n g = gesture(that, args).event(event),\n e = extent.apply(that, args),\n p = point == null ? centroid(e) : typeof point === \"function\" ? point.apply(that, args) : point,\n w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),\n a = that.__zoom,\n b = typeof transform === \"function\" ? transform.apply(that, args) : transform,\n i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));\n return function(t) {\n if (t === 1) t = b; // Avoid rounding error on end.\n else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); }\n g.zoom(null, t);\n };\n });\n }\n\n function gesture(that, args, clean) {\n return (!clean && that.__zooming) || new Gesture(that, args);\n }\n\n function Gesture(that, args) {\n this.that = that;\n this.args = args;\n this.active = 0;\n this.sourceEvent = null;\n this.extent = extent.apply(that, args);\n this.taps = 0;\n }\n\n Gesture.prototype = {\n event: function(event) {\n if (event) this.sourceEvent = event;\n return this;\n },\n start: function() {\n if (++this.active === 1) {\n this.that.__zooming = this;\n this.emit(\"start\");\n }\n return this;\n },\n zoom: function(key, transform) {\n if (this.mouse && key !== \"mouse\") this.mouse[1] = transform.invert(this.mouse[0]);\n if (this.touch0 && key !== \"touch\") this.touch0[1] = transform.invert(this.touch0[0]);\n if (this.touch1 && key !== \"touch\") this.touch1[1] = transform.invert(this.touch1[0]);\n this.that.__zoom = transform;\n this.emit(\"zoom\");\n return this;\n },\n end: function() {\n if (--this.active === 0) {\n delete this.that.__zooming;\n this.emit(\"end\");\n }\n return this;\n },\n emit: function(type) {\n var d = select(this.that).datum();\n listeners.call(\n type,\n this.that,\n new ZoomEvent(type, {\n sourceEvent: this.sourceEvent,\n target: zoom,\n type,\n transform: this.that.__zoom,\n dispatch: listeners\n }),\n d\n );\n }\n };\n\n function wheeled(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var g = gesture(this, args).event(event),\n t = this.__zoom,\n k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))),\n p = pointer(event);\n\n // If the mouse is in the same location as before, reuse it.\n // If there were recent wheel events, reset the wheel idle timeout.\n if (g.wheel) {\n if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {\n g.mouse[1] = t.invert(g.mouse[0] = p);\n }\n clearTimeout(g.wheel);\n }\n\n // If this wheel event won’t trigger a transform change, ignore it.\n else if (t.k === k) return;\n\n // Otherwise, capture the mouse point and location at the start.\n else {\n g.mouse = [p, t.invert(p)];\n interrupt(this);\n g.start();\n }\n\n noevent(event);\n g.wheel = setTimeout(wheelidled, wheelDelay);\n g.zoom(\"mouse\", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent));\n\n function wheelidled() {\n g.wheel = null;\n g.end();\n }\n }\n\n function mousedowned(event, ...args) {\n if (touchending || !filter.apply(this, arguments)) return;\n var currentTarget = event.currentTarget,\n g = gesture(this, args, true).event(event),\n v = select(event.view).on(\"mousemove.zoom\", mousemoved, true).on(\"mouseup.zoom\", mouseupped, true),\n p = pointer(event, currentTarget),\n x0 = event.clientX,\n y0 = event.clientY;\n\n dragDisable(event.view);\n nopropagation(event);\n g.mouse = [p, this.__zoom.invert(p)];\n interrupt(this);\n g.start();\n\n function mousemoved(event) {\n noevent(event);\n if (!g.moved) {\n var dx = event.clientX - x0, dy = event.clientY - y0;\n g.moved = dx * dx + dy * dy > clickDistance2;\n }\n g.event(event)\n .zoom(\"mouse\", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent));\n }\n\n function mouseupped(event) {\n v.on(\"mousemove.zoom mouseup.zoom\", null);\n dragEnable(event.view, g.moved);\n noevent(event);\n g.event(event).end();\n }\n }\n\n function dblclicked(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var t0 = this.__zoom,\n p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this),\n p1 = t0.invert(p0),\n k1 = t0.k * (event.shiftKey ? 0.5 : 2),\n t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);\n\n noevent(event);\n if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event);\n else select(this).call(zoom.transform, t1, p0, event);\n }\n\n function touchstarted(event, ...args) {\n if (!filter.apply(this, arguments)) return;\n var touches = event.touches,\n n = touches.length,\n g = gesture(this, args, event.changedTouches.length === n).event(event),\n started, i, t, p;\n\n nopropagation(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n p = [p, this.__zoom.invert(p), t.identifier];\n if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;\n else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;\n }\n\n if (touchstarting) touchstarting = clearTimeout(touchstarting);\n\n if (started) {\n if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay);\n interrupt(this);\n g.start();\n }\n }\n\n function touchmoved(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t, p, l;\n\n noevent(event);\n for (i = 0; i < n; ++i) {\n t = touches[i], p = pointer(t, this);\n if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;\n else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;\n }\n t = g.that.__zoom;\n if (g.touch1) {\n var p0 = g.touch0[0], l0 = g.touch0[1],\n p1 = g.touch1[0], l1 = g.touch1[1],\n dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp,\n dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl;\n t = scale(t, Math.sqrt(dp / dl));\n p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];\n l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];\n }\n else if (g.touch0) p = g.touch0[0], l = g.touch0[1];\n else return;\n\n g.zoom(\"touch\", constrain(translate(t, p, l), g.extent, translateExtent));\n }\n\n function touchended(event, ...args) {\n if (!this.__zooming) return;\n var g = gesture(this, args).event(event),\n touches = event.changedTouches,\n n = touches.length, i, t;\n\n nopropagation(event);\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, touchDelay);\n for (i = 0; i < n; ++i) {\n t = touches[i];\n if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;\n else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;\n }\n if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;\n if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);\n else {\n g.end();\n // If this was a dbltap, reroute to the (optional) dblclick.zoom handler.\n if (g.taps === 2) {\n t = pointer(t, this);\n if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {\n var p = select(this).on(\"dblclick.zoom\");\n if (p) p.apply(this, arguments);\n }\n }\n }\n }\n\n zoom.wheelDelta = function(_) {\n return arguments.length ? (wheelDelta = typeof _ === \"function\" ? _ : constant(+_), zoom) : wheelDelta;\n };\n\n zoom.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), zoom) : filter;\n };\n\n zoom.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), zoom) : touchable;\n };\n\n zoom.extent = function(_) {\n return arguments.length ? (extent = typeof _ === \"function\" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;\n };\n\n zoom.scaleExtent = function(_) {\n return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]];\n };\n\n zoom.translateExtent = function(_) {\n return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]];\n };\n\n zoom.constrain = function(_) {\n return arguments.length ? (constrain = _, zoom) : constrain;\n };\n\n zoom.duration = function(_) {\n return arguments.length ? (duration = +_, zoom) : duration;\n };\n\n zoom.interpolate = function(_) {\n return arguments.length ? (interpolate = _, zoom) : interpolate;\n };\n\n zoom.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? zoom : value;\n };\n\n zoom.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2);\n };\n\n zoom.tapDistance = function(_) {\n return arguments.length ? (tapDistance = +_, zoom) : tapDistance;\n };\n\n return zoom;\n}\n","import { drag } from 'd3-drag';\nimport { select, pointer } from 'd3-selection';\nimport { zoom, zoomIdentity, zoomTransform } from 'd3-zoom';\nimport { interpolateZoom, interpolate } from 'd3-interpolate';\n\nconst errorMessages = {\n error001: (lib = 'react') => `Seems like you have not used ${lib === 'svelte' ? 'SvelteFlowProvider' : 'ReactFlowProvider'} as an ancestor. Help: https://${lib}flow.dev/error#001`,\n error002: () => \"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.\",\n error003: (nodeType) => `Node type \"${nodeType}\" not found. Using fallback type \"default\".`,\n error004: () => 'The parent container needs a width and a height to render the graph.',\n error005: () => 'Only child nodes can use a parent extent.',\n error006: () => \"Can't create edge. An edge needs a source and a target.\",\n error007: (id) => `The old edge with id=${id} does not exist.`,\n error009: (type) => `Marker type \"${type}\" doesn't exist.`,\n error008: (handleType, { id, sourceHandle, targetHandle }) => `Couldn't create edge for ${handleType} handle id: \"${handleType === 'source' ? sourceHandle : targetHandle}\", edge id: ${id}.`,\n error010: () => 'Handle: No node id found. Make sure to only use a Handle inside a custom Node.',\n error011: (edgeType) => `Edge type \"${edgeType}\" not found. Using fallback type \"default\".`,\n error012: (id) => `Node with id \"${id}\" does not exist, it may have been removed. This can happen when a node is deleted before the \"onNodeClick\" handler is called.`,\n error013: (lib = 'react') => `It seems that you haven't loaded the styles. Please import '@xyflow/${lib}/dist/style.css' or base.css to make sure everything is working properly.`,\n error014: () => 'useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.',\n error015: () => 'It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.',\n error016: (id) => `Edge with id \"${id}\" does not exist, it may have been removed. This can happen when an edge is deleted before the \"onEdgeClick\" handler is called.`,\n};\nconst infiniteExtent = [\n [Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY],\n [Number.POSITIVE_INFINITY, Number.POSITIVE_INFINITY],\n];\nconst elementSelectionKeys = ['Enter', ' ', 'Escape'];\nconst defaultAriaLabelConfig = {\n 'node.a11yDescription.default': 'Press enter or space to select a node. Press delete to remove it and escape to cancel.',\n 'node.a11yDescription.keyboardDisabled': 'Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.',\n 'node.a11yDescription.ariaLiveMessage': ({ direction, x, y }) => `Moved selected node ${direction}. New position, x: ${x}, y: ${y}`,\n 'edge.a11yDescription.default': 'Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.',\n // Control elements\n 'controls.ariaLabel': 'Control Panel',\n 'controls.zoomIn.ariaLabel': 'Zoom In',\n 'controls.zoomOut.ariaLabel': 'Zoom Out',\n 'controls.fitView.ariaLabel': 'Fit View',\n 'controls.interactive.ariaLabel': 'Toggle Interactivity',\n // Mini map\n 'minimap.ariaLabel': 'Mini Map',\n // Handle\n 'handle.ariaLabel': 'Handle',\n};\n\n/**\n * The `ConnectionMode` is used to set the mode of connection between nodes.\n * The `Strict` mode is the default one and only allows source to target edges.\n * `Loose` mode allows source to source and target to target edges as well.\n *\n * @public\n */\nvar ConnectionMode;\n(function (ConnectionMode) {\n ConnectionMode[\"Strict\"] = \"strict\";\n ConnectionMode[\"Loose\"] = \"loose\";\n})(ConnectionMode || (ConnectionMode = {}));\n/**\n * This enum is used to set the different modes of panning the viewport when the\n * user scrolls. The `Free` mode allows the user to pan in any direction by scrolling\n * with a device like a trackpad. The `Vertical` and `Horizontal` modes restrict\n * scroll panning to only the vertical or horizontal axis, respectively.\n *\n * @public\n */\nvar PanOnScrollMode;\n(function (PanOnScrollMode) {\n PanOnScrollMode[\"Free\"] = \"free\";\n PanOnScrollMode[\"Vertical\"] = \"vertical\";\n PanOnScrollMode[\"Horizontal\"] = \"horizontal\";\n})(PanOnScrollMode || (PanOnScrollMode = {}));\nvar SelectionMode;\n(function (SelectionMode) {\n SelectionMode[\"Partial\"] = \"partial\";\n SelectionMode[\"Full\"] = \"full\";\n})(SelectionMode || (SelectionMode = {}));\nconst initialConnection = {\n inProgress: false,\n isValid: null,\n from: null,\n fromHandle: null,\n fromPosition: null,\n fromNode: null,\n to: null,\n toHandle: null,\n toPosition: null,\n toNode: null,\n pointer: null,\n};\n\n/**\n * If you set the `connectionLineType` prop on your [`<ReactFlow />`](/api-reference/react-flow#connection-connectionLineType)\n *component, it will dictate the style of connection line rendered when creating\n *new edges.\n *\n * @public\n *\n * @remarks If you choose to render a custom connection line component, this value will be\n *passed to your component as part of its [`ConnectionLineComponentProps`](/api-reference/types/connection-line-component-props).\n */\nvar ConnectionLineType;\n(function (ConnectionLineType) {\n ConnectionLineType[\"Bezier\"] = \"default\";\n ConnectionLineType[\"Straight\"] = \"straight\";\n ConnectionLineType[\"Step\"] = \"step\";\n ConnectionLineType[\"SmoothStep\"] = \"smoothstep\";\n ConnectionLineType[\"SimpleBezier\"] = \"simplebezier\";\n})(ConnectionLineType || (ConnectionLineType = {}));\n/**\n * Edges may optionally have a marker on either end. The MarkerType type enumerates\n * the options available to you when configuring a given marker.\n *\n * @public\n */\nvar MarkerType;\n(function (MarkerType) {\n MarkerType[\"Arrow\"] = \"arrow\";\n MarkerType[\"ArrowClosed\"] = \"arrowclosed\";\n})(MarkerType || (MarkerType = {}));\n\n/**\n * While [`PanelPosition`](/api-reference/types/panel-position) can be used to place a\n * component in the corners of a container, the `Position` enum is less precise and used\n * primarily in relation to edges and handles.\n *\n * @public\n */\nvar Position;\n(function (Position) {\n Position[\"Left\"] = \"left\";\n Position[\"Top\"] = \"top\";\n Position[\"Right\"] = \"right\";\n Position[\"Bottom\"] = \"bottom\";\n})(Position || (Position = {}));\nconst oppositePosition = {\n [Position.Left]: Position.Right,\n [Position.Right]: Position.Left,\n [Position.Top]: Position.Bottom,\n [Position.Bottom]: Position.Top,\n};\n\n/**\n * Test whether an object is usable as an Edge\n * @public\n * @remarks In TypeScript this is a type guard that will narrow the type of whatever you pass in to Edge if it returns true\n * @param element - The element to test\n * @returns A boolean indicating whether the element is an Edge\n */\nconst isEdgeBase = (element) => !!element && typeof element === 'object' && 'id' in element && 'source' in element && 'target' in element;\n/**\n * Test whether an object is usable as a Node\n * @public\n * @remarks In TypeScript this is a type guard that will narrow the type of whatever you pass in to Node if it returns true\n * @param element - The element to test\n * @returns A boolean indicating whether the element is an Node\n */\nconst isNodeBase = (element) => !!element && typeof element === 'object' && 'id' in element && 'position' in element && !('source' in element) && !('target' in element);\nconst isInternalNodeBase = (element) => !!element && typeof element === 'object' && 'id' in element && 'internals' in element && !('source' in element) && !('target' in element);\n/**\n * This util is used to tell you what nodes, if any, are connected to the given node\n * as the _target_ of an edge.\n * @public\n * @param node - The node to get the connected nodes from.\n * @param nodes - The array of all nodes.\n * @param edges - The array of all edges.\n * @returns An array of nodes that are connected over edges where the source is the given node.\n *\n * @example\n * ```ts\n *import { getOutgoers } from '@xyflow/react';\n *\n *const nodes = [];\n *const edges = [];\n *\n *const outgoers = getOutgoers(\n * { id: '1', position: { x: 0, y: 0 }, data: { label: 'node' } },\n * nodes,\n * edges,\n *);\n *```\n */\nconst getOutgoers = (node, nodes, edges) => {\n if (!node.id) {\n return [];\n }\n const outgoerIds = new Set();\n edges.forEach((edge) => {\n if (edge.source === node.id) {\n outgoerIds.add(edge.target);\n }\n });\n return nodes.filter((n) => outgoerIds.has(n.id));\n};\n/**\n * This util is used to tell you what nodes, if any, are connected to the given node\n * as the _source_ of an edge.\n * @public\n * @param node - The node to get the connected nodes from.\n * @param nodes - The array of all nodes.\n * @param edges - The array of all edges.\n * @returns An array of nodes that are connected over edges where the target is the given node.\n *\n * @example\n * ```ts\n *import { getIncomers } from '@xyflow/react';\n *\n *const nodes = [];\n *const edges = [];\n *\n *const incomers = getIncomers(\n * { id: '1', position: { x: 0, y: 0 }, data: { label: 'node' } },\n * nodes,\n * edges,\n *);\n *```\n */\nconst getIncomers = (node, nodes, edges) => {\n if (!node.id) {\n return [];\n }\n const incomersIds = new Set();\n edges.forEach((edge) => {\n if (edge.target === node.id) {\n incomersIds.add(edge.source);\n }\n });\n return nodes.filter((n) => incomersIds.has(n.id));\n};\nconst getNodePositionWithOrigin = (node, nodeOrigin = [0, 0]) => {\n const { width, height } = getNodeDimensions(node);\n const origin = node.origin ?? nodeOrigin;\n const offsetX = width * origin[0];\n const offsetY = height * origin[1];\n return {\n x: node.position.x - offsetX,\n y: node.position.y - offsetY,\n };\n};\n/**\n * Returns the bounding box that contains all the given nodes in an array. This can\n * be useful when combined with [`getViewportForBounds`](/api-reference/utils/get-viewport-for-bounds)\n * to calculate the correct transform to fit the given nodes in a viewport.\n * @public\n * @remarks Useful when combined with {@link getViewportForBounds} to calculate the correct transform to fit the given nodes in a viewport.\n * @param nodes - Nodes to calculate the bounds for.\n * @returns Bounding box enclosing all nodes.\n *\n * @remarks This function was previously called `getRectOfNodes`\n *\n * @example\n * ```js\n *import { getNodesBounds } from '@xyflow/react';\n *\n *const nodes = [\n * {\n * id: 'a',\n * position: { x: 0, y: 0 },\n * data: { label: 'a' },\n * width: 50,\n * height: 25,\n * },\n * {\n * id: 'b',\n * position: { x: 100, y: 100 },\n * data: { label: 'b' },\n * width: 50,\n * height: 25,\n * },\n *];\n *\n *const bounds = getNodesBounds(nodes);\n *```\n */\nconst getNodesBounds = (nodes, params = { nodeOrigin: [0, 0] }) => {\n if (process.env.NODE_ENV === 'development' && !params.nodeLookup) {\n console.warn('Please use `getNodesBounds` from `useReactFlow`/`useSvelteFlow` hook to ensure correct values for sub flows. If not possible, you have to provide a nodeLookup to support sub flows.');\n }\n if (nodes.length === 0) {\n return { x: 0, y: 0, width: 0, height: 0 };\n }\n let hasNode = false;\n const box = nodes.reduce((currBox, nodeOrId) => {\n const isId = typeof nodeOrId === 'string';\n let currentNode = !params.nodeLookup && !isId ? nodeOrId : undefined;\n if (params.nodeLookup) {\n currentNode = isId\n ? params.nodeLookup.get(nodeOrId)\n : !isInternalNodeBase(nodeOrId)\n ? params.nodeLookup.get(nodeOrId.id)\n : nodeOrId;\n }\n /*\n * Skip ids/nodes that can't be resolved (e.g. a stale or already-removed id).\n * Merging a phantom box at the origin would stretch the bounds to include\n * (0, 0). This mirrors getInternalNodesBounds, which skips unmatched nodes.\n */\n if (!currentNode) {\n return currBox;\n }\n hasNode = true;\n return getBoundsOfBoxes(currBox, nodeToBox(currentNode, params.nodeOrigin));\n }, { x: Infinity, y: Infinity, x2: -Infinity, y2: -Infinity });\n return hasNode ? boxToRect(box) : { x: 0, y: 0, width: 0, height: 0 };\n};\n/**\n * Determines a bounding box that contains all given nodes in an array\n * @internal\n */\nconst getInternalNodesBounds = (nodeLookup, params = {}) => {\n let box = { x: Infinity, y: Infinity, x2: -Infinity, y2: -Infinity };\n let hasVisibleNodes = false;\n nodeLookup.forEach((node) => {\n if (params.filter === undefined || params.filter(node)) {\n box = getBoundsOfBoxes(box, nodeToBox(node));\n hasVisibleNodes = true;\n }\n });\n return hasVisibleNodes ? boxToRect(box) : { x: 0, y: 0, width: 0, height: 0 };\n};\nconst getNodesInside = (nodes, rect, [tx, ty, tScale] = [0, 0, 1], partially = false, \n// set excludeNonSelectableNodes if you want to pay attention to the nodes \"selectable\" attribute\nexcludeNonSelectableNodes = false) => {\n // viewport in flow coordinates, as scalars to avoid a Rect allocation per node\n const paneX = (rect.x - tx) / tScale;\n const paneY = (rect.y - ty) / tScale;\n const paneWidth = rect.width / tScale;\n const paneHeight = rect.height / tScale;\n const visibleNodes = [];\n for (const node of nodes.values()) {\n const { measured, selectable = true, hidden = false } = node;\n if ((excludeNonSelectableNodes && !selectable) || hidden) {\n continue;\n }\n const width = measured.width ?? node.width ?? node.initialWidth ?? 0;\n const height = measured.height ?? node.height ?? node.initialHeight ?? 0;\n const { x, y } = node.internals.positionAbsolute;\n const overlappingArea = getRectsOverlappingArea(paneX, paneY, paneWidth, paneHeight, x, y, width, height);\n const area = width * height;\n const partiallyVisible = partially && overlappingArea > 0;\n const forceInitialRender = !node.internals.handleBounds;\n const isVisible = forceInitialRender || partiallyVisible || overlappingArea >= area;\n if (isVisible || node.dragging) {\n visibleNodes.push(node);\n }\n }\n return visibleNodes;\n};\n/**\n * This utility filters an array of edges, keeping only those where either the source or target\n * node is present in the given array of nodes.\n * @public\n * @param nodes - Nodes you want to get the connected edges for.\n * @param edges - All edges.\n * @returns Array of edges that connect any of the given nodes with each other.\n *\n * @example\n * ```js\n *import { getConnectedEdges } from '@xyflow/react';\n *\n *const nodes = [\n * { id: 'a', position: { x: 0, y: 0 } },\n * { id: 'b', position: { x: 100, y: 0 } },\n *];\n *\n *const edges = [\n * { id: 'a->c', source: 'a', target: 'c' },\n * { id: 'c->d', source: 'c', target: 'd' },\n *];\n *\n *const connectedEdges = getConnectedEdges(nodes, edges);\n * // => [{ id: 'a->c', source: 'a', target: 'c' }]\n *```\n */\nconst getConnectedEdges = (nodes, edges) => {\n const nodeIds = new Set();\n nodes.forEach((node) => {\n nodeIds.add(node.id);\n });\n return edges.filter((edge) => nodeIds.has(edge.source) || nodeIds.has(edge.target));\n};\nfunction getFitViewNodes(nodeLookup, options) {\n const fitViewNodes = new Map();\n const optionNodeIds = options?.nodes ? new Set(options.nodes.map((node) => node.id)) : null;\n nodeLookup.forEach((n) => {\n let isVisible;\n if (options?.includeHiddenNodes) {\n /*\n * when hidden nodes are included they were never rendered, so they have no\n * measured size. Fall back to the declared dimensions (same fallback as\n * nodeToBox) so a hidden node with an intrinsic size still contributes to\n * the fit bounds instead of being dropped by a measured-only check. (#5841)\n */\n const { width, height } = getNodeDimensions(n);\n isVisible = width > 0 && height > 0;\n }\n else {\n isVisible = Boolean(n.measured.width && n.measured.height && !n.hidden);\n }\n if (isVisible && (!optionNodeIds || optionNodeIds.has(n.id))) {\n fitViewNodes.set(n.id, n);\n }\n });\n return fitViewNodes;\n}\nasync function fitViewport({ nodes, width, height, panZoom, minZoom, maxZoom }, options) {\n if (nodes.size === 0) {\n return true;\n }\n const nodesToFit = getFitViewNodes(nodes, options);\n const bounds = getInternalNodesBounds(nodesToFit);\n const viewport = getViewportForBounds(bounds, width, height, options?.minZoom ?? minZoom, options?.maxZoom ?? maxZoom, options?.padding ?? 0.1);\n await panZoom.setViewport(viewport, {\n duration: options?.duration,\n ease: options?.ease,\n interpolate: options?.interpolate,\n });\n return true;\n}\n/**\n * This function calculates the next position of a node, taking into account the node's extent, parent node, and origin.\n *\n * @internal\n * @returns position, positionAbsolute\n */\nfunction calculateNodePosition({ nodeId, nextPosition, nodeLookup, nodeOrigin = [0, 0], nodeExtent, onError, }) {\n const node = nodeLookup.get(nodeId);\n const parentNode = node.parentId ? nodeLookup.get(node.parentId) : undefined;\n const { x: parentX, y: parentY } = parentNode ? parentNode.internals.positionAbsolute : { x: 0, y: 0 };\n const origin = node.origin ?? nodeOrigin;\n let extent = node.extent || nodeExtent;\n if (node.extent === 'parent' && !node.expandParent) {\n if (!parentNode) {\n onError?.('005', errorMessages['error005']());\n }\n else {\n const { width: parentWidth, height: parentHeight } = getNodeDimensions(parentNode);\n if (parentWidth && parentHeight) {\n extent = [\n [parentX, parentY],\n [parentX + parentWidth, parentY + parentHeight],\n ];\n }\n }\n }\n else if (parentNode && isCoordinateExtent(node.extent)) {\n extent = [\n [node.extent[0][0] + parentX, node.extent[0][1] + parentY],\n [node.extent[1][0] + parentX, node.extent[1][1] + parentY],\n ];\n }\n const positionAbsolute = isCoordinateExtent(extent)\n ? clampPosition(nextPosition, extent, node.measured)\n : nextPosition;\n if (node.measured.width === undefined || node.measured.height === undefined) {\n onError?.('015', errorMessages['error015']());\n }\n return {\n position: {\n x: positionAbsolute.x - parentX + (node.measured.width ?? 0) * origin[0],\n y: positionAbsolute.y - parentY + (node.measured.height ?? 0) * origin[1],\n },\n positionAbsolute,\n };\n}\n/**\n * Pass in nodes & edges to delete, get arrays of nodes and edges that actually can be deleted\n * @internal\n * @param param.nodesToRemove - The nodes to remove\n * @param param.edgesToRemove - The edges to remove\n * @param param.nodes - All nodes\n * @param param.edges - All edges\n * @param param.onBeforeDelete - Callback to check which nodes and edges can be deleted\n * @returns nodes: nodes that can be deleted, edges: edges that can be deleted\n */\nasync function getElementsToRemove({ nodesToRemove = [], edgesToRemove = [], nodes, edges, onBeforeDelete, }) {\n const nodeIds = new Set(nodesToRemove.map((node) => node.id));\n const matchingNodes = [];\n for (const node of nodes) {\n if (node.deletable === false) {\n continue;\n }\n const isIncluded = nodeIds.has(node.id);\n const parentHit = !isIncluded && node.parentId && matchingNodes.find((n) => n.id === node.parentId);\n if (isIncluded || parentHit) {\n matchingNodes.push(node);\n }\n }\n const edgeIds = new Set(edgesToRemove.map((edge) => edge.id));\n const deletableEdges = edges.filter((edge) => edge.deletable !== false);\n const connectedEdges = getConnectedEdges(matchingNodes, deletableEdges);\n const matchingEdges = connectedEdges;\n for (const edge of deletableEdges) {\n const isIncluded = edgeIds.has(edge.id);\n if (isIncluded && !matchingEdges.find((e) => e.id === edge.id)) {\n matchingEdges.push(edge);\n }\n }\n if (!onBeforeDelete) {\n return {\n edges: matchingEdges,\n nodes: matchingNodes,\n };\n }\n const onBeforeDeleteResult = await onBeforeDelete({\n nodes: matchingNodes,\n edges: matchingEdges,\n });\n if (typeof onBeforeDeleteResult === 'boolean') {\n return onBeforeDeleteResult ? { edges: matchingEdges, nodes: matchingNodes } : { edges: [], nodes: [] };\n }\n return onBeforeDeleteResult;\n}\n\nconst clamp = (val, min = 0, max = 1) => Math.min(Math.max(val, min), max);\nconst clampPosition = (position = { x: 0, y: 0 }, extent, dimensions) => ({\n x: clamp(position.x, extent[0][0], extent[1][0] - (dimensions?.width ?? 0)),\n y: clamp(position.y, extent[0][1], extent[1][1] - (dimensions?.height ?? 0)),\n});\nfunction clampPositionToParent(childPosition, childDimensions, parent) {\n const { width: parentWidth, height: parentHeight } = getNodeDimensions(parent);\n const { x: parentX, y: parentY } = parent.internals.positionAbsolute;\n return clampPosition(childPosition, [\n [parentX, parentY],\n [parentX + parentWidth, parentY + parentHeight],\n ], childDimensions);\n}\n/**\n * Calculates the velocity of panning when the mouse is close to the edge of the canvas\n * @internal\n * @param value - One dimensional poition of the mouse (x or y)\n * @param min - Minimal position on canvas before panning starts\n * @param max - Maximal position on canvas before panning starts\n * @returns - A number between 0 and 1 that represents the velocity of panning\n */\nconst calcAutoPanVelocity = (value, min, max) => {\n if (value < min) {\n return clamp(Math.abs(value - min), 1, min) / min;\n }\n else if (value > max) {\n return -clamp(Math.abs(value - max), 1, min) / min;\n }\n return 0;\n};\nconst calcAutoPan = (pos, bounds, speed = 15, distance = 40) => {\n const xMovement = calcAutoPanVelocity(pos.x, distance, bounds.width - distance) * speed;\n const yMovement = calcAutoPanVelocity(pos.y, distance, bounds.height - distance) * speed;\n return [xMovement, yMovement];\n};\nconst getBoundsOfBoxes = (box1, box2) => ({\n x: Math.min(box1.x, box2.x),\n y: Math.min(box1.y, box2.y),\n x2: Math.max(box1.x2, box2.x2),\n y2: Math.max(box1.y2, box2.y2),\n});\nconst rectToBox = ({ x, y, width, height }) => ({\n x,\n y,\n x2: x + width,\n y2: y + height,\n});\nconst boxToRect = ({ x, y, x2, y2 }) => ({\n x,\n y,\n width: x2 - x,\n height: y2 - y,\n});\nconst nodeToRect = (node, nodeOrigin = [0, 0]) => {\n const { x, y } = isInternalNodeBase(node)\n ? node.internals.positionAbsolute\n : getNodePositionWithOrigin(node, nodeOrigin);\n return {\n x,\n y,\n width: node.measured?.width ?? node.width ?? node.initialWidth ?? 0,\n height: node.measured?.height ?? node.height ?? node.initialHeight ?? 0,\n };\n};\nconst nodeToBox = (node, nodeOrigin = [0, 0]) => {\n const { x, y } = isInternalNodeBase(node)\n ? node.internals.positionAbsolute\n : getNodePositionWithOrigin(node, nodeOrigin);\n return {\n x,\n y,\n x2: x + (node.measured?.width ?? node.width ?? node.initialWidth ?? 0),\n y2: y + (node.measured?.height ?? node.height ?? node.initialHeight ?? 0),\n };\n};\nconst getBoundsOfRects = (rect1, rect2) => boxToRect(getBoundsOfBoxes(rectToBox(rect1), rectToBox(rect2)));\nconst getRectsOverlappingArea = (aX, aY, aWidth, aHeight, bX, bY, bWidth, bHeight) => {\n const xOverlap = Math.max(0, Math.min(aX + aWidth, bX + bWidth) - Math.max(aX, bX));\n const yOverlap = Math.max(0, Math.min(aY + aHeight, bY + bHeight) - Math.max(aY, bY));\n return Math.ceil(xOverlap * yOverlap);\n};\nconst getOverlappingArea = (rectA, rectB) => getRectsOverlappingArea(rectA.x, rectA.y, rectA.width, rectA.height, rectB.x, rectB.y, rectB.width, rectB.height);\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst isRectObject = (obj) => isNumeric(obj.width) && isNumeric(obj.height) && isNumeric(obj.x) && isNumeric(obj.y);\n/* eslint-disable-next-line @typescript-eslint/no-explicit-any */\nconst isNumeric = (n) => !isNaN(n) && isFinite(n);\nconst createDevWarn = (lib, helpUrl) => (id, message) => {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`[${lib}]: ${message} Help: ${helpUrl}error#${id}`);\n }\n};\nconst snapPosition = (position, snapGrid = [1, 1]) => {\n return {\n x: snapGrid[0] * Math.round(position.x / snapGrid[0]),\n y: snapGrid[1] * Math.round(position.y / snapGrid[1]),\n };\n};\nconst pointToRendererPoint = ({ x, y }, [tx, ty, tScale], snapToGrid = false, snapGrid = [1, 1]) => {\n const position = {\n x: (x - tx) / tScale,\n y: (y - ty) / tScale,\n };\n return snapToGrid ? snapPosition(position, snapGrid) : position;\n};\nconst rendererPointToPoint = ({ x, y }, [tx, ty, tScale]) => {\n return {\n x: x * tScale + tx,\n y: y * tScale + ty,\n };\n};\n/**\n * Parses a single padding value to a number\n * @internal\n * @param padding - Padding to parse\n * @param viewport - Width or height of the viewport\n * @returns The padding in pixels\n */\nfunction parsePadding(padding, viewport) {\n if (typeof padding === 'number') {\n return Math.floor((viewport - viewport / (1 + padding)) * 0.5);\n }\n if (typeof padding === 'string' && padding.endsWith('px')) {\n const paddingValue = parseFloat(padding);\n if (!Number.isNaN(paddingValue)) {\n return Math.floor(paddingValue);\n }\n }\n if (typeof padding === 'string' && padding.endsWith('%')) {\n const paddingValue = parseFloat(padding);\n if (!Number.isNaN(paddingValue)) {\n return Math.floor(viewport * paddingValue * 0.01);\n }\n }\n console.error(`The padding value \"${padding}\" is invalid. Please provide a number or a string with a valid unit (px or %).`);\n return 0;\n}\n/**\n * Parses the paddings to an object with top, right, bottom, left, x and y paddings\n * @internal\n * @param padding - Padding to parse\n * @param width - Width of the viewport\n * @param height - Height of the viewport\n * @returns An object with the paddings in pixels\n */\nfunction parsePaddings(padding, width, height) {\n if (typeof padding === 'string' || typeof padding === 'number') {\n const paddingY = parsePadding(padding, height);\n const paddingX = parsePadding(padding, width);\n return {\n top: paddingY,\n right: paddingX,\n bottom: paddingY,\n left: paddingX,\n x: paddingX * 2,\n y: paddingY * 2,\n };\n }\n if (typeof padding === 'object') {\n const top = parsePadding(padding.top ?? padding.y ?? 0, height);\n const bottom = parsePadding(padding.bottom ?? padding.y ?? 0, height);\n const left = parsePadding(padding.left ?? padding.x ?? 0, width);\n const right = parsePadding(padding.right ?? padding.x ?? 0, width);\n return { top, right, bottom, left, x: left + right, y: top + bottom };\n }\n return { top: 0, right: 0, bottom: 0, left: 0, x: 0, y: 0 };\n}\n/**\n * Calculates the resulting paddings if the new viewport is applied\n * @internal\n * @param bounds - Bounds to fit inside viewport\n * @param x - X position of the viewport\n * @param y - Y position of the viewport\n * @param zoom - Zoom level of the viewport\n * @param width - Width of the viewport\n * @param height - Height of the viewport\n * @returns An object with the minimum padding required to fit the bounds inside the viewport\n */\nfunction calculateAppliedPaddings(bounds, x, y, zoom, width, height) {\n const { x: left, y: top } = rendererPointToPoint(bounds, [x, y, zoom]);\n const { x: boundRight, y: boundBottom } = rendererPointToPoint({ x: bounds.x + bounds.width, y: bounds.y + bounds.height }, [x, y, zoom]);\n const right = width - boundRight;\n const bottom = height - boundBottom;\n return {\n left: Math.floor(left),\n top: Math.floor(top),\n right: Math.floor(right),\n bottom: Math.floor(bottom),\n };\n}\n/**\n * Returns a viewport that encloses the given bounds with padding.\n * @public\n * @remarks You can determine bounds of nodes with {@link getNodesBounds} and {@link getBoundsOfRects}\n * @param bounds - Bounds to fit inside viewport.\n * @param width - Width of the viewport.\n * @param height - Height of the viewport.\n * @param minZoom - Minimum zoom level of the resulting viewport.\n * @param maxZoom - Maximum zoom level of the resulting viewport.\n * @param padding - Padding around the bounds.\n * @returns A transformed {@link Viewport} that encloses the given bounds which you can pass to e.g. {@link setViewport}.\n * @example\n * const { x, y, zoom } = getViewportForBounds(\n * { x: 0, y: 0, width: 100, height: 100},\n * 1200, 800, 0.5, 2);\n */\nconst getViewportForBounds = (bounds, width, height, minZoom, maxZoom, padding) => {\n // First we resolve all the paddings to actual pixel values\n const p = parsePaddings(padding, width, height);\n const xZoom = (width - p.x) / bounds.width;\n const yZoom = (height - p.y) / bounds.height;\n // We calculate the new x, y, zoom for a centered view\n const zoom = Math.min(xZoom, yZoom);\n const clampedZoom = clamp(zoom, minZoom, maxZoom);\n const boundsCenterX = bounds.x + bounds.width / 2;\n const boundsCenterY = bounds.y + bounds.height / 2;\n const x = width / 2 - boundsCenterX * clampedZoom;\n const y = height / 2 - boundsCenterY * clampedZoom;\n // Then we calculate the minimum padding, to respect asymmetric paddings\n const newPadding = calculateAppliedPaddings(bounds, x, y, clampedZoom, width, height);\n // We only want to have an offset if the newPadding is smaller than the required padding\n const offset = {\n left: Math.min(newPadding.left - p.left, 0),\n top: Math.min(newPadding.top - p.top, 0),\n right: Math.min(newPadding.right - p.right, 0),\n bottom: Math.min(newPadding.bottom - p.bottom, 0),\n };\n return {\n x: x - offset.left + offset.right,\n y: y - offset.top + offset.bottom,\n zoom: clampedZoom,\n };\n};\nconst isMacOs = () => typeof navigator !== 'undefined' && navigator?.userAgent?.indexOf('Mac') >= 0;\nfunction isCoordinateExtent(extent) {\n return extent !== undefined && extent !== null && extent !== 'parent';\n}\nfunction getNodeDimensions(node) {\n return {\n width: node.measured?.width ?? node.width ?? node.initialWidth ?? 0,\n height: node.measured?.height ?? node.height ?? node.initialHeight ?? 0,\n };\n}\nfunction nodeHasDimensions(node) {\n return ((node.measured?.width ?? node.width ?? node.initialWidth) !== undefined &&\n (node.measured?.height ?? node.height ?? node.initialHeight) !== undefined);\n}\n/**\n * Convert child position to absolute position\n *\n * @internal\n * @param position\n * @param parentId\n * @param nodeLookup\n * @param nodeOrigin\n * @returns an internal node with an absolute position\n */\nfunction evaluateAbsolutePosition(position, dimensions = { width: 0, height: 0 }, parentId, nodeLookup, nodeOrigin) {\n const positionAbsolute = { ...position };\n const parent = nodeLookup.get(parentId);\n if (parent) {\n const origin = parent.origin || nodeOrigin;\n positionAbsolute.x += parent.internals.positionAbsolute.x - (dimensions.width ?? 0) * origin[0];\n positionAbsolute.y += parent.internals.positionAbsolute.y - (dimensions.height ?? 0) * origin[1];\n }\n return positionAbsolute;\n}\nfunction areSetsEqual(a, b) {\n if (a.size !== b.size) {\n return false;\n }\n for (const item of a) {\n if (!b.has(item)) {\n return false;\n }\n }\n return true;\n}\n/**\n * Polyfill for Promise.withResolvers until we can use it in all browsers\n * @internal\n */\nfunction withResolvers() {\n let resolve;\n let reject;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n return { promise, resolve, reject };\n}\nfunction mergeAriaLabelConfig(partial) {\n return { ...defaultAriaLabelConfig, ...(partial || {}) };\n}\nfunction isAttributionVisible(library) {\n if (typeof document === 'undefined')\n return true;\n const pane = document.querySelector(`.${library}-flow__pane`);\n if (!pane || !pane.isConnected)\n return true;\n const paneStyle = getComputedStyle(pane);\n if (paneStyle.display === 'none')\n return true;\n if (paneStyle.visibility === 'hidden' || paneStyle.visibility === 'collapse')\n return true;\n if (paneStyle.opacity === '0')\n return true;\n if (paneStyle.width === '0' && paneStyle.height === '0')\n return true;\n const paneRect = pane.getBoundingClientRect();\n if (paneRect.width === 0 && paneRect.height === 0)\n return true;\n const attr = document.querySelector(`.${library}-flow__attribution`);\n if (!attr || !attr.isConnected)\n return false;\n const style = getComputedStyle(attr);\n if (style.display === 'none')\n return false;\n if (style.visibility === 'hidden' || style.visibility === 'collapse')\n return false;\n if (style.opacity === '0')\n return false;\n const rect = attr.getBoundingClientRect();\n if (rect.width === 0 && rect.height === 0)\n return false;\n return true;\n}\n\nlet warningDisplayed = false;\nfunction handleAttributionWarning(library) {\n if (warningDisplayed || process.env.NODE_ENV !== 'development') {\n return;\n }\n warningDisplayed = true;\n const framework = `${library.charAt(0).toUpperCase() + library.slice(1)} Flow`;\n setTimeout(() => {\n if (!isAttributionVisible(library)) {\n console.warn(`${framework}: It seems like you are hiding the attribution. Please only do this when you are subscribed to ${framework} Pro: https://${library}flow.dev/remove-attr\\n%cYou can ignore this warning if you are subscribed.`, 'font-style: italic;');\n }\n }, 1000);\n}\n\n/**\n * @internal\n */\nfunction areConnectionMapsEqual(a, b) {\n if (!a && !b) {\n return true;\n }\n if (!a || !b || a.size !== b.size) {\n return false;\n }\n if (!a.size && !b.size) {\n return true;\n }\n for (const key of a.keys()) {\n if (!b.has(key)) {\n return false;\n }\n }\n return true;\n}\n/**\n * We call the callback for all connections in a that are not in b\n *\n * @internal\n */\nfunction handleConnectionChange(a, b, cb) {\n if (!cb) {\n return;\n }\n const diff = [];\n a.forEach((connection, key) => {\n if (!b?.has(key)) {\n diff.push(connection);\n }\n });\n if (diff.length) {\n cb(diff);\n }\n}\nfunction getConnectionStatus(isValid) {\n return isValid === null ? null : isValid ? 'valid' : 'invalid';\n}\n\nfunction getPointerPosition(event, { snapGrid = [0, 0], snapToGrid = false, transform, containerBounds }) {\n const { x, y } = getEventPosition(event);\n const pointerPos = pointToRendererPoint({ x: x - (containerBounds?.left ?? 0), y: y - (containerBounds?.top ?? 0) }, transform);\n const { x: xSnapped, y: ySnapped } = snapToGrid ? snapPosition(pointerPos, snapGrid) : pointerPos;\n // we need the snapped position in order to be able to skip unnecessary drag events\n return {\n xSnapped,\n ySnapped,\n ...pointerPos,\n };\n}\nconst getDimensions = (node) => ({\n width: node.offsetWidth,\n height: node.offsetHeight,\n});\nconst getHostForElement = (element) => element?.getRootNode?.() || window?.document;\nconst inputTags = ['INPUT', 'SELECT', 'TEXTAREA'];\nfunction isInputDOMNode(event) {\n // using composed path for handling shadow dom\n const target = (event.composedPath?.()?.[0] || event.target);\n if (target?.nodeType !== 1 /* Node.ELEMENT_NODE */)\n return false;\n const isInput = inputTags.includes(target.nodeName) || target.hasAttribute('contenteditable');\n // when an input field is focused we don't want to trigger deletion or movement of nodes\n return isInput || !!target.closest('.nokey');\n}\nconst isMouseEvent = (event) => 'clientX' in event;\nconst getEventPosition = (event, bounds) => {\n const isMouse = isMouseEvent(event);\n const evtX = isMouse ? event.clientX : event.touches?.[0].clientX;\n const evtY = isMouse ? event.clientY : event.touches?.[0].clientY;\n return {\n x: evtX - (bounds?.left ?? 0),\n y: evtY - (bounds?.top ?? 0),\n };\n};\n/*\n * The handle bounds are calculated relative to the node element.\n * We store them in the internals object of the node in order to avoid\n * unnecessary recalculations.\n */\nconst getHandleBounds = (type, nodeElement, nodeBounds, zoom, nodeId) => {\n const handles = nodeElement.querySelectorAll(`.${type}`);\n if (!handles || !handles.length) {\n return null;\n }\n return Array.from(handles).map((handle) => {\n const handleBounds = handle.getBoundingClientRect();\n return {\n id: handle.getAttribute('data-handleid'),\n type,\n nodeId,\n position: handle.getAttribute('data-handlepos'),\n x: (handleBounds.left - nodeBounds.left) / zoom,\n y: (handleBounds.top - nodeBounds.top) / zoom,\n ...getDimensions(handle),\n };\n });\n};\n\nfunction getBezierEdgeCenter({ sourceX, sourceY, targetX, targetY, sourceControlX, sourceControlY, targetControlX, targetControlY, }) {\n /*\n * cubic bezier t=0.5 mid point, not the actual mid point, but easy to calculate\n * https://stackoverflow.com/questions/67516101/how-to-find-distance-mid-point-of-bezier-curve\n */\n const centerX = sourceX * 0.125 + sourceControlX * 0.375 + targetControlX * 0.375 + targetX * 0.125;\n const centerY = sourceY * 0.125 + sourceControlY * 0.375 + targetControlY * 0.375 + targetY * 0.125;\n const offsetX = Math.abs(centerX - sourceX);\n const offsetY = Math.abs(centerY - sourceY);\n return [centerX, centerY, offsetX, offsetY];\n}\nfunction calculateControlOffset(distance, curvature) {\n if (distance >= 0) {\n return 0.5 * distance;\n }\n return curvature * 25 * Math.sqrt(-distance);\n}\nfunction getControlWithCurvature({ pos, x1, y1, x2, y2, c }) {\n switch (pos) {\n case Position.Left:\n return [x1 - calculateControlOffset(x1 - x2, c), y1];\n case Position.Right:\n return [x1 + calculateControlOffset(x2 - x1, c), y1];\n case Position.Top:\n return [x1, y1 - calculateControlOffset(y1 - y2, c)];\n case Position.Bottom:\n return [x1, y1 + calculateControlOffset(y2 - y1, c)];\n }\n}\n/**\n * The `getBezierPath` util returns everything you need to render a bezier edge\n *between two nodes.\n * @public\n * @returns A path string you can use in an SVG, the `labelX` and `labelY` position (center of path)\n * and `offsetX`, `offsetY` between source handle and label.\n * - `path`: the path to use in an SVG `<path>` element.\n * - `labelX`: the `x` position you can use to render a label for this edge.\n * - `labelY`: the `y` position you can use to render a label for this edge.\n * - `offsetX`: the absolute difference between the source `x` position and the `x` position of the\n * middle of this path.\n * - `offsetY`: the absolute difference between the source `y` position and the `y` position of the\n * middle of this path.\n * @example\n * ```js\n * const source = { x: 0, y: 20 };\n * const target = { x: 150, y: 100 };\n *\n * const [path, labelX, labelY, offsetX, offsetY] = getBezierPath({\n * sourceX: source.x,\n * sourceY: source.y,\n * sourcePosition: Position.Right,\n * targetX: target.x,\n * targetY: target.y,\n * targetPosition: Position.Left,\n *});\n *```\n *\n * @remarks This function returns a tuple (aka a fixed-size array) to make it easier to\n *work with multiple edge paths at once.\n */\nfunction getBezierPath({ sourceX, sourceY, sourcePosition = Position.Bottom, targetX, targetY, targetPosition = Position.Top, curvature = 0.25, }) {\n const [sourceControlX, sourceControlY] = getControlWithCurvature({\n pos: sourcePosition,\n x1: sourceX,\n y1: sourceY,\n x2: targetX,\n y2: targetY,\n c: curvature,\n });\n const [targetControlX, targetControlY] = getControlWithCurvature({\n pos: targetPosition,\n x1: targetX,\n y1: targetY,\n x2: sourceX,\n y2: sourceY,\n c: curvature,\n });\n const [labelX, labelY, offsetX, offsetY] = getBezierEdgeCenter({\n sourceX,\n sourceY,\n targetX,\n targetY,\n sourceControlX,\n sourceControlY,\n targetControlX,\n targetControlY,\n });\n return [\n `M${sourceX},${sourceY} C${sourceControlX},${sourceControlY} ${targetControlX},${targetControlY} ${targetX},${targetY}`,\n labelX,\n labelY,\n offsetX,\n offsetY,\n ];\n}\n\n// this is used for straight edges and simple smoothstep edges (LTR, RTL, BTT, TTB)\nfunction getEdgeCenter({ sourceX, sourceY, targetX, targetY, }) {\n const xOffset = Math.abs(targetX - sourceX) / 2;\n const centerX = targetX < sourceX ? targetX + xOffset : targetX - xOffset;\n const yOffset = Math.abs(targetY - sourceY) / 2;\n const centerY = targetY < sourceY ? targetY + yOffset : targetY - yOffset;\n return [centerX, centerY, xOffset, yOffset];\n}\n/**\n * Returns the z-index for an edge based on the node it connects and whether it is selected.\n * By default, edges are rendered below nodes. This behaviour is different for edges that are\n * connected to nodes with a parent, as they are rendered above the parent node.\n */\nfunction getElevatedEdgeZIndex({ sourceNode, targetNode, selected = false, zIndex = 0, elevateOnSelect = false, zIndexMode = 'basic', }) {\n if (zIndexMode === 'manual') {\n return zIndex;\n }\n const edgeZ = elevateOnSelect && selected ? zIndex + 1000 : zIndex;\n const nodeZ = Math.max(sourceNode.parentId || (elevateOnSelect && sourceNode.selected) ? sourceNode.internals.z : 0, targetNode.parentId || (elevateOnSelect && targetNode.selected) ? targetNode.internals.z : 0);\n return edgeZ + nodeZ;\n}\nfunction isEdgeVisible({ sourceNode, targetNode, width, height, transform }) {\n const edgeBox = getBoundsOfBoxes(nodeToBox(sourceNode), nodeToBox(targetNode));\n if (edgeBox.x === edgeBox.x2) {\n edgeBox.x2 += 1;\n }\n if (edgeBox.y === edgeBox.y2) {\n edgeBox.y2 += 1;\n }\n const viewRect = {\n x: -transform[0] / transform[2],\n y: -transform[1] / transform[2],\n width: width / transform[2],\n height: height / transform[2],\n };\n return getOverlappingArea(viewRect, boxToRect(edgeBox)) > 0;\n}\n/**\n * The default edge ID generator function. Generates an ID based on the source, target, and handles.\n * @public\n * @param params - The connection or edge to generate an ID for.\n * @returns The generated edge ID.\n */\nconst getEdgeId = ({ source, sourceHandle, target, targetHandle }) => `xy-edge__${source}${sourceHandle || ''}-${target}${targetHandle || ''}`;\nconst connectionExists = (edge, edges) => {\n return edges.some((el) => el.source === edge.source &&\n el.target === edge.target &&\n (el.sourceHandle === edge.sourceHandle || (!el.sourceHandle && !edge.sourceHandle)) &&\n (el.targetHandle === edge.targetHandle || (!el.targetHandle && !edge.targetHandle)));\n};\n/**\n * This util is a convenience function to add a new Edge to an array of edges. It also performs some validation to make sure you don't add an invalid edge or duplicate an existing one.\n * @public\n * @param edgeParams - Either an `Edge` or a `Connection` you want to add.\n * @param edges - The array of all current edges.\n * @param options - Optional configuration object.\n * @returns A new array of edges with the new edge added.\n *\n * @remarks If an edge with the same `target` and `source` already exists (and the same\n *`targetHandle` and `sourceHandle` if those are set), then this util won't add\n *a new edge even if the `id` property is different.\n *\n */\nconst addEdge = (edgeParams, edges, options = {}) => {\n if (!edgeParams.source || !edgeParams.target) {\n options.onError?.('006', errorMessages['error006']());\n return edges;\n }\n const edgeIdGenerator = options.getEdgeId || getEdgeId;\n let edge;\n if (isEdgeBase(edgeParams)) {\n edge = { ...edgeParams };\n }\n else {\n edge = {\n ...edgeParams,\n id: edgeIdGenerator(edgeParams),\n };\n }\n if (connectionExists(edge, edges)) {\n return edges;\n }\n if (edge.sourceHandle === null) {\n delete edge.sourceHandle;\n }\n if (edge.targetHandle === null) {\n delete edge.targetHandle;\n }\n return edges.concat(edge);\n};\n/**\n * A handy utility to update an existing [`Edge`](/api-reference/types/edge) with new properties.\n *This searches your edge array for an edge with a matching `id` and updates its\n *properties with the connection you provide.\n * @public\n * @param oldEdge - The edge you want to update.\n * @param newConnection - The new connection you want to update the edge with.\n * @param edges - The array of all current edges.\n * @returns The updated edges array.\n *\n * @example\n * ```js\n *const onReconnect = useCallback(\n * (oldEdge: Edge, newConnection: Connection) => setEdges((els) => reconnectEdge(oldEdge, newConnection, els)),[]);\n *```\n */\nconst reconnectEdge = (oldEdge, newConnection, edges, options = { shouldReplaceId: true }) => {\n const { id: oldEdgeId, ...rest } = oldEdge;\n if (!newConnection.source || !newConnection.target) {\n options.onError?.('006', errorMessages['error006']());\n return edges;\n }\n const foundEdge = edges.find((e) => e.id === oldEdge.id);\n if (!foundEdge) {\n options.onError?.('007', errorMessages['error007'](oldEdgeId));\n return edges;\n }\n const edgeIdGenerator = options.getEdgeId || getEdgeId;\n // Remove old edge and create the new edge with parameters of old edge.\n const edge = {\n ...rest,\n id: options.shouldReplaceId ? edgeIdGenerator(newConnection) : oldEdgeId,\n source: newConnection.source,\n target: newConnection.target,\n sourceHandle: newConnection.sourceHandle,\n targetHandle: newConnection.targetHandle,\n };\n return edges.filter((e) => e.id !== oldEdgeId).concat(edge);\n};\n\n/**\n * Calculates the straight line path between two points.\n * @public\n * @returns A path string you can use in an SVG, the `labelX` and `labelY` position (center of path)\n * and `offsetX`, `offsetY` between source handle and label.\n *\n * - `path`: the path to use in an SVG `<path>` element.\n * - `labelX`: the `x` position you can use to render a label for this edge.\n * - `labelY`: the `y` position you can use to render a label for this edge.\n * - `offsetX`: the absolute difference between the source `x` position and the `x` position of the\n * middle of this path.\n * - `offsetY`: the absolute difference between the source `y` position and the `y` position of the\n * middle of this path.\n * @example\n * ```js\n * const source = { x: 0, y: 20 };\n * const target = { x: 150, y: 100 };\n *\n * const [path, labelX, labelY, offsetX, offsetY] = getStraightPath({\n * sourceX: source.x,\n * sourceY: source.y,\n * sourcePosition: Position.Right,\n * targetX: target.x,\n * targetY: target.y,\n * targetPosition: Position.Left,\n * });\n * ```\n * @remarks This function returns a tuple (aka a fixed-size array) to make it easier to work with multiple edge paths at once.\n */\nfunction getStraightPath({ sourceX, sourceY, targetX, targetY, }) {\n const [labelX, labelY, offsetX, offsetY] = getEdgeCenter({\n sourceX,\n sourceY,\n targetX,\n targetY,\n });\n return [`M ${sourceX},${sourceY}L ${targetX},${targetY}`, labelX, labelY, offsetX, offsetY];\n}\n\nconst handleDirections = {\n [Position.Left]: { x: -1, y: 0 },\n [Position.Right]: { x: 1, y: 0 },\n [Position.Top]: { x: 0, y: -1 },\n [Position.Bottom]: { x: 0, y: 1 },\n};\nconst getDirection = ({ source, sourcePosition = Position.Bottom, target, }) => {\n if (sourcePosition === Position.Left || sourcePosition === Position.Right) {\n return source.x < target.x ? { x: 1, y: 0 } : { x: -1, y: 0 };\n }\n return source.y < target.y ? { x: 0, y: 1 } : { x: 0, y: -1 };\n};\nconst distance = (a, b) => Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y, 2));\n/*\n * With this function we try to mimic an orthogonal edge routing behaviour\n * It's not as good as a real orthogonal edge routing, but it's faster and good enough as a default for step and smooth step edges\n */\nfunction getPoints({ source, sourcePosition = Position.Bottom, target, targetPosition = Position.Top, center, offset, stepPosition, }) {\n const sourceDir = handleDirections[sourcePosition];\n const targetDir = handleDirections[targetPosition];\n const sourceGapped = { x: source.x + sourceDir.x * offset, y: source.y + sourceDir.y * offset };\n const targetGapped = { x: target.x + targetDir.x * offset, y: target.y + targetDir.y * offset };\n const dir = getDirection({\n source: sourceGapped,\n sourcePosition,\n target: targetGapped,\n });\n const dirAccessor = dir.x !== 0 ? 'x' : 'y';\n const currDir = dir[dirAccessor];\n let points = [];\n let centerX, centerY;\n const sourceGapOffset = { x: 0, y: 0 };\n const targetGapOffset = { x: 0, y: 0 };\n const [, , defaultOffsetX, defaultOffsetY] = getEdgeCenter({\n sourceX: source.x,\n sourceY: source.y,\n targetX: target.x,\n targetY: target.y,\n });\n // opposite handle positions, default case\n if (sourceDir[dirAccessor] * targetDir[dirAccessor] === -1) {\n if (dirAccessor === 'x') {\n // Primary direction is horizontal, so stepPosition affects X coordinate\n centerX = center.x ?? sourceGapped.x + (targetGapped.x - sourceGapped.x) * stepPosition;\n centerY = center.y ?? (sourceGapped.y + targetGapped.y) / 2;\n }\n else {\n // Primary direction is vertical, so stepPosition affects Y coordinate\n centerX = center.x ?? (sourceGapped.x + targetGapped.x) / 2;\n centerY = center.y ?? sourceGapped.y + (targetGapped.y - sourceGapped.y) * stepPosition;\n }\n /*\n * --->\n * |\n * >---\n */\n const verticalSplit = [\n { x: centerX, y: sourceGapped.y },\n { x: centerX, y: targetGapped.y },\n ];\n /*\n * |\n * ---\n * |\n */\n const horizontalSplit = [\n { x: sourceGapped.x, y: centerY },\n { x: targetGapped.x, y: centerY },\n ];\n if (sourceDir[dirAccessor] === currDir) {\n points = dirAccessor === 'x' ? verticalSplit : horizontalSplit;\n }\n else {\n points = dirAccessor === 'x' ? horizontalSplit : verticalSplit;\n }\n }\n else {\n // sourceTarget means we take x from source and y from target, targetSource is the opposite\n const sourceTarget = [{ x: sourceGapped.x, y: targetGapped.y }];\n const targetSource = [{ x: targetGapped.x, y: sourceGapped.y }];\n // this handles edges with same handle positions\n if (dirAccessor === 'x') {\n points = sourceDir.x === currDir ? targetSource : sourceTarget;\n }\n else {\n points = sourceDir.y === currDir ? sourceTarget : targetSource;\n }\n if (sourcePosition === targetPosition) {\n const diff = Math.abs(source[dirAccessor] - target[dirAccessor]);\n // if an edge goes from right to right for example (sourcePosition === targetPosition) and the distance between source.x and target.x is less than the offset, the added point and the gapped source/target will overlap. This leads to a weird edge path. To avoid this we add a gapOffset to the source/target\n if (diff <= offset) {\n const gapOffset = Math.min(offset - 1, offset - diff);\n if (sourceDir[dirAccessor] === currDir) {\n sourceGapOffset[dirAccessor] = (sourceGapped[dirAccessor] > source[dirAccessor] ? -1 : 1) * gapOffset;\n }\n else {\n targetGapOffset[dirAccessor] = (targetGapped[dirAccessor] > target[dirAccessor] ? -1 : 1) * gapOffset;\n }\n }\n }\n // these are conditions for handling mixed handle positions like Right -> Bottom for example\n if (sourcePosition !== targetPosition) {\n const dirAccessorOpposite = dirAccessor === 'x' ? 'y' : 'x';\n const isSameDir = sourceDir[dirAccessor] === targetDir[dirAccessorOpposite];\n const sourceGtTargetOppo = sourceGapped[dirAccessorOpposite] > targetGapped[dirAccessorOpposite];\n const sourceLtTargetOppo = sourceGapped[dirAccessorOpposite] < targetGapped[dirAccessorOpposite];\n const flipSourceTarget = (sourceDir[dirAccessor] === 1 && ((!isSameDir && sourceGtTargetOppo) || (isSameDir && sourceLtTargetOppo))) ||\n (sourceDir[dirAccessor] !== 1 && ((!isSameDir && sourceLtTargetOppo) || (isSameDir && sourceGtTargetOppo)));\n if (flipSourceTarget) {\n points = dirAccessor === 'x' ? sourceTarget : targetSource;\n }\n }\n const sourceGapPoint = { x: sourceGapped.x + sourceGapOffset.x, y: sourceGapped.y + sourceGapOffset.y };\n const targetGapPoint = { x: targetGapped.x + targetGapOffset.x, y: targetGapped.y + targetGapOffset.y };\n const maxXDistance = Math.max(Math.abs(sourceGapPoint.x - points[0].x), Math.abs(targetGapPoint.x - points[0].x));\n const maxYDistance = Math.max(Math.abs(sourceGapPoint.y - points[0].y), Math.abs(targetGapPoint.y - points[0].y));\n // we want to place the label on the longest segment of the edge\n if (maxXDistance >= maxYDistance) {\n centerX = (sourceGapPoint.x + targetGapPoint.x) / 2;\n centerY = points[0].y;\n }\n else {\n centerX = points[0].x;\n centerY = (sourceGapPoint.y + targetGapPoint.y) / 2;\n }\n }\n const gappedSource = { x: sourceGapped.x + sourceGapOffset.x, y: sourceGapped.y + sourceGapOffset.y };\n const gappedTarget = { x: targetGapped.x + targetGapOffset.x, y: targetGapped.y + targetGapOffset.y };\n const pathPoints = [\n source,\n // we only want to add the gapped source/target if they are different from the first/last point to avoid duplicates which can cause issues with the bends\n ...(gappedSource.x !== points[0].x || gappedSource.y !== points[0].y ? [gappedSource] : []),\n ...points,\n ...(gappedTarget.x !== points[points.length - 1].x || gappedTarget.y !== points[points.length - 1].y\n ? [gappedTarget]\n : []),\n target,\n ];\n return [pathPoints, centerX, centerY, defaultOffsetX, defaultOffsetY];\n}\nfunction getBend(a, b, c, size) {\n const bendSize = Math.min(distance(a, b) / 2, distance(b, c) / 2, size);\n const { x, y } = b;\n // no bend\n if ((a.x === x && x === c.x) || (a.y === y && y === c.y)) {\n return `L${x} ${y}`;\n }\n // first segment is horizontal\n if (a.y === y) {\n const xDir = a.x < c.x ? -1 : 1;\n const yDir = a.y < c.y ? 1 : -1;\n return `L ${x + bendSize * xDir},${y}Q ${x},${y} ${x},${y + bendSize * yDir}`;\n }\n const xDir = a.x < c.x ? 1 : -1;\n const yDir = a.y < c.y ? -1 : 1;\n return `L ${x},${y + bendSize * yDir}Q ${x},${y} ${x + bendSize * xDir},${y}`;\n}\n/**\n * The `getSmoothStepPath` util returns everything you need to render a stepped path\n * between two nodes. The `borderRadius` property can be used to choose how rounded\n * the corners of those steps are.\n * @public\n * @returns A path string you can use in an SVG, the `labelX` and `labelY` position (center of path)\n * and `offsetX`, `offsetY` between source handle and label.\n *\n * - `path`: the path to use in an SVG `<path>` element.\n * - `labelX`: the `x` position you can use to render a label for this edge.\n * - `labelY`: the `y` position you can use to render a label for this edge.\n * - `offsetX`: the absolute difference between the source `x` position and the `x` position of the\n * middle of this path.\n * - `offsetY`: the absolute difference between the source `y` position and the `y` position of the\n * middle of this path.\n * @example\n * ```js\n * const source = { x: 0, y: 20 };\n * const target = { x: 150, y: 100 };\n *\n * const [path, labelX, labelY, offsetX, offsetY] = getSmoothStepPath({\n * sourceX: source.x,\n * sourceY: source.y,\n * sourcePosition: Position.Right,\n * targetX: target.x,\n * targetY: target.y,\n * targetPosition: Position.Left,\n * });\n * ```\n * @remarks This function returns a tuple (aka a fixed-size array) to make it easier to work with multiple edge paths at once.\n */\nfunction getSmoothStepPath({ sourceX, sourceY, sourcePosition = Position.Bottom, targetX, targetY, targetPosition = Position.Top, borderRadius = 5, centerX, centerY, offset = 20, stepPosition = 0.5, }) {\n const [points, labelX, labelY, offsetX, offsetY] = getPoints({\n source: { x: sourceX, y: sourceY },\n sourcePosition,\n target: { x: targetX, y: targetY },\n targetPosition,\n center: { x: centerX, y: centerY },\n offset,\n stepPosition,\n });\n let path = `M${points[0].x} ${points[0].y}`;\n for (let i = 1; i < points.length - 1; i++) {\n path += getBend(points[i - 1], points[i], points[i + 1], borderRadius);\n }\n path += `L${points[points.length - 1].x} ${points[points.length - 1].y}`;\n return [path, labelX, labelY, offsetX, offsetY];\n}\n\nfunction isNodeInitialized(node) {\n return (node &&\n !!(node.internals.handleBounds || node.handles?.length) &&\n !!(node.measured.width || node.width || node.initialWidth));\n}\nfunction getEdgePosition(params) {\n const { sourceNode, targetNode } = params;\n if (!isNodeInitialized(sourceNode) || !isNodeInitialized(targetNode)) {\n return null;\n }\n const sourceHandleBounds = sourceNode.internals.handleBounds || toHandleBounds(sourceNode.handles);\n const targetHandleBounds = targetNode.internals.handleBounds || toHandleBounds(targetNode.handles);\n const sourceHandle = getHandle$1(sourceHandleBounds?.source ?? [], params.sourceHandle);\n const targetHandle = getHandle$1(\n // when connection type is loose we can define all handles as sources and connect source -> source\n params.connectionMode === ConnectionMode.Strict\n ? targetHandleBounds?.target ?? []\n : (targetHandleBounds?.target ?? []).concat(targetHandleBounds?.source ?? []), params.targetHandle);\n if (!sourceHandle || !targetHandle) {\n params.onError?.('008', errorMessages['error008'](!sourceHandle ? 'source' : 'target', {\n id: params.id,\n sourceHandle: params.sourceHandle,\n targetHandle: params.targetHandle,\n }));\n return null;\n }\n const sourcePosition = sourceHandle?.position || Position.Bottom;\n const targetPosition = targetHandle?.position || Position.Top;\n const source = getHandlePosition(sourceNode, sourceHandle, sourcePosition);\n const target = getHandlePosition(targetNode, targetHandle, targetPosition);\n return {\n sourceX: source.x,\n sourceY: source.y,\n targetX: target.x,\n targetY: target.y,\n sourcePosition,\n targetPosition,\n };\n}\nfunction toHandleBounds(handles) {\n if (!handles) {\n return null;\n }\n const source = [];\n const target = [];\n for (const handle of handles) {\n handle.width = handle.width ?? 1;\n handle.height = handle.height ?? 1;\n if (handle.type === 'source') {\n source.push(handle);\n }\n else if (handle.type === 'target') {\n target.push(handle);\n }\n }\n return {\n source,\n target,\n };\n}\nfunction getHandlePosition(node, handle, fallbackPosition = Position.Left, center = false) {\n const x = (handle?.x ?? 0) + node.internals.positionAbsolute.x;\n const y = (handle?.y ?? 0) + node.internals.positionAbsolute.y;\n const { width, height } = handle ?? getNodeDimensions(node);\n if (center) {\n return { x: x + width / 2, y: y + height / 2 };\n }\n const position = handle?.position ?? fallbackPosition;\n switch (position) {\n case Position.Top:\n return { x: x + width / 2, y };\n case Position.Right:\n return { x: x + width, y: y + height / 2 };\n case Position.Bottom:\n return { x: x + width / 2, y: y + height };\n case Position.Left:\n return { x, y: y + height / 2 };\n }\n}\nfunction getHandle$1(bounds, handleId) {\n if (!bounds) {\n return null;\n }\n // if no handleId is given, we use the first handle, otherwise we check for the id\n return (!handleId ? bounds[0] : bounds.find((d) => d.id === handleId)) || null;\n}\n\nfunction getMarkerId(marker, id) {\n if (!marker) {\n return '';\n }\n if (typeof marker === 'string') {\n return marker;\n }\n const idPrefix = id ? `${id}__` : '';\n return `${idPrefix}${Object.keys(marker)\n .sort()\n .map((key) => `${key}=${marker[key]}`)\n .join('&')}`;\n}\nfunction createMarkerIds(edges, { id, defaultColor, defaultMarkerStart, defaultMarkerEnd, }) {\n const ids = new Set();\n return edges\n .reduce((markers, edge) => {\n [edge.markerStart || defaultMarkerStart, edge.markerEnd || defaultMarkerEnd].forEach((marker) => {\n if (marker && typeof marker === 'object') {\n const markerId = getMarkerId(marker, id);\n if (!ids.has(markerId)) {\n markers.push({ id: markerId, color: marker.color || defaultColor, ...marker });\n ids.add(markerId);\n }\n }\n });\n return markers;\n }, [])\n .sort((a, b) => a.id.localeCompare(b.id));\n}\n\nfunction getNodeToolbarTransform(nodeRect, viewport, position, offset, align) {\n let alignmentOffset = 0.5;\n if (align === 'start') {\n alignmentOffset = 0;\n }\n else if (align === 'end') {\n alignmentOffset = 1;\n }\n /*\n * position === Position.Top\n * we set the x any y position of the toolbar based on the nodes position\n */\n let pos = [\n (nodeRect.x + nodeRect.width * alignmentOffset) * viewport.zoom + viewport.x,\n nodeRect.y * viewport.zoom + viewport.y - offset,\n ];\n // and than shift it based on the alignment. The shift values are in %.\n let shift = [-100 * alignmentOffset, -100];\n switch (position) {\n case Position.Right:\n pos = [\n (nodeRect.x + nodeRect.width) * viewport.zoom + viewport.x + offset,\n (nodeRect.y + nodeRect.height * alignmentOffset) * viewport.zoom + viewport.y,\n ];\n shift = [0, -100 * alignmentOffset];\n break;\n case Position.Bottom:\n pos[1] = (nodeRect.y + nodeRect.height) * viewport.zoom + viewport.y + offset;\n shift[1] = 0;\n break;\n case Position.Left:\n pos = [\n nodeRect.x * viewport.zoom + viewport.x - offset,\n (nodeRect.y + nodeRect.height * alignmentOffset) * viewport.zoom + viewport.y,\n ];\n shift = [-100, -100 * alignmentOffset];\n break;\n }\n return `translate(${pos[0]}px, ${pos[1]}px) translate(${shift[0]}%, ${shift[1]}%)`;\n}\n\nconst alignXToPercent = {\n left: 0,\n center: 50,\n right: 100,\n};\nconst alignYToPercent = {\n top: 0,\n center: 50,\n bottom: 100,\n};\nfunction getEdgeToolbarTransform(x, y, zoom, alignX = 'center', alignY = 'center') {\n return `translate(${x}px, ${y}px) scale(${1 / zoom}) translate(${-(alignXToPercent[alignX] ?? 50)}%, ${-(alignYToPercent[alignY] ?? 50)}%)`;\n}\n\nconst SELECTED_NODE_Z = 1000;\nconst ROOT_PARENT_Z_INCREMENT = 10;\nconst defaultOptions = {\n nodeOrigin: [0, 0],\n nodeExtent: infiniteExtent,\n elevateNodesOnSelect: true,\n zIndexMode: 'basic',\n defaults: {},\n};\nconst adoptUserNodesDefaultOptions = {\n ...defaultOptions,\n checkEquality: true,\n};\nfunction mergeObjects(base, incoming) {\n const result = { ...base };\n for (const key in incoming) {\n if (incoming[key] !== undefined) {\n // typecast is safe here, because we check for undefined\n result[key] = incoming[key];\n }\n }\n return result;\n}\nfunction updateAbsolutePositions(nodeLookup, parentLookup, options) {\n const _options = mergeObjects(defaultOptions, options);\n for (const node of nodeLookup.values()) {\n if (node.parentId) {\n updateChildNode(node, nodeLookup, parentLookup, _options);\n }\n else {\n const positionWithOrigin = getNodePositionWithOrigin(node, _options.nodeOrigin);\n const extent = isCoordinateExtent(node.extent) ? node.extent : _options.nodeExtent;\n const clampedPosition = clampPosition(positionWithOrigin, extent, getNodeDimensions(node));\n node.internals.positionAbsolute = clampedPosition;\n }\n }\n}\nfunction parseHandles(userNode, internalNode) {\n if (!userNode.handles) {\n return !userNode.measured ? undefined : internalNode?.internals.handleBounds;\n }\n const source = [];\n const target = [];\n for (const handle of userNode.handles) {\n const handleBounds = {\n id: handle.id,\n width: handle.width ?? 1,\n height: handle.height ?? 1,\n nodeId: userNode.id,\n x: handle.x,\n y: handle.y,\n position: handle.position,\n type: handle.type,\n };\n if (handle.type === 'source') {\n source.push(handleBounds);\n }\n else if (handle.type === 'target') {\n target.push(handleBounds);\n }\n }\n return {\n source,\n target,\n };\n}\nfunction isManualZIndexMode(zIndexMode) {\n return zIndexMode === 'manual';\n}\nfunction adoptUserNodes(nodes, nodeLookup, parentLookup, options = {}) {\n const _options = mergeObjects(adoptUserNodesDefaultOptions, options);\n const rootParentIndex = { i: 0 };\n const tmpLookup = new Map(nodeLookup);\n const selectedNodeZ = _options?.elevateNodesOnSelect && !isManualZIndexMode(_options.zIndexMode) ? SELECTED_NODE_Z : 0;\n let nodesInitialized = nodes.length > 0;\n let hasSelectedNodes = false;\n nodeLookup.clear();\n parentLookup.clear();\n for (const userNode of nodes) {\n let internalNode = tmpLookup.get(userNode.id);\n if (_options.checkEquality && userNode === internalNode?.internals.userNode) {\n nodeLookup.set(userNode.id, internalNode);\n }\n else {\n const positionWithOrigin = getNodePositionWithOrigin(userNode, _options.nodeOrigin);\n const extent = isCoordinateExtent(userNode.extent) ? userNode.extent : _options.nodeExtent;\n const clampedPosition = clampPosition(positionWithOrigin, extent, getNodeDimensions(userNode));\n internalNode = {\n ..._options.defaults,\n ...userNode,\n measured: {\n width: userNode.measured?.width,\n height: userNode.measured?.height,\n },\n internals: {\n positionAbsolute: clampedPosition,\n // if user re-initializes the node or removes `measured` for whatever reason, we reset the handleBounds so that the node gets re-measured\n handleBounds: parseHandles(userNode, internalNode),\n z: calculateZ(userNode, selectedNodeZ, _options.zIndexMode),\n userNode,\n },\n };\n nodeLookup.set(userNode.id, internalNode);\n }\n if ((internalNode.measured === undefined ||\n internalNode.measured.width === undefined ||\n internalNode.measured.height === undefined) &&\n !internalNode.hidden) {\n nodesInitialized = false;\n }\n if (userNode.parentId) {\n updateChildNode(internalNode, nodeLookup, parentLookup, options, rootParentIndex);\n }\n hasSelectedNodes ||= userNode.selected ?? false;\n }\n return { nodesInitialized, hasSelectedNodes };\n}\nfunction updateParentLookup(node, parentLookup) {\n if (!node.parentId) {\n return;\n }\n const childNodes = parentLookup.get(node.parentId);\n if (childNodes) {\n childNodes.set(node.id, node);\n }\n else {\n parentLookup.set(node.parentId, new Map([[node.id, node]]));\n }\n}\n/**\n * Updates positionAbsolute and zIndex of a child node and the parentLookup.\n */\nfunction updateChildNode(node, nodeLookup, parentLookup, options, rootParentIndex) {\n const { elevateNodesOnSelect, nodeOrigin, nodeExtent, zIndexMode } = mergeObjects(defaultOptions, options);\n const parentId = node.parentId;\n const parentNode = nodeLookup.get(parentId);\n if (!parentNode) {\n console.warn(`Parent node ${parentId} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);\n return;\n }\n updateParentLookup(node, parentLookup);\n // We just want to set the rootParentIndex for the first child\n if (rootParentIndex &&\n !parentNode.parentId &&\n parentNode.internals.rootParentIndex === undefined &&\n zIndexMode === 'auto') {\n parentNode.internals.rootParentIndex = ++rootParentIndex.i;\n parentNode.internals.z = parentNode.internals.z + rootParentIndex.i * ROOT_PARENT_Z_INCREMENT;\n }\n // But we need to update rootParentIndex.i also when parent has not been updated\n if (rootParentIndex && parentNode.internals.rootParentIndex !== undefined) {\n rootParentIndex.i = parentNode.internals.rootParentIndex;\n }\n const selectedNodeZ = elevateNodesOnSelect && !isManualZIndexMode(zIndexMode) ? SELECTED_NODE_Z : 0;\n const { x, y, z } = calculateChildXYZ(node, parentNode, nodeOrigin, nodeExtent, selectedNodeZ, zIndexMode);\n const { positionAbsolute } = node.internals;\n const positionChanged = x !== positionAbsolute.x || y !== positionAbsolute.y;\n if (positionChanged || z !== node.internals.z) {\n // we create a new object to mark the node as updated\n nodeLookup.set(node.id, {\n ...node,\n internals: {\n ...node.internals,\n positionAbsolute: positionChanged ? { x, y } : positionAbsolute,\n z,\n },\n });\n }\n}\nfunction calculateZ(node, selectedNodeZ, zIndexMode) {\n const zIndex = isNumeric(node.zIndex) ? node.zIndex : 0;\n if (isManualZIndexMode(zIndexMode)) {\n return zIndex;\n }\n return zIndex + (node.selected ? selectedNodeZ : 0);\n}\nfunction calculateChildXYZ(childNode, parentNode, nodeOrigin, nodeExtent, selectedNodeZ, zIndexMode) {\n const { x: parentX, y: parentY } = parentNode.internals.positionAbsolute;\n const childDimensions = getNodeDimensions(childNode);\n const positionWithOrigin = getNodePositionWithOrigin(childNode, nodeOrigin);\n const clampedPosition = isCoordinateExtent(childNode.extent)\n ? clampPosition(positionWithOrigin, childNode.extent, childDimensions)\n : positionWithOrigin;\n let absolutePosition = clampPosition({ x: parentX + clampedPosition.x, y: parentY + clampedPosition.y }, nodeExtent, childDimensions);\n if (childNode.extent === 'parent') {\n absolutePosition = clampPositionToParent(absolutePosition, childDimensions, parentNode);\n }\n const childZ = calculateZ(childNode, selectedNodeZ, zIndexMode);\n const parentZ = parentNode.internals.z ?? 0;\n return {\n x: absolutePosition.x,\n y: absolutePosition.y,\n z: parentZ >= childZ ? parentZ + 1 : childZ,\n };\n}\nfunction handleExpandParent(children, nodeLookup, parentLookup, nodeOrigin = [0, 0]) {\n const changes = [];\n const parentExpansions = new Map();\n // determine the expanded rectangle the child nodes would take for each parent\n for (const child of children) {\n const parent = nodeLookup.get(child.parentId);\n if (!parent) {\n continue;\n }\n const parentRect = parentExpansions.get(child.parentId)?.expandedRect ?? nodeToRect(parent);\n const expandedRect = getBoundsOfRects(parentRect, child.rect);\n parentExpansions.set(child.parentId, { expandedRect, parent });\n }\n if (parentExpansions.size > 0) {\n parentExpansions.forEach(({ expandedRect, parent }, parentId) => {\n // determine the position & dimensions of the parent\n const positionAbsolute = parent.internals.positionAbsolute;\n const dimensions = getNodeDimensions(parent);\n const origin = parent.origin ?? nodeOrigin;\n // determine how much the parent expands in width and position\n const xChange = expandedRect.x < positionAbsolute.x ? Math.round(Math.abs(positionAbsolute.x - expandedRect.x)) : 0;\n const yChange = expandedRect.y < positionAbsolute.y ? Math.round(Math.abs(positionAbsolute.y - expandedRect.y)) : 0;\n const newWidth = Math.max(dimensions.width, Math.round(expandedRect.width));\n const newHeight = Math.max(dimensions.height, Math.round(expandedRect.height));\n const widthChange = (newWidth - dimensions.width) * origin[0];\n const heightChange = (newHeight - dimensions.height) * origin[1];\n // We need to correct the position of the parent node if the origin is not [0,0]\n if (xChange > 0 || yChange > 0 || widthChange || heightChange) {\n changes.push({\n id: parentId,\n type: 'position',\n position: {\n x: parent.position.x - xChange + widthChange,\n y: parent.position.y - yChange + heightChange,\n },\n });\n /*\n * We move all child nodes in the oppsite direction\n * so the x,y changes of the parent do not move the children\n */\n parentLookup.get(parentId)?.forEach((childNode) => {\n if (!children.some((child) => child.id === childNode.id)) {\n changes.push({\n id: childNode.id,\n type: 'position',\n position: {\n x: childNode.position.x + xChange,\n y: childNode.position.y + yChange,\n },\n });\n }\n });\n }\n // We need to correct the dimensions of the parent node if the origin is not [0,0]\n if (dimensions.width < expandedRect.width || dimensions.height < expandedRect.height || xChange || yChange) {\n changes.push({\n id: parentId,\n type: 'dimensions',\n setAttributes: true,\n dimensions: {\n width: newWidth + (xChange ? origin[0] * xChange - widthChange : 0),\n height: newHeight + (yChange ? origin[1] * yChange - heightChange : 0),\n },\n });\n }\n });\n }\n return changes;\n}\nfunction updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOrigin, nodeExtent, zIndexMode) {\n const viewportNode = domNode?.querySelector('.xyflow__viewport');\n let updatedInternals = false;\n if (!viewportNode) {\n return { changes: [], updatedInternals };\n }\n const changes = [];\n const style = window.getComputedStyle(viewportNode);\n const { m22: zoom } = new window.DOMMatrixReadOnly(style.transform);\n // in this array we collect nodes, that might trigger changes (like expanding parent)\n const parentExpandChildren = [];\n for (const update of updates.values()) {\n const node = nodeLookup.get(update.id);\n if (!node) {\n continue;\n }\n if (node.hidden) {\n nodeLookup.set(node.id, {\n ...node,\n internals: {\n ...node.internals,\n handleBounds: undefined,\n },\n });\n updatedInternals = true;\n continue;\n }\n const dimensions = getDimensions(update.nodeElement);\n const dimensionChanged = node.measured.width !== dimensions.width || node.measured.height !== dimensions.height;\n const doUpdate = !!(dimensions.width &&\n dimensions.height &&\n (dimensionChanged || !node.internals.handleBounds || update.force));\n if (doUpdate) {\n const nodeBounds = update.nodeElement.getBoundingClientRect();\n const extent = isCoordinateExtent(node.extent) ? node.extent : nodeExtent;\n let { positionAbsolute } = node.internals;\n if (node.parentId && node.extent === 'parent') {\n const parentNode = nodeLookup.get(node.parentId);\n if (parentNode) {\n positionAbsolute = clampPositionToParent(positionAbsolute, dimensions, parentNode);\n }\n }\n else if (extent) {\n positionAbsolute = clampPosition(positionAbsolute, extent, dimensions);\n }\n const newNode = {\n ...node,\n measured: dimensions,\n internals: {\n ...node.internals,\n positionAbsolute,\n handleBounds: {\n source: getHandleBounds('source', update.nodeElement, nodeBounds, zoom, node.id),\n target: getHandleBounds('target', update.nodeElement, nodeBounds, zoom, node.id),\n },\n },\n };\n nodeLookup.set(node.id, newNode);\n if (node.parentId) {\n updateChildNode(newNode, nodeLookup, parentLookup, { nodeOrigin, zIndexMode });\n }\n updatedInternals = true;\n if (dimensionChanged) {\n changes.push({\n id: node.id,\n type: 'dimensions',\n dimensions,\n });\n if (node.expandParent && node.parentId) {\n parentExpandChildren.push({\n id: node.id,\n parentId: node.parentId,\n rect: nodeToRect(newNode, nodeOrigin),\n });\n }\n }\n }\n }\n if (parentExpandChildren.length > 0) {\n const parentExpandChanges = handleExpandParent(parentExpandChildren, nodeLookup, parentLookup, nodeOrigin);\n changes.push(...parentExpandChanges);\n }\n return { changes, updatedInternals };\n}\nasync function panBy({ delta, panZoom, transform, translateExtent, width, height, }) {\n if (!panZoom || (!delta.x && !delta.y)) {\n return false;\n }\n const nextViewport = await panZoom.setViewportConstrained({\n x: transform[0] + delta.x,\n y: transform[1] + delta.y,\n zoom: transform[2],\n }, [\n [0, 0],\n [width, height],\n ], translateExtent);\n const transformChanged = !!nextViewport &&\n (nextViewport.x !== transform[0] || nextViewport.y !== transform[1] || nextViewport.k !== transform[2]);\n return transformChanged;\n}\n/**\n * this function adds the connection to the connectionLookup\n * at the following keys: nodeId-type-handleId, nodeId-type and nodeId\n * @param type type of the connection\n * @param connection connection that should be added to the lookup\n * @param connectionKey at which key the connection should be added\n * @param connectionLookup reference to the connection lookup\n * @param nodeId nodeId of the connection\n * @param handleId handleId of the connection\n */\nfunction addConnectionToLookup(type, connection, connectionKey, connectionLookup, nodeId, handleId) {\n /*\n * We add the connection to the connectionLookup at the following keys\n * 1. nodeId, 2. nodeId-type, 3. nodeId-type-handleId\n * If the key already exists, we add the connection to the existing map\n */\n let key = nodeId;\n const nodeMap = connectionLookup.get(key) || new Map();\n connectionLookup.set(key, nodeMap.set(connectionKey, connection));\n key = `${nodeId}-${type}`;\n const typeMap = connectionLookup.get(key) || new Map();\n connectionLookup.set(key, typeMap.set(connectionKey, connection));\n if (handleId) {\n key = `${nodeId}-${type}-${handleId}`;\n const handleMap = connectionLookup.get(key) || new Map();\n connectionLookup.set(key, handleMap.set(connectionKey, connection));\n }\n}\nfunction updateConnectionLookup(connectionLookup, edgeLookup, edges) {\n connectionLookup.clear();\n edgeLookup.clear();\n for (const edge of edges) {\n const { source: sourceNode, target: targetNode, sourceHandle = null, targetHandle = null } = edge;\n const connection = { edgeId: edge.id, source: sourceNode, target: targetNode, sourceHandle, targetHandle };\n const sourceKey = `${sourceNode}-${sourceHandle}--${targetNode}-${targetHandle}`;\n const targetKey = `${targetNode}-${targetHandle}--${sourceNode}-${sourceHandle}`;\n addConnectionToLookup('source', connection, targetKey, connectionLookup, sourceNode, sourceHandle);\n addConnectionToLookup('target', connection, sourceKey, connectionLookup, targetNode, targetHandle);\n edgeLookup.set(edge.id, edge);\n }\n}\n\nfunction shallowNodeData(a, b) {\n if (a === null || b === null) {\n return false;\n }\n const _a = Array.isArray(a) ? a : [a];\n const _b = Array.isArray(b) ? b : [b];\n if (_a.length !== _b.length) {\n return false;\n }\n for (let i = 0; i < _a.length; i++) {\n if (_a[i].id !== _b[i].id || _a[i].type !== _b[i].type || !Object.is(_a[i].data, _b[i].data)) {\n return false;\n }\n }\n return true;\n}\n\nfunction isParentSelected(node, nodeLookup) {\n if (!node.parentId) {\n return false;\n }\n const parentNode = nodeLookup.get(node.parentId);\n if (!parentNode) {\n return false;\n }\n if (parentNode.selected) {\n return true;\n }\n return isParentSelected(parentNode, nodeLookup);\n}\nfunction hasSelector(target, selector, domNode) {\n let current = target;\n do {\n if (current?.matches?.(selector))\n return true;\n if (current === domNode)\n return false;\n current = current?.parentElement;\n } while (current);\n return false;\n}\n// looks for all selected nodes and created a NodeDragItem for each of them\nfunction getDragItems(nodeLookup, nodesDraggable, mousePos, nodeId) {\n const dragItems = new Map();\n for (const [id, node] of nodeLookup) {\n if ((node.selected || node.id === nodeId) &&\n (!node.parentId || !isParentSelected(node, nodeLookup)) &&\n (node.draggable || (nodesDraggable && typeof node.draggable === 'undefined'))) {\n const internalNode = nodeLookup.get(id);\n if (internalNode) {\n dragItems.set(id, {\n id,\n position: internalNode.position || { x: 0, y: 0 },\n distance: {\n x: mousePos.x - internalNode.internals.positionAbsolute.x,\n y: mousePos.y - internalNode.internals.positionAbsolute.y,\n },\n extent: internalNode.extent,\n parentId: internalNode.parentId,\n origin: internalNode.origin,\n expandParent: internalNode.expandParent,\n internals: {\n positionAbsolute: internalNode.internals.positionAbsolute || { x: 0, y: 0 },\n },\n measured: {\n width: internalNode.measured.width ?? 0,\n height: internalNode.measured.height ?? 0,\n },\n });\n }\n }\n }\n return dragItems;\n}\n/*\n * returns two params:\n * 1. the dragged node (or the first of the list, if we are dragging a node selection)\n * 2. array of selected nodes (for multi selections)\n */\nfunction getEventHandlerParams({ nodeId, dragItems, nodeLookup, dragging = true, }) {\n const nodesFromDragItems = [];\n for (const [id, dragItem] of dragItems) {\n const node = nodeLookup.get(id)?.internals.userNode;\n if (node) {\n nodesFromDragItems.push({\n ...node,\n position: dragItem.position,\n dragging,\n });\n }\n }\n if (!nodeId) {\n return [nodesFromDragItems[0], nodesFromDragItems];\n }\n const node = nodeLookup.get(nodeId)?.internals.userNode;\n return [\n !node\n ? nodesFromDragItems[0]\n : {\n ...node,\n position: dragItems.get(nodeId)?.position || node.position,\n dragging,\n },\n nodesFromDragItems,\n ];\n}\n/**\n * If a selection is being dragged we want to apply the same snap offset to all nodes in the selection.\n * This function calculates the snap offset based on the first node in the selection.\n */\nfunction calculateSnapOffset({ dragItems, snapGrid, x, y, }) {\n const refDragItem = dragItems.values().next().value;\n if (!refDragItem) {\n return null;\n }\n const refPos = {\n x: x - refDragItem.distance.x,\n y: y - refDragItem.distance.y,\n };\n const refPosSnapped = snapPosition(refPos, snapGrid);\n return {\n x: refPosSnapped.x - refPos.x,\n y: refPosSnapped.y - refPos.y,\n };\n}\n\nfunction XYDrag({ onNodeMouseDown, getStoreItems, onDragStart, onDrag, onDragStop, }) {\n let lastPos = { x: null, y: null };\n let autoPanId = 0;\n let dragItems = new Map();\n let autoPanStarted = false;\n let mousePosition = { x: 0, y: 0 };\n let containerBounds = null;\n let dragStarted = false;\n let d3Selection = null;\n let abortDrag = false; // prevents unintentional dragging on multitouch\n let nodePositionsChanged = false;\n // we store the last drag event to be able to use it in the update function\n let dragEvent = null;\n // public functions\n function update({ noDragClassName, handleSelector, domNode, isSelectable, nodeId, nodeClickDistance = 0, }) {\n d3Selection = select(domNode);\n function updateNodes({ x, y }) {\n const { nodeLookup, nodeExtent, snapGrid, snapToGrid, nodeOrigin, onNodeDrag, onSelectionDrag, onError, updateNodePositions, } = getStoreItems();\n lastPos = { x, y };\n let hasChange = false;\n const isMultiDrag = dragItems.size > 1;\n const nodesBox = isMultiDrag && nodeExtent ? rectToBox(getInternalNodesBounds(dragItems)) : null;\n const multiDragSnapOffset = isMultiDrag && snapToGrid\n ? calculateSnapOffset({\n dragItems,\n snapGrid,\n x,\n y,\n })\n : null;\n for (const [id, dragItem] of dragItems) {\n /*\n * if the node is not in the nodeLookup anymore, it was probably deleted while dragging\n */\n if (!nodeLookup.has(id)) {\n continue;\n }\n let nextPosition = { x: x - dragItem.distance.x, y: y - dragItem.distance.y };\n if (snapToGrid) {\n nextPosition = multiDragSnapOffset\n ? {\n x: Math.round(nextPosition.x + multiDragSnapOffset.x),\n y: Math.round(nextPosition.y + multiDragSnapOffset.y),\n }\n : snapPosition(nextPosition, snapGrid);\n }\n let adjustedNodeExtent = null;\n if (isMultiDrag && nodeExtent && !dragItem.extent && nodesBox) {\n const { positionAbsolute } = dragItem.internals;\n const x1 = positionAbsolute.x - nodesBox.x + nodeExtent[0][0];\n const x2 = positionAbsolute.x + dragItem.measured.width - nodesBox.x2 + nodeExtent[1][0];\n const y1 = positionAbsolute.y - nodesBox.y + nodeExtent[0][1];\n const y2 = positionAbsolute.y + dragItem.measured.height - nodesBox.y2 + nodeExtent[1][1];\n adjustedNodeExtent = [\n [x1, y1],\n [x2, y2],\n ];\n }\n const { position, positionAbsolute } = calculateNodePosition({\n nodeId: id,\n nextPosition,\n nodeLookup,\n nodeExtent: adjustedNodeExtent ? adjustedNodeExtent : nodeExtent,\n nodeOrigin,\n onError,\n });\n // we want to make sure that we only fire a change event when there is a change\n hasChange = hasChange || dragItem.position.x !== position.x || dragItem.position.y !== position.y;\n dragItem.position = position;\n dragItem.internals.positionAbsolute = positionAbsolute;\n }\n nodePositionsChanged = nodePositionsChanged || hasChange;\n if (!hasChange) {\n return;\n }\n updateNodePositions(dragItems, true);\n if (dragEvent && (onDrag || onNodeDrag || (!nodeId && onSelectionDrag))) {\n const [currentNode, currentNodes] = getEventHandlerParams({\n nodeId,\n dragItems,\n nodeLookup,\n });\n onDrag?.(dragEvent, dragItems, currentNode, currentNodes);\n onNodeDrag?.(dragEvent, currentNode, currentNodes);\n if (!nodeId) {\n onSelectionDrag?.(dragEvent, currentNodes);\n }\n }\n }\n async function autoPan() {\n if (!containerBounds) {\n return;\n }\n const { transform, panBy, autoPanSpeed, autoPanOnNodeDrag } = getStoreItems();\n if (!autoPanOnNodeDrag) {\n autoPanStarted = false;\n cancelAnimationFrame(autoPanId);\n return;\n }\n const [xMovement, yMovement] = calcAutoPan(mousePosition, containerBounds, autoPanSpeed);\n if (xMovement !== 0 || yMovement !== 0) {\n lastPos.x = (lastPos.x ?? 0) - xMovement / transform[2];\n lastPos.y = (lastPos.y ?? 0) - yMovement / transform[2];\n if (await panBy({ x: xMovement, y: yMovement })) {\n updateNodes(lastPos);\n }\n }\n autoPanId = requestAnimationFrame(autoPan);\n }\n function startDrag(event) {\n const { nodeLookup, multiSelectionActive, nodesDraggable, transform, snapGrid, snapToGrid, selectNodesOnDrag, onNodeDragStart, onSelectionDragStart, unselectNodesAndEdges, } = getStoreItems();\n dragStarted = true;\n if ((!selectNodesOnDrag || !isSelectable) && !multiSelectionActive && nodeId) {\n if (!nodeLookup.get(nodeId)?.selected) {\n // we need to reset selected nodes when selectNodesOnDrag=false\n unselectNodesAndEdges();\n }\n }\n if (isSelectable && selectNodesOnDrag && nodeId) {\n onNodeMouseDown?.(nodeId);\n }\n const pointerPos = getPointerPosition(event.sourceEvent, { transform, snapGrid, snapToGrid, containerBounds });\n lastPos = pointerPos;\n dragItems = getDragItems(nodeLookup, nodesDraggable, pointerPos, nodeId);\n if (dragItems.size > 0 && (onDragStart || onNodeDragStart || (!nodeId && onSelectionDragStart))) {\n const [currentNode, currentNodes] = getEventHandlerParams({\n nodeId,\n dragItems,\n nodeLookup,\n });\n onDragStart?.(event.sourceEvent, dragItems, currentNode, currentNodes);\n onNodeDragStart?.(event.sourceEvent, currentNode, currentNodes);\n if (!nodeId) {\n onSelectionDragStart?.(event.sourceEvent, currentNodes);\n }\n }\n }\n const d3DragInstance = drag()\n .clickDistance(nodeClickDistance)\n .on('start', (event) => {\n const { domNode, nodeDragThreshold, transform, snapGrid, snapToGrid } = getStoreItems();\n containerBounds = domNode?.getBoundingClientRect() || null;\n abortDrag = false;\n nodePositionsChanged = false;\n dragEvent = event.sourceEvent;\n if (nodeDragThreshold === 0) {\n startDrag(event);\n }\n const pointerPos = getPointerPosition(event.sourceEvent, { transform, snapGrid, snapToGrid, containerBounds });\n lastPos = pointerPos;\n mousePosition = getEventPosition(event.sourceEvent, containerBounds);\n })\n .on('drag', (event) => {\n const { autoPanOnNodeDrag, transform, snapGrid, snapToGrid, nodeDragThreshold, nodeLookup } = getStoreItems();\n const pointerPos = getPointerPosition(event.sourceEvent, { transform, snapGrid, snapToGrid, containerBounds });\n dragEvent = event.sourceEvent;\n if ((event.sourceEvent.type === 'touchmove' && event.sourceEvent.touches.length > 1) ||\n // if user deletes a node while dragging, we need to abort the drag to prevent errors\n (nodeId && !nodeLookup.has(nodeId))) {\n abortDrag = true;\n }\n if (abortDrag) {\n return;\n }\n if (!autoPanStarted && autoPanOnNodeDrag && dragStarted) {\n autoPanStarted = true;\n autoPan();\n }\n if (!dragStarted) {\n // Calculate distance in client coordinates for consistent drag threshold behavior across zoom levels\n const currentMousePosition = getEventPosition(event.sourceEvent, containerBounds);\n const x = currentMousePosition.x - mousePosition.x;\n const y = currentMousePosition.y - mousePosition.y;\n const distance = Math.sqrt(x * x + y * y);\n if (distance > nodeDragThreshold) {\n startDrag(event);\n }\n }\n // skip events without movement\n if ((lastPos.x !== pointerPos.xSnapped || lastPos.y !== pointerPos.ySnapped) && dragItems && dragStarted) {\n mousePosition = getEventPosition(event.sourceEvent, containerBounds);\n updateNodes(pointerPos);\n }\n })\n .on('end', (event) => {\n if (!dragStarted || abortDrag) {\n if (abortDrag && dragItems.size > 0) {\n getStoreItems().updateNodePositions(dragItems, false);\n }\n return;\n }\n autoPanStarted = false;\n dragStarted = false;\n cancelAnimationFrame(autoPanId);\n if (dragItems.size > 0) {\n const { nodeLookup, updateNodePositions, onNodeDragStop, onSelectionDragStop } = getStoreItems();\n if (nodePositionsChanged) {\n updateNodePositions(dragItems, false);\n nodePositionsChanged = false;\n }\n if (onDragStop || onNodeDragStop || (!nodeId && onSelectionDragStop)) {\n const [currentNode, currentNodes] = getEventHandlerParams({\n nodeId,\n dragItems,\n nodeLookup,\n dragging: false,\n });\n onDragStop?.(event.sourceEvent, dragItems, currentNode, currentNodes);\n onNodeDragStop?.(event.sourceEvent, currentNode, currentNodes);\n if (!nodeId) {\n onSelectionDragStop?.(event.sourceEvent, currentNodes);\n }\n }\n }\n })\n .filter((event) => {\n const target = event.target;\n const isDraggable = !event.button &&\n (!noDragClassName || !hasSelector(target, `.${noDragClassName}`, domNode)) &&\n (!handleSelector || hasSelector(target, handleSelector, domNode));\n return isDraggable;\n });\n d3Selection.call(d3DragInstance);\n }\n function destroy() {\n d3Selection?.on('.drag', null);\n }\n return {\n update,\n destroy,\n };\n}\n\nfunction getNodesWithinDistance(position, nodeLookup, distance) {\n const nodes = [];\n const rect = {\n x: position.x - distance,\n y: position.y - distance,\n width: distance * 2,\n height: distance * 2,\n };\n for (const node of nodeLookup.values()) {\n if (getOverlappingArea(rect, nodeToRect(node)) > 0) {\n nodes.push(node);\n }\n }\n return nodes;\n}\n/*\n * this distance is used for the area around the user pointer\n * while doing a connection for finding the closest nodes\n */\nconst ADDITIONAL_DISTANCE = 250;\nfunction getClosestHandle(position, connectionRadius, nodeLookup, fromHandle) {\n let closestHandles = [];\n let minDistance = Infinity;\n const closeNodes = getNodesWithinDistance(position, nodeLookup, connectionRadius + ADDITIONAL_DISTANCE);\n for (const node of closeNodes) {\n const allHandles = [...(node.internals.handleBounds?.source ?? []), ...(node.internals.handleBounds?.target ?? [])];\n for (const handle of allHandles) {\n // if the handle is the same as the fromHandle we skip it\n if (fromHandle.nodeId === handle.nodeId && fromHandle.type === handle.type && fromHandle.id === handle.id) {\n continue;\n }\n // determine absolute position of the handle\n const { x, y } = getHandlePosition(node, handle, handle.position, true);\n const distance = Math.sqrt(Math.pow(x - position.x, 2) + Math.pow(y - position.y, 2));\n if (distance > connectionRadius) {\n continue;\n }\n if (distance < minDistance) {\n closestHandles = [{ ...handle, x, y }];\n minDistance = distance;\n }\n else if (distance === minDistance) {\n // when multiple handles are on the same distance we collect all of them\n closestHandles.push({ ...handle, x, y });\n }\n }\n }\n if (!closestHandles.length) {\n return null;\n }\n // when multiple handles overlay each other we prefer the opposite handle\n if (closestHandles.length > 1) {\n const oppositeHandleType = fromHandle.type === 'source' ? 'target' : 'source';\n return closestHandles.find((handle) => handle.type === oppositeHandleType) ?? closestHandles[0];\n }\n return closestHandles[0];\n}\nfunction getHandle(nodeId, handleType, handleId, nodeLookup, connectionMode, withAbsolutePosition = false) {\n const node = nodeLookup.get(nodeId);\n if (!node) {\n return null;\n }\n const handles = connectionMode === 'strict'\n ? node.internals.handleBounds?.[handleType]\n : [...(node.internals.handleBounds?.source ?? []), ...(node.internals.handleBounds?.target ?? [])];\n const handle = (handleId ? handles?.find((h) => h.id === handleId) : handles?.[0]) ?? null;\n return handle && withAbsolutePosition\n ? { ...handle, ...getHandlePosition(node, handle, handle.position, true) }\n : handle;\n}\nfunction getHandleType(edgeUpdaterType, handleDomNode) {\n if (edgeUpdaterType) {\n return edgeUpdaterType;\n }\n else if (handleDomNode?.classList.contains('target')) {\n return 'target';\n }\n else if (handleDomNode?.classList.contains('source')) {\n return 'source';\n }\n return null;\n}\nfunction isConnectionValid(isInsideConnectionRadius, isHandleValid) {\n let isValid = null;\n if (isHandleValid) {\n isValid = true;\n }\n else if (isInsideConnectionRadius && !isHandleValid) {\n isValid = false;\n }\n return isValid;\n}\n\nconst alwaysValid = () => true;\nfunction onPointerDown(event, { connectionMode, connectionRadius, handleId, nodeId, edgeUpdaterType, isTarget, domNode, nodeLookup, lib, autoPanOnConnect, flowId, panBy, cancelConnection, onConnectStart, onConnect, onConnectEnd, isValidConnection = alwaysValid, onReconnectEnd, updateConnection, getTransform, getFromHandle, autoPanSpeed, dragThreshold = 1, handleDomNode, }) {\n // when xyflow is used inside a shadow root we can't use document\n const doc = getHostForElement(event.target);\n let autoPanId = 0;\n let closestHandle;\n const { x, y } = getEventPosition(event);\n const handleType = getHandleType(edgeUpdaterType, handleDomNode);\n const containerBounds = domNode?.getBoundingClientRect();\n let connectionStarted = false;\n if (!containerBounds || !handleType) {\n return;\n }\n const fromHandleInternal = getHandle(nodeId, handleType, handleId, nodeLookup, connectionMode);\n if (!fromHandleInternal) {\n return;\n }\n let position = getEventPosition(event, containerBounds);\n let autoPanStarted = false;\n let connection = null;\n let isValid = false;\n let resultHandleDomNode = null;\n // when the user is moving the mouse close to the edge of the canvas while connecting we move the canvas\n function autoPan() {\n if (!autoPanOnConnect || !containerBounds) {\n return;\n }\n const [x, y] = calcAutoPan(position, containerBounds, autoPanSpeed);\n panBy({ x, y });\n autoPanId = requestAnimationFrame(autoPan);\n }\n // Stays the same for all consecutive pointermove events\n const fromHandle = {\n ...fromHandleInternal,\n nodeId,\n type: handleType,\n position: fromHandleInternal.position,\n };\n const fromInternalNode = nodeLookup.get(nodeId);\n const from = getHandlePosition(fromInternalNode, fromHandle, Position.Left, true);\n let previousConnection = {\n inProgress: true,\n isValid: null,\n from,\n fromHandle,\n fromPosition: fromHandle.position,\n fromNode: fromInternalNode,\n to: position,\n toHandle: null,\n toPosition: oppositePosition[fromHandle.position],\n toNode: null,\n pointer: position,\n };\n function startConnection() {\n connectionStarted = true;\n updateConnection(previousConnection);\n onConnectStart?.(event, { nodeId, handleId, handleType });\n }\n if (dragThreshold === 0) {\n startConnection();\n }\n function onPointerMove(event) {\n if (!connectionStarted) {\n const { x: evtX, y: evtY } = getEventPosition(event);\n const dx = evtX - x;\n const dy = evtY - y;\n const nextConnectionStarted = dx * dx + dy * dy > dragThreshold * dragThreshold;\n if (!nextConnectionStarted) {\n return;\n }\n startConnection();\n }\n if (!getFromHandle() || !fromHandle) {\n onPointerUp(event);\n return;\n }\n const transform = getTransform();\n position = getEventPosition(event, containerBounds);\n closestHandle = getClosestHandle(pointToRendererPoint(position, transform, false, [1, 1]), connectionRadius, nodeLookup, fromHandle);\n if (!autoPanStarted) {\n autoPan();\n autoPanStarted = true;\n }\n const result = isValidHandle(event, {\n handle: closestHandle,\n connectionMode,\n fromNodeId: nodeId,\n fromHandleId: handleId,\n fromType: isTarget ? 'target' : 'source',\n isValidConnection,\n doc,\n lib,\n flowId,\n nodeLookup,\n });\n resultHandleDomNode = result.handleDomNode;\n connection = result.connection;\n isValid = isConnectionValid(!!closestHandle, result.isValid);\n const fromInternalNode = nodeLookup.get(nodeId);\n const from = fromInternalNode\n ? getHandlePosition(fromInternalNode, fromHandle, Position.Left, true)\n : previousConnection.from;\n const newConnection = {\n ...previousConnection,\n from,\n isValid,\n to: result.toHandle && isValid\n ? rendererPointToPoint({ x: result.toHandle.x, y: result.toHandle.y }, transform)\n : position,\n toHandle: result.toHandle,\n toPosition: isValid && result.toHandle ? result.toHandle.position : oppositePosition[fromHandle.position],\n toNode: result.toHandle ? nodeLookup.get(result.toHandle.nodeId) : null,\n pointer: position,\n };\n updateConnection(newConnection);\n previousConnection = newConnection;\n }\n function onPointerUp(event) {\n // Prevent multi-touch aborting connection\n if ('touches' in event && event.touches.length > 0) {\n return;\n }\n if (connectionStarted) {\n if ((closestHandle || resultHandleDomNode) && connection && isValid) {\n onConnect?.(connection);\n }\n /*\n * it's important to get a fresh reference from the store here\n * in order to get the latest state of onConnectEnd\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { inProgress, ...connectionState } = previousConnection;\n const finalConnectionState = {\n ...connectionState,\n toPosition: previousConnection.toHandle ? previousConnection.toPosition : null,\n };\n onConnectEnd?.(event, finalConnectionState);\n if (edgeUpdaterType) {\n onReconnectEnd?.(event, finalConnectionState);\n }\n }\n cancelConnection();\n cancelAnimationFrame(autoPanId);\n autoPanStarted = false;\n isValid = false;\n connection = null;\n resultHandleDomNode = null;\n doc.removeEventListener('mousemove', onPointerMove);\n doc.removeEventListener('mouseup', onPointerUp);\n doc.removeEventListener('touchmove', onPointerMove);\n doc.removeEventListener('touchend', onPointerUp);\n }\n doc.addEventListener('mousemove', onPointerMove);\n doc.addEventListener('mouseup', onPointerUp);\n doc.addEventListener('touchmove', onPointerMove);\n doc.addEventListener('touchend', onPointerUp);\n}\n// checks if and returns connection in form of an object { source: 123, target: 312 }\nfunction isValidHandle(event, { handle, connectionMode, fromNodeId, fromHandleId, fromType, doc, lib, flowId, isValidConnection = alwaysValid, nodeLookup, }) {\n const isTarget = fromType === 'target';\n const handleDomNode = handle\n ? doc.querySelector(`.${lib}-flow__handle[data-id=\"${flowId}-${handle?.nodeId}-${handle?.id}-${handle?.type}\"]`)\n : null;\n const { x, y } = getEventPosition(event);\n const handleBelow = doc.elementFromPoint(x, y);\n /*\n * we always want to prioritize the handle below the mouse cursor over the closest distance handle,\n * because it could be that the center of another handle is closer to the mouse pointer than the handle below the cursor\n */\n const handleToCheck = handleBelow?.classList.contains(`${lib}-flow__handle`) ? handleBelow : handleDomNode;\n const result = {\n handleDomNode: handleToCheck,\n isValid: false,\n connection: null,\n toHandle: null,\n };\n if (handleToCheck) {\n const handleType = getHandleType(undefined, handleToCheck);\n const handleNodeId = handleToCheck.getAttribute('data-nodeid');\n const handleId = handleToCheck.getAttribute('data-handleid');\n const connectable = handleToCheck.classList.contains('connectable');\n const connectableEnd = handleToCheck.classList.contains('connectableend');\n if (!handleNodeId || !handleType) {\n return result;\n }\n const connection = {\n source: isTarget ? handleNodeId : fromNodeId,\n sourceHandle: isTarget ? handleId : fromHandleId,\n target: isTarget ? fromNodeId : handleNodeId,\n targetHandle: isTarget ? fromHandleId : handleId,\n };\n result.connection = connection;\n const isConnectable = connectable && connectableEnd;\n // in strict mode we don't allow target to target or source to source connections\n const isValid = isConnectable &&\n (connectionMode === ConnectionMode.Strict\n ? (isTarget && handleType === 'source') || (!isTarget && handleType === 'target')\n : handleNodeId !== fromNodeId || handleId !== fromHandleId);\n result.isValid = isValid && isValidConnection(connection);\n result.toHandle = getHandle(handleNodeId, handleType, handleId, nodeLookup, connectionMode, true);\n }\n return result;\n}\nconst XYHandle = {\n onPointerDown,\n isValid: isValidHandle,\n};\n\nfunction XYMinimap({ domNode, panZoom, getTransform, getViewScale }) {\n const selection = select(domNode);\n function update({ translateExtent, width, height, zoomStep = 1, pannable = true, zoomable = true, inversePan = false, }) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const zoomHandler = (event) => {\n if (event.sourceEvent.type !== 'wheel' || !panZoom) {\n return;\n }\n const transform = getTransform();\n const factor = event.sourceEvent.ctrlKey && isMacOs() ? 10 : 1;\n const pinchDelta = -event.sourceEvent.deltaY *\n (event.sourceEvent.deltaMode === 1 ? 0.05 : event.sourceEvent.deltaMode ? 1 : 0.002) *\n zoomStep;\n const nextZoom = transform[2] * Math.pow(2, pinchDelta * factor);\n panZoom.scaleTo(nextZoom);\n };\n let panStart = [0, 0];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const panStartHandler = (event) => {\n if (event.sourceEvent.type === 'mousedown' || event.sourceEvent.type === 'touchstart') {\n panStart = [\n event.sourceEvent.clientX ?? event.sourceEvent.touches[0].clientX,\n event.sourceEvent.clientY ?? event.sourceEvent.touches[0].clientY,\n ];\n }\n };\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const panHandler = (event) => {\n const transform = getTransform();\n if ((event.sourceEvent.type !== 'mousemove' && event.sourceEvent.type !== 'touchmove') || !panZoom) {\n return;\n }\n const panCurrent = [\n event.sourceEvent.clientX ?? event.sourceEvent.touches[0].clientX,\n event.sourceEvent.clientY ?? event.sourceEvent.touches[0].clientY,\n ];\n const panDelta = [panCurrent[0] - panStart[0], panCurrent[1] - panStart[1]];\n panStart = panCurrent;\n const moveScale = getViewScale() * Math.max(transform[2], Math.log(transform[2])) * (inversePan ? -1 : 1);\n const position = {\n x: transform[0] - panDelta[0] * moveScale,\n y: transform[1] - panDelta[1] * moveScale,\n };\n const extent = [\n [0, 0],\n [width, height],\n ];\n panZoom.setViewportConstrained({\n x: position.x,\n y: position.y,\n zoom: transform[2],\n }, extent, translateExtent);\n };\n const zoomAndPanHandler = zoom()\n .on('start', panStartHandler)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('zoom', pannable ? panHandler : null)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n .on('zoom.wheel', zoomable ? zoomHandler : null);\n selection.call(zoomAndPanHandler, {});\n }\n function destroy() {\n selection.on('zoom', null);\n }\n return {\n update,\n destroy,\n pointer,\n };\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst transformToViewport = (transform) => ({\n x: transform.x,\n y: transform.y,\n zoom: transform.k,\n});\nconst viewportToTransform = ({ x, y, zoom }) => zoomIdentity.translate(x, y).scale(zoom);\nconst isWrappedWithClass = (event, className) => event.target.closest(`.${className}`);\nconst isRightClickPan = (panOnDrag, usedButton) => usedButton === 2 && Array.isArray(panOnDrag) && panOnDrag.includes(2);\n// taken from d3-ease: https://github.com/d3/d3-ease/blob/main/src/cubic.js\nconst defaultEase = (t) => ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;\nconst getD3Transition = (selection, duration = 0, ease = defaultEase, onEnd = () => { }) => {\n const hasDuration = typeof duration === 'number' && duration > 0;\n if (!hasDuration) {\n onEnd();\n }\n return hasDuration ? selection.transition().duration(duration).ease(ease).on('end', onEnd) : selection;\n};\nconst wheelDelta = (event) => {\n const factor = event.ctrlKey && isMacOs() ? 10 : 1;\n return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * factor;\n};\n\nfunction createPanOnScrollHandler({ zoomPanValues, noWheelClassName, d3Selection, d3Zoom, panOnScrollMode, panOnScrollSpeed, zoomOnPinch, onPanZoomStart, onPanZoom, onPanZoomEnd, }) {\n return (event) => {\n if (isWrappedWithClass(event, noWheelClassName)) {\n if (event.ctrlKey) {\n event.preventDefault(); // stop native page zoom for pinch zooming\n }\n return false;\n }\n event.preventDefault();\n event.stopImmediatePropagation();\n const currentZoom = d3Selection.property('__zoom').k || 1;\n // macos sets ctrlKey=true for pinch gesture on a trackpad\n if (event.ctrlKey && zoomOnPinch) {\n const point = pointer(event);\n const pinchDelta = wheelDelta(event);\n const zoom = currentZoom * Math.pow(2, pinchDelta);\n // @ts-ignore\n d3Zoom.scaleTo(d3Selection, zoom, point, event);\n return;\n }\n /*\n * increase scroll speed in firefox\n * firefox: deltaMode === 1; chrome: deltaMode === 0\n */\n const deltaNormalize = event.deltaMode === 1 ? 20 : 1;\n let deltaX = panOnScrollMode === PanOnScrollMode.Vertical ? 0 : event.deltaX * deltaNormalize;\n let deltaY = panOnScrollMode === PanOnScrollMode.Horizontal ? 0 : event.deltaY * deltaNormalize;\n // this enables vertical scrolling with shift + scroll on windows\n if (!isMacOs() && event.shiftKey && panOnScrollMode !== PanOnScrollMode.Vertical) {\n deltaX = event.deltaY * deltaNormalize;\n deltaY = 0;\n }\n d3Zoom.translateBy(d3Selection, -(deltaX / currentZoom) * panOnScrollSpeed, -(deltaY / currentZoom) * panOnScrollSpeed, \n // @ts-ignore\n { internal: true });\n const nextViewport = transformToViewport(d3Selection.property('__zoom'));\n clearTimeout(zoomPanValues.panScrollTimeout);\n /*\n * for pan on scroll we need to handle the event calls on our own\n * we can't use the start, zoom and end events from d3-zoom\n * because start and move gets called on every scroll event and not once at the beginning\n */\n if (!zoomPanValues.isPanScrolling) {\n zoomPanValues.isPanScrolling = true;\n onPanZoomStart?.(event, nextViewport);\n }\n else {\n onPanZoom?.(event, nextViewport);\n }\n zoomPanValues.panScrollTimeout = setTimeout(() => {\n onPanZoomEnd?.(event, nextViewport);\n zoomPanValues.isPanScrolling = false;\n }, 150);\n };\n}\nfunction createZoomOnScrollHandler({ noWheelClassName, preventScrolling, d3ZoomHandler }) {\n return function (event, d) {\n const isWheel = event.type === 'wheel';\n // we still want to enable pinch zooming even if preventScrolling is set to false\n const preventZoom = !preventScrolling && isWheel && !event.ctrlKey;\n const hasNoWheelClass = isWrappedWithClass(event, noWheelClassName);\n // if user is pinch zooming above a nowheel element, we don't want the browser to zoom\n if (event.ctrlKey && isWheel && hasNoWheelClass) {\n event.preventDefault();\n }\n if (preventZoom || hasNoWheelClass) {\n return null;\n }\n event.preventDefault();\n d3ZoomHandler.call(this, event, d);\n };\n}\nfunction createPanZoomStartHandler({ zoomPanValues, onDraggingChange, onPanZoomStart }) {\n return (event) => {\n if (event.sourceEvent?.internal) {\n return;\n }\n const viewport = transformToViewport(event.transform);\n // we need to remember it here, because it's always 0 in the \"zoom\" event\n zoomPanValues.mouseButton = event.sourceEvent?.button || 0;\n zoomPanValues.isZoomingOrPanning = true;\n zoomPanValues.prevViewport = viewport;\n if (event.sourceEvent?.type === 'mousedown') {\n onDraggingChange(true);\n }\n if (onPanZoomStart) {\n onPanZoomStart?.(event.sourceEvent, viewport);\n }\n };\n}\nfunction createPanZoomHandler({ zoomPanValues, panOnDrag, onPaneContextMenu, onTransformChange, onPanZoom, }) {\n return (event) => {\n zoomPanValues.usedRightMouseButton = !!(onPaneContextMenu && isRightClickPan(panOnDrag, zoomPanValues.mouseButton ?? 0));\n if (!event.sourceEvent?.sync) {\n onTransformChange([event.transform.x, event.transform.y, event.transform.k]);\n }\n if (onPanZoom && !event.sourceEvent?.internal) {\n onPanZoom?.(event.sourceEvent, transformToViewport(event.transform));\n }\n };\n}\nfunction createPanZoomEndHandler({ zoomPanValues, panOnDrag, panOnScroll, onDraggingChange, onPanZoomEnd, onPaneContextMenu, }) {\n return (event) => {\n if (event.sourceEvent?.internal) {\n return;\n }\n zoomPanValues.isZoomingOrPanning = false;\n if (onPaneContextMenu &&\n isRightClickPan(panOnDrag, zoomPanValues.mouseButton ?? 0) &&\n !zoomPanValues.usedRightMouseButton &&\n event.sourceEvent) {\n onPaneContextMenu(event.sourceEvent);\n }\n zoomPanValues.usedRightMouseButton = false;\n onDraggingChange(false);\n if (onPanZoomEnd) {\n const viewport = transformToViewport(event.transform);\n zoomPanValues.prevViewport = viewport;\n clearTimeout(zoomPanValues.timerId);\n zoomPanValues.timerId = setTimeout(() => {\n onPanZoomEnd?.(event.sourceEvent, viewport);\n }, \n // we need a setTimeout for panOnScroll to suppress multiple end events fired during scroll\n panOnScroll ? 150 : 0);\n }\n };\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nfunction createFilter({ panActivationKeyPressed, zoomActivationKeyPressed, zoomOnScroll, zoomOnPinch, panOnDrag, panOnScroll, zoomOnDoubleClick, userSelectionActive, noWheelClassName, noPanClassName, lib, connectionInProgress, }) {\n return (event) => {\n const zoomScroll = zoomActivationKeyPressed || zoomOnScroll;\n const pinchZoom = zoomOnPinch && event.ctrlKey;\n const isWheelEvent = event.type === 'wheel';\n if (event.button === 1 &&\n event.type === 'mousedown' &&\n (isWrappedWithClass(event, `${lib}-flow__node`) ||\n isWrappedWithClass(event, `${lib}-flow__edge`) ||\n isWrappedWithClass(event, `${lib}-flow__selection`) ||\n isWrappedWithClass(event, `${lib}-flow__nodesselection`))) {\n return true;\n }\n // if all interactions are disabled, we prevent all zoom events\n if (!panOnDrag && !zoomScroll && !panOnScroll && !zoomOnDoubleClick && !zoomOnPinch) {\n return false;\n }\n // during a selection we prevent all other interactions\n if (userSelectionActive) {\n return false;\n }\n // we want to disable pinch-zooming while making a connection\n if (connectionInProgress && !isWheelEvent) {\n return false;\n }\n // if the target element is inside an element with the nowheel class, we prevent zooming\n if (isWrappedWithClass(event, noWheelClassName) && isWheelEvent) {\n return false;\n }\n // if the target element is inside an element with the nopan class, we prevent panning\n if (isWrappedWithClass(event, noPanClassName) &&\n (!isWheelEvent || (panOnScroll && isWheelEvent && !zoomActivationKeyPressed))) {\n return false;\n }\n if (!zoomOnPinch && event.ctrlKey && isWheelEvent) {\n return false;\n }\n if (!zoomOnPinch && event.type === 'touchstart' && event.touches?.length > 1) {\n event.preventDefault(); // if you manage to start with 2 touches, we prevent native zoom\n return false;\n }\n // when there is no scroll handling enabled, we prevent all wheel events\n if (!zoomScroll && !panOnScroll && !pinchZoom && isWheelEvent) {\n return false;\n }\n // if the pane is not movable, we prevent dragging it with mousestart or touchstart\n if (!panOnDrag && (event.type === 'mousedown' || event.type === 'touchstart')) {\n return false;\n }\n // if the pane is only movable using allowed clicks\n if (Array.isArray(panOnDrag) && !panOnDrag.includes(event.button) && event.type === 'mousedown') {\n return false;\n }\n // We only allow right clicks if pan on drag is set to right click\n const buttonAllowed = (Array.isArray(panOnDrag) && panOnDrag.includes(event.button)) || !event.button || event.button <= 1;\n // d3-zoom rejects Ctrl-modified mouse drags by default because Ctrl+wheel is\n // commonly used for pinch zooming. Allow the drag when Control is the\n // configured pan activation key, while retaining the wheel safeguard.\n return (!event.ctrlKey || isWheelEvent || panActivationKeyPressed) && buttonAllowed;\n };\n}\n\nfunction XYPanZoom({ domNode, minZoom, maxZoom, translateExtent, viewport, onPanZoom, onPanZoomStart, onPanZoomEnd, onDraggingChange, }) {\n const zoomPanValues = {\n isZoomingOrPanning: false,\n usedRightMouseButton: false,\n prevViewport: { },\n mouseButton: 0,\n timerId: undefined,\n panScrollTimeout: undefined,\n isPanScrolling: false,\n };\n const bbox = domNode.getBoundingClientRect();\n /*\n * Cache the pane extent and refresh it from a ResizeObserver. Otherwise d3-zoom falls back to its\n * defaultExtent, which reads clientWidth/clientHeight and forces a synchronous layout while panning\n * and pinching. The observer is never disconnected on purpose: destroy() also runs to pause zooming\n * during a user selection, so disconnecting there would leave the cache stale. It becomes unreachable\n * and is garbage collected with the pane on unmount.\n */\n let cachedExtent = [\n [0, 0],\n [bbox.width, bbox.height],\n ];\n const extentResizeObserver = typeof ResizeObserver !== 'undefined'\n ? new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry) {\n cachedExtent = [\n [0, 0],\n [entry.contentRect.width, entry.contentRect.height],\n ];\n }\n })\n : null;\n extentResizeObserver?.observe(domNode);\n const d3ZoomInstance = zoom()\n .extent(() => cachedExtent)\n .scaleExtent([minZoom, maxZoom])\n .translateExtent(translateExtent);\n const d3Selection = select(domNode).call(d3ZoomInstance);\n setViewportConstrained({\n x: viewport.x,\n y: viewport.y,\n zoom: clamp(viewport.zoom, minZoom, maxZoom),\n }, [\n [0, 0],\n [bbox.width, bbox.height],\n ], translateExtent);\n const d3ZoomHandler = d3Selection.on('wheel.zoom');\n const d3DblClickZoomHandler = d3Selection.on('dblclick.zoom');\n d3ZoomInstance.wheelDelta(wheelDelta);\n async function setTransform(transform, options) {\n if (d3Selection) {\n return new Promise((resolve) => {\n d3ZoomInstance?.interpolate(options?.interpolate === 'linear' ? interpolate : interpolateZoom).transform(getD3Transition(d3Selection, options?.duration, options?.ease, () => resolve(true)), transform);\n });\n }\n return false;\n }\n // public functions\n function update({ noWheelClassName, noPanClassName, onPaneContextMenu, userSelectionActive, panOnScroll, panOnDrag, panOnScrollMode, panOnScrollSpeed, preventScrolling, zoomOnPinch, zoomOnScroll, zoomOnDoubleClick, panActivationKeyPressed = false, zoomActivationKeyPressed, lib, onTransformChange, connectionInProgress, paneClickDistance, selectionOnDrag, }) {\n if (userSelectionActive && !zoomPanValues.isZoomingOrPanning) {\n destroy();\n }\n const isPanOnScroll = panOnScroll && !zoomActivationKeyPressed && !userSelectionActive;\n d3ZoomInstance.clickDistance(selectionOnDrag ? Infinity : !isNumeric(paneClickDistance) || paneClickDistance < 0 ? 0 : paneClickDistance);\n const wheelHandler = isPanOnScroll\n ? createPanOnScrollHandler({\n zoomPanValues,\n noWheelClassName,\n d3Selection,\n d3Zoom: d3ZoomInstance,\n panOnScrollMode,\n panOnScrollSpeed,\n zoomOnPinch,\n onPanZoomStart,\n onPanZoom,\n onPanZoomEnd,\n })\n : createZoomOnScrollHandler({\n noWheelClassName,\n preventScrolling,\n d3ZoomHandler,\n });\n d3Selection.on('wheel.zoom', wheelHandler, { passive: false });\n // pan zoom start\n const startHandler = createPanZoomStartHandler({\n zoomPanValues,\n onDraggingChange,\n onPanZoomStart,\n });\n d3ZoomInstance.on('start', startHandler);\n // pan zoom\n const panZoomHandler = createPanZoomHandler({\n zoomPanValues,\n panOnDrag,\n onPaneContextMenu: !!onPaneContextMenu,\n onPanZoom,\n onTransformChange,\n });\n d3ZoomInstance.on('zoom', panZoomHandler);\n // pan zoom end\n const panZoomEndHandler = createPanZoomEndHandler({\n zoomPanValues,\n panOnDrag,\n panOnScroll,\n onPaneContextMenu,\n onPanZoomEnd,\n onDraggingChange,\n });\n d3ZoomInstance.on('end', panZoomEndHandler);\n const filter = createFilter({\n panActivationKeyPressed,\n zoomActivationKeyPressed,\n panOnDrag,\n zoomOnScroll,\n panOnScroll,\n zoomOnDoubleClick,\n zoomOnPinch,\n userSelectionActive,\n noPanClassName,\n noWheelClassName,\n lib,\n connectionInProgress,\n });\n d3ZoomInstance.filter(filter);\n /*\n * We cannot add zoomOnDoubleClick to the filter above because\n * double tapping on touch screens circumvents the filter and\n * dblclick.zoom is fired on the selection directly\n */\n if (zoomOnDoubleClick) {\n d3Selection.on('dblclick.zoom', d3DblClickZoomHandler);\n }\n else {\n d3Selection.on('dblclick.zoom', null);\n }\n }\n function destroy() {\n d3ZoomInstance.on('zoom', null);\n }\n async function setViewportConstrained(viewport, extent, translateExtent) {\n const nextTransform = viewportToTransform(viewport);\n const contrainedTransform = d3ZoomInstance?.constrain()(nextTransform, extent, translateExtent);\n if (contrainedTransform) {\n await setTransform(contrainedTransform);\n }\n return contrainedTransform;\n }\n async function setViewport(viewport, options) {\n const nextTransform = viewportToTransform(viewport);\n await setTransform(nextTransform, options);\n return nextTransform;\n }\n function syncViewport(viewport) {\n if (d3Selection) {\n const nextTransform = viewportToTransform(viewport);\n const currentTransform = d3Selection.property('__zoom');\n if (currentTransform.k !== viewport.zoom ||\n currentTransform.x !== viewport.x ||\n currentTransform.y !== viewport.y) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n d3ZoomInstance?.transform(d3Selection, nextTransform, null, { sync: true });\n }\n }\n }\n function getViewport() {\n const transform = d3Selection ? zoomTransform(d3Selection.node()) : { x: 0, y: 0, k: 1 };\n return { x: transform.x, y: transform.y, zoom: transform.k };\n }\n async function scaleTo(zoom, options) {\n if (d3Selection) {\n return new Promise((resolve) => {\n d3ZoomInstance?.interpolate(options?.interpolate === 'linear' ? interpolate : interpolateZoom).scaleTo(getD3Transition(d3Selection, options?.duration, options?.ease, () => resolve(true)), zoom);\n });\n }\n return false;\n }\n async function scaleBy(factor, options) {\n if (d3Selection) {\n return new Promise((resolve) => {\n d3ZoomInstance?.interpolate(options?.interpolate === 'linear' ? interpolate : interpolateZoom).scaleBy(getD3Transition(d3Selection, options?.duration, options?.ease, () => resolve(true)), factor);\n });\n }\n return false;\n }\n function setScaleExtent(scaleExtent) {\n d3ZoomInstance?.scaleExtent(scaleExtent);\n }\n function setTranslateExtent(translateExtent) {\n d3ZoomInstance?.translateExtent(translateExtent);\n }\n function setClickDistance(distance) {\n const validDistance = !isNumeric(distance) || distance < 0 ? 0 : distance;\n d3ZoomInstance?.clickDistance(validDistance);\n }\n return {\n update,\n destroy,\n setViewport,\n setViewportConstrained,\n getViewport,\n scaleTo,\n scaleBy,\n setScaleExtent,\n setTranslateExtent,\n syncViewport,\n setClickDistance,\n };\n}\n\n/**\n * Used to determine the variant of the resize control\n *\n * @public\n */\nvar ResizeControlVariant;\n(function (ResizeControlVariant) {\n ResizeControlVariant[\"Line\"] = \"line\";\n ResizeControlVariant[\"Handle\"] = \"handle\";\n})(ResizeControlVariant || (ResizeControlVariant = {}));\nconst XY_RESIZER_HANDLE_POSITIONS = ['top-left', 'top-right', 'bottom-left', 'bottom-right'];\nconst XY_RESIZER_LINE_POSITIONS = ['top', 'right', 'bottom', 'left'];\n\n/**\n * Get all connecting edges for a given set of nodes\n * @param width - new width of the node\n * @param prevWidth - previous width of the node\n * @param height - new height of the node\n * @param prevHeight - previous height of the node\n * @param affectsX - whether to invert the resize direction for the x axis\n * @param affectsY - whether to invert the resize direction for the y axis\n * @returns array of two numbers representing the direction of the resize for each axis, 0 = no change, 1 = increase, -1 = decrease\n */\nfunction getResizeDirection({ width, prevWidth, height, prevHeight, affectsX, affectsY, }) {\n const deltaWidth = width - prevWidth;\n const deltaHeight = height - prevHeight;\n const direction = [deltaWidth > 0 ? 1 : deltaWidth < 0 ? -1 : 0, deltaHeight > 0 ? 1 : deltaHeight < 0 ? -1 : 0];\n if (deltaWidth && affectsX) {\n direction[0] = direction[0] * -1;\n }\n if (deltaHeight && affectsY) {\n direction[1] = direction[1] * -1;\n }\n return direction;\n}\n/**\n * Parses the control position that is being dragged to dimensions that are being resized\n * @param controlPosition - position of the control that is being dragged\n * @returns isHorizontal, isVertical, affectsX, affectsY,\n */\nfunction getControlDirection(controlPosition) {\n const isHorizontal = controlPosition.includes('right') || controlPosition.includes('left');\n const isVertical = controlPosition.includes('bottom') || controlPosition.includes('top');\n const affectsX = controlPosition.includes('left');\n const affectsY = controlPosition.includes('top');\n return {\n isHorizontal,\n isVertical,\n affectsX,\n affectsY,\n };\n}\nfunction getLowerExtentClamp(lowerExtent, lowerBound) {\n return Math.max(0, lowerBound - lowerExtent);\n}\nfunction getUpperExtentClamp(upperExtent, upperBound) {\n return Math.max(0, upperExtent - upperBound);\n}\nfunction getSizeClamp(size, minSize, maxSize) {\n return Math.max(0, minSize - size, size - maxSize);\n}\nfunction xor(a, b) {\n return a ? !b : b;\n}\n/**\n * Calculates new width & height and x & y of node after resize based on pointer position\n * @description - Buckle up, this is a chunky one... If you want to determine the new dimensions of a node after a resize,\n * you have to account for all possible restrictions: min/max width/height of the node, the maximum extent the node is allowed\n * to move in (in this case: resize into) determined by the parent node, the minimal extent determined by child nodes\n * with expandParent or extent: 'parent' set and oh yeah, these things also have to work with keepAspectRatio!\n * The way this is done is by determining how much each of these restricting actually restricts the resize and then applying the\n * strongest restriction. Because the resize affects x, y and width, height and width, height of a opposing side with keepAspectRatio,\n * the resize amount is always kept in distX & distY amount (the distance in mouse movement)\n * Instead of clamping each value, we first calculate the biggest 'clamp' (for the lack of a better name) and then apply it to all values.\n * To complicate things nodeOrigin has to be taken into account as well. This is done by offsetting the nodes as if their origin is [0, 0],\n * then calculating the restrictions as usual\n * @param startValues - starting values of resize\n * @param controlDirection - dimensions affected by the resize\n * @param pointerPosition - the current pointer position corrected for snapping\n * @param boundaries - minimum and maximum dimensions of the node\n * @param keepAspectRatio - prevent changes of asprect ratio\n * @returns x, y, width and height of the node after resize\n */\nfunction getDimensionsAfterResize(startValues, controlDirection, pointerPosition, boundaries, keepAspectRatio, nodeOrigin, extent, childExtent) {\n let { affectsX, affectsY } = controlDirection;\n const { isHorizontal, isVertical } = controlDirection;\n const isDiagonal = isHorizontal && isVertical;\n const { xSnapped, ySnapped } = pointerPosition;\n const { minWidth, maxWidth, minHeight, maxHeight } = boundaries;\n const { x: startX, y: startY, width: startWidth, height: startHeight, aspectRatio } = startValues;\n let distX = Math.floor(isHorizontal ? xSnapped - startValues.pointerX : 0);\n let distY = Math.floor(isVertical ? ySnapped - startValues.pointerY : 0);\n const newWidth = startWidth + (affectsX ? -distX : distX);\n const newHeight = startHeight + (affectsY ? -distY : distY);\n const originOffsetX = -nodeOrigin[0] * startWidth;\n const originOffsetY = -nodeOrigin[1] * startHeight;\n // Check if maxWidth, minWWidth, maxHeight, minHeight are restricting the resize\n let clampX = getSizeClamp(newWidth, minWidth, maxWidth);\n let clampY = getSizeClamp(newHeight, minHeight, maxHeight);\n // Check if extent is restricting the resize\n if (extent) {\n let xExtentClamp = 0;\n let yExtentClamp = 0;\n if (affectsX && distX < 0) {\n xExtentClamp = getLowerExtentClamp(startX + distX + originOffsetX, extent[0][0]);\n }\n else if (!affectsX && distX > 0) {\n xExtentClamp = getUpperExtentClamp(startX + newWidth + originOffsetX, extent[1][0]);\n }\n if (affectsY && distY < 0) {\n yExtentClamp = getLowerExtentClamp(startY + distY + originOffsetY, extent[0][1]);\n }\n else if (!affectsY && distY > 0) {\n yExtentClamp = getUpperExtentClamp(startY + newHeight + originOffsetY, extent[1][1]);\n }\n clampX = Math.max(clampX, xExtentClamp);\n clampY = Math.max(clampY, yExtentClamp);\n }\n // Check if the child extent is restricting the resize\n if (childExtent) {\n let xExtentClamp = 0;\n let yExtentClamp = 0;\n if (affectsX && distX > 0) {\n xExtentClamp = getUpperExtentClamp(startX + distX, childExtent[0][0]);\n }\n else if (!affectsX && distX < 0) {\n xExtentClamp = getLowerExtentClamp(startX + newWidth, childExtent[1][0]);\n }\n if (affectsY && distY > 0) {\n yExtentClamp = getUpperExtentClamp(startY + distY, childExtent[0][1]);\n }\n else if (!affectsY && distY < 0) {\n yExtentClamp = getLowerExtentClamp(startY + newHeight, childExtent[1][1]);\n }\n clampX = Math.max(clampX, xExtentClamp);\n clampY = Math.max(clampY, yExtentClamp);\n }\n // Check if the aspect ratio resizing of the other side is restricting the resize\n if (keepAspectRatio) {\n if (isHorizontal) {\n // Check if the max dimensions might be restricting the resize\n const aspectHeightClamp = getSizeClamp(newWidth / aspectRatio, minHeight, maxHeight) * aspectRatio;\n clampX = Math.max(clampX, aspectHeightClamp);\n // Check if the extent is restricting the resize\n if (extent) {\n let aspectExtentClamp = 0;\n if ((!affectsX && !affectsY) || (affectsX && !affectsY && isDiagonal)) {\n aspectExtentClamp =\n getUpperExtentClamp(startY + originOffsetY + newWidth / aspectRatio, extent[1][1]) * aspectRatio;\n }\n else {\n aspectExtentClamp =\n getLowerExtentClamp(startY + originOffsetY + (affectsX ? distX : -distX) / aspectRatio, extent[0][1]) *\n aspectRatio;\n }\n clampX = Math.max(clampX, aspectExtentClamp);\n }\n // Check if the child extent is restricting the resize\n if (childExtent) {\n let aspectExtentClamp = 0;\n if ((!affectsX && !affectsY) || (affectsX && !affectsY && isDiagonal)) {\n aspectExtentClamp = getLowerExtentClamp(startY + newWidth / aspectRatio, childExtent[1][1]) * aspectRatio;\n }\n else {\n aspectExtentClamp =\n getUpperExtentClamp(startY + (affectsX ? distX : -distX) / aspectRatio, childExtent[0][1]) * aspectRatio;\n }\n clampX = Math.max(clampX, aspectExtentClamp);\n }\n }\n // Do the same thing for vertical resizing\n if (isVertical) {\n const aspectWidthClamp = getSizeClamp(newHeight * aspectRatio, minWidth, maxWidth) / aspectRatio;\n clampY = Math.max(clampY, aspectWidthClamp);\n if (extent) {\n let aspectExtentClamp = 0;\n if ((!affectsX && !affectsY) || (affectsY && !affectsX && isDiagonal)) {\n aspectExtentClamp =\n getUpperExtentClamp(startX + newHeight * aspectRatio + originOffsetX, extent[1][0]) / aspectRatio;\n }\n else {\n aspectExtentClamp =\n getLowerExtentClamp(startX + (affectsY ? distY : -distY) * aspectRatio + originOffsetX, extent[0][0]) /\n aspectRatio;\n }\n clampY = Math.max(clampY, aspectExtentClamp);\n }\n if (childExtent) {\n let aspectExtentClamp = 0;\n if ((!affectsX && !affectsY) || (affectsY && !affectsX && isDiagonal)) {\n aspectExtentClamp = getLowerExtentClamp(startX + newHeight * aspectRatio, childExtent[1][0]) / aspectRatio;\n }\n else {\n aspectExtentClamp =\n getUpperExtentClamp(startX + (affectsY ? distY : -distY) * aspectRatio, childExtent[0][0]) / aspectRatio;\n }\n clampY = Math.max(clampY, aspectExtentClamp);\n }\n }\n }\n distY = distY + (distY < 0 ? clampY : -clampY);\n distX = distX + (distX < 0 ? clampX : -clampX);\n if (keepAspectRatio) {\n if (isDiagonal) {\n if (newWidth > newHeight * aspectRatio) {\n distY = (xor(affectsX, affectsY) ? -distX : distX) / aspectRatio;\n }\n else {\n distX = (xor(affectsX, affectsY) ? -distY : distY) * aspectRatio;\n }\n }\n else {\n if (isHorizontal) {\n distY = distX / aspectRatio;\n affectsY = affectsX;\n }\n else {\n distX = distY * aspectRatio;\n affectsX = affectsY;\n }\n }\n }\n const x = affectsX ? startX + distX : startX;\n const y = affectsY ? startY + distY : startY;\n return {\n width: startWidth + (affectsX ? -distX : distX),\n height: startHeight + (affectsY ? -distY : distY),\n x: nodeOrigin[0] * distX * (!affectsX ? 1 : -1) + x,\n y: nodeOrigin[1] * distY * (!affectsY ? 1 : -1) + y,\n };\n}\n\nconst initPrevValues = { width: 0, height: 0, x: 0, y: 0 };\nconst initStartValues = {\n ...initPrevValues,\n pointerX: 0,\n pointerY: 0,\n aspectRatio: 1,\n};\nfunction nodeToChildExtent(child, parent, nodeOrigin) {\n const x = parent.position.x + child.position.x;\n const y = parent.position.y + child.position.y;\n const width = child.measured.width ?? 0;\n const height = child.measured.height ?? 0;\n const originOffsetX = nodeOrigin[0] * width;\n const originOffsetY = nodeOrigin[1] * height;\n return [\n [x - originOffsetX, y - originOffsetY],\n [x + width - originOffsetX, y + height - originOffsetY],\n ];\n}\nfunction XYResizer({ domNode, nodeId, getStoreItems, onChange, onEnd }) {\n const selection = select(domNode);\n let params = {\n controlDirection: getControlDirection('bottom-right'),\n boundaries: {\n minWidth: 0,\n minHeight: 0,\n maxWidth: Number.MAX_VALUE,\n maxHeight: Number.MAX_VALUE,\n },\n resizeDirection: undefined,\n keepAspectRatio: false,\n };\n function update({ controlPosition, boundaries, keepAspectRatio, resizeDirection, onResizeStart, onResize, onResizeEnd, shouldResize, }) {\n let prevValues = { ...initPrevValues };\n let startValues = { ...initStartValues };\n params = {\n boundaries,\n resizeDirection,\n keepAspectRatio,\n controlDirection: getControlDirection(controlPosition),\n };\n let node = undefined;\n let containerBounds = null;\n let childNodes = [];\n let parentNode = undefined; // Needed to fix expandParent\n let nodeExtent = undefined;\n let childExtent = undefined;\n // we only want to trigger onResizeEnd if onResize was actually called\n let resizeDetected = false;\n const dragHandler = drag()\n .on('start', (event) => {\n const { nodeLookup, transform, snapGrid, snapToGrid, nodeOrigin, paneDomNode } = getStoreItems();\n node = nodeLookup.get(nodeId);\n if (!node) {\n return;\n }\n containerBounds = paneDomNode?.getBoundingClientRect() ?? null;\n const { xSnapped, ySnapped } = getPointerPosition(event.sourceEvent, {\n transform,\n snapGrid,\n snapToGrid,\n containerBounds,\n });\n prevValues = {\n width: node.measured.width ?? 0,\n height: node.measured.height ?? 0,\n x: node.position.x ?? 0,\n y: node.position.y ?? 0,\n };\n startValues = {\n ...prevValues,\n pointerX: xSnapped,\n pointerY: ySnapped,\n aspectRatio: prevValues.width / prevValues.height,\n };\n parentNode = undefined;\n nodeExtent = isCoordinateExtent(node.extent) ? node.extent : undefined;\n if (node.parentId && (node.extent === 'parent' || node.expandParent)) {\n parentNode = nodeLookup.get(node.parentId);\n }\n if (parentNode && node.extent === 'parent') {\n nodeExtent = [\n [0, 0],\n [parentNode.measured.width, parentNode.measured.height],\n ];\n }\n /*\n * Collect all child nodes to correct their relative positions when top/left changes\n * Determine largest minimal extent the parent node is allowed to resize to\n */\n childNodes = [];\n childExtent = undefined;\n for (const [childId, child] of nodeLookup) {\n if (child.parentId === nodeId) {\n childNodes.push({\n id: childId,\n position: { ...child.position },\n extent: child.extent,\n });\n if (child.extent === 'parent' || child.expandParent) {\n const extent = nodeToChildExtent(child, node, child.origin ?? nodeOrigin);\n if (childExtent) {\n childExtent = [\n [Math.min(extent[0][0], childExtent[0][0]), Math.min(extent[0][1], childExtent[0][1])],\n [Math.max(extent[1][0], childExtent[1][0]), Math.max(extent[1][1], childExtent[1][1])],\n ];\n }\n else {\n childExtent = extent;\n }\n }\n }\n }\n onResizeStart?.(event, { ...prevValues });\n })\n .on('drag', (event) => {\n const { transform, snapGrid, snapToGrid, nodeOrigin: storeNodeOrigin } = getStoreItems();\n const pointerPosition = getPointerPosition(event.sourceEvent, {\n transform,\n snapGrid,\n snapToGrid,\n containerBounds,\n });\n const childChanges = [];\n if (!node) {\n return;\n }\n const { x: prevX, y: prevY, width: prevWidth, height: prevHeight } = prevValues;\n const change = {};\n const nodeOrigin = node.origin ?? storeNodeOrigin;\n const { width, height, x, y } = getDimensionsAfterResize(startValues, params.controlDirection, pointerPosition, params.boundaries, params.keepAspectRatio, nodeOrigin, nodeExtent, childExtent);\n const isWidthChange = width !== prevWidth;\n const isHeightChange = height !== prevHeight;\n const isXPosChange = x !== prevX && isWidthChange;\n const isYPosChange = y !== prevY && isHeightChange;\n if (!isXPosChange && !isYPosChange && !isWidthChange && !isHeightChange) {\n return;\n }\n if (isXPosChange || isYPosChange || nodeOrigin[0] === 1 || nodeOrigin[1] === 1) {\n change.x = isXPosChange ? x : prevValues.x;\n change.y = isYPosChange ? y : prevValues.y;\n prevValues.x = change.x;\n prevValues.y = change.y;\n /*\n * when top/left changes, correct the relative positions of child nodes\n * so that they stay in the same position\n */\n if (childNodes.length > 0) {\n const xChange = x - prevX;\n const yChange = y - prevY;\n for (const childNode of childNodes) {\n childNode.position = {\n x: childNode.position.x - xChange + nodeOrigin[0] * (width - prevWidth),\n y: childNode.position.y - yChange + nodeOrigin[1] * (height - prevHeight),\n };\n childChanges.push(childNode);\n }\n }\n }\n if (isWidthChange || isHeightChange) {\n change.width =\n isWidthChange && (!params.resizeDirection || params.resizeDirection === 'horizontal')\n ? width\n : prevValues.width;\n change.height =\n isHeightChange && (!params.resizeDirection || params.resizeDirection === 'vertical')\n ? height\n : prevValues.height;\n prevValues.width = change.width;\n prevValues.height = change.height;\n }\n // Fix expandParent when resizing from top/left\n if (parentNode && node.expandParent) {\n const xLimit = nodeOrigin[0] * (change.width ?? 0);\n if (change.x && change.x < xLimit) {\n prevValues.x = xLimit;\n startValues.x = startValues.x - (change.x - xLimit);\n }\n const yLimit = nodeOrigin[1] * (change.height ?? 0);\n if (change.y && change.y < yLimit) {\n prevValues.y = yLimit;\n startValues.y = startValues.y - (change.y - yLimit);\n }\n }\n const direction = getResizeDirection({\n width: prevValues.width,\n prevWidth,\n height: prevValues.height,\n prevHeight,\n affectsX: params.controlDirection.affectsX,\n affectsY: params.controlDirection.affectsY,\n });\n const nextValues = { ...prevValues, direction };\n const callResize = shouldResize?.(event, nextValues);\n if (callResize === false) {\n return;\n }\n resizeDetected = true;\n onResize?.(event, nextValues);\n onChange(change, childChanges);\n })\n .on('end', (event) => {\n if (!resizeDetected) {\n return;\n }\n onResizeEnd?.(event, { ...prevValues });\n onEnd?.({ ...prevValues });\n resizeDetected = false;\n });\n selection.call(dragHandler);\n }\n function destroy() {\n selection.on('.drag', null);\n }\n return {\n update,\n destroy,\n };\n}\n\nexport { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, XYDrag, XYHandle, XYMinimap, XYPanZoom, XYResizer, XY_RESIZER_HANDLE_POSITIONS, XY_RESIZER_LINE_POSITIONS, addEdge, adoptUserNodes, areConnectionMapsEqual, areSetsEqual, boxToRect, calcAutoPan, calculateNodePosition, clamp, clampPosition, clampPositionToParent, createDevWarn, createMarkerIds, defaultAriaLabelConfig, elementSelectionKeys, errorMessages, evaluateAbsolutePosition, fitViewport, getBezierEdgeCenter, getBezierPath, getBoundsOfBoxes, getBoundsOfRects, getConnectedEdges, getConnectionStatus, getDimensions, getEdgeCenter, getEdgeId, getEdgePosition, getEdgeToolbarTransform, getElementsToRemove, getElevatedEdgeZIndex, getEventPosition, getHandleBounds, getHandlePosition, getHostForElement, getIncomers, getInternalNodesBounds, getMarkerId, getNodeDimensions, getNodePositionWithOrigin, getNodeToolbarTransform, getNodesBounds, getNodesInside, getOutgoers, getOverlappingArea, getPointerPosition, getRectsOverlappingArea, getSmoothStepPath, getStraightPath, getViewportForBounds, handleAttributionWarning, handleConnectionChange, handleExpandParent, infiniteExtent, initialConnection, isAttributionVisible, isCoordinateExtent, isEdgeBase, isEdgeVisible, isInputDOMNode, isInternalNodeBase, isMacOs, isManualZIndexMode, isMouseEvent, isNodeBase, isNumeric, isRectObject, mergeAriaLabelConfig, nodeHasDimensions, nodeToBox, nodeToRect, oppositePosition, panBy, pointToRendererPoint, reconnectEdge, rectToBox, rendererPointToPoint, shallowNodeData, snapPosition, updateAbsolutePositions, updateConnectionLookup, updateNodeInternals, withResolvers };\n","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\" || nextState === null) ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const getInitialState = () => initialState;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const destroy = () => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.\"\n );\n }\n listeners.clear();\n };\n const api = { setState, getState, getInitialState, subscribe, destroy };\n const initialState = state = createState(setState, getState, api);\n return api;\n};\nconst createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;\nvar vanilla = (createState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'.\"\n );\n }\n return createStore(createState);\n};\n\nexport { createStore, vanilla as default };\n","import ReactExports from 'react';\nimport useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector.js';\nimport { createStore } from 'zustand/vanilla';\n\nconst { useDebugValue } = ReactExports;\nconst { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;\nconst identity = (arg) => arg;\nfunction useStoreWithEqualityFn(api, selector = identity, equalityFn) {\n const slice = useSyncExternalStoreWithSelector(\n api.subscribe,\n api.getState,\n api.getServerState || api.getInitialState,\n selector,\n equalityFn\n );\n useDebugValue(slice);\n return slice;\n}\nconst createWithEqualityFnImpl = (createState, defaultEqualityFn) => {\n const api = createStore(createState);\n const useBoundStoreWithEqualityFn = (selector, equalityFn = defaultEqualityFn) => useStoreWithEqualityFn(api, selector, equalityFn);\n Object.assign(useBoundStoreWithEqualityFn, api);\n return useBoundStoreWithEqualityFn;\n};\nconst createWithEqualityFn = (createState, defaultEqualityFn) => createState ? createWithEqualityFnImpl(createState, defaultEqualityFn) : createWithEqualityFnImpl;\n\nexport { createWithEqualityFn, useStoreWithEqualityFn };\n","function shallow$1(objA, objB) {\n if (Object.is(objA, objB)) {\n return true;\n }\n if (typeof objA !== \"object\" || objA === null || typeof objB !== \"object\" || objB === null) {\n return false;\n }\n if (objA instanceof Map && objB instanceof Map) {\n if (objA.size !== objB.size) return false;\n for (const [key, value] of objA) {\n if (!Object.is(value, objB.get(key))) {\n return false;\n }\n }\n return true;\n }\n if (objA instanceof Set && objB instanceof Set) {\n if (objA.size !== objB.size) return false;\n for (const value of objA) {\n if (!objB.has(value)) {\n return false;\n }\n }\n return true;\n }\n const keysA = Object.keys(objA);\n if (keysA.length !== Object.keys(objB).length) {\n return false;\n }\n for (const keyA of keysA) {\n if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {\n return false;\n }\n }\n return true;\n}\n\nvar shallow = (objA, objB) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] Default export is deprecated. Instead use `import { shallow } from 'zustand/shallow'`.\"\n );\n }\n return shallow$1(objA, objB);\n};\n\nexport { shallow as default, shallow$1 as shallow };\n","\"use client\"\nimport { jsxs, Fragment, jsx } from 'react/jsx-runtime';\nimport { createContext, useContext, useMemo, forwardRef, useEffect, useRef, useState, useLayoutEffect, useCallback, memo } from 'react';\nimport cc from 'classcat';\nimport { errorMessages, handleAttributionWarning, infiniteExtent, mergeAriaLabelConfig, isInputDOMNode, rendererPointToPoint, pointToRendererPoint, getViewportForBounds, createDevWarn, addEdge as addEdge$1, reconnectEdge as reconnectEdge$1, isNodeBase, isEdgeBase, withResolvers, getNodesBounds, isRectObject, getOverlappingArea, nodeToRect, getElementsToRemove, evaluateAbsolutePosition, getDimensions, XYPanZoom, PanOnScrollMode, SelectionMode, getEventPosition, calcAutoPan, getNodesInside, areSetsEqual, XYDrag, snapPosition, calculateNodePosition, Position, ConnectionMode, getHostForElement, XYHandle, isMouseEvent, getInternalNodesBounds, isNumeric, nodeHasDimensions, getNodeDimensions, elementSelectionKeys, isEdgeVisible, MarkerType, createMarkerIds, getBezierEdgeCenter, getSmoothStepPath, getStraightPath, getBezierPath, getEdgePosition, getElevatedEdgeZIndex, getMarkerId, getConnectionStatus, ConnectionLineType, updateConnectionLookup, adoptUserNodes, defaultAriaLabelConfig, initialConnection, panBy, getHandlePosition, handleExpandParent, updateNodeInternals, updateAbsolutePositions, fitViewport, isMacOs, areConnectionMapsEqual, handleConnectionChange, shallowNodeData, XYMinimap, getBoundsOfRects, ResizeControlVariant, XYResizer, XY_RESIZER_LINE_POSITIONS, XY_RESIZER_HANDLE_POSITIONS, getNodeToolbarTransform, getEdgeToolbarTransform } from '@xyflow/system';\nexport { ConnectionLineType, ConnectionMode, MarkerType, PanOnScrollMode, Position, ResizeControlVariant, SelectionMode, getBezierEdgeCenter, getBezierPath, getConnectedEdges, getEdgeCenter, getIncomers, getNodesBounds, getOutgoers, getSmoothStepPath, getStraightPath, getViewportForBounds } from '@xyflow/system';\nimport { useStoreWithEqualityFn, createWithEqualityFn } from 'zustand/traditional';\nimport { shallow } from 'zustand/shallow';\nimport { createPortal } from 'react-dom';\n\nconst StoreContext = createContext(null);\nconst Provider$1 = StoreContext.Provider;\n\nconst zustandErrorMessage = errorMessages['error001']('react');\n/**\n * This hook can be used to subscribe to internal state changes of the React Flow\n * component. The `useStore` hook is re-exported from the [Zustand](https://github.com/pmndrs/zustand)\n * state management library, so you should check out their docs for more details.\n *\n * @public\n * @param selector - A selector function that returns a slice of the flow's internal state.\n * Extracting or transforming just the state you need is a good practice to avoid unnecessary\n * re-renders.\n * @param equalityFn - A function to compare the previous and next value. This is incredibly useful\n * for preventing unnecessary re-renders. Good sensible defaults are using `Object.is` or importing\n * `zustand/shallow`, but you can be as granular as you like.\n * @returns The selected state slice.\n *\n * @example\n * ```ts\n * const nodes = useStore((state) => state.nodes);\n * ```\n *\n * @remarks This hook should only be used if there is no other way to access the internal\n * state. For many of the common use cases, there are dedicated hooks available\n * such as {@link useReactFlow}, {@link useViewport}, etc.\n */\nfunction useStore(selector, equalityFn) {\n const store = useContext(StoreContext);\n if (store === null) {\n throw new Error(zustandErrorMessage);\n }\n return useStoreWithEqualityFn(store, selector, equalityFn);\n}\n/**\n * In some cases, you might need to access the store directly. This hook returns the store object which can be used on demand to access the state or dispatch actions.\n *\n * @returns The store object.\n * @example\n * ```ts\n * const store = useStoreApi();\n * ```\n *\n * @remarks This hook should only be used if there is no other way to access the internal\n * state. For many of the common use cases, there are dedicated hooks available\n * such as {@link useReactFlow}, {@link useViewport}, etc.\n */\nfunction useStoreApi() {\n const store = useContext(StoreContext);\n if (store === null) {\n throw new Error(zustandErrorMessage);\n }\n return useMemo(() => ({\n getState: store.getState,\n setState: store.setState,\n subscribe: store.subscribe,\n }), [store]);\n}\n\nconst style = { display: 'none' };\nconst ariaLiveStyle = {\n position: 'absolute',\n width: 1,\n height: 1,\n margin: -1,\n border: 0,\n padding: 0,\n overflow: 'hidden',\n clip: 'rect(0px, 0px, 0px, 0px)',\n clipPath: 'inset(100%)',\n};\nconst ARIA_NODE_DESC_KEY = 'react-flow__node-desc';\nconst ARIA_EDGE_DESC_KEY = 'react-flow__edge-desc';\nconst ARIA_LIVE_MESSAGE = 'react-flow__aria-live';\nconst ariaLiveSelector = (s) => s.ariaLiveMessage;\nconst ariaLabelConfigSelector = (s) => s.ariaLabelConfig;\nfunction AriaLiveMessage({ rfId }) {\n const ariaLiveMessage = useStore(ariaLiveSelector);\n return (jsx(\"div\", { id: `${ARIA_LIVE_MESSAGE}-${rfId}`, \"aria-live\": \"assertive\", \"aria-atomic\": \"true\", style: ariaLiveStyle, children: ariaLiveMessage }));\n}\nfunction A11yDescriptions({ rfId, disableKeyboardA11y }) {\n const ariaLabelConfig = useStore(ariaLabelConfigSelector);\n return (jsxs(Fragment, { children: [jsx(\"div\", { id: `${ARIA_NODE_DESC_KEY}-${rfId}`, style: style, children: disableKeyboardA11y\n ? ariaLabelConfig['node.a11yDescription.default']\n : ariaLabelConfig['node.a11yDescription.keyboardDisabled'] }), jsx(\"div\", { id: `${ARIA_EDGE_DESC_KEY}-${rfId}`, style: style, children: ariaLabelConfig['edge.a11yDescription.default'] }), !disableKeyboardA11y && jsx(AriaLiveMessage, { rfId: rfId })] }));\n}\n\n/**\n * The `<Panel />` component helps you position content above the viewport.\n * It is used internally by the [`<MiniMap />`](/api-reference/components/minimap)\n * and [`<Controls />`](/api-reference/components/controls) components.\n *\n * @public\n *\n * @example\n * ```jsx\n *import { ReactFlow, Background, Panel } from '@xyflow/react';\n *\n *export default function Flow() {\n * return (\n * <ReactFlow nodes={[]} fitView>\n * <Panel position=\"top-left\">top-left</Panel>\n * <Panel position=\"top-center\">top-center</Panel>\n * <Panel position=\"top-right\">top-right</Panel>\n * <Panel position=\"bottom-left\">bottom-left</Panel>\n * <Panel position=\"bottom-center\">bottom-center</Panel>\n * <Panel position=\"bottom-right\">bottom-right</Panel>\n * </ReactFlow>\n * );\n *}\n *```\n */\nconst Panel = forwardRef(({ position = 'top-left', children, className, style, ...rest }, ref) => {\n const positionClasses = `${position}`.split('-');\n return (jsx(\"div\", { className: cc(['react-flow__panel', className, ...positionClasses]), style: style, ref: ref, ...rest, children: children }));\n});\nPanel.displayName = 'Panel';\n\nconst link = `https://reactflow.dev${process.env.NODE_ENV === 'production' ? '?utm_source=attribution' : '/attribution'}`;\n/**\n * React Flow is independent and entirely funded by its users.\n * If you hide the attribution, please support our work by subscribing to React Flow Pro: https://reactflow.dev/remove-attribution\n */\nfunction Attribution({ proOptions, position = 'bottom-right' }) {\n useEffect(() => {\n if (process.env.NODE_ENV !== 'development') {\n return;\n }\n handleAttributionWarning('react');\n }, []);\n if (proOptions?.hideAttribution) {\n return null;\n }\n return (jsx(Panel, { position: position, className: \"react-flow__attribution\", \"data-message\": `Please only hide this attribution when you are subscribed to React Flow Pro: ${link}`, children: jsx(\"a\", { href: link, target: \"_blank\", rel: \"noopener noreferrer\", \"aria-label\": \"React Flow attribution\", children: \"React Flow\" }) }));\n}\n\nconst selector$l = (s) => {\n const selectedNodes = [];\n const selectedEdges = [];\n for (const [, node] of s.nodeLookup) {\n if (node.selected) {\n selectedNodes.push(node.internals.userNode);\n }\n }\n for (const [, edge] of s.edgeLookup) {\n if (edge.selected) {\n selectedEdges.push(edge);\n }\n }\n return { selectedNodes, selectedEdges };\n};\nconst selectId = (obj) => obj.id;\nfunction areEqual$1(a, b) {\n return (shallow(a.selectedNodes.map(selectId), b.selectedNodes.map(selectId)) &&\n shallow(a.selectedEdges.map(selectId), b.selectedEdges.map(selectId)));\n}\nfunction SelectionListenerInner({ onSelectionChange, }) {\n const store = useStoreApi();\n const { selectedNodes, selectedEdges } = useStore(selector$l, areEqual$1);\n useEffect(() => {\n const params = { nodes: selectedNodes, edges: selectedEdges };\n onSelectionChange?.(params);\n store.getState().onSelectionChangeHandlers.forEach((fn) => fn(params));\n }, [selectedNodes, selectedEdges, onSelectionChange]);\n return null;\n}\nconst changeSelector = (s) => !!s.onSelectionChangeHandlers;\nfunction SelectionListener({ onSelectionChange, }) {\n const storeHasSelectionChangeHandlers = useStore(changeSelector);\n if (onSelectionChange || storeHasSelectionChangeHandlers) {\n return jsx(SelectionListenerInner, { onSelectionChange: onSelectionChange });\n }\n return null;\n}\n\nconst defaultNodeOrigin = [0, 0];\nconst defaultViewport = { x: 0, y: 0, zoom: 1 };\n\n/*\n * This component helps us to update the store with the values coming from the user.\n * We distinguish between values we can update directly with `useDirectStoreUpdater` (like `snapGrid`)\n * and values that have a dedicated setter function in the store (like `setNodes`).\n */\n// These fields exist in the global store, and we need to keep them up to date\nconst reactFlowFieldsToTrack = [\n 'nodes',\n 'edges',\n 'defaultNodes',\n 'defaultEdges',\n 'onConnect',\n 'onConnectStart',\n 'onConnectEnd',\n 'onClickConnectStart',\n 'onClickConnectEnd',\n 'nodesDraggable',\n 'autoPanOnNodeFocus',\n 'nodesConnectable',\n 'nodesFocusable',\n 'edgesFocusable',\n 'edgesReconnectable',\n 'elevateNodesOnSelect',\n 'elevateEdgesOnSelect',\n 'minZoom',\n 'maxZoom',\n 'nodeExtent',\n 'onNodesChange',\n 'onEdgesChange',\n 'elementsSelectable',\n 'connectionMode',\n 'snapGrid',\n 'snapToGrid',\n 'translateExtent',\n 'connectOnClick',\n 'defaultEdgeOptions',\n 'fitView',\n 'fitViewOptions',\n 'onNodesDelete',\n 'onEdgesDelete',\n 'onDelete',\n 'onNodeDrag',\n 'onNodeDragStart',\n 'onNodeDragStop',\n 'onSelectionDrag',\n 'onSelectionDragStart',\n 'onSelectionDragStop',\n 'onMoveStart',\n 'onMove',\n 'onMoveEnd',\n 'noPanClassName',\n 'nodeOrigin',\n 'autoPanOnConnect',\n 'autoPanOnNodeDrag',\n 'onError',\n 'connectionRadius',\n 'isValidConnection',\n 'selectNodesOnDrag',\n 'nodeDragThreshold',\n 'connectionDragThreshold',\n 'onBeforeDelete',\n 'debug',\n 'autoPanSpeed',\n 'ariaLabelConfig',\n 'zIndexMode',\n];\n// rfId doesn't exist in ReactFlowProps, but it's one of the fields we want to update\nconst fieldsToTrack = [...reactFlowFieldsToTrack, 'rfId'];\nconst selector$k = (s) => ({\n setNodes: s.setNodes,\n setEdges: s.setEdges,\n setMinZoom: s.setMinZoom,\n setMaxZoom: s.setMaxZoom,\n setTranslateExtent: s.setTranslateExtent,\n setNodeExtent: s.setNodeExtent,\n reset: s.reset,\n setDefaultNodesAndEdges: s.setDefaultNodesAndEdges,\n});\nconst initPrevValues = {\n /*\n * these are values that are also passed directly to other components\n * than the StoreUpdater. We can reduce the number of setStore calls\n * by setting the same values here as prev fields.\n */\n translateExtent: infiniteExtent,\n nodeOrigin: defaultNodeOrigin,\n minZoom: 0.5,\n maxZoom: 2,\n elementsSelectable: true,\n noPanClassName: 'nopan',\n rfId: '1',\n};\nfunction StoreUpdater(props) {\n const { setNodes, setEdges, setMinZoom, setMaxZoom, setTranslateExtent, setNodeExtent, reset, setDefaultNodesAndEdges, } = useStore(selector$k, shallow);\n const store = useStoreApi();\n useEffect(() => {\n setDefaultNodesAndEdges(props.defaultNodes, props.defaultEdges);\n return () => {\n // when we reset the store we also need to reset the previous fields\n previousFields.current = initPrevValues;\n reset();\n };\n }, []);\n const previousFields = useRef(initPrevValues);\n useEffect(() => {\n for (const fieldName of fieldsToTrack) {\n const fieldValue = props[fieldName];\n const previousFieldValue = previousFields.current[fieldName];\n if (fieldValue === previousFieldValue)\n continue;\n if (typeof props[fieldName] === 'undefined')\n continue;\n // Custom handling with dedicated setters for some fields\n if (fieldName === 'nodes')\n setNodes(fieldValue);\n else if (fieldName === 'edges')\n setEdges(fieldValue);\n else if (fieldName === 'minZoom')\n setMinZoom(fieldValue);\n else if (fieldName === 'maxZoom')\n setMaxZoom(fieldValue);\n else if (fieldName === 'translateExtent')\n setTranslateExtent(fieldValue);\n else if (fieldName === 'nodeExtent')\n setNodeExtent(fieldValue);\n else if (fieldName === 'ariaLabelConfig')\n store.setState({ ariaLabelConfig: mergeAriaLabelConfig(fieldValue) });\n // Renamed fields\n else if (fieldName === 'fitView')\n store.setState({ fitViewQueued: fieldValue });\n else if (fieldName === 'fitViewOptions')\n store.setState({ fitViewOptions: fieldValue });\n // General case\n else\n store.setState({ [fieldName]: fieldValue });\n }\n previousFields.current = props;\n }, \n // Only re-run the effect if one of the fields we track changes\n fieldsToTrack.map((fieldName) => props[fieldName]));\n return null;\n}\n\nfunction getMediaQuery() {\n if (typeof window === 'undefined' || !window.matchMedia) {\n return null;\n }\n return window.matchMedia('(prefers-color-scheme: dark)');\n}\n/**\n * Hook for receiving the current color mode class 'dark' or 'light'.\n *\n * @internal\n * @param colorMode - The color mode to use ('dark', 'light' or 'system')\n */\nfunction useColorModeClass(colorMode) {\n const [colorModeClass, setColorModeClass] = useState(colorMode === 'system' ? null : colorMode);\n useEffect(() => {\n if (colorMode !== 'system') {\n setColorModeClass(colorMode);\n return;\n }\n const mediaQuery = getMediaQuery();\n const updateColorModeClass = () => setColorModeClass(mediaQuery?.matches ? 'dark' : 'light');\n updateColorModeClass();\n mediaQuery?.addEventListener('change', updateColorModeClass);\n return () => {\n mediaQuery?.removeEventListener('change', updateColorModeClass);\n };\n }, [colorMode]);\n return colorModeClass !== null ? colorModeClass : getMediaQuery()?.matches ? 'dark' : 'light';\n}\n\nconst defaultDoc = typeof document !== 'undefined' ? document : null;\n/**\n * This hook lets you listen for specific key codes and tells you whether they are\n * currently pressed or not.\n *\n * @public\n * @param options - Options\n *\n * @example\n * ```tsx\n *import { useKeyPress } from '@xyflow/react';\n *\n *export default function () {\n * const spacePressed = useKeyPress('Space');\n * const cmdAndSPressed = useKeyPress(['Meta+s', 'Strg+s']);\n *\n * return (\n * <div>\n * {spacePressed && <p>Space pressed!</p>}\n * {cmdAndSPressed && <p>Cmd + S pressed!</p>}\n * </div>\n * );\n *}\n *```\n */\nfunction useKeyPress(\n/**\n * The key code (string or array of strings) specifies which key(s) should trigger\n * an action.\n *\n * A **string** can represent:\n * - A **single key**, e.g. `'a'`\n * - A **key combination**, using `'+'` to separate keys, e.g. `'a+d'`\n *\n * An **array of strings** represents **multiple possible key inputs**. For example, `['a', 'd+s']`\n * means the user can press either the single key `'a'` or the combination of `'d'` and `'s'`.\n * @default null\n */\nkeyCode = null, options = { target: defaultDoc, actInsideInputWithModifier: true }) {\n const [keyPressed, setKeyPressed] = useState(false);\n // we need to remember if a modifier key is pressed in order to track it\n const modifierPressed = useRef(false);\n // we need to remember the pressed keys in order to support combinations\n const pressedKeys = useRef(new Set([]));\n /*\n * keyCodes = array with single keys [['a']] or key combinations [['a', 's']]\n * keysToWatch = array with all keys flattened ['a', 'd', 'ShiftLeft']\n * used to check if we store event.code or event.key. When the code is in the list of keysToWatch\n * we use the code otherwise the key. Explainer: When you press the left \"command\" key, the code is \"MetaLeft\"\n * and the key is \"Meta\". We want users to be able to pass keys and codes so we assume that the key is meant when\n * we can't find it in the list of keysToWatch.\n */\n const [keyCodes, keysToWatch] = useMemo(() => {\n if (keyCode !== null) {\n const keyCodeArr = Array.isArray(keyCode) ? keyCode : [keyCode];\n const keys = keyCodeArr\n .filter((kc) => typeof kc === 'string')\n /*\n * we first replace all '+' with '\\n' which we will use to split the keys on\n * then we replace '\\n\\n' with '\\n+', this way we can also support the combination 'key++'\n * in the end we simply split on '\\n' to get the key array\n */\n .map((kc) => kc.replace(/\\+/g, '\\n').replace('\\n\\n', '\\n+').split('\\n'));\n const keysFlat = keys.reduce((res, item) => res.concat(...item), []);\n return [keys, keysFlat];\n }\n return [[], []];\n }, [keyCode]);\n useEffect(() => {\n const target = options?.target ?? defaultDoc;\n const actInsideInputWithModifier = options?.actInsideInputWithModifier ?? true;\n if (keyCode !== null) {\n const downHandler = (event) => {\n modifierPressed.current = event.ctrlKey || event.metaKey || event.shiftKey || event.altKey;\n const preventAction = (!modifierPressed.current || (modifierPressed.current && !actInsideInputWithModifier)) &&\n isInputDOMNode(event);\n if (preventAction) {\n return false;\n }\n const keyOrCode = useKeyOrCode(event.code, keysToWatch);\n pressedKeys.current.add(event[keyOrCode]);\n if (isMatchingKey(keyCodes, pressedKeys.current, false)) {\n const target = (event.composedPath?.()?.[0] || event.target);\n const isInteractiveElement = target?.nodeName === 'BUTTON' || target?.nodeName === 'A';\n if (options.preventDefault !== false && (modifierPressed.current || !isInteractiveElement)) {\n event.preventDefault();\n }\n setKeyPressed(true);\n }\n };\n const upHandler = (event) => {\n const keyOrCode = useKeyOrCode(event.code, keysToWatch);\n if (isMatchingKey(keyCodes, pressedKeys.current, true)) {\n setKeyPressed(false);\n pressedKeys.current.clear();\n }\n else {\n pressedKeys.current.delete(event[keyOrCode]);\n }\n // fix for Mac: when cmd key is pressed, keyup is not triggered for any other key, see: https://stackoverflow.com/questions/27380018/when-cmd-key-is-kept-pressed-keyup-is-not-triggered-for-any-other-key\n if (event.key === 'Meta') {\n pressedKeys.current.clear();\n }\n modifierPressed.current = false;\n };\n const resetHandler = () => {\n pressedKeys.current.clear();\n setKeyPressed(false);\n };\n target?.addEventListener('keydown', downHandler);\n target?.addEventListener('keyup', upHandler);\n window.addEventListener('blur', resetHandler);\n window.addEventListener('contextmenu', resetHandler);\n return () => {\n target?.removeEventListener('keydown', downHandler);\n target?.removeEventListener('keyup', upHandler);\n window.removeEventListener('blur', resetHandler);\n window.removeEventListener('contextmenu', resetHandler);\n };\n }\n }, [keyCode, setKeyPressed]);\n return keyPressed;\n}\n// utils\nfunction isMatchingKey(keyCodes, pressedKeys, isUp) {\n return (keyCodes\n /*\n * we only want to compare same sizes of keyCode definitions\n * and pressed keys. When the user specified 'Meta' as a key somewhere\n * this would also be truthy without this filter when user presses 'Meta' + 'r'\n */\n .filter((keys) => isUp || keys.length === pressedKeys.size)\n /*\n * since we want to support multiple possibilities only one of the\n * combinations need to be part of the pressed keys\n */\n .some((keys) => keys.every((k) => pressedKeys.has(k))));\n}\nfunction useKeyOrCode(eventCode, keysToWatch) {\n return keysToWatch.includes(eventCode) ? 'code' : 'key';\n}\n\n/**\n * Hook for getting viewport helper functions.\n *\n * @internal\n * @returns viewport helper functions\n */\nconst useViewportHelper = () => {\n const store = useStoreApi();\n return useMemo(() => {\n return {\n zoomIn: async (options) => {\n const { panZoom } = store.getState();\n return panZoom ? panZoom.scaleBy(1.2, options) : false;\n },\n zoomOut: async (options) => {\n const { panZoom } = store.getState();\n return panZoom ? panZoom.scaleBy(1 / 1.2, options) : false;\n },\n zoomTo: async (zoomLevel, options) => {\n const { panZoom } = store.getState();\n return panZoom ? panZoom.scaleTo(zoomLevel, options) : false;\n },\n getZoom: () => store.getState().transform[2],\n setViewport: async (viewport, options) => {\n const { transform: [tX, tY, tZoom], panZoom, } = store.getState();\n if (!panZoom) {\n return false;\n }\n await panZoom.setViewport({\n x: viewport.x ?? tX,\n y: viewport.y ?? tY,\n zoom: viewport.zoom ?? tZoom,\n }, options);\n return true;\n },\n getViewport: () => {\n const [x, y, zoom] = store.getState().transform;\n return { x, y, zoom };\n },\n setCenter: async (x, y, options) => {\n return store.getState().setCenter(x, y, options);\n },\n fitBounds: async (bounds, options) => {\n const { width, height, minZoom, maxZoom, panZoom } = store.getState();\n const viewport = getViewportForBounds(bounds, width, height, minZoom, maxZoom, options?.padding ?? 0.1);\n if (!panZoom) {\n return false;\n }\n await panZoom.setViewport(viewport, {\n duration: options?.duration,\n ease: options?.ease,\n interpolate: options?.interpolate,\n });\n return true;\n },\n screenToFlowPosition: (clientPosition, options = {}) => {\n const { transform, snapGrid, snapToGrid, domNode } = store.getState();\n if (!domNode) {\n return clientPosition;\n }\n const { x: domX, y: domY } = domNode.getBoundingClientRect();\n const correctedPosition = {\n x: clientPosition.x - domX,\n y: clientPosition.y - domY,\n };\n const _snapGrid = options.snapGrid ?? snapGrid;\n const _snapToGrid = options.snapToGrid ?? snapToGrid;\n return pointToRendererPoint(correctedPosition, transform, _snapToGrid, _snapGrid);\n },\n flowToScreenPosition: (flowPosition) => {\n const { transform, domNode } = store.getState();\n if (!domNode) {\n return flowPosition;\n }\n const { x: domX, y: domY } = domNode.getBoundingClientRect();\n const rendererPosition = rendererPointToPoint(flowPosition, transform);\n return {\n x: rendererPosition.x + domX,\n y: rendererPosition.y + domY,\n };\n },\n };\n }, []);\n};\n\n/*\n * This function applies changes to nodes or edges that are triggered by React Flow internally.\n * When you drag a node for example, React Flow will send a position change update.\n * This function then applies the changes and returns the updated elements.\n */\nfunction applyChanges(changes, elements) {\n const updatedElements = [];\n /*\n * By storing a map of changes for each element, we can a quick lookup as we\n * iterate over the elements array!\n */\n const changesMap = new Map();\n const addItemChanges = [];\n for (const change of changes) {\n if (change.type === 'add') {\n addItemChanges.push(change);\n continue;\n }\n else if (change.type === 'remove' || change.type === 'replace') {\n /*\n * For a 'remove' change we can safely ignore any other changes queued for\n * the same element, it's going to be removed anyway!\n */\n changesMap.set(change.id, [change]);\n }\n else {\n const elementChanges = changesMap.get(change.id);\n if (elementChanges) {\n /*\n * If we have some changes queued already, we can do a mutable update of\n * that array and save ourselves some copying.\n */\n elementChanges.push(change);\n }\n else {\n changesMap.set(change.id, [change]);\n }\n }\n }\n for (const element of elements) {\n const changes = changesMap.get(element.id);\n /*\n * When there are no changes for an element we can just push it unmodified,\n * no need to copy it.\n */\n if (!changes) {\n updatedElements.push(element);\n continue;\n }\n // If we have a 'remove' change queued, it'll be the only change in the array\n if (changes[0].type === 'remove') {\n continue;\n }\n if (changes[0].type === 'replace') {\n updatedElements.push({ ...changes[0].item });\n continue;\n }\n /**\n * For other types of changes, we want to start with a shallow copy of the\n * object so React knows this element has changed. Sequential changes will\n * each _mutate_ this object, so there's only ever one copy.\n */\n const updatedElement = { ...element };\n for (const change of changes) {\n applyChange(change, updatedElement);\n }\n updatedElements.push(updatedElement);\n }\n /*\n * we need to wait for all changes to be applied before adding new items\n * to be able to add them at the correct index\n */\n if (addItemChanges.length) {\n addItemChanges.forEach((change) => {\n if (change.index !== undefined) {\n updatedElements.splice(change.index, 0, { ...change.item });\n }\n else {\n updatedElements.push({ ...change.item });\n }\n });\n }\n return updatedElements;\n}\n// Applies a single change to an element. This is a *mutable* update.\nfunction applyChange(change, element) {\n switch (change.type) {\n case 'select': {\n element.selected = change.selected;\n break;\n }\n case 'position': {\n if (typeof change.position !== 'undefined') {\n element.position = change.position;\n }\n if (typeof change.dragging !== 'undefined') {\n element.dragging = change.dragging;\n }\n break;\n }\n case 'dimensions': {\n if (typeof change.dimensions !== 'undefined') {\n element.measured = {\n ...change.dimensions,\n };\n if (change.setAttributes) {\n if (change.setAttributes === true || change.setAttributes === 'width') {\n element.width = change.dimensions.width;\n }\n if (change.setAttributes === true || change.setAttributes === 'height') {\n element.height = change.dimensions.height;\n }\n }\n }\n if (typeof change.resizing === 'boolean') {\n element.resizing = change.resizing;\n }\n break;\n }\n }\n}\n/**\n * Drop in function that applies node changes to an array of nodes.\n * @public\n * @param changes - Array of changes to apply.\n * @param nodes - Array of nodes to apply the changes to.\n * @returns Array of updated nodes.\n * @example\n *```tsx\n *import { useState, useCallback } from 'react';\n *import { ReactFlow, applyNodeChanges, type Node, type Edge, type OnNodesChange } from '@xyflow/react';\n *\n *export default function Flow() {\n * const [nodes, setNodes] = useState<Node[]>([]);\n * const [edges, setEdges] = useState<Edge[]>([]);\n * const onNodesChange: OnNodesChange = useCallback(\n * (changes) => {\n * setNodes((oldNodes) => applyNodeChanges(changes, oldNodes));\n * },\n * [setNodes],\n * );\n *\n * return (\n * <ReactFlow nodes={nodes} edges={edges} onNodesChange={onNodesChange} />\n * );\n *}\n *```\n * @remarks Various events on the <ReactFlow /> component can produce an {@link NodeChange}\n * that describes how to update the edges of your flow in some way.\n * If you don't need any custom behaviour, this util can be used to take an array\n * of these changes and apply them to your edges.\n */\nfunction applyNodeChanges(changes, nodes) {\n return applyChanges(changes, nodes);\n}\n/**\n * Drop in function that applies edge changes to an array of edges.\n * @public\n * @param changes - Array of changes to apply.\n * @param edges - Array of edge to apply the changes to.\n * @returns Array of updated edges.\n * @example\n * ```tsx\n *import { useState, useCallback } from 'react';\n *import { ReactFlow, applyEdgeChanges } from '@xyflow/react';\n *\n *export default function Flow() {\n * const [nodes, setNodes] = useState([]);\n * const [edges, setEdges] = useState([]);\n * const onEdgesChange = useCallback(\n * (changes) => {\n * setEdges((oldEdges) => applyEdgeChanges(changes, oldEdges));\n * },\n * [setEdges],\n * );\n *\n * return (\n * <ReactFlow nodes={nodes} edges={edges} onEdgesChange={onEdgesChange} />\n * );\n *}\n *```\n * @remarks Various events on the <ReactFlow /> component can produce an {@link EdgeChange}\n * that describes how to update the edges of your flow in some way.\n * If you don't need any custom behaviour, this util can be used to take an array\n * of these changes and apply them to your edges.\n */\nfunction applyEdgeChanges(changes, edges) {\n return applyChanges(changes, edges);\n}\nfunction createSelectionChange(id, selected) {\n return {\n id,\n type: 'select',\n selected,\n };\n}\nfunction getSelectionChanges(items, selectedIds = new Set(), mutateItem = false) {\n const changes = [];\n for (const [id, item] of items) {\n const willBeSelected = selectedIds.has(id);\n // we don't want to set all items to selected=false on the first selection\n if (!(item.selected === undefined && !willBeSelected) && item.selected !== willBeSelected) {\n if (mutateItem) {\n /*\n * this hack is needed for nodes. When the user dragged a node, it's selected.\n * When another node gets dragged, we need to deselect the previous one,\n * in order to have only one selected node at a time - the onNodesChange callback comes too late here :/\n */\n item.selected = willBeSelected;\n }\n changes.push(createSelectionChange(item.id, willBeSelected));\n }\n }\n return changes;\n}\nfunction getElementsDiffChanges({ items = [], lookup, }) {\n const changes = [];\n const itemsLookup = new Map(items.map((item) => [item.id, item]));\n for (const [index, item] of items.entries()) {\n const lookupItem = lookup.get(item.id);\n const storeItem = lookupItem?.internals?.userNode ?? lookupItem;\n if (storeItem !== undefined && storeItem !== item) {\n changes.push({ id: item.id, item: item, type: 'replace' });\n }\n if (storeItem === undefined) {\n changes.push({ item: item, type: 'add', index });\n }\n }\n for (const [id] of lookup) {\n const nextNode = itemsLookup.get(id);\n if (nextNode === undefined) {\n changes.push({ id, type: 'remove' });\n }\n }\n return changes;\n}\nfunction elementToRemoveChange(item) {\n return {\n id: item.id,\n type: 'remove',\n };\n}\n\nconst defaultOnError = createDevWarn('React Flow', 'https://reactflow.dev/');\nfunction addEdge(edgeParams, edges, options = {}) {\n return addEdge$1(edgeParams, edges, {\n ...options,\n onError: options.onError ?? defaultOnError,\n });\n}\nfunction reconnectEdge(oldEdge, newConnection, edges, options = { shouldReplaceId: true }) {\n return reconnectEdge$1(oldEdge, newConnection, edges, {\n ...options,\n onError: options.onError ?? defaultOnError,\n });\n}\n\n/**\n * Test whether an object is usable as an [`Node`](/api-reference/types/node).\n * In TypeScript this is a type guard that will narrow the type of whatever you pass in to\n * [`Node`](/api-reference/types/node) if it returns `true`.\n *\n * @public\n * @remarks In TypeScript this is a type guard that will narrow the type of whatever you pass in to Node if it returns true\n * @param element - The element to test.\n * @returns Tests whether the provided value can be used as a `Node`. If you're using TypeScript,\n * this function acts as a type guard and will narrow the type of the value to `Node` if it returns\n * `true`.\n *\n * @example\n * ```js\n *import { isNode } from '@xyflow/react';\n *\n *if (isNode(node)) {\n * // ...\n *}\n *```\n */\nconst isNode = (element) => isNodeBase(element);\n/**\n * Test whether an object is usable as an [`Edge`](/api-reference/types/edge).\n * In TypeScript this is a type guard that will narrow the type of whatever you pass in to\n * [`Edge`](/api-reference/types/edge) if it returns `true`.\n *\n * @public\n * @remarks In TypeScript this is a type guard that will narrow the type of whatever you pass in to Edge if it returns true\n * @param element - The element to test\n * @returns Tests whether the provided value can be used as an `Edge`. If you're using TypeScript,\n * this function acts as a type guard and will narrow the type of the value to `Edge` if it returns\n * `true`.\n *\n * @example\n * ```js\n *import { isEdge } from '@xyflow/react';\n *\n *if (isEdge(edge)) {\n * // ...\n *}\n *```\n */\nconst isEdge = (element) => isEdgeBase(element);\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nfunction fixedForwardRef(render) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return forwardRef(render);\n}\n\n// we need this hook to prevent a warning when using react-flow in SSR\nconst useIsomorphicLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect;\n\n/**\n * This hook returns a queue that can be used to batch updates.\n *\n * @param runQueue - a function that gets called when the queue is flushed\n * @internal\n *\n * @returns a Queue object\n */\nfunction useQueue(runQueue) {\n /*\n * Because we're using a ref above, we need some way to let React know when to\n * actually process the queue. We increment this number any time we mutate the\n * queue, creating a new state to trigger the layout effect below.\n * Using a boolean dirty flag here instead would lead to issues related to\n * automatic batching. (https://github.com/xyflow/xyflow/issues/4779)\n */\n const [serial, setSerial] = useState(BigInt(0));\n /*\n * A reference of all the batched updates to process before the next render. We\n * want a reference here so multiple synchronous calls to `setNodes` etc can be\n * batched together.\n */\n const [queue] = useState(() => createQueue(() => setSerial(n => n + BigInt(1))));\n /*\n * Layout effects are guaranteed to run before the next render which means we\n * shouldn't run into any issues with stale state or weird issues that come from\n * rendering things one frame later than expected (we used to use `setTimeout`).\n */\n useIsomorphicLayoutEffect(() => {\n const queueItems = queue.get();\n if (queueItems.length) {\n runQueue(queueItems);\n queue.reset();\n }\n }, [serial]);\n return queue;\n}\nfunction createQueue(cb) {\n let queue = [];\n return {\n get: () => queue,\n reset: () => {\n queue = [];\n },\n push: (item) => {\n queue.push(item);\n cb();\n },\n };\n}\n\nconst BatchContext = createContext(null);\n/**\n * This is a context provider that holds and processes the node and edge update queues\n * that are needed to handle setNodes, addNodes, setEdges and addEdges.\n *\n * @internal\n */\nfunction BatchProvider({ children, }) {\n const store = useStoreApi();\n const nodeQueueHandler = useCallback((queueItems) => {\n const { nodes = [], setNodes, hasDefaultNodes, onNodesChange, nodeLookup, fitViewQueued, onNodesChangeMiddlewareMap, } = store.getState();\n /*\n * This is essentially an `Array.reduce` in imperative clothing. Processing\n * this queue is a relatively hot path so we'd like to avoid the overhead of\n * array methods where we can.\n */\n let next = nodes;\n for (const payload of queueItems) {\n next = typeof payload === 'function' ? payload(next) : payload;\n }\n let changes = getElementsDiffChanges({\n items: next,\n lookup: nodeLookup,\n });\n for (const middleware of onNodesChangeMiddlewareMap.values()) {\n changes = middleware(changes);\n }\n if (hasDefaultNodes) {\n setNodes(next);\n }\n // We only want to fire onNodesChange if there are changes to the nodes\n if (changes.length > 0) {\n onNodesChange?.(changes);\n }\n else if (fitViewQueued) {\n // If there are no changes to the nodes, we still need to call setNodes\n // to trigger a re-render and fitView.\n window.requestAnimationFrame(() => {\n const { fitViewQueued, nodes, setNodes } = store.getState();\n if (fitViewQueued) {\n setNodes(nodes);\n }\n });\n }\n }, []);\n const nodeQueue = useQueue(nodeQueueHandler);\n const edgeQueueHandler = useCallback((queueItems) => {\n const { edges = [], setEdges, hasDefaultEdges, onEdgesChange, edgeLookup } = store.getState();\n let next = edges;\n for (const payload of queueItems) {\n next = typeof payload === 'function' ? payload(next) : payload;\n }\n if (hasDefaultEdges) {\n setEdges(next);\n }\n else if (onEdgesChange) {\n onEdgesChange(getElementsDiffChanges({\n items: next,\n lookup: edgeLookup,\n }));\n }\n }, []);\n const edgeQueue = useQueue(edgeQueueHandler);\n const value = useMemo(() => ({ nodeQueue, edgeQueue }), []);\n return jsx(BatchContext.Provider, { value: value, children: children });\n}\nfunction useBatchContext() {\n const batchContext = useContext(BatchContext);\n if (!batchContext) {\n throw new Error('useBatchContext must be used within a BatchProvider');\n }\n return batchContext;\n}\n\nconst selector$j = (s) => !!s.panZoom;\n/**\n * This hook returns a ReactFlowInstance that can be used to update nodes and edges, manipulate the viewport, or query the current state of the flow.\n *\n * @public\n * @example\n * ```jsx\n *import { useCallback, useState } from 'react';\n *import { useReactFlow } from '@xyflow/react';\n *\n *export function NodeCounter() {\n * const reactFlow = useReactFlow();\n * const [count, setCount] = useState(0);\n * const countNodes = useCallback(() => {\n * setCount(reactFlow.getNodes().length);\n * // you need to pass it as a dependency if you are using it with useEffect or useCallback\n * // because at the first render, it's not initialized yet and some functions might not work.\n * }, [reactFlow]);\n *\n * return (\n * <div>\n * <button onClick={countNodes}>Update count</button>\n * <p>There are {count} nodes in the flow.</p>\n * </div>\n * );\n *}\n *```\n */\nfunction useReactFlow() {\n const viewportHelper = useViewportHelper();\n const store = useStoreApi();\n const batchContext = useBatchContext();\n const viewportInitialized = useStore(selector$j);\n const generalHelper = useMemo(() => {\n const getInternalNode = (id) => store.getState().nodeLookup.get(id);\n const setNodes = (payload) => {\n batchContext.nodeQueue.push(payload);\n };\n const setEdges = (payload) => {\n batchContext.edgeQueue.push(payload);\n };\n const getNodeRect = (node) => {\n const { nodeLookup, nodeOrigin } = store.getState();\n const nodeToUse = isNode(node) ? node : nodeLookup.get(node.id);\n const position = nodeToUse.parentId\n ? evaluateAbsolutePosition(nodeToUse.position, nodeToUse.measured, nodeToUse.parentId, nodeLookup, nodeOrigin)\n : nodeToUse.position;\n const nodeWithPosition = {\n ...nodeToUse,\n position,\n width: nodeToUse.measured?.width ?? nodeToUse.width,\n height: nodeToUse.measured?.height ?? nodeToUse.height,\n };\n return nodeToRect(nodeWithPosition);\n };\n const updateNode = (id, nodeUpdate, options = { replace: false }) => {\n setNodes((prevNodes) => prevNodes.map((node) => {\n if (node.id === id) {\n const nextNode = typeof nodeUpdate === 'function' ? nodeUpdate(node) : nodeUpdate;\n return options.replace && isNode(nextNode) ? nextNode : { ...node, ...nextNode };\n }\n return node;\n }));\n };\n const updateEdge = (id, edgeUpdate, options = { replace: false }) => {\n setEdges((prevEdges) => prevEdges.map((edge) => {\n if (edge.id === id) {\n const nextEdge = typeof edgeUpdate === 'function' ? edgeUpdate(edge) : edgeUpdate;\n return options.replace && isEdge(nextEdge) ? nextEdge : { ...edge, ...nextEdge };\n }\n return edge;\n }));\n };\n return {\n getNodes: () => store.getState().nodes.map((n) => ({ ...n })),\n getNode: (id) => getInternalNode(id)?.internals.userNode,\n getInternalNode,\n getEdges: () => {\n const { edges = [] } = store.getState();\n return edges.map((e) => ({ ...e }));\n },\n getEdge: (id) => store.getState().edgeLookup.get(id),\n setNodes,\n setEdges,\n addNodes: (payload) => {\n const newNodes = Array.isArray(payload) ? payload : [payload];\n batchContext.nodeQueue.push((nodes) => [...nodes, ...newNodes]);\n },\n addEdges: (payload) => {\n const newEdges = Array.isArray(payload) ? payload : [payload];\n batchContext.edgeQueue.push((edges) => [...edges, ...newEdges]);\n },\n toObject: () => {\n const { nodes = [], edges = [], transform } = store.getState();\n const [x, y, zoom] = transform;\n return {\n nodes: nodes.map((n) => ({ ...n })),\n edges: edges.map((e) => ({ ...e })),\n viewport: {\n x,\n y,\n zoom,\n },\n };\n },\n deleteElements: async ({ nodes: nodesToRemove = [], edges: edgesToRemove = [] }) => {\n const { nodes, edges, onNodesDelete, onEdgesDelete, triggerNodeChanges, triggerEdgeChanges, onDelete, onBeforeDelete, } = store.getState();\n const { nodes: matchingNodes, edges: matchingEdges } = await getElementsToRemove({\n nodesToRemove,\n edgesToRemove,\n nodes,\n edges,\n onBeforeDelete,\n });\n const hasMatchingEdges = matchingEdges.length > 0;\n const hasMatchingNodes = matchingNodes.length > 0;\n if (hasMatchingEdges) {\n const edgeChanges = matchingEdges.map(elementToRemoveChange);\n onEdgesDelete?.(matchingEdges);\n triggerEdgeChanges(edgeChanges);\n }\n if (hasMatchingNodes) {\n const nodeChanges = matchingNodes.map(elementToRemoveChange);\n onNodesDelete?.(matchingNodes);\n triggerNodeChanges(nodeChanges);\n }\n if (hasMatchingNodes || hasMatchingEdges) {\n onDelete?.({ nodes: matchingNodes, edges: matchingEdges });\n }\n return { deletedNodes: matchingNodes, deletedEdges: matchingEdges };\n },\n /**\n * Partial is defined as \"the 2 nodes/areas are intersecting partially\".\n * If a is contained in b or b is contained in a, they are both\n * considered fully intersecting.\n */\n getIntersectingNodes: (nodeOrRect, partially = true, nodes) => {\n const isRect = isRectObject(nodeOrRect);\n const nodeRect = isRect ? nodeOrRect : getNodeRect(nodeOrRect);\n const hasNodesOption = nodes !== undefined;\n if (!nodeRect) {\n return [];\n }\n return (nodes || store.getState().nodes).filter((n) => {\n const internalNode = store.getState().nodeLookup.get(n.id);\n if (internalNode && !isRect && (n.id === nodeOrRect.id || !internalNode.internals.positionAbsolute)) {\n return false;\n }\n const currNodeRect = nodeToRect(hasNodesOption ? n : internalNode);\n const overlappingArea = getOverlappingArea(currNodeRect, nodeRect);\n const partiallyVisible = partially && overlappingArea > 0;\n return (partiallyVisible ||\n overlappingArea >= currNodeRect.width * currNodeRect.height ||\n overlappingArea >= nodeRect.width * nodeRect.height);\n });\n },\n isNodeIntersecting: (nodeOrRect, area, partially = true) => {\n const isRect = isRectObject(nodeOrRect);\n const nodeRect = isRect ? nodeOrRect : getNodeRect(nodeOrRect);\n if (!nodeRect) {\n return false;\n }\n const overlappingArea = getOverlappingArea(nodeRect, area);\n const partiallyVisible = partially && overlappingArea > 0;\n return (partiallyVisible ||\n overlappingArea >= area.width * area.height ||\n overlappingArea >= nodeRect.width * nodeRect.height);\n },\n updateNode,\n updateNodeData: (id, dataUpdate, options = { replace: false }) => {\n updateNode(id, (node) => {\n const nextData = typeof dataUpdate === 'function' ? dataUpdate(node) : dataUpdate;\n return options.replace ? { ...node, data: nextData } : { ...node, data: { ...node.data, ...nextData } };\n }, options);\n },\n updateEdge,\n updateEdgeData: (id, dataUpdate, options = { replace: false }) => {\n updateEdge(id, (edge) => {\n const nextData = typeof dataUpdate === 'function' ? dataUpdate(edge) : dataUpdate;\n return options.replace ? { ...edge, data: nextData } : { ...edge, data: { ...edge.data, ...nextData } };\n }, options);\n },\n getNodesBounds: (nodes) => {\n const { nodeLookup, nodeOrigin } = store.getState();\n return getNodesBounds(nodes, { nodeLookup, nodeOrigin });\n },\n getHandleConnections: ({ type, id, nodeId }) => Array.from(store\n .getState()\n .connectionLookup.get(`${nodeId}-${type}${id ? `-${id}` : ''}`)\n ?.values() ?? []),\n getNodeConnections: ({ type, handleId, nodeId }) => Array.from(store\n .getState()\n .connectionLookup.get(`${nodeId}${type ? (handleId ? `-${type}-${handleId}` : `-${type}`) : ''}`)\n ?.values() ?? []),\n fitView: async (options) => {\n // We either create a new Promise or reuse the existing one\n // Even if fitView is called multiple times in a row, we only end up with a single Promise\n const fitViewResolver = store.getState().fitViewResolver ?? withResolvers();\n // We schedule a fitView by setting fitViewQueued and triggering a setNodes\n store.setState({ fitViewQueued: true, fitViewOptions: options, fitViewResolver });\n batchContext.nodeQueue.push((nodes) => [...nodes]);\n return fitViewResolver.promise;\n },\n };\n }, []);\n return useMemo(() => {\n return {\n ...generalHelper,\n ...viewportHelper,\n viewportInitialized,\n };\n }, [viewportInitialized]);\n}\n\nconst selected = (item) => item.selected;\nconst win$1 = typeof window !== 'undefined' ? window : undefined;\n/**\n * Hook for handling global key events.\n *\n * @internal\n */\nfunction useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode, }) {\n const store = useStoreApi();\n const { deleteElements } = useReactFlow();\n const deleteKeyPressed = useKeyPress(deleteKeyCode, { actInsideInputWithModifier: false });\n const multiSelectionKeyPressed = useKeyPress(multiSelectionKeyCode, { target: win$1 });\n useEffect(() => {\n if (deleteKeyPressed) {\n const { edges, nodes } = store.getState();\n deleteElements({ nodes: nodes.filter(selected), edges: edges.filter(selected) });\n store.setState({ nodesSelectionActive: false });\n }\n }, [deleteKeyPressed]);\n useEffect(() => {\n store.setState({ multiSelectionActive: multiSelectionKeyPressed });\n }, [multiSelectionKeyPressed]);\n}\n\n/**\n * Hook for handling resize events.\n *\n * @internal\n */\nfunction useResizeHandler(domNode) {\n const store = useStoreApi();\n useEffect(() => {\n const updateDimensions = () => {\n if (!domNode.current || !(domNode.current.checkVisibility?.() ?? true)) {\n return false;\n }\n const size = getDimensions(domNode.current);\n if (size.height === 0 || size.width === 0) {\n store.getState().onError?.('004', errorMessages['error004']());\n }\n store.setState({ width: size.width || 500, height: size.height || 500 });\n };\n if (domNode.current) {\n updateDimensions();\n window.addEventListener('resize', updateDimensions);\n const resizeObserver = new ResizeObserver(() => updateDimensions());\n resizeObserver.observe(domNode.current);\n return () => {\n window.removeEventListener('resize', updateDimensions);\n if (resizeObserver && domNode.current) {\n resizeObserver.unobserve(domNode.current);\n }\n };\n }\n }, []);\n}\n\nconst containerStyle = {\n position: 'absolute',\n width: '100%',\n height: '100%',\n top: 0,\n left: 0,\n};\n\nconst selector$i = (s) => ({\n userSelectionActive: s.userSelectionActive,\n lib: s.lib,\n connectionInProgress: s.connection.inProgress,\n});\nfunction ZoomPane({ onPaneContextMenu, zoomOnScroll = true, zoomOnPinch = true, panOnScroll = false, panActivationKeyPressed, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.Free, zoomOnDoubleClick = true, panOnDrag = true, defaultViewport, translateExtent, minZoom, maxZoom, zoomActivationKeyCode, preventScrolling = true, children, noWheelClassName, noPanClassName, onViewportChange, isControlledViewport, paneClickDistance, selectionOnDrag, }) {\n const store = useStoreApi();\n const zoomPane = useRef(null);\n const { userSelectionActive, lib, connectionInProgress } = useStore(selector$i, shallow);\n const zoomActivationKeyPressed = useKeyPress(zoomActivationKeyCode);\n const panZoom = useRef();\n useResizeHandler(zoomPane);\n const onTransformChange = useCallback((transform) => {\n onViewportChange?.({ x: transform[0], y: transform[1], zoom: transform[2] });\n if (!isControlledViewport) {\n store.setState({ transform });\n }\n }, [onViewportChange, isControlledViewport]);\n useEffect(() => {\n if (zoomPane.current) {\n panZoom.current = XYPanZoom({\n domNode: zoomPane.current,\n minZoom,\n maxZoom,\n translateExtent,\n viewport: defaultViewport,\n onDraggingChange: (paneDragging) => store.setState((prevState) => (prevState.paneDragging === paneDragging ? prevState : { paneDragging })),\n onPanZoomStart: (event, vp) => {\n const { onViewportChangeStart, onMoveStart } = store.getState();\n onMoveStart?.(event, vp);\n onViewportChangeStart?.(vp);\n },\n onPanZoom: (event, vp) => {\n const { onViewportChange, onMove } = store.getState();\n onMove?.(event, vp);\n onViewportChange?.(vp);\n },\n onPanZoomEnd: (event, vp) => {\n const { onViewportChangeEnd, onMoveEnd } = store.getState();\n onMoveEnd?.(event, vp);\n onViewportChangeEnd?.(vp);\n },\n });\n const { x, y, zoom } = panZoom.current.getViewport();\n store.setState({\n panZoom: panZoom.current,\n transform: [x, y, zoom],\n domNode: zoomPane.current.closest('.react-flow'),\n });\n return () => {\n panZoom.current?.destroy();\n };\n }\n }, []);\n useEffect(() => {\n panZoom.current?.update({\n onPaneContextMenu,\n zoomOnScroll,\n zoomOnPinch,\n panOnScroll,\n panActivationKeyPressed,\n panOnScrollSpeed,\n panOnScrollMode,\n zoomOnDoubleClick,\n panOnDrag,\n zoomActivationKeyPressed,\n preventScrolling,\n noPanClassName,\n userSelectionActive,\n noWheelClassName,\n lib,\n onTransformChange,\n connectionInProgress,\n selectionOnDrag,\n paneClickDistance,\n });\n }, [\n onPaneContextMenu,\n zoomOnScroll,\n zoomOnPinch,\n panOnScroll,\n panActivationKeyPressed,\n panOnScrollSpeed,\n panOnScrollMode,\n zoomOnDoubleClick,\n panOnDrag,\n zoomActivationKeyPressed,\n preventScrolling,\n noPanClassName,\n userSelectionActive,\n noWheelClassName,\n lib,\n onTransformChange,\n connectionInProgress,\n selectionOnDrag,\n paneClickDistance,\n ]);\n return (jsx(\"div\", { className: \"react-flow__renderer\", ref: zoomPane, style: containerStyle, children: children }));\n}\n\nconst selector$h = (s) => ({\n userSelectionActive: s.userSelectionActive,\n userSelectionRect: s.userSelectionRect,\n});\nfunction UserSelection() {\n const { userSelectionActive, userSelectionRect } = useStore(selector$h, shallow);\n const isActive = userSelectionActive && userSelectionRect;\n if (!isActive) {\n return null;\n }\n return (jsx(\"div\", { className: \"react-flow__selection react-flow__container\", style: {\n width: userSelectionRect.width,\n height: userSelectionRect.height,\n transform: `translate(${userSelectionRect.x}px, ${userSelectionRect.y}px)`,\n } }));\n}\n\nconst wrapHandler = (handler, containerRef) => {\n return (event) => {\n if (event.target !== containerRef.current) {\n return;\n }\n handler?.(event);\n };\n};\nconst selector$g = (s) => ({\n userSelectionActive: s.userSelectionActive,\n elementsSelectable: s.elementsSelectable,\n dragging: s.paneDragging,\n panBy: s.panBy,\n autoPanSpeed: s.autoPanSpeed,\n});\nfunction Pane({ isSelecting, selectionKeyPressed, selectionMode = SelectionMode.Full, panOnDrag, autoPanOnSelection, paneClickDistance, selectionOnDrag, onSelectionStart, onSelectionEnd, onPaneClick, onPaneContextMenu, onPaneScroll, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, children, }) {\n const autoPanId = useRef(0);\n const store = useStoreApi();\n const { userSelectionActive, elementsSelectable, dragging, panBy, autoPanSpeed } = useStore(selector$g, shallow);\n const isSelectionEnabled = elementsSelectable && (isSelecting || userSelectionActive);\n const container = useRef(null);\n const containerBounds = useRef();\n const selectedNodeIds = useRef(new Set());\n const selectedEdgeIds = useRef(new Set());\n const connectionEndedOnPane = useRef(false);\n // Used to prevent click events when the user lets go of the selectionKey during a selection\n const selectionInProgress = useRef(false);\n // Used for auto pan when approaching the edges of the container during selection\n const position = useRef({ x: 0, y: 0 });\n const autoPanStarted = useRef(false);\n const onClick = (event) => {\n // We prevent click events when the user let go of the selectionKey during a selection\n // We also prevent click events when a connection is in progress\n if (selectionInProgress.current || connectionEndedOnPane.current || store.getState().connection.inProgress) {\n selectionInProgress.current = false;\n connectionEndedOnPane.current = false;\n return;\n }\n onPaneClick?.(event);\n store.getState().resetSelectedElements();\n store.setState({ nodesSelectionActive: false });\n };\n const onContextMenu = (event) => {\n if (Array.isArray(panOnDrag) && panOnDrag?.includes(2)) {\n event.preventDefault();\n return;\n }\n onPaneContextMenu?.(event);\n };\n const onWheel = onPaneScroll ? (event) => onPaneScroll(event) : undefined;\n const onClickCapture = (event) => {\n if (selectionInProgress.current) {\n event.stopPropagation();\n selectionInProgress.current = false;\n }\n };\n // We are using capture here in order to prevent other pointer events\n // to be able to create a selection above a node or an edge\n const onPointerDownCapture = (event) => {\n // Mouse button arrays only restrict mouse input. Let touch panning handle this gesture\n // unless the user explicitly activated selection with the selection key.\n if (event.pointerType === 'touch' && panOnDrag !== false && !selectionKeyPressed) {\n return;\n }\n const { domNode, transform } = store.getState();\n containerBounds.current = domNode?.getBoundingClientRect();\n if (!containerBounds.current)\n return;\n const eventTargetIsContainer = event.target === container.current;\n // if a child element has the 'nokey' class, we don't want to swallow the event and don't start a selection\n const isNoKeyEvent = !eventTargetIsContainer && !!event.target.closest('.nokey');\n const isSelectionActive = (selectionOnDrag && eventTargetIsContainer) || selectionKeyPressed;\n if (isNoKeyEvent || !isSelecting || !isSelectionActive || event.button !== 0 || !event.isPrimary) {\n return;\n }\n event.target?.setPointerCapture?.(event.pointerId);\n selectionInProgress.current = false;\n const { x, y } = getEventPosition(event.nativeEvent, containerBounds.current);\n const userSelectionStartPosition = pointToRendererPoint({ x, y }, transform);\n store.setState({\n userSelectionRect: {\n width: 0,\n height: 0,\n startX: userSelectionStartPosition.x,\n startY: userSelectionStartPosition.y,\n x,\n y,\n },\n });\n if (!eventTargetIsContainer) {\n event.stopPropagation();\n event.preventDefault();\n }\n };\n // We commit the user selection rectangle to the store on auto-panning or pointer move during selection.\n function commitUserSelectionRect(mouseX, mouseY) {\n const { userSelectionRect } = store.getState();\n if (!userSelectionRect) {\n return;\n }\n const { transform, nodeLookup, edgeLookup, connectionLookup, triggerNodeChanges, triggerEdgeChanges, defaultEdgeOptions, } = store.getState();\n const userStartPosition = { x: userSelectionRect.startX, y: userSelectionRect.startY };\n const { x: screenStartX, y: screenStartY } = rendererPointToPoint(userStartPosition, transform);\n // This has to be in screen coordinates, not in flow coordinates.\n // We store the selection rectangle in userSelectionStartPosition coordinates to be able to\n // fix the start position of the selection rectangle when we are auto-panning.\n const nextUserSelectRect = {\n startX: userStartPosition.x,\n startY: userStartPosition.y,\n x: mouseX < screenStartX ? mouseX : screenStartX,\n y: mouseY < screenStartY ? mouseY : screenStartY,\n width: Math.abs(mouseX - screenStartX),\n height: Math.abs(mouseY - screenStartY),\n };\n const prevSelectedNodeIds = selectedNodeIds.current;\n const prevSelectedEdgeIds = selectedEdgeIds.current;\n selectedNodeIds.current = new Set(getNodesInside(nodeLookup, nextUserSelectRect, transform, selectionMode === SelectionMode.Partial, true).map((node) => node.id));\n selectedEdgeIds.current = new Set();\n const edgesSelectable = defaultEdgeOptions?.selectable ?? true;\n // We look for all edges connected to the selected nodes\n for (const nodeId of selectedNodeIds.current) {\n const connections = connectionLookup.get(nodeId);\n if (!connections)\n continue;\n for (const { edgeId } of connections.values()) {\n const edge = edgeLookup.get(edgeId);\n if (edge && (edge.selectable ?? edgesSelectable)) {\n selectedEdgeIds.current.add(edgeId);\n }\n }\n }\n if (!areSetsEqual(prevSelectedNodeIds, selectedNodeIds.current)) {\n const changes = getSelectionChanges(nodeLookup, selectedNodeIds.current, true);\n triggerNodeChanges(changes);\n }\n if (!areSetsEqual(prevSelectedEdgeIds, selectedEdgeIds.current)) {\n const changes = getSelectionChanges(edgeLookup, selectedEdgeIds.current);\n triggerEdgeChanges(changes);\n }\n store.setState({\n userSelectionRect: nextUserSelectRect,\n userSelectionActive: true,\n nodesSelectionActive: false,\n });\n }\n function autoPan() {\n if (!autoPanOnSelection || !containerBounds.current) {\n return;\n }\n const [x, y] = calcAutoPan(position.current, containerBounds.current, autoPanSpeed);\n panBy({ x, y }).then((panned) => {\n if (!selectionInProgress.current || !panned) {\n autoPanId.current = requestAnimationFrame(autoPan);\n return;\n }\n const { x: mx, y: my } = position.current;\n commitUserSelectionRect(mx, my);\n autoPanId.current = requestAnimationFrame(autoPan);\n });\n }\n const cleanupAutoPan = () => {\n cancelAnimationFrame(autoPanId.current);\n autoPanId.current = 0;\n autoPanStarted.current = false;\n };\n useEffect(() => {\n return () => cleanupAutoPan();\n }, []);\n const onPointerMove = (event) => {\n const { userSelectionRect, transform, resetSelectedElements } = store.getState();\n if (!containerBounds.current || !userSelectionRect) {\n return;\n }\n const { x: mouseX, y: mouseY } = getEventPosition(event.nativeEvent, containerBounds.current);\n position.current = { x: mouseX, y: mouseY };\n const screenStart = rendererPointToPoint({ x: userSelectionRect.startX, y: userSelectionRect.startY }, transform);\n if (!selectionInProgress.current) {\n const requiredDistance = selectionKeyPressed ? 0 : paneClickDistance;\n const distance = Math.hypot(mouseX - screenStart.x, mouseY - screenStart.y);\n if (distance <= requiredDistance) {\n return;\n }\n resetSelectedElements();\n onSelectionStart?.(event);\n }\n selectionInProgress.current = true;\n if (!autoPanStarted.current) {\n autoPan();\n autoPanStarted.current = true;\n }\n commitUserSelectionRect(mouseX, mouseY);\n };\n const onPointerUp = (event) => {\n if (!isSelectionEnabled) {\n if (event.target === container.current && store.getState().connection.inProgress) {\n connectionEndedOnPane.current = true;\n }\n return;\n }\n if (event.button !== 0) {\n return;\n }\n event.target?.releasePointerCapture?.(event.pointerId);\n /*\n * We only want to trigger click functions when in selection mode if\n * the user did not move the mouse.\n */\n if (!userSelectionActive && event.target === container.current && store.getState().userSelectionRect) {\n onClick?.(event);\n }\n store.setState({\n userSelectionActive: false,\n userSelectionRect: null,\n });\n if (selectionInProgress.current) {\n onSelectionEnd?.(event);\n store.setState({\n nodesSelectionActive: selectedNodeIds.current.size > 0,\n });\n }\n cleanupAutoPan();\n };\n const onPointerCancel = (event) => {\n event.target?.releasePointerCapture?.(event.pointerId);\n cleanupAutoPan();\n };\n const draggable = panOnDrag === true || (Array.isArray(panOnDrag) && panOnDrag.includes(0));\n return (jsxs(\"div\", { className: cc(['react-flow__pane', { draggable, dragging, selection: isSelecting }]), onClick: isSelectionEnabled ? undefined : wrapHandler(onClick, container), onContextMenu: wrapHandler(onContextMenu, container), onWheel: wrapHandler(onWheel, container), onPointerEnter: isSelectionEnabled ? undefined : onPaneMouseEnter, onPointerMove: isSelectionEnabled ? onPointerMove : onPaneMouseMove, onPointerUp: onPointerUp, onPointerCancel: isSelectionEnabled ? onPointerCancel : undefined, onPointerDownCapture: isSelectionEnabled ? onPointerDownCapture : undefined, onClickCapture: isSelectionEnabled ? onClickCapture : undefined, onPointerLeave: onPaneMouseLeave, ref: container, style: containerStyle, children: [children, jsx(UserSelection, {})] }));\n}\n\n/*\n * this handler is called by\n * 1. the click handler when node is not draggable or selectNodesOnDrag = false\n * or\n * 2. the on drag start handler when node is draggable and selectNodesOnDrag = true\n */\nfunction handleNodeClick({ id, store, unselect = false, nodeRef, }) {\n const { addSelectedNodes, unselectNodesAndEdges, multiSelectionActive, nodeLookup, onError } = store.getState();\n const node = nodeLookup.get(id);\n if (!node) {\n onError?.('012', errorMessages['error012'](id));\n return;\n }\n store.setState({ nodesSelectionActive: false });\n if (!node.selected) {\n addSelectedNodes([id]);\n }\n else if (unselect || (node.selected && multiSelectionActive)) {\n unselectNodesAndEdges({ nodes: [node], edges: [] });\n requestAnimationFrame(() => nodeRef?.current?.blur());\n }\n}\n\n/**\n * Hook for calling XYDrag helper from @xyflow/system.\n *\n * @internal\n */\nfunction useDrag({ nodeRef, disabled = false, noDragClassName, handleSelector, nodeId, isSelectable, nodeClickDistance, }) {\n const store = useStoreApi();\n const [dragging, setDragging] = useState(false);\n const xyDrag = useRef();\n useEffect(() => {\n if (disabled) {\n return;\n }\n xyDrag.current = XYDrag({\n getStoreItems: () => store.getState(),\n onNodeMouseDown: (id) => {\n handleNodeClick({\n id,\n store,\n nodeRef,\n });\n },\n onDragStart: () => {\n setDragging(true);\n },\n onDragStop: () => {\n setDragging(false);\n },\n });\n return () => {\n xyDrag.current?.destroy();\n xyDrag.current = undefined;\n };\n }, [disabled, store, nodeRef]);\n useEffect(() => {\n if (disabled || !nodeRef.current || !xyDrag.current) {\n return;\n }\n xyDrag.current.update({\n noDragClassName,\n handleSelector,\n domNode: nodeRef.current,\n isSelectable,\n nodeId,\n nodeClickDistance,\n });\n }, [noDragClassName, handleSelector, disabled, isSelectable, nodeRef, nodeId, nodeClickDistance]);\n return dragging;\n}\n\nconst selectedAndDraggable = (nodesDraggable) => (n) => n.selected && (n.draggable || (nodesDraggable && typeof n.draggable === 'undefined'));\n/**\n * Hook for updating node positions by passing a direction and factor\n *\n * @internal\n * @returns function for updating node positions\n */\nfunction useMoveSelectedNodes() {\n const store = useStoreApi();\n const moveSelectedNodes = useCallback((params) => {\n const { nodeExtent, snapToGrid, snapGrid, nodesDraggable, onError, updateNodePositions, nodeLookup, nodeOrigin } = store.getState();\n const nodeUpdates = new Map();\n const isSelected = selectedAndDraggable(nodesDraggable);\n /*\n * by default a node moves 5px on each key press\n * if snap grid is enabled, we use that for the velocity\n */\n const xVelo = snapToGrid ? snapGrid[0] : 5;\n const yVelo = snapToGrid ? snapGrid[1] : 5;\n const xDiff = params.direction.x * xVelo * params.factor;\n const yDiff = params.direction.y * yVelo * params.factor;\n for (const [, node] of nodeLookup) {\n if (!isSelected(node)) {\n continue;\n }\n let nextPosition = {\n x: node.internals.positionAbsolute.x + xDiff,\n y: node.internals.positionAbsolute.y + yDiff,\n };\n if (snapToGrid) {\n nextPosition = snapPosition(nextPosition, snapGrid);\n }\n const { position, positionAbsolute } = calculateNodePosition({\n nodeId: node.id,\n nextPosition,\n nodeLookup,\n nodeExtent,\n nodeOrigin,\n onError,\n });\n node.position = position;\n node.internals.positionAbsolute = positionAbsolute;\n nodeUpdates.set(node.id, node);\n }\n updateNodePositions(nodeUpdates);\n }, []);\n return moveSelectedNodes;\n}\n\nconst NodeIdContext = createContext(null);\nconst Provider = NodeIdContext.Provider;\nNodeIdContext.Consumer;\n/**\n * You can use this hook to get the id of the node it is used inside. It is useful\n * if you need the node's id deeper in the render tree but don't want to manually\n * drill down the id as a prop.\n *\n * @public\n * @returns The id for a node in the flow.\n *\n * @example\n *```jsx\n *import { useNodeId } from '@xyflow/react';\n *\n *export default function CustomNode() {\n * return (\n * <div>\n * <span>This node has an id of </span>\n * <NodeIdDisplay />\n * </div>\n * );\n *}\n *\n *function NodeIdDisplay() {\n * const nodeId = useNodeId();\n *\n * return <span>{nodeId}</span>;\n *}\n *```\n */\nconst useNodeId = () => {\n const nodeId = useContext(NodeIdContext);\n return nodeId;\n};\n\nconst selector$f = (s) => ({\n connectOnClick: s.connectOnClick,\n noPanClassName: s.noPanClassName,\n rfId: s.rfId,\n});\nconst HandleConfigContext = createContext(null);\n/*\n * `connectOnClick`, `noPanClassName` and `rfId` are the same for every handle, so they are\n * shared through context from a single store subscription.\n */\nfunction HandleConfigProvider({ children }) {\n const config = useStore(selector$f, shallow);\n return jsx(HandleConfigContext.Provider, { value: config, children: children });\n}\nfunction useHandleConfig() {\n const config = useContext(HandleConfigContext);\n if (!config) {\n throw new Error('useHandleConfig must be used within a HandleConfigProvider');\n }\n return config;\n}\n\n/*\n * While no connection is in progress every handle has this same state, so we return a\n * shared reference rather than allocating + shallow-comparing one per handle on every\n * store update. `isPossibleEndHandle` matches what the selector computes when idle.\n */\nconst idleConnectingState = {\n connectingFrom: false,\n connectingTo: false,\n clickConnecting: false,\n isPossibleEndHandle: true,\n connectionInProcess: false,\n clickConnectionInProcess: false,\n valid: false,\n};\nconst connectingSelector = (nodeId, handleId, type) => (state) => {\n const { connectionClickStartHandle: clickHandle, connectionMode, connection } = state;\n const { fromHandle, toHandle, isValid } = connection;\n if (!fromHandle && !clickHandle) {\n return idleConnectingState;\n }\n const connectingTo = toHandle?.nodeId === nodeId && toHandle?.id === handleId && toHandle?.type === type;\n return {\n connectingFrom: fromHandle?.nodeId === nodeId && fromHandle?.id === handleId && fromHandle?.type === type,\n connectingTo,\n clickConnecting: clickHandle?.nodeId === nodeId && clickHandle?.id === handleId && clickHandle?.type === type,\n isPossibleEndHandle: connectionMode === ConnectionMode.Strict\n ? fromHandle?.type !== type\n : nodeId !== fromHandle?.nodeId || handleId !== fromHandle?.id,\n connectionInProcess: !!fromHandle,\n clickConnectionInProcess: !!clickHandle,\n valid: connectingTo && isValid,\n };\n};\nfunction HandleComponent({ type = 'source', position = Position.Top, isValidConnection, isConnectable = true, isConnectableStart = true, isConnectableEnd = true, id, onConnect, children, className, onMouseDown, onTouchStart, ...rest }, ref) {\n const handleId = id || null;\n const isTarget = type === 'target';\n const store = useStoreApi();\n const nodeId = useNodeId();\n const { connectOnClick, noPanClassName, rfId } = useHandleConfig();\n const { connectingFrom, connectingTo, clickConnecting, isPossibleEndHandle, connectionInProcess, clickConnectionInProcess, valid, } = useStore(connectingSelector(nodeId, handleId, type), shallow);\n if (!nodeId) {\n store.getState().onError?.('010', errorMessages['error010']());\n }\n const onConnectExtended = (params) => {\n const { defaultEdgeOptions, onConnect: onConnectAction, hasDefaultEdges } = store.getState();\n const edgeParams = {\n ...defaultEdgeOptions,\n ...params,\n };\n if (hasDefaultEdges) {\n const { edges, setEdges, onError } = store.getState();\n setEdges(addEdge(edgeParams, edges, { onError }));\n }\n onConnectAction?.(edgeParams);\n onConnect?.(edgeParams);\n };\n const onPointerDown = (event) => {\n if (!nodeId) {\n return;\n }\n const isMouseTriggered = isMouseEvent(event.nativeEvent);\n if (isConnectableStart &&\n ((isMouseTriggered && event.button === 0) || !isMouseTriggered)) {\n const currentStore = store.getState();\n XYHandle.onPointerDown(event.nativeEvent, {\n handleDomNode: event.currentTarget,\n autoPanOnConnect: currentStore.autoPanOnConnect,\n connectionMode: currentStore.connectionMode,\n connectionRadius: currentStore.connectionRadius,\n domNode: currentStore.domNode,\n nodeLookup: currentStore.nodeLookup,\n lib: currentStore.lib,\n isTarget,\n handleId,\n nodeId,\n flowId: currentStore.rfId,\n panBy: currentStore.panBy,\n cancelConnection: currentStore.cancelConnection,\n onConnectStart: currentStore.onConnectStart,\n onConnectEnd: (...args) => store.getState().onConnectEnd?.(...args),\n updateConnection: currentStore.updateConnection,\n onConnect: onConnectExtended,\n isValidConnection: isValidConnection || ((...args) => store.getState().isValidConnection?.(...args) ?? true),\n getTransform: () => store.getState().transform,\n getFromHandle: () => store.getState().connection.fromHandle,\n autoPanSpeed: currentStore.autoPanSpeed,\n dragThreshold: currentStore.connectionDragThreshold,\n });\n }\n if (isMouseTriggered) {\n onMouseDown?.(event);\n }\n else {\n onTouchStart?.(event);\n }\n };\n const onClick = (event) => {\n const { onClickConnectStart, onClickConnectEnd, connectionClickStartHandle, connectionMode, isValidConnection: isValidConnectionStore, lib, rfId: flowId, nodeLookup, connection: connectionState, } = store.getState();\n if (!nodeId || (!connectionClickStartHandle && !isConnectableStart)) {\n return;\n }\n if (!connectionClickStartHandle) {\n onClickConnectStart?.(event.nativeEvent, { nodeId, handleId, handleType: type });\n store.setState({ connectionClickStartHandle: { nodeId, type, id: handleId } });\n return;\n }\n const doc = getHostForElement(event.target);\n const isValidConnectionHandler = isValidConnection || isValidConnectionStore;\n const { connection, isValid } = XYHandle.isValid(event.nativeEvent, {\n handle: {\n nodeId,\n id: handleId,\n type,\n },\n connectionMode,\n fromNodeId: connectionClickStartHandle.nodeId,\n fromHandleId: connectionClickStartHandle.id || null,\n fromType: connectionClickStartHandle.type,\n isValidConnection: isValidConnectionHandler,\n flowId,\n doc,\n lib,\n nodeLookup,\n });\n if (isValid && connection) {\n onConnectExtended(connection);\n }\n const connectionClone = structuredClone(connectionState);\n delete connectionClone.inProgress;\n connectionClone.toPosition = connectionClone.toHandle ? connectionClone.toHandle.position : null;\n onClickConnectEnd?.(event, connectionClone);\n store.setState({ connectionClickStartHandle: null });\n };\n return (jsx(\"div\", { \"data-handleid\": handleId, \"data-nodeid\": nodeId, \"data-handlepos\": position, \"data-id\": `${rfId}-${nodeId}-${handleId}-${type}`, className: cc([\n 'react-flow__handle',\n `react-flow__handle-${position}`,\n 'nodrag',\n noPanClassName,\n className,\n {\n source: !isTarget,\n target: isTarget,\n connectable: isConnectable,\n connectablestart: isConnectableStart,\n connectableend: isConnectableEnd,\n clickconnecting: clickConnecting,\n connectingfrom: connectingFrom,\n connectingto: connectingTo,\n valid,\n /*\n * shows where you can start a connection from\n * and where you can end it while connecting\n */\n connectionindicator: isConnectable &&\n (!connectionInProcess || isPossibleEndHandle) &&\n (connectionInProcess || clickConnectionInProcess ? isConnectableEnd : isConnectableStart),\n },\n ]), onMouseDown: onPointerDown, onTouchStart: onPointerDown, onClick: connectOnClick ? onClick : undefined, ref: ref, ...rest, children: children }));\n}\n/**\n * The `<Handle />` component is used in your [custom nodes](/learn/customization/custom-nodes)\n * to define connection points.\n *\n *@public\n *\n *@example\n *\n *```jsx\n *import { Handle, Position } from '@xyflow/react';\n *\n *export function CustomNode({ data }) {\n * return (\n * <>\n * <div style={{ padding: '10px 20px' }}>\n * {data.label}\n * </div>\n *\n * <Handle type=\"target\" position={Position.Left} />\n * <Handle type=\"source\" position={Position.Right} />\n * </>\n * );\n *};\n *```\n */\nconst Handle = memo(fixedForwardRef(HandleComponent));\n\nfunction InputNode({ data, isConnectable, sourcePosition = Position.Bottom }) {\n return (jsxs(Fragment, { children: [data?.label, jsx(Handle, { type: \"source\", position: sourcePosition, isConnectable: isConnectable })] }));\n}\n\nfunction DefaultNode({ data, isConnectable, targetPosition = Position.Top, sourcePosition = Position.Bottom, }) {\n return (jsxs(Fragment, { children: [jsx(Handle, { type: \"target\", position: targetPosition, isConnectable: isConnectable }), data?.label, jsx(Handle, { type: \"source\", position: sourcePosition, isConnectable: isConnectable })] }));\n}\n\nfunction GroupNode() {\n return null;\n}\n\nfunction OutputNode({ data, isConnectable, targetPosition = Position.Top }) {\n return (jsxs(Fragment, { children: [jsx(Handle, { type: \"target\", position: targetPosition, isConnectable: isConnectable }), data?.label] }));\n}\n\nconst arrowKeyDiffs = {\n ArrowUp: { x: 0, y: -1 },\n ArrowDown: { x: 0, y: 1 },\n ArrowLeft: { x: -1, y: 0 },\n ArrowRight: { x: 1, y: 0 },\n};\nconst builtinNodeTypes = {\n input: InputNode,\n default: DefaultNode,\n output: OutputNode,\n group: GroupNode,\n};\nfunction getNodeInlineStyleDimensions(node) {\n if (node.internals.handleBounds === undefined) {\n return {\n width: node.width ?? node.initialWidth ?? node.style?.width,\n height: node.height ?? node.initialHeight ?? node.style?.height,\n };\n }\n return {\n width: node.width ?? node.style?.width,\n height: node.height ?? node.style?.height,\n };\n}\n\nconst selector$e = (s) => {\n const { width, height, x, y } = getInternalNodesBounds(s.nodeLookup, {\n filter: (node) => !!node.selected,\n });\n return {\n width: isNumeric(width) ? width : null,\n height: isNumeric(height) ? height : null,\n userSelectionActive: s.userSelectionActive,\n transformString: `translate(${s.transform[0]}px,${s.transform[1]}px) scale(${s.transform[2]}) translate(${x}px,${y}px)`,\n };\n};\nfunction NodesSelection({ onSelectionContextMenu, noPanClassName, disableKeyboardA11y, }) {\n const store = useStoreApi();\n const { width, height, transformString, userSelectionActive } = useStore(selector$e, shallow);\n const moveSelectedNodes = useMoveSelectedNodes();\n const nodeRef = useRef(null);\n useEffect(() => {\n if (!disableKeyboardA11y) {\n nodeRef.current?.focus({\n preventScroll: true,\n });\n }\n }, [disableKeyboardA11y]);\n const shouldRender = !userSelectionActive && width !== null && height !== null;\n useDrag({\n nodeRef,\n disabled: !shouldRender,\n });\n if (!shouldRender) {\n return null;\n }\n const onContextMenu = onSelectionContextMenu\n ? (event) => {\n const selectedNodes = store.getState().nodes.filter((n) => n.selected);\n onSelectionContextMenu(event, selectedNodes);\n }\n : undefined;\n const onKeyDown = (event) => {\n if (Object.prototype.hasOwnProperty.call(arrowKeyDiffs, event.key)) {\n event.preventDefault();\n moveSelectedNodes({\n direction: arrowKeyDiffs[event.key],\n factor: event.shiftKey ? 4 : 1,\n });\n }\n };\n return (jsx(\"div\", { className: cc(['react-flow__nodesselection', 'react-flow__container', noPanClassName]), style: {\n transform: transformString,\n }, children: jsx(\"div\", { ref: nodeRef, className: \"react-flow__nodesselection-rect\", onContextMenu: onContextMenu, tabIndex: disableKeyboardA11y ? undefined : -1, onKeyDown: disableKeyboardA11y ? undefined : onKeyDown, style: {\n width,\n height,\n } }) }));\n}\n\nconst win = typeof window !== 'undefined' ? window : undefined;\nconst selector$d = (s) => {\n return { nodesSelectionActive: s.nodesSelectionActive, userSelectionActive: s.userSelectionActive };\n};\nfunction FlowRendererComponent({ children, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneContextMenu, onPaneScroll, paneClickDistance, deleteKeyCode, selectionKeyCode, selectionOnDrag, selectionMode, onSelectionStart, onSelectionEnd, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, elementsSelectable, zoomOnScroll, zoomOnPinch, panOnScroll: _panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag: _panOnDrag, autoPanOnSelection, defaultViewport, translateExtent, minZoom, maxZoom, preventScrolling, onSelectionContextMenu, noWheelClassName, noPanClassName, disableKeyboardA11y, onViewportChange, isControlledViewport, }) {\n const { nodesSelectionActive, userSelectionActive } = useStore(selector$d, shallow);\n const selectionKeyPressed = useKeyPress(selectionKeyCode, { target: win });\n const panActivationKeyPressed = useKeyPress(panActivationKeyCode, { target: win });\n const panOnDrag = panActivationKeyPressed || _panOnDrag;\n const panOnScroll = panActivationKeyPressed || _panOnScroll;\n const _selectionOnDrag = selectionOnDrag && panOnDrag !== true;\n const isSelecting = selectionKeyPressed || userSelectionActive || _selectionOnDrag;\n useGlobalKeyHandler({ deleteKeyCode, multiSelectionKeyCode });\n return (jsx(ZoomPane, { onPaneContextMenu: onPaneContextMenu, elementsSelectable: elementsSelectable, zoomOnScroll: zoomOnScroll, zoomOnPinch: zoomOnPinch, panOnScroll: panOnScroll, panActivationKeyPressed: panActivationKeyPressed, panOnScrollSpeed: panOnScrollSpeed, panOnScrollMode: panOnScrollMode, zoomOnDoubleClick: zoomOnDoubleClick, panOnDrag: !selectionKeyPressed && panOnDrag, defaultViewport: defaultViewport, translateExtent: translateExtent, minZoom: minZoom, maxZoom: maxZoom, zoomActivationKeyCode: zoomActivationKeyCode, preventScrolling: preventScrolling, noWheelClassName: noWheelClassName, noPanClassName: noPanClassName, onViewportChange: onViewportChange, isControlledViewport: isControlledViewport, paneClickDistance: paneClickDistance, selectionOnDrag: _selectionOnDrag, children: jsxs(Pane, { onSelectionStart: onSelectionStart, onSelectionEnd: onSelectionEnd, onPaneClick: onPaneClick, onPaneMouseEnter: onPaneMouseEnter, onPaneMouseMove: onPaneMouseMove, onPaneMouseLeave: onPaneMouseLeave, onPaneContextMenu: onPaneContextMenu, onPaneScroll: onPaneScroll, panOnDrag: panOnDrag, autoPanOnSelection: autoPanOnSelection, isSelecting: !!isSelecting, selectionMode: selectionMode, selectionKeyPressed: selectionKeyPressed, paneClickDistance: paneClickDistance, selectionOnDrag: _selectionOnDrag, children: [children, nodesSelectionActive && (jsx(NodesSelection, { onSelectionContextMenu: onSelectionContextMenu, noPanClassName: noPanClassName, disableKeyboardA11y: disableKeyboardA11y }))] }) }));\n}\nFlowRendererComponent.displayName = 'FlowRenderer';\nconst FlowRenderer = memo(FlowRendererComponent);\n\nconst selector$c = (onlyRenderVisible) => (s) => {\n return onlyRenderVisible\n ? getNodesInside(s.nodeLookup, { x: 0, y: 0, width: s.width, height: s.height }, s.transform, true).map((node) => node.id)\n : Array.from(s.nodeLookup.keys());\n};\n/**\n * Hook for getting the visible node ids from the store.\n *\n * @internal\n * @param onlyRenderVisible\n * @returns array with visible node ids\n */\nfunction useVisibleNodeIds(onlyRenderVisible) {\n const nodeIds = useStore(useCallback(selector$c(onlyRenderVisible), [onlyRenderVisible]), shallow);\n return nodeIds;\n}\n\nconst selector$b = (s) => s.updateNodeInternals;\nfunction useResizeObserver() {\n const updateNodeInternals = useStore(selector$b);\n const [resizeObserver] = useState(() => {\n if (typeof ResizeObserver === 'undefined') {\n return null;\n }\n return new ResizeObserver((entries) => {\n const updates = new Map();\n entries.forEach((entry) => {\n const id = entry.target.getAttribute('data-id');\n updates.set(id, {\n id,\n nodeElement: entry.target,\n force: true,\n });\n });\n updateNodeInternals(updates);\n });\n });\n useEffect(() => {\n return () => {\n resizeObserver?.disconnect();\n };\n }, [resizeObserver]);\n return resizeObserver;\n}\n\n/**\n * Hook to handle the resize observation + internal updates for the passed node.\n *\n * @internal\n * @returns nodeRef - reference to the node element\n */\nfunction useNodeObserver({ node, nodeType, hasDimensions, resizeObserver, }) {\n const store = useStoreApi();\n const nodeRef = useRef(null);\n const observedNode = useRef(null);\n const prevSourcePosition = useRef(node.sourcePosition);\n const prevTargetPosition = useRef(node.targetPosition);\n const prevType = useRef(nodeType);\n const isInitialized = hasDimensions && !!node.internals.handleBounds;\n useEffect(() => {\n if (nodeRef.current && !node.hidden && (!isInitialized || observedNode.current !== nodeRef.current)) {\n if (observedNode.current) {\n resizeObserver?.unobserve(observedNode.current);\n }\n resizeObserver?.observe(nodeRef.current);\n observedNode.current = nodeRef.current;\n }\n }, [isInitialized, node.hidden]);\n useEffect(() => {\n return () => {\n if (observedNode.current) {\n resizeObserver?.unobserve(observedNode.current);\n observedNode.current = null;\n }\n };\n }, []);\n useEffect(() => {\n if (nodeRef.current) {\n /*\n * when the user programmatically changes the source or handle position, we need to update the internals\n * to make sure the edges are updated correctly\n */\n const typeChanged = prevType.current !== nodeType;\n const sourcePosChanged = prevSourcePosition.current !== node.sourcePosition;\n const targetPosChanged = prevTargetPosition.current !== node.targetPosition;\n if (typeChanged || sourcePosChanged || targetPosChanged) {\n prevType.current = nodeType;\n prevSourcePosition.current = node.sourcePosition;\n prevTargetPosition.current = node.targetPosition;\n store\n .getState()\n .updateNodeInternals(new Map([[node.id, { id: node.id, nodeElement: nodeRef.current, force: true }]]));\n }\n }\n }, [node.id, nodeType, node.sourcePosition, node.targetPosition]);\n return nodeRef;\n}\n\nfunction NodeWrapper({ id, onClick, onMouseEnter, onMouseMove, onMouseLeave, onContextMenu, onDoubleClick, nodesDraggable, elementsSelectable, nodesConnectable, nodesFocusable, resizeObserver, noDragClassName, noPanClassName, disableKeyboardA11y, rfId, nodeTypes, nodeClickDistance, onError, }) {\n const { node, internals, isParent } = useStore((s) => {\n const node = s.nodeLookup.get(id);\n const isParent = s.parentLookup.has(id);\n return {\n node,\n internals: node.internals,\n isParent,\n };\n }, shallow);\n let nodeType = node.type || 'default';\n let NodeComponent = nodeTypes?.[nodeType] || builtinNodeTypes[nodeType];\n if (NodeComponent === undefined) {\n onError?.('003', errorMessages['error003'](nodeType));\n nodeType = 'default';\n NodeComponent = nodeTypes?.['default'] || builtinNodeTypes.default;\n }\n const isDraggable = !!(node.draggable || (nodesDraggable && typeof node.draggable === 'undefined'));\n const isSelectable = !!(node.selectable || (elementsSelectable && typeof node.selectable === 'undefined'));\n const isConnectable = !!(node.connectable || (nodesConnectable && typeof node.connectable === 'undefined'));\n const isFocusable = !!(node.focusable || (nodesFocusable && typeof node.focusable === 'undefined'));\n const store = useStoreApi();\n const hasDimensions = nodeHasDimensions(node);\n const nodeRef = useNodeObserver({ node, nodeType, hasDimensions, resizeObserver });\n const dragging = useDrag({\n nodeRef,\n disabled: node.hidden || !isDraggable,\n noDragClassName,\n handleSelector: node.dragHandle,\n nodeId: id,\n isSelectable,\n nodeClickDistance,\n });\n const moveSelectedNodes = useMoveSelectedNodes();\n if (node.hidden) {\n return null;\n }\n const nodeDimensions = getNodeDimensions(node);\n const inlineDimensions = getNodeInlineStyleDimensions(node);\n const hasPointerEvents = isSelectable || isDraggable || onClick || onMouseEnter || onMouseMove || onMouseLeave;\n const onMouseEnterHandler = onMouseEnter\n ? (event) => onMouseEnter(event, { ...internals.userNode })\n : undefined;\n const onMouseMoveHandler = onMouseMove\n ? (event) => onMouseMove(event, { ...internals.userNode })\n : undefined;\n const onMouseLeaveHandler = onMouseLeave\n ? (event) => onMouseLeave(event, { ...internals.userNode })\n : undefined;\n const onContextMenuHandler = onContextMenu\n ? (event) => onContextMenu(event, { ...internals.userNode })\n : undefined;\n const onDoubleClickHandler = onDoubleClick\n ? (event) => onDoubleClick(event, { ...internals.userNode })\n : undefined;\n const onSelectNodeHandler = (event) => {\n const { selectNodesOnDrag, nodeDragThreshold } = store.getState();\n if (isSelectable && (!selectNodesOnDrag || !isDraggable || nodeDragThreshold > 0)) {\n /*\n * this handler gets called by XYDrag on drag start when selectNodesOnDrag=true\n * here we only need to call it when selectNodesOnDrag=false\n */\n handleNodeClick({\n id,\n store,\n nodeRef,\n });\n }\n if (onClick) {\n onClick(event, { ...internals.userNode });\n }\n };\n const onKeyDown = (event) => {\n if (isInputDOMNode(event.nativeEvent) || disableKeyboardA11y) {\n return;\n }\n if (elementSelectionKeys.includes(event.key) && isSelectable) {\n const unselect = event.key === 'Escape';\n handleNodeClick({\n id,\n store,\n unselect,\n nodeRef,\n });\n }\n else if (isDraggable && node.selected && Object.prototype.hasOwnProperty.call(arrowKeyDiffs, event.key)) {\n // prevent default scrolling behavior on arrow key press when node is moved\n event.preventDefault();\n const { ariaLabelConfig } = store.getState();\n store.setState({\n ariaLiveMessage: ariaLabelConfig['node.a11yDescription.ariaLiveMessage']({\n direction: event.key.replace('Arrow', '').toLowerCase(),\n x: ~~internals.positionAbsolute.x,\n y: ~~internals.positionAbsolute.y,\n }),\n });\n moveSelectedNodes({\n direction: arrowKeyDiffs[event.key],\n factor: event.shiftKey ? 4 : 1,\n });\n }\n };\n const onFocus = () => {\n if (disableKeyboardA11y || !nodeRef.current?.matches(':focus-visible')) {\n return;\n }\n const { transform, width, height, autoPanOnNodeFocus, setCenter } = store.getState();\n if (!autoPanOnNodeFocus) {\n return;\n }\n const withinViewport = getNodesInside(new Map([[id, node]]), { x: 0, y: 0, width, height }, transform, true).length > 0;\n if (!withinViewport) {\n setCenter(node.position.x + nodeDimensions.width / 2, node.position.y + nodeDimensions.height / 2, {\n zoom: transform[2],\n });\n }\n };\n return (jsx(\"div\", { className: cc([\n 'react-flow__node',\n `react-flow__node-${nodeType}`,\n {\n // this is overwritable by passing `nopan` as a class name\n [noPanClassName]: isDraggable,\n },\n node.className,\n {\n selected: node.selected,\n selectable: isSelectable,\n parent: isParent,\n draggable: isDraggable,\n dragging,\n },\n ]), ref: nodeRef, style: {\n zIndex: internals.z,\n transform: `translate(${internals.positionAbsolute.x}px,${internals.positionAbsolute.y}px)`,\n pointerEvents: hasPointerEvents ? 'all' : 'none',\n visibility: hasDimensions ? 'visible' : 'hidden',\n ...node.style,\n ...inlineDimensions,\n }, \"data-id\": id, \"data-testid\": `rf__node-${id}`, onMouseEnter: onMouseEnterHandler, onMouseMove: onMouseMoveHandler, onMouseLeave: onMouseLeaveHandler, onContextMenu: onContextMenuHandler, onClick: onSelectNodeHandler, onDoubleClick: onDoubleClickHandler, onKeyDown: isFocusable ? onKeyDown : undefined, tabIndex: isFocusable ? 0 : undefined, onFocus: isFocusable ? onFocus : undefined, role: node.ariaRole ?? (isFocusable ? 'group' : undefined), \"aria-roledescription\": \"node\", \"aria-describedby\": disableKeyboardA11y ? undefined : `${ARIA_NODE_DESC_KEY}-${rfId}`, \"aria-label\": node.ariaLabel, ...node.domAttributes, children: jsx(Provider, { value: id, children: jsx(NodeComponent, { id: id, data: node.data, type: nodeType, positionAbsoluteX: internals.positionAbsolute.x, positionAbsoluteY: internals.positionAbsolute.y, selected: node.selected ?? false, selectable: isSelectable, draggable: isDraggable, deletable: node.deletable ?? true, isConnectable: isConnectable, sourcePosition: node.sourcePosition, targetPosition: node.targetPosition, dragging: dragging, dragHandle: node.dragHandle, zIndex: internals.z, parentId: node.parentId, ...nodeDimensions }) }) }));\n}\nvar NodeWrapper$1 = memo(NodeWrapper);\n\nconst selector$a = (s) => ({\n nodesConnectable: s.nodesConnectable,\n nodesFocusable: s.nodesFocusable,\n elementsSelectable: s.elementsSelectable,\n onError: s.onError,\n});\nfunction NodeRendererComponent(props) {\n const { nodesConnectable, nodesFocusable, elementsSelectable, onError } = useStore(selector$a, shallow);\n const nodeIds = useVisibleNodeIds(props.onlyRenderVisibleElements);\n const resizeObserver = useResizeObserver();\n return (jsx(\"div\", { className: \"react-flow__nodes\", style: containerStyle, children: nodeIds.map((nodeId) => {\n return (\n /*\n * The split of responsibilities between NodeRenderer and\n * NodeComponentWrapper may appear weird. However, it’s designed to\n * minimize the cost of updates when individual nodes change.\n *\n * For example, when you’re dragging a single node, that node gets\n * updated multiple times per second. If `NodeRenderer` were to update\n * every time, it would have to re-run the `nodes.map()` loop every\n * time. This gets pricey with hundreds of nodes, especially if every\n * loop cycle does more than just rendering a JSX element!\n *\n * As a result of this choice, we took the following implementation\n * decisions:\n * - NodeRenderer subscribes *only* to node IDs – and therefore\n * rerender *only* when visible nodes are added or removed.\n * - NodeRenderer performs all operations the result of which can be\n * shared between nodes (such as creating the `ResizeObserver`\n * instance, or subscribing to `selector`). This means extra prop\n * drilling into `NodeComponentWrapper`, but it means we need to run\n * these operations only once – instead of once per node.\n * - Any operations that you’d normally write inside `nodes.map` are\n * moved into `NodeComponentWrapper`. This ensures they are\n * memorized – so if `NodeRenderer` *has* to rerender, it only\n * needs to regenerate the list of nodes, nothing else.\n */\n jsx(NodeWrapper$1, { id: nodeId, nodeTypes: props.nodeTypes, nodeExtent: props.nodeExtent, onClick: props.onNodeClick, onMouseEnter: props.onNodeMouseEnter, onMouseMove: props.onNodeMouseMove, onMouseLeave: props.onNodeMouseLeave, onContextMenu: props.onNodeContextMenu, onDoubleClick: props.onNodeDoubleClick, noDragClassName: props.noDragClassName, noPanClassName: props.noPanClassName, rfId: props.rfId, disableKeyboardA11y: props.disableKeyboardA11y, resizeObserver: resizeObserver, nodesDraggable: props.nodesDraggable ?? true, nodesConnectable: nodesConnectable, nodesFocusable: nodesFocusable, elementsSelectable: elementsSelectable, nodeClickDistance: props.nodeClickDistance, onError: onError }, nodeId));\n }) }));\n}\nNodeRendererComponent.displayName = 'NodeRenderer';\nconst NodeRenderer = memo(NodeRendererComponent);\n\n/**\n * Hook for getting the visible edge ids from the store.\n *\n * @internal\n * @param onlyRenderVisible\n * @returns array with visible edge ids\n */\nfunction useVisibleEdgeIds(onlyRenderVisible) {\n const edgeIds = useStore(useCallback((s) => {\n if (!onlyRenderVisible) {\n return s.edges.map((edge) => edge.id);\n }\n const visibleEdgeIds = [];\n if (s.width && s.height) {\n for (const edge of s.edges) {\n const sourceNode = s.nodeLookup.get(edge.source);\n const targetNode = s.nodeLookup.get(edge.target);\n if (sourceNode &&\n targetNode &&\n isEdgeVisible({\n sourceNode,\n targetNode,\n width: s.width,\n height: s.height,\n transform: s.transform,\n })) {\n visibleEdgeIds.push(edge.id);\n }\n }\n }\n return visibleEdgeIds;\n }, [onlyRenderVisible]), shallow);\n return edgeIds;\n}\n\nconst ArrowSymbol = ({ color = 'none', strokeWidth = 1 }) => {\n const style = {\n strokeWidth,\n ...(color && { stroke: color }),\n };\n return (jsx(\"polyline\", { className: \"arrow\", style: style, strokeLinecap: \"round\", fill: \"none\", strokeLinejoin: \"round\", points: \"-5,-4 0,0 -5,4\" }));\n};\nconst ArrowClosedSymbol = ({ color = 'none', strokeWidth = 1 }) => {\n const style = {\n strokeWidth,\n ...(color && { stroke: color, fill: color }),\n };\n return (jsx(\"polyline\", { className: \"arrowclosed\", style: style, strokeLinecap: \"round\", strokeLinejoin: \"round\", points: \"-5,-4 0,0 -5,4 -5,-4\" }));\n};\nconst MarkerSymbols = {\n [MarkerType.Arrow]: ArrowSymbol,\n [MarkerType.ArrowClosed]: ArrowClosedSymbol,\n};\nfunction useMarkerSymbol(type) {\n const store = useStoreApi();\n const symbol = useMemo(() => {\n const symbolExists = Object.prototype.hasOwnProperty.call(MarkerSymbols, type);\n if (!symbolExists) {\n store.getState().onError?.('009', errorMessages['error009'](type));\n return null;\n }\n return MarkerSymbols[type];\n }, [type]);\n return symbol;\n}\n\nconst Marker = ({ id, type, color, width = 12.5, height = 12.5, markerUnits = 'strokeWidth', strokeWidth, orient = 'auto-start-reverse', }) => {\n const Symbol = useMarkerSymbol(type);\n if (!Symbol) {\n return null;\n }\n return (jsx(\"marker\", { className: \"react-flow__arrowhead\", id: id, markerWidth: `${width}`, markerHeight: `${height}`, viewBox: \"-10 -10 20 20\", markerUnits: markerUnits, orient: orient, refX: \"0\", refY: \"0\", children: jsx(Symbol, { color: color, strokeWidth: strokeWidth }) }));\n};\n/*\n * when you have multiple flows on a page and you hide the first one, the other ones have no markers anymore\n * when they do have markers with the same ids. To prevent this the user can pass a unique id to the react flow wrapper\n * that we can then use for creating our unique marker ids\n */\nconst MarkerDefinitions = ({ defaultColor, rfId }) => {\n const edges = useStore((s) => s.edges);\n const defaultEdgeOptions = useStore((s) => s.defaultEdgeOptions);\n const markers = useMemo(() => {\n const markers = createMarkerIds(edges, {\n id: rfId,\n defaultColor,\n defaultMarkerStart: defaultEdgeOptions?.markerStart,\n defaultMarkerEnd: defaultEdgeOptions?.markerEnd,\n });\n return markers;\n }, [edges, defaultEdgeOptions, rfId, defaultColor]);\n if (!markers.length) {\n return null;\n }\n return (jsx(\"svg\", { className: \"react-flow__marker\", \"aria-hidden\": \"true\", children: jsx(\"defs\", { children: markers.map((marker) => (jsx(Marker, { id: marker.id, type: marker.type, color: marker.color, width: marker.width, height: marker.height, markerUnits: marker.markerUnits, strokeWidth: marker.strokeWidth, orient: marker.orient }, marker.id))) }) }));\n};\nMarkerDefinitions.displayName = 'MarkerDefinitions';\nvar MarkerDefinitions$1 = memo(MarkerDefinitions);\n\nfunction EdgeTextComponent({ x, y, label, labelStyle, labelShowBg = true, labelBgStyle, labelBgPadding = [2, 4], labelBgBorderRadius = 2, children, className, ...rest }) {\n const [edgeTextBbox, setEdgeTextBbox] = useState({ x: 1, y: 0, width: 0, height: 0 });\n const edgeTextClasses = cc(['react-flow__edge-textwrapper', className]);\n const edgeTextRef = useRef(null);\n useEffect(() => {\n if (edgeTextRef.current) {\n const textBbox = edgeTextRef.current.getBBox();\n setEdgeTextBbox({\n x: textBbox.x,\n y: textBbox.y,\n width: textBbox.width,\n height: textBbox.height,\n });\n }\n }, [label]);\n if (!label) {\n return null;\n }\n return (jsxs(\"g\", { transform: `translate(${x - edgeTextBbox.width / 2} ${y - edgeTextBbox.height / 2})`, className: edgeTextClasses, visibility: edgeTextBbox.width ? 'visible' : 'hidden', ...rest, children: [labelShowBg && (jsx(\"rect\", { width: edgeTextBbox.width + 2 * labelBgPadding[0], x: -labelBgPadding[0], y: -labelBgPadding[1], height: edgeTextBbox.height + 2 * labelBgPadding[1], className: \"react-flow__edge-textbg\", style: labelBgStyle, rx: labelBgBorderRadius, ry: labelBgBorderRadius })), jsx(\"text\", { className: \"react-flow__edge-text\", y: edgeTextBbox.height / 2, dy: \"0.3em\", ref: edgeTextRef, style: labelStyle, children: label }), children] }));\n}\nEdgeTextComponent.displayName = 'EdgeText';\n/**\n * You can use the `<EdgeText />` component as a helper component to display text\n * within your custom edges.\n *\n * @public\n *\n * @example\n * ```jsx\n * import { EdgeText } from '@xyflow/react';\n *\n * export function CustomEdgeLabel({ label }) {\n * return (\n * <EdgeText\n * x={100}\n * y={100}\n * label={label}\n * labelStyle={{ fill: 'white' }}\n * labelShowBg\n * labelBgStyle={{ fill: 'red' }}\n * labelBgPadding={[2, 4]}\n * labelBgBorderRadius={2}\n * />\n * );\n * }\n *```\n */\nconst EdgeText = memo(EdgeTextComponent);\n\n/**\n * The `<BaseEdge />` component gets used internally for all the edges. It can be\n * used inside a custom edge and handles the invisible helper edge and the edge label\n * for you.\n *\n * @public\n * @example\n * ```jsx\n *import { BaseEdge } from '@xyflow/react';\n *\n *export function CustomEdge({ sourceX, sourceY, targetX, targetY, ...props }) {\n * const [edgePath] = getStraightPath({\n * sourceX,\n * sourceY,\n * targetX,\n * targetY,\n * });\n *\n * return <BaseEdge path={edgePath} {...props} />;\n *}\n *```\n *\n * @remarks If you want to use an edge marker with the [`<BaseEdge />`](/api-reference/components/base-edge) component,\n * you can pass the `markerStart` or `markerEnd` props passed to your custom edge\n * through to the [`<BaseEdge />`](/api-reference/components/base-edge) component.\n * You can see all the props passed to a custom edge by looking at the [`EdgeProps`](/api-reference/types/edge-props) type.\n */\nfunction BaseEdge({ path, labelX, labelY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, interactionWidth = 20, ...props }) {\n return (jsxs(Fragment, { children: [jsx(\"path\", { ...props, d: path, fill: \"none\", className: cc(['react-flow__edge-path', props.className]) }), interactionWidth ? (jsx(\"path\", { d: path, fill: \"none\", strokeOpacity: 0, strokeWidth: interactionWidth, className: \"react-flow__edge-interaction\" })) : null, label && isNumeric(labelX) && isNumeric(labelY) ? (jsx(EdgeText, { x: labelX, y: labelY, label: label, labelStyle: labelStyle, labelShowBg: labelShowBg, labelBgStyle: labelBgStyle, labelBgPadding: labelBgPadding, labelBgBorderRadius: labelBgBorderRadius })) : null] }));\n}\n\nfunction getControl({ pos, x1, y1, x2, y2 }) {\n if (pos === Position.Left || pos === Position.Right) {\n return [0.5 * (x1 + x2), y1];\n }\n return [x1, 0.5 * (y1 + y2)];\n}\n/**\n * The `getSimpleBezierPath` util returns everything you need to render a simple\n * bezier edge between two nodes.\n * @public\n * @returns\n * - `path`: the path to use in an SVG `<path>` element.\n * - `labelX`: the `x` position you can use to render a label for this edge.\n * - `labelY`: the `y` position you can use to render a label for this edge.\n * - `offsetX`: the absolute difference between the source `x` position and the `x` position of the\n * middle of this path.\n * - `offsetY`: the absolute difference between the source `y` position and the `y` position of the\n * middle of this path.\n */\nfunction getSimpleBezierPath({ sourceX, sourceY, sourcePosition = Position.Bottom, targetX, targetY, targetPosition = Position.Top, }) {\n const [sourceControlX, sourceControlY] = getControl({\n pos: sourcePosition,\n x1: sourceX,\n y1: sourceY,\n x2: targetX,\n y2: targetY,\n });\n const [targetControlX, targetControlY] = getControl({\n pos: targetPosition,\n x1: targetX,\n y1: targetY,\n x2: sourceX,\n y2: sourceY,\n });\n const [labelX, labelY, offsetX, offsetY] = getBezierEdgeCenter({\n sourceX,\n sourceY,\n targetX,\n targetY,\n sourceControlX,\n sourceControlY,\n targetControlX,\n targetControlY,\n });\n return [\n `M${sourceX},${sourceY} C${sourceControlX},${sourceControlY} ${targetControlX},${targetControlY} ${targetX},${targetY}`,\n labelX,\n labelY,\n offsetX,\n offsetY,\n ];\n}\nfunction createSimpleBezierEdge(params) {\n // eslint-disable-next-line react/display-name\n return memo(({ id, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style, markerEnd, markerStart, interactionWidth, }) => {\n const [path, labelX, labelY] = getSimpleBezierPath({\n sourceX,\n sourceY,\n sourcePosition,\n targetX,\n targetY,\n targetPosition,\n });\n const _id = params.isInternal ? undefined : id;\n return (jsx(BaseEdge, { id: _id, path: path, labelX: labelX, labelY: labelY, label: label, labelStyle: labelStyle, labelShowBg: labelShowBg, labelBgStyle: labelBgStyle, labelBgPadding: labelBgPadding, labelBgBorderRadius: labelBgBorderRadius, style: style, markerEnd: markerEnd, markerStart: markerStart, interactionWidth: interactionWidth }));\n });\n}\nconst SimpleBezierEdge = createSimpleBezierEdge({ isInternal: false });\nconst SimpleBezierEdgeInternal = createSimpleBezierEdge({ isInternal: true });\nSimpleBezierEdge.displayName = 'SimpleBezierEdge';\nSimpleBezierEdgeInternal.displayName = 'SimpleBezierEdgeInternal';\n\nfunction createSmoothStepEdge(params) {\n // eslint-disable-next-line react/display-name\n return memo(({ id, sourceX, sourceY, targetX, targetY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style, sourcePosition = Position.Bottom, targetPosition = Position.Top, markerEnd, markerStart, pathOptions, interactionWidth, }) => {\n const [path, labelX, labelY] = getSmoothStepPath({\n sourceX,\n sourceY,\n sourcePosition,\n targetX,\n targetY,\n targetPosition,\n borderRadius: pathOptions?.borderRadius,\n offset: pathOptions?.offset,\n stepPosition: pathOptions?.stepPosition,\n });\n const _id = params.isInternal ? undefined : id;\n return (jsx(BaseEdge, { id: _id, path: path, labelX: labelX, labelY: labelY, label: label, labelStyle: labelStyle, labelShowBg: labelShowBg, labelBgStyle: labelBgStyle, labelBgPadding: labelBgPadding, labelBgBorderRadius: labelBgBorderRadius, style: style, markerEnd: markerEnd, markerStart: markerStart, interactionWidth: interactionWidth }));\n });\n}\n/**\n * Component that can be used inside a custom edge to render a smooth step edge.\n *\n * @public\n * @example\n *\n * ```tsx\n * import { SmoothStepEdge } from '@xyflow/react';\n *\n * function CustomEdge({ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition }) {\n * return (\n * <SmoothStepEdge\n * sourceX={sourceX}\n * sourceY={sourceY}\n * targetX={targetX}\n * targetY={targetY}\n * sourcePosition={sourcePosition}\n * targetPosition={targetPosition}\n * />\n * );\n * }\n * ```\n */\nconst SmoothStepEdge = createSmoothStepEdge({ isInternal: false });\n/**\n * @internal\n */\nconst SmoothStepEdgeInternal = createSmoothStepEdge({ isInternal: true });\nSmoothStepEdge.displayName = 'SmoothStepEdge';\nSmoothStepEdgeInternal.displayName = 'SmoothStepEdgeInternal';\n\nfunction createStepEdge(params) {\n // eslint-disable-next-line react/display-name\n return memo(({ id, ...props }) => {\n const _id = params.isInternal ? undefined : id;\n return (jsx(SmoothStepEdge, { ...props, id: _id, pathOptions: useMemo(() => ({ borderRadius: 0, offset: props.pathOptions?.offset }), [props.pathOptions?.offset]) }));\n });\n}\n/**\n * Component that can be used inside a custom edge to render a step edge.\n *\n * @public\n * @example\n *\n * ```tsx\n * import { StepEdge } from '@xyflow/react';\n *\n * function CustomEdge({ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition }) {\n * return (\n * <StepEdge\n * sourceX={sourceX}\n * sourceY={sourceY}\n * targetX={targetX}\n * targetY={targetY}\n * sourcePosition={sourcePosition}\n * targetPosition={targetPosition}\n * />\n * );\n * }\n * ```\n */\nconst StepEdge = createStepEdge({ isInternal: false });\n/**\n * @internal\n */\nconst StepEdgeInternal = createStepEdge({ isInternal: true });\nStepEdge.displayName = 'StepEdge';\nStepEdgeInternal.displayName = 'StepEdgeInternal';\n\nfunction createStraightEdge(params) {\n // eslint-disable-next-line react/display-name\n return memo(({ id, sourceX, sourceY, targetX, targetY, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style, markerEnd, markerStart, interactionWidth, }) => {\n const [path, labelX, labelY] = getStraightPath({ sourceX, sourceY, targetX, targetY });\n const _id = params.isInternal ? undefined : id;\n return (jsx(BaseEdge, { id: _id, path: path, labelX: labelX, labelY: labelY, label: label, labelStyle: labelStyle, labelShowBg: labelShowBg, labelBgStyle: labelBgStyle, labelBgPadding: labelBgPadding, labelBgBorderRadius: labelBgBorderRadius, style: style, markerEnd: markerEnd, markerStart: markerStart, interactionWidth: interactionWidth }));\n });\n}\n/**\n * Component that can be used inside a custom edge to render a straight line.\n *\n * @public\n * @example\n *\n * ```tsx\n * import { StraightEdge } from '@xyflow/react';\n *\n * function CustomEdge({ sourceX, sourceY, targetX, targetY }) {\n * return (\n * <StraightEdge\n * sourceX={sourceX}\n * sourceY={sourceY}\n * targetX={targetX}\n * targetY={targetY}\n * />\n * );\n * }\n * ```\n */\nconst StraightEdge = createStraightEdge({ isInternal: false });\n/**\n * @internal\n */\nconst StraightEdgeInternal = createStraightEdge({ isInternal: true });\nStraightEdge.displayName = 'StraightEdge';\nStraightEdgeInternal.displayName = 'StraightEdgeInternal';\n\nfunction createBezierEdge(params) {\n // eslint-disable-next-line react/display-name\n return memo(({ id, sourceX, sourceY, targetX, targetY, sourcePosition = Position.Bottom, targetPosition = Position.Top, label, labelStyle, labelShowBg, labelBgStyle, labelBgPadding, labelBgBorderRadius, style, markerEnd, markerStart, pathOptions, interactionWidth, }) => {\n const [path, labelX, labelY] = getBezierPath({\n sourceX,\n sourceY,\n sourcePosition,\n targetX,\n targetY,\n targetPosition,\n curvature: pathOptions?.curvature,\n });\n const _id = params.isInternal ? undefined : id;\n return (jsx(BaseEdge, { id: _id, path: path, labelX: labelX, labelY: labelY, label: label, labelStyle: labelStyle, labelShowBg: labelShowBg, labelBgStyle: labelBgStyle, labelBgPadding: labelBgPadding, labelBgBorderRadius: labelBgBorderRadius, style: style, markerEnd: markerEnd, markerStart: markerStart, interactionWidth: interactionWidth }));\n });\n}\n/**\n * Component that can be used inside a custom edge to render a bezier curve.\n *\n * @public\n * @example\n *\n * ```tsx\n * import { BezierEdge } from '@xyflow/react';\n *\n * function CustomEdge({ sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition }) {\n * return (\n * <BezierEdge\n * sourceX={sourceX}\n * sourceY={sourceY}\n * targetX={targetX}\n * targetY={targetY}\n * sourcePosition={sourcePosition}\n * targetPosition={targetPosition}\n * />\n * );\n * }\n * ```\n */\nconst BezierEdge = createBezierEdge({ isInternal: false });\n/**\n * @internal\n */\nconst BezierEdgeInternal = createBezierEdge({ isInternal: true });\nBezierEdge.displayName = 'BezierEdge';\nBezierEdgeInternal.displayName = 'BezierEdgeInternal';\n\nconst builtinEdgeTypes = {\n default: BezierEdgeInternal,\n straight: StraightEdgeInternal,\n step: StepEdgeInternal,\n smoothstep: SmoothStepEdgeInternal,\n simplebezier: SimpleBezierEdgeInternal,\n};\nconst nullPosition = {\n sourceX: null,\n sourceY: null,\n targetX: null,\n targetY: null,\n sourcePosition: null,\n targetPosition: null,\n zIndex: undefined,\n};\n\nconst shiftX = (x, shift, position) => {\n if (position === Position.Left)\n return x - shift;\n if (position === Position.Right)\n return x + shift;\n return x;\n};\nconst shiftY = (y, shift, position) => {\n if (position === Position.Top)\n return y - shift;\n if (position === Position.Bottom)\n return y + shift;\n return y;\n};\nconst EdgeUpdaterClassName = 'react-flow__edgeupdater';\n/**\n * @internal\n */\nfunction EdgeAnchor({ position, centerX, centerY, radius = 10, onMouseDown, onMouseEnter, onMouseOut, type, }) {\n return (jsx(\"circle\", { onMouseDown: onMouseDown, onMouseEnter: onMouseEnter, onMouseOut: onMouseOut, className: cc([EdgeUpdaterClassName, `${EdgeUpdaterClassName}-${type}`]), cx: shiftX(centerX, radius, position), cy: shiftY(centerY, radius, position), r: radius, stroke: \"transparent\", fill: \"transparent\" }));\n}\n\nfunction EdgeUpdateAnchors({ isReconnectable, reconnectRadius, edge, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, onReconnect, onReconnectStart, onReconnectEnd, setReconnecting, setUpdateHover, }) {\n const store = useStoreApi();\n const handleEdgeUpdater = (event, oppositeHandle) => {\n // avoid triggering edge updater if mouse btn is not left\n if (event.button !== 0) {\n return;\n }\n const { autoPanOnConnect, domNode, connectionMode, connectionRadius, lib, onConnectStart, cancelConnection, nodeLookup, rfId: flowId, panBy, updateConnection, } = store.getState();\n const isTarget = oppositeHandle.type === 'target';\n const _onReconnectEnd = (evt, connectionState) => {\n setReconnecting(false);\n onReconnectEnd?.(evt, edge, oppositeHandle.type, connectionState);\n };\n const onConnectEdge = (connection) => onReconnect?.(edge, connection);\n const _onConnectStart = (_event, params) => {\n setReconnecting(true);\n onReconnectStart?.(event, edge, oppositeHandle.type);\n onConnectStart?.(_event, params);\n };\n XYHandle.onPointerDown(event.nativeEvent, {\n autoPanOnConnect,\n connectionMode,\n connectionRadius,\n domNode,\n handleId: oppositeHandle.id,\n nodeId: oppositeHandle.nodeId,\n nodeLookup,\n isTarget,\n edgeUpdaterType: oppositeHandle.type,\n lib,\n flowId,\n cancelConnection,\n panBy,\n isValidConnection: (...args) => store.getState().isValidConnection?.(...args) ?? true,\n onConnect: onConnectEdge,\n onConnectStart: _onConnectStart,\n onConnectEnd: (...args) => store.getState().onConnectEnd?.(...args),\n onReconnectEnd: _onReconnectEnd,\n updateConnection,\n getTransform: () => store.getState().transform,\n getFromHandle: () => store.getState().connection.fromHandle,\n dragThreshold: store.getState().connectionDragThreshold,\n handleDomNode: event.currentTarget,\n });\n };\n const onReconnectSourceMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.target, id: edge.targetHandle ?? null, type: 'target' });\n const onReconnectTargetMouseDown = (event) => handleEdgeUpdater(event, { nodeId: edge.source, id: edge.sourceHandle ?? null, type: 'source' });\n const onReconnectMouseEnter = () => setUpdateHover(true);\n const onReconnectMouseOut = () => setUpdateHover(false);\n return (jsxs(Fragment, { children: [(isReconnectable === true || isReconnectable === 'source') && (jsx(EdgeAnchor, { position: sourcePosition, centerX: sourceX, centerY: sourceY, radius: reconnectRadius, onMouseDown: onReconnectSourceMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: \"source\" })), (isReconnectable === true || isReconnectable === 'target') && (jsx(EdgeAnchor, { position: targetPosition, centerX: targetX, centerY: targetY, radius: reconnectRadius, onMouseDown: onReconnectTargetMouseDown, onMouseEnter: onReconnectMouseEnter, onMouseOut: onReconnectMouseOut, type: \"target\" }))] }));\n}\n\nfunction EdgeWrapper({ id, edgesFocusable, edgesReconnectable, elementsSelectable, onClick, onDoubleClick, onContextMenu, onMouseEnter, onMouseMove, onMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, rfId, edgeTypes, noPanClassName, onError, disableKeyboardA11y, }) {\n let edge = useStore((s) => s.edgeLookup.get(id));\n const defaultEdgeOptions = useStore((s) => s.defaultEdgeOptions);\n edge = defaultEdgeOptions ? { ...defaultEdgeOptions, ...edge } : edge;\n let edgeType = edge.type || 'default';\n let EdgeComponent = edgeTypes?.[edgeType] || builtinEdgeTypes[edgeType];\n if (EdgeComponent === undefined) {\n onError?.('011', errorMessages['error011'](edgeType));\n edgeType = 'default';\n EdgeComponent = edgeTypes?.['default'] || builtinEdgeTypes.default;\n }\n const isFocusable = !!(edge.focusable || (edgesFocusable && typeof edge.focusable === 'undefined'));\n const isReconnectable = typeof onReconnect !== 'undefined' &&\n (edge.reconnectable || (edgesReconnectable && typeof edge.reconnectable === 'undefined'));\n const isSelectable = !!(edge.selectable || (elementsSelectable && typeof edge.selectable === 'undefined'));\n const edgeRef = useRef(null);\n const [updateHover, setUpdateHover] = useState(false);\n const [reconnecting, setReconnecting] = useState(false);\n const store = useStoreApi();\n const { zIndex = edge.zIndex, sourceX, sourceY, targetX, targetY, sourcePosition, targetPosition, } = useStore(useCallback((store) => {\n const sourceNode = store.nodeLookup.get(edge.source);\n const targetNode = store.nodeLookup.get(edge.target);\n if (!sourceNode || !targetNode) {\n return nullPosition;\n }\n const edgePosition = getEdgePosition({\n id,\n sourceNode,\n targetNode,\n sourceHandle: edge.sourceHandle || null,\n targetHandle: edge.targetHandle || null,\n connectionMode: store.connectionMode,\n onError,\n });\n const zIndex = getElevatedEdgeZIndex({\n selected: edge.selected,\n zIndex: edge.zIndex,\n sourceNode,\n targetNode,\n elevateOnSelect: store.elevateEdgesOnSelect,\n zIndexMode: store.zIndexMode,\n });\n return {\n ...(edgePosition || nullPosition),\n zIndex,\n };\n }, [edge.source, edge.target, edge.sourceHandle, edge.targetHandle, edge.selected, edge.zIndex, onError]), shallow);\n const markerStartUrl = useMemo(() => (edge.markerStart ? `url('#${getMarkerId(edge.markerStart, rfId)}')` : undefined), [edge.markerStart, rfId]);\n const markerEndUrl = useMemo(() => (edge.markerEnd ? `url('#${getMarkerId(edge.markerEnd, rfId)}')` : undefined), [edge.markerEnd, rfId]);\n if (edge.hidden || sourceX === null || sourceY === null || targetX === null || targetY === null) {\n return null;\n }\n const onEdgeClick = (event) => {\n const { addSelectedEdges, unselectNodesAndEdges, multiSelectionActive } = store.getState();\n if (isSelectable) {\n store.setState({ nodesSelectionActive: false });\n if (edge.selected && multiSelectionActive) {\n unselectNodesAndEdges({ nodes: [], edges: [edge] });\n edgeRef.current?.blur();\n }\n else {\n addSelectedEdges([id]);\n }\n }\n if (onClick) {\n onClick(event, edge);\n }\n };\n const onEdgeDoubleClick = onDoubleClick\n ? (event) => {\n onDoubleClick(event, { ...edge });\n }\n : undefined;\n const onEdgeContextMenu = onContextMenu\n ? (event) => {\n onContextMenu(event, { ...edge });\n }\n : undefined;\n const onEdgeMouseEnter = onMouseEnter\n ? (event) => {\n onMouseEnter(event, { ...edge });\n }\n : undefined;\n const onEdgeMouseMove = onMouseMove\n ? (event) => {\n onMouseMove(event, { ...edge });\n }\n : undefined;\n const onEdgeMouseLeave = onMouseLeave\n ? (event) => {\n onMouseLeave(event, { ...edge });\n }\n : undefined;\n const onKeyDown = (event) => {\n if (!disableKeyboardA11y && elementSelectionKeys.includes(event.key) && isSelectable) {\n const { unselectNodesAndEdges, addSelectedEdges } = store.getState();\n const unselect = event.key === 'Escape';\n if (unselect) {\n edgeRef.current?.blur();\n unselectNodesAndEdges({ edges: [edge] });\n }\n else {\n addSelectedEdges([id]);\n }\n }\n };\n return (jsx(\"svg\", { style: { zIndex }, children: jsxs(\"g\", { className: cc([\n 'react-flow__edge',\n `react-flow__edge-${edgeType}`,\n edge.className,\n noPanClassName,\n {\n selected: edge.selected,\n animated: edge.animated,\n inactive: !isSelectable && !onClick,\n updating: updateHover,\n selectable: isSelectable,\n },\n ]), onClick: onEdgeClick, onDoubleClick: onEdgeDoubleClick, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onKeyDown: isFocusable ? onKeyDown : undefined, tabIndex: isFocusable ? 0 : undefined, role: edge.ariaRole ?? (isFocusable ? 'group' : 'img'), \"aria-roledescription\": \"edge\", \"data-id\": id, \"data-testid\": `rf__edge-${id}`, \"aria-label\": edge.ariaLabel === null ? undefined : edge.ariaLabel || `Edge from ${edge.source} to ${edge.target}`, \"aria-describedby\": isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : undefined, ref: edgeRef, ...edge.domAttributes, children: [!reconnecting && (jsx(EdgeComponent, { id: id, source: edge.source, target: edge.target, type: edge.type, selected: edge.selected, animated: edge.animated, selectable: isSelectable, deletable: edge.deletable ?? true, label: edge.label, labelStyle: edge.labelStyle, labelShowBg: edge.labelShowBg, labelBgStyle: edge.labelBgStyle, labelBgPadding: edge.labelBgPadding, labelBgBorderRadius: edge.labelBgBorderRadius, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, data: edge.data, style: edge.style, sourceHandleId: edge.sourceHandle, targetHandleId: edge.targetHandle, markerStart: markerStartUrl, markerEnd: markerEndUrl, pathOptions: 'pathOptions' in edge ? edge.pathOptions : undefined, interactionWidth: edge.interactionWidth })), isReconnectable && (jsx(EdgeUpdateAnchors, { edge: edge, isReconnectable: isReconnectable, reconnectRadius: reconnectRadius, onReconnect: onReconnect, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, sourceX: sourceX, sourceY: sourceY, targetX: targetX, targetY: targetY, sourcePosition: sourcePosition, targetPosition: targetPosition, setUpdateHover: setUpdateHover, setReconnecting: setReconnecting }))] }) }));\n}\nvar EdgeWrapper$1 = memo(EdgeWrapper);\n\nconst selector$9 = (s) => ({\n edgesFocusable: s.edgesFocusable,\n edgesReconnectable: s.edgesReconnectable,\n elementsSelectable: s.elementsSelectable,\n connectionMode: s.connectionMode,\n onError: s.onError,\n});\nfunction EdgeRendererComponent({ defaultMarkerColor, onlyRenderVisibleElements, rfId, edgeTypes, noPanClassName, onReconnect, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, onEdgeClick, reconnectRadius, onEdgeDoubleClick, onReconnectStart, onReconnectEnd, disableKeyboardA11y, }) {\n const { edgesFocusable, edgesReconnectable, elementsSelectable, onError } = useStore(selector$9, shallow);\n const edgeIds = useVisibleEdgeIds(onlyRenderVisibleElements);\n return (jsxs(\"div\", { className: \"react-flow__edges\", children: [jsx(MarkerDefinitions$1, { defaultColor: defaultMarkerColor, rfId: rfId }), edgeIds.map((id) => {\n return (jsx(EdgeWrapper$1, { id: id, edgesFocusable: edgesFocusable, edgesReconnectable: edgesReconnectable, elementsSelectable: elementsSelectable, noPanClassName: noPanClassName, onReconnect: onReconnect, onContextMenu: onEdgeContextMenu, onMouseEnter: onEdgeMouseEnter, onMouseMove: onEdgeMouseMove, onMouseLeave: onEdgeMouseLeave, onClick: onEdgeClick, reconnectRadius: reconnectRadius, onDoubleClick: onEdgeDoubleClick, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, rfId: rfId, onError: onError, edgeTypes: edgeTypes, disableKeyboardA11y: disableKeyboardA11y }, id));\n })] }));\n}\nEdgeRendererComponent.displayName = 'EdgeRenderer';\nconst EdgeRenderer = memo(EdgeRendererComponent);\n\nconst toTransformString = (transform) => `translate(${transform[0]}px,${transform[1]}px) scale(${transform[2]})`;\nfunction Viewport({ children }) {\n const store = useStoreApi();\n const viewportRef = useRef(null);\n // seed the transform for first paint and SSR without subscribing, so we don't re-render on pan/zoom\n const [initialTransform] = useState(() => store.getState().transform);\n // transform changes every pan/zoom frame, so write it to the DOM directly to keep React out of the hot path\n useIsomorphicLayoutEffect(() => {\n let prevTransform = null;\n const applyTransform = () => {\n const transform = store.getState().transform;\n // store.subscribe fires on every update, so only touch the DOM when x, y or zoom actually changed\n if (prevTransform &&\n transform[0] === prevTransform[0] &&\n transform[1] === prevTransform[1] &&\n transform[2] === prevTransform[2]) {\n return;\n }\n prevTransform = transform;\n if (viewportRef.current) {\n viewportRef.current.style.transform = toTransformString(transform);\n }\n };\n applyTransform();\n return store.subscribe(applyTransform);\n }, [store]);\n return (jsx(\"div\", { ref: viewportRef, className: \"react-flow__viewport xyflow__viewport react-flow__container\", style: { transform: toTransformString(initialTransform) }, children: children }));\n}\n\n/**\n * Hook for calling onInit handler.\n *\n * @internal\n */\nfunction useOnInitHandler(onInit) {\n const rfInstance = useReactFlow();\n const isInitialized = useRef(false);\n useEffect(() => {\n if (!isInitialized.current && rfInstance.viewportInitialized && onInit) {\n setTimeout(() => onInit(rfInstance), 1);\n isInitialized.current = true;\n }\n }, [onInit, rfInstance.viewportInitialized]);\n}\n\nconst selector$8 = (state) => state.panZoom?.syncViewport;\n/**\n * Hook for syncing the viewport with the panzoom instance.\n *\n * @internal\n * @param viewport\n */\nfunction useViewportSync(viewport) {\n const syncViewport = useStore(selector$8);\n const store = useStoreApi();\n useEffect(() => {\n if (viewport) {\n syncViewport?.(viewport);\n store.setState({ transform: [viewport.x, viewport.y, viewport.zoom] });\n }\n }, [viewport, syncViewport]);\n return null;\n}\n\nfunction storeSelector$1(s) {\n return s.connection.inProgress\n ? { ...s.connection, to: pointToRendererPoint(s.connection.to, s.transform) }\n : { ...s.connection };\n}\nfunction getSelector(connectionSelector) {\n if (connectionSelector) {\n const combinedSelector = (s) => {\n const connection = storeSelector$1(s);\n return connectionSelector(connection);\n };\n return combinedSelector;\n }\n return storeSelector$1;\n}\n/**\n * The `useConnection` hook returns the current connection when there is an active\n * connection interaction. If no connection interaction is active, it returns null\n * for every property. A typical use case for this hook is to colorize handles\n * based on a certain condition (e.g. if the connection is valid or not).\n *\n * @public\n * @param connectionSelector - An optional selector function used to extract a slice of the\n * `ConnectionState` data. Using a selector can prevent component re-renders where data you don't\n * otherwise care about might change. If a selector is not provided, the entire `ConnectionState`\n * object is returned unchanged.\n * @example\n *\n * ```tsx\n *import { useConnection } from '@xyflow/react';\n *\n *function App() {\n * const connection = useConnection();\n *\n * return (\n * <div> {connection ? `Someone is trying to make a connection from ${connection.fromNode} to this one.` : 'There are currently no incoming connections!'}\n *\n * </div>\n * );\n * }\n * ```\n *\n * @returns ConnectionState\n */\nfunction useConnection(connectionSelector) {\n const combinedSelector = getSelector(connectionSelector);\n return useStore(combinedSelector, shallow);\n}\n\nconst selector$7 = (s) => ({\n nodesConnectable: s.nodesConnectable,\n isValid: s.connection.isValid,\n inProgress: s.connection.inProgress,\n width: s.width,\n height: s.height,\n});\nfunction ConnectionLineWrapper({ containerStyle, style, type, component, }) {\n const { nodesConnectable, width, height, isValid, inProgress } = useStore(selector$7, shallow);\n const renderConnection = !!(width && nodesConnectable && inProgress);\n if (!renderConnection) {\n return null;\n }\n return (jsx(\"svg\", { style: containerStyle, width: width, height: height, className: \"react-flow__connectionline react-flow__container\", children: jsx(\"g\", { className: cc(['react-flow__connection', getConnectionStatus(isValid)]), children: jsx(ConnectionLine, { style: style, type: type, CustomComponent: component, isValid: isValid }) }) }));\n}\nconst ConnectionLine = ({ style, type = ConnectionLineType.Bezier, CustomComponent, isValid, }) => {\n const { inProgress, from, fromNode, fromHandle, fromPosition, to, toNode, toHandle, toPosition, pointer } = useConnection();\n if (!inProgress) {\n return;\n }\n if (CustomComponent) {\n return (jsx(CustomComponent, { connectionLineType: type, connectionLineStyle: style, fromNode: fromNode, fromHandle: fromHandle, fromX: from.x, fromY: from.y, toX: to.x, toY: to.y, fromPosition: fromPosition, toPosition: toPosition, connectionStatus: getConnectionStatus(isValid), toNode: toNode, toHandle: toHandle, pointer: pointer }));\n }\n let path = '';\n const pathParams = {\n sourceX: from.x,\n sourceY: from.y,\n sourcePosition: fromPosition,\n targetX: to.x,\n targetY: to.y,\n targetPosition: toPosition,\n };\n switch (type) {\n case ConnectionLineType.Bezier:\n [path] = getBezierPath(pathParams);\n break;\n case ConnectionLineType.SimpleBezier:\n [path] = getSimpleBezierPath(pathParams);\n break;\n case ConnectionLineType.Step:\n [path] = getSmoothStepPath({\n ...pathParams,\n borderRadius: 0,\n });\n break;\n case ConnectionLineType.SmoothStep:\n [path] = getSmoothStepPath(pathParams);\n break;\n default:\n [path] = getStraightPath(pathParams);\n }\n return jsx(\"path\", { d: path, fill: \"none\", className: \"react-flow__connection-path\", style: style });\n};\nConnectionLine.displayName = 'ConnectionLine';\n\nconst emptyTypes = {};\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction useNodeOrEdgeTypesWarning(nodeOrEdgeTypes = emptyTypes) {\n const typesRef = useRef(nodeOrEdgeTypes);\n const store = useStoreApi();\n useEffect(() => {\n if (process.env.NODE_ENV === 'development') {\n const usedKeys = new Set([...Object.keys(typesRef.current), ...Object.keys(nodeOrEdgeTypes)]);\n for (const key of usedKeys) {\n if (typesRef.current[key] !== nodeOrEdgeTypes[key]) {\n store.getState().onError?.('002', errorMessages['error002']());\n break;\n }\n }\n typesRef.current = nodeOrEdgeTypes;\n }\n }, [nodeOrEdgeTypes]);\n}\n\nfunction useStylesLoadedWarning() {\n const store = useStoreApi();\n const checked = useRef(false);\n useEffect(() => {\n if (process.env.NODE_ENV === 'development') {\n if (!checked.current) {\n const pane = document.querySelector('.react-flow__pane');\n if (pane && !(window.getComputedStyle(pane).zIndex === '1')) {\n store.getState().onError?.('013', errorMessages['error013']('react'));\n }\n checked.current = true;\n }\n }\n }, []);\n}\n\nfunction GraphViewComponent({ nodeTypes, edgeTypes, onInit, onNodeClick, onEdgeClick, onNodeDoubleClick, onEdgeDoubleClick, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onSelectionContextMenu, onSelectionStart, onSelectionEnd, connectionLineType, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, selectionKeyCode, selectionOnDrag, selectionMode, multiSelectionKeyCode, panActivationKeyCode, zoomActivationKeyCode, deleteKeyCode, onlyRenderVisibleElements, elementsSelectable, defaultViewport, translateExtent, minZoom, maxZoom, preventScrolling, defaultMarkerColor, zoomOnScroll, zoomOnPinch, panOnScroll, panOnScrollSpeed, panOnScrollMode, zoomOnDoubleClick, panOnDrag, autoPanOnSelection, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance, nodeClickDistance, onEdgeContextMenu, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius, onReconnect, onReconnectStart, onReconnectEnd, noDragClassName, noWheelClassName, noPanClassName, disableKeyboardA11y, nodeExtent, rfId, viewport, onViewportChange, nodesDraggable, }) {\n useNodeOrEdgeTypesWarning(nodeTypes);\n useNodeOrEdgeTypesWarning(edgeTypes);\n useStylesLoadedWarning();\n useOnInitHandler(onInit);\n useViewportSync(viewport);\n return (jsx(FlowRenderer, { onPaneClick: onPaneClick, onPaneMouseEnter: onPaneMouseEnter, onPaneMouseMove: onPaneMouseMove, onPaneMouseLeave: onPaneMouseLeave, onPaneContextMenu: onPaneContextMenu, onPaneScroll: onPaneScroll, paneClickDistance: paneClickDistance, deleteKeyCode: deleteKeyCode, selectionKeyCode: selectionKeyCode, selectionOnDrag: selectionOnDrag, selectionMode: selectionMode, onSelectionStart: onSelectionStart, onSelectionEnd: onSelectionEnd, multiSelectionKeyCode: multiSelectionKeyCode, panActivationKeyCode: panActivationKeyCode, zoomActivationKeyCode: zoomActivationKeyCode, elementsSelectable: elementsSelectable, zoomOnScroll: zoomOnScroll, zoomOnPinch: zoomOnPinch, zoomOnDoubleClick: zoomOnDoubleClick, panOnScroll: panOnScroll, panOnScrollSpeed: panOnScrollSpeed, panOnScrollMode: panOnScrollMode, panOnDrag: panOnDrag, autoPanOnSelection: autoPanOnSelection, defaultViewport: defaultViewport, translateExtent: translateExtent, minZoom: minZoom, maxZoom: maxZoom, onSelectionContextMenu: onSelectionContextMenu, preventScrolling: preventScrolling, noDragClassName: noDragClassName, noWheelClassName: noWheelClassName, noPanClassName: noPanClassName, disableKeyboardA11y: disableKeyboardA11y, onViewportChange: onViewportChange, isControlledViewport: !!viewport, children: jsxs(Viewport, { children: [jsx(EdgeRenderer, { edgeTypes: edgeTypes, onEdgeClick: onEdgeClick, onEdgeDoubleClick: onEdgeDoubleClick, onReconnect: onReconnect, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, onlyRenderVisibleElements: onlyRenderVisibleElements, onEdgeContextMenu: onEdgeContextMenu, onEdgeMouseEnter: onEdgeMouseEnter, onEdgeMouseMove: onEdgeMouseMove, onEdgeMouseLeave: onEdgeMouseLeave, reconnectRadius: reconnectRadius, defaultMarkerColor: defaultMarkerColor, noPanClassName: noPanClassName, disableKeyboardA11y: disableKeyboardA11y, rfId: rfId }), jsx(ConnectionLineWrapper, { style: connectionLineStyle, type: connectionLineType, component: connectionLineComponent, containerStyle: connectionLineContainerStyle }), jsx(\"div\", { className: \"react-flow__edgelabel-renderer\" }), jsx(NodeRenderer, { nodeTypes: nodeTypes, onNodeClick: onNodeClick, onNodeDoubleClick: onNodeDoubleClick, onNodeMouseEnter: onNodeMouseEnter, onNodeMouseMove: onNodeMouseMove, onNodeMouseLeave: onNodeMouseLeave, onNodeContextMenu: onNodeContextMenu, nodeClickDistance: nodeClickDistance, onlyRenderVisibleElements: onlyRenderVisibleElements, noPanClassName: noPanClassName, noDragClassName: noDragClassName, disableKeyboardA11y: disableKeyboardA11y, nodeExtent: nodeExtent, rfId: rfId, nodesDraggable: nodesDraggable }), jsx(\"div\", { className: \"react-flow__viewport-portal\" })] }) }));\n}\nGraphViewComponent.displayName = 'GraphView';\nconst GraphView = memo(GraphViewComponent);\n\nconst devWarn = createDevWarn('React Flow', 'https://reactflow.dev/');\nconst getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView, fitViewOptions, minZoom = 0.5, maxZoom = 2, nodeOrigin, nodeExtent, zIndexMode = 'basic', } = {}) => {\n const nodeLookup = new Map();\n const parentLookup = new Map();\n const connectionLookup = new Map();\n const edgeLookup = new Map();\n const storeEdges = defaultEdges ?? edges ?? [];\n const storeNodes = defaultNodes ?? nodes ?? [];\n const storeNodeOrigin = nodeOrigin ?? [0, 0];\n const storeNodeExtent = nodeExtent ?? infiniteExtent;\n updateConnectionLookup(connectionLookup, edgeLookup, storeEdges);\n const { nodesInitialized } = adoptUserNodes(storeNodes, nodeLookup, parentLookup, {\n nodeOrigin: storeNodeOrigin,\n nodeExtent: storeNodeExtent,\n zIndexMode,\n });\n let transform = [0, 0, 1];\n if (fitView && width && height) {\n const bounds = getInternalNodesBounds(nodeLookup, {\n filter: (node) => !!((node.width || node.initialWidth) && (node.height || node.initialHeight)),\n });\n const { x, y, zoom } = getViewportForBounds(bounds, width, height, minZoom, maxZoom, fitViewOptions?.padding ?? 0.1);\n transform = [x, y, zoom];\n }\n return {\n rfId: '1',\n width: width ?? 0,\n height: height ?? 0,\n transform,\n nodes: storeNodes,\n nodesInitialized,\n nodeLookup,\n parentLookup,\n edges: storeEdges,\n edgeLookup,\n connectionLookup,\n onNodesChange: null,\n onEdgesChange: null,\n hasDefaultNodes: defaultNodes !== undefined,\n hasDefaultEdges: defaultEdges !== undefined,\n panZoom: null,\n minZoom,\n maxZoom,\n translateExtent: infiniteExtent,\n nodeExtent: storeNodeExtent,\n nodesSelectionActive: false,\n userSelectionActive: false,\n userSelectionRect: null,\n connectionMode: ConnectionMode.Strict,\n domNode: null,\n paneDragging: false,\n noPanClassName: 'nopan',\n nodeOrigin: storeNodeOrigin,\n nodeDragThreshold: 1,\n connectionDragThreshold: 1,\n snapGrid: [15, 15],\n snapToGrid: false,\n nodesDraggable: true,\n nodesConnectable: true,\n nodesFocusable: true,\n edgesFocusable: true,\n edgesReconnectable: true,\n elementsSelectable: true,\n elevateNodesOnSelect: true,\n elevateEdgesOnSelect: true,\n selectNodesOnDrag: true,\n multiSelectionActive: false,\n fitViewQueued: fitView ?? false,\n fitViewOptions,\n fitViewResolver: null,\n connection: { ...initialConnection },\n connectionClickStartHandle: null,\n connectOnClick: true,\n ariaLiveMessage: '',\n autoPanOnConnect: true,\n autoPanOnNodeDrag: true,\n autoPanOnNodeFocus: true,\n autoPanSpeed: 15,\n connectionRadius: 20,\n onError: devWarn,\n isValidConnection: undefined,\n onSelectionChangeHandlers: [],\n lib: 'react',\n debug: false,\n ariaLabelConfig: defaultAriaLabelConfig,\n zIndexMode,\n defaultEdgeOptions: undefined,\n onNodesChangeMiddlewareMap: new Map(),\n onEdgesChangeMiddlewareMap: new Map(),\n onNodesDelete: undefined,\n onEdgesDelete: undefined,\n onDelete: undefined,\n onBeforeDelete: undefined,\n onViewportChangeStart: undefined,\n onViewportChange: undefined,\n onViewportChangeEnd: undefined,\n onNodeDragStart: undefined,\n onNodeDrag: undefined,\n onNodeDragStop: undefined,\n onSelectionDragStart: undefined,\n onSelectionDrag: undefined,\n onSelectionDragStop: undefined,\n onMoveStart: undefined,\n onMove: undefined,\n onMoveEnd: undefined,\n onConnect: undefined,\n onConnectStart: undefined,\n onConnectEnd: undefined,\n onClickConnectStart: undefined,\n onClickConnectEnd: undefined,\n };\n};\n\nconst createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height, fitView, fitViewOptions, minZoom, maxZoom, nodeOrigin, nodeExtent, zIndexMode, }) => createWithEqualityFn((set, get) => {\n async function resolveFitView() {\n const { nodeLookup, panZoom, fitViewOptions, fitViewResolver, width, height, minZoom, maxZoom } = get();\n if (!panZoom) {\n return;\n }\n await fitViewport({\n nodes: nodeLookup,\n width,\n height,\n panZoom,\n minZoom,\n maxZoom,\n }, fitViewOptions);\n fitViewResolver?.resolve(true);\n /**\n * wait for the fitViewport to resolve before deleting the resolver,\n * we want to reuse the old resolver if the user calls fitView again in the mean time\n */\n set({ fitViewResolver: null });\n }\n return {\n ...getInitialState({\n nodes,\n edges,\n width,\n height,\n fitView,\n fitViewOptions,\n minZoom,\n maxZoom,\n nodeOrigin,\n nodeExtent,\n defaultNodes,\n defaultEdges,\n zIndexMode,\n }),\n setNodes: (nodes) => {\n const { nodeLookup, parentLookup, nodeOrigin, nodeExtent, elevateNodesOnSelect, fitViewQueued, zIndexMode, nodesSelectionActive, } = get();\n /*\n * setNodes() is called exclusively in response to user actions:\n * - either when the `<ReactFlow nodes>` prop is updated in the controlled ReactFlow setup,\n * - or when the user calls something like `reactFlowInstance.setNodes()` in an uncontrolled ReactFlow setup.\n *\n * When this happens, we take the note objects passed by the user and extend them with fields\n * relevant for internal React Flow operations.\n */\n const { nodesInitialized, hasSelectedNodes } = adoptUserNodes(nodes, nodeLookup, parentLookup, {\n nodeOrigin,\n nodeExtent,\n elevateNodesOnSelect,\n checkEquality: true,\n zIndexMode,\n });\n const nextNodesSelectionActive = nodesSelectionActive && hasSelectedNodes;\n if (fitViewQueued && nodesInitialized) {\n resolveFitView();\n set({\n nodes,\n nodesInitialized,\n fitViewQueued: false,\n fitViewOptions: undefined,\n nodesSelectionActive: nextNodesSelectionActive\n });\n }\n else {\n set({ nodes, nodesInitialized, nodesSelectionActive: nextNodesSelectionActive });\n }\n },\n setEdges: (edges) => {\n const { connectionLookup, edgeLookup } = get();\n updateConnectionLookup(connectionLookup, edgeLookup, edges);\n set({ edges });\n },\n setDefaultNodesAndEdges: (nodes, edges) => {\n if (nodes) {\n const { setNodes } = get();\n setNodes(nodes);\n set({ hasDefaultNodes: true });\n }\n if (edges) {\n const { setEdges } = get();\n setEdges(edges);\n set({ hasDefaultEdges: true });\n }\n },\n /*\n * Every node gets registered at a ResizeObserver. Whenever a node\n * changes its dimensions, this function is called to measure the\n * new dimensions and update the nodes.\n */\n updateNodeInternals: (updates) => {\n const { triggerNodeChanges, nodeLookup, parentLookup, domNode, nodeOrigin, nodeExtent, debug, fitViewQueued, zIndexMode, } = get();\n const { changes, updatedInternals } = updateNodeInternals(updates, nodeLookup, parentLookup, domNode, nodeOrigin, nodeExtent, zIndexMode);\n if (!updatedInternals) {\n return;\n }\n updateAbsolutePositions(nodeLookup, parentLookup, { nodeOrigin, nodeExtent, zIndexMode });\n if (fitViewQueued) {\n resolveFitView();\n set({ fitViewQueued: false, fitViewOptions: undefined });\n }\n else {\n // we always want to trigger useStore calls whenever updateNodeInternals is called\n set({});\n }\n if (changes?.length > 0) {\n if (debug) {\n console.log('React Flow: trigger node changes', changes);\n }\n triggerNodeChanges?.(changes);\n }\n },\n updateNodePositions: (nodeDragItems, dragging = false) => {\n const parentExpandChildren = [];\n let changes = [];\n const { nodeLookup, triggerNodeChanges, connection, updateConnection, onNodesChangeMiddlewareMap } = get();\n for (const [id, dragItem] of nodeDragItems) {\n // we are using the nodelookup to be sure to use the current expandParent and parentId value\n const node = nodeLookup.get(id);\n const expandParent = !!(node?.expandParent && node?.parentId && dragItem?.position);\n const change = {\n id,\n type: 'position',\n position: expandParent\n ? {\n x: Math.max(0, dragItem.position.x),\n y: Math.max(0, dragItem.position.y),\n }\n : dragItem.position,\n dragging,\n };\n if (node && connection.inProgress && connection.fromNode.id === node.id) {\n const updatedFrom = getHandlePosition(node, connection.fromHandle, Position.Left, true);\n updateConnection({ ...connection, from: updatedFrom });\n }\n if (expandParent && node.parentId) {\n parentExpandChildren.push({\n id,\n parentId: node.parentId,\n rect: {\n ...dragItem.internals.positionAbsolute,\n width: dragItem.measured.width ?? 0,\n height: dragItem.measured.height ?? 0,\n },\n });\n }\n changes.push(change);\n }\n if (parentExpandChildren.length > 0) {\n const { parentLookup, nodeOrigin } = get();\n const parentExpandChanges = handleExpandParent(parentExpandChildren, nodeLookup, parentLookup, nodeOrigin);\n changes.push(...parentExpandChanges);\n }\n for (const middleware of onNodesChangeMiddlewareMap.values()) {\n changes = middleware(changes);\n }\n triggerNodeChanges(changes);\n },\n triggerNodeChanges: (changes) => {\n const { onNodesChange, setNodes, nodes, hasDefaultNodes, debug } = get();\n if (changes?.length) {\n if (hasDefaultNodes) {\n const updatedNodes = applyNodeChanges(changes, nodes);\n setNodes(updatedNodes);\n }\n if (debug) {\n console.log('React Flow: trigger node changes', changes);\n }\n onNodesChange?.(changes);\n }\n },\n triggerEdgeChanges: (changes) => {\n const { onEdgesChange, setEdges, edges, hasDefaultEdges, debug } = get();\n if (changes?.length) {\n if (hasDefaultEdges) {\n const updatedEdges = applyEdgeChanges(changes, edges);\n setEdges(updatedEdges);\n }\n if (debug) {\n console.log('React Flow: trigger edge changes', changes);\n }\n onEdgesChange?.(changes);\n }\n },\n addSelectedNodes: (selectedNodeIds) => {\n const { multiSelectionActive, edgeLookup, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = get();\n if (multiSelectionActive) {\n const nodeChanges = selectedNodeIds.map((nodeId) => createSelectionChange(nodeId, true));\n triggerNodeChanges(nodeChanges);\n return;\n }\n triggerNodeChanges(getSelectionChanges(nodeLookup, new Set([...selectedNodeIds]), true));\n triggerEdgeChanges(getSelectionChanges(edgeLookup));\n },\n addSelectedEdges: (selectedEdgeIds) => {\n const { multiSelectionActive, edgeLookup, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = get();\n if (multiSelectionActive) {\n const changedEdges = selectedEdgeIds.map((edgeId) => createSelectionChange(edgeId, true));\n triggerEdgeChanges(changedEdges);\n return;\n }\n triggerEdgeChanges(getSelectionChanges(edgeLookup, new Set([...selectedEdgeIds])));\n triggerNodeChanges(getSelectionChanges(nodeLookup, new Set(), true));\n },\n unselectNodesAndEdges: ({ nodes, edges } = {}) => {\n const { edges: storeEdges, nodes: storeNodes, nodeLookup, triggerNodeChanges, triggerEdgeChanges } = get();\n const nodesToUnselect = nodes ? nodes : storeNodes;\n const edgesToUnselect = edges ? edges : storeEdges;\n const nodeChanges = [];\n for (const node of nodesToUnselect) {\n if (!node.selected) {\n continue; // skip changing nodes that are not selected\n }\n const internalNode = nodeLookup.get(node.id);\n if (internalNode) {\n /*\n * we need to unselect the internal node that was selected previously before we\n * send the change to the user to prevent it to be selected while dragging the new node\n */\n internalNode.selected = false;\n }\n nodeChanges.push(createSelectionChange(node.id, false));\n }\n const edgeChanges = [];\n for (const edge of edgesToUnselect) {\n if (!edge.selected) {\n continue; // skip changing edges that are not selected\n }\n edgeChanges.push(createSelectionChange(edge.id, false));\n }\n triggerNodeChanges(nodeChanges);\n triggerEdgeChanges(edgeChanges);\n },\n setMinZoom: (minZoom) => {\n const { panZoom, maxZoom } = get();\n panZoom?.setScaleExtent([minZoom, maxZoom]);\n set({ minZoom });\n },\n setMaxZoom: (maxZoom) => {\n const { panZoom, minZoom } = get();\n panZoom?.setScaleExtent([minZoom, maxZoom]);\n set({ maxZoom });\n },\n setTranslateExtent: (translateExtent) => {\n get().panZoom?.setTranslateExtent(translateExtent);\n set({ translateExtent });\n },\n resetSelectedElements: () => {\n const { edges, nodes, triggerNodeChanges, triggerEdgeChanges, elementsSelectable } = get();\n if (!elementsSelectable) {\n return;\n }\n const nodeChanges = nodes.reduce((res, node) => (node.selected ? [...res, createSelectionChange(node.id, false)] : res), []);\n const edgeChanges = edges.reduce((res, edge) => (edge.selected ? [...res, createSelectionChange(edge.id, false)] : res), []);\n triggerNodeChanges(nodeChanges);\n triggerEdgeChanges(edgeChanges);\n },\n setNodeExtent: (nextNodeExtent) => {\n const { nodes, nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect, nodeExtent, zIndexMode } = get();\n if (nextNodeExtent[0][0] === nodeExtent[0][0] &&\n nextNodeExtent[0][1] === nodeExtent[0][1] &&\n nextNodeExtent[1][0] === nodeExtent[1][0] &&\n nextNodeExtent[1][1] === nodeExtent[1][1]) {\n return;\n }\n adoptUserNodes(nodes, nodeLookup, parentLookup, {\n nodeOrigin,\n nodeExtent: nextNodeExtent,\n elevateNodesOnSelect,\n checkEquality: false,\n zIndexMode,\n });\n set({ nodeExtent: nextNodeExtent });\n },\n panBy: (delta) => {\n const { transform, width, height, panZoom, translateExtent } = get();\n return panBy({ delta, panZoom, transform, translateExtent, width, height });\n },\n setCenter: async (x, y, options) => {\n const { width, height, maxZoom, panZoom } = get();\n if (!panZoom) {\n return false;\n }\n const nextZoom = typeof options?.zoom !== 'undefined' ? options.zoom : maxZoom;\n await panZoom.setViewport({\n x: width / 2 - x * nextZoom,\n y: height / 2 - y * nextZoom,\n zoom: nextZoom,\n }, { duration: options?.duration, ease: options?.ease, interpolate: options?.interpolate });\n return true;\n },\n cancelConnection: () => {\n set({\n connection: { ...initialConnection },\n });\n },\n updateConnection: (connection) => {\n set({ connection });\n },\n reset: () => set({ ...getInitialState() }),\n };\n}, Object.is);\n\n/**\n * The `<ReactFlowProvider />` component is a [context provider](https://react.dev/learn/passing-data-deeply-with-context#)\n * that makes it possible to access a flow's internal state outside of the\n * [`<ReactFlow />`](/api-reference/react-flow) component. Many of the hooks we\n * provide rely on this component to work.\n * @public\n *\n * @example\n * ```tsx\n *import { ReactFlow, ReactFlowProvider, useNodes } from '@xyflow/react'\n *\n *export default function Flow() {\n * return (\n * <ReactFlowProvider>\n * <ReactFlow nodes={...} edges={...} />\n * <Sidebar />\n * </ReactFlowProvider>\n * );\n *}\n *\n *function Sidebar() {\n * // This hook will only work if the component it's used in is a child of a\n * // <ReactFlowProvider />.\n * const nodes = useNodes()\n *\n * return <aside>do something with nodes</aside>;\n *}\n *```\n *\n * @remarks If you're using a router and want your flow's state to persist across routes,\n * it's vital that you place the `<ReactFlowProvider />` component _outside_ of\n * your router. If you have multiple flows on the same page you will need to use a separate\n * `<ReactFlowProvider />` for each flow.\n */\nfunction ReactFlowProvider({ initialNodes: nodes, initialEdges: edges, defaultNodes, defaultEdges, initialWidth: width, initialHeight: height, initialMinZoom: minZoom, initialMaxZoom: maxZoom, initialFitViewOptions: fitViewOptions, fitView, nodeOrigin, nodeExtent, zIndexMode, children, }) {\n const [store] = useState(() => createStore({\n nodes,\n edges,\n defaultNodes,\n defaultEdges,\n width,\n height,\n fitView,\n minZoom,\n maxZoom,\n fitViewOptions,\n nodeOrigin,\n nodeExtent,\n zIndexMode,\n }));\n return (jsx(Provider$1, { value: store, children: jsx(BatchProvider, { children: jsx(HandleConfigProvider, { children: children }) }) }));\n}\n\nfunction Wrapper({ children, nodes, edges, defaultNodes, defaultEdges, width, height, fitView, fitViewOptions, minZoom, maxZoom, nodeOrigin, nodeExtent, zIndexMode, }) {\n const isWrapped = useContext(StoreContext);\n if (isWrapped) {\n /*\n * we need to wrap it with a fragment because it's not allowed for children to be a ReactNode\n * https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18051\n */\n return jsx(Fragment, { children: children });\n }\n return (jsx(ReactFlowProvider, { initialNodes: nodes, initialEdges: edges, defaultNodes: defaultNodes, defaultEdges: defaultEdges, initialWidth: width, initialHeight: height, fitView: fitView, initialFitViewOptions: fitViewOptions, initialMinZoom: minZoom, initialMaxZoom: maxZoom, nodeOrigin: nodeOrigin, nodeExtent: nodeExtent, zIndexMode: zIndexMode, children: children }));\n}\n\nconst wrapperStyle = {\n width: '100%',\n height: '100%',\n overflow: 'hidden',\n position: 'relative',\n zIndex: 0,\n};\nfunction ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTypes, edgeTypes, onNodeClick, onEdgeClick, onInit, onMove, onMoveStart, onMoveEnd, onConnect, onConnectStart, onConnectEnd, onClickConnectStart, onClickConnectEnd, onNodeMouseEnter, onNodeMouseMove, onNodeMouseLeave, onNodeContextMenu, onNodeDoubleClick, onNodeDragStart, onNodeDrag, onNodeDragStop, onNodesDelete, onEdgesDelete, onDelete, onSelectionChange, onSelectionDragStart, onSelectionDrag, onSelectionDragStop, onSelectionContextMenu, onSelectionStart, onSelectionEnd, onBeforeDelete, connectionMode, connectionLineType = ConnectionLineType.Bezier, connectionLineStyle, connectionLineComponent, connectionLineContainerStyle, deleteKeyCode = 'Backspace', selectionKeyCode = 'Shift', selectionOnDrag = false, selectionMode = SelectionMode.Full, panActivationKeyCode = 'Space', multiSelectionKeyCode = isMacOs() ? 'Meta' : 'Control', zoomActivationKeyCode = isMacOs() ? 'Meta' : 'Control', snapToGrid, snapGrid, onlyRenderVisibleElements = false, selectNodesOnDrag, nodesDraggable, autoPanOnNodeFocus, nodesConnectable, nodesFocusable, nodeOrigin = defaultNodeOrigin, edgesFocusable, edgesReconnectable, elementsSelectable = true, defaultViewport: defaultViewport$1 = defaultViewport, minZoom = 0.5, maxZoom = 2, translateExtent = infiniteExtent, preventScrolling = true, nodeExtent, defaultMarkerColor = '#b1b1b7', zoomOnScroll = true, zoomOnPinch = true, panOnScroll = false, panOnScrollSpeed = 0.5, panOnScrollMode = PanOnScrollMode.Free, zoomOnDoubleClick = true, panOnDrag = true, onPaneClick, onPaneMouseEnter, onPaneMouseMove, onPaneMouseLeave, onPaneScroll, onPaneContextMenu, paneClickDistance = 1, nodeClickDistance = 0, children, onReconnect, onReconnectStart, onReconnectEnd, onEdgeContextMenu, onEdgeDoubleClick, onEdgeMouseEnter, onEdgeMouseMove, onEdgeMouseLeave, reconnectRadius = 10, onNodesChange, onEdgesChange, noDragClassName = 'nodrag', noWheelClassName = 'nowheel', noPanClassName = 'nopan', fitView, fitViewOptions, connectOnClick, attributionPosition, proOptions, defaultEdgeOptions, elevateNodesOnSelect = true, elevateEdgesOnSelect = false, disableKeyboardA11y = false, autoPanOnConnect, autoPanOnNodeDrag, autoPanOnSelection = true, autoPanSpeed, connectionRadius, isValidConnection, onError, style, id, nodeDragThreshold, connectionDragThreshold, viewport, onViewportChange, width, height, colorMode = 'light', debug, onScroll, ariaLabelConfig, zIndexMode = 'basic', ...rest }, ref) {\n const rfId = id || '1';\n const colorModeClassName = useColorModeClass(colorMode);\n // Undo scroll events, preventing viewport from shifting when nodes outside of it are focused\n const wrapperOnScroll = useCallback((e) => {\n e.currentTarget.scrollTo({ top: 0, left: 0, behavior: 'instant' });\n onScroll?.(e);\n }, [onScroll]);\n return (jsx(\"div\", { \"data-testid\": \"rf__wrapper\", ...rest, onScroll: wrapperOnScroll, style: { ...style, ...wrapperStyle }, ref: ref, className: cc(['react-flow', className, colorModeClassName]), id: id, role: \"application\", children: jsxs(Wrapper, { nodes: nodes, edges: edges, width: width, height: height, fitView: fitView, fitViewOptions: fitViewOptions, minZoom: minZoom, maxZoom: maxZoom, nodeOrigin: nodeOrigin, nodeExtent: nodeExtent, zIndexMode: zIndexMode, children: [jsx(StoreUpdater, { nodes: nodes, edges: edges, defaultNodes: defaultNodes, defaultEdges: defaultEdges, onConnect: onConnect, onConnectStart: onConnectStart, onConnectEnd: onConnectEnd, onClickConnectStart: onClickConnectStart, onClickConnectEnd: onClickConnectEnd, nodesDraggable: nodesDraggable, autoPanOnNodeFocus: autoPanOnNodeFocus, nodesConnectable: nodesConnectable, nodesFocusable: nodesFocusable, edgesFocusable: edgesFocusable, edgesReconnectable: edgesReconnectable, elementsSelectable: elementsSelectable, elevateNodesOnSelect: elevateNodesOnSelect, elevateEdgesOnSelect: elevateEdgesOnSelect, minZoom: minZoom, maxZoom: maxZoom, nodeExtent: nodeExtent, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, snapToGrid: snapToGrid, snapGrid: snapGrid, connectionMode: connectionMode, translateExtent: translateExtent, connectOnClick: connectOnClick, defaultEdgeOptions: defaultEdgeOptions, fitView: fitView, fitViewOptions: fitViewOptions, onNodesDelete: onNodesDelete, onEdgesDelete: onEdgesDelete, onDelete: onDelete, onNodeDragStart: onNodeDragStart, onNodeDrag: onNodeDrag, onNodeDragStop: onNodeDragStop, onSelectionDrag: onSelectionDrag, onSelectionDragStart: onSelectionDragStart, onSelectionDragStop: onSelectionDragStop, onMove: onMove, onMoveStart: onMoveStart, onMoveEnd: onMoveEnd, noPanClassName: noPanClassName, nodeOrigin: nodeOrigin, rfId: rfId, autoPanOnConnect: autoPanOnConnect, autoPanOnNodeDrag: autoPanOnNodeDrag, autoPanSpeed: autoPanSpeed, onError: onError, connectionRadius: connectionRadius, isValidConnection: isValidConnection, selectNodesOnDrag: selectNodesOnDrag, nodeDragThreshold: nodeDragThreshold, connectionDragThreshold: connectionDragThreshold, onBeforeDelete: onBeforeDelete, debug: debug, ariaLabelConfig: ariaLabelConfig, zIndexMode: zIndexMode }), jsx(GraphView, { onInit: onInit, onNodeClick: onNodeClick, onEdgeClick: onEdgeClick, onNodeMouseEnter: onNodeMouseEnter, onNodeMouseMove: onNodeMouseMove, onNodeMouseLeave: onNodeMouseLeave, onNodeContextMenu: onNodeContextMenu, onNodeDoubleClick: onNodeDoubleClick, nodeTypes: nodeTypes, edgeTypes: edgeTypes, connectionLineType: connectionLineType, connectionLineStyle: connectionLineStyle, connectionLineComponent: connectionLineComponent, connectionLineContainerStyle: connectionLineContainerStyle, selectionKeyCode: selectionKeyCode, selectionOnDrag: selectionOnDrag, selectionMode: selectionMode, deleteKeyCode: deleteKeyCode, multiSelectionKeyCode: multiSelectionKeyCode, panActivationKeyCode: panActivationKeyCode, zoomActivationKeyCode: zoomActivationKeyCode, onlyRenderVisibleElements: onlyRenderVisibleElements, defaultViewport: defaultViewport$1, translateExtent: translateExtent, minZoom: minZoom, maxZoom: maxZoom, preventScrolling: preventScrolling, zoomOnScroll: zoomOnScroll, zoomOnPinch: zoomOnPinch, zoomOnDoubleClick: zoomOnDoubleClick, panOnScroll: panOnScroll, panOnScrollSpeed: panOnScrollSpeed, panOnScrollMode: panOnScrollMode, panOnDrag: panOnDrag, autoPanOnSelection: autoPanOnSelection, onPaneClick: onPaneClick, onPaneMouseEnter: onPaneMouseEnter, onPaneMouseMove: onPaneMouseMove, onPaneMouseLeave: onPaneMouseLeave, onPaneScroll: onPaneScroll, onPaneContextMenu: onPaneContextMenu, paneClickDistance: paneClickDistance, nodeClickDistance: nodeClickDistance, onSelectionContextMenu: onSelectionContextMenu, onSelectionStart: onSelectionStart, onSelectionEnd: onSelectionEnd, onReconnect: onReconnect, onReconnectStart: onReconnectStart, onReconnectEnd: onReconnectEnd, onEdgeContextMenu: onEdgeContextMenu, onEdgeDoubleClick: onEdgeDoubleClick, onEdgeMouseEnter: onEdgeMouseEnter, onEdgeMouseMove: onEdgeMouseMove, onEdgeMouseLeave: onEdgeMouseLeave, reconnectRadius: reconnectRadius, defaultMarkerColor: defaultMarkerColor, noDragClassName: noDragClassName, noWheelClassName: noWheelClassName, noPanClassName: noPanClassName, rfId: rfId, disableKeyboardA11y: disableKeyboardA11y, nodeExtent: nodeExtent, viewport: viewport, onViewportChange: onViewportChange, nodesDraggable: nodesDraggable }), jsx(SelectionListener, { onSelectionChange: onSelectionChange }), children, jsx(Attribution, { proOptions: proOptions, position: attributionPosition }), jsx(A11yDescriptions, { rfId: rfId, disableKeyboardA11y: disableKeyboardA11y })] }) }));\n}\n/**\n * The `<ReactFlow />` component is the heart of your React Flow application.\n * It renders your nodes and edges and handles user interaction\n *\n * @public\n *\n * @example\n * ```tsx\n *import { ReactFlow } from '@xyflow/react'\n *\n *export default function Flow() {\n * return (<ReactFlow\n * nodes={...}\n * edges={...}\n * onNodesChange={...}\n * ...\n * />);\n *}\n *```\n */\nvar index = fixedForwardRef(ReactFlow);\n\nconst selector$6 = (s) => s.domNode?.querySelector('.react-flow__edgelabel-renderer');\n/**\n * Edges are SVG-based. If you want to render more complex labels you can use the\n * `<EdgeLabelRenderer />` component to access a div based renderer. This component\n * is a portal that renders the label in a `<div />` that is positioned on top of\n * the edges. You can see an example usage of the component in the\n * [edge label renderer example](/examples/edges/edge-label-renderer).\n * @public\n *\n * @example\n * ```jsx\n * import React from 'react';\n * import { getBezierPath, EdgeLabelRenderer, BaseEdge } from '@xyflow/react';\n *\n * export function CustomEdge({ id, data, ...props }) {\n * const [edgePath, labelX, labelY] = getBezierPath(props);\n *\n * return (\n * <>\n * <BaseEdge id={id} path={edgePath} />\n * <EdgeLabelRenderer>\n * <div\n * style={{\n * position: 'absolute',\n * transform: `translate(-50%, -50%) translate(${labelX}px,${labelY}px)`,\n * background: '#ffcc00',\n * padding: 10,\n * }}\n * className=\"nodrag nopan\"\n * >\n * {data.label}\n * </div>\n * </EdgeLabelRenderer>\n * </>\n * );\n * };\n * ```\n *\n * @remarks The `<EdgeLabelRenderer />` has no pointer events by default. If you want to\n * add mouse interactions you need to set the style `pointerEvents: all` and add\n * the `nopan` class on the label or the element you want to interact with.\n */\nfunction EdgeLabelRenderer({ children }) {\n const edgeLabelRenderer = useStore(selector$6);\n if (!edgeLabelRenderer) {\n return null;\n }\n return createPortal(children, edgeLabelRenderer);\n}\n\nconst selector$5 = (s) => s.domNode?.querySelector('.react-flow__viewport-portal');\n/**\n * The `<ViewportPortal />` component can be used to add components to the same viewport\n * of the flow where nodes and edges are rendered. This is useful when you want to render\n * your own components that are adhere to the same coordinate system as the nodes & edges\n * and are also affected by zooming and panning\n * @public\n * @example\n *\n * ```jsx\n *import React from 'react';\n *import { ViewportPortal } from '@xyflow/react';\n *\n *export default function () {\n * return (\n * <ViewportPortal>\n * <div\n * style={{ transform: 'translate(100px, 100px)', position: 'absolute' }}\n * >\n * This div is positioned at [100, 100] on the flow.\n * </div>\n * </ViewportPortal>\n * );\n *}\n *```\n */\nfunction ViewportPortal({ children }) {\n const viewPortalDiv = useStore(selector$5);\n if (!viewPortalDiv) {\n return null;\n }\n return createPortal(children, viewPortalDiv);\n}\n\n/**\n * When you programmatically add or remove handles to a node or update a node's\n * handle position, you need to let React Flow know about it using this hook. This\n * will update the internal dimensions of the node and properly reposition handles\n * on the canvas if necessary.\n *\n * @public\n * @returns Use this function to tell React Flow to update the internal state of one or more nodes\n * that you have changed programmatically.\n *\n * @example\n * ```jsx\n *import { useCallback, useState } from 'react';\n *import { Handle, useUpdateNodeInternals } from '@xyflow/react';\n *\n *export default function RandomHandleNode({ id }) {\n * const updateNodeInternals = useUpdateNodeInternals();\n * const [handleCount, setHandleCount] = useState(0);\n * const randomizeHandleCount = useCallback(() => {\n * setHandleCount(Math.floor(Math.random() * 10));\n * updateNodeInternals(id);\n * }, [id, updateNodeInternals]);\n *\n * return (\n * <>\n * {Array.from({ length: handleCount }).map((_, index) => (\n * <Handle\n * key={index}\n * type=\"target\"\n * position=\"left\"\n * id={`handle-${index}`}\n * />\n * ))}\n *\n * <div>\n * <button onClick={randomizeHandleCount}>Randomize handle count</button>\n * <p>There are {handleCount} handles on this node.</p>\n * </div>\n * </>\n * );\n *}\n *```\n * @remarks This hook can only be used in a component that is a child of a\n *{@link ReactFlowProvider} or a {@link ReactFlow} component.\n */\nfunction useUpdateNodeInternals() {\n const store = useStoreApi();\n return useCallback((id) => {\n const { domNode, updateNodeInternals } = store.getState();\n const updateIds = Array.isArray(id) ? id : [id];\n const updates = new Map();\n updateIds.forEach((updateId) => {\n const nodeElement = domNode?.querySelector(`.react-flow__node[data-id=\"${updateId}\"]`);\n if (nodeElement) {\n updates.set(updateId, { id: updateId, nodeElement, force: true });\n }\n });\n requestAnimationFrame(() => updateNodeInternals(updates, { triggerFitView: false }));\n }, []);\n}\n\nconst nodesSelector = (state) => state.nodes;\n/**\n * This hook returns an array of the current nodes. Components that use this hook\n * will re-render **whenever any node changes**, including when a node is selected\n * or moved.\n *\n * @public\n * @returns An array of all nodes currently in the flow.\n *\n * @example\n * ```jsx\n *import { useNodes } from '@xyflow/react';\n *\n *export default function() {\n * const nodes = useNodes();\n *\n * return <div>There are currently {nodes.length} nodes!</div>;\n *}\n *```\n */\nfunction useNodes() {\n const nodes = useStore(nodesSelector, shallow);\n return nodes;\n}\n\nconst edgesSelector = (state) => state.edges;\n/**\n * This hook returns an array of the current edges. Components that use this hook\n * will re-render **whenever any edge changes**.\n *\n * @public\n * @returns An array of all edges currently in the flow.\n *\n * @example\n * ```tsx\n *import { useEdges } from '@xyflow/react';\n *\n *export default function () {\n * const edges = useEdges();\n *\n * return <div>There are currently {edges.length} edges!</div>;\n *}\n *```\n */\nfunction useEdges() {\n const edges = useStore(edgesSelector, shallow);\n return edges;\n}\n\nconst viewportSelector = (state) => ({\n x: state.transform[0],\n y: state.transform[1],\n zoom: state.transform[2],\n});\n/**\n * The `useViewport` hook is a convenient way to read the current state of the\n * {@link Viewport} in a component. Components that use this hook\n * will re-render **whenever the viewport changes**.\n *\n * @public\n * @returns The current viewport.\n *\n * @example\n *\n *```jsx\n *import { useViewport } from '@xyflow/react';\n *\n *export default function ViewportDisplay() {\n * const { x, y, zoom } = useViewport();\n *\n * return (\n * <div>\n * <p>\n * The viewport is currently at ({x}, {y}) and zoomed to {zoom}.\n * </p>\n * </div>\n * );\n *}\n *```\n *\n * @remarks This hook can only be used in a component that is a child of a\n *{@link ReactFlowProvider} or a {@link ReactFlow} component.\n */\nfunction useViewport() {\n const viewport = useStore(viewportSelector, shallow);\n return viewport;\n}\n\n/**\n * This hook makes it easy to prototype a controlled flow where you manage the\n * state of nodes and edges outside the `ReactFlowInstance`. You can think of it\n * like React's `useState` hook with an additional helper callback.\n *\n * @public\n * @returns\n * - `nodes`: The current array of nodes. You might pass this directly to the `nodes` prop of your\n * `<ReactFlow />` component, or you may want to manipulate it first to perform some layouting,\n * for example.\n * - `setNodes`: A function that you can use to update the nodes. You can pass it a new array of\n * nodes or a callback that receives the current array of nodes and returns a new array of nodes.\n * This is the same as the second element of the tuple returned by React's `useState` hook.\n * - `onNodesChange`: A handy callback that can take an array of `NodeChanges` and update the nodes\n * state accordingly. You'll typically pass this directly to the `onNodesChange` prop of your\n * `<ReactFlow />` component.\n * @example\n *\n *```tsx\n *import { ReactFlow, useNodesState, useEdgesState } from '@xyflow/react';\n *\n *const initialNodes = [];\n *const initialEdges = [];\n *\n *export default function () {\n * const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);\n * const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);\n *\n * return (\n * <ReactFlow\n * nodes={nodes}\n * edges={edges}\n * onNodesChange={onNodesChange}\n * onEdgesChange={onEdgesChange}\n * />\n * );\n *}\n *```\n *\n * @remarks This hook was created to make prototyping easier and our documentation\n * examples clearer. Although it is OK to use this hook in production, in\n * practice you may want to use a more sophisticated state management solution\n * like Zustand {@link https://reactflow.dev/docs/guides/state-management/} instead.\n *\n */\nfunction useNodesState(initialNodes) {\n const [nodes, setNodes] = useState(initialNodes);\n const onNodesChange = useCallback((changes) => setNodes((nds) => applyNodeChanges(changes, nds)), []);\n return [nodes, setNodes, onNodesChange];\n}\n/**\n * This hook makes it easy to prototype a controlled flow where you manage the\n * state of nodes and edges outside the `ReactFlowInstance`. You can think of it\n * like React's `useState` hook with an additional helper callback.\n *\n * @public\n * @returns\n * - `edges`: The current array of edges. You might pass this directly to the `edges` prop of your\n * `<ReactFlow />` component, or you may want to manipulate it first to perform some layouting,\n * for example.\n *\n * - `setEdges`: A function that you can use to update the edges. You can pass it a new array of\n * edges or a callback that receives the current array of edges and returns a new array of edges.\n * This is the same as the second element of the tuple returned by React's `useState` hook.\n *\n * - `onEdgesChange`: A handy callback that can take an array of `EdgeChanges` and update the edges\n * state accordingly. You'll typically pass this directly to the `onEdgesChange` prop of your\n * `<ReactFlow />` component.\n * @example\n *\n *```tsx\n *import { ReactFlow, useNodesState, useEdgesState } from '@xyflow/react';\n *\n *const initialNodes = [];\n *const initialEdges = [];\n *\n *export default function () {\n * const [nodes, setNodes, onNodesChange] = useNodesState(initialNodes);\n * const [edges, setEdges, onEdgesChange] = useEdgesState(initialEdges);\n *\n * return (\n * <ReactFlow\n * nodes={nodes}\n * edges={edges}\n * onNodesChange={onNodesChange}\n * onEdgesChange={onEdgesChange}\n * />\n * );\n *}\n *```\n *\n * @remarks This hook was created to make prototyping easier and our documentation\n * examples clearer. Although it is OK to use this hook in production, in\n * practice you may want to use a more sophisticated state management solution\n * like Zustand {@link https://reactflow.dev/docs/guides/state-management/} instead.\n *\n */\nfunction useEdgesState(initialEdges) {\n const [edges, setEdges] = useState(initialEdges);\n const onEdgesChange = useCallback((changes) => setEdges((eds) => applyEdgeChanges(changes, eds)), []);\n return [edges, setEdges, onEdgesChange];\n}\n\n/**\n * The `useOnViewportChange` hook lets you listen for changes to the viewport such\n * as panning and zooming. You can provide a callback for each phase of a viewport\n * change: `onStart`, `onChange`, and `onEnd`.\n *\n * @public\n * @example\n * ```jsx\n *import { useCallback } from 'react';\n *import { useOnViewportChange } from '@xyflow/react';\n *\n *function ViewportChangeLogger() {\n * useOnViewportChange({\n * onStart: (viewport: Viewport) => console.log('start', viewport),\n * onChange: (viewport: Viewport) => console.log('change', viewport),\n * onEnd: (viewport: Viewport) => console.log('end', viewport),\n * });\n *\n * return null;\n *}\n *```\n */\nfunction useOnViewportChange({ onStart, onChange, onEnd }) {\n const store = useStoreApi();\n useEffect(() => {\n store.setState({ onViewportChangeStart: onStart });\n }, [onStart]);\n useEffect(() => {\n store.setState({ onViewportChange: onChange });\n }, [onChange]);\n useEffect(() => {\n store.setState({ onViewportChangeEnd: onEnd });\n }, [onEnd]);\n}\n\n/**\n * This hook lets you listen for changes to both node and edge selection. As the\n *name implies, the callback you provide will be called whenever the selection of\n *_either_ nodes or edges changes.\n *\n * @public\n * @example\n * ```jsx\n *import { useState } from 'react';\n *import { ReactFlow, useOnSelectionChange } from '@xyflow/react';\n *\n *function SelectionDisplay() {\n * const [selectedNodes, setSelectedNodes] = useState([]);\n * const [selectedEdges, setSelectedEdges] = useState([]);\n *\n * // the passed handler has to be memoized, otherwise the hook will not work correctly\n * const onChange = useCallback(({ nodes, edges }) => {\n * setSelectedNodes(nodes.map((node) => node.id));\n * setSelectedEdges(edges.map((edge) => edge.id));\n * }, []);\n *\n * useOnSelectionChange({\n * onChange,\n * });\n *\n * return (\n * <div>\n * <p>Selected nodes: {selectedNodes.join(', ')}</p>\n * <p>Selected edges: {selectedEdges.join(', ')}</p>\n * </div>\n * );\n *}\n *```\n *\n * @remarks You need to memoize the passed `onChange` handler, otherwise the hook will not work correctly.\n */\nfunction useOnSelectionChange({ onChange, }) {\n const store = useStoreApi();\n useEffect(() => {\n const nextOnSelectionChangeHandlers = [...store.getState().onSelectionChangeHandlers, onChange];\n store.setState({ onSelectionChangeHandlers: nextOnSelectionChangeHandlers });\n return () => {\n const nextHandlers = store.getState().onSelectionChangeHandlers.filter((fn) => fn !== onChange);\n store.setState({ onSelectionChangeHandlers: nextHandlers });\n };\n }, [onChange]);\n}\n\nconst selector$4 = (options) => (s) => {\n if (!options.includeHiddenNodes) {\n return s.nodesInitialized;\n }\n if (s.nodeLookup.size === 0) {\n return false;\n }\n for (const [, { internals }] of s.nodeLookup) {\n if (internals.handleBounds === undefined || !nodeHasDimensions(internals.userNode)) {\n return false;\n }\n }\n return true;\n};\n/**\n * This hook tells you whether all the nodes in a flow have been measured and given\n *a width and height. When you add a node to the flow, this hook will return\n *`false` and then `true` again once the node has been measured.\n *\n * @public\n * @returns Whether or not the nodes have been initialized by the `<ReactFlow />` component and\n * given a width and height.\n *\n * @example\n * ```jsx\n *import { useReactFlow, useNodesInitialized } from '@xyflow/react';\n *import { useEffect, useState } from 'react';\n *\n *const options = {\n * includeHiddenNodes: false,\n *};\n *\n *export default function useLayout() {\n * const { getNodes } = useReactFlow();\n * const nodesInitialized = useNodesInitialized(options);\n * const [layoutedNodes, setLayoutedNodes] = useState(getNodes());\n *\n * useEffect(() => {\n * if (nodesInitialized) {\n * setLayoutedNodes(yourLayoutingFunction(getNodes()));\n * }\n * }, [nodesInitialized]);\n *\n * return layoutedNodes;\n *}\n *```\n */\nfunction useNodesInitialized(options = {\n includeHiddenNodes: false,\n}) {\n const initialized = useStore(selector$4(options));\n return initialized;\n}\n\n/**\n * Hook to check if a <Handle /> is connected to another <Handle /> and get the connections.\n *\n * @public\n * @deprecated Use `useNodeConnections` instead.\n * @returns An array with handle connections.\n */\nfunction useHandleConnections({ type, id, nodeId, onConnect, onDisconnect, }) {\n console.warn('[DEPRECATED] `useHandleConnections` is deprecated. Instead use `useNodeConnections` https://reactflow.dev/api-reference/hooks/useNodeConnections');\n const _nodeId = useNodeId();\n const currentNodeId = nodeId ?? _nodeId;\n const prevConnections = useRef(null);\n const connections = useStore((state) => state.connectionLookup.get(`${currentNodeId}-${type}${id ? `-${id}` : ''}`), areConnectionMapsEqual);\n useEffect(() => {\n // @todo discuss if onConnect/onDisconnect should be called when the component mounts/unmounts\n if (prevConnections.current && prevConnections.current !== connections) {\n const _connections = connections ?? new Map();\n handleConnectionChange(prevConnections.current, _connections, onDisconnect);\n handleConnectionChange(_connections, prevConnections.current, onConnect);\n }\n prevConnections.current = connections ?? new Map();\n }, [connections, onConnect, onDisconnect]);\n return useMemo(() => Array.from(connections?.values() ?? []), [connections]);\n}\n\nconst error014 = errorMessages['error014']();\n/**\n * This hook returns an array of connections on a specific node, handle type ('source', 'target') or handle ID.\n *\n * @public\n * @returns An array with connections.\n *\n * @example\n * ```jsx\n *import { useNodeConnections } from '@xyflow/react';\n *\n *export default function () {\n * const connections = useNodeConnections({\n * handleType: 'target',\n * handleId: 'my-handle',\n * });\n *\n * return (\n * <div>There are currently {connections.length} incoming connections!</div>\n * );\n *}\n *```\n */\nfunction useNodeConnections({ id, handleType, handleId, onConnect, onDisconnect, } = {}) {\n const nodeId = useNodeId();\n const currentNodeId = id ?? nodeId;\n if (!currentNodeId) {\n throw new Error(error014);\n }\n const prevConnections = useRef(null);\n const connections = useStore((state) => state.connectionLookup.get(`${currentNodeId}${handleType ? (handleId ? `-${handleType}-${handleId}` : `-${handleType}`) : ''}`), areConnectionMapsEqual);\n useEffect(() => {\n // @todo discuss if onConnect/onDisconnect should be called when the component mounts/unmounts\n if (prevConnections.current && prevConnections.current !== connections) {\n const _connections = connections ?? new Map();\n handleConnectionChange(prevConnections.current, _connections, onDisconnect);\n handleConnectionChange(_connections, prevConnections.current, onConnect);\n }\n prevConnections.current = connections ?? new Map();\n }, [connections, onConnect, onDisconnect]);\n return useMemo(() => Array.from(connections?.values() ?? []), [connections]);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction useNodesData(nodeIds) {\n const nodesData = useStore(useCallback((s) => {\n const data = [];\n const isArrayOfIds = Array.isArray(nodeIds);\n const _nodeIds = isArrayOfIds ? nodeIds : [nodeIds];\n for (const nodeId of _nodeIds) {\n const node = s.nodeLookup.get(nodeId);\n if (node) {\n data.push({\n id: node.id,\n type: node.type,\n data: node.data,\n });\n }\n }\n return isArrayOfIds ? data : data[0] ?? null;\n }, [nodeIds]), shallowNodeData);\n return nodesData;\n}\n\n/**\n * This hook returns the internal representation of a specific node.\n * Components that use this hook will re-render **whenever the node changes**,\n * including when a node is selected or moved.\n *\n * @public\n * @param id - The ID of a node you want to observe.\n * @returns The `InternalNode` object for the node with the given ID.\n *\n * @example\n * ```tsx\n *import { useInternalNode } from '@xyflow/react';\n *\n *export default function () {\n * const internalNode = useInternalNode('node-1');\n * const absolutePosition = internalNode.internals.positionAbsolute;\n *\n * return (\n * <div>\n * The absolute position of the node is at:\n * <p>x: {absolutePosition.x}</p>\n * <p>y: {absolutePosition.y}</p>\n * </div>\n * );\n *}\n *```\n */\nfunction useInternalNode(id) {\n const node = useStore(useCallback((s) => s.nodeLookup.get(id), [id]), shallow);\n return node;\n}\n\n/**\n * Registers a middleware function to transform node changes.\n *\n * @public\n * @param fn - Middleware function. Should be memoized with useCallback to avoid re-registration.\n */\nfunction experimental_useOnNodesChangeMiddleware(fn) {\n const store = useStoreApi();\n const [symbol] = useState(() => Symbol());\n useEffect(() => {\n const { onNodesChangeMiddlewareMap } = store.getState();\n onNodesChangeMiddlewareMap.set(symbol, fn);\n }, [fn]);\n useEffect(() => {\n const { onNodesChangeMiddlewareMap } = store.getState();\n return () => {\n onNodesChangeMiddlewareMap.delete(symbol);\n };\n }, []);\n}\n\n/**\n * Registers a middleware function to transform edge changes.\n *\n * @public\n * @param fn - Middleware function. Should be memoized with useCallback to avoid re-registration.\n */\nfunction experimental_useOnEdgesChangeMiddleware(fn) {\n const store = useStoreApi();\n const [symbol] = useState(() => Symbol());\n useEffect(() => {\n const { onEdgesChangeMiddlewareMap } = store.getState();\n onEdgesChangeMiddlewareMap.set(symbol, fn);\n }, [fn]);\n useEffect(() => {\n const { onEdgesChangeMiddlewareMap } = store.getState();\n return () => {\n onEdgesChangeMiddlewareMap.delete(symbol);\n };\n }, []);\n}\n\nfunction LinePattern({ dimensions, lineWidth, variant, className }) {\n return (jsx(\"path\", { strokeWidth: lineWidth, d: `M${dimensions[0] / 2} 0 V${dimensions[1]} M0 ${dimensions[1] / 2} H${dimensions[0]}`, className: cc(['react-flow__background-pattern', variant, className]) }));\n}\nfunction DotPattern({ radius, className }) {\n return (jsx(\"circle\", { cx: radius, cy: radius, r: radius, className: cc(['react-flow__background-pattern', 'dots', className]) }));\n}\n\n/**\n * The three variants are exported as an enum for convenience. You can either import\n * the enum and use it like `BackgroundVariant.Lines` or you can use the raw string\n * value directly.\n * @public\n */\nvar BackgroundVariant;\n(function (BackgroundVariant) {\n BackgroundVariant[\"Lines\"] = \"lines\";\n BackgroundVariant[\"Dots\"] = \"dots\";\n BackgroundVariant[\"Cross\"] = \"cross\";\n})(BackgroundVariant || (BackgroundVariant = {}));\n\nconst defaultSize = {\n [BackgroundVariant.Dots]: 1,\n [BackgroundVariant.Lines]: 1,\n [BackgroundVariant.Cross]: 6,\n};\nconst selector$3 = (s) => ({ transform: s.transform, patternId: `pattern-${s.rfId}` });\nfunction BackgroundComponent({ id, variant = BackgroundVariant.Dots, \n// only used for dots and cross\ngap = 20, \n// only used for lines and cross\nsize, lineWidth = 1, offset = 0, color, bgColor, style, className, patternClassName, }) {\n const ref = useRef(null);\n const { transform, patternId } = useStore(selector$3, shallow);\n const patternSize = size || defaultSize[variant];\n const isDots = variant === BackgroundVariant.Dots;\n const isCross = variant === BackgroundVariant.Cross;\n const gapXY = Array.isArray(gap) ? gap : [gap, gap];\n const scaledGap = [gapXY[0] * transform[2] || 1, gapXY[1] * transform[2] || 1];\n const scaledSize = patternSize * transform[2];\n const offsetXY = Array.isArray(offset) ? offset : [offset, offset];\n const patternDimensions = isCross ? [scaledSize, scaledSize] : scaledGap;\n const scaledOffset = [\n offsetXY[0] * transform[2] + patternDimensions[0] / 2,\n offsetXY[1] * transform[2] + patternDimensions[1] / 2,\n ];\n const _patternId = `${patternId}${id ? id : ''}`;\n return (jsxs(\"svg\", { className: cc(['react-flow__background', className]), style: {\n ...style,\n ...containerStyle,\n '--xy-background-color-props': bgColor,\n '--xy-background-pattern-color-props': color,\n }, ref: ref, \"data-testid\": \"rf__background\", children: [jsx(\"pattern\", { id: _patternId, x: transform[0] % scaledGap[0], y: transform[1] % scaledGap[1], width: scaledGap[0], height: scaledGap[1], patternUnits: \"userSpaceOnUse\", patternTransform: `translate(-${scaledOffset[0]},-${scaledOffset[1]})`, children: isDots ? (jsx(DotPattern, { radius: scaledSize / 2, className: patternClassName })) : (jsx(LinePattern, { dimensions: patternDimensions, lineWidth: lineWidth, variant: variant, className: patternClassName })) }), jsx(\"rect\", { x: \"0\", y: \"0\", width: \"100%\", height: \"100%\", fill: `url(#${_patternId})` })] }));\n}\nBackgroundComponent.displayName = 'Background';\n/**\n * The `<Background />` component makes it convenient to render different types of backgrounds common in node-based UIs. It comes with three variants: lines, dots and cross.\n *\n * @example\n *\n * A simple example of how to use the Background component.\n *\n * ```tsx\n * import { useState } from 'react';\n * import { ReactFlow, Background, BackgroundVariant } from '@xyflow/react';\n *\n * export default function Flow() {\n * return (\n * <ReactFlow defaultNodes={[...]} defaultEdges={[...]}>\n * <Background color=\"#ccc\" variant={BackgroundVariant.Dots} />\n * </ReactFlow>\n * );\n * }\n * ```\n *\n * @example\n *\n * In this example you can see how to combine multiple backgrounds\n *\n * ```tsx\n * import { ReactFlow, Background, BackgroundVariant } from '@xyflow/react';\n * import '@xyflow/react/dist/style.css';\n *\n * export default function Flow() {\n * return (\n * <ReactFlow defaultNodes={[...]} defaultEdges={[...]}>\n * <Background\n * id=\"1\"\n * gap={10}\n * color=\"#f1f1f1\"\n * variant={BackgroundVariant.Lines}\n * />\n * <Background\n * id=\"2\"\n * gap={100}\n * color=\"#ccc\"\n * variant={BackgroundVariant.Lines}\n * />\n * </ReactFlow>\n * );\n * }\n * ```\n *\n * @remarks\n *\n * When combining multiple <Background /> components it’s important to give each of them a unique id prop!\n *\n */\nconst Background = memo(BackgroundComponent);\n\nfunction PlusIcon() {\n return (jsx(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 32\", children: jsx(\"path\", { d: \"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z\" }) }));\n}\n\nfunction MinusIcon() {\n return (jsx(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 5\", children: jsx(\"path\", { d: \"M0 0h32v4.2H0z\" }) }));\n}\n\nfunction FitViewIcon() {\n return (jsx(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 32 30\", children: jsx(\"path\", { d: \"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z\" }) }));\n}\n\nfunction LockIcon() {\n return (jsx(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 25 32\", children: jsx(\"path\", { d: \"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z\" }) }));\n}\n\nfunction UnlockIcon() {\n return (jsx(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", viewBox: \"0 0 25 32\", children: jsx(\"path\", { d: \"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z\" }) }));\n}\n\n/**\n * You can add buttons to the control panel by using the `<ControlButton />` component\n * and pass it as a child to the [`<Controls />`](/api-reference/components/controls) component.\n *\n * @public\n * @example\n *```jsx\n *import { MagicWand } from '@radix-ui/react-icons'\n *import { ReactFlow, Controls, ControlButton } from '@xyflow/react'\n *\n *export default function Flow() {\n * return (\n * <ReactFlow nodes={[...]} edges={[...]}>\n * <Controls>\n * <ControlButton onClick={() => alert('Something magical just happened. ✨')}>\n * <MagicWand />\n * </ControlButton>\n * </Controls>\n * </ReactFlow>\n * )\n *}\n *```\n */\nfunction ControlButton({ children, className, ...rest }) {\n return (jsx(\"button\", { type: \"button\", className: cc(['react-flow__controls-button', className]), ...rest, children: children }));\n}\n\nconst selector$2 = (s) => ({\n isInteractive: s.nodesDraggable || s.nodesConnectable || s.elementsSelectable,\n minZoomReached: s.transform[2] <= s.minZoom,\n maxZoomReached: s.transform[2] >= s.maxZoom,\n ariaLabelConfig: s.ariaLabelConfig,\n});\nfunction ControlsComponent({ style, showZoom = true, showFitView = true, showInteractive = true, fitViewOptions, onZoomIn, onZoomOut, onFitView, onInteractiveChange, className, children, position = 'bottom-left', orientation = 'vertical', 'aria-label': ariaLabel, }) {\n const store = useStoreApi();\n const { isInteractive, minZoomReached, maxZoomReached, ariaLabelConfig } = useStore(selector$2, shallow);\n const { zoomIn, zoomOut, fitView } = useReactFlow();\n const onZoomInHandler = () => {\n zoomIn();\n onZoomIn?.();\n };\n const onZoomOutHandler = () => {\n zoomOut();\n onZoomOut?.();\n };\n const onFitViewHandler = () => {\n fitView(fitViewOptions);\n onFitView?.();\n };\n const onToggleInteractivity = () => {\n store.setState({\n nodesDraggable: !isInteractive,\n nodesConnectable: !isInteractive,\n elementsSelectable: !isInteractive,\n });\n onInteractiveChange?.(!isInteractive);\n };\n const orientationClass = orientation === 'horizontal' ? 'horizontal' : 'vertical';\n return (jsxs(Panel, { className: cc(['react-flow__controls', orientationClass, className]), position: position, style: style, \"data-testid\": \"rf__controls\", \"aria-label\": ariaLabel ?? ariaLabelConfig['controls.ariaLabel'], children: [showZoom && (jsxs(Fragment, { children: [jsx(ControlButton, { onClick: onZoomInHandler, className: \"react-flow__controls-zoomin\", title: ariaLabelConfig['controls.zoomIn.ariaLabel'], \"aria-label\": ariaLabelConfig['controls.zoomIn.ariaLabel'], disabled: maxZoomReached, children: jsx(PlusIcon, {}) }), jsx(ControlButton, { onClick: onZoomOutHandler, className: \"react-flow__controls-zoomout\", title: ariaLabelConfig['controls.zoomOut.ariaLabel'], \"aria-label\": ariaLabelConfig['controls.zoomOut.ariaLabel'], disabled: minZoomReached, children: jsx(MinusIcon, {}) })] })), showFitView && (jsx(ControlButton, { className: \"react-flow__controls-fitview\", onClick: onFitViewHandler, title: ariaLabelConfig['controls.fitView.ariaLabel'], \"aria-label\": ariaLabelConfig['controls.fitView.ariaLabel'], children: jsx(FitViewIcon, {}) })), showInteractive && (jsx(ControlButton, { className: \"react-flow__controls-interactive\", onClick: onToggleInteractivity, title: ariaLabelConfig['controls.interactive.ariaLabel'], \"aria-label\": ariaLabelConfig['controls.interactive.ariaLabel'], children: isInteractive ? jsx(UnlockIcon, {}) : jsx(LockIcon, {}) })), children] }));\n}\nControlsComponent.displayName = 'Controls';\n/**\n * The `<Controls />` component renders a small panel that contains convenient\n * buttons to zoom in, zoom out, fit the view, and lock the viewport.\n *\n * @public\n * @example\n *```tsx\n *import { ReactFlow, Controls } from '@xyflow/react'\n *\n *export default function Flow() {\n * return (\n * <ReactFlow nodes={[...]} edges={[...]}>\n * <Controls />\n * </ReactFlow>\n * )\n *}\n *```\n *\n * @remarks To extend or customise the controls, you can use the [`<ControlButton />`](/api-reference/components/control-button) component\n *\n */\nconst Controls = memo(ControlsComponent);\n\nfunction MiniMapNodeComponent({ id, x, y, width, height, style, color, strokeColor, strokeWidth, className, borderRadius, shapeRendering, selected, onClick, }) {\n const { background, backgroundColor } = style || {};\n const fill = (color || background || backgroundColor);\n return (jsx(\"rect\", { className: cc(['react-flow__minimap-node', { selected }, className]), x: x, y: y, rx: borderRadius, ry: borderRadius, width: width, height: height, style: {\n fill,\n stroke: strokeColor,\n strokeWidth,\n }, shapeRendering: shapeRendering, onClick: onClick ? (event) => onClick(event, id) : undefined }));\n}\nconst MiniMapNode = memo(MiniMapNodeComponent);\n\nconst selectorNodeIds = (s) => s.nodes.map((node) => node.id);\nconst getAttrFunction = (func) => func instanceof Function ? func : () => func;\nfunction MiniMapNodes({ nodeStrokeColor, nodeColor, nodeClassName = '', nodeBorderRadius = 5, nodeStrokeWidth, \n/*\n * We need to rename the prop to be `CapitalCase` so that JSX will render it as\n * a component properly.\n */\nnodeComponent: NodeComponent = MiniMapNode, onClick, }) {\n const nodeIds = useStore(selectorNodeIds, shallow);\n const nodeColorFunc = getAttrFunction(nodeColor);\n const nodeStrokeColorFunc = getAttrFunction(nodeStrokeColor);\n const nodeClassNameFunc = getAttrFunction(nodeClassName);\n const shapeRendering = typeof window === 'undefined' || !!window.chrome ? 'crispEdges' : 'geometricPrecision';\n return (jsx(Fragment, { children: nodeIds.map((nodeId) => (\n /*\n * The split of responsibilities between MiniMapNodes and\n * NodeComponentWrapper may appear weird. However, it’s designed to\n * minimize the cost of updates when individual nodes change.\n *\n * For more details, see a similar commit in `NodeRenderer/index.tsx`.\n */\n jsx(NodeComponentWrapper, { id: nodeId, nodeColorFunc: nodeColorFunc, nodeStrokeColorFunc: nodeStrokeColorFunc, nodeClassNameFunc: nodeClassNameFunc, nodeBorderRadius: nodeBorderRadius, nodeStrokeWidth: nodeStrokeWidth, NodeComponent: NodeComponent, onClick: onClick, shapeRendering: shapeRendering }, nodeId))) }));\n}\nfunction NodeComponentWrapperInner({ id, nodeColorFunc, nodeStrokeColorFunc, nodeClassNameFunc, nodeBorderRadius, nodeStrokeWidth, shapeRendering, NodeComponent, onClick, }) {\n const { node, x, y, width, height } = useStore((s) => {\n const node = s.nodeLookup.get(id);\n if (!node) {\n return { node: undefined, x: 0, y: 0, width: 0, height: 0 };\n }\n const userNode = node.internals.userNode;\n const { x, y } = node.internals.positionAbsolute;\n const { width, height } = getNodeDimensions(userNode);\n return {\n node: userNode,\n x,\n y,\n width,\n height,\n };\n }, shallow);\n if (!node || node.hidden || !nodeHasDimensions(node)) {\n return null;\n }\n return (jsx(NodeComponent, { x: x, y: y, width: width, height: height, style: node.style, selected: !!node.selected, className: nodeClassNameFunc(node), color: nodeColorFunc(node), borderRadius: nodeBorderRadius, strokeColor: nodeStrokeColorFunc(node), strokeWidth: nodeStrokeWidth, shapeRendering: shapeRendering, onClick: onClick, id: node.id }));\n}\nconst NodeComponentWrapper = memo(NodeComponentWrapperInner);\nvar MiniMapNodes$1 = memo(MiniMapNodes);\n\nconst defaultWidth = 200;\nconst defaultHeight = 150;\nconst filterHidden = (node) => !node.hidden;\nconst selector$1 = (s) => {\n const viewBB = {\n x: -s.transform[0] / s.transform[2],\n y: -s.transform[1] / s.transform[2],\n width: s.width / s.transform[2],\n height: s.height / s.transform[2],\n };\n /*\n * the bounds only cover the visible nodes, so we have to check for a visible node\n * here as well. getInternalNodesBounds returns a rect at the origin when nothing\n * passes the filter, which would stretch the bounds to include (0, 0).\n */\n let hasVisibleNode = false;\n for (const node of s.nodeLookup.values()) {\n if (!node.hidden) {\n hasVisibleNode = true;\n break;\n }\n }\n return {\n viewBB,\n boundingRect: hasVisibleNode\n ? getBoundsOfRects(getInternalNodesBounds(s.nodeLookup, { filter: filterHidden }), viewBB)\n : viewBB,\n rfId: s.rfId,\n panZoom: s.panZoom,\n translateExtent: s.translateExtent,\n flowWidth: s.width,\n flowHeight: s.height,\n ariaLabelConfig: s.ariaLabelConfig,\n };\n};\nconst rectEqual = (a, b) => a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n// the selector builds new viewBB/boundingRect objects every call, so the default shallow equality always\n// treats them as changed; comparing the rects by value lets the minimap skip re-renders when nothing moved\nconst areEqual = (a, b) => rectEqual(a.viewBB, b.viewBB) &&\n rectEqual(a.boundingRect, b.boundingRect) &&\n a.rfId === b.rfId &&\n a.panZoom === b.panZoom &&\n a.translateExtent === b.translateExtent &&\n a.flowWidth === b.flowWidth &&\n a.flowHeight === b.flowHeight &&\n a.ariaLabelConfig === b.ariaLabelConfig;\nconst ARIA_LABEL_KEY = 'react-flow__minimap-desc';\nfunction MiniMapComponent({ style, className, nodeStrokeColor, nodeColor, nodeClassName = '', nodeBorderRadius = 5, nodeStrokeWidth, \n/*\n * We need to rename the prop to be `CapitalCase` so that JSX will render it as\n * a component properly.\n */\nnodeComponent, bgColor, maskColor, maskStrokeColor, maskStrokeWidth, position = 'bottom-right', onClick, onNodeClick, pannable = false, zoomable = false, ariaLabel, inversePan, zoomStep = 1, offsetScale = 5, }) {\n const store = useStoreApi();\n const svg = useRef(null);\n const { boundingRect, panZoom, viewBB, rfId, translateExtent, flowWidth, flowHeight, ariaLabelConfig } = useStore(selector$1, areEqual);\n const elementWidth = style?.width ?? defaultWidth;\n const elementHeight = style?.height ?? defaultHeight;\n const scaledWidth = boundingRect.width / elementWidth;\n const scaledHeight = boundingRect.height / elementHeight;\n const viewScale = Math.max(scaledWidth, scaledHeight);\n const viewWidth = viewScale * elementWidth;\n const viewHeight = viewScale * elementHeight;\n const offset = offsetScale * viewScale;\n const x = boundingRect.x - (viewWidth - boundingRect.width) / 2 - offset;\n const y = boundingRect.y - (viewHeight - boundingRect.height) / 2 - offset;\n const width = viewWidth + offset * 2;\n const height = viewHeight + offset * 2;\n const labelledBy = `${ARIA_LABEL_KEY}-${rfId}`;\n const viewScaleRef = useRef(0);\n const minimapInstance = useRef();\n viewScaleRef.current = viewScale;\n useEffect(() => {\n const currentPanZoom = store.getState().panZoom;\n if (svg.current && currentPanZoom) {\n minimapInstance.current = XYMinimap({\n domNode: svg.current,\n panZoom: currentPanZoom,\n getTransform: () => store.getState().transform,\n getViewScale: () => viewScaleRef.current,\n });\n return () => {\n minimapInstance.current?.destroy();\n };\n }\n }, [panZoom]);\n useEffect(() => {\n minimapInstance.current?.update({\n translateExtent,\n width: flowWidth,\n height: flowHeight,\n inversePan,\n pannable,\n zoomStep,\n zoomable,\n });\n }, [pannable, zoomable, inversePan, zoomStep, translateExtent, flowWidth, flowHeight]);\n const onSvgClick = onClick\n ? (event) => {\n const [x, y] = minimapInstance.current?.pointer(event) || [0, 0];\n onClick(event, { x, y });\n }\n : undefined;\n const nodeClickHandler = useCallback((event, nodeId) => {\n const node = store.getState().nodeLookup.get(nodeId).internals.userNode;\n onNodeClick?.(event, node);\n }, [onNodeClick]);\n const onSvgNodeClick = onNodeClick ? nodeClickHandler : undefined;\n const _ariaLabel = ariaLabel ?? ariaLabelConfig['minimap.ariaLabel'];\n return (jsx(Panel, { position: position, style: {\n ...style,\n '--xy-minimap-background-color-props': typeof bgColor === 'string' ? bgColor : undefined,\n '--xy-minimap-mask-background-color-props': typeof maskColor === 'string' ? maskColor : undefined,\n '--xy-minimap-mask-stroke-color-props': typeof maskStrokeColor === 'string' ? maskStrokeColor : undefined,\n '--xy-minimap-mask-stroke-width-props': typeof maskStrokeWidth === 'number' ? maskStrokeWidth * viewScale : undefined,\n '--xy-minimap-node-background-color-props': typeof nodeColor === 'string' ? nodeColor : undefined,\n '--xy-minimap-node-stroke-color-props': typeof nodeStrokeColor === 'string' ? nodeStrokeColor : undefined,\n '--xy-minimap-node-stroke-width-props': typeof nodeStrokeWidth === 'number' ? nodeStrokeWidth : undefined,\n }, className: cc(['react-flow__minimap', className]), \"data-testid\": \"rf__minimap\", children: jsxs(\"svg\", { width: elementWidth, height: elementHeight, viewBox: `${x} ${y} ${width} ${height}`, className: \"react-flow__minimap-svg\", role: \"img\", \"aria-labelledby\": labelledBy, ref: svg, onClick: onSvgClick, children: [_ariaLabel && jsx(\"title\", { id: labelledBy, children: _ariaLabel }), jsx(MiniMapNodes$1, { onClick: onSvgNodeClick, nodeColor: nodeColor, nodeStrokeColor: nodeStrokeColor, nodeBorderRadius: nodeBorderRadius, nodeClassName: nodeClassName, nodeStrokeWidth: nodeStrokeWidth, nodeComponent: nodeComponent }), jsx(\"path\", { className: \"react-flow__minimap-mask\", d: `M${x - offset},${y - offset}h${width + offset * 2}v${height + offset * 2}h${-width - offset * 2}z\n M${viewBB.x},${viewBB.y}h${viewBB.width}v${viewBB.height}h${-viewBB.width}z`, fillRule: \"evenodd\", pointerEvents: \"none\" })] }) }));\n}\nMiniMapComponent.displayName = 'MiniMap';\n/**\n * The `<MiniMap />` component can be used to render an overview of your flow. It\n * renders each node as an SVG element and visualizes where the current viewport is\n * in relation to the rest of the flow.\n *\n * @public\n * @example\n *\n * ```jsx\n *import { ReactFlow, MiniMap } from '@xyflow/react';\n *\n *export default function Flow() {\n * return (\n * <ReactFlow nodes={[...]} edges={[...]}>\n * <MiniMap nodeStrokeWidth={3} />\n * </ReactFlow>\n * );\n *}\n *```\n */\nconst MiniMap = memo(MiniMapComponent);\n\nconst scaleSelector = (calculateScale) => (store) => calculateScale ? `${Math.max(1 / store.transform[2], 1)}` : undefined;\nconst defaultPositions = {\n [ResizeControlVariant.Line]: 'right',\n [ResizeControlVariant.Handle]: 'bottom-right',\n};\nfunction ResizeControl({ nodeId, position, variant = ResizeControlVariant.Handle, className, style = undefined, children, color, minWidth = 10, minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepAspectRatio = false, resizeDirection, autoScale = true, shouldResize, onResizeStart, onResize, onResizeEnd, }) {\n const contextNodeId = useNodeId();\n const id = typeof nodeId === 'string' ? nodeId : contextNodeId;\n const store = useStoreApi();\n const resizeControlRef = useRef(null);\n const isHandleControl = variant === ResizeControlVariant.Handle;\n const scale = useStore(useCallback(scaleSelector(isHandleControl && autoScale), [isHandleControl, autoScale]), shallow);\n const resizer = useRef(null);\n const controlPosition = position ?? defaultPositions[variant];\n useEffect(() => {\n if (!resizeControlRef.current || !id) {\n return;\n }\n if (!resizer.current) {\n resizer.current = XYResizer({\n domNode: resizeControlRef.current,\n nodeId: id,\n getStoreItems: () => {\n const { nodeLookup, transform, snapGrid, snapToGrid, nodeOrigin, domNode } = store.getState();\n return {\n nodeLookup,\n transform,\n snapGrid,\n snapToGrid,\n nodeOrigin,\n paneDomNode: domNode,\n };\n },\n onChange: (change, childChanges) => {\n const { triggerNodeChanges, nodeLookup, parentLookup, nodeOrigin } = store.getState();\n const changes = [];\n const nextPosition = { x: change.x, y: change.y };\n const node = nodeLookup.get(id);\n if (node && node.expandParent && node.parentId) {\n const origin = node.origin ?? nodeOrigin;\n const width = change.width ?? node.measured.width ?? 0;\n const height = change.height ?? node.measured.height ?? 0;\n const child = {\n id: node.id,\n parentId: node.parentId,\n rect: {\n width,\n height,\n ...evaluateAbsolutePosition({\n x: change.x ?? node.position.x,\n y: change.y ?? node.position.y,\n }, { width, height }, node.parentId, nodeLookup, origin),\n },\n };\n const parentExpandChanges = handleExpandParent([child], nodeLookup, parentLookup, nodeOrigin);\n changes.push(...parentExpandChanges);\n /*\n * when the parent was expanded by the child node, its position will be clamped at\n * 0,0 when node origin is 0,0 and to width, height if it's 1,1\n */\n nextPosition.x = change.x ? Math.max(origin[0] * width, change.x) : undefined;\n nextPosition.y = change.y ? Math.max(origin[1] * height, change.y) : undefined;\n }\n if (nextPosition.x !== undefined && nextPosition.y !== undefined) {\n const positionChange = {\n id,\n type: 'position',\n position: { ...nextPosition },\n };\n changes.push(positionChange);\n }\n if (change.width !== undefined && change.height !== undefined) {\n const setAttributes = !resizeDirection ? true : resizeDirection === 'horizontal' ? 'width' : 'height';\n const dimensionChange = {\n id,\n type: 'dimensions',\n resizing: true,\n setAttributes,\n dimensions: {\n width: change.width,\n height: change.height,\n },\n };\n changes.push(dimensionChange);\n }\n for (const childChange of childChanges) {\n const positionChange = {\n ...childChange,\n type: 'position',\n };\n changes.push(positionChange);\n }\n triggerNodeChanges(changes);\n },\n onEnd: ({ width, height }) => {\n const dimensionChange = {\n id: id,\n type: 'dimensions',\n resizing: false,\n dimensions: {\n width,\n height,\n },\n };\n store.getState().triggerNodeChanges([dimensionChange]);\n },\n });\n }\n resizer.current.update({\n controlPosition,\n boundaries: {\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n },\n keepAspectRatio,\n resizeDirection,\n onResizeStart,\n onResize,\n onResizeEnd,\n shouldResize,\n });\n return () => {\n resizer.current?.destroy();\n };\n }, [\n controlPosition,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n keepAspectRatio,\n onResizeStart,\n onResize,\n onResizeEnd,\n shouldResize,\n ]);\n const positionClassNames = controlPosition.split('-');\n return (jsx(\"div\", { className: cc(['react-flow__resize-control', 'nodrag', ...positionClassNames, variant, className]), ref: resizeControlRef, style: {\n ...style,\n scale,\n ...(color && { [isHandleControl ? 'backgroundColor' : 'borderColor']: color }),\n }, children: children }));\n}\n/**\n * To create your own resizing UI, you can use the `NodeResizeControl` component where you can pass children (such as icons).\n * @public\n *\n */\nconst NodeResizeControl = memo(ResizeControl);\n\n/**\n * The `<NodeResizer />` component can be used to add a resize functionality to your\n * nodes. It renders draggable controls around the node to resize in all directions.\n * @public\n *\n * @example\n *```jsx\n *import { memo } from 'react';\n *import { Handle, Position, NodeResizer } from '@xyflow/react';\n *\n *function ResizableNode({ data }) {\n * return (\n * <>\n * <NodeResizer minWidth={100} minHeight={30} />\n * <Handle type=\"target\" position={Position.Left} />\n * <div style={{ padding: 10 }}>{data.label}</div>\n * <Handle type=\"source\" position={Position.Right} />\n * </>\n * );\n *};\n *\n *export default memo(ResizableNode);\n *```\n */\nfunction NodeResizer({ nodeId, isVisible = true, handleClassName, handleStyle, lineClassName, lineStyle, color, minWidth = 10, minHeight = 10, maxWidth = Number.MAX_VALUE, maxHeight = Number.MAX_VALUE, keepAspectRatio = false, autoScale = true, shouldResize, onResizeStart, onResize, onResizeEnd, }) {\n if (!isVisible) {\n return null;\n }\n return (jsxs(Fragment, { children: [XY_RESIZER_LINE_POSITIONS.map((position) => (jsx(NodeResizeControl, { className: lineClassName, style: lineStyle, nodeId: nodeId, position: position, variant: ResizeControlVariant.Line, color: color, minWidth: minWidth, minHeight: minHeight, maxWidth: maxWidth, maxHeight: maxHeight, onResizeStart: onResizeStart, keepAspectRatio: keepAspectRatio, autoScale: autoScale, shouldResize: shouldResize, onResize: onResize, onResizeEnd: onResizeEnd }, position))), XY_RESIZER_HANDLE_POSITIONS.map((position) => (jsx(NodeResizeControl, { className: handleClassName, style: handleStyle, nodeId: nodeId, position: position, color: color, minWidth: minWidth, minHeight: minHeight, maxWidth: maxWidth, maxHeight: maxHeight, onResizeStart: onResizeStart, keepAspectRatio: keepAspectRatio, autoScale: autoScale, shouldResize: shouldResize, onResize: onResize, onResizeEnd: onResizeEnd }, position)))] }));\n}\n\nconst selector = (state) => state.domNode?.querySelector('.react-flow__renderer');\nfunction NodeToolbarPortal({ children }) {\n const wrapperRef = useStore(selector);\n if (!wrapperRef) {\n return null;\n }\n return createPortal(children, wrapperRef);\n}\n\nconst nodeEqualityFn = (a, b) => a?.internals.positionAbsolute.x !== b?.internals.positionAbsolute.x ||\n a?.internals.positionAbsolute.y !== b?.internals.positionAbsolute.y ||\n a?.measured.width !== b?.measured.width ||\n a?.measured.height !== b?.measured.height ||\n a?.selected !== b?.selected ||\n a?.internals.z !== b?.internals.z;\nconst nodesEqualityFn = (a, b) => {\n if (a.size !== b.size) {\n return false;\n }\n for (const [key, node] of a) {\n if (nodeEqualityFn(node, b.get(key))) {\n return false;\n }\n }\n return true;\n};\nconst storeSelector = (state) => ({\n x: state.transform[0],\n y: state.transform[1],\n zoom: state.transform[2],\n selectedNodesCount: state.nodes.filter((node) => node.selected).length,\n});\n/**\n * This component can render a toolbar or tooltip to one side of a custom node. This\n * toolbar doesn't scale with the viewport so that the content is always visible.\n *\n * @public\n * @example\n * ```jsx\n *import { memo } from 'react';\n *import { Handle, Position, NodeToolbar } from '@xyflow/react';\n *\n *function CustomNode({ data }) {\n * return (\n * <>\n * <NodeToolbar isVisible={data.toolbarVisible} position={data.toolbarPosition}>\n * <button>delete</button>\n * <button>copy</button>\n * <button>expand</button>\n * </NodeToolbar>\n *\n * <div style={{ padding: '10px 20px' }}>\n * {data.label}\n * </div>\n *\n * <Handle type=\"target\" position={Position.Left} />\n * <Handle type=\"source\" position={Position.Right} />\n * </>\n * );\n *};\n *\n *export default memo(CustomNode);\n *```\n * @remarks By default, the toolbar is only visible when a node is selected. If multiple\n * nodes are selected it will not be visible to prevent overlapping toolbars or\n * clutter. You can override this behavior by setting the `isVisible` prop to `true`.\n */\nfunction NodeToolbar({ nodeId, children, className, style, isVisible, position = Position.Top, offset = 10, align = 'center', ...rest }) {\n const contextNodeId = useNodeId();\n const nodesSelector = useCallback((state) => {\n const nodeIds = Array.isArray(nodeId) ? nodeId : [nodeId || contextNodeId || ''];\n const internalNodes = nodeIds.reduce((res, id) => {\n const node = state.nodeLookup.get(id);\n if (node) {\n res.set(node.id, node);\n }\n return res;\n }, new Map());\n return internalNodes;\n }, [nodeId, contextNodeId]);\n const nodes = useStore(nodesSelector, nodesEqualityFn);\n const { x, y, zoom, selectedNodesCount } = useStore(storeSelector, shallow);\n // if isVisible is not set, we show the toolbar only if its node is selected and no other node is selected\n const isActive = typeof isVisible === 'boolean'\n ? isVisible\n : nodes.size === 1 && nodes.values().next().value?.selected && selectedNodesCount === 1;\n if (!isActive || !nodes.size) {\n return null;\n }\n const nodeRect = getInternalNodesBounds(nodes);\n const nodesArray = Array.from(nodes.values());\n const zIndex = Math.max(...nodesArray.map((node) => node.internals.z + 1));\n const wrapperStyle = {\n position: 'absolute',\n transform: getNodeToolbarTransform(nodeRect, { x, y, zoom }, position, offset, align),\n zIndex,\n ...style,\n };\n return (jsx(NodeToolbarPortal, { children: jsx(\"div\", { style: wrapperStyle, className: cc(['react-flow__node-toolbar', className]), ...rest, \"data-id\": nodesArray.reduce((acc, node) => `${acc}${node.id} `, '').trim(), children: children }) }));\n}\n\nconst zoomSelector = (state) => state.transform[2];\n/**\n * This component can render a toolbar or tooltip to one side of a custom edge. This\n * toolbar doesn't scale with the viewport so that the content stays the same size.\n *\n * @public\n * @example\n * ```jsx\n * import { EdgeToolbar, BaseEdge, getBezierPath, type EdgeProps } from \"@xyflow/react\";\n *\n * export function CustomEdge({ id, data, ...props }: EdgeProps) {\n * const [edgePath, centerX, centerY] = getBezierPath(props);\n *\n * return (\n * <>\n * <BaseEdge id={id} path={edgePath} />\n * <EdgeToolbar edgeId={id} x={centerX} y={centerY} isVisible>\n * <button onClick={() => console.log('edge', id, 'click')}}>Click me</button>\n * </EdgeToolbar>\n * </>\n * );\n * }\n * ```\n */\nfunction EdgeToolbar({ edgeId, x, y, children, className, style, isVisible, alignX = 'center', alignY = 'center', ...rest }) {\n const edgeSelector = useCallback((state) => state.edgeLookup.get(edgeId), [edgeId]);\n const edge = useStore(edgeSelector, shallow);\n const isActive = typeof isVisible === 'boolean' ? isVisible : edge?.selected;\n const zoom = useStore(zoomSelector);\n if (!isActive) {\n return null;\n }\n const zIndex = (edge?.zIndex ?? 0) + 1;\n const transform = getEdgeToolbarTransform(x, y, zoom, alignX, alignY);\n return (jsx(EdgeLabelRenderer, { children: jsx(\"div\", { style: {\n position: 'absolute',\n transform,\n zIndex,\n pointerEvents: 'all',\n transformOrigin: '0 0',\n ...style,\n }, className: cc(['react-flow__edge-toolbar', className]), \"data-id\": edge?.id ?? '', ...rest, children: children }) }));\n}\n\nexport { Background, BackgroundVariant, BaseEdge, BezierEdge, ControlButton, Controls, EdgeLabelRenderer, EdgeText, EdgeToolbar, Handle, MiniMap, MiniMapNode, NodeResizeControl, NodeResizer, NodeToolbar, Panel, index as ReactFlow, ReactFlowProvider, SimpleBezierEdge, SmoothStepEdge, StepEdge, StraightEdge, ViewportPortal, addEdge, applyEdgeChanges, applyNodeChanges, experimental_useOnEdgesChangeMiddleware, experimental_useOnNodesChangeMiddleware, getSimpleBezierPath, isEdge, isNode, reconnectEdge, useConnection, useEdges, useEdgesState, useHandleConnections, useInternalNode, useKeyPress, useNodeConnections, useNodeId, useNodes, useNodesData, useNodesInitialized, useNodesState, useOnSelectionChange, useOnViewportChange, useReactFlow, useStore, useStoreApi, useUpdateNodeInternals, useViewport };\n","// Palette presets; pure data used by the UI to seed new triggers and steps.\n\n// The document blocks live in the reactor piece, and are offered here too:\n// they are what most workflows on a reactor are built from, and a picker that\n// made an author search for them would be a worse picker.\nimport { REACTOR_PIECE } from \"./reactor-piece-form.js\";\n\nexport interface BlockPreset {\n label: string;\n blockType: string;\n description: string;\n defaultConfig: unknown;\n // Which section of the picker it belongs to: \"core\" is the engine's own,\n // \"powerhouse\" the reactor piece, listed right after it.\n\n // Optional because a pick built from a search hit or an existing step is\n // the same shape but belongs to no section.\n group?: \"core\" | \"powerhouse\";\n}\n\nexport const TRIGGER_PRESETS: BlockPreset[] = [\n {\n label: \"Manual\",\n blockType: \"core#manual\",\n group: \"core\",\n description: \"Fired on demand with a payload.\",\n defaultConfig: {},\n },\n {\n label: \"Schedule\",\n blockType: \"core#schedule\",\n group: \"core\",\n description: \"Fires on a cron expression or fixed interval.\",\n defaultConfig: { mode: \"cron\", cron: \"0 9 * * 1-5\", timezone: \"UTC\" },\n },\n {\n label: \"Webhook\",\n blockType: \"core#webhook\",\n group: \"core\",\n description: \"Fires when a provider POSTs to this workflow's URL.\",\n defaultConfig: { methods: \"POST\", scheme: \"none\", responseMode: \"async\" },\n },\n {\n label: \"Document event\",\n blockType: `${REACTOR_PIECE}#trigger:document-event`,\n group: \"powerhouse\",\n description: \"Fires when a matching document operation lands.\",\n defaultConfig: {},\n },\n {\n label: \"Document created\",\n blockType: `${REACTOR_PIECE}#trigger:document-created`,\n group: \"powerhouse\",\n description: \"Fires when a document is added to a drive.\",\n defaultConfig: {},\n },\n {\n label: \"Document deleted\",\n blockType: `${REACTOR_PIECE}#trigger:document-deleted`,\n group: \"powerhouse\",\n description: \"Fires when a document is removed from a drive.\",\n defaultConfig: {},\n },\n];\n\nexport const STEP_PRESETS: BlockPreset[] = [\n {\n label: \"Branch\",\n blockType: \"core#branch\",\n group: \"core\",\n description: \"Routes true/false on a condition.\",\n defaultConfig: { condition: \"{{trigger.payload.ok}}\" },\n },\n {\n label: \"Assert\",\n blockType: \"core#assert\",\n group: \"core\",\n description:\n \"Fails the run when a value is blank, rejected or not allowed.\",\n defaultConfig: { value: \"\", allowValues: [] },\n },\n {\n label: \"Create document\",\n blockType: `${REACTOR_PIECE}#document-create`,\n group: \"powerhouse\",\n description: \"Creates a Powerhouse document.\",\n defaultConfig: { documentType: \"\", name: \"\" },\n },\n {\n label: \"Dispatch actions\",\n blockType: `${REACTOR_PIECE}#document-dispatch`,\n group: \"powerhouse\",\n description: \"Sends actions to a document.\",\n defaultConfig: { documentId: \"\", actions: [] },\n },\n {\n label: \"Get document\",\n blockType: `${REACTOR_PIECE}#document-get`,\n group: \"powerhouse\",\n description: \"Reads a document's current state.\",\n defaultConfig: { documentId: \"\" },\n },\n {\n label: \"Find documents\",\n blockType: `${REACTOR_PIECE}#document-find`,\n group: \"powerhouse\",\n description: \"Lists documents by type and name.\",\n defaultConfig: { documentType: \"\" },\n },\n {\n label: \"List document types\",\n blockType: `${REACTOR_PIECE}#document-types`,\n group: \"powerhouse\",\n description: \"Document models installed on this reactor.\",\n defaultConfig: {},\n },\n {\n label: \"Get document schema\",\n blockType: `${REACTOR_PIECE}#document-schema`,\n group: \"powerhouse\",\n description: \"Action and state schemas of a document type.\",\n defaultConfig: { documentType: \"\" },\n },\n];\n","// Dragging a step card onto an append slot re-parents it. The slots are the\n// only drop targets, so a drop always names a step and a port.\nimport { useSyncExternalStore } from \"react\";\nimport { reachableFrom } from \"./ap-layout.js\";\nimport type { WorkflowModel } from \"./model.js\";\n\nexport interface StepMove {\n stepId: string;\n toParentId: string;\n port: string;\n}\n\nexport type MoveRejection = \"self\" | \"cycle\" | \"already-there\";\n\n// Why this move can't happen, or null when it can.\nexport function moveRejection(\n model: WorkflowModel,\n move: StepMove,\n): MoveRejection | null {\n if (move.stepId === move.toParentId) return \"self\";\n if (\n model.edges.some(\n (edge) =>\n edge.from === move.toParentId &&\n edge.to === move.stepId &&\n edge.port === move.port,\n )\n ) {\n return \"already-there\";\n }\n // The slot's owner must not be somewhere the step already leads to.\n if (reachableFrom(move.stepId, model.edges).has(move.toParentId)) {\n return \"cycle\";\n }\n return null;\n}\n\nexport function canMoveStep(model: WorkflowModel, move: StepMove): boolean {\n return moveRejection(model, move) === null;\n}\n\nexport const MOVE_REJECTION_TEXT: Record<MoveRejection, string> = {\n self: \"A step can't follow itself\",\n cycle: \"That slot is inside this step's own path\",\n \"already-there\": \"Already connected there\",\n};\n\n// The step being dragged, shared with the slots so they can offer themselves.\nlet dragging: string | undefined;\nconst listeners = new Set<() => void>();\n\nexport function setDraggingStep(stepId: string | undefined): void {\n if (dragging === stepId) return;\n dragging = stepId;\n for (const listener of listeners) listener();\n}\n\nfunction subscribe(listener: () => void): () => void {\n listeners.add(listener);\n return () => listeners.delete(listener);\n}\n\nfunction snapshot(): string | undefined {\n return dragging;\n}\n\nexport function useDraggingStep(): string | undefined {\n return useSyncExternalStore(subscribe, snapshot, snapshot);\n}\n","// Step card + add buttons, ported from the Activepieces builder step-node\n// and add-button components (MIT, activepieces packages/web).\nimport { Handle, Position, type NodeProps } from \"@xyflow/react\";\nimport { useEffect, useState } from \"react\";\nimport {\n ADD_BUTTON_SIZE,\n BIG_ADD_BUTTON_SIZE,\n STEP_HEIGHT,\n STEP_WIDTH,\n} from \"./ap-layout.js\";\nimport { blockMeta } from \"./block-meta.js\";\nimport { BlockLogo, BlockSelector } from \"./BlockSelector.js\";\nimport { STEP_PRESETS, TRIGGER_PRESETS, type BlockPreset } from \"./blocks.js\";\nimport type { BlockForm } from \"./forms.js\";\nimport type { StepModel, TriggerModel } from \"./model.js\";\nimport {\n MOVE_REJECTION_TEXT,\n setDraggingStep,\n useDraggingStep,\n type MoveRejection,\n type StepMove,\n} from \"./step-drag.js\";\nimport { missingForBlock } from \"./validation.js\";\n\nconst hiddenHandle = { opacity: 0, pointerEvents: \"none\" as const };\n\n// Required fields still empty on this block; a loading form counts as none.\nfunction useMissingRequired(\n blockType: string,\n config: unknown,\n connectionId: string | null,\n): string[] {\n const [form, setForm] = useState<BlockForm | null | \"loading\">(\"loading\");\n useEffect(() => {\n const getBlockForm = getCanvasHandlers()?.getBlockForm;\n if (!getBlockForm) {\n // eslint-disable-next-line react-hooks/set-state-in-effect -- no source yet, so there is no form to render\n setForm(null);\n return;\n }\n let alive = true;\n setForm(\"loading\");\n getBlockForm(blockType).then(\n (result) => {\n if (alive) setForm(result);\n },\n () => {\n if (alive) setForm(null);\n },\n );\n return () => {\n alive = false;\n };\n }, [blockType]);\n return missingForBlock(form, config, connectionId);\n}\n\nexport function ApStepNode(props: NodeProps) {\n const data = props.data as\n | { kind: \"trigger\"; trigger: TriggerModel }\n | { kind: \"step\"; step: StepModel };\n const blockType =\n data.kind === \"trigger\" ? data.trigger.blockType : data.step.blockType;\n const meta = blockMeta(blockType);\n const title =\n data.kind === \"trigger\"\n ? meta.displayName\n : data.step.name || data.step.key;\n const missing = useMissingRequired(\n blockType,\n data.kind === \"trigger\" ? data.trigger.config : data.step.config,\n data.kind === \"trigger\"\n ? data.trigger.connectionId\n : data.step.connectionId,\n );\n\n const dragging = useDraggingStep();\n const isDragged = data.kind === \"step\" && dragging === data.step.id;\n\n return (\n <div\n style={{ width: STEP_WIDTH, height: STEP_HEIGHT }}\n className={`border-box group relative overflow-visible rounded-md border border-solid bg-white shadow-sm transition-all ${\n props.selected ? \"border-blue-500\" : \"border-slate-200\"\n } ${isDragged ? \"opacity-40\" : \"\"} ${\n data.kind === \"step\"\n ? // nodrag/nopan hand the gesture over: without them React Flow's\n // pane claims the mousedown and the canvas pans instead.\n \"nodrag nopan cursor-grab active:cursor-grabbing\"\n : \"\"\n }`}\n draggable={data.kind === \"step\"}\n onDragStart={(event) => {\n if (data.kind !== \"step\") return;\n event.dataTransfer.effectAllowed = \"move\";\n // Firefox ignores a drag with no payload.\n event.dataTransfer.setData(\"text/plain\", data.step.id);\n setDraggingStep(data.step.id);\n }}\n onDragEnd={() => setDraggingStep(undefined)}\n >\n <Handle type=\"target\" position={Position.Top} style={hiddenHandle} />\n <div className=\"flex h-full items-center gap-3 px-3\">\n <BlockLogo blockType={blockType} size={36} />\n <div className=\"min-w-0 grow\">\n <div className=\"truncate text-sm font-medium text-slate-800\">\n {title}\n </div>\n <div className=\"truncate text-xs text-slate-400\">\n {data.kind === \"trigger\"\n ? `Trigger · ${meta.subtitle}`\n : `${data.step.key} · ${meta.subtitle}`}\n </div>\n </div>\n </div>\n {missing.length > 0 ? (\n <span\n className=\"absolute -right-1 -top-1 h-3 w-3 rounded-full border-2 border-solid border-white bg-amber-400\"\n title={`Missing: ${missing.join(\", \")}`}\n />\n ) : null}\n <Handle type=\"source\" position={Position.Bottom} style={hiddenHandle} />\n </div>\n );\n}\n\n// Shared with the edges, which label a taken port the same way.\nexport const PORT_LABEL_CLASSES: Record<string, string> = {\n true: \"bg-green-100 text-green-700 hover:bg-green-200\",\n false: \"bg-red-100 text-red-600 hover:bg-red-200\",\n error: \"bg-amber-100 text-amber-700 hover:bg-amber-200\",\n};\n\nfunction AddButton(props: {\n size?: number;\n title: string;\n presets: BlockPreset[];\n onPick: (preset: BlockPreset) => void;\n showPieces?: boolean;\n pieceMode?: \"actions\" | \"triggers\";\n attachSteps?: StepModel[];\n onAttach?: (stepId: string) => void;\n // Named ports read as their name; an unnamed one is just a plus.\n label?: string;\n}) {\n const [open, setOpen] = useState(false);\n const size = props.size ?? ADD_BUTTON_SIZE;\n const label = props.label;\n return (\n <div className=\"relative\" style={{ width: size, height: size }}>\n <button\n type=\"button\"\n style={label ? { height: size } : { width: size, height: size }}\n // Labelled buttons keep the node's own footprint and overflow it\n // evenly, so the layout still positions them by their centre.\n className={`flex cursor-pointer items-center justify-center rounded-md border border-solid transition-all ${\n label\n ? \"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 px-1.5 text-[10px] font-semibold\"\n : \"\"\n } ${\n open\n ? \"border-blue-500 bg-blue-500 text-white\"\n : label\n ? `border-transparent ${PORT_LABEL_CLASSES[label] ?? \"bg-slate-100 text-slate-500 hover:bg-slate-200\"}`\n : \"border-slate-300 bg-white text-slate-700 hover:border-slate-400\"\n }`}\n onClick={(event) => {\n event.stopPropagation();\n setOpen((value) => !value);\n }}\n >\n {label ? (\n label\n ) : (\n <svg width={size * 0.55} height={size * 0.55} viewBox=\"0 0 24 24\">\n <path\n d=\"M12 5v14M5 12h14\"\n stroke=\"currentColor\"\n strokeWidth={3}\n strokeLinecap=\"round\"\n fill=\"none\"\n />\n </svg>\n )}\n </button>\n {open ? (\n <div\n data-selector-open=\"true\"\n className=\"absolute left-1/2 top-full z-50 mt-1 -translate-x-1/2\"\n >\n <BlockSelector\n title={props.title}\n presets={props.presets}\n showPieces={props.showPieces}\n pieceMode={props.pieceMode}\n attachSteps={props.attachSteps}\n onAttach={\n props.onAttach\n ? (stepId) => {\n setOpen(false);\n props.onAttach?.(stepId);\n }\n : undefined\n }\n onPick={(preset) => {\n setOpen(false);\n props.onPick(preset);\n }}\n onClose={() => setOpen(false)}\n />\n </div>\n ) : null}\n </div>\n );\n}\n\nexport interface ApCanvasHandlers {\n appendStep: (fromId: string, port: string, preset: BlockPreset) => void;\n insertOnEdge: (edgeId: string, preset: BlockPreset) => void;\n pickTrigger: (preset: BlockPreset) => void;\n // Re-attaching steps that are unreachable from the trigger.\n attachableSteps: (fromId: string) => StepModel[];\n attachStep: (fromId: string, port: string, stepId: string) => void;\n // Dragging a step card onto a slot.\n moveStep: (move: StepMove) => void;\n moveRejection: (move: StepMove) => MoveRejection | null;\n // Form descriptor lookup for the required-fields badge.\n getBlockForm?: (blockType: string) => Promise<BlockForm | null>;\n}\n\nlet canvasHandlers: ApCanvasHandlers | undefined;\n\n// Node/edge components can't receive functions through the layout data\n// cleanly, so the canvas registers its handlers module-side before render.\nexport function registerCanvasHandlers(handlers: ApCanvasHandlers): void {\n canvasHandlers = handlers;\n}\n\nexport function getCanvasHandlers(): ApCanvasHandlers | undefined {\n return canvasHandlers;\n}\n\nexport function ApAppendNode(props: NodeProps) {\n const data = props.data as {\n parentId: string;\n port: string;\n card?: boolean;\n };\n const handlers = getCanvasHandlers();\n const attachSteps = handlers?.attachableSteps(data.parentId);\n const dragging = useDraggingStep();\n const move = dragging\n ? { stepId: dragging, toParentId: data.parentId, port: data.port }\n : undefined;\n const rejection = move ? handlers?.moveRejection(move) : undefined;\n\n if (move) {\n // While a card is in flight the slot becomes the drop target, sized like\n // the step it would hold. The node keeps its button-sized footprint so the\n // layout still anchors it by the same point.\n return (\n <div\n className=\"relative\"\n style={\n data.card\n ? { width: STEP_WIDTH, height: STEP_HEIGHT }\n : { width: ADD_BUTTON_SIZE, height: ADD_BUTTON_SIZE }\n }\n >\n <Handle type=\"target\" position={Position.Top} style={hiddenHandle} />\n <div\n style={{ width: STEP_WIDTH, height: STEP_HEIGHT }}\n className={`nodrag nopan absolute left-1/2 top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-md border-2 border-dashed text-xs font-medium transition-colors ${\n rejection\n ? \"border-slate-200 bg-slate-50 text-slate-400\"\n : \"border-blue-400 bg-blue-50 text-blue-600\"\n }`}\n title={rejection ? MOVE_REJECTION_TEXT[rejection] : undefined}\n onDragOver={(event) => {\n if (rejection) return;\n event.preventDefault();\n event.dataTransfer.dropEffect = \"move\";\n }}\n onDrop={(event) => {\n event.preventDefault();\n if (rejection) return;\n handlers?.moveStep(move);\n setDraggingStep(undefined);\n }}\n >\n {rejection\n ? MOVE_REJECTION_TEXT[rejection]\n : data.port === \"next\"\n ? \"Move here\"\n : `Move to ${data.port}`}\n </div>\n </div>\n );\n }\n\n if (data.card) {\n return (\n <div\n style={{ width: STEP_WIDTH, height: STEP_HEIGHT }}\n className=\"relative flex items-center justify-center rounded-md border border-dashed border-slate-300 bg-slate-50/60\"\n >\n <Handle type=\"target\" position={Position.Top} style={hiddenHandle} />\n <span\n className={`absolute left-3 top-3 rounded px-1.5 text-[10px] font-semibold ${\n PORT_LABEL_CLASSES[data.port] ?? \"bg-slate-100 text-slate-500\"\n }`}\n >\n {data.port}\n </span>\n <AddButton\n title={`Add step (${data.port})`}\n presets={STEP_PRESETS}\n showPieces\n attachSteps={attachSteps}\n onAttach={(stepId) =>\n getCanvasHandlers()?.attachStep(data.parentId, data.port, stepId)\n }\n onPick={(preset) =>\n getCanvasHandlers()?.appendStep(data.parentId, data.port, preset)\n }\n />\n </div>\n );\n }\n\n return (\n <>\n <Handle type=\"target\" position={Position.Top} style={hiddenHandle} />\n <AddButton\n title={data.port === \"next\" ? \"Add step\" : `Add step (${data.port})`}\n label={data.port === \"next\" ? undefined : data.port}\n presets={STEP_PRESETS}\n showPieces\n attachSteps={attachSteps}\n onAttach={(stepId) =>\n getCanvasHandlers()?.attachStep(data.parentId, data.port, stepId)\n }\n onPick={(preset) =>\n getCanvasHandlers()?.appendStep(data.parentId, data.port, preset)\n }\n />\n </>\n );\n}\n\nexport function ApBigButtonNode(_props: NodeProps) {\n return (\n <div className=\"flex flex-col items-center gap-2\">\n <AddButton\n size={BIG_ADD_BUTTON_SIZE}\n title=\"Choose a trigger\"\n presets={TRIGGER_PRESETS}\n showPieces\n pieceMode=\"triggers\"\n onPick={(preset) => getCanvasHandlers()?.pickTrigger(preset)}\n />\n <span className=\"text-xs text-slate-400\">Select a trigger</span>\n </div>\n );\n}\n\nexport { AddButton };\n\nexport const apNodeTypes = {\n apStep: ApStepNode,\n apAppend: ApAppendNode,\n apBigButton: ApBigButtonNode,\n};\n","// Edge with the mid-line add button, ported from the Activepieces builder\n// edges/add-button (MIT, activepieces packages/web).\nimport {\n BaseEdge,\n EdgeLabelRenderer,\n getSmoothStepPath,\n Position,\n type EdgeProps,\n} from \"@xyflow/react\";\nimport {\n AddButton,\n getCanvasHandlers,\n PORT_LABEL_CLASSES,\n} from \"./ap-nodes.js\";\nimport { STEP_PRESETS } from \"./blocks.js\";\n\nexport function ApEdge(props: EdgeProps) {\n const data = props.data as {\n edgeId: string;\n port: string;\n condition: string | null;\n };\n const [path, labelX, labelY] = getSmoothStepPath({\n sourceX: props.sourceX,\n sourceY: props.sourceY,\n targetX: props.targetX,\n targetY: props.targetY,\n sourcePosition: Position.Bottom,\n targetPosition: Position.Top,\n borderRadius: 15,\n });\n const portLabel = data.port !== \"next\" ? data.port : null;\n\n return (\n <>\n <BaseEdge\n id={props.id}\n path={path}\n style={{ stroke: \"#cbd5e1\", strokeWidth: 1.5 }}\n />\n <EdgeLabelRenderer>\n <div\n className=\"nodrag nopan pointer-events-auto absolute flex items-center gap-1\"\n style={{\n transform: `translate(-50%, -50%) translate(${labelX}px, ${labelY}px)`,\n }}\n >\n {portLabel ? (\n <span\n className={`rounded px-1.5 py-0.5 text-[10px] font-semibold ${\n PORT_LABEL_CLASSES[portLabel] ?? \"bg-slate-100 text-slate-500\"\n }`}\n >\n {portLabel}\n {data.condition ? \" ?\" : \"\"}\n </span>\n ) : null}\n <AddButton\n title=\"Insert step\"\n presets={STEP_PRESETS}\n showPieces\n onPick={(preset) =>\n getCanvasHandlers()?.insertOnEdge(data.edgeId, preset)\n }\n />\n </div>\n </EdgeLabelRenderer>\n </>\n );\n}\n\nexport function ApLinkEdge(props: EdgeProps) {\n const [path] = getSmoothStepPath({\n sourceX: props.sourceX,\n sourceY: props.sourceY,\n targetX: props.targetX,\n targetY: props.targetY,\n sourcePosition: Position.Bottom,\n targetPosition: Position.Top,\n borderRadius: 15,\n });\n return (\n <BaseEdge\n id={props.id}\n path={path}\n style={{ stroke: \"#cbd5e1\", strokeWidth: 1.5, strokeDasharray: \"4 3\" }}\n />\n );\n}\n\nexport const apEdgeTypes = { apEdge: ApEdge, apLink: ApLinkEdge };\n","// Canvas right-click menu, in the spirit of the Activepieces builder step and\n// edge context menus; the step pickers reuse the add-button BlockSelector.\nimport { useEffect, useRef, useState } from \"react\";\nimport { BlockSelector } from \"./BlockSelector.js\";\nimport { STEP_PRESETS, TRIGGER_PRESETS, type BlockPreset } from \"./blocks.js\";\nimport {\n contextMenuItems,\n menuHeight,\n menuPosition,\n MENU_WIDTH,\n type ContextMenuActionId,\n type ContextMenuTarget,\n} from \"./canvas-menu.js\";\nimport type { PointModel, WorkflowModel } from \"./model.js\";\n\nexport interface CanvasMenuState {\n target: ContextMenuTarget;\n point: PointModel;\n}\n\n// Actions that pick a block first; the rest fire straight away.\nconst PICKERS: Partial<Record<ContextMenuActionId, string>> = {\n addBelow: \"Add step\",\n addStep: \"Add step\",\n insertStep: \"Insert step\",\n changeTrigger: \"Choose a trigger\",\n};\n\nconst PICKER_SIZE = { width: 320, height: 400 };\n\nexport function CanvasContextMenu(props: {\n state: CanvasMenuState;\n model: WorkflowModel;\n onAction: (action: ContextMenuActionId, preset?: BlockPreset) => void;\n onClose: () => void;\n}) {\n const [picker, setPicker] = useState<ContextMenuActionId | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const onMouseDown = (event: MouseEvent) => {\n if (!containerRef.current?.contains(event.target as globalThis.Node)) {\n props.onClose();\n }\n };\n const onKeyDown = (event: KeyboardEvent) => {\n if (event.key === \"Escape\") props.onClose();\n };\n window.addEventListener(\"mousedown\", onMouseDown);\n window.addEventListener(\"keydown\", onKeyDown);\n window.addEventListener(\"scroll\", props.onClose, true);\n return () => {\n window.removeEventListener(\"mousedown\", onMouseDown);\n window.removeEventListener(\"keydown\", onKeyDown);\n window.removeEventListener(\"scroll\", props.onClose, true);\n };\n }, [props]);\n\n const items = contextMenuItems(props.state.target, props.model);\n const size = picker\n ? PICKER_SIZE\n : { width: MENU_WIDTH, height: menuHeight(items.length) };\n const position = menuPosition(props.state.point, size, {\n width: window.innerWidth,\n height: window.innerHeight,\n });\n\n return (\n <div\n ref={containerRef}\n className=\"workflow-context-menu nodrag nopan fixed\"\n style={{ left: position.x, top: position.y }}\n onContextMenu={(event) => event.preventDefault()}\n >\n {picker ? (\n <BlockSelector\n title={PICKERS[picker] ?? \"\"}\n presets={picker === \"changeTrigger\" ? TRIGGER_PRESETS : STEP_PRESETS}\n showPieces\n pieceMode={picker === \"changeTrigger\" ? \"triggers\" : \"actions\"}\n onPick={(preset) => props.onAction(picker, preset)}\n onClose={props.onClose}\n />\n ) : (\n <div\n style={{ width: MENU_WIDTH }}\n className=\"rounded-md border border-solid border-slate-200 bg-white py-1 shadow-lg\"\n >\n {items.map((item) => (\n <button\n key={item.id}\n type=\"button\"\n className={`flex w-full items-center px-3 py-1.5 text-left text-xs text-slate-700 ${\n item.disabled\n ? \"cursor-not-allowed opacity-50\"\n : \"hover:bg-slate-50\"\n }`}\n disabled={item.disabled}\n onClick={() => {\n if (PICKERS[item.id]) setPicker(item.id);\n else props.onAction(item.id);\n }}\n >\n {item.label}\n </button>\n ))}\n </div>\n )}\n </div>\n );\n}\n","import {\n Background,\n Controls,\n MiniMap,\n ReactFlow,\n type Edge,\n type Node,\n type ReactFlowInstance,\n} from \"@xyflow/react\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { apEdgeTypes } from \"./ap-edge.js\";\nimport { attachableSteps, layoutWorkflow } from \"./ap-layout.js\";\nimport { moveRejection } from \"./step-drag.js\";\nimport { apNodeTypes, registerCanvasHandlers } from \"./ap-nodes.js\";\nimport type { BlockPreset } from \"./blocks.js\";\nimport {\n CanvasContextMenu,\n type CanvasMenuState,\n} from \"./CanvasContextMenu.js\";\nimport type { ContextMenuActionId, ContextMenuTarget } from \"./canvas-menu.js\";\nimport type { DesignTimeService } from \"./forms.js\";\nimport {\n uniqueStepKey,\n type AddStepInputModel,\n type WorkflowEditorCallbacks,\n type WorkflowModel,\n} from \"./model.js\";\n\ninterface WorkflowCanvasProps {\n model: WorkflowModel;\n callbacks: WorkflowEditorCallbacks;\n onSelect: (id: string | null) => void;\n designTime?: DesignTimeService;\n}\n\nfunction presetToInput(\n preset: BlockPreset,\n model: WorkflowModel,\n): AddStepInputModel {\n return {\n key: uniqueStepKey(\n model.steps.map((step) => step.key),\n preset.label,\n ),\n name: preset.label,\n blockType: preset.blockType,\n config: preset.defaultConfig,\n };\n}\n\nconst MINIMAP_NODE_COLOR = (node: Node) =>\n node.type === \"apStep\" ? \"#cbd5e1\" : \"transparent\";\n\nexport function WorkflowCanvas({\n model,\n callbacks,\n onSelect,\n designTime,\n}: WorkflowCanvasProps) {\n const { nodes, edges } = useMemo(() => layoutWorkflow(model), [model]);\n const [menu, setMenu] = useState<CanvasMenuState | null>(null);\n const [flow, setFlow] = useState<ReactFlowInstance | null>(null);\n\n useEffect(() => {\n registerCanvasHandlers({\n appendStep: (fromId, port, preset) =>\n callbacks.appendStep(fromId, port, presetToInput(preset, model)),\n insertOnEdge: (edgeId, preset) =>\n callbacks.insertStepOnEdge(edgeId, presetToInput(preset, model)),\n pickTrigger: (preset) =>\n callbacks.setTrigger({\n blockType: preset.blockType,\n config: preset.defaultConfig,\n }),\n attachableSteps: (fromId) => attachableSteps(model, fromId),\n moveStep: (move) => callbacks.moveStep(move),\n moveRejection: (move) => moveRejection(model, move),\n attachStep: (fromId, port, stepId) =>\n callbacks.addEdge({ from: fromId, to: stepId, port }),\n getBlockForm: designTime\n ? (blockType) => designTime.getBlockForm(blockType)\n : undefined,\n });\n }, [callbacks, model, designTime]);\n\n // Delete/Backspace on a selection: steps go through removeStep (which\n // drops their edges); only edges between surviving steps are removed here.\n const onDelete = ({\n nodes: deletedNodes,\n edges: deletedEdges,\n }: {\n nodes: Node[];\n edges: Edge[];\n }) => {\n const stepIds = new Set(model.steps.map((step) => step.id));\n const removedSteps = new Set(\n deletedNodes\n .filter((node) => node.type === \"apStep\" && stepIds.has(node.id))\n .map((node) => node.id),\n );\n for (const id of removedSteps) callbacks.removeStep(id);\n for (const edge of deletedEdges) {\n if (edge.type !== \"apEdge\") continue;\n if (removedSteps.has(edge.source) || removedSteps.has(edge.target)) {\n continue;\n }\n if (model.edges.some((entry) => entry.id === edge.id)) {\n callbacks.removeEdge(edge.id);\n }\n }\n if (removedSteps.size > 0) onSelect(null);\n };\n\n const openMenu = (\n event: { clientX: number; clientY: number; preventDefault: () => void },\n target: ContextMenuTarget,\n ) => {\n event.preventDefault();\n setMenu({ target, point: { x: event.clientX, y: event.clientY } });\n };\n\n const onMenuAction = (action: ContextMenuActionId, preset?: BlockPreset) => {\n if (!menu) return;\n const target = menu.target;\n const point = menu.point;\n setMenu(null);\n switch (action) {\n case \"open\":\n onSelect(\n target.kind === \"step\" ? target.id : (model.trigger?.id ?? null),\n );\n break;\n case \"addBelow\": {\n const fromId = target.kind === \"step\" ? target.id : model.trigger?.id;\n if (preset && fromId) {\n callbacks.appendStep(fromId, \"next\", presetToInput(preset, model));\n }\n break;\n }\n case \"duplicate\":\n if (target.kind === \"step\") callbacks.duplicateStep(target.id);\n break;\n case \"removeStep\":\n if (target.kind === \"step\") {\n callbacks.removeStep(target.id);\n onSelect(null);\n }\n break;\n case \"changeTrigger\":\n if (preset) {\n callbacks.setTrigger({\n blockType: preset.blockType,\n config: preset.defaultConfig,\n });\n }\n break;\n case \"removeTrigger\":\n callbacks.clearTrigger();\n onSelect(null);\n break;\n case \"insertStep\":\n if (preset && target.kind === \"edge\") {\n callbacks.insertStepOnEdge(target.id, presetToInput(preset, model));\n }\n break;\n case \"removeEdge\":\n if (target.kind === \"edge\") callbacks.removeEdge(target.id);\n break;\n case \"addStep\":\n if (preset) {\n callbacks.addStep({\n ...presetToInput(preset, model),\n position: flow?.screenToFlowPosition(point),\n });\n }\n break;\n case \"selectAll\":\n flow?.setNodes((current) =>\n current.map((node) =>\n node.type === \"apStep\" ? { ...node, selected: true } : node,\n ),\n );\n break;\n case \"fitView\":\n void flow?.fitView({ padding: 0.25, maxZoom: 1 });\n break;\n }\n };\n\n return (\n <div\n className=\"relative h-full w-full\"\n onContextMenu={(event) => event.preventDefault()}\n >\n <ReactFlow\n nodes={nodes}\n edges={edges}\n nodeTypes={apNodeTypes}\n edgeTypes={apEdgeTypes}\n onInit={setFlow}\n onNodeClick={(_event, node) => {\n setMenu(null);\n if (node.type === \"apStep\") onSelect(node.id);\n }}\n onPaneClick={() => {\n setMenu(null);\n onSelect(null);\n }}\n onNodeContextMenu={(event, node) =>\n openMenu(\n event,\n node.type !== \"apStep\"\n ? { kind: \"pane\" }\n : node.id === model.trigger?.id\n ? { kind: \"trigger\" }\n : { kind: \"step\", id: node.id },\n )\n }\n onEdgeContextMenu={(event, edge) =>\n openMenu(\n event,\n edge.type === \"apEdge\"\n ? { kind: \"edge\", id: edge.id }\n : { kind: \"pane\" },\n )\n }\n onPaneContextMenu={(event) => openMenu(event, { kind: \"pane\" })}\n onMove={() => setMenu(null)}\n onDelete={onDelete}\n nodesDraggable={false}\n nodesConnectable={false}\n deleteKeyCode={[\"Backspace\", \"Delete\"]}\n zoomOnDoubleClick={false}\n fitView\n fitViewOptions={{ padding: 0.25, maxZoom: 1 }}\n proOptions={{ hideAttribution: true }}\n >\n <Background gap={16} />\n <Controls showInteractive={false} />\n <MiniMap\n pannable\n zoomable\n nodeColor={MINIMAP_NODE_COLOR}\n nodeStrokeWidth={0}\n style={{ width: 140, height: 90 }}\n />\n </ReactFlow>\n {menu ? (\n <CanvasContextMenu\n state={menu}\n model={model}\n onAction={onMenuAction}\n onClose={() => setMenu(null)}\n />\n ) : null}\n </div>\n );\n}\n","import { useMemo, useState } from \"react\";\nimport {\n ExpressionPickerPopup,\n ExpressionTargetProvider,\n} from \"./ExpressionPicker.js\";\nimport type { DesignTimeService } from \"./forms.js\";\nimport type {\n WorkflowEditorCallbacks,\n WorkflowModel,\n WorkflowStatusValue,\n} from \"./model.js\";\nimport { StepPanel, TriggerPanel } from \"./StepPanel.js\";\nimport { VariablesEditor } from \"./VariablesEditor.js\";\nimport { WorkflowCanvas } from \"./WorkflowCanvas.js\";\n\nconst VARIABLES_VIEW = \"__variables\";\n\nconst STATUSES: WorkflowStatusValue[] = [\n \"DRAFT\",\n \"ENABLED\",\n \"DISABLED\",\n \"ARCHIVED\",\n];\n\nexport function WorkflowEditorApp(props: {\n model: WorkflowModel;\n callbacks: WorkflowEditorCallbacks;\n designTime?: DesignTimeService;\n}) {\n const { model, callbacks } = props;\n const [selectedId, setSelectedId] = useState<string | null>(null);\n\n const selectedStep = model.steps.find((step) => step.id === selectedId);\n const selectedTrigger =\n model.trigger && model.trigger.id === selectedId ? model.trigger : null;\n const showVariables = selectedId === VARIABLES_VIEW;\n const stepBlockTypes = useMemo(\n () =>\n Object.fromEntries(model.steps.map((step) => [step.key, step.blockType])),\n [model.steps],\n );\n\n return (\n <div className=\"flex min-h-0 flex-1 flex-col\">\n <div className=\"flex items-center gap-3 border-b border-slate-200 px-4 py-2\">\n <input\n key={model.name}\n className=\"min-w-0 max-w-72 rounded border border-transparent px-1 py-0.5 text-sm font-semibold text-slate-800 hover:border-slate-200 focus:border-slate-300 focus:outline-none\"\n defaultValue={model.name}\n placeholder=\"Untitled workflow\"\n spellCheck={false}\n onKeyDown={(event) => {\n if (event.key === \"Enter\") event.currentTarget.blur();\n }}\n onBlur={(event) => {\n const name = event.target.value.trim();\n if (name && name !== model.name) callbacks.setName(name);\n }}\n />\n <span className=\"rounded bg-slate-100 px-2 py-0.5 text-[11px] text-slate-500\">\n v{model.version}\n </span>\n <select\n className=\"rounded border border-slate-300 px-2 py-1 text-xs\"\n value={model.status}\n onChange={(event) =>\n callbacks.setStatus(event.target.value as WorkflowStatusValue)\n }\n >\n {STATUSES.map((status) => (\n <option key={status} value={status}>\n {status}\n </option>\n ))}\n </select>\n <span className=\"ml-auto text-[11px] text-slate-400\">\n Use the + buttons on the canvas to add steps\n </span>\n <button\n type=\"button\"\n className={`rounded border px-2 py-0.5 text-[11px] font-medium ${\n showVariables\n ? \"border-slate-800 bg-slate-800 text-white\"\n : \"border-slate-200 text-slate-500 hover:bg-slate-100\"\n }`}\n onClick={() => setSelectedId(showVariables ? null : VARIABLES_VIEW)}\n >\n Variables\n {model.variables.length > 0 ? ` (${model.variables.length})` : \"\"}\n </button>\n </div>\n <div className=\"flex min-h-0 flex-1\">\n <div className=\"min-h-[480px] min-w-0 flex-1\">\n <WorkflowCanvas\n model={model}\n callbacks={callbacks}\n onSelect={setSelectedId}\n designTime={props.designTime}\n />\n </div>\n {showVariables ? (\n <aside className=\"min-h-0 w-96 overflow-y-auto border-l border-slate-200 bg-slate-50\">\n <VariablesEditor\n variables={model.variables}\n callbacks={callbacks}\n onClose={() => setSelectedId(null)}\n />\n </aside>\n ) : null}\n {selectedStep || selectedTrigger ? (\n <ExpressionTargetProvider\n key={selectedId}\n stepBlockTypes={stepBlockTypes}\n triggerBlockType={model.trigger?.blockType}\n >\n <aside className=\"flex min-h-0 w-96 flex-col border-l border-slate-200 bg-slate-50\">\n <div className=\"min-h-0 flex-1 overflow-y-auto\">\n {selectedStep ? (\n <StepPanel\n key={selectedStep.id}\n step={selectedStep}\n model={model}\n callbacks={callbacks}\n onClose={() => setSelectedId(null)}\n designTime={props.designTime}\n />\n ) : null}\n {selectedTrigger ? (\n <TriggerPanel\n key={selectedTrigger.id}\n trigger={selectedTrigger}\n callbacks={callbacks}\n onClose={() => setSelectedId(null)}\n designTime={props.designTime}\n />\n ) : null}\n </div>\n <ExpressionPickerPopup />\n </aside>\n </ExpressionTargetProvider>\n ) : null}\n </div>\n </div>\n );\n}\n","import \"@xyflow/react/dist/style.css\";\nimport \"./ui/canvas.css\";\nimport { DocumentToolbar } from \"@powerhousedao/design-system/connect\";\nimport { useSelectedDocumentId } from \"@powerhousedao/reactor-browser\";\nimport { useSelectedWorkflowDocument } from \"document-models/workflow\";\nimport { useEffect, useMemo } from \"react\";\nimport { useWorkflowModel } from \"./document/useWorkflowModel.js\";\nimport \"./runtime-piece-source.js\";\nimport {\n createSecret,\n fetchBlockOutputTree,\n fetchConnections,\n fetchRuns,\n fetchSecretStat,\n fetchWebhookEndpoint,\n getBlockForm,\n invalidateConnections,\n loadBlockOptions,\n rotateSecret,\n testTrigger,\n type OutputTreeNode,\n} from \"./runtime-api.js\";\nimport { buildExpressionScope, EMPTY_SCOPE } from \"./ui/expression-scope.js\";\nimport { registerExpressionScopeSource } from \"./ui/ExpressionPicker.js\";\nimport type { DesignTimeService } from \"./ui/forms.js\";\nimport { DocumentErrorBoundary } from \"../shared/DocumentErrorBoundary.js\";\nimport { useSyncWorkflowRuntimeUrl } from \"./use-runtime-url.js\";\nimport { WorkflowEditorApp } from \"./ui/WorkflowEditorApp.js\";\n\nfunction WorkflowEditor() {\n useSyncWorkflowRuntimeUrl();\n const { model, callbacks } = useWorkflowModel();\n const [document] = useSelectedWorkflowDocument();\n const workflowId = document.header.id;\n\n const designTime = useMemo<DesignTimeService>(\n () => ({\n getBlockForm,\n loadOptions: loadBlockOptions,\n testTrigger: () => testTrigger(workflowId),\n webhookEndpoint: () => fetchWebhookEndpoint(workflowId),\n listConnections: fetchConnections,\n refreshConnections: invalidateConnections,\n secrets: {\n save: ({ ref, value, label }) =>\n ref ? rotateSecret(ref, value) : createSecret(value, label),\n stat: fetchSecretStat,\n },\n }),\n [workflowId],\n );\n\n // Scope for the {} picker: journaled outputs from the latest run where\n // available, authored shapes (declared types as leaves) otherwise.\n useEffect(() => {\n const treeValue = (nodes: OutputTreeNode[]): Record<string, unknown> =>\n Object.fromEntries(\n nodes.map((node) => [\n node.name,\n node.children ? treeValue(node.children) : node.type,\n ]),\n );\n const authoredOutput = async (blockType: string, config: unknown) => {\n try {\n const tree = await fetchBlockOutputTree(blockType, config);\n if (tree.nodes.length > 0) return treeValue(tree.nodes);\n // Schema with no sub-paths = the output itself is the value.\n return tree.source === \"none\" ? \"no declared schema\" : \"value\";\n } catch {\n return {};\n }\n };\n registerExpressionScopeSource({\n load: async ({ stepId }) => {\n // Trigger config fields run before any step; nothing to reference.\n if (!stepId) return EMPTY_SCOPE;\n const latestRun = await fetchRuns({ workflowId, limit: 1 }).then(\n (runs) => runs[0],\n () => undefined,\n );\n return buildExpressionScope({\n model,\n stepId,\n latestRun,\n authoredOutput,\n });\n },\n });\n }, [model, workflowId]);\n\n return (\n <div className=\"flex h-full min-h-0 flex-col bg-background\">\n <DocumentToolbar />\n <WorkflowEditorApp\n model={model}\n callbacks={callbacks}\n designTime={designTime}\n />\n </div>\n );\n}\n\n// A drive node can point at a document the reactor cannot serve; the document\n// hooks throw for it. The boundary keeps that failure inside the editor pane.\nexport default function Editor() {\n const documentId = useSelectedDocumentId();\n return (\n <DocumentErrorBoundary documentId={documentId}>\n <WorkflowEditor />\n </DocumentErrorBoundary>\n );\n}\n"],"x_google_ignoreList":[8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192],"mappings":";;;;;;;;;;;;;;;;;;AAkIA,SAAgB,cAAc,OAAiB,OAAuB;CACpE,MAAM,OACJ,MACG,aAAa,CACb,WAAW,eAAe,IAAI,CAC9B,WAAW,YAAY,GAAG,IAAI;CACnC,MAAM,OAAO,IAAI,IAAI,MAAM;CAC3B,IAAI,MAAM;CACV,IAAI,SAAS;AACb,QAAO,KAAK,IAAI,IAAI,CAAE,OAAM,GAAG,KAAK,GAAG;AACvC,QAAO;;AAIT,SAAgB,UAAU,WAA6B;AACrD,KAAI,cAAc,cAAe,QAAO;EAAC;EAAQ;EAAS;EAAQ;AAClE,QAAO,CAAC,QAAQ,QAAQ;;AAK1B,SAAgB,UAAU,WAA6B;AACrD,QAAO,UAAU,UAAU,CAAC,QAAQ,SAAS,SAAS,QAAQ;;;;ACzIhE,SAAS,QAAQ,OAAqC;AACpD,QAAO;EACL,MAAM,MAAM;EACZ,QA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