test-lah 1.0.8 → 1.0.10
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-build-manifest.json +71 -47
- package/.next/standalone/.next/app-path-routes-manifest.json +7 -4
- package/.next/standalone/.next/build-manifest.json +5 -5
- package/.next/standalone/.next/prerender-manifest.json +27 -27
- package/.next/standalone/.next/server/app/(dashboard)/integrations/page.js +2 -2
- package/.next/standalone/.next/server/app/(dashboard)/integrations/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/page.js +17 -70
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/summary/page.js +2 -22
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/summary/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/[projectId]/summary/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page.js +34 -2
- package/.next/standalone/.next/server/app/(dashboard)/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(dashboard)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
- package/.next/standalone/.next/server/app/api/e2e/route.js +19 -8
- package/.next/standalone/.next/server/app/api/e2e/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/generate/route.js +1 -18
- package/.next/standalone/.next/server/app/api/generate/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/generate/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/llm/encrypt/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/llm/test/route.js +1 -18
- package/.next/standalone/.next/server/app/api/llm/test/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/llm/test/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/api/mcp/route.js +50 -0
- package/.next/standalone/.next/server/app/api/mcp/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/refine-notes/route.js +29 -0
- package/.next/standalone/.next/server/app/api/refine-notes/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/refine-notes/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/state/route.js +1 -0
- package/.next/standalone/.next/server/app/api/state/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/state/route_client-reference-manifest.js +1 -0
- package/.next/standalone/.next/server/app/api/weather/route_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +3 -3
- package/.next/standalone/.next/server/app/integrations.html +1 -1
- package/.next/standalone/.next/server/app/integrations.rsc +4 -4
- package/.next/standalone/.next/server/app/login/page.js +2 -2
- package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +3 -3
- package/.next/standalone/.next/server/app/page.js +2 -2
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +4 -4
- package/.next/standalone/.next/server/app-paths-manifest.json +7 -4
- package/.next/standalone/.next/server/chunks/423.js +62 -0
- package/.next/standalone/.next/server/chunks/496.js +33 -0
- package/.next/standalone/.next/server/chunks/611.js +3 -3
- package/.next/standalone/.next/server/chunks/615.js +2 -2
- package/.next/standalone/.next/server/chunks/779.js +1 -0
- package/.next/standalone/.next/server/chunks/845.js +23 -20
- package/.next/standalone/.next/server/chunks/898.js +21 -0
- package/.next/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/pages-manifest.json +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/BI7koHWCC15MOwsCfxo2O/_buildManifest.js +1 -0
- package/.next/standalone/.next/static/chunks/172-84d6b7afea495880.js +1 -0
- package/.next/standalone/.next/static/chunks/253-d1beae5e3cf2d88e.js +1 -0
- package/.next/standalone/.next/static/chunks/{255-4f84124391a7dac4.js → 255-98a0bdaa30757bda.js} +1 -1
- package/.next/standalone/.next/static/chunks/642-75adb59cbb062e44.js +1 -0
- package/.next/standalone/.next/static/chunks/661-a763fedcbf90af81.js +1 -0
- package/.next/standalone/.next/static/chunks/793-7306e111aea85b00.js +1 -0
- package/.next/standalone/.next/static/chunks/798-8424899efd598f73.js +1 -0
- package/.next/standalone/.next/static/chunks/968-a7dcf12036013254.js +62 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/integrations/page-25d6f67123a8a2ef.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-a63b3fef68015cb5.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-cfab61233220bde3.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/summary/page-1650386b60d0337f.js +1 -0
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-420d60cc1ac676f3.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/e2e/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/generate/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/llm/encrypt/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/llm/test/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/mcp/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/refine-notes/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/state/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/standalone/.next/static/chunks/app/api/weather/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/{static/chunks/app/login/page-a655de2a3e8514f8.js → standalone/.next/static/chunks/app/login/page-35c717d39c71dcbf.js} +1 -1
- package/.next/standalone/.next/static/chunks/app/page-3e00e649355cd3ac.js +1 -0
- package/.next/standalone/.next/static/chunks/{main-646068343426c12d.js → main-2af68c75fbdc984e.js} +1 -1
- package/.next/standalone/.next/static/css/d95cfd16ee2f56f9.css +3 -0
- package/.next/standalone/node_modules/@next/env/package.json +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/agents.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/browserVersions.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/aac.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/abortcontroller.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ac3-ec3.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/accelerometer.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/addeventlistener.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ambient-light.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/apng.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/array-find-index.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/array-find.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/array-flat.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/array-includes.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/arrow-functions.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/asmjs.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/async-clipboard.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/async-functions.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/atob-btoa.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/audio-api.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/audio.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/audiotracks.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/autofocus.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/auxclick.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/av1.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/avif.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/background-attachment.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/background-clip-text.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/background-img-opts.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/background-position-x-y.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/background-sync.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/battery-status.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/beacon.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/beforeafterprint.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/bigint.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/blobbuilder.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/bloburls.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/border-image.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/border-radius.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/broadcastchannel.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/brotli.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/calc.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/canvas-blending.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/canvas-text.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/canvas.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ch-unit.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/channel-messaging.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/childnode-remove.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/classlist.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/clipboard.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/colr-v1.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/colr.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/comparedocumentposition.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/console-basic.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/console-time.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/const.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/constraint-validation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/contenteditable.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/cookie-store-api.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/cors.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/createimagebitmap.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/credential-management.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/cross-document-view-transitions.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/cryptography.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-all.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-animation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-any-link.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-appearance.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-at-counter-style.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-autofill.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-background-offsets.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-boxshadow.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-canvas.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-caret-color.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-cascade-layers.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-cascade-scope.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-case-insensitive.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-clip-path.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-color-adjust.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-color-function.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-conic-gradients.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-container-queries-style.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-container-queries.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-container-query-units.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-containment.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-content-visibility.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-counters.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-crisp-edges.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-cross-fade.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-default-pseudo.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-display-contents.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-element-function.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-env-function.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-exclusions.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-featurequeries.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-file-selector-button.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-filter-function.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-filters.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-first-letter.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-first-line.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-fixed.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-focus-visible.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-focus-within.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-font-palette.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-font-stretch.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-gencontent.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-gradients.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-grid-animation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-grid-lanes.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-grid.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-has.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-hyphens.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-if.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-image-orientation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-image-set.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-initial-letter.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-initial-value.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-lch-lab.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-letter-spacing.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-line-clamp.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-logical-props.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-masks.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-math-functions.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-media-interaction.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-media-resolution.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-media-scripting.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-mediaqueries.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-mixblendmode.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-module-scripts.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-motion-paths.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-namespaces.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-nesting.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-not-sel-list.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-nth-child-of.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-opacity.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-overflow.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-page-break.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-paged-media.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-paint-api.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-placeholder.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-read-only-write.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-reflections.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-regions.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-relative-colors.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-resize.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-revert-value.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-scrollbar.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-sel2.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-sel3.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-selection.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-shapes.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-snappoints.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-sticky.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-subgrid.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-supports-api.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-table.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-text-align-last.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-text-box-trim.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-text-indent.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-text-justify.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-text-orientation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-text-spacing.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-textshadow.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-touch-action.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-transitions.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-unset-value.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-variables.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-when-else.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-widows-orphans.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-width-stretch.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-writing-mode.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css-zoom.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css3-attr.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css3-boxsizing.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css3-colors.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css3-cursors.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/css3-tabsize.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/currentcolor.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/custom-elements.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/custom-elementsv1.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/customevent.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/customizable-select.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/datalist.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/dataset.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/datauri.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/decorators.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/details.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/deviceorientation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/devicepixelratio.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/dialog.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/dispatchevent.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/dnssec.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/do-not-track.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/document-currentscript.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/document-execcommand.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/document-policy.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/document-scrollingelement.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/documenthead.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/dom-range.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/domcontentloaded.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/dommatrix.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/download.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/dragndrop.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/element-closest.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/element-from-point.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/element-scroll-methods.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/eme.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/eot.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/es5.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/es6-class.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/es6-generators.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/es6-module.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/es6-number.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/es6-string-includes.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/es6.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/eventsource.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/extended-system-fonts.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/feature-policy.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/fetch.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/fieldset-disabled.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/fileapi.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/filereader.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/filereadersync.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/filesystem.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/flac.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/flexbox-gap.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/flexbox.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/flow-root.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/font-family-system-ui.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/font-feature.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/font-kerning.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/font-loading.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/font-size-adjust.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/font-smooth.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/font-unicode-range.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/font-variant-alternates.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/font-variant-numeric.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/fontface.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/form-attribute.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/form-submit-attributes.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/form-validation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/forms.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/fullscreen.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/gamepad.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/geolocation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/getboundingclientrect.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/getcomputedstyle.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/getrandomvalues.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/gyroscope.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/hashchange.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/heif.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/hevc.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/hidden.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/high-resolution-time.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/history.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/html-media-capture.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/html5semantic.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/http-live-streaming.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/http2.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/http3.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/iframe-sandbox.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/iframe-seamless.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/imagecapture.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ime.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/import-maps.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/imports.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/indexeddb.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/indexeddb2.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/inline-block.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/innertext.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-color.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-datetime.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-email-tel-url.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-event.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-file-accept.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-file-directory.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-file-multiple.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-inputmode.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-minlength.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-number.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-pattern.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-placeholder.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-range.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-search.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/input-selection.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/insert-adjacent.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/internationalization.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/intersectionobserver.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/intl-pluralrules.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/intrinsic-width.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/jpeg2000.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/jpegxl.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/jpegxr.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/json.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/keyboardevent-code.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/keyboardevent-key.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/keyboardevent-location.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/keyboardevent-which.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/lazyload.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/let.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/link-icon-png.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/link-icon-svg.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/link-rel-preload.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/link-rel-prerender.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/loading-lazy-media.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/localecompare.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/magnetometer.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/matchesselector.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/matchmedia.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mathml.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/maxlength.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/media-fragments.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mediarecorder.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mediasource.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/menu.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/meta-theme-color.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/meter.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/midi.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/minmaxwh.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mp3.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mpeg-dash.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mpeg4.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/multibackgrounds.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/multicolumn.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mutation-events.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/mutationobserver.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/namevalue-storage.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/native-filesystem-api.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/nav-timing.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/netinfo.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/notifications.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/object-entries.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/object-fit.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/object-observe.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/object-values.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/objectrtc.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/offline-apps.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/offscreencanvas.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ogg-vorbis.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ogv.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ol-reversed.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/once-event-listener.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/online-status.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/opus.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/orientation-sensor.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/outline.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/pad-start-end.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/page-transition-events.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/pagevisibility.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/passive-event-listener.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/passkeys.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/passwordrules.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/path2d.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/payment-request.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/pdf-viewer.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/permissions-api.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/permissions-policy.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/picture-in-picture.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/picture.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ping.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/png-alpha.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/pointer-events.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/pointer.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/pointerlock.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/portals.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/progress.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/promise-finally.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/promises.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/proximity.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/proxy.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/publickeypinning.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/push-api.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/queryselector.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/readonly-attr.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/referrer-policy.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/rel-noopener.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/rel-noreferrer.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/rellist.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/rem.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/requestanimationframe.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/requestidlecallback.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/resizeobserver.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/resource-timing.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/rest-parameters.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ruby.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/run-in.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/screen-orientation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/script-async.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/script-defer.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/scrollintoview.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/sdch.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/selection-api.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/server-timing.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/serviceworkers.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/setimmediate.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/shadowdom.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/shadowdomv1.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/sharedworkers.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/sni.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/spdy.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/speech-recognition.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/speech-synthesis.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/sql-storage.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/srcset.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/stream.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/streams.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/style-scoped.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/subresource-bundling.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/subresource-integrity.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/svg-css.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/svg-filters.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/svg-fonts.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/svg-fragment.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/svg-html.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/svg-html5.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/svg-img.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/svg-smil.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/svg.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/sxg.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/tabindex-attr.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/template-literals.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/template.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/temporal.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/testfeat.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/text-decoration.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/text-emphasis.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/text-overflow.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/text-size-adjust.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/text-stroke.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/textcontent.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/textencoder.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/tls1-1.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/tls1-2.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/tls1-3.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/touch.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/transforms2d.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/transforms3d.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/trusted-types.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/ttf.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/typedarrays.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/u2f.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/unhandledrejection.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/url.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/urlsearchparams.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/use-strict.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/user-select-none.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/user-timing.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/variable-fonts.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/vector-effect.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/vibration.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/video.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/videotracks.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/view-transitions.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/viewport-units.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wai-aria.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wake-lock.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-bigint.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-bulk-memory.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-extended-const.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-gc.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-multi-memory.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-multi-value.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-mutable-globals.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-nontrapping-fptoint.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-reference-types.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-relaxed-simd.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-signext.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-simd.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-tail-calls.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm-threads.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wasm.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wav.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wbr-element.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/web-animation.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/web-app-manifest.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/web-bluetooth.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/web-serial.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/web-share.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webauthn.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webcodecs.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webgl.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webgl2.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webgpu.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webhid.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webkit-user-drag.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webm.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webnfc.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webp.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/websockets.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webtransport.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webusb.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webvr.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webvtt.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webworkers.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/webxr.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/will-change.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/woff.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/woff2.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/word-break.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/wordwrap.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/x-doc-messaging.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/x-frame-options.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/xhr2.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/xhtml.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/xhtmlsmil.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/xml-serializer.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/data/features/zstd.js +1 -1
- package/.next/standalone/node_modules/caniuse-lite/package.json +1 -1
- package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
- package/.next/standalone/node_modules/next/dist/build/webpack-config.js +2 -2
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +13 -13
- package/.next/standalone/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +12 -12
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
- package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +3 -1
- package/.next/standalone/node_modules/next/dist/shared/lib/canary-only.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/.next/standalone/node_modules/next/package.json +15 -15
- package/.next/standalone/node_modules/semver/classes/range.js +9 -0
- package/.next/standalone/node_modules/semver/package.json +1 -1
- package/.next/standalone/package.json +3 -2
- package/.next/static/BI7koHWCC15MOwsCfxo2O/_buildManifest.js +1 -0
- package/.next/static/chunks/172-84d6b7afea495880.js +1 -0
- package/.next/static/chunks/253-d1beae5e3cf2d88e.js +1 -0
- package/.next/static/chunks/{255-4f84124391a7dac4.js → 255-98a0bdaa30757bda.js} +1 -1
- package/.next/static/chunks/642-75adb59cbb062e44.js +1 -0
- package/.next/static/chunks/661-a763fedcbf90af81.js +1 -0
- package/.next/static/chunks/793-7306e111aea85b00.js +1 -0
- package/.next/static/chunks/798-8424899efd598f73.js +1 -0
- package/.next/static/chunks/968-a7dcf12036013254.js +62 -0
- package/.next/static/chunks/app/(dashboard)/integrations/page-25d6f67123a8a2ef.js +1 -0
- package/.next/static/chunks/app/(dashboard)/layout-a63b3fef68015cb5.js +1 -0
- package/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-cfab61233220bde3.js +1 -0
- package/.next/static/chunks/app/(dashboard)/projects/[projectId]/summary/page-1650386b60d0337f.js +1 -0
- package/.next/static/chunks/app/(dashboard)/projects/page-420d60cc1ac676f3.js +1 -0
- package/.next/static/chunks/app/api/e2e/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/static/chunks/app/api/generate/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/static/chunks/app/api/llm/encrypt/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/static/chunks/app/api/llm/test/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/static/chunks/app/api/mcp/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/static/chunks/app/api/refine-notes/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/static/chunks/app/api/state/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/static/chunks/app/api/weather/route-4f053c4f9dcca3c0.js +1 -0
- package/.next/{standalone/.next/static/chunks/app/login/page-a655de2a3e8514f8.js → static/chunks/app/login/page-35c717d39c71dcbf.js} +1 -1
- package/.next/static/chunks/app/page-3e00e649355cd3ac.js +1 -0
- package/.next/static/chunks/{main-646068343426c12d.js → main-2af68c75fbdc984e.js} +1 -1
- package/.next/static/css/d95cfd16ee2f56f9.css +3 -0
- package/README.md +52 -16
- package/package.json +3 -2
- package/.next/standalone/.next/server/chunks/350.js +0 -21
- package/.next/standalone/.next/server/chunks/403.js +0 -1
- package/.next/standalone/.next/server/chunks/583.js +0 -1
- package/.next/standalone/.next/static/5bU_Xo0_CNnVnb2HQeysr/_buildManifest.js +0 -1
- package/.next/standalone/.next/static/chunks/246-1673b37cc8edb269.js +0 -1
- package/.next/standalone/.next/static/chunks/485-23e4a6e33ee79f14.js +0 -1
- package/.next/standalone/.next/static/chunks/532-95cb537bb36c2e68.js +0 -62
- package/.next/standalone/.next/static/chunks/637-dcbc811f7143935f.js +0 -1
- package/.next/standalone/.next/static/chunks/708-1fc7a6d1d5b4aee7.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/integrations/page-f5e71fcfbeffdfb1.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/layout-a5bf2535f1470c77.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-7205f74080ad5010.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/[projectId]/summary/page-b69fc155f1796e19.js +0 -1
- package/.next/standalone/.next/static/chunks/app/(dashboard)/projects/page-11a49918142004f5.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/e2e/route-ccff81cd0a5704f2.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/generate/route-ccff81cd0a5704f2.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/llm/encrypt/route-ccff81cd0a5704f2.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/llm/test/route-ccff81cd0a5704f2.js +0 -1
- package/.next/standalone/.next/static/chunks/app/api/weather/route-ccff81cd0a5704f2.js +0 -1
- package/.next/standalone/.next/static/chunks/app/page-a90eeaea3538ebf2.js +0 -1
- package/.next/standalone/.next/static/css/f78c165472d53f48.css +0 -3
- package/.next/standalone/node_modules/buffer-from/index.js +0 -72
- package/.next/standalone/node_modules/buffer-from/package.json +0 -19
- package/.next/standalone/node_modules/source-map/lib/array-set.js +0 -121
- package/.next/standalone/node_modules/source-map/lib/base64-vlq.js +0 -140
- package/.next/standalone/node_modules/source-map/lib/base64.js +0 -67
- package/.next/standalone/node_modules/source-map/lib/binary-search.js +0 -111
- package/.next/standalone/node_modules/source-map/lib/mapping-list.js +0 -79
- package/.next/standalone/node_modules/source-map/lib/quick-sort.js +0 -114
- package/.next/standalone/node_modules/source-map/lib/source-map-consumer.js +0 -1145
- package/.next/standalone/node_modules/source-map/lib/source-map-generator.js +0 -425
- package/.next/standalone/node_modules/source-map/lib/source-node.js +0 -413
- package/.next/standalone/node_modules/source-map/lib/util.js +0 -488
- package/.next/standalone/node_modules/source-map/package.json +0 -73
- package/.next/standalone/node_modules/source-map/source-map.js +0 -8
- package/.next/standalone/node_modules/source-map-support/package.json +0 -31
- package/.next/standalone/node_modules/source-map-support/source-map-support.js +0 -625
- package/.next/static/5bU_Xo0_CNnVnb2HQeysr/_buildManifest.js +0 -1
- package/.next/static/chunks/246-1673b37cc8edb269.js +0 -1
- package/.next/static/chunks/485-23e4a6e33ee79f14.js +0 -1
- package/.next/static/chunks/532-95cb537bb36c2e68.js +0 -62
- package/.next/static/chunks/637-dcbc811f7143935f.js +0 -1
- package/.next/static/chunks/708-1fc7a6d1d5b4aee7.js +0 -1
- package/.next/static/chunks/app/(dashboard)/integrations/page-f5e71fcfbeffdfb1.js +0 -1
- package/.next/static/chunks/app/(dashboard)/layout-a5bf2535f1470c77.js +0 -1
- package/.next/static/chunks/app/(dashboard)/projects/[projectId]/page-7205f74080ad5010.js +0 -1
- package/.next/static/chunks/app/(dashboard)/projects/[projectId]/summary/page-b69fc155f1796e19.js +0 -1
- package/.next/static/chunks/app/(dashboard)/projects/page-11a49918142004f5.js +0 -1
- package/.next/static/chunks/app/api/e2e/route-ccff81cd0a5704f2.js +0 -1
- package/.next/static/chunks/app/api/generate/route-ccff81cd0a5704f2.js +0 -1
- package/.next/static/chunks/app/api/llm/encrypt/route-ccff81cd0a5704f2.js +0 -1
- package/.next/static/chunks/app/api/llm/test/route-ccff81cd0a5704f2.js +0 -1
- package/.next/static/chunks/app/api/weather/route-ccff81cd0a5704f2.js +0 -1
- package/.next/static/chunks/app/page-a90eeaea3538ebf2.js +0 -1
- package/.next/static/css/f78c165472d53f48.css +0 -3
- /package/.next/standalone/.next/static/{5bU_Xo0_CNnVnb2HQeysr → BI7koHWCC15MOwsCfxo2O}/_ssgManifest.js +0 -0
- /package/.next/static/{5bU_Xo0_CNnVnb2HQeysr → BI7koHWCC15MOwsCfxo2O}/_ssgManifest.js +0 -0
|
@@ -1,73 +1,20 @@
|
|
|
1
|
-
(()=>{var a={};a.id=948,a.ids=[948],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19553:(a,b,c)=>{"use strict";c.d(b,{P:()=>i});var d=c(38301),e=c(79472);let f={apiKey:"",baseURL:"",defaultModel:"",secondaryModel:"",models:[],connected:!1};function g(){let a={};for(let b of e.Pj)a[b.id]={...f,baseURL:b.baseURL||""};return{activeProvider:null,providers:a}}function h(a){try{localStorage.setItem("qa-llm-config",JSON.stringify(a))}catch{}}function i(){let[a,b]=(0,d.useState)(g),[c,e]=(0,d.useState)(!1),f=(0,d.useCallback)((a,c)=>{let d=g(),e={...d,providers:{...d.providers,[a]:{...d.providers[a],...c}}};h(e),b(e)},[]),i=(0,d.useCallback)(a=>{let c={...g(),activeProvider:a};h(c),b(c)},[]),j=a.activeProvider?a.providers[a.activeProvider]:null,k=c&&!!j&&j.apiKey.length>0&&j.connected;return{config:a,loaded:c,isConnected:k,activeProvider:j,activeProviderId:a.activeProvider,updateProvider:f,setActiveProvider:i}}},21820:a=>{"use strict";a.exports=require("os")},22017:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>E.a,__next_app__:()=>K,handler:()=>M,pages:()=>J,routeModule:()=>L,tree:()=>I});var d=c(49754),e=c(9117),f=c(46595),g=c(32324),h=c(39326),i=c(38928),j=c(20175),k=c(12),l=c(54290),m=c(12696),n=c(52574),o=c(82802),p=c(77533),q=c(45229),r=c(32822),s=c(261),t=c(26453),u=c(52474),v=c(26713),w=c(51356),x=c(62685),y=c(36225),z=c(63446),A=c(2762),B=c(45742),C=c(86439),D=c(81170),E=c.n(D),F=c(62506),G=c(91203),H={};for(let a in F)0>["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(H[a]=()=>F[a]);c.d(b,H);let I={children:["",{children:["(dashboard)",{children:["projects",{children:["[projectId]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,41009)),"/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/projects/[projectId]/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,97788)),"/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/layout.tsx"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,87028,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,90461,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,32768,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,51472)),"/home/sltr91025/code-repository/open-source/test-lah/src/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,81170,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,87028,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,90461,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,32768,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.children,J=["/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/projects/[projectId]/page.tsx"],K={require:c,loadChunk:()=>Promise.resolve()},L=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/projects/[projectId]/page",pathname:"/projects/[projectId]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:I},distDir:".next",relativeProjectDir:""});async function M(a,b,d){var D;let H="/(dashboard)/projects/[projectId]/page";"/index"===H&&(H="/");let N=(0,h.getRequestMeta)(a,"postponed"),O=(0,h.getRequestMeta)(a,"minimalMode"),P=await L.prepare(a,b,{srcPage:H,multiZoneDraftMode:!1});if(!P)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Q,query:R,params:S,parsedUrl:T,pageIsDynamic:U,buildManifest:V,nextFontManifest:W,reactLoadableManifest:X,serverActionsManifest:Y,clientReferenceManifest:Z,subresourceIntegrityManifest:$,prerenderManifest:_,isDraftMode:aa,resolvedPathname:ab,revalidateOnlyGenerated:ac,routerServerContext:ad,nextConfig:ae,interceptionRoutePatterns:af}=P,ag=T.pathname||"/",ah=(0,s.normalizeAppPath)(H),{isOnDemandRevalidate:ai}=P,aj=L.match(ag,_),ak=!!_.routes[ab],al=!!(aj||ak||_.routes[ah]),am=a.headers["user-agent"]||"",an=(0,v.getBotType)(am),ao=(0,q.isHtmlBotRequest)(a),ap=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[u.NEXT_ROUTER_PREFETCH_HEADER],aq=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[u.RSC_HEADER]),ar=(0,t.getIsPossibleServerAction)(a),as=(0,m.checkIsAppPPREnabled)(ae.experimental.ppr)&&(null==(D=_.routes[ah]??_.dynamicRoutes[ah])?void 0:D.renderingMode)==="PARTIALLY_STATIC",at=!1,au=!1,av=as?N:void 0,aw=as&&aq&&!ap,ax=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ay=!am||(0,q.shouldServeStreamingMetadata)(am,ae.htmlLimitedBots);ao&&as&&(al=!1,ay=!1);let az=!0===L.isDev||!al||"string"==typeof N||aw,aA=ao&&as,aB=null;aa||!al||az||ar||av||aw||(aB=ab);let aC=aB;!aC&&L.isDev&&(aC=ab),L.isDev||aa||!al||!aq||aw||(0,k.d)(a.headers);let aD={...F,tree:I,pages:J,GlobalError:E(),handler:M,routeModule:L,__next_app__:K};Y&&Z&&(0,p.setReferenceManifestsSingleton)({page:H,clientReferenceManifest:Z,serverActionsManifest:Y,serverModuleMap:(0,r.createServerModuleMap)({serverActionsManifest:Y})});let aE=a.method||"GET",aF=(0,g.getTracer)(),aG=aF.getActiveScopeSpan();try{let f=L.getVaryHeader(ab,af);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return L.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=aF.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${aE} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aE} ${a.url}`)})},m=async({span:e,postponed:f,fallbackRouteParams:g})=>{let i={query:R,params:S,page:ah,sharedContext:{buildId:Q},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aD,Component:(0,j.T)(aD),params:S,routeModule:L,page:H,postponed:f,shouldWaitOnAllReady:aA,serveStreamingMetadata:ay,supportsDynamicResponse:"string"==typeof f||az,buildManifest:V,nextFontManifest:W,reactLoadableManifest:X,subresourceIntegrityManifest:$,serverActionsManifest:Y,clientReferenceManifest:Z,setIsrStatus:null==ad?void 0:ad.setIsrStatus,dir:c(33873).join(process.cwd(),L.relativeProjectDir),isDraftMode:aa,isRevalidate:al&&!f&&!aw,botType:an,isOnDemandRevalidate:ai,isPossibleServerAction:ar,assetPrefix:ae.assetPrefix,nextConfigOutput:ae.output,crossOrigin:ae.crossOrigin,trailingSlash:ae.trailingSlash,previewProps:_.preview,deploymentId:ae.deploymentId,enableTainting:ae.experimental.taint,htmlLimitedBots:ae.htmlLimitedBots,devtoolSegmentExplorer:ae.experimental.devtoolSegmentExplorer,reactMaxHeadersLength:ae.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:ae.experimental.cacheLife,basePath:ae.basePath,serverActions:ae.experimental.serverActions,...at?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isRevalidate:!0,isDebugDynamicAccesses:at}:{},experimental:{isRoutePPREnabled:as,expireTime:ae.expireTime,staleTimes:ae.experimental.staleTimes,cacheComponents:!!ae.experimental.cacheComponents,clientSegmentCache:!!ae.experimental.clientSegmentCache,clientParamParsing:!!ae.experimental.clientParamParsing,dynamicOnHover:!!ae.experimental.dynamicOnHover,inlineCss:!!ae.experimental.inlineCss,authInterrupts:!!ae.experimental.authInterrupts,clientTraceMetadata:ae.experimental.clientTraceMetadata||[]},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d)=>L.onRequestError(a,b,d,ad),err:(0,h.getRequestMeta)(a,"invokeError"),dev:L.isDev}},l=await k(e,i),{metadata:m}=l,{cacheControl:n,headers:o={},fetchTags:p}=m;if(p&&(o[z.NEXT_CACHE_TAGS_HEADER]=p),a.fetchMetrics=m.fetchMetrics,al&&(null==n?void 0:n.revalidate)===0&&!L.isDev&&!as){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ab}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
|
|
2
|
-
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:w.CachedRouteKind.APP_PAGE,html:l,headers:o,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:n}},n=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i})=>{let j,k=!1===L.isDev,l=c||b.writableEnded;if(ai&&ac&&!f&&!O)return(null==ad?void 0:ad.render404)?await ad.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(aj&&(j=(0,x.parseFallbackField)(aj.fallback)),j===x.FallbackMode.PRERENDER&&(0,v.isBot)(am)&&(!as||ao)&&(j=x.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ai=!0),ai&&(j!==x.FallbackMode.NOT_FOUND||f)&&(j=x.FallbackMode.BLOCKING_STATIC_RENDER),!O&&j!==x.FallbackMode.BLOCKING_STATIC_RENDER&&aC&&!l&&!aa&&U&&(k||!ak)){let b;if((k||aj)&&j===x.FallbackMode.NOT_FOUND)throw new C.NoFallbackError;if(as&&!aq){let c="string"==typeof(null==aj?void 0:aj.fallback)?aj.fallback:k?ah:null;if(b=await L.handleResponse({cacheKey:c,req:a,nextConfig:ae,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:_,isRoutePPREnabled:as,responseGenerator:async()=>m({span:i,postponed:void 0,fallbackRouteParams:k||au?(0,o.u)(ah):null}),waitUntil:d.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let n=ai||g||!av?void 0:av;if(at&&void 0!==n)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:w.CachedRouteKind.PAGES,html:y.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let p=U&&as&&((0,h.getRequestMeta)(a,"renderFallbackShell")||au)?(0,o.u)(ag):null;return m({span:i,postponed:n,fallbackRouteParams:p})},p=async c=>{var f,g,i,j,k;let l,o=await L.handleResponse({cacheKey:aB,responseGenerator:a=>n({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ai,isRoutePPREnabled:as,req:a,nextConfig:ae,prerenderManifest:_,waitUntil:d.waitUntil});if(aa&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),L.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!o){if(aB)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=o.value)?void 0:f.kind)!==w.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=o.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof o.value.postponed;al&&!aw&&(!p||ap)&&(O||b.setHeader("x-nextjs-cache",ai?"REVALIDATED":o.isMiss?"MISS":o.isStale?"STALE":"HIT"),b.setHeader(u.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=o;if(av)l={revalidate:0,expire:void 0};else if(O&&aq&&!ap&&as)l={revalidate:0,expire:void 0};else if(!L.isDev)if(aa)l={revalidate:0,expire:void 0};else if(al){if(o.cacheControl)if("number"==typeof o.cacheControl.revalidate){if(o.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${o.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:o.cacheControl.revalidate,expire:(null==(j=o.cacheControl)?void 0:j.expire)??ae.expireTime}}else l={revalidate:z.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(o.cacheControl=l,"string"==typeof ax&&(null==q?void 0:q.kind)===w.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(u.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[z.NEXT_CACHE_TAGS_HEADER];O&&al&&c&&"string"==typeof c&&b.setHeader(z.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ax);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.fromStatic(d,u.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.EMPTY,cacheControl:o.cacheControl}))}let r=(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...o,value:{...o.value,kind:"PAGE"}},{url:(0,h.getRequestMeta)(a,"initURL")}))return null;if(p&&av)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(O&&al||delete a[z.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let s=null==(g=q.headers)?void 0:g[z.NEXT_CACHE_TAGS_HEADER];if(O&&al&&s&&"string"==typeof s&&b.setHeader(z.NEXT_CACHE_TAGS_HEADER,s),!q.status||aq&&as||(b.statusCode=q.status),!O&&q.status&&G.RedirectStatusCode[q.status]&&aq&&(b.statusCode=200),p&&b.setHeader(u.NEXT_DID_POSTPONE_HEADER,"1"),aq&&!aa){if(void 0===q.rscData){if(q.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:q.html,cacheControl:aw?{revalidate:0,expire:void 0}:o.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.fromStatic(q.rscData,u.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl})}let t=q.html;if(!p||O||aq)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:t,cacheControl:o.cacheControl});if(at)return t.push(new ReadableStream({start(a){a.enqueue(A.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}});let v=new TransformStream;return t.push(v.readable),m({span:c,postponed:q.postponed,fallbackRouteParams:null}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==w.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(v.writable)}).catch(a=>{v.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}})};if(!aG)return await aF.withPropagatedContext(a.headers,()=>aF.trace(i.BaseServerSpan.handleRequest,{spanName:`${aE} ${a.url}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aE,"http.target":a.url}},p));await p(aG)}catch(b){throw b instanceof C.NoFallbackError||await L.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"render",revalidateReason:(0,f.c)({isRevalidate:al,isOnDemandRevalidate:ai})},ad),b}}},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},41009:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/projects/[projectId]/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/projects/[projectId]/page.tsx","default")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41204:a=>{"use strict";a.exports=require("string_decoder")},42692:(a,b,c)=>{Promise.resolve().then(c.bind(c,48473))},48473:(a,b,c)=>{"use strict";let d;c.r(b),c.d(b,{default:()=>d$});var e,f,g=c(21124),h=c(95627),i=c.n(h),j=c(38301),k=c.n(j),l=c(42378),m=c(5908);let n=(0,j.memo)(function({node:a,position:b,isSelected:c,testCases:d,isDragged:e,edgeDragActive:f,isEdgeDropTarget:h,deleteMode:i,isDeleteChecked:k,onSelect:l,onAddChild:m,onDelete:n,onUnlinkNode:o,onRename:p,onUpdateNode:q,onDragStart:r,onEdgeStart:s,onToggleDeleteCheck:t,depth:u,svgRef:v}){let[w,x]=(0,j.useState)(!1),[y,z]=(0,j.useState)(a.label),[A,B]=(0,j.useState)(!1),[C,D]=(0,j.useState)(!1),[E,F]=(0,j.useState)("horizontal"),[G,H]=(0,j.useState)(""),I=(0,j.useRef)(null),J=(0,j.useRef)(null),K=(0,j.useRef)(null),L=(0,j.useRef)({startX:0,startY:0,moved:!1}),{w:M,h:N}=0===u?{w:160,h:56}:1===u?{w:144,h:48}:{w:132,h:42},O=d.some(a=>"fail"===a.status),P=d.some(a=>"skip"===a.status),Q=d.some(a=>"untested"===a.status),R=O||P||Q,S=d.length>0&&d.every(a=>"pass"===a.status);(0,j.useEffect)(()=>{let b=b=>{let c=b.detail;c?.parentId===a.id&&(D(!0),H(""))};return window.addEventListener("mindmap:add-child",b),()=>window.removeEventListener("mindmap:add-child",b)},[a.id]),(0,j.useEffect)(()=>{if(!C)return;let a=a=>{K.current&&!K.current.contains(a.target)&&(G.trim()?V():(D(!1),H("")))};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[C,G]),(0,j.useEffect)(()=>{C&&J.current&&J.current.focus()},[C]);let T=(0,j.useCallback)(()=>{z(a.label),x(!0),setTimeout(()=>I.current?.focus(),0)},[a.label]),U=(0,j.useCallback)(()=>{y.trim()&&p(a.id,y.trim()),x(!1)},[y,a.id,p]),V=(0,j.useCallback)(()=>{if(G.trim()){let c="vertical"===E?{x:b.x,y:b.y+N+60}:{x:b.x+M+120,y:b.y};m(a.id,G.trim(),c,E)}D(!1),H("")},[G,a.id,m,b.x,b.y,N,M,E]),W=(0,j.useCallback)(a=>b=>{b.stopPropagation(),F(a),D(!0),H("")},[]),X=(0,j.useCallback)(c=>{if(2===c.button||i)return;if(c.stopPropagation(),!c.target.closest('[data-drag-handle="true"]'))return void l(a.id);c.preventDefault(),L.current={startX:c.clientX,startY:c.clientY,moved:!1};let d=a=>a.preventDefault();document.addEventListener("contextmenu",d);let e=c=>{let d=c.clientX-L.current.startX,e=c.clientY-L.current.startY;!L.current.moved&&(Math.abs(d)>6||Math.abs(e)>6)&&(L.current.moved=!0,r(a.id,L.current.startX,L.current.startY,b.x,b.y))},f=()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",f),setTimeout(()=>document.removeEventListener("contextmenu",d),100)};window.addEventListener("mousemove",e),window.addEventListener("mouseup",f)},[a.id,l,r,i,b]),Y=a.id.replace(/[^a-zA-Z0-9]/g,"").slice(0,8),Z=c&&!i;return(0,g.jsxs)("g",{transform:`translate(${b.x}, ${b.y})`,onMouseDown:X,onDoubleClick:a=>{a.stopPropagation(),i||T()},onMouseEnter:()=>B(!0),onMouseLeave:()=>B(!1),style:{cursor:i?"pointer":"default",transition:e?"none":"transform 150ms ease-out"},onClick:()=>{i&&t(a.id)},children:[(0,g.jsxs)("defs",{children:[(0,g.jsxs)("linearGradient",{id:`fill-${Y}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,g.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF"}),(0,g.jsx)("stop",{offset:"100%",stopColor:"#FAF9F7"})]}),(0,g.jsxs)("filter",{id:`shadow-${Y}`,x:"-10%",y:"-10%",width:"120%",height:"130%",children:[(0,g.jsx)("feDropShadow",{dx:"0",dy:"1",stdDeviation:"2",floodOpacity:"0.08"}),(0,g.jsx)("feDropShadow",{dx:"0",dy:"3",stdDeviation:"6",floodOpacity:"0.05"})]}),(0,g.jsxs)("filter",{id:`shadow-hover-${Y}`,x:"-10%",y:"-10%",width:"120%",height:"140%",children:[(0,g.jsx)("feDropShadow",{dx:"0",dy:"2",stdDeviation:"4",floodOpacity:"0.12"}),(0,g.jsx)("feDropShadow",{dx:"0",dy:"6",stdDeviation:"12",floodOpacity:"0.08"})]}),(0,g.jsxs)("filter",{id:`shadow-drag-${Y}`,x:"-20%",y:"-20%",width:"140%",height:"160%",children:[(0,g.jsx)("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodOpacity:"0.2"}),(0,g.jsx)("feDropShadow",{dx:"0",dy:"8",stdDeviation:"16",floodOpacity:"0.1"})]}),(0,g.jsxs)("filter",{id:`glow-${Y}`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,g.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"3",result:"blur"}),(0,g.jsx)("feColorMatrix",{in:"blur",type:"matrix",values:"0 0 0 0 0.4 0 0 0 0 0.8 0 0 0 0 0.4 0 0 0 0.6 0"})]})]}),!i&&(0,g.jsxs)("g",{"data-drag-handle":"true",transform:`translate(0, ${-N/2-10})`,style:{cursor:e?"grabbing":"grab"},children:[(0,g.jsx)("rect",{x:-20,y:-7,width:40,height:14,rx:4,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1,opacity:A||c?.9:.5,style:{transition:"opacity 150ms ease-out"}}),(0,g.jsx)("circle",{cx:-8,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,g.jsx)("circle",{cx:-8,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,g.jsx)("circle",{cx:-4,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,g.jsx)("circle",{cx:-4,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,g.jsx)("circle",{cx:0,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,g.jsx)("circle",{cx:0,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,g.jsx)("circle",{cx:4,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,g.jsx)("circle",{cx:4,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,g.jsx)("circle",{cx:8,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,g.jsx)("circle",{cx:8,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6})]}),h&&(0,g.jsx)("rect",{x:-M/2-6,y:-N/2-6,width:M+12,height:N+12,rx:8,fill:"var(--status-pass-bg)",stroke:"var(--status-pass-text)",strokeWidth:2,opacity:.5}),(()=>{let a=O?"var(--status-fail-bg)":R?"var(--status-skip-bg)":S?"var(--status-pass-bg)":null;return(0,g.jsxs)(g.Fragment,{children:[a&&(0,g.jsx)("rect",{x:-M/2,y:-N/2,width:M,height:N,rx:4,fill:a,opacity:O?.2:.15}),(0,g.jsx)("rect",{x:-M/2,y:-N/2,width:M,height:N,rx:4,fill:`url(#fill-${Y})`,stroke:i&&k?"var(--status-fail-text)":"var(--border)",strokeWidth:i&&k?2:.5,filter:e?`url(#shadow-drag-${Y})`:A?`url(#shadow-hover-${Y})`:`url(#shadow-${Y})`,style:{transition:"filter 200ms ease-out, stroke 150ms ease-out"}}),(0,g.jsx)("path",{d:`M ${M/2-10} ${-N/2} L ${M/2} ${-N/2} L ${M/2} ${-N/2+10} Z`,fill:"var(--bg-secondary)",opacity:.5}),(0,g.jsx)("path",{d:`M ${M/2-10} ${-N/2} L ${M/2-10} ${-N/2+10} L ${M/2} ${-N/2+10}`,fill:"none",stroke:"var(--border)",strokeWidth:.5,opacity:.4})]})})(),d.length>0&&!i&&(0,g.jsxs)("g",{transform:`translate(${M/2-6}, ${N/2-6})`,style:{opacity:A||c?1:.7,transition:"opacity 150ms ease-out"},children:[(0,g.jsx)("rect",{x:-12,y:-8,width:24,height:16,rx:8,fill:O?"var(--status-fail-bg)":R?"var(--status-skip-bg)":"var(--status-pass-bg)",stroke:O?"var(--status-fail-text)":R?"var(--status-skip-text)":"var(--status-pass-text)",strokeWidth:.75}),(0,g.jsxs)("text",{textAnchor:"middle",dominantBaseline:"central",style:{fill:O?"var(--status-fail-text)":R?"var(--status-skip-text)":"var(--status-pass-text)",fontSize:9,fontWeight:600,fontFamily:"monospace"},children:[O?d.filter(a=>"fail"===a.status).length:R?d.filter(a=>"pass"!==a.status).length:d.length,"/",d.length]})]}),i&&(0,g.jsxs)("g",{transform:`translate(${-M/2+8}, 0)`,children:[(0,g.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:k?"var(--status-fail-text)":"transparent",stroke:k?"var(--status-fail-text)":"var(--border)",strokeWidth:1.5}),k&&(0,g.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]}),a.code&&!i&&(0,g.jsxs)("g",{transform:`translate(${-M/2+6}, ${-N/2-11})`,style:{opacity:A||c?1:0,transition:"opacity 150ms ease-out"},children:[(0,g.jsx)("rect",{x:0,y:0,width:Math.max(6.5*a.code.length+10,28),height:14,rx:7,fill:"var(--accent)",opacity:.08}),(0,g.jsx)("text",{x:5,y:10,style:{fill:"var(--text-tertiary)",fontSize:8,fontWeight:500,fontFamily:"monospace",letterSpacing:"0.05em"},children:a.code})]}),w?(0,g.jsx)("foreignObject",{x:-M/2+8,y:-N/2+4,width:M-16,height:N-8,children:(0,g.jsx)("input",{ref:I,value:y,onChange:a=>z(a.target.value),onBlur:U,onKeyDown:a=>{"Enter"===a.key&&U(),"Escape"===a.key&&x(!1)},className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})}):(0,g.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",className:"select-none",onClick:a=>{a.stopPropagation(),i||T()},style:{fill:"var(--text-primary)",fontSize:0===u?13:11.5,fontWeight:0===u?600:450,fontFamily:"inherit",letterSpacing:"-0.01em",cursor:A&&!i?"text":"default",pointerEvents:"auto"},children:a.label.length>22?a.label.slice(0,22)+"…":a.label}),Z&&!w&&!f&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("g",{transform:`translate(${M/2+3}, -11)`,children:[(0,g.jsxs)("g",{onClick:W("horizontal"),onMouseDown:a=>a.stopPropagation(),style:{cursor:"pointer"},children:[(0,g.jsx)("rect",{x:0,y:0,width:22,height:22,rx:3,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:.75,opacity:.9}),(0,g.jsx)("line",{x1:11,y1:5,x2:11,y2:17,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"}),(0,g.jsx)("line",{x1:5,y1:11,x2:17,y2:11,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"})]}),(0,g.jsx)("g",{transform:"translate(24, 7)",onMouseDown:c=>{c.stopPropagation(),c.preventDefault(),s(a.id,"pass",b.x+M/2+3+22+2+4,b.y-11+11,"horizontal")},onContextMenu:c=>{c.preventDefault(),c.stopPropagation(),s(a.id,"fail",b.x+M/2+3+22+2+4,b.y-11+11,"horizontal")},style:{cursor:"crosshair"},children:(0,g.jsx)("circle",{cx:4,cy:4,r:4,fill:"var(--status-pass-text)",opacity:.8,children:(0,g.jsx)("animate",{attributeName:"opacity",values:"0.6;1;0.6",dur:"2s",repeatCount:"indefinite"})})})]}),(0,g.jsxs)("g",{transform:`translate(-11, ${N/2+3})`,children:[(0,g.jsxs)("g",{onClick:W("vertical"),onMouseDown:a=>a.stopPropagation(),style:{cursor:"pointer"},children:[(0,g.jsx)("rect",{x:0,y:0,width:22,height:22,rx:3,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:.75,opacity:.9}),(0,g.jsx)("line",{x1:11,y1:5,x2:11,y2:17,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"}),(0,g.jsx)("line",{x1:5,y1:11,x2:17,y2:11,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"})]}),(0,g.jsx)("g",{transform:"translate(24, 7)",onMouseDown:c=>{c.stopPropagation(),c.preventDefault(),s(a.id,"pass",b.x-11+11,b.y+N/2+3+22+2+4,"vertical")},onContextMenu:c=>{c.preventDefault(),c.stopPropagation(),s(a.id,"fail",b.x-11+11,b.y+N/2+3+22+2+4,"vertical")},style:{cursor:"crosshair"},children:(0,g.jsx)("circle",{cx:4,cy:4,r:4,fill:"var(--accent)",opacity:.8,children:(0,g.jsx)("animate",{attributeName:"opacity",values:"0.6;1;0.6",dur:"2s",repeatCount:"indefinite"})})})]})]}),f&&!h&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("g",{transform:`translate(${-M/2-10}, 0)`,children:(0,g.jsx)("circle",{r:6,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1.5,opacity:.6,strokeDasharray:"3 2"})}),(0,g.jsx)("g",{transform:`translate(0, ${-N/2-10})`,children:(0,g.jsx)("circle",{r:6,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1.5,opacity:.6,strokeDasharray:"3 2"})})]}),C&&(0,g.jsxs)("g",{children:["vertical"===E?(0,g.jsx)("line",{x1:0,y1:N/2,x2:0,y2:N/2+50,stroke:"var(--border-hover)",strokeWidth:1.5}):(0,g.jsx)("line",{x1:M/2,y1:0,x2:M/2+50,y2:0,stroke:"var(--border-hover)",strokeWidth:1.5}),(0,g.jsx)("rect",{x:"vertical"===E?-M/2:M/2+50,y:"vertical"===E?N/2+50:-N/2,width:M,height:N,rx:4,fill:"var(--bg-card)",stroke:"var(--accent)",strokeWidth:1,strokeDasharray:"4 3"}),(0,g.jsx)("foreignObject",{x:"vertical"===E?-M/2+4:M/2+50+4,y:"vertical"===E?N/2+50+4:-N/2+4,width:M-8,height:N-8,children:(0,g.jsx)("div",{ref:K,children:(0,g.jsx)("input",{ref:J,value:G,onChange:a=>H(a.target.value),onBlur:()=>{G.trim()?V():(D(!1),H(""))},onKeyDown:a=>{"Enter"===a.key&&V(),"Escape"===a.key&&(D(!1),H("")),a.stopPropagation()},onMouseDown:a=>a.stopPropagation(),placeholder:"Name node...",className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})})})]})]})});var o=c(58403),p=c(44943);function q({width:a=16,height:b=16,x:c=0,y:d=0,cx:e=1,cy:f=1,cr:h=1,className:i,glow:k=!1,...l}){let m=(0,j.useId)(),n=(0,j.useRef)(null),[q,r]=(0,j.useState)({width:0,height:0}),s=Array.from({length:Math.ceil(q.width/a)*Math.ceil(q.height/b)},(g,h)=>{let i=h%Math.ceil(q.width/a),j=Math.floor(h/Math.ceil(q.width/a));return{x:i*a+e+c,y:j*b+f+d,delay:5*Math.random(),duration:3*Math.random()+2}});return(0,g.jsxs)("svg",{ref:n,"aria-hidden":"true",className:(0,p.cn)("pointer-events-none absolute inset-0 h-full w-full text-neutral-400/80",i),...l,children:[(0,g.jsx)("defs",{children:(0,g.jsxs)("radialGradient",{id:`${m}-gradient`,children:[(0,g.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),(0,g.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]})}),s.map(a=>(0,g.jsx)(o.P.circle,{cx:a.x,cy:a.y,r:h,fill:k?`url(#${m}-gradient)`:"currentColor",initial:k?{opacity:.4,scale:1}:{},animate:k?{opacity:[.4,1,.4],scale:[1,1.5,1]}:{},transition:k?{duration:a.duration,repeat:1/0,repeatType:"reverse",delay:a.delay,ease:"easeInOut"}:{}},`${a.x}-${a.y}`))]})}let r=k().forwardRef(({className:a,children:b,rippleColor:c="#ffffff",duration:d="600ms",onClick:e,...f},h)=>{let[i,k]=(0,j.useState)([]);return(0,j.useEffect)(()=>{let a=null;if(i.length>0){let b=i[i.length-1];a=setTimeout(()=>{k(a=>a.filter(a=>a.key!==b.key))},parseInt(d))}return()=>{null!==a&&clearTimeout(a)}},[i,d]),(0,g.jsxs)("button",{className:(0,p.cn)("bg-background text-primary relative flex cursor-pointer items-center justify-center overflow-hidden rounded-lg border-2 px-4 py-2 text-center",a),onClick:a=>{(a=>{let b=a.currentTarget.getBoundingClientRect(),c=Math.max(b.width,b.height),d={x:a.clientX-b.left-c/2,y:a.clientY-b.top-c/2,size:c,key:Date.now()};k(a=>[...a,d])})(a),e?.(a)},ref:h,...f,children:[(0,g.jsx)("div",{className:"relative z-10",children:b}),(0,g.jsx)("span",{className:"pointer-events-none absolute inset-0",children:i.map(a=>(0,g.jsx)("span",{className:"animate-rippling bg-background absolute rounded-full opacity-30",style:{width:`${a.size}px`,height:`${a.size}px`,top:`${a.y}px`,left:`${a.x}px`,backgroundColor:c,transform:"scale(0)","--duration":d}},a.key))})]})});function s({nodes:a,edges:b,testCases:c,selectedNodeId:d,onSelect:e,onAddNode:f,onDeleteNode:h,onDeleteNodes:i,onUnlinkNode:k,onRenameNode:l,onUpdateNode:m,onAddEdge:o,onDeleteEdge:p,onUpdateEdge:s,canUndo:v,canRedo:w,onUndo:x,onRedo:y}){let z=(0,j.useMemo)(()=>(function(a){let b=new Map;if(0===a.length)return b;let c=new Map;for(let b of a)c.set(b.id,b);let d=new Set;for(let b of a)b.position&&d.add(b.id);let e=a.filter(a=>null===a.parentId);if(0===e.length)return b;let f=0;for(let a of e)f=function a(e,f,g,h,i){let j=c.get(e);if(!j)return g;let k="vertical"===j.direction,l=k?j.position?.x??h:60+180*f,m=g;for(let b of j.children)m=k?a(b,f,m,h,i):a(b,f+1,m,h,i);let n=j.children.map(a=>b.get(a)).filter(Boolean),o=n.length>0?(Math.min(...n.map(a=>a.y))+Math.max(...n.map(a=>a.y)))/2:g;if(d.has(e)&&j.position){let c=n.length>0?o:g,d=j.position.x-(k?j.position.x:l),h=j.position.y-c;b.set(e,j.position);let i=g;for(let b of j.children)i=k?a(b,f,i,d,h):a(b,f+1,i,d,h);return i}return k?b.set(e,{x:(j.position?.x??0)+h,y:o+i}):b.set(e,{x:l+h,y:o+i}),m}(a.id,0,f,0,0);let g=Array.from(b.entries());if(g.length>0){let a=g.filter(([a])=>!d.has(a)).map(([,a])=>a.y);if(a.length>0){let c=(Math.min(...a)+Math.max(...a))/2;for(let[a,e]of g)d.has(a)||b.set(a,{x:e.x,y:e.y-c+300})}}return b})(a),[a]),[A,B]=(0,j.useState)({x:0,y:0}),[C,D]=(0,j.useState)(1),[E,F]=(0,j.useState)(!1),[G,H]=(0,j.useState)({x:0,y:0}),[I,J]=(0,j.useState)(null),[K,L]=(0,j.useState)(!1),[M,N]=(0,j.useState)(null),[O,P]=(0,j.useState)(null),[Q,R]=(0,j.useState)(null),[S,T]=(0,j.useState)(null),[U,V]=(0,j.useState)(!1),[W,X]=(0,j.useState)(new Set),[Y,Z]=(0,j.useState)(!1),[$,_]=(0,j.useState)(null),[aa,ab]=(0,j.useState)(!1),[ac,ad]=(0,j.useState)(new Set),ae=(0,j.useRef)(null),af=(0,j.useRef)(null),ag=(0,j.useRef)(null),ah=(0,j.useCallback)(()=>{let a=Array.from(z.values());if(0===a.length){D(1),B({x:0,y:0});return}if(!ae.current)return;let b=ae.current.getBoundingClientRect(),c=Math.min(...a.map(a=>a.x))-80,d=Math.max(...a.map(a=>a.x))+80,e=Math.min(...a.map(a=>a.y))-80,f=Math.max(...a.map(a=>a.y))+80,g=Math.min(b.width/(d-c),b.height/(f-e),1.5);D(g),B({x:b.width/2/g-(c+d)/2,y:b.height/2/g-(e+f)/2})},[z]),ai=(0,j.useCallback)((a,b)=>{if(!ae.current)return{x:0,y:0};let c=ae.current.getBoundingClientRect();return{x:(a-c.left)/C-A.x,y:(b-c.top)/C-A.y}},[C,A]),aj=(0,j.useCallback)(a=>{a.target===ae.current&&(F(!0),H({x:a.clientX-A.x*C,y:a.clientY-A.y*C}))},[A,C]),ak=(0,j.useCallback)(b=>{if(E&&B({x:(b.clientX-G.x)/C,y:(b.clientY-G.y)/C}),I){let a=ai(I.startClientX,I.startClientY),c=ai(b.clientX,b.clientY),d=c.x-a.x,e=c.y-a.y,f=I.startNodeX+d,g=I.startNodeY+e;ag.current={id:I.id,x:f,y:g},af.current||(af.current=requestAnimationFrame(()=>{ag.current&&(m(ag.current.id,{position:{x:ag.current.x,y:ag.current.y}}),ag.current=null),af.current=null}))}if(O){let c=ai(b.clientX,b.clientY);P(a=>a?{...a,curX:c.x,curY:c.y}:null);let d=null;for(let b of a){if(b.id===O.fromId)continue;let a=z.get(b.id);if(!a)continue;let e=c.x-a.x,f=c.y-a.y;if(80>Math.abs(e)&&40>Math.abs(f)){d=b.id;break}}T(d)}},[E,G,C,I,O,ai,m,a,z]),al=(0,j.useCallback)(()=>{if(O){let b={x:O.curX,y:O.curY};for(let c of a){let a=z.get(c.id);if(!a)continue;let d=b.x-a.x,e=b.y-a.y;if(80>Math.abs(d)&&40>Math.abs(e)&&c.id!==O.fromId){o(O.fromId,c.id,O.type);break}}P(null),T(null)}F(!1),J(null),af.current&&(cancelAnimationFrame(af.current),af.current=null)},[O,a,z,o]),am=(0,j.useCallback)(a=>{a.target===ae.current&&(e(null),L(!1))},[e]),an=(0,j.useCallback)(a=>{a.target===ae.current&&(N(ai(a.clientX,a.clientY)),L(!0))},[ai]),ao=(0,j.useCallback)(a=>{a.trim()&&f(null,a.trim(),M??void 0),L(!1),N(null)},[f,M]),ap=(0,j.useCallback)((a,b,c,d,e)=>{J({id:a,startNodeX:d,startNodeY:e,startClientX:b,startClientY:c})},[]),aq=(0,j.useCallback)((a,b,c,d,e)=>{P({fromId:a,type:b,startX:c,startY:d,curX:c,curY:d,direction:e})},[]),ar=(0,j.useCallback)(()=>{V(a=>!a),X(new Set),ab(!1),ad(new Set)},[]),as=(0,j.useCallback)(()=>{ab(a=>!a),ad(new Set),V(!1),X(new Set)},[]),at=(0,j.useCallback)(a=>{ad(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),au=(0,j.useCallback)(()=>{Array.from(ac).forEach(a=>{a.startsWith("tree-")?k(a.replace("tree-","")):p(a)}),ad(new Set),ab(!1)},[ac,k,p]),av=(0,j.useCallback)(a=>{X(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),aw=(0,j.useCallback)(()=>{$?(h($),_(null)):W.size>0&&(i(Array.from(W)),X(new Set),V(!1)),Z(!1)},[$,W,h,i]),ax=Array.from(z.values());return ax.length>0&&(ax.map(a=>a.x),ax.map(a=>a.x)),ax.length>0&&(ax.map(a=>a.y),ax.map(a=>a.y)),(0,g.jsxs)("div",{className:"relative w-full h-full overflow-hidden",style:{backgroundColor:"var(--bg-primary)"},children:[(0,g.jsx)(q,{width:24,height:24,cr:1,className:"text-neutral-300/60 dark:text-neutral-600/40"}),(0,g.jsxs)("div",{className:"absolute top-3 right-3 z-10 flex flex-col gap-1",children:[(0,g.jsx)("button",{onClick:()=>D(a=>Math.min(3,1.2*a)),className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"+"}),(0,g.jsx)("button",{onClick:()=>D(a=>Math.max(.2,.8*a)),className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"−"}),(0,g.jsx)("button",{onClick:ah,className:"w-7 h-7 flex items-center justify-center text-[10px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"Fit"}),(0,g.jsxs)("div",{className:"text-[10px] text-center mt-0.5",style:{color:"var(--text-tertiary)"},children:[Math.round(100*C),"%"]}),(0,g.jsxs)("div",{className:"mt-1 border-t pt-1",style:{borderColor:"var(--border)"},children:[(0,g.jsx)("button",{onClick:ar,className:"w-7 h-7 flex items-center justify-center text-[10px] rounded border transition-colors",style:{borderColor:U?"var(--status-fail-text)":"var(--border)",color:U?"var(--status-fail-text)":"var(--text-secondary)",backgroundColor:U?"var(--status-fail-bg)":"var(--bg-card)"},title:U?"Exit delete mode":"Delete nodes",children:(0,g.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,g.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}),(0,g.jsx)("button",{onClick:as,className:"w-7 h-7 mt-1 flex items-center justify-center text-[10px] rounded border transition-colors",style:{borderColor:aa?"var(--status-skip-text)":"var(--border)",color:aa?"var(--status-skip-text)":"var(--text-secondary)",backgroundColor:aa?"var(--status-skip-bg)":"var(--bg-card)"},title:aa?"Exit unlink mode":"Unlink lines",children:(0,g.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("path",{d:"M15 7h3a5 5 0 0 1 0 10h-3m-6 0H6a5 5 0 0 1 0-10h3"}),(0,g.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12",strokeDasharray:"3 3"})]})})]})]}),(0,g.jsxs)("div",{className:"absolute top-3 left-3 z-10 flex flex-col gap-1",children:[(0,g.jsx)("button",{onClick:x,disabled:!v,className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)] disabled:opacity-25",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},title:"Undo (Ctrl+Z)",children:(0,g.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,g.jsx)("path",{d:"M3 5h5a3 3 0 0 1 0 6H6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,g.jsx)("path",{d:"M5.5 2.5L3 5l2.5 2.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}),(0,g.jsx)("button",{onClick:y,disabled:!w,className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)] disabled:opacity-25",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},title:"Redo (Ctrl+Shift+Z)",children:(0,g.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,g.jsx)("path",{d:"M11 5H6a3 3 0 0 0 0 6h2",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,g.jsx)("path",{d:"M8.5 2.5L11 5 8.5 7.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})})]}),U&&(0,g.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-20 flex items-center gap-3 px-4 py-2 rounded-lg border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--status-fail-text)",boxShadow:"var(--shadow-lg)",animation:"fadeInDown 200ms ease-out"},children:[(0,g.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:"Select nodes to delete"}),(0,g.jsxs)("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:[W.size," selected"]}),(0,g.jsx)("button",{onClick:()=>{W.size>0&&Z(!0)},disabled:0===W.size,className:"px-3 py-1 text-[11px] font-medium rounded transition-colors disabled:opacity-40",style:{backgroundColor:"var(--status-fail-text)",color:"white"},children:"Delete"}),(0,g.jsx)("button",{onClick:ar,className:"px-3 py-1 text-[11px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]}),aa&&(0,g.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-20 flex items-center gap-3 px-4 py-2 rounded-lg border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--status-skip-text)",boxShadow:"var(--shadow-lg)",animation:"fadeInDown 200ms ease-out"},children:[(0,g.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:"Select lines to unlink"}),(0,g.jsxs)("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--status-skip-bg)",color:"var(--status-skip-text)"},children:[ac.size," selected"]}),(0,g.jsx)("button",{onClick:au,disabled:0===ac.size,className:"px-3 py-1 text-[11px] font-medium rounded transition-colors disabled:opacity-40",style:{backgroundColor:"var(--status-skip-text)",color:"white"},children:"Unlink"}),(0,g.jsx)("button",{onClick:as,className:"px-3 py-1 text-[11px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]}),Y&&(0,g.jsx)("div",{className:"fixed inset-0 z-[400] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>Z(!1),children:(0,g.jsxs)("div",{className:"w-full max-w-sm mx-4 p-5 rounded-xl border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)"},onClick:a=>a.stopPropagation(),children:[(0,g.jsxs)("h3",{className:"text-sm font-semibold mb-2",style:{color:"var(--text-primary)"},children:["Delete ",$?"node":`${W.size} node${W.size>1?"s":""}`,"?"]}),(0,g.jsxs)("p",{className:"text-xs mb-4",style:{color:"var(--text-tertiary)"},children:["This will permanently remove the ",$?"node":`selected node${W.size>1?"s":""}`," and all their test cases. This action cannot be undone."]}),(0,g.jsxs)("div",{className:"flex gap-2",children:[(0,g.jsx)("button",{onClick:()=>Z(!1),className:"flex-1 px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,g.jsx)("button",{onClick:aw,className:"flex-1 px-3 py-2 text-xs font-medium rounded-lg transition-colors",style:{backgroundColor:"var(--status-fail-text)",color:"white"},children:"Delete"})]})]})}),d&&(0,g.jsxs)("div",{className:"absolute bottom-3 left-3 z-10 flex gap-2 text-[10px]",style:{color:"var(--text-tertiary)"},children:[(0,g.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Tab = add child"}),(0,g.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Enter = add sibling"}),(0,g.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Del = delete"})]}),(0,g.jsxs)("svg",{ref:ae,width:"100%",height:"100%",onMouseDown:aj,onMouseMove:ak,onMouseUp:al,onClick:am,onDoubleClick:an,style:{cursor:E||I?"grabbing":O?"crosshair":"default"},children:[(0,g.jsxs)("defs",{children:[(0,g.jsx)("marker",{id:"arrow-pass",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,g.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--status-pass-text)"})}),(0,g.jsx)("marker",{id:"arrow-fail",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,g.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--status-fail-text)"})}),(0,g.jsx)("marker",{id:"arrow-default",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,g.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--text-tertiary)"})})]}),(0,g.jsxs)("g",{transform:`scale(${C}) translate(${A.x}, ${A.y})`,children:[a.map(c=>{let d;if(!c.parentId)return null;let e=z.get(c.parentId),f=z.get(c.id);if(!e||!f||b.some(a=>a.fromId===c.parentId&&a.toId===c.id||a.fromId===c.id&&a.toId===c.parentId))return null;let h=a.find(a=>a.id===c.parentId),i=h?.direction==="vertical",j=`tree-${c.id}`,l=ac.has(j);if(i){let a=e.y+40,b=f.y-40;d=`M ${e.x} ${e.y+28} C ${e.x} ${a}, ${f.x} ${b}, ${f.x} ${f.y-21}`}else{let a=e.x+60,b=f.x-60;d=`M ${e.x+70} ${e.y} C ${a} ${e.y}, ${b} ${f.y}, ${f.x-60} ${f.y}`}let m=(e.x+f.x)/2,n=(e.y+f.y)/2;return(0,g.jsxs)("g",{children:[(0,g.jsx)("path",{d:d,fill:"none",stroke:"transparent",strokeWidth:12,style:{cursor:"pointer"},onClick:()=>{aa?at(j):o(c.parentId,c.id,"pass")},onDoubleClick:a=>{a.stopPropagation(),aa||k(c.id)}}),(0,g.jsx)("path",{d:d,fill:"none",stroke:aa&&l?"var(--status-skip-text)":"var(--border-hover)",strokeWidth:aa&&l?2.5:1.5,strokeDasharray:aa&&l?"6 4":"none",style:{pointerEvents:"none",transition:"stroke 150ms, stroke-width 150ms"}}),aa&&(0,g.jsxs)("g",{transform:`translate(${m}, ${n})`,style:{pointerEvents:"none"},children:[(0,g.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:l?"var(--status-skip-text)":"var(--bg-card)",stroke:l?"var(--status-skip-text)":"var(--border)",strokeWidth:1.5}),l&&(0,g.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]})]},`tree-edge-${c.id}`)}),b.map(b=>{let c,d=z.get(b.fromId),e=z.get(b.toId);if(!d||!e)return null;let f="pass"===b.type,h="fail"===b.type;b.type;let i=f?"var(--status-pass-text)":h?"var(--status-fail-text)":"var(--text-tertiary)",j=(d.x+e.x)/2,k=(d.y+e.y)/2-12,l=ac.has(b.id),m=a.find(a=>a.id===b.fromId);return c=m?.direction==="vertical"?`M ${d.x} ${d.y} C ${d.x} ${d.y+80}, ${e.x} ${e.y-80}, ${e.x} ${e.y}`:`M ${d.x} ${d.y} C ${d.x+80} ${d.y}, ${e.x-80} ${e.y}, ${e.x} ${e.y}`,(0,g.jsxs)("g",{children:[(0,g.jsx)("path",{d:c,fill:"none",stroke:"transparent",strokeWidth:16,style:{cursor:"pointer"},onClick:()=>{aa?at(b.id):f?s(b.id,{type:"fail"}):h?s(b.id,{type:"default"}):s(b.id,{type:"pass"})},onMouseEnter:()=>R(b.id),onMouseLeave:()=>R(null)}),(0,g.jsx)("path",{d:c,fill:"none",stroke:aa&&l?"var(--status-skip-text)":i,strokeWidth:aa&&l||Q===b.id?2.5:1.8,strokeDasharray:aa&&l?"6 4":f?"none":h?"6 4":"3 3",markerEnd:aa?void 0:f?"url(#arrow-pass)":h?"url(#arrow-fail)":"url(#arrow-default)",style:{transition:"stroke-width 150ms ease-out, stroke 150ms ease-out",pointerEvents:"none"}}),aa&&(0,g.jsxs)("g",{transform:`translate(${j}, ${k})`,style:{pointerEvents:"none"},children:[(0,g.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:l?"var(--status-skip-text)":"var(--bg-card)",stroke:l?"var(--status-skip-text)":"var(--border)",strokeWidth:1.5}),l&&(0,g.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]}),!aa&&Q===b.id&&(0,g.jsxs)("g",{transform:`translate(${j}, ${k-12})`,style:{pointerEvents:"none"},children:[(0,g.jsx)("rect",{x:-22,y:-7,width:44,height:14,rx:7,fill:f?"var(--status-pass-bg)":h?"var(--status-fail-bg)":"var(--bg-secondary)",stroke:f?"var(--status-pass-text)":h?"var(--status-fail-text)":"var(--border)",strokeWidth:.5}),(0,g.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",style:{fill:i,fontSize:9,fontWeight:500},children:f?"Pass":h?"Fail":"Default"})]})]},b.id)}),O&&(0,g.jsx)("line",{x1:O.startX,y1:O.startY,x2:O.curX,y2:O.curY,stroke:"pass"===O.type?"var(--status-pass-text)":"var(--status-fail-text)",strokeWidth:2,strokeDasharray:"6 4",opacity:.6}),a.map(b=>{let i=z.get(b.id);if(!i)return null;let j=function(a,b){let c=0,d=a;for(;d.parentId;){c++;let a=b.find(a=>a.id===d.parentId);if(!a)break;d=a}return c}(b,a);return(0,g.jsx)(n,{node:b,position:i,isSelected:b.id===d,testCases:c[b.id]??[],isDragged:I?.id===b.id,edgeDragActive:null!==O,isEdgeDropTarget:S===b.id&&null!==O&&b.id!==O.fromId,deleteMode:U,isDeleteChecked:W.has(b.id),onSelect:e,onAddChild:(a,b,c,d)=>{f(a,b,c,d)},onDelete:h,onUnlinkNode:k,onRename:l,onUpdateNode:m,onDragStart:ap,onEdgeStart:aq,onToggleDeleteCheck:av,depth:j,svgRef:ae},b.id)})]})]}),K&&M&&(0,g.jsx)(u,{position:M,scale:C,pan:A,svgRef:ae,onSubmit:ao,onCancel:()=>L(!1)}),0===a.length&&!K&&(0,g.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,g.jsx)(r,{onClick:()=>{if(!ae.current){N({x:0,y:0}),L(!0);return}let a=ae.current.getBoundingClientRect();N({x:a.width/2/C-A.x,y:a.height/2/C-A.y}),L(!0)},rippleColor:"rgba(0,0,0,0.08)",className:"text-sm px-6 py-2.5",style:{color:"var(--text-tertiary)",borderColor:"var(--border)",borderRadius:"var(--radius-pill)",backgroundColor:"transparent"},children:(0,g.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,g.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,g.jsx)("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),"Create your first flow node"]})})}),a.length>0&&(0,g.jsx)(t,{nodes:a,positions:z,pan:A,scale:C})]})}function t({nodes:a,positions:b,pan:c,scale:d}){let e=Array.from(b.values());if(0===e.length)return null;let f=Math.min(...e.map(a=>a.x)),h=Math.max(...e.map(a=>a.x)),i=Math.min(...e.map(a=>a.y)),j=Math.max(...e.map(a=>a.y)),k=h-f+80,l=j-i+80,m=Math.max(60,l/k*120),n=120/k,o=m/l;return(0,g.jsx)("div",{className:"absolute bottom-3 right-3 border z-10",style:{width:120,height:m,backgroundColor:"var(--bg-card)",borderColor:"var(--border)",borderRadius:"var(--radius-sm)",opacity:.85},children:(0,g.jsx)("svg",{width:120,height:m,children:a.map(a=>{let c=b.get(a.id);if(!c)return null;let d=(c.x-f+40)*n,e=(c.y-i+40)*o;return(0,g.jsx)("circle",{cx:d,cy:e,r:2.5,fill:"var(--accent)",opacity:.6},a.id)})})})}function u({position:a,scale:b,pan:c,svgRef:d,onSubmit:e,onCancel:f}){let[h,i]=(0,j.useState)(""),k=(0,j.useRef)(null),l=(0,j.useRef)(null),m=(0,j.useCallback)(()=>{if(!d.current)return{left:"50%",top:"50%"};let e=d.current.getBoundingClientRect();return{left:(a.x+c.x)*b+e.left,top:(a.y+c.y)*b+e.top}},[a,b,c,d])(),n=144*b,o=48*b;return(0,g.jsxs)("div",{ref:l,className:"fixed z-50",style:{left:`${m.left}px`,top:`${m.top}px`,transform:"translate(-50%, 0)"},children:[(0,g.jsx)("div",{style:{width:2,height:20*b,margin:"0 auto",backgroundColor:"var(--border-hover)"}}),(0,g.jsx)("div",{style:{width:`${n}px`,height:`${o}px`,border:"1.5px dashed var(--accent)",borderRadius:4*b,backgroundColor:"var(--bg-card)",display:"flex",alignItems:"center",justifyContent:"center",padding:`${4*b}px`},children:(0,g.jsx)("input",{ref:k,autoFocus:!0,value:h,onChange:a=>i(a.target.value),onKeyDown:a=>{"Enter"===a.key&&h.trim()&&e(h),"Escape"===a.key&&f(),a.stopPropagation()},onBlur:()=>{h.trim()?e(h):f()},placeholder:"Name node...",className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})})]})}function v(a){return(0,g.jsxs)("div",{className:"flex flex-col h-full",children:[(0,g.jsxs)("div",{className:"px-4 py-2 border-b flex items-center gap-2",style:{borderColor:"var(--border)"},children:[(0,g.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"Flow Map"}),(0,g.jsxs)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:[a.nodes.length," node",1!==a.nodes.length?"s":""]}),(0,g.jsx)("div",{className:"flex-1"}),(0,g.jsx)("button",{onClick:a.onResetLayout,className:"px-2 py-1 text-[10px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",borderRadius:"var(--radius-sm)"},children:"Reset layout"})]}),(0,g.jsx)("div",{className:"flex-1 min-h-0",children:(0,g.jsx)(s,{nodes:a.nodes,edges:a.edges,testCases:a.testCases,selectedNodeId:a.selectedNodeId,onSelect:a.onSelect,onAddNode:a.onAddNode,onDeleteNode:a.onDeleteNode,onDeleteNodes:a.onDeleteNodes,onUnlinkNode:a.onUnlinkNode,onRenameNode:a.onRenameNode,onUpdateNode:a.onUpdateNode,onAddEdge:a.onAddEdge,onDeleteEdge:a.onDeleteEdge,onUpdateEdge:a.onUpdateEdge,canUndo:a.canUndo,canRedo:a.canRedo,onUndo:a.onUndo,onRedo:a.onRedo})})]})}r.displayName="RippleButton";var w=c(19188),x=c(98457);function y({value:a,className:b=""}){let c=Math.max(0,Math.min(100,a));return(0,g.jsx)("div",{className:`h-2 w-full overflow-hidden ${b}`,style:{backgroundColor:"var(--bg-secondary)",borderRadius:"var(--radius-pill)"},children:(0,g.jsx)("div",{className:"h-full transition-all duration-150 ease-out",style:{width:`${c}%`,backgroundColor:c>=80?"var(--status-pass-text)":c>=50?"var(--status-skip-text)":"var(--status-fail-text)",borderRadius:"var(--radius-pill)"}})})}function z({onAdd:a,nodeLabel:b}){let[c,d]=(0,j.useState)(""),e=(0,j.useRef)(null),f=()=>{c.trim()&&(a(c.trim()),d(""))};return(0,g.jsxs)("div",{className:"flex gap-2",children:[(0,g.jsx)("input",{ref:e,value:c,onChange:a=>d(a.target.value),onKeyDown:a=>{"Enter"===a.key&&f()},placeholder:`Add test case for "${b}"...`,className:"flex-1 px-3 py-2 text-sm bg-transparent outline-none border transition-colors focus:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)"}}),(0,g.jsx)("button",{onClick:f,disabled:!c.trim(),className:"px-4 py-2 text-sm font-medium rounded-md transition-opacity hover:opacity-80 disabled:opacity-30",style:{backgroundColor:"var(--accent)",color:"var(--bg-primary)",borderRadius:"var(--radius-sm)"},children:"+ Add"})]})}let A={untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)",label:"Untested"},pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)",label:"Pass"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)",label:"Fail"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)",label:"Skip"}},B=["untested","pass","fail","skip"];function C({status:a,onChange:b}){let c=A[a];return(0,g.jsx)("select",{value:a,onChange:a=>b(a.target.value),className:"text-[11px] font-medium px-2 py-0.5 rounded-full border-0 outline-none cursor-pointer appearance-none",style:{backgroundColor:c.bg,color:c.text,borderRadius:"var(--radius-pill)",minWidth:72},children:B.map(a=>(0,g.jsx)("option",{value:a,children:A[a].label},a))})}function D({tc:a,visibleCols:b,expandAll:c,selected:d,onToggleSelect:e,onUpdate:f,onDelete:h,onDragStart:i,onDragOver:k,onDrop:l}){let[m,n]=(0,j.useState)(null),[o,p]=(0,j.useState)(""),[q,r]=(0,j.useState)(!1),[s,t]=(0,j.useState)(null),u=(0,j.useRef)(null),v=b=>{p(a[b]??""),n(b)},w=()=>{m&&(f({[m]:o}),n(null))},x=a=>{f({status:a})},y=a=>{if("Enter"===a.key&&"steps"!==m&&w(),"Escape"===a.key&&(n(null),p("")),"Tab"===a.key){a.preventDefault(),w();let c=b.filter(a=>"status"!==a.key&&"code"!==a.key).map(a=>a.key),d=c.indexOf(m),e=a.shiftKey?c[d-1]:c[d+1];e&&v(e)}},z=b=>{let c=a[b];return c&&c.length>40};return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("tr",{className:"group transition-colors",style:{backgroundColor:q?"var(--bg-secondary)":"transparent"},onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1),draggable:!0,onDragStart:i,onDragOver:k,onDrop:l,children:[(0,g.jsx)("td",{className:"px-2 py-1.5 border-b",style:{borderColor:"var(--border)",width:28},children:(0,g.jsx)("input",{type:"checkbox",checked:d,onChange:e,className:"cursor-pointer accent-[var(--accent)]",style:{width:14,height:14}})}),b.map(b=>(0,g.jsx)("td",{className:"px-2 py-1.5 text-xs border-b",style:{borderColor:"var(--border)",color:"var(--text-primary)",maxWidth:"steps"===b.key||"expected"===b.key?300:void 0},children:"status"===b.key?(0,g.jsx)(C,{status:a.status,onChange:x}):"code"===b.key?(0,g.jsx)("span",{className:"font-mono text-[10px]",style:{color:"var(--text-tertiary)"},children:a.code||"—"}):"case_type"===b.key?(0,g.jsx)(F,{value:a.case_type||"General",onChange:a=>f({case_type:a})}):m===b.key?"steps"===b.key?(0,g.jsx)("textarea",{ref:u,value:o,onChange:a=>p(a.target.value),onBlur:w,onKeyDown:y,className:"w-full bg-transparent outline-none border rounded p-1 text-xs resize-none",style:{borderColor:"var(--accent)",color:"var(--text-primary)",minHeight:60},rows:3}):(0,g.jsx)("input",{ref:u,value:o,onChange:a=>p(a.target.value),onBlur:w,onKeyDown:y,className:"w-full bg-transparent outline-none border-b text-xs",style:{borderColor:"var(--accent)",color:"var(--text-primary)"}}):"links"===b.key?(0,g.jsx)("div",{className:"flex items-center gap-1",children:a.links?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("a",{href:a.links,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] underline hover:opacity-80 transition-opacity",style:{color:"var(--accent)"},onClick:a=>a.stopPropagation(),children:"Open Link"}),(0,g.jsx)("button",{onClick:a=>{a.stopPropagation(),f({links:""})},className:"text-[10px] opacity-0 group-hover:opacity-100 hover:opacity-100 transition-opacity px-0.5",style:{color:"var(--status-fail-text)"},title:"Clear link",children:"\xd7"})]}):(0,g.jsx)("span",{className:"cursor-text block text-[11px]",onClick:()=>v(b.key),style:{color:"var(--text-tertiary)"},children:"Add link..."})}):(0,g.jsx)("span",{className:"cursor-text block",onClick:()=>{z(b.key)&&(s===b.key?t(null):t(b.key))},onDoubleClick:()=>v(b.key),title:z(b.key)?s===b.key||c?"Click to collapse \xb7 Double-click to edit":"Click to expand \xb7 Double-click to edit":"Double-click to edit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:s===b.key||c&&z(b.key)?"pre-wrap":"nowrap",display:"block",maxHeight:s===b.key||c&&z(b.key)?"none":"1.2em",lineHeight:"1.2em"},children:a[b.key]||(0,g.jsx)("span",{style:{color:"var(--text-tertiary)"},children:"—"})})},b.key)),(0,g.jsx)("td",{className:"px-1 py-1.5 border-b",style:{borderColor:"var(--border)"},children:q&&(0,g.jsx)("button",{onClick:h,className:"text-[10px] opacity-50 hover:opacity-100 transition-opacity px-0.5",style:{color:"var(--status-fail-text)"},children:"\xd7"})})]})})}let E={Positive:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},Negative:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},General:{bg:"var(--bg-secondary)",text:"var(--text-tertiary)"}};function F({value:a,onChange:b}){let c=E[a]||E.General;return(0,g.jsx)("select",{value:a,onChange:a=>b(a.target.value),className:"text-[10px] font-medium px-2 py-0.5 rounded-full border-0 outline-none cursor-pointer",style:{backgroundColor:c.bg,color:c.text},children:w.D_.map(a=>(0,g.jsx)("option",{value:a,children:a},a))})}function G({testCases:a,columns:b,expandAll:c,selectedIds:d,onToggleSelect:e,onToggleSelectAll:f,sortKey:h,sortDirection:i,onSortChange:j,onUpdate:k,onDelete:l,onReorder:m}){let n=b.filter(a=>a.visible),o=a.length>0&&a.every(a=>d.has(a.id)),p=a.some(a=>d.has(a.id)),q=a=>{a.preventDefault(),a.dataTransfer.dropEffect="move"};return 0===a.length?null:(0,g.jsx)("div",{className:"overflow-x-auto",style:{minWidth:0},children:(0,g.jsxs)("table",{className:"text-xs",style:{minWidth:"900px",width:"100%"},children:[(0,g.jsx)("thead",{className:"sticky top-0 z-10",style:{backgroundColor:"var(--bg-primary)"},children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("th",{className:"px-2 py-1.5 border-b",style:{borderColor:"var(--border)",width:28},children:(0,g.jsx)("input",{type:"checkbox",checked:o,ref:a=>{a&&(a.indeterminate=p&&!o)},onChange:f,className:"cursor-pointer accent-[var(--accent)]",style:{width:14,height:14}})}),n.map(a=>(0,g.jsx)("th",{className:"px-2 py-1.5 text-left text-[10px] font-medium uppercase tracking-wider border-b cursor-pointer select-none hover:bg-[var(--bg-secondary)] transition-colors",style:{color:"var(--text-tertiary)",borderColor:"var(--border)",whiteSpace:"nowrap"},onClick:()=>j(a.key),children:(0,g.jsxs)("div",{className:"flex items-center gap-1",children:[(0,g.jsx)("span",{children:a.label}),h===a.key&&(0,g.jsx)("span",{className:"text-[8px]",children:"asc"===i?"↑":"↓"})]})},a.key)),(0,g.jsx)("th",{className:"w-6 border-b",style:{borderColor:"var(--border)"}})]})}),(0,g.jsx)("tbody",{children:a.map(b=>(0,g.jsx)(D,{tc:b,visibleCols:n,expandAll:c,selected:d.has(b.id),onToggleSelect:()=>e(b.id),onUpdate:a=>k(b.id,a),onDelete:()=>l(b.id),onDragStart:a=>{var c;return c=b.id,void(a.dataTransfer.setData("text/plain",c),a.dataTransfer.effectAllowed="move")},onDragOver:q,onDrop:c=>((b,c)=>{b.preventDefault();let d=b.dataTransfer.getData("text/plain");if(d===c)return;let e=a.map(a=>a.id),f=e.indexOf(d),g=e.indexOf(c);if(-1===f||-1===g)return;let h=[...e];h.splice(f,1),h.splice(g,0,d),m(h)})(c,b.id)},b.id))})]})})}function H({stats:a}){return(0,g.jsxs)("div",{className:"flex items-center gap-4 px-4 py-2 text-xs border-t flex-wrap",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:[(0,g.jsxs)("span",{children:["Total: ",(0,g.jsx)("strong",{style:{color:"var(--text-primary)"},children:a.total})]}),(0,g.jsxs)("span",{children:["Pass: ",(0,g.jsx)("strong",{style:{color:"var(--status-pass-text)"},children:a.pass}),a.total>0&&` (${a.passRate}%)`]}),(0,g.jsxs)("span",{children:["Fail: ",(0,g.jsx)("strong",{style:{color:"var(--status-fail-text)"},children:a.fail})]}),(0,g.jsxs)("span",{children:["Skip: ",(0,g.jsx)("strong",{style:{color:"var(--status-skip-text)"},children:a.skip})]}),(0,g.jsxs)("span",{children:["Untested: ",(0,g.jsx)("strong",{style:{color:"var(--status-untested-text)"},children:a.untested})]})]})}var I=c(22858);function J({open:a,onClose:b,node:c,testCases:d,columns:e}){let f=e&&e.length>0?e:w._X;return a?(0,g.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:b,children:(0,g.jsxs)("div",{className:"w-full max-w-sm mx-4 rounded-xl p-5",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-lg)"},onClick:a=>a.stopPropagation(),children:[(0,g.jsx)("h3",{className:"text-sm font-semibold mb-1",style:{color:"var(--text-primary)"},children:"Export Test Cases"}),(0,g.jsxs)("p",{className:"text-xs mb-4",style:{color:"var(--text-tertiary)"},children:["Export “",c.label,"” (",d.length," case",1!==d.length?"s":"",")"]}),(0,g.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,g.jsxs)("button",{onClick:()=>{(0,I.k5)(c,d,f),b()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,g.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Markdown (.md)"}),(0,g.jsx)("br",{}),(0,g.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Formatted table for documentation"})]}),(0,g.jsxs)("button",{onClick:()=>{(0,I.hX)(c,d),b()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,g.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"JSON (.json)"}),(0,g.jsx)("br",{}),(0,g.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Structured data backup"})]}),(0,g.jsxs)("button",{onClick:()=>{(0,I.Rz)(c,d,f),b()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,g.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"CSV (.csv)"}),(0,g.jsx)("br",{}),(0,g.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Spreadsheet-compatible format"})]}),(0,g.jsxs)("button",{onClick:async()=>{await (0,I.G$)(c,d,f),b()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,g.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Excel (.xlsx)"}),(0,g.jsx)("br",{}),(0,g.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Styled spreadsheet for reporting"})]})]}),(0,g.jsx)("button",{onClick:b,className:"w-full mt-3 px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]})}):null}function K(a,b,c){function d(c,d){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:d,constr:g,traits:new Set},enumerable:!1}),c._zod.traits.has(a))return;c._zod.traits.add(a),b(c,d);let e=g.prototype,f=Object.keys(e);for(let a=0;a<f.length;a++){let b=f[a];b in c||(c[b]=e[b].bind(c))}}let e=c?.Parent??Object;class f extends e{}function g(a){var b;let e=c?.Parent?new f:this;for(let c of(d(e,a),(b=e._zod).deferred??(b.deferred=[]),e._zod.deferred))c();return e}return Object.defineProperty(f,"name",{value:a}),Object.defineProperty(g,"init",{value:d}),Object.defineProperty(g,Symbol.hasInstance,{value:b=>!!c?.Parent&&b instanceof c.Parent||b?._zod?.traits?.has(a)}),Object.defineProperty(g,"name",{value:a}),g}Symbol("zod_brand");class L extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class M extends Error{constructor(a){super(`Encountered unidirectional transform during encode: ${a}`),this.name="ZodEncodeError"}}(e=globalThis).__zod_globalConfig??(e.__zod_globalConfig={});let N=globalThis.__zod_globalConfig;function O(a){return a&&Object.assign(N,a),N}let P=/^[cC][0-9a-z]{6,}$/,Q=/^[0-9a-z]+$/,R=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,S=/^[0-9a-vA-V]{20}$/,T=/^[A-Za-z0-9]{27}$/,U=/^[a-zA-Z0-9_-]{21}$/,V=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,W=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,X=a=>a?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${a}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Y=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Z=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,$=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,aa=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ab=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ac=/^[A-Za-z0-9_-]*$/,ad=/^https?$/,ae=/^\+[1-9]\d{6,14}$/,af="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ag=RegExp(`^${af}$`);function ah(a){let b="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof a.precision?-1===a.precision?`${b}`:0===a.precision?`${b}:[0-5]\\d`:`${b}:[0-5]\\d\\.\\d{${a.precision}}`:`${b}(?::[0-5]\\d(?:\\.\\d+)?)?`}let ai=/^[^A-Z]*$/,aj=/^[^a-z]*$/;function ak(a){let b=Object.values(a).filter(a=>"number"==typeof a);return Object.entries(a).filter(([a,c])=>-1===b.indexOf(+a)).map(([a,b])=>b)}function al(a,b){return"bigint"==typeof b?b.toString():b}function am(a){return{get value(){{let b=a();return Object.defineProperty(this,"value",{value:b}),b}}}}function an(a){let b=+!!a.startsWith("^"),c=a.endsWith("$")?a.length-1:a.length;return a.slice(b,c)}let ao=Symbol("evaluating");function ap(a,b,c){let d;Object.defineProperty(a,b,{get(){if(d!==ao)return void 0===d&&(d=ao,d=c()),d},set(c){Object.defineProperty(a,b,{value:c})},configurable:!0})}function aq(a,b,c){Object.defineProperty(a,b,{value:c,writable:!0,enumerable:!0,configurable:!0})}function ar(...a){let b={};for(let c of a)Object.assign(b,Object.getOwnPropertyDescriptors(c));return Object.defineProperties({},b)}function as(a){return JSON.stringify(a)}let at="captureStackTrace"in Error?Error.captureStackTrace:(...a)=>{};function au(a){return"object"==typeof a&&null!==a&&!Array.isArray(a)}let av=am(()=>{if(N.jitless||"undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(a){return!1}});function aw(a){if(!1===au(a))return!1;let b=a.constructor;if(void 0===b||"function"!=typeof b)return!0;let c=b.prototype;return!1!==au(c)&&!1!==Object.prototype.hasOwnProperty.call(c,"isPrototypeOf")}function ax(a){return aw(a)?{...a}:Array.isArray(a)?[...a]:a instanceof Map?new Map(a):a instanceof Set?new Set(a):a}let ay=new Set(["string","number","symbol"]);function az(a){return a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function aA(a,b,c){let d=new a._zod.constr(b??a._zod.def);return(!b||c?.parent)&&(d._zod.parent=a),d}function aB(a){if(!a)return{};if("string"==typeof a)return{error:()=>a};if(a?.message!==void 0){if(a?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");a.error=a.message}return(delete a.message,"string"==typeof a.error)?{...a,error:()=>a.error}:a}function aC(a,b=0){if(!0===a.aborted)return!0;for(let c=b;c<a.issues.length;c++)if(a.issues[c]?.continue!==!0)return!0;return!1}function aD(a,b){return b.map(b=>(b.path??(b.path=[]),b.path.unshift(a),b))}function aE(a){return"string"==typeof a?a:a?.message}function aF(a,b,c){let d=a.message?a.message:aE(a.inst?._zod.def?.error?.(a))??aE(b?.error?.(a))??aE(c.customError?.(a))??aE(c.localeError?.(a))??"Invalid input",{inst:e,continue:f,input:g,...h}=a;return h.path??(h.path=[]),h.message=d,b?.reportInput&&(h.input=g),h}function aG(a){return Array.isArray(a)?"array":"string"==typeof a?"string":"unknown"}function aH(...a){let[b,c,d]=a;return"string"==typeof b?{message:b,code:"custom",input:c,inst:d}:{...b}}Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MAX_VALUE,Number.MAX_VALUE;let aI=K("$ZodCheck",(a,b)=>{var c;a._zod??(a._zod={}),a._zod.def=b,(c=a._zod).onattach??(c.onattach=[])}),aJ=K("$ZodCheckMaxLength",(a,b)=>{var c;aI.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return null!=b&&void 0!==b.length}),a._zod.onattach.push(a=>{let c=a._zod.bag.maximum??1/0;b.maximum<c&&(a._zod.bag.maximum=b.maximum)}),a._zod.check=c=>{let d=c.value;if(d.length<=b.maximum)return;let e=aG(d);c.issues.push({origin:e,code:"too_big",maximum:b.maximum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),aK=K("$ZodCheckMinLength",(a,b)=>{var c;aI.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return null!=b&&void 0!==b.length}),a._zod.onattach.push(a=>{let c=a._zod.bag.minimum??-1/0;b.minimum>c&&(a._zod.bag.minimum=b.minimum)}),a._zod.check=c=>{let d=c.value;if(d.length>=b.minimum)return;let e=aG(d);c.issues.push({origin:e,code:"too_small",minimum:b.minimum,inclusive:!0,input:d,inst:a,continue:!b.abort})}}),aL=K("$ZodCheckLengthEquals",(a,b)=>{var c;aI.init(a,b),(c=a._zod.def).when??(c.when=a=>{let b=a.value;return null!=b&&void 0!==b.length}),a._zod.onattach.push(a=>{let c=a._zod.bag;c.minimum=b.length,c.maximum=b.length,c.length=b.length}),a._zod.check=c=>{let d=c.value,e=d.length;if(e===b.length)return;let f=aG(d),g=e>b.length;c.issues.push({origin:f,...g?{code:"too_big",maximum:b.length}:{code:"too_small",minimum:b.length},inclusive:!0,exact:!0,input:c.value,inst:a,continue:!b.abort})}}),aM=K("$ZodCheckStringFormat",(a,b)=>{var c,d;aI.init(a,b),a._zod.onattach.push(a=>{let c=a._zod.bag;c.format=b.format,b.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(b.pattern))}),b.pattern?(c=a._zod).check??(c.check=c=>{b.pattern.lastIndex=0,b.pattern.test(c.value)||c.issues.push({origin:"string",code:"invalid_format",format:b.format,input:c.value,...b.pattern?{pattern:b.pattern.toString()}:{},inst:a,continue:!b.abort})}):(d=a._zod).check??(d.check=()=>{})}),aN=K("$ZodCheckRegex",(a,b)=>{aM.init(a,b),a._zod.check=c=>{b.pattern.lastIndex=0,b.pattern.test(c.value)||c.issues.push({origin:"string",code:"invalid_format",format:"regex",input:c.value,pattern:b.pattern.toString(),inst:a,continue:!b.abort})}}),aO=K("$ZodCheckLowerCase",(a,b)=>{b.pattern??(b.pattern=ai),aM.init(a,b)}),aP=K("$ZodCheckUpperCase",(a,b)=>{b.pattern??(b.pattern=aj),aM.init(a,b)}),aQ=K("$ZodCheckIncludes",(a,b)=>{aI.init(a,b);let c=az(b.includes),d=new RegExp("number"==typeof b.position?`^.{${b.position}}${c}`:c);b.pattern=d,a._zod.onattach.push(a=>{let b=a._zod.bag;b.patterns??(b.patterns=new Set),b.patterns.add(d)}),a._zod.check=c=>{c.value.includes(b.includes,b.position)||c.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:b.includes,input:c.value,inst:a,continue:!b.abort})}}),aR=K("$ZodCheckStartsWith",(a,b)=>{aI.init(a,b);let c=RegExp(`^${az(b.prefix)}.*`);b.pattern??(b.pattern=c),a._zod.onattach.push(a=>{let b=a._zod.bag;b.patterns??(b.patterns=new Set),b.patterns.add(c)}),a._zod.check=c=>{c.value.startsWith(b.prefix)||c.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:b.prefix,input:c.value,inst:a,continue:!b.abort})}}),aS=K("$ZodCheckEndsWith",(a,b)=>{aI.init(a,b);let c=RegExp(`.*${az(b.suffix)}$`);b.pattern??(b.pattern=c),a._zod.onattach.push(a=>{let b=a._zod.bag;b.patterns??(b.patterns=new Set),b.patterns.add(c)}),a._zod.check=c=>{c.value.endsWith(b.suffix)||c.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:b.suffix,input:c.value,inst:a,continue:!b.abort})}}),aT=K("$ZodCheckOverwrite",(a,b)=>{aI.init(a,b),a._zod.check=a=>{a.value=b.tx(a.value)}});class aU{constructor(a=[]){this.content=[],this.indent=0,this&&(this.args=a)}indented(a){this.indent+=1,a(this),this.indent-=1}write(a){if("function"==typeof a){a(this,{execution:"sync"}),a(this,{execution:"async"});return}let b=a.split("\n").filter(a=>a),c=Math.min(...b.map(a=>a.length-a.trimStart().length));for(let a of b.map(a=>a.slice(c)).map(a=>" ".repeat(2*this.indent)+a))this.content.push(a)}compile(){return Function(...this?.args,[...(this?.content??[""]).map(a=>` ${a}`)].join("\n"))}}let aV=(a,b)=>{a.name="$ZodError",Object.defineProperty(a,"_zod",{value:a._zod,enumerable:!1}),Object.defineProperty(a,"issues",{value:b,enumerable:!1}),a.message=JSON.stringify(b,al,2),Object.defineProperty(a,"toString",{value:()=>a.message,enumerable:!1})},aW=K("$ZodError",aV),aX=K("$ZodError",aV,{Parent:Error}),aY=a=>(b,c,d,e)=>{let f=d?{...d,async:!1}:{async:!1},g=b._zod.run({value:c,issues:[]},f);if(g instanceof Promise)throw new L;if(g.issues.length){let b=new(e?.Err??a)(g.issues.map(a=>aF(a,f,O())));throw at(b,e?.callee),b}return g.value},aZ=a=>async(b,c,d,e)=>{let f=d?{...d,async:!0}:{async:!0},g=b._zod.run({value:c,issues:[]},f);if(g instanceof Promise&&(g=await g),g.issues.length){let b=new(e?.Err??a)(g.issues.map(a=>aF(a,f,O())));throw at(b,e?.callee),b}return g.value},a$=a=>(b,c,d)=>{let e=d?{...d,async:!1}:{async:!1},f=b._zod.run({value:c,issues:[]},e);if(f instanceof Promise)throw new L;return f.issues.length?{success:!1,error:new(a??aW)(f.issues.map(a=>aF(a,e,O())))}:{success:!0,data:f.value}},a_=a$(aX),a0=a=>async(b,c,d)=>{let e=d?{...d,async:!0}:{async:!0},f=b._zod.run({value:c,issues:[]},e);return f instanceof Promise&&(f=await f),f.issues.length?{success:!1,error:new a(f.issues.map(a=>aF(a,e,O())))}:{success:!0,data:f.value}},a1=a0(aX),a2={major:4,minor:4,patch:3},a3=K("$ZodType",(a,b)=>{var c;a??(a={}),a._zod.def=b,a._zod.bag=a._zod.bag||{},a._zod.version=a2;let d=[...a._zod.def.checks??[]];for(let b of(a._zod.traits.has("$ZodCheck")&&d.unshift(a),d))for(let c of b._zod.onattach)c(a);if(0===d.length)(c=a._zod).deferred??(c.deferred=[]),a._zod.deferred?.push(()=>{a._zod.run=a._zod.parse});else{let b=(a,b,c)=>{let d,e=aC(a);for(let f of b){if(f._zod.def.when){if(function(a,b=0){if(!0===a.aborted)return!0;for(let c=b;c<a.issues.length;c++)if(a.issues[c]?.continue===!1)return!0;return!1}(a)||!f._zod.def.when(a))continue}else if(e)continue;let b=a.issues.length,g=f._zod.check(a);if(g instanceof Promise&&c?.async===!1)throw new L;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,a.issues.length!==b&&(e||(e=aC(a,b)))});else{if(a.issues.length===b)continue;e||(e=aC(a,b))}}return d?d.then(()=>a):a},c=(c,e,f)=>{if(aC(c))return c.aborted=!0,c;let g=b(e,d,f);if(g instanceof Promise){if(!1===f.async)throw new L;return g.then(b=>a._zod.parse(b,f))}return a._zod.parse(g,f)};a._zod.run=(e,f)=>{if(f.skipChecks)return a._zod.parse(e,f);if("backward"===f.direction){let b=a._zod.parse({value:e.value,issues:[]},{...f,skipChecks:!0});return b instanceof Promise?b.then(a=>c(a,e,f)):c(b,e,f)}let g=a._zod.parse(e,f);if(g instanceof Promise){if(!1===f.async)throw new L;return g.then(a=>b(a,d,f))}return b(g,d,f)}}ap(a,"~standard",()=>({validate:b=>{try{let c=a_(a,b);return c.success?{value:c.data}:{issues:c.error?.issues}}catch(c){return a1(a,b).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),a4=K("$ZodString",(a,b)=>{a3.init(a,b),a._zod.pattern=[...a?._zod.bag?.patterns??[]].pop()??(a=>{let b=a?`[\\s\\S]{${a?.minimum??0},${a?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${b}$`)})(a._zod.bag),a._zod.parse=(c,d)=>{if(b.coerce)try{c.value=String(c.value)}catch(a){}return"string"==typeof c.value||c.issues.push({expected:"string",code:"invalid_type",input:c.value,inst:a}),c}}),a5=K("$ZodStringFormat",(a,b)=>{aM.init(a,b),a4.init(a,b)}),a6=K("$ZodGUID",(a,b)=>{b.pattern??(b.pattern=W),a5.init(a,b)}),a7=K("$ZodUUID",(a,b)=>{if(b.version){let a={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[b.version];if(void 0===a)throw Error(`Invalid UUID version: "${b.version}"`);b.pattern??(b.pattern=X(a))}else b.pattern??(b.pattern=X());a5.init(a,b)}),a8=K("$ZodEmail",(a,b)=>{b.pattern??(b.pattern=Y),a5.init(a,b)}),a9=K("$ZodURL",(a,b)=>{a5.init(a,b),a._zod.check=c=>{try{let d=c.value.trim();if(!b.normalize&&b.protocol?.source===ad.source&&!/^https?:\/\//i.test(d))return void c.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:c.value,inst:a,continue:!b.abort});let e=new URL(d);b.hostname&&(b.hostname.lastIndex=0,b.hostname.test(e.hostname)||c.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:b.hostname.source,input:c.value,inst:a,continue:!b.abort})),b.protocol&&(b.protocol.lastIndex=0,b.protocol.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)||c.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:b.protocol.source,input:c.value,inst:a,continue:!b.abort})),b.normalize?c.value=e.href:c.value=d;return}catch(d){c.issues.push({code:"invalid_format",format:"url",input:c.value,inst:a,continue:!b.abort})}}}),ba=K("$ZodEmoji",(a,b)=>{b.pattern??(b.pattern=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),a5.init(a,b)}),bb=K("$ZodNanoID",(a,b)=>{b.pattern??(b.pattern=U),a5.init(a,b)}),bc=K("$ZodCUID",(a,b)=>{b.pattern??(b.pattern=P),a5.init(a,b)}),bd=K("$ZodCUID2",(a,b)=>{b.pattern??(b.pattern=Q),a5.init(a,b)}),be=K("$ZodULID",(a,b)=>{b.pattern??(b.pattern=R),a5.init(a,b)}),bf=K("$ZodXID",(a,b)=>{b.pattern??(b.pattern=S),a5.init(a,b)}),bg=K("$ZodKSUID",(a,b)=>{b.pattern??(b.pattern=T),a5.init(a,b)}),bh=K("$ZodISODateTime",(a,b)=>{b.pattern??(b.pattern=function(a){let b=ah({precision:a.precision}),c=["Z"];a.local&&c.push(""),a.offset&&c.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let d=`${b}(?:${c.join("|")})`;return RegExp(`^${af}T(?:${d})$`)}(b)),a5.init(a,b)}),bi=K("$ZodISODate",(a,b)=>{b.pattern??(b.pattern=ag),a5.init(a,b)}),bj=K("$ZodISOTime",(a,b)=>{b.pattern??(b.pattern=RegExp(`^${ah(b)}$`)),a5.init(a,b)}),bk=K("$ZodISODuration",(a,b)=>{b.pattern??(b.pattern=V),a5.init(a,b)}),bl=K("$ZodIPv4",(a,b)=>{b.pattern??(b.pattern=Z),a5.init(a,b),a._zod.bag.format="ipv4"}),bm=K("$ZodIPv6",(a,b)=>{b.pattern??(b.pattern=$),a5.init(a,b),a._zod.bag.format="ipv6",a._zod.check=c=>{try{new URL(`http://[${c.value}]`)}catch{c.issues.push({code:"invalid_format",format:"ipv6",input:c.value,inst:a,continue:!b.abort})}}}),bn=K("$ZodCIDRv4",(a,b)=>{b.pattern??(b.pattern=_),a5.init(a,b)}),bo=K("$ZodCIDRv6",(a,b)=>{b.pattern??(b.pattern=aa),a5.init(a,b),a._zod.check=c=>{let d=c.value.split("/");try{if(2!==d.length)throw Error();let[a,b]=d;if(!b)throw Error();let c=Number(b);if(`${c}`!==b||c<0||c>128)throw Error();new URL(`http://[${a}]`)}catch{c.issues.push({code:"invalid_format",format:"cidrv6",input:c.value,inst:a,continue:!b.abort})}}});function bp(a){if(""===a)return!0;if(/\s/.test(a)||a.length%4!=0)return!1;try{return atob(a),!0}catch{return!1}}let bq=K("$ZodBase64",(a,b)=>{b.pattern??(b.pattern=ab),a5.init(a,b),a._zod.bag.contentEncoding="base64",a._zod.check=c=>{bp(c.value)||c.issues.push({code:"invalid_format",format:"base64",input:c.value,inst:a,continue:!b.abort})}}),br=K("$ZodBase64URL",(a,b)=>{b.pattern??(b.pattern=ac),a5.init(a,b),a._zod.bag.contentEncoding="base64url",a._zod.check=c=>{!function(a){if(!ac.test(a))return!1;let b=a.replace(/[-_]/g,a=>"-"===a?"+":"/");return bp(b.padEnd(4*Math.ceil(b.length/4),"="))}(c.value)&&c.issues.push({code:"invalid_format",format:"base64url",input:c.value,inst:a,continue:!b.abort})}}),bs=K("$ZodE164",(a,b)=>{b.pattern??(b.pattern=ae),a5.init(a,b)}),bt=K("$ZodJWT",(a,b)=>{a5.init(a,b),a._zod.check=c=>{!function(a,b=null){try{let c=a.split(".");if(3!==c.length)return!1;let[d]=c;if(!d)return!1;let e=JSON.parse(atob(d));if("typ"in e&&e?.typ!=="JWT"||!e.alg||b&&(!("alg"in e)||e.alg!==b))return!1;return!0}catch{return!1}}(c.value,b.alg)&&c.issues.push({code:"invalid_format",format:"jwt",input:c.value,inst:a,continue:!b.abort})}}),bu=K("$ZodUnknown",(a,b)=>{a3.init(a,b),a._zod.parse=a=>a}),bv=K("$ZodNever",(a,b)=>{a3.init(a,b),a._zod.parse=(b,c)=>(b.issues.push({expected:"never",code:"invalid_type",input:b.value,inst:a}),b)});function bw(a,b,c){a.issues.length&&b.issues.push(...aD(c,a.issues)),b.value[c]=a.value}let bx=K("$ZodArray",(a,b)=>{a3.init(a,b),a._zod.parse=(c,d)=>{let e=c.value;if(!Array.isArray(e))return c.issues.push({expected:"array",code:"invalid_type",input:e,inst:a}),c;c.value=Array(e.length);let f=[];for(let a=0;a<e.length;a++){let g=e[a],h=b.element._zod.run({value:g,issues:[]},d);h instanceof Promise?f.push(h.then(b=>bw(b,c,a))):bw(h,c,a)}return f.length?Promise.all(f).then(()=>c):c}});function by(a,b,c,d,e,f){let g=c in d;if(a.issues.length){if(e&&f&&!g)return;b.issues.push(...aD(c,a.issues))}if(!g&&!e){a.issues.length||b.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[c]});return}void 0===a.value?g&&(b.value[c]=void 0):b.value[c]=a.value}function bz(a){var b;let c=Object.keys(a.shape);for(let b of c)if(!a.shape?.[b]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${b}": expected a Zod schema`);let d=Object.keys(b=a.shape).filter(a=>"optional"===b[a]._zod.optin&&"optional"===b[a]._zod.optout);return{...a,keys:c,keySet:new Set(c),numKeys:c.length,optionalKeys:new Set(d)}}function bA(a,b,c,d,e,f){let g=[],h=e.keySet,i=e.catchall._zod,j=i.def.type,k="optional"===i.optin,l="optional"===i.optout;for(let e in b){if("__proto__"===e||h.has(e))continue;if("never"===j){g.push(e);continue}let f=i.run({value:b[e],issues:[]},d);f instanceof Promise?a.push(f.then(a=>by(a,c,e,b,k,l))):by(f,c,e,b,k,l)}return(g.length&&c.issues.push({code:"unrecognized_keys",keys:g,input:b,inst:f}),a.length)?Promise.all(a).then(()=>c):c}let bB=K("$ZodObject",(a,b)=>{let c;a3.init(a,b);let d=Object.getOwnPropertyDescriptor(b,"shape");if(!d?.get){let a=b.shape;Object.defineProperty(b,"shape",{get:()=>{let c={...a};return Object.defineProperty(b,"shape",{value:c}),c}})}let e=am(()=>bz(b));ap(a._zod,"propValues",()=>{let a=b.shape,c={};for(let b in a){let d=a[b]._zod;if(d.values)for(let a of(c[b]??(c[b]=new Set),d.values))c[b].add(a)}return c});let f=b.catchall;a._zod.parse=(b,d)=>{c??(c=e.value);let g=b.value;if(!au(g))return b.issues.push({expected:"object",code:"invalid_type",input:g,inst:a}),b;b.value={};let h=[],i=c.shape;for(let a of c.keys){let c=i[a],e="optional"===c._zod.optin,f="optional"===c._zod.optout,j=c._zod.run({value:g[a],issues:[]},d);j instanceof Promise?h.push(j.then(c=>by(c,b,a,g,e,f))):by(j,b,a,g,e,f)}return f?bA(h,g,b,d,e.value,a):h.length?Promise.all(h).then(()=>b):b}}),bC=K("$ZodObjectJIT",(a,b)=>{let c,d;bB.init(a,b);let e=a._zod.parse,f=am(()=>bz(b)),g=!N.jitless,h=g&&av.value,i=b.catchall;a._zod.parse=(j,k)=>{d??(d=f.value);let l=j.value;return au(l)?g&&h&&k?.async===!1&&!0!==k.jitless?(c||(c=(a=>{let b=new aU(["shape","payload","ctx"]),c=f.value,d=a=>{let b=as(a);return`shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`};b.write("const input = payload.value;");let e=Object.create(null),g=0;for(let a of c.keys)e[a]=`key_${g++}`;for(let f of(b.write("const newResult = {};"),c.keys)){let c=e[f],g=as(f),h=a[f],i=h?._zod?.optin==="optional",j=h?._zod?.optout==="optional";b.write(`const ${c} = ${d(f)};`),i&&j?b.write(`
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
})));
|
|
1
|
+
(()=>{var a={};a.id=948,a.ids=[948],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},7534:(a,b,c)=>{"use strict";c.d(b,{E:()=>e});var d=c(38301);let e="undefined"!=typeof window?d.useLayoutEffect:d.useEffect},8611:(a,b,c)=>{"use strict";let d;c.r(b),c.d(b,{default:()=>aq});var e=c(21124),f=c(95627),g=c.n(f),h=c(38301),i=c.n(h),j=c(42378),k=c(66877);let l=(0,h.memo)(function({node:a,position:b,isSelected:c,testCases:d,isDragged:f,edgeDragActive:g,isEdgeDropTarget:i,deleteMode:j,isDeleteChecked:k,onSelect:l,onAddChild:m,onDelete:n,onUnlinkNode:o,onRename:p,onUpdateNode:q,onDragStart:r,onEdgeStart:s,onToggleDeleteCheck:t,depth:u,showCounter:v,svgRef:w}){let[x,y]=(0,h.useState)(!1),[z,A]=(0,h.useState)(a.label),[B,C]=(0,h.useState)(!1),[D,E]=(0,h.useState)(!1),[F,G]=(0,h.useState)("horizontal"),[H,I]=(0,h.useState)(""),J=(0,h.useRef)(null),K=(0,h.useRef)(null),L=(0,h.useRef)(null),M=(0,h.useRef)({startX:0,startY:0,moved:!1}),{w:N,h:O}=0===u?{w:160,h:56}:1===u?{w:144,h:48}:{w:132,h:42},P=d.some(a=>"fail"===a.status),Q=d.some(a=>"skip"===a.status),R=d.some(a=>"untested"===a.status),S=d.some(a=>"blocked"===a.status),T=P||Q||R||S,U=d.length>0&&d.every(a=>"pass"===a.status);(0,h.useEffect)(()=>{let b=b=>{let c=b.detail;c?.parentId===a.id&&(E(!0),I(""))};return window.addEventListener("mindmap:add-child",b),()=>window.removeEventListener("mindmap:add-child",b)},[a.id]),(0,h.useEffect)(()=>{if(!D)return;let a=a=>{L.current&&!L.current.contains(a.target)&&(H.trim()?X():(E(!1),I("")))};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[D,H]),(0,h.useEffect)(()=>{D&&K.current&&K.current.focus()},[D]);let V=(0,h.useCallback)(()=>{A(a.label),y(!0),setTimeout(()=>J.current?.focus(),0)},[a.label]),W=(0,h.useCallback)(()=>{z.trim()&&p(a.id,z.trim()),y(!1)},[z,a.id,p]),X=(0,h.useCallback)(()=>{if(H.trim()){let c="vertical"===F?{x:b.x,y:b.y+O+60}:{x:b.x+N+120,y:b.y};m(a.id,H.trim(),c,F)}E(!1),I("")},[H,a.id,m,b.x,b.y,O,N,F]),Y=(0,h.useCallback)(a=>b=>{b.stopPropagation(),G(a),E(!0),I("")},[]),Z=(0,h.useCallback)(c=>{if(2===c.button||j)return;if(c.stopPropagation(),!c.target.closest('[data-drag-handle="true"]'))return void l(a.id);c.preventDefault(),M.current={startX:c.clientX,startY:c.clientY,moved:!1};let d=a=>a.preventDefault();document.addEventListener("contextmenu",d);let e=c=>{let d=c.clientX-M.current.startX,e=c.clientY-M.current.startY;!M.current.moved&&(Math.abs(d)>6||Math.abs(e)>6)&&(M.current.moved=!0,r(a.id,M.current.startX,M.current.startY,b.x,b.y))},f=()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",f),setTimeout(()=>document.removeEventListener("contextmenu",d),100)};window.addEventListener("mousemove",e),window.addEventListener("mouseup",f)},[a.id,l,r,j,b]),$=a.id.replace(/[^a-zA-Z0-9]/g,"").slice(0,8),_=c&&!j;return(0,e.jsxs)("g",{transform:`translate(${b.x}, ${b.y})`,onMouseDown:Z,onDoubleClick:a=>{a.stopPropagation(),j||V()},onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),style:{cursor:j?"pointer":"default",transition:f?"none":"transform 150ms ease-out"},onClick:()=>{j&&t(a.id)},children:[(0,e.jsxs)("defs",{children:[(0,e.jsxs)("linearGradient",{id:`fill-${$}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"#FFFFFF"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"#FAF9F7"})]}),(0,e.jsxs)("filter",{id:`shadow-${$}`,x:"-10%",y:"-10%",width:"120%",height:"130%",children:[(0,e.jsx)("feDropShadow",{dx:"0",dy:"1",stdDeviation:"2",floodOpacity:"0.08"}),(0,e.jsx)("feDropShadow",{dx:"0",dy:"3",stdDeviation:"6",floodOpacity:"0.05"})]}),(0,e.jsxs)("filter",{id:`shadow-hover-${$}`,x:"-10%",y:"-10%",width:"120%",height:"140%",children:[(0,e.jsx)("feDropShadow",{dx:"0",dy:"2",stdDeviation:"4",floodOpacity:"0.12"}),(0,e.jsx)("feDropShadow",{dx:"0",dy:"6",stdDeviation:"12",floodOpacity:"0.08"})]}),(0,e.jsxs)("filter",{id:`shadow-drag-${$}`,x:"-20%",y:"-20%",width:"140%",height:"160%",children:[(0,e.jsx)("feDropShadow",{dx:"0",dy:"4",stdDeviation:"8",floodOpacity:"0.2"}),(0,e.jsx)("feDropShadow",{dx:"0",dy:"8",stdDeviation:"16",floodOpacity:"0.1"})]}),(0,e.jsxs)("filter",{id:`glow-${$}`,x:"-50%",y:"-50%",width:"200%",height:"200%",children:[(0,e.jsx)("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"3",result:"blur"}),(0,e.jsx)("feColorMatrix",{in:"blur",type:"matrix",values:"0 0 0 0 0.4 0 0 0 0 0.8 0 0 0 0 0.4 0 0 0 0.6 0"})]})]}),!j&&(0,e.jsxs)("g",{"data-drag-handle":"true",transform:`translate(0, ${-O/2-10})`,style:{cursor:f?"grabbing":"grab"},children:[(0,e.jsx)("rect",{x:-20,y:-7,width:40,height:14,rx:4,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1,opacity:B||c?.9:.5,style:{transition:"opacity 150ms ease-out"}}),(0,e.jsx)("circle",{cx:-8,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,e.jsx)("circle",{cx:-8,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,e.jsx)("circle",{cx:-4,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,e.jsx)("circle",{cx:-4,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,e.jsx)("circle",{cx:0,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,e.jsx)("circle",{cx:0,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,e.jsx)("circle",{cx:4,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,e.jsx)("circle",{cx:4,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,e.jsx)("circle",{cx:8,cy:-1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6}),(0,e.jsx)("circle",{cx:8,cy:1.5,r:1.2,fill:"var(--text-tertiary)",opacity:.6})]}),(()=>{let a=P?"var(--status-fail-bg)":T?"var(--status-skip-bg)":U?"var(--status-pass-bg)":null;return(0,e.jsxs)(e.Fragment,{children:[a&&(0,e.jsx)("rect",{x:-N/2,y:-O/2,width:N,height:O,rx:4,fill:a,opacity:P?.2:.15}),(0,e.jsx)("rect",{x:-N/2,y:-O/2,width:N,height:O,rx:4,fill:`url(#fill-${$})`,stroke:j&&k?"var(--status-fail-text)":"var(--border)",strokeWidth:j&&k?2:.5,filter:f?`url(#shadow-drag-${$})`:B?`url(#shadow-hover-${$})`:`url(#shadow-${$})`,style:{transition:"filter 200ms ease-out, stroke 150ms ease-out"}}),(0,e.jsx)("path",{d:`M ${N/2-10} ${-O/2} L ${N/2} ${-O/2} L ${N/2} ${-O/2+10} Z`,fill:"var(--bg-secondary)",opacity:.5}),(0,e.jsx)("path",{d:`M ${N/2-10} ${-O/2} L ${N/2-10} ${-O/2+10} L ${N/2} ${-O/2+10}`,fill:"none",stroke:"var(--border)",strokeWidth:.5,opacity:.4})]})})(),d.length>0&&!j&&v&&(0,e.jsxs)("text",{x:N/2-6,y:-O/2+10,textAnchor:"end",style:{fill:P?"var(--status-fail-text)":T?"var(--status-skip-text)":"var(--status-pass-text)",fontSize:9,fontWeight:700,fontFamily:"monospace",opacity:B||c?1:.7,transition:"opacity 150ms ease-out",pointerEvents:"none"},children:[P?d.filter(a=>"fail"===a.status).length:T?d.filter(a=>"pass"!==a.status).length:d.length,"/",d.length]}),j&&(0,e.jsxs)("g",{transform:`translate(${-N/2+8}, 0)`,children:[(0,e.jsx)("rect",{x:-7,y:-7,width:14,height:14,rx:3,fill:k?"var(--status-fail-text)":"transparent",stroke:k?"var(--status-fail-text)":"var(--border)",strokeWidth:1.5}),k&&(0,e.jsx)("path",{d:"M -4 0 L -1 3 L 4 -2",fill:"none",stroke:"white",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})]}),a.code&&!j&&(0,e.jsxs)("g",{transform:`translate(${-N/2+4}, ${-O/2+4})`,style:{opacity:B||c?1:0,transition:"opacity 150ms ease-out"},children:[(0,e.jsx)("rect",{x:0,y:0,width:Math.max(6.5*a.code.length+10,28),height:14,rx:2,fill:"var(--accent)",opacity:.08}),(0,e.jsx)("text",{x:5,y:10,style:{fill:"var(--text-tertiary)",fontSize:8,fontWeight:500,fontFamily:"monospace",letterSpacing:"0.05em"},children:a.code})]}),x?(0,e.jsx)("foreignObject",{x:-N/2+8,y:-O/2+4,width:N-16,height:O-8,children:(0,e.jsx)("input",{ref:J,value:z,onChange:a=>A(a.target.value),onBlur:W,onKeyDown:a=>{"Enter"===a.key&&W(),"Escape"===a.key&&y(!1)},className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})}):(0,e.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",className:"select-none",onClick:a=>{a.stopPropagation(),j||V()},style:{fill:"var(--text-primary)",fontSize:0===u?13:11.5,fontWeight:0===u?600:450,fontFamily:"inherit",letterSpacing:"-0.01em",cursor:B&&!j?"text":"default",pointerEvents:"auto"},children:a.label.length>22?a.label.slice(0,22)+"…":a.label}),_&&!x&&!g&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("g",{transform:`translate(${N/2+3}, -11)`,children:[(0,e.jsxs)("g",{onClick:Y("horizontal"),onMouseDown:a=>a.stopPropagation(),style:{cursor:"pointer",transition:"opacity 150ms ease-out"},onMouseEnter:a=>{a.currentTarget.style.opacity="1"},onMouseLeave:a=>{a.currentTarget.style.opacity="0.85"},children:[(0,e.jsx)("rect",{x:0,y:0,width:22,height:22,rx:3,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:.75,opacity:.9}),(0,e.jsx)("line",{x1:11,y1:5,x2:11,y2:17,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"}),(0,e.jsx)("line",{x1:5,y1:11,x2:17,y2:11,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"})]}),(0,e.jsx)("g",{transform:"translate(24, 7)",onMouseDown:c=>{c.stopPropagation(),c.preventDefault(),s(a.id,"pass",b.x+N/2+3+22+2+4,b.y-11+11,"horizontal")},onContextMenu:c=>{c.preventDefault(),c.stopPropagation(),s(a.id,"fail",b.x+N/2+3+22+2+4,b.y-11+11,"horizontal")},style:{cursor:"crosshair",transition:"opacity 150ms ease-out"},onMouseEnter:a=>{a.currentTarget.style.opacity="1"},onMouseLeave:a=>{a.currentTarget.style.opacity="0.7"},children:(0,e.jsx)("circle",{cx:4,cy:4,r:4,fill:"var(--status-pass-text)",opacity:.8,children:(0,e.jsx)("animate",{attributeName:"opacity",values:"0.6;1;0.6",dur:"2s",repeatCount:"indefinite"})})})]}),(0,e.jsxs)("g",{transform:`translate(-11, ${O/2+3})`,children:[(0,e.jsxs)("g",{onClick:Y("vertical"),onMouseDown:a=>a.stopPropagation(),style:{cursor:"pointer",transition:"opacity 150ms ease-out"},onMouseEnter:a=>{a.currentTarget.style.opacity="1"},onMouseLeave:a=>{a.currentTarget.style.opacity="0.85"},children:[(0,e.jsx)("rect",{x:0,y:0,width:22,height:22,rx:3,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:.75,opacity:.9}),(0,e.jsx)("line",{x1:11,y1:5,x2:11,y2:17,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"}),(0,e.jsx)("line",{x1:5,y1:11,x2:17,y2:11,stroke:"var(--text-tertiary)",strokeWidth:1.5,strokeLinecap:"round"})]}),(0,e.jsx)("g",{transform:"translate(24, 7)",onMouseDown:c=>{c.stopPropagation(),c.preventDefault(),s(a.id,"pass",b.x-11+11,b.y+O/2+3+22+2+4,"vertical")},onContextMenu:c=>{c.preventDefault(),c.stopPropagation(),s(a.id,"fail",b.x-11+11,b.y+O/2+3+22+2+4,"vertical")},style:{cursor:"crosshair",transition:"opacity 150ms ease-out"},onMouseEnter:a=>{a.currentTarget.style.opacity="1"},onMouseLeave:a=>{a.currentTarget.style.opacity="0.7"},children:(0,e.jsx)("circle",{cx:4,cy:4,r:4,fill:"var(--accent)",opacity:.8,children:(0,e.jsx)("animate",{attributeName:"opacity",values:"0.6;1;0.6",dur:"2s",repeatCount:"indefinite"})})})]})]}),g&&!i&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("g",{transform:`translate(${-N/2-10}, 0)`,children:(0,e.jsx)("circle",{r:6,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1.5,opacity:.6,strokeDasharray:"3 2"})}),(0,e.jsx)("g",{transform:`translate(0, ${-O/2-10})`,children:(0,e.jsx)("circle",{r:6,fill:"var(--bg-card)",stroke:"var(--border)",strokeWidth:1.5,opacity:.6,strokeDasharray:"3 2"})})]}),D&&(0,e.jsxs)("g",{children:["vertical"===F?(0,e.jsx)("line",{x1:0,y1:O/2,x2:0,y2:O/2+50,stroke:"var(--border-hover)",strokeWidth:1.5}):(0,e.jsx)("line",{x1:N/2,y1:0,x2:N/2+50,y2:0,stroke:"var(--border-hover)",strokeWidth:1.5}),(0,e.jsx)("rect",{x:"vertical"===F?-N/2:N/2+50,y:"vertical"===F?O/2+50:-O/2,width:N,height:O,rx:4,fill:"var(--bg-card)",stroke:"var(--accent)",strokeWidth:1,strokeDasharray:"4 3"}),(0,e.jsx)("foreignObject",{x:"vertical"===F?-N/2+4:N/2+50+4,y:"vertical"===F?O/2+50+4:-O/2+4,width:N-8,height:O-8,children:(0,e.jsx)("div",{ref:L,children:(0,e.jsx)("input",{ref:K,value:H,onChange:a=>I(a.target.value),onBlur:()=>{H.trim()?X():(E(!1),I(""))},onKeyDown:a=>{"Enter"===a.key&&X(),"Escape"===a.key&&(E(!1),I("")),a.stopPropagation()},onMouseDown:a=>a.stopPropagation(),placeholder:"Name node...",className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})})})]})]})});var m=c(41877),n=c(44943);function o({width:a=16,height:b=16,x:c=0,y:d=0,cx:f=1,cy:g=1,cr:i=1,className:j,glow:k=!1,...l}){let o=(0,h.useId)(),p=(0,h.useRef)(null),[q,r]=(0,h.useState)({width:0,height:0}),s=Array.from({length:Math.ceil(q.width/a)*Math.ceil(q.height/b)},(e,h)=>{let i=h%Math.ceil(q.width/a),j=Math.floor(h/Math.ceil(q.width/a));return{x:i*a+f+c,y:j*b+g+d,delay:5*Math.random(),duration:3*Math.random()+2}});return(0,e.jsxs)("svg",{ref:p,"aria-hidden":"true",className:(0,n.cn)("pointer-events-none absolute inset-0 h-full w-full text-neutral-400/80",j),...l,children:[(0,e.jsx)("defs",{children:(0,e.jsxs)("radialGradient",{id:`${o}-gradient`,children:[(0,e.jsx)("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),(0,e.jsx)("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"})]})}),s.map(a=>(0,e.jsx)(m.P.circle,{cx:a.x,cy:a.y,r:i,fill:k?`url(#${o}-gradient)`:"currentColor",initial:k?{opacity:.4,scale:1}:{},animate:k?{opacity:[.4,1,.4],scale:[1,1.5,1]}:{},transition:k?{duration:a.duration,repeat:1/0,repeatType:"reverse",delay:a.delay,ease:"easeInOut"}:{}},`${a.x}-${a.y}`))]})}let p=i().forwardRef(({className:a,children:b,rippleColor:c="#ffffff",duration:d="600ms",onClick:f,...g},i)=>{let[j,k]=(0,h.useState)([]);return(0,h.useEffect)(()=>{let a=null;if(j.length>0){let b=j[j.length-1];a=setTimeout(()=>{k(a=>a.filter(a=>a.key!==b.key))},parseInt(d))}return()=>{null!==a&&clearTimeout(a)}},[j,d]),(0,e.jsxs)("button",{className:(0,n.cn)("bg-background text-primary relative flex cursor-pointer items-center justify-center overflow-hidden rounded-lg border-2 px-4 py-2 text-center",a),onClick:a=>{(a=>{let b=a.currentTarget.getBoundingClientRect(),c=Math.max(b.width,b.height),d={x:a.clientX-b.left-c/2,y:a.clientY-b.top-c/2,size:c,key:Date.now()};k(a=>[...a,d])})(a),f?.(a)},ref:i,...g,children:[(0,e.jsx)("div",{className:"relative z-10",children:b}),(0,e.jsx)("span",{className:"pointer-events-none absolute inset-0",children:j.map(a=>(0,e.jsx)("span",{className:"animate-rippling bg-background absolute rounded-full opacity-30",style:{width:`${a.size}px`,height:`${a.size}px`,top:`${a.y}px`,left:`${a.x}px`,backgroundColor:c,transform:"scale(0)","--duration":d}},a.key))})]})});function q({nodes:a,edges:b,testCases:c,selectedNodeId:d,onSelect:f,onAddNode:g,onDeleteNode:i,onDeleteNodes:j,onUnlinkNode:k,onRenameNode:m,onUpdateNode:n,onAddEdge:q,onDeleteEdge:t,onUpdateEdge:u,canUndo:v,canRedo:w,onUndo:x,onRedo:y}){let z=(0,h.useMemo)(()=>(function(a){let b=new Map;if(0===a.length)return b;let c=new Map;for(let b of a)c.set(b.id,b);let d=new Set;for(let b of a)b.position&&d.add(b.id);let e=a.filter(a=>null===a.parentId);if(0===e.length)return b;let f=0;for(let a of e)f=function a(e,f,g,h,i){let j=c.get(e);if(!j)return g;let k="vertical"===j.direction,l=k?j.position?.x??h:60+180*f,m=g;for(let b of j.children)m=k?a(b,f,m,h,i):a(b,f+1,m,h,i);let n=j.children.map(a=>b.get(a)).filter(Boolean),o=n.length>0?(Math.min(...n.map(a=>a.y))+Math.max(...n.map(a=>a.y)))/2:g;if(d.has(e)&&j.position){let c=n.length>0?o:g,d=j.position.x-(k?j.position.x:l),h=j.position.y-c;b.set(e,j.position);let i=g;for(let b of j.children)i=k?a(b,f,i,d,h):a(b,f+1,i,d,h);return i}return k?b.set(e,{x:(j.position?.x??0)+h,y:o+i}):b.set(e,{x:l+h,y:o+i}),m}(a.id,0,f,0,0);let g=Array.from(b.entries());if(g.length>0){let a=g.filter(([a])=>!d.has(a)).map(([,a])=>a.y);if(a.length>0){let c=(Math.min(...a)+Math.max(...a))/2;for(let[a,e]of g)d.has(a)||b.set(a,{x:e.x,y:e.y-c+300})}}return b})(a),[a]),[A,B]=(0,h.useState)({x:0,y:0}),[C,D]=(0,h.useState)(1),[E,F]=(0,h.useState)(!1),[G,H]=(0,h.useState)({x:0,y:0}),[I,J]=(0,h.useState)(null),[K,L]=(0,h.useState)(!1),[M,N]=(0,h.useState)(null),[O,P]=(0,h.useState)(null),[Q,R]=(0,h.useState)(null),[S,T]=(0,h.useState)(null),[U,V]=(0,h.useState)(!1),[W,X]=(0,h.useState)(new Set),[Y,Z]=(0,h.useState)(!1),[$,_]=(0,h.useState)(null),[aa,ab]=(0,h.useState)(!1),[ac,ad]=(0,h.useState)(!1),ae=(0,h.useRef)(null),af=(0,h.useRef)(null),ag=(0,h.useRef)(null),ah=(0,h.useCallback)(()=>{let a=Array.from(z.values());if(0===a.length){D(1),B({x:0,y:0});return}if(!ae.current)return;let b=ae.current.getBoundingClientRect(),c=Math.min(...a.map(a=>a.x))-80,d=Math.max(...a.map(a=>a.x))+80,e=Math.min(...a.map(a=>a.y))-80,f=Math.max(...a.map(a=>a.y))+80,g=Math.min(b.width/(d-c),b.height/(f-e),1.5);D(g),B({x:b.width/2/g-(c+d)/2,y:b.height/2/g-(e+f)/2})},[z]),ai=(0,h.useCallback)((a,b)=>{if(!ae.current)return{x:0,y:0};let c=ae.current.getBoundingClientRect();return{x:(a-c.left)/C-A.x,y:(b-c.top)/C-A.y}},[C,A]),aj=(0,h.useCallback)(a=>{a.target===ae.current&&(F(!0),H({x:a.clientX-A.x*C,y:a.clientY-A.y*C}))},[A,C]),ak=(0,h.useCallback)(b=>{if(E&&B({x:(b.clientX-G.x)/C,y:(b.clientY-G.y)/C}),I){let a=ai(I.startClientX,I.startClientY),c=ai(b.clientX,b.clientY),d=c.x-a.x,e=c.y-a.y,f=I.startNodeX+d,g=I.startNodeY+e;ag.current={id:I.id,x:f,y:g},af.current||(af.current=requestAnimationFrame(()=>{ag.current&&(n(ag.current.id,{position:{x:ag.current.x,y:ag.current.y}}),ag.current=null),af.current=null}))}if(O){let c=ai(b.clientX,b.clientY);P(a=>a?{...a,curX:c.x,curY:c.y}:null);let d=null;for(let b of a){if(b.id===O.fromId)continue;let a=z.get(b.id);if(!a)continue;let e=c.x-a.x,f=c.y-a.y;if(80>Math.abs(e)&&40>Math.abs(f)){d=b.id;break}}T(d)}},[E,G,C,I,O,ai,n,a,z]),al=(0,h.useCallback)(()=>{if(O){let b={x:O.curX,y:O.curY};for(let c of a){let a=z.get(c.id);if(!a)continue;let d=b.x-a.x,e=b.y-a.y;if(80>Math.abs(d)&&40>Math.abs(e)&&c.id!==O.fromId){q(O.fromId,c.id,O.type);break}}P(null),T(null)}F(!1),J(null),af.current&&(cancelAnimationFrame(af.current),af.current=null)},[O,a,z,q]),am=(0,h.useCallback)(a=>{a.target===ae.current&&(f(null),L(!1))},[f]),an=(0,h.useCallback)(a=>{a.target===ae.current&&(N(ai(a.clientX,a.clientY)),L(!0))},[ai]),ao=(0,h.useCallback)(a=>{a.trim()&&g(null,a.trim(),M??void 0),L(!1),N(null)},[g,M]),ap=(0,h.useCallback)((a,b,c,d,e)=>{J({id:a,startNodeX:d,startNodeY:e,startClientX:b,startClientY:c})},[]),aq=(0,h.useCallback)((a,b,c,d,e)=>{P({fromId:a,type:b,startX:c,startY:d,curX:c,curY:d,direction:e})},[]),ar=(0,h.useCallback)(()=>{V(a=>!a),X(new Set),ab(!1)},[]),as=(0,h.useCallback)(()=>{ab(a=>!a),V(!1),X(new Set)},[]),at=(0,h.useCallback)(a=>{X(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),au=(0,h.useCallback)(()=>{$?(i($),_(null)):W.size>0&&(j(Array.from(W)),X(new Set),V(!1)),Z(!1)},[$,W,i,j]),av=Array.from(z.values());return av.length>0&&(av.map(a=>a.x),av.map(a=>a.x)),av.length>0&&(av.map(a=>a.y),av.map(a=>a.y)),(0,e.jsxs)("div",{className:"relative w-full h-full overflow-hidden",style:{backgroundColor:"var(--bg-primary)"},children:[(0,e.jsx)(o,{width:24,height:24,cr:1,className:"text-neutral-300/60 dark:text-neutral-600/40"}),(0,e.jsxs)("div",{className:"absolute top-3 right-3 z-10 flex flex-col gap-1",children:[(0,e.jsx)("button",{onClick:()=>D(a=>Math.min(3,1.2*a)),className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"+"}),(0,e.jsx)("button",{onClick:()=>D(a=>Math.max(.2,.8*a)),className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"−"}),(0,e.jsx)("button",{onClick:ah,className:"w-7 h-7 flex items-center justify-center text-[10px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},children:"Fit"}),(0,e.jsxs)("div",{className:"text-[10px] text-center mt-0.5",style:{color:"var(--text-tertiary)"},children:[Math.round(100*C),"%"]}),(0,e.jsxs)("div",{className:"mt-1 border-t pt-1",style:{borderColor:"var(--border)"},children:[(0,e.jsx)("button",{onClick:ar,className:"w-7 h-7 flex items-center justify-center text-[10px] rounded border transition-colors",style:{borderColor:U?"var(--status-fail-text)":"var(--border)",color:U?"var(--status-fail-text)":"var(--text-secondary)",backgroundColor:U?"var(--status-fail-bg)":"var(--bg-card)"},title:U?"Exit delete mode":"Delete nodes",children:(0,e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,e.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}),(0,e.jsx)("button",{onClick:as,className:"w-7 h-7 mt-1 flex items-center justify-center text-[10px] rounded border transition-colors",style:{borderColor:aa?"var(--status-skip-text)":"var(--border)",color:aa?"var(--status-skip-text)":"var(--text-secondary)",backgroundColor:aa?"var(--status-skip-bg)":"var(--bg-card)"},title:aa?"Exit unlink mode":"Unlink lines",children:(0,e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"M15 7h3a5 5 0 0 1 0 10h-3m-6 0H6a5 5 0 0 1 0-10h3"}),(0,e.jsx)("line",{x1:"8",y1:"12",x2:"16",y2:"12",strokeDasharray:"3 3"})]})}),(0,e.jsx)("button",{onClick:()=>ad(a=>!a),className:"w-7 h-7 mt-1 flex items-center justify-center text-[10px] rounded border transition-colors",style:{borderColor:ac?"var(--accent)":"var(--border)",color:ac?"#fff":"var(--text-secondary)",backgroundColor:ac?"var(--accent)":"var(--bg-card)"},title:ac?"Hide counter":"Show counter",children:(0,e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"}),(0,e.jsx)("line",{x1:"4",y1:"22",x2:"4",y2:"15"})]})})]})]}),(0,e.jsxs)("div",{className:"absolute top-3 left-3 z-10 flex flex-col gap-1",children:[(0,e.jsx)("button",{onClick:x,disabled:!v,className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)] disabled:opacity-25",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},title:"Undo (Ctrl+Z)",children:(0,e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,e.jsx)("path",{d:"M3 5h5a3 3 0 0 1 0 6H6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,e.jsx)("path",{d:"M5.5 2.5L3 5l2.5 2.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})}),(0,e.jsx)("button",{onClick:y,disabled:!w,className:"w-7 h-7 flex items-center justify-center text-xs rounded border transition-colors hover:bg-[var(--bg-secondary)] disabled:opacity-25",style:{borderColor:"var(--border)",color:"var(--text-secondary)",backgroundColor:"var(--bg-card)"},title:"Redo (Ctrl+Shift+Z)",children:(0,e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",children:[(0,e.jsx)("path",{d:"M11 5H6a3 3 0 0 0 0 6h2",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"}),(0,e.jsx)("path",{d:"M8.5 2.5L11 5 8.5 7.5",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]})})]}),U&&(0,e.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-20 flex items-center gap-3 px-4 py-2 rounded-lg border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--status-fail-text)",boxShadow:"var(--shadow-lg)",animation:"fadeInDown 200ms ease-out"},children:[(0,e.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:"Select nodes to delete"}),(0,e.jsxs)("span",{className:"text-[10px] px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:[W.size," selected"]}),(0,e.jsx)("button",{onClick:()=>{W.size>0&&Z(!0)},disabled:0===W.size,className:"px-3 py-1 text-[11px] font-medium rounded transition-colors disabled:opacity-40",style:{backgroundColor:"var(--status-fail-text)",color:"white"},children:"Delete"}),(0,e.jsx)("button",{onClick:ar,className:"px-3 py-1 text-[11px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]}),aa&&(0,e.jsxs)("div",{className:"absolute top-3 left-1/2 -translate-x-1/2 z-20 flex items-center gap-3 px-4 py-2 rounded-lg border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--status-skip-text)",boxShadow:"var(--shadow-lg)",animation:"fadeInDown 200ms ease-out"},children:[(0,e.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:"Click the icon on a line to unlink it"}),(0,e.jsx)("button",{onClick:as,className:"px-3 py-1 text-[11px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Done"})]}),Y&&(0,e.jsx)("div",{className:"fixed inset-0 z-[400] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>Z(!1),children:(0,e.jsxs)("div",{className:"w-full max-w-sm mx-4 p-5 rounded-xl border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)"},onClick:a=>a.stopPropagation(),children:[(0,e.jsxs)("h3",{className:"text-sm font-semibold mb-2",style:{color:"var(--text-primary)"},children:["Delete ",$?"node":`${W.size} node${W.size>1?"s":""}`,"?"]}),(0,e.jsxs)("p",{className:"text-xs mb-4",style:{color:"var(--text-tertiary)"},children:["This will permanently remove the ",$?"node":`selected node${W.size>1?"s":""}`," and all their test cases. This action cannot be undone."]}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("button",{onClick:()=>Z(!1),className:"flex-1 px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,e.jsx)("button",{onClick:au,className:"flex-1 px-3 py-2 text-xs font-medium rounded-lg transition-colors",style:{backgroundColor:"var(--status-fail-text)",color:"white"},children:"Delete"})]})]})}),d&&(0,e.jsxs)("div",{className:"absolute bottom-3 left-3 z-10 flex gap-2 text-[10px]",style:{color:"var(--text-tertiary)"},children:[(0,e.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Tab = add child"}),(0,e.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Enter = add sibling"}),(0,e.jsx)("span",{className:"px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},children:"Del = delete"})]}),(0,e.jsxs)("svg",{ref:ae,width:"100%",height:"100%",onMouseDown:aj,onMouseMove:ak,onMouseUp:al,onClick:am,onDoubleClick:an,style:{cursor:E||I?"grabbing":O?"crosshair":"default"},children:[(0,e.jsxs)("defs",{children:[(0,e.jsx)("marker",{id:"arrow-pass",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,e.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--status-pass-text)"})}),(0,e.jsx)("marker",{id:"arrow-fail",markerWidth:"8",markerHeight:"8",refX:"8",refY:"4",orient:"auto",children:(0,e.jsx)("path",{d:"M0,0 L8,4 L0,8",fill:"var(--status-fail-text)"})})]}),(0,e.jsxs)("g",{transform:`scale(${C}) translate(${A.x}, ${A.y})`,children:[a.map(c=>{let d;if(!c.parentId)return null;let f=z.get(c.parentId),g=z.get(c.id);if(!f||!g||b.some(a=>a.fromId===c.parentId&&a.toId===c.id||a.fromId===c.id&&a.toId===c.parentId))return null;let h=a.find(a=>a.id===c.parentId),i=h?.direction==="vertical";if(c.id,i){let a=f.y+40,b=g.y-40;d=`M ${f.x} ${f.y+28} C ${f.x} ${a}, ${g.x} ${b}, ${g.x} ${g.y-21}`}else{let a=f.x+60,b=g.x-60;d=`M ${f.x+70} ${f.y} C ${a} ${f.y}, ${b} ${g.y}, ${g.x-60} ${g.y}`}let j=(f.x+g.x)/2,l=(f.y+g.y)/2;return(0,e.jsxs)("g",{children:[(0,e.jsx)("path",{d:d,fill:"none",stroke:"transparent",strokeWidth:12,style:{cursor:"pointer"},onClick:()=>{aa?k(c.id):q(c.parentId,c.id,"plain")},onDoubleClick:a=>{a.stopPropagation(),aa||k(c.id)}}),(0,e.jsx)("path",{d:d,fill:"none",stroke:aa?"var(--status-skip-text)":"var(--border-hover)",strokeWidth:aa?2:1.5,strokeDasharray:aa?"6 4":"none",style:{pointerEvents:"none",transition:"stroke 150ms, stroke-width 150ms"}}),aa&&(0,e.jsxs)("g",{transform:`translate(${j}, ${l})`,style:{cursor:"pointer"},onClick:a=>{a.stopPropagation(),k(c.id)},children:[(0,e.jsx)("rect",{x:-10,y:-10,width:20,height:20,rx:4,fill:"var(--bg-card)",stroke:"var(--status-skip-text)",strokeWidth:1.5}),(0,e.jsxs)("g",{transform:"translate(-5, -5)",children:[(0,e.jsx)("line",{x1:"0",y1:"0",x2:"10",y2:"10",stroke:"var(--status-skip-text)",strokeWidth:"2",strokeLinecap:"round"}),(0,e.jsx)("line",{x1:"10",y1:"0",x2:"0",y2:"10",stroke:"var(--status-skip-text)",strokeWidth:"2",strokeLinecap:"round"})]})]})]},`tree-edge-${c.id}`)}),b.map(b=>{let c,d=z.get(b.fromId),f=z.get(b.toId);if(!d||!f)return null;let g="pass"===b.type,h="fail"===b.type,i=g?"var(--status-pass-text)":h?"var(--status-fail-text)":"var(--text-tertiary)",j=(d.x+f.x)/2,k=(d.y+f.y)/2-12,l=a.find(a=>a.id===b.fromId);return c=l?.direction==="vertical"?`M ${d.x} ${d.y} C ${d.x} ${d.y+80}, ${f.x} ${f.y-80}, ${f.x} ${f.y}`:`M ${d.x} ${d.y} C ${d.x+80} ${d.y}, ${f.x-80} ${f.y}, ${f.x} ${f.y}`,(0,e.jsxs)("g",{children:[(0,e.jsx)("path",{d:c,fill:"none",stroke:"transparent",strokeWidth:16,style:{cursor:"pointer"},onClick:()=>{aa?t(b.id):g?u(b.id,{type:"fail"}):h?u(b.id,{type:"plain"}):u(b.id,{type:"pass"})},onMouseEnter:()=>R(b.id),onMouseLeave:()=>R(null)}),(0,e.jsx)("path",{d:c,fill:"none",stroke:aa?"var(--status-skip-text)":i,strokeWidth:aa?2:Q===b.id?2.5:1.8,strokeDasharray:aa?"6 4":g?"none":h?"6 4":"none",markerEnd:aa?void 0:g?"url(#arrow-pass)":h?"url(#arrow-fail)":void 0,style:{transition:"stroke-width 150ms ease-out, stroke 150ms ease-out",pointerEvents:"none"}}),aa&&(0,e.jsxs)("g",{transform:`translate(${j}, ${k})`,style:{cursor:"pointer"},onClick:a=>{a.stopPropagation(),t(b.id)},children:[(0,e.jsx)("rect",{x:-10,y:-10,width:20,height:20,rx:4,fill:"var(--bg-card)",stroke:"var(--status-skip-text)",strokeWidth:1.5}),(0,e.jsxs)("g",{transform:"translate(-5, -5)",children:[(0,e.jsx)("line",{x1:"0",y1:"0",x2:"10",y2:"10",stroke:"var(--status-skip-text)",strokeWidth:"2",strokeLinecap:"round"}),(0,e.jsx)("line",{x1:"10",y1:"0",x2:"0",y2:"10",stroke:"var(--status-skip-text)",strokeWidth:"2",strokeLinecap:"round"})]})]}),!aa&&Q===b.id&&!(!g&&!h)&&(0,e.jsxs)("g",{transform:`translate(${j}, ${k-12})`,style:{pointerEvents:"none"},children:[(0,e.jsx)("rect",{x:-22,y:-7,width:44,height:14,rx:7,fill:g?"var(--status-pass-bg)":"var(--status-fail-bg)",stroke:g?"var(--status-pass-text)":"var(--status-fail-text)",strokeWidth:.5}),(0,e.jsx)("text",{textAnchor:"middle",dominantBaseline:"central",style:{fill:i,fontSize:9,fontWeight:500},children:g?"Pass":"Fail"})]})]},b.id)}),O&&(0,e.jsx)("line",{x1:O.startX,y1:O.startY,x2:O.curX,y2:O.curY,stroke:"pass"===O.type?"var(--status-pass-text)":"var(--status-fail-text)",strokeWidth:2,strokeDasharray:"6 4",opacity:.6}),a.map(b=>{let h=z.get(b.id);if(!h)return null;let j=function(a,b){let c=0,d=a;for(;d.parentId;){c++;let a=b.find(a=>a.id===d.parentId);if(!a)break;d=a}return c}(b,a);return(0,e.jsx)(l,{node:b,position:h,isSelected:b.id===d,testCases:c[b.id]??[],isDragged:I?.id===b.id,edgeDragActive:null!==O,isEdgeDropTarget:S===b.id&&null!==O&&b.id!==O.fromId,deleteMode:U,isDeleteChecked:W.has(b.id),onSelect:f,onAddChild:(a,b,c,d)=>{g(a,b,c,d)},onDelete:i,onUnlinkNode:k,onRename:m,onUpdateNode:n,onDragStart:ap,onEdgeStart:aq,onToggleDeleteCheck:at,depth:j,showCounter:ac,svgRef:ae},b.id)})]})]}),K&&M&&(0,e.jsx)(s,{position:M,scale:C,pan:A,svgRef:ae,onSubmit:ao,onCancel:()=>L(!1)}),0===a.length&&!K&&(0,e.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,e.jsx)(p,{onClick:()=>{if(!ae.current){N({x:0,y:0}),L(!0);return}let a=ae.current.getBoundingClientRect();N({x:a.width/2/C-A.x,y:a.height/2/C-A.y}),L(!0)},rippleColor:"rgba(0,0,0,0.08)",className:"text-sm px-6 py-2.5",style:{color:"var(--text-tertiary)",borderColor:"var(--border)",borderRadius:"var(--radius-pill)",backgroundColor:"transparent"},children:(0,e.jsxs)("span",{className:"inline-flex items-center gap-2",children:[(0,e.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",children:(0,e.jsx)("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),"Create your first flow node"]})})}),a.length>0&&(0,e.jsx)(r,{nodes:a,positions:z,pan:A,scale:C})]})}function r({nodes:a,positions:b,pan:c,scale:d}){let f=Array.from(b.values());if(0===f.length)return null;let g=Math.min(...f.map(a=>a.x)),h=Math.max(...f.map(a=>a.x)),i=Math.min(...f.map(a=>a.y)),j=Math.max(...f.map(a=>a.y)),k=h-g+80,l=j-i+80,m=Math.max(60,l/k*120),n=120/k,o=m/l;return(0,e.jsx)("div",{className:"absolute bottom-3 right-3 border z-10",style:{width:120,height:m,backgroundColor:"var(--bg-card)",borderColor:"var(--border)",borderRadius:"var(--radius-sm)",opacity:.85},children:(0,e.jsx)("svg",{width:120,height:m,children:a.map(a=>{let c=b.get(a.id);if(!c)return null;let d=(c.x-g+40)*n,f=(c.y-i+40)*o;return(0,e.jsx)("circle",{cx:d,cy:f,r:2.5,fill:"var(--accent)",opacity:.6},a.id)})})})}function s({position:a,scale:b,pan:c,svgRef:d,onSubmit:f,onCancel:g}){let[i,j]=(0,h.useState)(""),k=(0,h.useRef)(null),l=(0,h.useRef)(null),m=(0,h.useCallback)(()=>{if(!d.current)return{left:"50%",top:"50%"};let e=d.current.getBoundingClientRect();return{left:(a.x+c.x)*b+e.left,top:(a.y+c.y)*b+e.top}},[a,b,c,d])(),n=144*b,o=48*b;return(0,e.jsxs)("div",{ref:l,className:"fixed z-50",style:{left:`${m.left}px`,top:`${m.top}px`,transform:"translate(-50%, 0)"},children:[(0,e.jsx)("div",{style:{width:2,height:20*b,margin:"0 auto",backgroundColor:"var(--border-hover)"}}),(0,e.jsx)("div",{style:{width:`${n}px`,height:`${o}px`,border:"1.5px dashed var(--accent)",borderRadius:4*b,backgroundColor:"var(--bg-card)",display:"flex",alignItems:"center",justifyContent:"center",padding:`${4*b}px`},children:(0,e.jsx)("input",{ref:k,autoFocus:!0,value:i,onChange:a=>j(a.target.value),onKeyDown:a=>{"Enter"===a.key&&i.trim()&&f(i),"Escape"===a.key&&g(),a.stopPropagation()},onBlur:()=>{i.trim()?f(i):g()},placeholder:"Name node...",className:"w-full h-full bg-transparent outline-none text-center text-xs",style:{color:"var(--text-primary)",fontFamily:"inherit"}})})]})}function t(a){return(0,e.jsxs)("div",{className:"flex flex-col h-full",children:[(0,e.jsxs)("div",{className:"px-4 py-2 border-b flex items-center gap-2",style:{borderColor:"var(--border)"},children:[(0,e.jsx)("span",{className:"text-xs font-medium uppercase tracking-wider",style:{color:"var(--text-tertiary)"},children:"Flow Map"}),(0,e.jsxs)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:[a.nodes.length," node",1!==a.nodes.length?"s":""]}),(0,e.jsx)("div",{className:"flex-1"}),(0,e.jsx)("button",{onClick:a.onResetLayout,className:"px-2 py-1 text-[10px] rounded border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",borderRadius:"var(--radius-sm)"},children:"Reset layout"})]}),(0,e.jsx)("div",{className:"flex-1 min-h-0",children:(0,e.jsx)(q,{nodes:a.nodes,edges:a.edges,testCases:a.testCases,selectedNodeId:a.selectedNodeId,onSelect:a.onSelect,onAddNode:a.onAddNode,onDeleteNode:a.onDeleteNode,onDeleteNodes:a.onDeleteNodes,onUnlinkNode:a.onUnlinkNode,onRenameNode:a.onRenameNode,onUpdateNode:a.onUpdateNode,onAddEdge:a.onAddEdge,onDeleteEdge:a.onDeleteEdge,onUpdateEdge:a.onUpdateEdge,canUndo:a.canUndo,canRedo:a.canRedo,onUndo:a.onUndo,onRedo:a.onRedo})})]})}p.displayName="RippleButton";var u=c(25880),v=c(62312),w=c(7534),x=c(21664),y=c(93238),z=c(22577);function A(a,b){if("function"==typeof a)return a(b);null!=a&&(a.current=b)}class B extends h.Component{getSnapshotBeforeUpdate(a){let b=this.props.childRef.current;if((0,y.s)(b)&&a.isPresent&&!this.props.isPresent&&!1!==this.props.pop){let a=b.offsetParent,c=(0,y.s)(a)&&a.offsetWidth||0,d=(0,y.s)(a)&&a.offsetHeight||0,e=getComputedStyle(b),f=this.props.sizeRef.current;f.height=parseFloat(e.height),f.width=parseFloat(e.width),f.top=b.offsetTop,f.left=b.offsetLeft,f.right=c-f.width-f.left,f.bottom=d-f.height-f.top,f.direction=e.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function C({children:a,isPresent:b,anchorX:c,anchorY:d,root:f,pop:g}){let i=(0,h.useId)(),j=(0,h.useRef)(null),k=(0,h.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:l}=(0,h.useContext)(z.Q),m=function(...a){return h.useCallback(function(...a){return b=>{let c=!1,d=a.map(a=>{let d=A(a,b);return c||"function"!=typeof d||(c=!0),d});if(c)return()=>{for(let b=0;b<d.length;b++){let c=d[b];"function"==typeof c?c():A(a[b],null)}}}}(...a),a)}(j,a.props?.ref??a?.ref);return(0,h.useInsertionEffect)(()=>{let{width:a,height:e,top:h,left:m,right:n,bottom:o,direction:p}=k.current;if(b||!1===g||!j.current||!a||!e)return;let q="rtl"===p,r="left"===c?q?`right: ${n}`:`left: ${m}`:q?`left: ${m}`:`right: ${n}`,s="bottom"===d?`bottom: ${o}`:`top: ${h}`;j.current.dataset.motionPopId=i;let t=document.createElement("style");l&&(t.nonce=l);let u=f??document.head;return u.appendChild(t),t.sheet&&t.sheet.insertRule(`
|
|
2
|
+
[data-motion-pop-id="${i}"] {
|
|
3
|
+
position: absolute !important;
|
|
4
|
+
width: ${a}px !important;
|
|
5
|
+
height: ${e}px !important;
|
|
6
|
+
${r}px !important;
|
|
7
|
+
${s}px !important;
|
|
9
8
|
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
newResult[${g}] = undefined;
|
|
15
|
-
|
|
16
|
-
} else {
|
|
17
|
-
newResult[${g}] = ${c}.value;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
`):i?b.write(`
|
|
21
|
-
if (${c}.issues.length) {
|
|
22
|
-
payload.issues = payload.issues.concat(${c}.issues.map(iss => ({
|
|
23
|
-
...iss,
|
|
24
|
-
path: iss.path ? [${g}, ...iss.path] : [${g}]
|
|
25
|
-
})));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (${c}.value === undefined) {
|
|
29
|
-
if (${g} in input) {
|
|
30
|
-
newResult[${g}] = undefined;
|
|
31
|
-
}
|
|
32
|
-
} else {
|
|
33
|
-
newResult[${g}] = ${c}.value;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
`):b.write(`
|
|
37
|
-
const ${c}_present = ${g} in input;
|
|
38
|
-
if (${c}.issues.length) {
|
|
39
|
-
payload.issues = payload.issues.concat(${c}.issues.map(iss => ({
|
|
40
|
-
...iss,
|
|
41
|
-
path: iss.path ? [${g}, ...iss.path] : [${g}]
|
|
42
|
-
})));
|
|
43
|
-
}
|
|
44
|
-
if (!${c}_present && !${c}.issues.length) {
|
|
45
|
-
payload.issues.push({
|
|
46
|
-
code: "invalid_type",
|
|
47
|
-
expected: "nonoptional",
|
|
48
|
-
input: undefined,
|
|
49
|
-
path: [${g}]
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (${c}_present) {
|
|
54
|
-
if (${c}.value === undefined) {
|
|
55
|
-
newResult[${g}] = undefined;
|
|
56
|
-
} else {
|
|
57
|
-
newResult[${g}] = ${c}.value;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
`)}b.write("payload.value = newResult;"),b.write("return payload;");let h=b.compile();return(b,c)=>h(a,b,c)})(b.shape)),j=c(j,k),i)?bA([],l,j,k,d,a):j:e(j,k):(j.issues.push({expected:"object",code:"invalid_type",input:l,inst:a}),j)}});function bD(a,b,c,d){for(let c of a)if(0===c.issues.length)return b.value=c.value,b;let e=a.filter(a=>!aC(a));return 1===e.length?(b.value=e[0].value,e[0]):(b.issues.push({code:"invalid_union",input:b.value,inst:c,errors:a.map(a=>a.issues.map(a=>aF(a,d,O())))}),b)}let bE=K("$ZodUnion",(a,b)=>{a3.init(a,b),ap(a._zod,"optin",()=>b.options.some(a=>"optional"===a._zod.optin)?"optional":void 0),ap(a._zod,"optout",()=>b.options.some(a=>"optional"===a._zod.optout)?"optional":void 0),ap(a._zod,"values",()=>{if(b.options.every(a=>a._zod.values))return new Set(b.options.flatMap(a=>Array.from(a._zod.values)))}),ap(a._zod,"pattern",()=>{if(b.options.every(a=>a._zod.pattern)){let a=b.options.map(a=>a._zod.pattern);return RegExp(`^(${a.map(a=>an(a.source)).join("|")})$`)}});let c=1===b.options.length?b.options[0]._zod.run:null;a._zod.parse=(d,e)=>{if(c)return c(d,e);let f=!1,g=[];for(let a of b.options){let b=a._zod.run({value:d.value,issues:[]},e);if(b instanceof Promise)g.push(b),f=!0;else{if(0===b.issues.length)return b;g.push(b)}}return f?Promise.all(g).then(b=>bD(b,d,a,e)):bD(g,d,a,e)}}),bF=K("$ZodIntersection",(a,b)=>{a3.init(a,b),a._zod.parse=(a,c)=>{let d=a.value,e=b.left._zod.run({value:d,issues:[]},c),f=b.right._zod.run({value:d,issues:[]},c);return e instanceof Promise||f instanceof Promise?Promise.all([e,f]).then(([b,c])=>bG(a,b,c)):bG(a,e,f)}});function bG(a,b,c){let d,e=new Map;for(let c of b.issues)if("unrecognized_keys"===c.code)for(let a of(d??(d=c),c.keys))e.has(a)||e.set(a,{}),e.get(a).l=!0;else a.issues.push(c);for(let b of c.issues)if("unrecognized_keys"===b.code)for(let a of b.keys)e.has(a)||e.set(a,{}),e.get(a).r=!0;else a.issues.push(b);let f=[...e].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(f.length&&d&&a.issues.push({...d,keys:f}),aC(a))return a;let g=function a(b,c){if(b===c||b instanceof Date&&c instanceof Date&&+b==+c)return{valid:!0,data:b};if(aw(b)&&aw(c)){let d=Object.keys(c),e=Object.keys(b).filter(a=>-1!==d.indexOf(a)),f={...b,...c};for(let d of e){let e=a(b[d],c[d]);if(!e.valid)return{valid:!1,mergeErrorPath:[d,...e.mergeErrorPath]};f[d]=e.data}return{valid:!0,data:f}}if(Array.isArray(b)&&Array.isArray(c)){if(b.length!==c.length)return{valid:!1,mergeErrorPath:[]};let d=[];for(let e=0;e<b.length;e++){let f=a(b[e],c[e]);if(!f.valid)return{valid:!1,mergeErrorPath:[e,...f.mergeErrorPath]};d.push(f.data)}return{valid:!0,data:d}}return{valid:!1,mergeErrorPath:[]}}(b.value,c.value);if(!g.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(g.mergeErrorPath)}`);return a.value=g.data,a}let bH=K("$ZodEnum",(a,b)=>{a3.init(a,b);let c=ak(b.entries),d=new Set(c);a._zod.values=d,a._zod.pattern=RegExp(`^(${c.filter(a=>ay.has(typeof a)).map(a=>"string"==typeof a?az(a):a.toString()).join("|")})$`),a._zod.parse=(b,e)=>{let f=b.value;return d.has(f)||b.issues.push({code:"invalid_value",values:c,input:f,inst:a}),b}}),bI=K("$ZodTransform",(a,b)=>{a3.init(a,b),a._zod.optin="optional",a._zod.parse=(c,d)=>{if("backward"===d.direction)throw new M(a.constructor.name);let e=b.transform(c.value,c);if(d.async)return(e instanceof Promise?e:Promise.resolve(e)).then(a=>(c.value=a,c.fallback=!0,c));if(e instanceof Promise)throw new L;return c.value=e,c.fallback=!0,c}});function bJ(a,b){return void 0===b&&(a.issues.length||a.fallback)?{issues:[],value:void 0}:a}let bK=K("$ZodOptional",(a,b)=>{a3.init(a,b),a._zod.optin="optional",a._zod.optout="optional",ap(a._zod,"values",()=>b.innerType._zod.values?new Set([...b.innerType._zod.values,void 0]):void 0),ap(a._zod,"pattern",()=>{let a=b.innerType._zod.pattern;return a?RegExp(`^(${an(a.source)})?$`):void 0}),a._zod.parse=(a,c)=>{if("optional"===b.innerType._zod.optin){let d=a.value,e=b.innerType._zod.run(a,c);return e instanceof Promise?e.then(a=>bJ(a,d)):bJ(e,d)}return void 0===a.value?a:b.innerType._zod.run(a,c)}}),bL=K("$ZodExactOptional",(a,b)=>{bK.init(a,b),ap(a._zod,"values",()=>b.innerType._zod.values),ap(a._zod,"pattern",()=>b.innerType._zod.pattern),a._zod.parse=(a,c)=>b.innerType._zod.run(a,c)}),bM=K("$ZodNullable",(a,b)=>{a3.init(a,b),ap(a._zod,"optin",()=>b.innerType._zod.optin),ap(a._zod,"optout",()=>b.innerType._zod.optout),ap(a._zod,"pattern",()=>{let a=b.innerType._zod.pattern;return a?RegExp(`^(${an(a.source)}|null)$`):void 0}),ap(a._zod,"values",()=>b.innerType._zod.values?new Set([...b.innerType._zod.values,null]):void 0),a._zod.parse=(a,c)=>null===a.value?a:b.innerType._zod.run(a,c)}),bN=K("$ZodDefault",(a,b)=>{a3.init(a,b),a._zod.optin="optional",ap(a._zod,"values",()=>b.innerType._zod.values),a._zod.parse=(a,c)=>{if("backward"===c.direction)return b.innerType._zod.run(a,c);if(void 0===a.value)return a.value=b.defaultValue,a;let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(a=>bO(a,b)):bO(d,b)}});function bO(a,b){return void 0===a.value&&(a.value=b.defaultValue),a}let bP=K("$ZodPrefault",(a,b)=>{a3.init(a,b),a._zod.optin="optional",ap(a._zod,"values",()=>b.innerType._zod.values),a._zod.parse=(a,c)=>("backward"===c.direction||void 0===a.value&&(a.value=b.defaultValue),b.innerType._zod.run(a,c))}),bQ=K("$ZodNonOptional",(a,b)=>{a3.init(a,b),ap(a._zod,"values",()=>{let a=b.innerType._zod.values;return a?new Set([...a].filter(a=>void 0!==a)):void 0}),a._zod.parse=(c,d)=>{let e=b.innerType._zod.run(c,d);return e instanceof Promise?e.then(b=>bR(b,a)):bR(e,a)}});function bR(a,b){return a.issues.length||void 0!==a.value||a.issues.push({code:"invalid_type",expected:"nonoptional",input:a.value,inst:b}),a}let bS=K("$ZodCatch",(a,b)=>{a3.init(a,b),a._zod.optin="optional",ap(a._zod,"optout",()=>b.innerType._zod.optout),ap(a._zod,"values",()=>b.innerType._zod.values),a._zod.parse=(a,c)=>{if("backward"===c.direction)return b.innerType._zod.run(a,c);let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(d=>(a.value=d.value,d.issues.length&&(a.value=b.catchValue({...a,error:{issues:d.issues.map(a=>aF(a,c,O()))},input:a.value}),a.issues=[],a.fallback=!0),a)):(a.value=d.value,d.issues.length&&(a.value=b.catchValue({...a,error:{issues:d.issues.map(a=>aF(a,c,O()))},input:a.value}),a.issues=[],a.fallback=!0),a)}}),bT=K("$ZodPipe",(a,b)=>{a3.init(a,b),ap(a._zod,"values",()=>b.in._zod.values),ap(a._zod,"optin",()=>b.in._zod.optin),ap(a._zod,"optout",()=>b.out._zod.optout),ap(a._zod,"propValues",()=>b.in._zod.propValues),a._zod.parse=(a,c)=>{if("backward"===c.direction){let d=b.out._zod.run(a,c);return d instanceof Promise?d.then(a=>bU(a,b.in,c)):bU(d,b.in,c)}let d=b.in._zod.run(a,c);return d instanceof Promise?d.then(a=>bU(a,b.out,c)):bU(d,b.out,c)}});function bU(a,b,c){return a.issues.length?(a.aborted=!0,a):b._zod.run({value:a.value,issues:a.issues,fallback:a.fallback},c)}let bV=K("$ZodReadonly",(a,b)=>{a3.init(a,b),ap(a._zod,"propValues",()=>b.innerType._zod.propValues),ap(a._zod,"values",()=>b.innerType._zod.values),ap(a._zod,"optin",()=>b.innerType?._zod?.optin),ap(a._zod,"optout",()=>b.innerType?._zod?.optout),a._zod.parse=(a,c)=>{if("backward"===c.direction)return b.innerType._zod.run(a,c);let d=b.innerType._zod.run(a,c);return d instanceof Promise?d.then(bW):bW(d)}});function bW(a){return a.value=Object.freeze(a.value),a}let bX=K("$ZodCustom",(a,b)=>{aI.init(a,b),a3.init(a,b),a._zod.parse=(a,b)=>a,a._zod.check=c=>{let d=c.value,e=b.fn(d);if(e instanceof Promise)return e.then(b=>bY(b,c,d,a));bY(e,c,d,a)}});function bY(a,b,c,d){if(!a){let a={code:"custom",input:c,inst:d,path:[...d._zod.def.path??[]],continue:!d._zod.def.abort};d._zod.def.params&&(a.params=d._zod.def.params),b.issues.push(aH(a))}}Symbol("ZodOutput"),Symbol("ZodInput");class bZ{constructor(){this._map=new WeakMap,this._idmap=new Map}add(a,...b){let c=b[0];return this._map.set(a,c),c&&"object"==typeof c&&"id"in c&&this._idmap.set(c.id,a),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(a){let b=this._map.get(a);return b&&"object"==typeof b&&"id"in b&&this._idmap.delete(b.id),this._map.delete(a),this}get(a){let b=a._zod.parent;if(b){let c={...this.get(b)??{}};delete c.id;let d={...c,...this._map.get(a)};return Object.keys(d).length?d:void 0}return this._map.get(a)}has(a){return this._map.has(a)}}(f=globalThis).__zod_globalRegistry??(f.__zod_globalRegistry=new bZ);let b$=globalThis.__zod_globalRegistry;function b_(a,b){return new a({type:"string",format:"guid",check:"string_format",abort:!1,...aB(b)})}function b0(a,b){return new aJ({check:"max_length",...aB(b),maximum:a})}function b1(a,b){return new aK({check:"min_length",...aB(b),minimum:a})}function b2(a,b){return new aL({check:"length_equals",...aB(b),length:a})}function b3(a){return new aT({check:"overwrite",tx:a})}function b4(a){let b=a?.target??"draft-2020-12";return"draft-4"===b&&(b="draft-04"),"draft-7"===b&&(b="draft-07"),{processors:a.processors??{},metadataRegistry:a?.metadata??b$,target:b,unrepresentable:a?.unrepresentable??"throw",override:a?.override??(()=>{}),io:a?.io??"output",counter:0,seen:new Map,cycles:a?.cycles??"ref",reused:a?.reused??"inline",external:a?.external??void 0}}function b5(a,b,c={path:[],schemaPath:[]}){var d;let e=a._zod.def,f=b.seen.get(a);if(f)return f.count++,c.schemaPath.includes(a)&&(f.cycle=c.path),f.schema;let g={schema:{},count:1,cycle:void 0,path:c.path};b.seen.set(a,g);let h=a._zod.toJSONSchema?.();if(h)g.schema=h;else{let d={...c,schemaPath:[...c.schemaPath,a],path:c.path};if(a._zod.processJSONSchema)a._zod.processJSONSchema(b,g.schema,d);else{let c=g.schema,f=b.processors[e.type];if(!f)throw Error(`[toJSONSchema]: Non-representable type encountered: ${e.type}`);f(a,b,c,d)}let f=a._zod.parent;f&&(g.ref||(g.ref=f),b5(f,b,d),b.seen.get(f).isParent=!0)}let i=b.metadataRegistry.get(a);return i&&Object.assign(g.schema,i),"input"===b.io&&function a(b,c){let d=c??{seen:new Set};if(d.seen.has(b))return!1;d.seen.add(b);let e=b._zod.def;if("transform"===e.type)return!0;if("array"===e.type)return a(e.element,d);if("set"===e.type)return a(e.valueType,d);if("lazy"===e.type)return a(e.getter(),d);if("promise"===e.type||"optional"===e.type||"nonoptional"===e.type||"nullable"===e.type||"readonly"===e.type||"default"===e.type||"prefault"===e.type)return a(e.innerType,d);if("intersection"===e.type)return a(e.left,d)||a(e.right,d);if("record"===e.type||"map"===e.type)return a(e.keyType,d)||a(e.valueType,d);if("pipe"===e.type)return!!b._zod.traits.has("$ZodCodec")||a(e.in,d)||a(e.out,d);if("object"===e.type){for(let b in e.shape)if(a(e.shape[b],d))return!0;return!1}if("union"===e.type){for(let b of e.options)if(a(b,d))return!0;return!1}if("tuple"===e.type){for(let b of e.items)if(a(b,d))return!0;if(e.rest&&a(e.rest,d))return!0}return!1}(a)&&(delete g.schema.examples,delete g.schema.default),"input"===b.io&&"_prefault"in g.schema&&((d=g.schema).default??(d.default=g.schema._prefault)),delete g.schema._prefault,b.seen.get(a).schema}function b6(a,b){let c=a.seen.get(b);if(!c)throw Error("Unprocessed schema. This is a bug in Zod.");let d=new Map;for(let b of a.seen.entries()){let c=a.metadataRegistry.get(b[0])?.id;if(c){let a=d.get(c);if(a&&a!==b[0])throw Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);d.set(c,b[0])}}let e=b=>{if(b[1].schema.$ref)return;let d=b[1],{ref:e,defId:f}=(b=>{let d="draft-2020-12"===a.target?"$defs":"definitions";if(a.external){let c=a.external.registry.get(b[0])?.id,e=a.external.uri??(a=>a);if(c)return{ref:e(c)};let f=b[1].defId??b[1].schema.id??`schema${a.counter++}`;return b[1].defId=f,{defId:f,ref:`${e("__shared")}#/${d}/${f}`}}if(b[1]===c)return{ref:"#"};let e=`#/${d}/`,f=b[1].schema.id??`__schema${a.counter++}`;return{defId:f,ref:e+f}})(b);d.def={...d.schema},f&&(d.defId=f);let g=d.schema;for(let a in g)delete g[a];g.$ref=e};if("throw"===a.cycles)for(let b of a.seen.entries()){let a=b[1];if(a.cycle)throw Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
|
|
62
|
-
|
|
63
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let c of a.seen.entries()){let d=c[1];if(b===c[0]){e(c);continue}if(a.external){let d=a.external.registry.get(c[0])?.id;if(b!==c[0]&&d){e(c);continue}}if(a.metadataRegistry.get(c[0])?.id||d.cycle||d.count>1&&"ref"===a.reused){e(c);continue}}}function b7(a,b){let c=a.seen.get(b);if(!c)throw Error("Unprocessed schema. This is a bug in Zod.");let d=b=>{let c=a.seen.get(b);if(null===c.ref)return;let e=c.def??c.schema,f={...e},g=c.ref;if(c.ref=null,g){d(g);let c=a.seen.get(g),h=c.schema;if(h.$ref&&("draft-07"===a.target||"draft-04"===a.target||"openapi-3.0"===a.target)?(e.allOf=e.allOf??[],e.allOf.push(h)):Object.assign(e,h),Object.assign(e,f),b._zod.parent===g)for(let a in e)"$ref"!==a&&"allOf"!==a&&(a in f||delete e[a]);if(h.$ref&&c.def)for(let a in e)"$ref"!==a&&"allOf"!==a&&a in c.def&&JSON.stringify(e[a])===JSON.stringify(c.def[a])&&delete e[a]}let h=b._zod.parent;if(h&&h!==g){d(h);let b=a.seen.get(h);if(b?.schema.$ref&&(e.$ref=b.schema.$ref,b.def))for(let a in e)"$ref"!==a&&"allOf"!==a&&a in b.def&&JSON.stringify(e[a])===JSON.stringify(b.def[a])&&delete e[a]}a.override({zodSchema:b,jsonSchema:e,path:c.path??[]})};for(let b of[...a.seen.entries()].reverse())d(b[0]);let e={};if("draft-2020-12"===a.target?e.$schema="https://json-schema.org/draft/2020-12/schema":"draft-07"===a.target?e.$schema="http://json-schema.org/draft-07/schema#":"draft-04"===a.target?e.$schema="http://json-schema.org/draft-04/schema#":a.target,a.external?.uri){let c=a.external.registry.get(b)?.id;if(!c)throw Error("Schema is missing an `id` property");e.$id=a.external.uri(c)}Object.assign(e,c.def??c.schema);let f=a.metadataRegistry.get(b)?.id;void 0!==f&&e.id===f&&delete e.id;let g=a.external?.defs??{};for(let b of a.seen.entries()){let a=b[1];a.def&&a.defId&&(a.def.id===a.defId&&delete a.def.id,g[a.defId]=a.def)}a.external||Object.keys(g).length>0&&("draft-2020-12"===a.target?e.$defs=g:e.definitions=g);try{let c=JSON.parse(JSON.stringify(e));return Object.defineProperty(c,"~standard",{value:{...b["~standard"],jsonSchema:{input:b8(b,"input",a.processors),output:b8(b,"output",a.processors)}},enumerable:!1,writable:!1}),c}catch(a){throw Error("Error converting schema to JSON.")}}let b8=(a,b,c={})=>d=>{let{libraryOptions:e,target:f}=d??{},g=b4({...e??{},target:f,io:b,processors:c});return b5(a,g),b6(g,a),b7(g,a)},b9={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ca=(a,b,c,d)=>{let e=a._zod.def;b5(e.innerType,b,d),b.seen.get(a).ref=e.innerType},cb=K("ZodISODateTime",(a,b)=>{bh.init(a,b),cy.init(a,b)}),cc=K("ZodISODate",(a,b)=>{bi.init(a,b),cy.init(a,b)}),cd=K("ZodISOTime",(a,b)=>{bj.init(a,b),cy.init(a,b)}),ce=K("ZodISODuration",(a,b)=>{bk.init(a,b),cy.init(a,b)}),cf=K("ZodError",(a,b)=>{aW.init(a,b),a.name="ZodError",Object.defineProperties(a,{format:{value:b=>(function(a,b=a=>a.message){let c={_errors:[]},d=(a,e=[])=>{for(let f of a.issues)if("invalid_union"===f.code&&f.errors.length)f.errors.map(a=>d({issues:a},[...e,...f.path]));else if("invalid_key"===f.code)d({issues:f.issues},[...e,...f.path]);else if("invalid_element"===f.code)d({issues:f.issues},[...e,...f.path]);else{let a=[...e,...f.path];if(0===a.length)c._errors.push(b(f));else{let d=c,e=0;for(;e<a.length;){let c=a[e];e===a.length-1?(d[c]=d[c]||{_errors:[]},d[c]._errors.push(b(f))):d[c]=d[c]||{_errors:[]},d=d[c],e++}}}};return d(a),c})(a,b)},flatten:{value:b=>(function(a,b=a=>a.message){let c={},d=[];for(let e of a.issues)e.path.length>0?(c[e.path[0]]=c[e.path[0]]||[],c[e.path[0]].push(b(e))):d.push(b(e));return{formErrors:d,fieldErrors:c}})(a,b)},addIssue:{value:b=>{a.issues.push(b),a.message=JSON.stringify(a.issues,al,2)}},addIssues:{value:b=>{a.issues.push(...b),a.message=JSON.stringify(a.issues,al,2)}},isEmpty:{get:()=>0===a.issues.length}})},{Parent:Error}),cg=aY(cf),ch=aZ(cf),ci=a$(cf),cj=a0(cf),ck=(a,b,c)=>{let d=c?{...c,direction:"backward"}:{direction:"backward"};return aY(cf)(a,b,d)},cl=(a,b,c)=>aY(cf)(a,b,c),cm=async(a,b,c)=>{let d=c?{...c,direction:"backward"}:{direction:"backward"};return aZ(cf)(a,b,d)},cn=async(a,b,c)=>aZ(cf)(a,b,c),co=(a,b,c)=>{let d=c?{...c,direction:"backward"}:{direction:"backward"};return a$(cf)(a,b,d)},cp=(a,b,c)=>a$(cf)(a,b,c),cq=async(a,b,c)=>{let d=c?{...c,direction:"backward"}:{direction:"backward"};return a0(cf)(a,b,d)},cr=async(a,b,c)=>a0(cf)(a,b,c),cs=new WeakMap;function ct(a,b,c){let d=Object.getPrototypeOf(a),e=cs.get(d);if(e||(e=new Set,cs.set(d,e)),!e.has(b))for(let a in e.add(b),c){let b=c[a];Object.defineProperty(d,a,{configurable:!0,enumerable:!1,get(){let c=b.bind(this);return Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(b){Object.defineProperty(this,a,{configurable:!0,writable:!0,enumerable:!0,value:b})}})}}let cu=K("ZodType",(a,b)=>(a3.init(a,b),Object.assign(a["~standard"],{jsonSchema:{input:b8(a,"input"),output:b8(a,"output")}}),a.toJSONSchema=((a,b={})=>c=>{let d=b4({...c,processors:b});return b5(a,d),b6(d,a),b7(d,a)})(a,{}),a.def=b,a.type=b.type,Object.defineProperty(a,"_def",{value:b}),a.parse=(b,c)=>cg(a,b,c,{callee:a.parse}),a.safeParse=(b,c)=>ci(a,b,c),a.parseAsync=async(b,c)=>ch(a,b,c,{callee:a.parseAsync}),a.safeParseAsync=async(b,c)=>cj(a,b,c),a.spa=a.safeParseAsync,a.encode=(b,c)=>ck(a,b,c),a.decode=(b,c)=>cl(a,b,c),a.encodeAsync=async(b,c)=>cm(a,b,c),a.decodeAsync=async(b,c)=>cn(a,b,c),a.safeEncode=(b,c)=>co(a,b,c),a.safeDecode=(b,c)=>cp(a,b,c),a.safeEncodeAsync=async(b,c)=>cq(a,b,c),a.safeDecodeAsync=async(b,c)=>cr(a,b,c),ct(a,"ZodType",{check(...a){let b=this.def;return this.clone(ar(b,{checks:[...b.checks??[],...a.map(a=>"function"==typeof a?{_zod:{check:a,def:{check:"custom"},onattach:[]}}:a)]}),{parent:!0})},with(...a){return this.check(...a)},clone(a,b){return aA(this,a,b)},brand(){return this},register(a,b){return a.add(this,b),this},refine(a,b){return this.check(function(a,b={}){return new db({type:"custom",check:"custom",fn:a,...aB(b)})}(a,b))},superRefine(a,b){return this.check(function(a,b){let c=function(a,b){let c=new aI({check:"custom",...aB(b)});return c._zod.check=a,c}(b=>(b.addIssue=a=>{"string"==typeof a?b.issues.push(aH(a,b.value,c._zod.def)):(a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=b.value),a.inst??(a.inst=c),a.continue??(a.continue=!c._zod.def.abort),b.issues.push(aH(a)))},a(b.value,b)),b);return c}(a,b))},overwrite(a){return this.check(b3(a))},optional(){return c0(this)},exactOptional(){var a;return a=this,new c1({type:"optional",innerType:a})},nullable(){return c3(this)},nullish(){return c0(c3(this))},nonoptional(a){var b;return b=this,new c6({type:"nonoptional",innerType:b,...aB(a)})},array(){return function(a,b){return new cV({type:"array",element:a,...aB(void 0)})}(this)},or(a){return new cX({type:"union",options:[this,a],...aB(void 0)})},and(a){var b;return b=this,new cY({type:"intersection",left:b,right:a})},transform(a){return c9(this,new c$({type:"transform",transform:a}))},default(a){var b,c;return b=this,c=a,new c4({type:"default",innerType:b,get defaultValue(){return"function"==typeof c?c():ax(c)}})},prefault(a){var b,c;return b=this,c=a,new c5({type:"prefault",innerType:b,get defaultValue(){return"function"==typeof c?c():ax(c)}})},catch(a){var b,c;return b=this,new c7({type:"catch",innerType:b,catchValue:"function"==typeof(c=a)?c:()=>c})},pipe(a){return c9(this,a)},readonly(){var a;return a=this,new da({type:"readonly",innerType:a})},describe(a){let b=this.clone();return b$.add(b,{description:a}),b},meta(...a){if(0===a.length)return b$.get(this);let b=this.clone();return b$.add(b,a[0]),b},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(a){return a(this)}}),Object.defineProperty(a,"description",{get:()=>b$.get(a)?.description,configurable:!0}),a)),cv=K("_ZodString",(a,b)=>{a4.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{c.type="string";let{minimum:e,maximum:f,format:g,patterns:h,contentEncoding:i}=a._zod.bag;if("number"==typeof e&&(c.minLength=e),"number"==typeof f&&(c.maxLength=f),g&&(c.format=b9[g]??g,""===c.format&&delete c.format,"time"===g&&delete c.format),i&&(c.contentEncoding=i),h&&h.size>0){let a=[...h];1===a.length?c.pattern=a[0].source:a.length>1&&(c.allOf=[...a.map(a=>({..."draft-07"===b.target||"draft-04"===b.target||"openapi-3.0"===b.target?{type:"string"}:{},pattern:a.source}))])}})(a,b,c,0);let c=a._zod.bag;a.format=c.format??null,a.minLength=c.minimum??null,a.maxLength=c.maximum??null,ct(a,"_ZodString",{regex(...a){return this.check(function(a,b){return new aN({check:"string_format",format:"regex",...aB(b),pattern:a})}(...a))},includes(...a){return this.check(function(a,b){return new aQ({check:"string_format",format:"includes",...aB(b),includes:a})}(...a))},startsWith(...a){return this.check(function(a,b){return new aR({check:"string_format",format:"starts_with",...aB(b),prefix:a})}(...a))},endsWith(...a){return this.check(function(a,b){return new aS({check:"string_format",format:"ends_with",...aB(b),suffix:a})}(...a))},min(...a){return this.check(b1(...a))},max(...a){return this.check(b0(...a))},length(...a){return this.check(b2(...a))},nonempty(...a){return this.check(b1(1,...a))},lowercase(a){return this.check(new aO({check:"string_format",format:"lowercase",...aB(a)}))},uppercase(a){return this.check(new aP({check:"string_format",format:"uppercase",...aB(a)}))},trim(){return this.check(b3(a=>a.trim()))},normalize(...a){return this.check(function(a){return b3(b=>b.normalize(a))}(...a))},toLowerCase(){return this.check(b3(a=>a.toLowerCase()))},toUpperCase(){return this.check(b3(a=>a.toUpperCase()))},slugify(){return this.check(b3(a=>a.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")))}})}),cw=K("ZodString",(a,b)=>{a4.init(a,b),cv.init(a,b),a.email=b=>a.check(new cz({type:"string",format:"email",check:"string_format",abort:!1,...aB(b)})),a.url=b=>a.check(new cC({type:"string",format:"url",check:"string_format",abort:!1,...aB(b)})),a.jwt=b=>a.check(new cR({type:"string",format:"jwt",check:"string_format",abort:!1,...aB(b)})),a.emoji=b=>a.check(new cD({type:"string",format:"emoji",check:"string_format",abort:!1,...aB(b)})),a.guid=b=>a.check(b_(cA,b)),a.uuid=b=>a.check(new cB({type:"string",format:"uuid",check:"string_format",abort:!1,...aB(b)})),a.uuidv4=b=>a.check(new cB({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...aB(b)})),a.uuidv6=b=>a.check(new cB({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...aB(b)})),a.uuidv7=b=>a.check(new cB({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...aB(b)})),a.nanoid=b=>a.check(new cE({type:"string",format:"nanoid",check:"string_format",abort:!1,...aB(b)})),a.guid=b=>a.check(b_(cA,b)),a.cuid=b=>a.check(new cF({type:"string",format:"cuid",check:"string_format",abort:!1,...aB(b)})),a.cuid2=b=>a.check(new cG({type:"string",format:"cuid2",check:"string_format",abort:!1,...aB(b)})),a.ulid=b=>a.check(new cH({type:"string",format:"ulid",check:"string_format",abort:!1,...aB(b)})),a.base64=b=>a.check(new cO({type:"string",format:"base64",check:"string_format",abort:!1,...aB(b)})),a.base64url=b=>a.check(new cP({type:"string",format:"base64url",check:"string_format",abort:!1,...aB(b)})),a.xid=b=>a.check(new cI({type:"string",format:"xid",check:"string_format",abort:!1,...aB(b)})),a.ksuid=b=>a.check(new cJ({type:"string",format:"ksuid",check:"string_format",abort:!1,...aB(b)})),a.ipv4=b=>a.check(new cK({type:"string",format:"ipv4",check:"string_format",abort:!1,...aB(b)})),a.ipv6=b=>a.check(new cL({type:"string",format:"ipv6",check:"string_format",abort:!1,...aB(b)})),a.cidrv4=b=>a.check(new cM({type:"string",format:"cidrv4",check:"string_format",abort:!1,...aB(b)})),a.cidrv6=b=>a.check(new cN({type:"string",format:"cidrv6",check:"string_format",abort:!1,...aB(b)})),a.e164=b=>a.check(new cQ({type:"string",format:"e164",check:"string_format",abort:!1,...aB(b)})),a.datetime=b=>a.check(new cb({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...aB(b)})),a.date=b=>a.check(new cc({type:"string",format:"date",check:"string_format",...aB(b)})),a.time=b=>a.check(new cd({type:"string",format:"time",check:"string_format",precision:null,...aB(b)})),a.duration=b=>a.check(new ce({type:"string",format:"duration",check:"string_format",...aB(b)}))});function cx(a){return new cw({type:"string",...aB(a)})}let cy=K("ZodStringFormat",(a,b)=>{a5.init(a,b),cv.init(a,b)}),cz=K("ZodEmail",(a,b)=>{a8.init(a,b),cy.init(a,b)}),cA=K("ZodGUID",(a,b)=>{a6.init(a,b),cy.init(a,b)}),cB=K("ZodUUID",(a,b)=>{a7.init(a,b),cy.init(a,b)}),cC=K("ZodURL",(a,b)=>{a9.init(a,b),cy.init(a,b)}),cD=K("ZodEmoji",(a,b)=>{ba.init(a,b),cy.init(a,b)}),cE=K("ZodNanoID",(a,b)=>{bb.init(a,b),cy.init(a,b)}),cF=K("ZodCUID",(a,b)=>{bc.init(a,b),cy.init(a,b)}),cG=K("ZodCUID2",(a,b)=>{bd.init(a,b),cy.init(a,b)}),cH=K("ZodULID",(a,b)=>{be.init(a,b),cy.init(a,b)}),cI=K("ZodXID",(a,b)=>{bf.init(a,b),cy.init(a,b)}),cJ=K("ZodKSUID",(a,b)=>{bg.init(a,b),cy.init(a,b)}),cK=K("ZodIPv4",(a,b)=>{bl.init(a,b),cy.init(a,b)}),cL=K("ZodIPv6",(a,b)=>{bm.init(a,b),cy.init(a,b)}),cM=K("ZodCIDRv4",(a,b)=>{bn.init(a,b),cy.init(a,b)}),cN=K("ZodCIDRv6",(a,b)=>{bo.init(a,b),cy.init(a,b)}),cO=K("ZodBase64",(a,b)=>{bq.init(a,b),cy.init(a,b)}),cP=K("ZodBase64URL",(a,b)=>{br.init(a,b),cy.init(a,b)}),cQ=K("ZodE164",(a,b)=>{bs.init(a,b),cy.init(a,b)}),cR=K("ZodJWT",(a,b)=>{bt.init(a,b),cy.init(a,b)}),cS=K("ZodUnknown",(a,b)=>{bu.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{}});function cT(){return new cS({type:"unknown"})}let cU=K("ZodNever",(a,b)=>{bv.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(a,b,c)=>{b.not={}}}),cV=K("ZodArray",(a,b)=>{bx.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def,{minimum:f,maximum:g}=a._zod.bag;"number"==typeof f&&(c.minItems=f),"number"==typeof g&&(c.maxItems=g),c.type="array",c.items=b5(e.element,b,{...d,path:[...d.path,"items"]})})(a,b,c,d),a.element=b.element,ct(a,"ZodArray",{min(a,b){return this.check(b1(a,b))},nonempty(a){return this.check(b1(1,a))},max(a,b){return this.check(b0(a,b))},length(a,b){return this.check(b2(a,b))},unwrap(){return this.element}})}),cW=K("ZodObject",(a,b)=>{bC.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;c.type="object",c.properties={};let f=e.shape;for(let a in f)c.properties[a]=b5(f[a],b,{...d,path:[...d.path,"properties",a]});let g=new Set([...new Set(Object.keys(f))].filter(a=>{let c=e.shape[a]._zod;return"input"===b.io?void 0===c.optin:void 0===c.optout}));g.size>0&&(c.required=Array.from(g)),e.catchall?._zod.def.type==="never"?c.additionalProperties=!1:e.catchall?e.catchall&&(c.additionalProperties=b5(e.catchall,b,{...d,path:[...d.path,"additionalProperties"]})):"output"===b.io&&(c.additionalProperties=!1)})(a,b,c,d),ap(a,"shape",()=>b.shape),ct(a,"ZodObject",{keyof(){var a;return new cZ({type:"enum",entries:Array.isArray(a=Object.keys(this._zod.def.shape))?Object.fromEntries(a.map(a=>[a,a])):a,...aB(void 0)})},catchall(a){return this.clone({...this._zod.def,catchall:a})},passthrough(){return this.clone({...this._zod.def,catchall:cT()})},loose(){return this.clone({...this._zod.def,catchall:cT()})},strict(){return this.clone({...this._zod.def,catchall:new cU({type:"never",...aB(void 0)})})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(a){return function(a,b){if(!aw(b))throw Error("Invalid input to extend: expected a plain object");let c=a._zod.def.checks;if(c&&c.length>0){let c=a._zod.def.shape;for(let a in b)if(void 0!==Object.getOwnPropertyDescriptor(c,a))throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let d=ar(a._zod.def,{get shape(){let c={...a._zod.def.shape,...b};return aq(this,"shape",c),c}});return aA(a,d)}(this,a)},safeExtend(a){var b=this;if(!aw(a))throw Error("Invalid input to safeExtend: expected a plain object");let c=ar(b._zod.def,{get shape(){let c={...b._zod.def.shape,...a};return aq(this,"shape",c),c}});return aA(b,c)},merge(a){var b=this;if(b._zod.def.checks?.length)throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let c=ar(b._zod.def,{get shape(){let c={...b._zod.def.shape,...a._zod.def.shape};return aq(this,"shape",c),c},get catchall(){return a._zod.def.catchall},checks:a._zod.def.checks??[]});return aA(b,c)},pick(a){return function(a,b){let c=a._zod.def,d=c.checks;if(d&&d.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let e=ar(a._zod.def,{get shape(){let a={};for(let d in b){if(!(d in c.shape))throw Error(`Unrecognized key: "${d}"`);b[d]&&(a[d]=c.shape[d])}return aq(this,"shape",a),a},checks:[]});return aA(a,e)}(this,a)},omit(a){return function(a,b){let c=a._zod.def,d=c.checks;if(d&&d.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let e=ar(a._zod.def,{get shape(){let d={...a._zod.def.shape};for(let a in b){if(!(a in c.shape))throw Error(`Unrecognized key: "${a}"`);b[a]&&delete d[a]}return aq(this,"shape",d),d},checks:[]});return aA(a,e)}(this,a)},partial(...a){return function(a,b,c){let d=b._zod.def.checks;if(d&&d.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let e=ar(b._zod.def,{get shape(){let d=b._zod.def.shape,e={...d};if(c)for(let b in c){if(!(b in d))throw Error(`Unrecognized key: "${b}"`);c[b]&&(e[b]=a?new a({type:"optional",innerType:d[b]}):d[b])}else for(let b in d)e[b]=a?new a({type:"optional",innerType:d[b]}):d[b];return aq(this,"shape",e),e},checks:[]});return aA(b,e)}(c_,this,a[0])},required(...a){return function(a,b,c){let d=ar(b._zod.def,{get shape(){let d=b._zod.def.shape,e={...d};if(c)for(let b in c){if(!(b in e))throw Error(`Unrecognized key: "${b}"`);c[b]&&(e[b]=new a({type:"nonoptional",innerType:d[b]}))}else for(let b in d)e[b]=new a({type:"nonoptional",innerType:d[b]});return aq(this,"shape",e),e}});return aA(b,d)}(c6,this,a[0])}})}),cX=K("ZodUnion",(a,b)=>{bE.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def,f=!1===e.inclusive,g=e.options.map((a,c)=>b5(a,b,{...d,path:[...d.path,f?"oneOf":"anyOf",c]}));f?c.oneOf=g:c.anyOf=g})(a,b,c,d),a.options=b.options}),cY=K("ZodIntersection",(a,b)=>{bF.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def,f=b5(e.left,b,{...d,path:[...d.path,"allOf",0]}),g=b5(e.right,b,{...d,path:[...d.path,"allOf",1]}),h=a=>"allOf"in a&&1===Object.keys(a).length;c.allOf=[...h(f)?f.allOf:[f],...h(g)?g.allOf:[g]]})(a,b,c,d)}),cZ=K("ZodEnum",(a,b)=>{bH.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=ak(a._zod.def.entries);e.every(a=>"number"==typeof a)&&(c.type="number"),e.every(a=>"string"==typeof a)&&(c.type="string"),c.enum=e})(a,0,c,0),a.enum=b.entries,a.options=Object.values(b.entries);let c=new Set(Object.keys(b.entries));a.extract=(a,d)=>{let e={};for(let d of a)if(c.has(d))e[d]=b.entries[d];else throw Error(`Key ${d} not found in enum`);return new cZ({...b,checks:[],...aB(d),entries:e})},a.exclude=(a,d)=>{let e={...b.entries};for(let b of a)if(c.has(b))delete e[b];else throw Error(`Key ${b} not found in enum`);return new cZ({...b,checks:[],...aB(d),entries:e})}}),c$=K("ZodTransform",(a,b)=>{bI.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Transforms cannot be represented in JSON Schema")})(0,a,0,0),a._zod.parse=(c,d)=>{if("backward"===d.direction)throw new M(a.constructor.name);c.addIssue=d=>{"string"==typeof d?c.issues.push(aH(d,c.value,b)):(d.fatal&&(d.continue=!1),d.code??(d.code="custom"),d.input??(d.input=c.value),d.inst??(d.inst=a),c.issues.push(aH(d)))};let e=b.transform(c.value,c);return e instanceof Promise?e.then(a=>(c.value=a,c.fallback=!0,c)):(c.value=e,c.fallback=!0,c)}}),c_=K("ZodOptional",(a,b)=>{bK.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>ca(a,b,c,d),a.unwrap=()=>a._zod.def.innerType});function c0(a){return new c_({type:"optional",innerType:a})}let c1=K("ZodExactOptional",(a,b)=>{bL.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>ca(a,b,c,d),a.unwrap=()=>a._zod.def.innerType}),c2=K("ZodNullable",(a,b)=>{bM.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def,f=b5(e.innerType,b,d),g=b.seen.get(a);"openapi-3.0"===b.target?(g.ref=e.innerType,c.nullable=!0):c.anyOf=[f,{type:"null"}]})(a,b,c,d),a.unwrap=()=>a._zod.def.innerType});function c3(a){return new c2({type:"nullable",innerType:a})}let c4=K("ZodDefault",(a,b)=>{bN.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;b5(e.innerType,b,d),b.seen.get(a).ref=e.innerType,c.default=JSON.parse(JSON.stringify(e.defaultValue))})(a,b,c,d),a.unwrap=()=>a._zod.def.innerType,a.removeDefault=a.unwrap}),c5=K("ZodPrefault",(a,b)=>{bP.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;b5(e.innerType,b,d),b.seen.get(a).ref=e.innerType,"input"===b.io&&(c._prefault=JSON.parse(JSON.stringify(e.defaultValue)))})(a,b,c,d),a.unwrap=()=>a._zod.def.innerType}),c6=K("ZodNonOptional",(a,b)=>{bQ.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;b5(e.innerType,b,d),b.seen.get(a).ref=e.innerType})(a,b,0,d),a.unwrap=()=>a._zod.def.innerType}),c7=K("ZodCatch",(a,b)=>{bS.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e,f=a._zod.def;b5(f.innerType,b,d),b.seen.get(a).ref=f.innerType;try{e=f.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}c.default=e})(a,b,c,d),a.unwrap=()=>a._zod.def.innerType,a.removeCatch=a.unwrap}),c8=K("ZodPipe",(a,b)=>{bT.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def,f=e.in._zod.traits.has("$ZodTransform"),g="input"===b.io?f?e.out:e.in:e.out;b5(g,b,d),b.seen.get(a).ref=g})(a,b,0,d),a.in=b.in,a.out=b.out});function c9(a,b){return new c8({type:"pipe",in:a,out:b})}let da=K("ZodReadonly",(a,b)=>{bV.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(b,c,d)=>((a,b,c,d)=>{let e=a._zod.def;b5(e.innerType,b,d),b.seen.get(a).ref=e.innerType,c.readOnly=!0})(a,b,c,d),a.unwrap=()=>a._zod.def.innerType}),db=K("ZodCustom",(a,b)=>{bX.init(a,b),cu.init(a,b),a._zod.processJSONSchema=(a,b,c)=>((a,b,c,d)=>{if("throw"===b.unrepresentable)throw Error("Custom types cannot be represented in JSON Schema")})(0,a,0,0)});async function dc(a,b,c,d="google",e="",f="en",g,h){let i=await fetch("/api/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:a,prompt:b,apiKey:c,provider:d,model:e,language:f,baseURL:g,images:h})});if(!i.ok)throw Error((await i.json().catch(()=>({error:"Request failed"}))).error||`HTTP ${i.status}`);return(await i.json()).testCases}new cW({type:"object",shape:{title:cx().describe("Short descriptive title of the test case"),steps:cx().describe("Numbered test steps separated by newlines"),expected:cx().describe("Expected result of the test")}??{},...aB(void 0)});var dd=c(19553);async function de(a){let b=URL.createObjectURL(a),c=document.createElement("video");c.muted=!0,c.preload="auto",c.crossOrigin="anonymous",await new Promise((a,d)=>{c.onloadedmetadata=()=>a(),c.onerror=()=>d(Error("Failed to load video")),c.src=b}),await c.play().catch(()=>{}),c.pause();let d=c.duration;if(!isFinite(d)||d<=0)throw URL.revokeObjectURL(b),Error("Could not determine video duration");let e=Math.min(d<=10?4:8,Math.ceil(d)),f=[];for(let a=0;a<e;a++){let b=.1+a/e*(d-.2);f.push(Math.min(b,d-.05))}let g=document.createElement("canvas"),h=g.getContext("2d"),i=[];for(let a of f){await function(a,b){return new Promise(c=>{let d=()=>{a.removeEventListener("seeked",d),requestAnimationFrame(()=>c())};a.addEventListener("seeked",d),a.currentTime=b})}(c,a);let b=function(a,b,c){let{videoWidth:d,videoHeight:e}=a,f=d>1280?1280/d:1;return b.width=Math.round(d*f),b.height=Math.round(e*f),c.drawImage(a,0,0,b.width,b.height),b.toDataURL("image/jpeg",.82)}(c,g,h);i.push(b)}return URL.revokeObjectURL(b),{frames:i,duration:d,thumbnail:i[0]??""}}let df=["User can log in with valid credentials","Invalid input shows validation error","Form submits successfully and redirects","Edge case: empty required fields"],dg=["While you wait... have this cute cat!","Hang tight! Here's a furry friend.","Generating... enjoy this kitty!","Almost there! Cat says hi.","Test cases incoming... meow!"];function dh({open:a,onClose:b,node:c,onGenerate:d}){let{isConnected:e,activeProvider:f,activeProviderId:h}=(0,dd.P)(),[i,k]=(0,j.useState)(""),[l,m]=(0,j.useState)(""),[n,o]=(0,j.useState)("en"),[p,q]=(0,j.useState)(!1),[r,s]=(0,j.useState)(!1),[t,u]=(0,j.useState)(null),[v,w]=(0,j.useState)([]),[x,y]=(0,j.useState)(""),[z,A]=(0,j.useState)(dg[0]),[B,C]=(0,j.useState)(0),D=(0,j.useRef)(null),E=(0,j.useRef)(null),F=(0,j.useRef)(null),[G,H]=(0,j.useState)(!1),[I,J]=(0,j.useState)(!1),[K,L]=(0,j.useState)(null),[M,N]=(0,j.useState)([]),[O,P]=(0,j.useState)(new Set),[Q,R]=(0,j.useState)(!1),[S,T]=(0,j.useState)(null),U=(0,j.useCallback)(async()=>{try{let a=await fetch("https://api.thecatapi.com/v1/images/search?size=med"),b=await a.json();b?.[0]?.url&&y(b[0].url)}catch{y("")}A(dg[Math.floor(Math.random()*dg.length)])},[]),V=a=>new Promise((b,c)=>{if(!a.type.startsWith("image/"))return void c(Error("Not an image file"));if(a.size>5242880)return void c(Error("Image too large (max 5MB)"));let d=new FileReader;d.onload=()=>b(d.result),d.onerror=()=>c(Error("Failed to read file")),d.readAsDataURL(a)}),W=(0,j.useCallback)(async a=>{if(!a.type.startsWith("video/"))return void u("Not a video file");if(a.size>0x3200000)return void u("Video too large (max 50MB)");J(!0),L("Loading video...");try{let b=await de(a);if(b.duration>120){u(`Video too long (${Math.round(b.duration)}s). Max 120s.`),J(!1),L(null);return}L(`Extracted ${b.frames.length} frames. Select which to include...`),N(b.frames),P(new Set(b.frames.map((a,b)=>b))),R(!0),u(null)}catch(a){u(a instanceof Error?a.message:"Failed to process video")}finally{J(!1),L(null)}},[]),X=(0,j.useCallback)(()=>{let a=5-v.length,b=M.filter((a,b)=>O.has(b)).slice(0,a);b.length>0&&w(a=>[...a,...b]),N([]),P(new Set),R(!1)},[M,O,v.length]),Y=(0,j.useCallback)(()=>{N([]),P(new Set),R(!1)},[]),Z=(0,j.useCallback)(a=>{P(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.size<5&&c.add(a),c})},[]),$=(0,j.useCallback)(()=>{P(new Set(Array.from({length:Math.min(M.length,5)},(a,b)=>b)))},[M]),_=(0,j.useCallback)(()=>{P(new Set)},[]),aa=(0,j.useCallback)(async a=>{let b=5-v.length;if(b<=0)return void u("Maximum 5 images/frames allowed");let c=Array.from(a),d=c.filter(a=>a.type.startsWith("image/")),e=c.filter(a=>a.type.startsWith("video/")),f=d.slice(0,b),g=[];for(let a of f)try{let b=await V(a);g.push(b)}catch(a){u(a instanceof Error?a.message:"Failed to load image")}g.length>0&&(w(a=>[...a,...g]),u(null)),e.length>0&&await W(e[0])},[v.length,W]),ab=(0,j.useCallback)(a=>{w(b=>b.filter((b,c)=>c!==a))},[]),ac=(0,j.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),H(!0)},[]),ad=(0,j.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),H(!1)},[]),ae=(0,j.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),H(!1),a.dataTransfer.files.length>0&&aa(a.dataTransfer.files)},[aa]);(0,j.useCallback)(async a=>{await W(a)},[W]);let af=(0,j.useCallback)(a=>{a.target.files&&a.target.files.length>0&&(aa(a.target.files),a.target.value="")},[aa]),ag=async()=>{if(!e)return void u("Please configure an AI provider in Integrations first.");if(!l.trim()&&0===v.length)return void u("Please describe the feature, paste a ticket, or attach an image.");s(!0),u(null);try{let a=await dc(i,l,f.apiKey,h??void 0,f.defaultModel,n,f.baseURL||void 0,v.length>0?v:void 0);d(a),b()}catch(a){u(a instanceof Error?a.message:"Generation failed")}finally{s(!1)}};return a?(0,g.jsxs)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:b,children:[(0,g.jsxs)("div",{className:"flex rounded-xl overflow-hidden",style:{maxWidth:r?"720px":"512px",width:"100%",margin:"0 16px",backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",transition:"max-width 400ms cubic-bezier(0.4, 0, 0.2, 1)"},onClick:a=>a.stopPropagation(),children:[(0,g.jsxs)("div",{className:"flex-1 min-w-0",style:{maxWidth:"512px"},children:[(0,g.jsxs)("div",{className:"px-5 pt-5 pb-4 border-b",style:{borderColor:"var(--border)"},children:[(0,g.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,g.jsx)("div",{className:"w-6 h-6 rounded-md flex items-center justify-center",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)"},children:(0,g.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,g.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}),(0,g.jsx)("h3",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:"Generate Test Cases"})]}),(0,g.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["Describe the feature and let AI generate test cases for “",c.label,"”"]})]}),(0,g.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:"Test Case Title"}),(0,g.jsx)("input",{value:i,onChange:a=>k(a.target.value),className:"w-full px-3 py-2 text-sm rounded-lg outline-none border transition-colors focus:border-[var(--accent)]",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},placeholder:"Feature name..."})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:"Description / DoD / Ticket"}),(0,g.jsx)("textarea",{value:l,onChange:a=>m(a.target.value),rows:4,className:"w-full px-3 py-2 text-sm rounded-lg outline-none border resize-none transition-colors focus:border-[var(--accent)]",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},placeholder:"id"===n?"Jelaskan fitur, kriteria penerimaan, atau tempel tiket...":"Describe the feature, acceptance criteria, or paste a ticket..."}),(0,g.jsx)("div",{className:"flex flex-wrap gap-1.5 mt-2",children:df.map(a=>(0,g.jsxs)("button",{onClick:()=>m(b=>b?`${b}
|
|
64
|
-
${a}`:a),className:"px-2 py-0.5 text-[10px] rounded-full border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:["+ ",a]},a))})]}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:["Screenshots & Videos ",(0,g.jsx)("span",{className:"font-normal",style:{color:"var(--text-tertiary)"},children:"(optional)"})]}),v.length>0&&(0,g.jsx)("div",{className:"flex flex-wrap gap-2 mb-2",children:v.map((a,b)=>(0,g.jsxs)("div",{className:"relative group rounded-lg overflow-hidden border",style:{borderColor:"var(--border)",width:72,height:72},children:[(0,g.jsx)("img",{src:a,alt:`Screenshot ${b+1}`,className:"w-full h-full object-cover"}),(0,g.jsx)("button",{onClick:()=>ab(b),className:"absolute top-0.5 right-0.5 w-5 h-5 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.7)",color:"#fff"},title:"Remove",children:(0,g.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,g.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},b))}),(0,g.jsx)("div",{ref:F,onDragOver:ac,onDragLeave:ad,onDrop:ae,onClick:()=>D.current?.click(),className:"rounded-lg border-2 border-dashed cursor-pointer transition-colors",style:{borderColor:G?"var(--accent)":"var(--border)",backgroundColor:G?"var(--accent)08":"transparent",padding:v.length>0?"8px":"16px"},children:(0,g.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,g.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,g.jsx)("polyline",{points:"21 15 16 10 5 21"})]}),(0,g.jsx)("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:v.length>0?`Add more (${v.length}/5) \xb7 paste, drop, or click`:"Paste from clipboard, drop, or click to upload"})]})}),!Q&&v.length<5&&(0,g.jsx)("div",{className:"mt-2",children:I?(0,g.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg",style:{backgroundColor:"var(--bg-secondary)"},children:[(0,g.jsx)("svg",{className:"animate-spin",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",children:(0,g.jsx)("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"30 70"})}),(0,g.jsx)("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:K})]}):(0,g.jsxs)("button",{type:"button",onClick:a=>{a.stopPropagation(),E.current?.click()},className:"flex items-center gap-2 px-3 py-1.5 text-[11px] rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:[(0,g.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("polygon",{points:"23 7 16 12 23 17 23 7"}),(0,g.jsx)("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})]}),"Upload video (extract key frames)"]})}),Q&&M.length>0&&(0,g.jsxs)("div",{className:"mt-2 p-3 rounded-lg border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[(0,g.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,g.jsxs)("span",{className:"text-[11px] font-medium",style:{color:"var(--text-secondary)"},children:["Select frames ",(0,g.jsxs)("span",{style:{color:"var(--text-tertiary)"},children:["(",O.size,"/",5," max)"]})]}),(0,g.jsxs)("div",{className:"flex gap-1",children:[(0,g.jsx)("button",{type:"button",onClick:$,className:"text-[10px] px-1.5 py-0.5 rounded hover:bg-[var(--bg-card)]",style:{color:"var(--text-tertiary)"},children:"All"}),(0,g.jsx)("button",{type:"button",onClick:_,className:"text-[10px] px-1.5 py-0.5 rounded hover:bg-[var(--bg-card)]",style:{color:"var(--text-tertiary)"},children:"None"})]})]}),(0,g.jsx)("div",{className:"flex flex-wrap gap-2 mb-3",children:M.map((a,b)=>(0,g.jsxs)("div",{className:"relative group rounded-md overflow-hidden border-2 transition-all cursor-pointer",style:{width:80,height:80,borderColor:O.has(b)?"var(--accent)":"var(--border)",opacity:O.has(b)?1:.5},children:[(0,g.jsx)("button",{type:"button",onClick:()=>Z(b),className:"w-full h-full",children:(0,g.jsx)("img",{src:a,alt:`Frame ${b+1}`,className:"w-full h-full object-cover"})}),(0,g.jsx)("button",{type:"button",onClick:b=>{b.stopPropagation(),T(a)},className:"absolute top-0.5 left-0.5 w-6 h-6 rounded flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.7)",color:"#fff"},title:"Zoom",children:(0,g.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,g.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),(0,g.jsx)("line",{x1:"11",y1:"8",x2:"11",y2:"14"}),(0,g.jsx)("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})}),O.has(b)&&(0,g.jsx)("div",{className:"absolute top-0.5 right-0.5 w-5 h-5 rounded-full flex items-center justify-center",style:{backgroundColor:"var(--accent)",color:"#fff"},children:(0,g.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,g.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,g.jsx)("span",{className:"absolute bottom-0 left-0 right-0 text-center text-[9px] py-0.5",style:{backgroundColor:"rgba(0,0,0,0.6)",color:"#fff"},children:b+1})]},b))}),(0,g.jsxs)("div",{className:"flex gap-2",children:[(0,g.jsx)("button",{type:"button",onClick:Y,className:"flex-1 px-3 py-1.5 text-[11px] rounded-md border transition-colors hover:bg-[var(--bg-card)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,g.jsxs)("button",{type:"button",onClick:X,disabled:0===O.size,className:"flex-1 px-3 py-1.5 text-[11px] rounded-md transition-colors hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",style:{backgroundColor:"var(--accent)",color:"#fff"},children:["Add ",O.size," frame",1!==O.size?"s":""]})]})]}),(0,g.jsx)("input",{ref:D,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:af}),(0,g.jsx)("input",{ref:E,type:"file",accept:"video/*",className:"hidden",onChange:async a=>{let b=a.target.files?.[0];b&&(await W(b),a.target.value="")}})]}),t&&(0,g.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:t}),!e&&(0,g.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-skip-bg)",color:"var(--status-skip-text)"},children:"No AI provider configured. Go to Integrations to set up."}),(0,g.jsxs)("div",{className:"rounded-lg border overflow-hidden",style:{borderColor:"var(--border)"},children:[(0,g.jsxs)("button",{onClick:()=>q(a=>!a),className:"w-full flex items-center justify-between px-3 py-2 transition-colors hover:bg-[var(--bg-secondary)]",children:[(0,g.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-secondary)"},children:"Language"}),(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("span",{className:"text-[10px] font-mono font-semibold px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},children:"en"===n?"EN":"ID"}),(0,g.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:p?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease-out"},children:(0,g.jsx)("polyline",{points:"6 9 12 15 18 9"})})]})]}),(0,g.jsx)("div",{style:{maxHeight:p?"80px":"0px",overflow:"hidden",transition:"max-height 200ms ease-out"},children:(0,g.jsx)("div",{className:"px-3 pb-2 pt-1",children:(0,g.jsxs)("select",{value:n,onChange:a=>{o(a.target.value),q(!1)},className:"w-full px-2.5 py-1.5 text-xs rounded-md border outline-none transition-colors cursor-pointer",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},children:[(0,g.jsx)("option",{value:"en",children:"English"}),(0,g.jsx)("option",{value:"id",children:"Bahasa Indonesia"})]})})})]})]}),(0,g.jsxs)("div",{className:"px-5 py-4 border-t flex gap-2",style:{borderColor:"var(--border)"},children:[(0,g.jsx)("button",{onClick:b,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,g.jsx)("button",{onClick:ag,disabled:r||!e,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-all hover:opacity-90 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)",color:"#fff",boxShadow:"0 2px 8px rgba(141,110,99,0.3)"},children:r?(0,g.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,g.jsx)("svg",{className:"animate-spin",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,g.jsx)("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"30 70"})}),"Generating..."]}):"Generate Test Cases"})]})]}),(0,g.jsx)("div",{className:"flex-shrink-0 overflow-hidden",style:{width:r?"280px":"0px",transition:"width 400ms cubic-bezier(0.4, 0, 0.2, 1)"},children:(0,g.jsxs)("div",{className:"w-[280px] h-full flex flex-col items-center justify-center p-5 border-l",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)",opacity:+!!r,transition:"opacity 300ms ease-out 100ms"},children:[(0,g.jsx)("div",{className:"w-full rounded-xl overflow-hidden mb-4 border",style:{borderColor:"var(--border)",height:180,backgroundColor:"var(--bg-card)"},children:x&&(0,g.jsx)("img",{src:x,alt:"Cute cat",width:280,height:180,className:"w-full h-full object-cover",style:{animation:"fadeIn 800ms ease-out"},onError:a=>{a.target.style.display="none"}},B)}),(0,g.jsx)("p",{className:"text-xs text-center mb-3",style:{color:"var(--text-secondary)",animation:"fadeIn 800ms ease-out"},children:z}),(0,g.jsx)("button",{onClick:U,className:"px-3 py-1.5 text-[10px] rounded-full border transition-colors hover:bg-[var(--bg-card)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"New cat"})]})})]}),S&&(0,g.jsx)("div",{className:"fixed inset-0 z-[400] flex items-center justify-center p-8",style:{backgroundColor:"rgba(0,0,0,0.85)",animation:"fadeIn 150ms ease-out"},onClick:a=>{a.stopPropagation(),T(null)},children:(0,g.jsxs)("div",{className:"relative max-w-4xl max-h-full",onClick:a=>a.stopPropagation(),children:[(0,g.jsx)("img",{src:S,alt:"Frame preview",className:"max-w-full max-h-[80vh] object-contain rounded-lg",style:{boxShadow:"0 8px 32px rgba(0,0,0,0.5)"}}),(0,g.jsx)("button",{onClick:()=>T(null),className:"absolute -top-2 -right-2 w-8 h-8 rounded-full flex items-center justify-center transition-colors hover:opacity-80",style:{backgroundColor:"var(--bg-card)",color:"var(--text-primary)",boxShadow:"var(--shadow-lg)"},children:(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,g.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})]}):null}let di={pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)"},untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)"}};function dj({open:a,onClose:b,node:c,testCases:d,stats:e}){return a?(0,g.jsxs)("div",{style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:b,className:"jsx-540c0278eef48442 fixed inset-0 z-[300] flex items-center justify-center",children:[(0,g.jsxs)("div",{style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-lg)",animation:"fadeInUp 200ms ease-out"},onClick:a=>a.stopPropagation(),className:"jsx-540c0278eef48442 w-full max-w-lg mx-4 rounded-xl overflow-hidden",children:[(0,g.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-540c0278eef48442 px-5 pt-5 pb-4 border-b",children:[(0,g.jsxs)("div",{className:"jsx-540c0278eef48442 flex items-center justify-between mb-2",children:[(0,g.jsxs)("div",{className:"jsx-540c0278eef48442 flex items-center gap-2",children:[c.code&&(0,g.jsx)("span",{style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] font-mono px-1.5 py-0.5 rounded",children:c.code}),(0,g.jsx)("h3",{style:{color:"var(--text-primary)"},className:"jsx-540c0278eef48442 text-sm font-semibold",children:c.label})]}),(0,g.jsx)("button",{onClick:b,style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] opacity-50 hover:opacity-100",children:"\xd7"})]}),c.notes&&(0,g.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-xs",children:c.notes})]}),(0,g.jsxs)("div",{className:"jsx-540c0278eef48442 grid grid-cols-4 gap-3 p-5",children:[(0,g.jsx)(dk,{label:"Total",value:e.total}),(0,g.jsx)(dk,{label:"Pass",value:e.pass,color:"var(--status-pass-text)"}),(0,g.jsx)(dk,{label:"Fail",value:e.fail,color:"var(--status-fail-text)"}),(0,g.jsx)(dk,{label:"Untested",value:e.untested,color:"var(--status-untested-text)"})]}),(0,g.jsxs)("div",{className:"jsx-540c0278eef48442 px-5 pb-4",children:[(0,g.jsxs)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 flex items-center justify-between text-[10px] mb-1.5",children:[(0,g.jsx)("span",{className:"jsx-540c0278eef48442",children:"Pass Rate"}),(0,g.jsxs)("span",{style:{color:e.passRate>=80?"var(--status-pass-text)":e.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)",fontWeight:600},className:"jsx-540c0278eef48442",children:[e.passRate,"%"]})]}),(0,g.jsx)("div",{style:{backgroundColor:"var(--bg-secondary)"},className:"jsx-540c0278eef48442 h-2 w-full rounded-full overflow-hidden",children:(0,g.jsx)("div",{style:{width:`${e.passRate}%`,backgroundColor:e.passRate>=80?"var(--status-pass-text)":e.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)"},className:"jsx-540c0278eef48442 h-full rounded-full transition-all duration-500"})})]}),d.length>0&&(0,g.jsxs)("div",{className:"jsx-540c0278eef48442 px-5 pb-4",children:[(0,g.jsx)("h4",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] font-semibold uppercase tracking-wider mb-2",children:"Test Cases"}),(0,g.jsx)("div",{className:"jsx-540c0278eef48442 space-y-1.5 max-h-48 overflow-y-auto",children:d.map(a=>{let b=di[a.status]||di.untested;return(0,g.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-540c0278eef48442 flex items-center gap-2 px-3 py-2 rounded-lg border",children:[(0,g.jsx)("span",{style:{backgroundColor:b.bg,color:b.text},className:"jsx-540c0278eef48442 text-[9px] font-mono px-1.5 py-0.5 rounded-full flex-shrink-0",children:a.status}),(0,g.jsx)("span",{style:{color:"var(--text-primary)"},className:"jsx-540c0278eef48442 text-[11px] flex-1 truncate",children:a.title}),a.code&&(0,g.jsx)("span",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[9px] font-mono flex-shrink-0",children:a.code})]},a.id)})})]}),0===d.length&&(0,g.jsx)("div",{className:"jsx-540c0278eef48442 px-5 pb-5 text-center",children:(0,g.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-xs",children:"No test cases for this node yet."})}),(0,g.jsx)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-540c0278eef48442 px-5 py-3 border-t",children:(0,g.jsx)("button",{onClick:b,style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-540c0278eef48442 w-full px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-card)]",children:"Close"})})]}),(0,g.jsx)(i(),{id:"540c0278eef48442",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeInUp{from{opacity:0;transform:translatey(12px)}to{opacity:1;transform:translatey(0)}}"})]}):null}function dk({label:a,value:b,color:c}){return(0,g.jsxs)("div",{className:"text-center p-2 rounded-lg border",style:{borderColor:"var(--border)"},children:[(0,g.jsx)("div",{className:"text-[10px] mb-0.5",style:{color:"var(--text-tertiary)"},children:a}),(0,g.jsx)("div",{className:"text-lg font-semibold",style:{color:c??"var(--text-primary)"},children:b})]})}function dl(a){let b=[],c="",d=!1;for(let e=0;e<a.length;e++){let f=a[e];d?'"'===f?e+1<a.length&&'"'===a[e+1]?(c+='"',e++):d=!1:c+=f:'"'===f?d=!0:","===f?(b.push(c),c=""):c+=f}return b.push(c),b}function dm({open:a,onClose:b,onImport:c,nodeLabel:d}){let[e,f]=(0,j.useState)("csv"),[h,i]=(0,j.useState)(null),[k,l]=(0,j.useState)(null),[m,n]=(0,j.useState)(!1),o=(0,j.useRef)(null),p=()=>{i(null),l(null),n(!1)},q=(0,j.useCallback)(a=>{i(null),l(null);let b=new FileReader;b.onload=()=>{try{let c=b.result,d=a.name.endsWith(".json")||"application/json"===a.type?function(a){let b=JSON.parse(a),c=Array.isArray(b)?b:b.testCases||b.test_cases||b.cases;if(!Array.isArray(c))throw Error('JSON must be an array of test cases, or an object with a "testCases" array');let d=[];for(let a of c){if("string"==typeof a){a.trim()&&d.push({title:a.trim(),steps:"",expected:""});continue}if("object"!=typeof a||!a)continue;let b=a.title||a.name||a.testCase||a["test case"]||"";b&&"string"==typeof b&&d.push({title:b.trim(),steps:String(a.steps||a.instructions||"").trim(),expected:String(a.expected||a["expected result"]||a.result||"").trim()})}if(0===d.length)throw Error("No valid test cases found in JSON");return d}(c):function(a){let b=a.split("\n").map(a=>a.trim()).filter(a=>a.length>0);if(b.length<2)throw Error("CSV must have a header row and at least one data row");let c=dl(b[0]).map(a=>a.toLowerCase().trim()),d=c.findIndex(a=>"title"===a||"test case"===a||"testcase"===a||"name"===a||"test case title"===a),e=c.findIndex(a=>"steps"===a||"test steps"===a||"step"===a||"instructions"===a),f=c.findIndex(a=>"expected"===a||"expected result"===a||"expected results"===a||"result"===a);if(-1===d)throw Error('Could not find a "title" or "test case" column in the CSV header');let g=[];for(let a=1;a<b.length;a++){let c=dl(b[a]),h=(c[d]||"").trim();h&&g.push({title:h,steps:e>=0?(c[e]||"").trim():"",expected:f>=0?(c[f]||"").trim():""})}if(0===g.length)throw Error("No valid test cases found in CSV");return g}(c);l(d)}catch(a){i(a instanceof Error?a.message:"Failed to parse file")}},b.onerror=()=>i("Failed to read file"),b.readAsText(a)},[]);return a?(0,g.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>{p(),b()},children:(0,g.jsxs)("div",{className:"w-full max-w-lg mx-4 rounded-xl overflow-hidden",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)"},onClick:a=>a.stopPropagation(),children:[(0,g.jsxs)("div",{className:"px-5 pt-5 pb-4 border-b",style:{borderColor:"var(--border)"},children:[(0,g.jsx)("h3",{className:"text-sm font-semibold mb-1",style:{color:"var(--text-primary)"},children:"Import Test Cases"}),(0,g.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["Import test cases into “",d,"” from CSV or JSON"]})]}),(0,g.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,g.jsxs)("div",{className:"text-[11px] rounded-lg px-3 py-2",style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},children:[(0,g.jsx)("p",{className:"font-medium mb-1",style:{color:"var(--text-secondary)"},children:"Supported formats:"}),(0,g.jsxs)("ul",{className:"space-y-0.5 ml-3",children:[(0,g.jsxs)("li",{children:[(0,g.jsx)("strong",{children:"CSV:"})," Header row with columns: title, steps, expected (or similar names)"]}),(0,g.jsxs)("li",{children:[(0,g.jsx)("strong",{children:"JSON:"}),' Array of objects with "title", "steps", "expected" fields']})]})]}),(0,g.jsx)("div",{onDragOver:a=>{a.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:a=>{a.preventDefault(),n(!1);let b=a.dataTransfer.files[0];b&&q(b)},onClick:()=>o.current?.click(),className:"border-2 border-dashed rounded-lg cursor-pointer transition-colors py-8",style:{borderColor:m?"var(--accent)":"var(--border)",backgroundColor:m?"var(--accent)08":"transparent"},children:(0,g.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,g.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),(0,g.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,g.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),(0,g.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Drop a .csv or .json file here, or click to browse"})]})}),(0,g.jsx)("input",{ref:o,type:"file",accept:".csv,.json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];b&&q(b),a.target.value=""}}),h&&(0,g.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:h}),k&&k.length>0&&(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,g.jsxs)("span",{className:"text-xs font-medium",style:{color:"var(--text-secondary)"},children:["Preview (",k.length," test case",1!==k.length?"s":"",")"]}),(0,g.jsx)("button",{onClick:()=>l(null),className:"text-[10px] px-1.5 py-0.5 rounded border hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"Clear"})]}),(0,g.jsxs)("div",{className:"max-h-[200px] overflow-auto rounded-lg border",style:{borderColor:"var(--border)"},children:[(0,g.jsxs)("table",{className:"text-[11px] w-full",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{style:{backgroundColor:"var(--bg-secondary)"},children:[(0,g.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"#"}),(0,g.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Title"}),(0,g.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Steps"}),(0,g.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Expected"})]})}),(0,g.jsx)("tbody",{children:k.slice(0,20).map((a,b)=>(0,g.jsxs)("tr",{className:"border-t",style:{borderColor:"var(--border)"},children:[(0,g.jsx)("td",{className:"px-2 py-1",style:{color:"var(--text-tertiary)"},children:b+1}),(0,g.jsx)("td",{className:"px-2 py-1",style:{color:"var(--text-primary)"},children:a.title}),(0,g.jsx)("td",{className:"px-2 py-1 max-w-[120px] truncate",style:{color:"var(--text-secondary)"},children:a.steps||"—"}),(0,g.jsx)("td",{className:"px-2 py-1 max-w-[120px] truncate",style:{color:"var(--text-secondary)"},children:a.expected||"—"})]},b))})]}),k.length>20&&(0,g.jsxs)("div",{className:"px-2 py-1 text-[10px] border-t",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:["...and ",k.length-20," more"]})]})]})]}),(0,g.jsxs)("div",{className:"px-5 py-4 border-t flex gap-2",style:{borderColor:"var(--border)"},children:[(0,g.jsx)("button",{onClick:()=>{p(),b()},className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,g.jsxs)("button",{onClick:()=>{k&&0!==k.length&&(c(k),p(),b())},disabled:!k||0===k.length,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-all hover:opacity-90 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)",color:"#fff"},children:["Import ",k?`(${k.length})`:""]})]})]})}):null}function dn({testCases:a,projectId:b,onClose:c}){let{e2e:d,testCases:e}=(0,m.M)(),[f,h]=(0,j.useState)(d.config.baseUrl),[i,k]=(0,j.useState)(d.config.browser),[l,n]=(0,j.useState)(d.config.headless),[o,p]=(0,j.useState)(d.config.timeout),[q,r]=(0,j.useState)("runner"),[s,t]=(0,j.useState)(!1),[u,v]=(0,j.useState)(!1),[w,x]=(0,j.useState)([]),[y,z]=(0,j.useState)(null),[A,B]=(0,j.useState)([]),[C,D]=(0,j.useState)([]),[E,F]=(0,j.useState)(null),[G,H]=(0,j.useState)(!0),[I,J]=(0,j.useState)(22),[K,L]=(0,j.useState)(!0),M=(0,j.useRef)(!1),N=(0,j.useRef)(null),[O,P]=(0,j.useState)(""),[Q,R]=(0,j.useState)(!1),[S,T]=(0,j.useState)({}),[U,V]=(0,j.useState)(null),[W,X]=(0,j.useState)(""),[Y,Z]=(0,j.useState)(null),[$,_]=(0,j.useState)(null),aa=(0,j.useRef)(null),ab=(0,j.useRef)(null),[ac,ad]=(0,j.useState)(new Set(a.map(a=>a.id))),ae=(0,j.useCallback)(a=>{a.preventDefault(),M.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none";let b=a=>{if(!M.current||!N.current)return;let b=N.current.getBoundingClientRect(),c=a.clientX;J(Math.min(Math.max((b.right-c)/b.width*100,15),50))},c=()=>{M.current=!1,document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",c)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",c)},[]),af=(0,j.useCallback)((a,b)=>{B(c=>[...c,{time:new Date,type:a,message:b}]),window.setTimeout(()=>{ab.current?.scrollIntoView({behavior:"smooth"})},50)},[]),ag=(0,j.useCallback)(a=>{ad(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),ah=(0,j.useCallback)(()=>{ac.size===a.length?ad(new Set):ad(new Set(a.map(a=>a.id)))},[a,ac]),ai=(0,j.useCallback)(()=>{let a=localStorage.getItem("qa-llm-config");if(!a)return null;let b=JSON.parse(a),c=b.activeProvider;if(!c||!b.providers?.[c])return null;let d=b.providers[c];return d.apiKey&&d.connected?{provider:c,model:d.defaultModel,apiKey:d.apiKey,baseURL:d.baseURL}:null},[]),aj=(0,j.useCallback)(async()=>{let b=ai();if(!b)return void af("error","Please configure LLM in Integrations page first");v(!0),af("info","Generating test scripts...");try{let c=await fetch("/api/e2e",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:a.filter(a=>ac.has(a.id)),baseUrl:f,llmConfig:b,generateOnly:!0})});if(!c.ok)return void af("error","Failed to generate scripts");let e=await c.json();for(let[b,c]of(T(a=>({...a,...e.scripts})),Object.entries(e.scripts))){let e=a.find(a=>a.id===b);e&&d.saveScript(b,e.title,e.code,c)}af("success",`Generated ${Object.keys(e.scripts).length} test script(s)`),r("scripts")}catch(a){af("error",`Error: ${a instanceof Error?a.message:String(a)}`)}finally{v(!1)}},[a,ac,f,ai,af,d]),ak=(0,j.useCallback)(async()=>{let c=a.filter(a=>ac.has(a.id));if(0===c.length)return;let e=ai();if(!e)return void af("error","Please configure LLM in Integrations page first");t(!0),x([]),B([]),D([]),F(null),P(""),R(!1);let g=new AbortController;aa.current=g,af("info",`Starting E2E test run with ${c.length} test(s)...`),af("info",`Target: ${f}`),af("info",`Browser: ${i} | Headless: ${l}`);try{let a=await fetch("/api/e2e",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:c,baseUrl:f,browser:i,headless:l,timeout:o,llmConfig:e}),signal:g.signal});if(!a.ok){let b=await a.json();af("error",b.error||"Failed to run tests"),t(!1);return}let h=a.body?.getReader(),j=new TextDecoder,k="",m=[];if(h)for(;;){let{done:a,value:c}=await h.read();if(a)break;let e=(k+=j.decode(c,{stream:!0})).split("\n");for(let a of(k=e.pop()||"",e))if(a.startsWith("data: "))try{let c=JSON.parse(a.slice(6));switch(c.type){case"status":af("info",c.message);break;case"testStart":z({index:c.index,title:c.title}),af("info",`
|
|
65
|
-
━━━ Test ${c.index}/${c.total}: ${c.code} - ${c.title} ━━━`),c.script&&T(a=>({...a,[c.testCaseId]:c.script}));break;case"step":af("info",` → ${c.message}`);break;case"aiThinking":af("ai",` 🤖 ${c.message}`);break;case"aiAction":af("ai",` 🎯 ${c.message}`);break;case"screenshot":F(c.image),D(a=>[...a,{image:c.image,label:c.label,timestamp:new Date}]);break;case"stepResult":af("pass"===c.status?"success":"error",` ${"pass"===c.status?"✓":"✗"} ${c.message}`);break;case"healing":af("healing",` 🔧 ${c.message}`);break;case"healingAction":af("healing",` 💊 ${c.message}`);break;case"healed":af("success",` ✨ ${c.message}`);break;case"aiAnalysis":af("ai",` 📊 AI Analysis:
|
|
66
|
-
${c.message}`);break;case"error":af("error",` ⚠ ${c.message}`);break;case"healingReport":P(c.report),c.report&&!c.report.includes("All tests passed")&&R(!0);break;case"testComplete":af("pass"===c.status?"success":"error",`
|
|
67
|
-
${"pass"===c.status?"✓":"✗"} Test ${c.index} completed: ${c.status.toUpperCase()} (${c.duration}ms)`),c.script&&(T(a=>({...a,[c.testCaseId]:c.script})),d.saveScript(c.testCaseId,c.result?.testCaseTitle||"","",c.script)),m.push(c.result),x([...m]);break;case"complete":af("success","\n═══════════════════════════════════════");let e=c.results.filter(a=>"pass"===a.status).length,g=c.results.filter(a=>"fail"===a.status||"error"===a.status).length;af("success",`Test run complete: ${e} passed, ${g} failed`),d.saveRun({projectId:b,config:{baseUrl:f,browser:i,headless:l,timeout:o},results:c.results,totalPassed:e,totalFailed:g,totalDuration:c.results.reduce((a,b)=>a+b.duration,0),healingReport:O||void 0});break;case"aborted":af("warning","\n━━━ Test run stopped by user ━━━")}}catch{}}}catch(a){a instanceof Error&&"AbortError"===a.name?af("warning","\n━━━ Test run stopped by user ━━━"):af("error",`Error: ${a instanceof Error?a.message:String(a)}`)}t(!1),z(null),aa.current=null},[a,ac,f,i,l,o,af,ai,b,d,O]),al=(0,j.useCallback)(()=>{aa.current&&(af("warning","Stopping test run..."),aa.current.abort())},[af]),am=(0,j.useCallback)(()=>{if(!U||!W)return;let b=a.find(a=>a.id===U);b&&(d.saveScript(b.id,b.title,b.code,W),T(a=>({...a,[b.id]:W})),af("success",`Script saved for ${b.code}`)),V(null),X("")},[U,W,a,d,af]);return(0,g.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-2 md:p-4",style:{backgroundColor:"rgba(0,0,0,0.5)"},children:[(0,g.jsxs)("div",{className:"w-full max-w-6xl max-h-[95vh] md:max-h-[92vh] rounded-lg shadow-xl flex flex-col",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)"},children:[(0,g.jsxs)("div",{className:"flex items-center justify-between p-3 md:p-4 border-b shrink-0",style:{borderColor:"var(--border)"},children:[(0,g.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,g.jsx)("h2",{className:"text-base md:text-lg font-semibold truncate",style:{color:"var(--text-primary)"},children:"E2E Agentic Test Runner"}),(0,g.jsx)("p",{className:"text-xs mt-0.5 hidden sm:block",style:{color:"var(--text-tertiary)"},children:"AI-powered testing with script generation & live preview"})]}),(0,g.jsxs)("div",{className:"flex items-center gap-2 ml-2",children:["runner"===q&&(0,g.jsx)("button",{onClick:()=>L(!K),className:"md:hidden p-1.5 rounded",style:{backgroundColor:K?"var(--accent)":"var(--bg-secondary)",color:K?"white":"var(--text-secondary)"},title:"Toggle config panel",children:"☰"}),(0,g.jsx)("button",{onClick:c,className:"p-1 rounded hover:opacity-80",style:{color:"var(--text-tertiary)"},children:"✕"})]})]}),(0,g.jsx)("div",{className:"flex border-b overflow-x-auto shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[{id:"runner",label:"Runner",icon:"▶"},{id:"scripts",label:"Scripts",icon:"{ }"},{id:"history",label:"History",icon:"\uD83D\uDCCB"}].map(a=>(0,g.jsxs)("button",{onClick:()=>r(a.id),className:"px-3 md:px-4 py-2 text-xs flex items-center gap-1.5 transition-colors whitespace-nowrap",style:{backgroundColor:q===a.id?"var(--bg-secondary)":"transparent",color:q===a.id?"var(--accent)":"var(--text-tertiary)",borderBottom:q===a.id?"2px solid var(--accent)":"2px solid transparent"},children:[(0,g.jsx)("span",{children:a.icon}),a.label]},a.id))}),"runner"===q&&(0,g.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[(0,g.jsx)("div",{className:`${K?"max-h-[35vh] md:max-h-none":"max-h-0 md:max-h-none"} md:flex-[0_0_28%] border-b md:border-b-0 md:border-r overflow-auto transition-all duration-200 shrink-0`,style:{borderColor:"var(--border)"},children:(0,g.jsxs)("div",{className:"p-3 md:p-4 space-y-3 md:space-y-4",children:[(0,g.jsxs)("div",{className:"p-3 rounded-lg space-y-3",style:{backgroundColor:"var(--bg-secondary)",border:"1px solid var(--border)"},children:[(0,g.jsx)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Configuration"}),(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"text-xs block mb-1",style:{color:"var(--text-tertiary)"},children:"Target URL"}),(0,g.jsx)("input",{type:"url",value:f,onChange:a=>h(a.target.value),disabled:s,className:"w-full text-sm px-2 py-1.5 rounded disabled:opacity-50",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"},placeholder:"http://localhost:3000"})]}),(0,g.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"text-xs block mb-1",style:{color:"var(--text-tertiary)"},children:"Browser"}),(0,g.jsxs)("select",{value:i,onChange:a=>k(a.target.value),disabled:s,className:"w-full text-sm px-2 py-1.5 rounded disabled:opacity-50",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"},children:[(0,g.jsx)("option",{value:"chromium",children:"Chromium"}),(0,g.jsx)("option",{value:"firefox",children:"Firefox"}),(0,g.jsx)("option",{value:"webkit",children:"WebKit"}),(0,g.jsx)("option",{value:"edge",children:"Edge"})]})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{className:"text-xs block mb-1",style:{color:"var(--text-tertiary)"},children:"Timeout (ms)"}),(0,g.jsx)("input",{type:"number",value:o,onChange:a=>p(Number(a.target.value)),disabled:s,className:"w-full text-sm px-2 py-1.5 rounded disabled:opacity-50",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"}})]})]}),(0,g.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,g.jsx)("input",{type:"checkbox",checked:l,onChange:a=>n(a.target.checked),disabled:s,className:"accent-[var(--accent)]"}),(0,g.jsx)("span",{style:{color:"var(--text-secondary)"},children:"Run headless"})]})]}),(0,g.jsxs)("div",{children:[(0,g.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,g.jsxs)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:["Test Cases (",ac.size,"/",a.length,")"]}),(0,g.jsx)("button",{onClick:ah,disabled:s,className:"text-xs underline disabled:opacity-50",style:{color:"var(--accent)"},children:ac.size===a.length?"Deselect All":"Select All"})]}),(0,g.jsx)("div",{className:"max-h-[150px] md:max-h-[200px] overflow-auto rounded-lg",style:{border:"1px solid var(--border)"},children:a.map(a=>{let b=w.find(b=>b.testCaseId===a.id);return(0,g.jsxs)("label",{className:"flex items-center gap-2 px-3 py-2 text-xs border-b last:border-b-0 hover:opacity-80 cursor-pointer",style:{borderColor:"var(--border)",backgroundColor:ac.has(a.id)?"var(--bg-secondary)":"transparent"},children:[(0,g.jsx)("input",{type:"checkbox",checked:ac.has(a.id),onChange:()=>ag(a.id),disabled:s,className:"accent-[var(--accent)]"}),(0,g.jsx)("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:a.code}),b&&(0,g.jsx)("span",{style:{color:"pass"===b.status?"var(--status-pass-text)":"var(--status-fail-text)"},children:"pass"===b.status?"✓":"✗"})]},a.id)})})]}),(0,g.jsxs)("div",{className:"space-y-2",children:[(0,g.jsx)("button",{onClick:aj,disabled:s||u||0===ac.size,className:"w-full px-3 py-2 text-xs rounded flex items-center justify-center gap-2 disabled:opacity-50",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:u?"⏳ Generating...":"{ } Generate Scripts"}),O&&(0,g.jsx)("button",{onClick:()=>R(!0),className:"w-full px-3 py-2 text-xs rounded flex items-center justify-center gap-2",style:{backgroundColor:"var(--status-skip-bg)",border:"1px solid var(--status-skip-border)",color:"var(--status-skip-text)"},children:"\uD83D\uDD27 View Healing Report"})]})]})}),(0,g.jsxs)("div",{ref:N,className:"flex-1 flex flex-col overflow-hidden min-h-0",children:[(0,g.jsxs)("div",{className:"flex-1 flex flex-col md:flex-row overflow-hidden min-h-0",children:[(0,g.jsxs)("div",{className:"flex-1 flex flex-col min-h-0 max-h-[45vh] md:max-h-none",children:[(0,g.jsx)("div",{className:"p-3 border-b",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:(0,g.jsxs)("div",{className:"flex items-center justify-between",children:[(0,g.jsx)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Execution Log"}),s&&(0,g.jsxs)("div",{className:"flex items-center gap-2",children:[(0,g.jsx)("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),(0,g.jsx)("span",{className:"text-xs truncate max-w-[150px]",style:{color:"var(--text-tertiary)"},children:y?y.title:"Processing..."})]})]})}),(0,g.jsxs)("div",{className:"flex-1 overflow-auto p-3 font-mono text-xs",style:{backgroundColor:"var(--bg-primary)"},children:[0===A.length?(0,g.jsx)("div",{className:"text-center py-8",style:{color:"var(--text-tertiary)"},children:'Click "Run Tests" to start'}):A.map((a,b)=>(0,g.jsx)("div",{className:"py-0.5",style:{color:(a=>{switch(a){case"error":return"var(--status-fail-text)";case"success":return"var(--status-pass-text)";case"ai":return"#8b5cf6";case"healing":return"#f59e0b";case"warning":return"var(--status-skip-text)";default:return"var(--text-secondary)"}})(a.type)},children:a.message.split("\n").map((a,b)=>(0,g.jsx)("div",{children:a||"\xa0"},b))},b)),(0,g.jsx)("div",{ref:ab})]})]}),(0,g.jsx)("div",{className:"w-1 md:w-1.5 cursor-col-resize hover:bg-[var(--accent)] transition-colors shrink-0",style:{backgroundColor:"var(--border)"},onMouseDown:ae}),(0,g.jsxs)("div",{className:"border-t md:border-t-0 md:border-l flex flex-col transition-all duration-200",style:{borderColor:"var(--border)",maxHeight:G?"300px":"36px",minHeight:G?"200px":"36px",width:"auto",flex:G?`0 0 ${I}%`:"0 0 36px",...{}},children:[(0,g.jsxs)("div",{className:"p-2 md:p-3 border-b cursor-pointer flex items-center gap-2 shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},onClick:()=>H(!G),children:[(0,g.jsx)("span",{className:"text-sm",children:"\uD83D\uDDA5️"}),G&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("h3",{className:"text-sm font-medium flex-1",style:{color:"var(--text-primary)"},children:"Browser Preview"}),(0,g.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:C.length>0?`${C.length} screenshots`:""})]})]}),G&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{className:"flex-1 overflow-auto p-2",style:{backgroundColor:"var(--bg-secondary)"},children:E?(0,g.jsx)("img",{src:`data:image/jpeg;base64,${E}`,alt:"Browser preview",className:"w-full rounded"}):(0,g.jsx)("div",{className:"flex items-center justify-center h-full min-h-[100px] text-xs",style:{color:"#666"},children:s?"Waiting...":"Preview during execution"})}),C.length>0&&(0,g.jsx)("div",{className:"p-2 border-t overflow-x-auto flex gap-1 shrink-0",style:{borderColor:"var(--border)"},children:C.slice(-6).map((a,b)=>(0,g.jsx)("button",{onClick:()=>F(a.image),className:"flex-shrink-0 w-10 h-7 md:w-12 md:h-8 rounded overflow-hidden border",style:{border:E===a.image?"2px solid var(--accent)":"1px solid var(--border)"},title:a.label,children:(0,g.jsx)("img",{src:`data:image/jpeg;base64,${a.image}`,alt:a.label,className:"w-full h-full object-cover"})},b))})]})]})]}),w.length>0&&(0,g.jsx)("div",{className:"p-2 md:p-3 border-t shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:(0,g.jsxs)("div",{className:"flex flex-wrap gap-3 md:gap-4 text-xs md:text-sm",children:[(0,g.jsxs)("span",{style:{color:"var(--status-pass-text)"},children:["✓ ",w.filter(a=>"pass"===a.status).length]}),(0,g.jsxs)("span",{style:{color:"var(--status-fail-text)"},children:["✗ ",w.filter(a=>"fail"===a.status).length]}),(0,g.jsxs)("span",{style:{color:"var(--status-fail-text)"},children:["⚠ ",w.filter(a=>"error"===a.status).length]}),(0,g.jsxs)("span",{className:"ml-auto",style:{color:"var(--text-tertiary)"},children:[Math.round(w.reduce((a,b)=>a+b.duration,0)/1e3),"s"]})]})})]})]}),"scripts"===q&&(0,g.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[(0,g.jsx)("div",{className:"w-full md:w-64 border-b md:border-b-0 md:border-r overflow-auto max-h-[30vh] md:max-h-none",style:{borderColor:"var(--border)"},children:(0,g.jsxs)("div",{className:"p-3",children:[(0,g.jsx)("h3",{className:"text-sm font-medium mb-3",style:{color:"var(--text-primary)"},children:"Test Scripts"}),(0,g.jsx)("div",{className:"space-y-1",children:a.map(a=>{let b=!!S[a.id],c=Y===a.id;return(0,g.jsxs)("button",{onClick:()=>{Z(a.id),V(null)},className:"w-full text-left px-3 py-2 text-xs rounded flex items-center gap-2",style:{backgroundColor:c?"var(--bg-secondary)":"transparent",color:"var(--text-primary)",border:c?"1px solid var(--border)":"1px solid transparent"},children:[(0,g.jsx)("span",{className:b?"text-green-500":"text-gray-400",children:b?"✓":"○"}),(0,g.jsxs)("span",{className:"truncate",children:[a.code," - ",a.title]})]},a.id)})})]})}),(0,g.jsx)("div",{className:"flex-1 flex flex-col min-h-0 max-h-[45vh] md:max-h-none",children:Y?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("div",{className:"p-3 border-b flex items-center justify-between shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[(0,g.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,g.jsxs)("h3",{className:"text-sm font-medium truncate",style:{color:"var(--text-primary)"},children:[a.find(a=>a.id===Y)?.code," - Script"]}),(0,g.jsx)("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:U?"Editing":"Click Edit to modify"})]}),(0,g.jsx)("div",{className:"flex gap-2 ml-2",children:U?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("button",{onClick:()=>{V(null),X("")},className:"px-3 py-1.5 text-xs rounded",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,g.jsx)("button",{onClick:am,className:"px-3 py-1.5 text-xs rounded",style:{backgroundColor:"var(--accent)",color:"white"},children:"Save"})]}):(0,g.jsx)("button",{onClick:()=>{V(Y),X(S[Y]||"")},className:"px-3 py-1.5 text-xs rounded",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:"✏️ Edit"})})]}),(0,g.jsx)("div",{className:"flex-1 overflow-auto p-4",style:{backgroundColor:"#1e1e2e"},children:U?(0,g.jsx)("textarea",{value:W,onChange:a=>X(a.target.value),className:"w-full h-full min-h-[300px] font-mono text-sm p-4 rounded resize-none",style:{backgroundColor:"#1e1e2e",color:"#cdd6f4",border:"none",outline:"none"},spellCheck:!1}):S[Y]?(0,g.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap",style:{color:"#cdd6f4"},children:S[Y]}):(0,g.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[(0,g.jsx)("p",{className:"text-sm",style:{color:"#666"},children:"No script generated yet"}),(0,g.jsx)("button",{onClick:aj,disabled:u,className:"px-4 py-2 text-sm rounded disabled:opacity-50",style:{backgroundColor:"var(--accent)",color:"white"},children:u?"Generating...":"Generate Script"})]})})]}):(0,g.jsx)("div",{className:"flex-1 flex items-center justify-center p-4",children:(0,g.jsxs)("div",{className:"text-center",style:{color:"var(--text-tertiary)"},children:[(0,g.jsx)("p",{className:"text-3xl md:text-4xl mb-3"}),(0,g.jsx)("p",{className:"text-sm",children:"Select a test case to view its script"})]})})})]}),"history"===q&&(0,g.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[(0,g.jsx)("div",{className:"w-full md:w-80 border-b md:border-b-0 md:border-r overflow-auto max-h-[40vh] md:max-h-none",style:{borderColor:"var(--border)"},children:(0,g.jsxs)("div",{className:"p-3",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,g.jsxs)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:["Run History (",d.runs.length,")"]}),d.runs.length>0&&(0,g.jsx)("button",{onClick:d.clearRuns,className:"text-xs underline",style:{color:"var(--status-fail-text)"},children:"Clear All"})]}),0===d.runs.length?(0,g.jsx)("div",{className:"text-center py-8 text-xs",style:{color:"var(--text-tertiary)"},children:"No test runs yet"}):(0,g.jsx)("div",{className:"space-y-2",children:d.runs.map(a=>(0,g.jsxs)("div",{className:"p-3 rounded-lg group relative",style:{backgroundColor:$?.id===a.id?"var(--bg-secondary)":"transparent",border:$?.id===a.id?"1px solid var(--border)":"1px solid transparent"},children:[(0,g.jsxs)("button",{onClick:()=>_(a),className:"w-full text-left",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between",children:[(0,g.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:new Date(a.timestamp).toLocaleString()}),(0,g.jsxs)("span",{className:"text-xs",style:{color:a.totalFailed>0?"var(--status-fail-text)":"var(--status-pass-text)"},children:[a.totalPassed,"✓ ",a.totalFailed,"✗"]})]}),(0,g.jsxs)("div",{className:"text-xs mt-1 truncate",style:{color:"var(--text-tertiary)"},children:[a.config.baseUrl," • ",a.config.browser]})]}),(0,g.jsx)("button",{onClick:()=>{d.deleteRun(a.id),$?.id===a.id&&_(null)},className:"absolute top-2 right-2 p-1 rounded opacity-0 group-hover:opacity-100 transition-opacity",style:{color:"var(--status-fail-text)"},title:"Delete run",children:"✕"})]},a.id))})]})}),(0,g.jsx)("div",{className:"flex-1 overflow-auto",children:$?(0,g.jsxs)("div",{className:"p-4 space-y-4",children:[(0,g.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Run Details"}),(0,g.jsx)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:new Date($.timestamp).toLocaleString()})]}),(0,g.jsxs)("div",{className:"flex gap-3 text-sm",children:[(0,g.jsxs)("span",{style:{color:"var(--status-pass-text)"},children:["✓ ",$.totalPassed]}),(0,g.jsxs)("span",{style:{color:"var(--status-fail-text)"},children:["✗ ",$.totalFailed]})]})]}),(0,g.jsx)("div",{className:"space-y-2",children:$.results.map((a,b)=>(0,g.jsxs)("div",{className:"p-3 rounded-lg",style:{backgroundColor:"var(--bg-secondary)",border:`1px solid ${"pass"===a.status?"var(--status-pass-border)":"var(--status-fail-border)"}`},children:[(0,g.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,g.jsxs)("span",{className:"text-sm font-medium truncate",style:{color:"var(--text-primary)"},children:[a.testCaseCode||`Test ${b+1}`," - ",a.testCaseTitle]}),(0,g.jsx)("span",{className:"text-xs px-2 py-0.5 rounded shrink-0",style:{backgroundColor:"pass"===a.status?"var(--status-pass-bg)":"var(--status-fail-bg)",color:"pass"===a.status?"var(--status-pass-text)":"var(--status-fail-text)"},children:a.status.toUpperCase()})]}),a.error&&(0,g.jsx)("p",{className:"text-xs mt-2 p-2 rounded break-words",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:a.error}),(0,g.jsx)("div",{className:"mt-2 space-y-1",children:a.steps.map((a,b)=>(0,g.jsxs)("div",{className:"flex items-start gap-2 text-xs",children:[(0,g.jsx)("span",{className:"shrink-0",style:{color:"pass"===a.status?"var(--status-pass-text)":"var(--status-fail-text)"},children:"pass"===a.status?"✓":"✗"}),(0,g.jsx)("span",{style:{color:"var(--text-secondary)"},children:a.step})]},b))}),a.aiAnalysis&&(0,g.jsxs)("div",{className:"mt-2 p-2 rounded text-xs break-words",style:{backgroundColor:"var(--bg-primary)",color:"var(--text-secondary)"},children:[(0,g.jsx)("strong",{children:"AI:"})," ",a.aiAnalysis]})]},a.testCaseId))})]}):(0,g.jsx)("div",{className:"flex items-center justify-center h-full p-4",children:(0,g.jsxs)("div",{className:"text-center",style:{color:"var(--text-tertiary)"},children:[(0,g.jsx)("p",{className:"text-3xl md:text-4xl mb-3",children:"\uD83D\uDCCB"}),(0,g.jsx)("p",{className:"text-sm",children:"Select a run to view details"})]})})})]}),(0,g.jsxs)("div",{className:"p-3 md:p-4 border-t flex items-center justify-between shrink-0",style:{borderColor:"var(--border)"},children:[(0,g.jsxs)("div",{className:"text-xs truncate max-w-[200px] md:max-w-none",style:{color:"var(--text-tertiary)"},children:[s&&y&&(0,g.jsxs)("span",{children:["Running: ",y.title]}),!s&&w.length>0&&(0,g.jsxs)("span",{children:[w.length," tests completed"]}),!s&&0===w.length&&"runner"===q&&(0,g.jsx)("span",{className:"hidden sm:inline",children:"Config saved per project"})]}),(0,g.jsxs)("div",{className:"flex gap-2",children:[(0,g.jsx)("button",{onClick:c,disabled:s,className:"px-3 md:px-4 py-2 text-sm rounded disabled:opacity-50",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:"Close"}),"runner"===q&&(s?(0,g.jsx)("button",{onClick:al,className:"px-3 md:px-4 py-2 text-sm rounded flex items-center gap-2",style:{backgroundColor:"#ef4444",color:"white"},children:"■ Stop"}):(0,g.jsx)("button",{onClick:ak,disabled:0===ac.size,className:"px-3 md:px-4 py-2 text-sm rounded disabled:opacity-50",style:{backgroundColor:"var(--accent)",color:"white"},children:"▶ Run"}))]})]})]}),Q&&(0,g.jsx)("div",{className:"fixed inset-0 z-60 flex items-center justify-center p-4",style:{backgroundColor:"rgba(0,0,0,0.6)"},children:(0,g.jsxs)("div",{className:"w-full max-w-2xl max-h-[80vh] rounded-lg shadow-xl flex flex-col",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)"},children:[(0,g.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",style:{borderColor:"var(--border)"},children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h2",{className:"text-lg font-semibold",style:{color:"var(--text-primary)"},children:"\uD83D\uDD27 Healing Report"}),(0,g.jsx)("p",{className:"text-xs mt-1",style:{color:"var(--text-tertiary)"},children:"AI recommendations"})]}),(0,g.jsx)("button",{onClick:()=>R(!1),className:"p-1 rounded hover:opacity-80",style:{color:"var(--text-tertiary)"},children:"✕"})]}),(0,g.jsx)("div",{className:"flex-1 overflow-auto p-4",children:(0,g.jsx)("pre",{className:"whitespace-pre-wrap text-xs font-mono break-words",style:{color:"var(--text-secondary)"},children:O})}),(0,g.jsx)("div",{className:"p-4 border-t flex justify-end",style:{borderColor:"var(--border)"},children:(0,g.jsx)("button",{onClick:()=>R(!1),className:"px-4 py-2 text-sm rounded",style:{backgroundColor:"var(--accent)",color:"white"},children:"Close"})})]})})]})}let dp=c(43249).$;var dq=c(85586),dr=c(39952),ds=c(44013);let dt=40,du=60,dv=140,dw=!1,dx=(d="supports-backdrop-blur:bg-white/10 supports-backdrop-blur:dark:bg-black/10 mx-auto mt-8 flex h-[58px] w-max items-center justify-center gap-2 rounded-2xl border p-2 backdrop-blur-md",a=>dp(d,null==a?void 0:a.class,null==a?void 0:a.className)),dy=k().forwardRef(({className:a,children:b,iconSize:c=dt,iconMagnification:d=du,disableMagnification:e=dw,iconDistance:f=dv,direction:h="middle",...i},j)=>{let l=(0,dq.d)(1/0);return(0,g.jsx)(o.P.div,{ref:j,onMouseMove:a=>l.set(a.pageX),onMouseLeave:()=>l.set(1/0),...i,className:(0,p.cn)(dx({className:a}),{"items-start":"top"===h,"items-center":"middle"===h,"items-end":"bottom"===h}),children:k().Children.map(b,a=>k().isValidElement(a)&&a.type===dz?k().cloneElement(a,{...a.props,mouseX:l,size:c,magnification:d,disableMagnification:e,distance:f}):a)})});dy.displayName="Dock";let dz=({size:a=dt,magnification:b=du,disableMagnification:c,distance:d=dv,mouseX:e,className:f,children:h,...i})=>{let k=(0,j.useRef)(null),l=Math.max(6,.2*a),m=(0,dq.d)(1/0),n=(0,dr.G)(e??m,a=>{let b=k.current?.getBoundingClientRect()??{x:0,width:0};return a-b.x-b.width/2}),q=c?a:b,r=(0,dr.G)(n,[-d,0,d],[a,q,a]),s=(0,ds.z)(r,{mass:.15,stiffness:120,damping:25});return(0,g.jsx)(o.P.div,{ref:k,style:{width:s,height:s,padding:l},className:(0,p.cn)("flex aspect-square cursor-pointer items-center justify-center rounded-full",c&&"hover:bg-muted-foreground transition-colors",f),...i,children:(0,g.jsx)("div",{children:h})})};dz.displayName="DockIcon";let dA=function(a,...b){let c=new URL("https://base-ui.com/production-error");return c.searchParams.set("code",a.toString()),b.forEach(a=>c.searchParams.append("args[]",a)),`Base UI error #${a}; visit ${c} for the full message.`},dB={};function dC(a,b){let c=j.useRef(dB);return c.current===dB&&(c.current=a(b)),c}function dD(a,b,c,d){var e,f,g,h,i;let j=dC(dE).current;return e=j,f=a,g=b,h=c,i=d,(e.refs[0]!==f||e.refs[1]!==g||e.refs[2]!==h||e.refs[3]!==i)&&dF(j,[a,b,c,d]),j.callback}function dE(){return{callback:null,cleanup:null,refs:[]}}function dF(a,b){if(a.refs=b,b.every(a=>null==a)){a.callback=null;return}a.callback=c=>{if(a.cleanup&&(a.cleanup(),a.cleanup=null),null!=c){let d=Array(b.length).fill(null);for(let a=0;a<b.length;a+=1){let e=b[a];if(null!=e)switch(typeof e){case"function":{let b=e(c);"function"==typeof b&&(d[a]=b);break}case"object":e.current=c}}a.cleanup=()=>{for(let a=0;a<b.length;a+=1){let c=b[a];if(null!=c)switch(typeof c){case"function":{let b=d[a];"function"==typeof b?b():c(null);break}case"object":c.current=null}}}}}}let dG=parseInt(j.version,10);function dH(a){if(!j.isValidElement(a))return null;let b=a.props;return(dG>=19?b?.ref:a.ref)??null}function dI(a,b){return a&&!b?a:!a&&b?b:a||b?{...a,...b}:void 0}Object.freeze([]);let dJ=Object.freeze({}),dK={};function dL(a,b,c,d,e){if(!c&&!d&&!e&&!a)return dM(b);let f=dM(a);return b&&(f=dN(f,b)),c&&(f=dN(f,c)),d&&(f=dN(f,d)),e&&(f=dN(f,e)),f}function dM(a){return dP(a)?{...dQ(a,dK)}:function(a){let b={...a};for(let a in b){let c=b[a];dO(a,c)&&(b[a]=dR(c))}return b}(a)}function dN(a,b){return dP(b)?dQ(b,a):function(a,b){if(!b)return a;for(let c in b){let d=b[c];switch(c){case"style":a[c]=dI(a.style,d);break;case"className":a[c]=dT(a.className,d);break;default:dO(c,d)?a[c]=function(a,b){return b?a?(...c)=>{let d=c[0];if(dU(d)){dS(d);let e=b(...c);return d.baseUIHandlerPrevented||a?.(...c),e}let e=b(...c);return a?.(...c),e}:dR(b):a}(a[c],d):a[c]=d}}return a}(a,b)}function dO(a,b){let c=a.charCodeAt(0),d=a.charCodeAt(1),e=a.charCodeAt(2);return 111===c&&110===d&&e>=65&&e<=90&&("function"==typeof b||void 0===b)}function dP(a){return"function"==typeof a}function dQ(a,b){return dP(a)?a(b):a??dK}function dR(a){return a?(...b)=>{let c=b[0];return dU(c)&&dS(c),a(...b)}:a}function dS(a){return a.preventBaseUIHandler=()=>{a.baseUIHandlerPrevented=!0},a}function dT(a,b){return b?a?b+" "+a:b:a}function dU(a){return null!=a&&"object"==typeof a&&"nativeEvent"in a}let dV=Symbol.for("react.lazy"),dW=j.forwardRef(function(a,b){let{className:c,render:d,orientation:e="horizontal",style:f,...g}=a;return function(a,b,c={}){let d=b.render,e=function(a,b={}){let{className:c,style:d,render:e}=a,{state:f=dJ,ref:g,props:h,stateAttributesMapping:i,enabled:j=!0}=b,k=j?"function"==typeof c?c(f):c:void 0,l=j?"function"==typeof d?d(f):d:void 0,m=j?function(a,b){let c={};for(let d in a){let e=a[d];if(b?.hasOwnProperty(d)){let a=b[d](e);null!=a&&Object.assign(c,a);continue}!0===e?c[`data-${d.toLowerCase()}`]="":e&&(c[`data-${d.toLowerCase()}`]=e.toString())}return c}(f,i):dJ,n=j&&h?function(a){if(Array.isArray(a)){if(0===a.length)return dK;if(1===a.length)return dM(a[0]);let b=dM(a[0]);for(let c=1;c<a.length;c+=1)b=dN(b,a[c]);return b}return dL(void 0,a)}(h):void 0,o=j?dI(m,n)??{}:dJ;return("undefined"!=typeof document&&(j?Array.isArray(g)?o.ref=function(a){var b,c;let d=dC(dE).current;return b=d,c=a,(b.refs.length!==c.length||b.refs.some((a,b)=>a!==c[b]))&&dF(d,a),d.callback}([o.ref,dH(e),...g]):o.ref=dD(o.ref,dH(e),g):dD(null,null)),j)?(void 0!==k&&(o.className=dT(o.className,k)),void 0!==l&&(o.style=dI(o.style,l)),o):dJ}(b,c);return!1===c.enabled?null:function(a,b,c,d){if(b){if("function"==typeof b)return b(c,d);let a=dL(c,b.props);a.ref=c.ref;let e=b;return e?.$$typeof===dV&&(e=j.Children.toArray(b)[0]),j.cloneElement(e,a)}if("string"==typeof a){var e,f;return e=a,f=c,"button"===e?(0,j.createElement)("button",{type:"button",...f,key:f.key}):"img"===e?(0,j.createElement)("img",{alt:"",...f,key:f.key}):j.createElement(e,f)}throw Error(dA(8))}("div",d,e,c.state??dJ)}(0,a,{state:{orientation:e},ref:b,props:[{role:"separator","aria-orientation":e},g]})});function dX({className:a,orientation:b="horizontal",...c}){return(0,g.jsx)(dW,{"data-slot":"separator",orientation:b,className:(0,p.cn)("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",a),...c})}function dY({selectedNode:a,testCases:b,stats:c,columns:d,projectId:e,fullscreen:f,onAddTestCase:h,onUpdateTestCase:k,onDeleteTestCase:m,onBulkDelete:n,onBulkUpdate:o,onReorderTestCases:p,onReorderColumn:q,onToggleColumn:r,onRenameColumn:s,onUpdateNode:t,onAddColumn:u,onDeleteColumn:v,confirmDialog:A}){(0,l.useRouter)();let[B,C]=(0,j.useState)(!1),[D,E]=(0,j.useState)(!1),[F,K]=(0,j.useState)(!1),[L,M]=(0,j.useState)(!1),[N,O]=(0,j.useState)(!1),[P,Q]=(0,j.useState)(!1),[R,S]=(0,j.useState)(!1),[T,U]=(0,j.useState)(!1),[V,W]=(0,j.useState)(!1),[X,Y]=(0,j.useState)("all"),[Z,$]=(0,j.useState)(new Set),[_,aa]=(0,j.useState)(null),[ab,ac]=(0,j.useState)("asc"),[ad,ae]=(0,j.useState)(!1),[af,ag]=(0,j.useState)(""),ah=(0,j.useRef)(null),ai=(0,j.useRef)(null),aj=f?d:d.filter(a=>"code"!==a.key),ak=w._X.map(a=>a.key),al=(0,j.useCallback)(a=>{$(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),am="all"===X?b:b.filter(a=>a.status===X),an=(0,j.useCallback)(()=>{Z.size===am.length?$(new Set):$(new Set(am.map(a=>a.id)))},[Z.size,am]),ao=(0,j.useCallback)(()=>$(new Set),[]),ap=(0,j.useCallback)(async()=>{a&&0!==Z.size&&(!A||await A("Delete Test Cases",`Delete ${Z.size} selected test case(s)?`))&&(n(a.id,Array.from(Z)),$(new Set))},[a,Z,n,A]),aq=(0,j.useCallback)(b=>{a&&0!==Z.size&&(o(a.id,Array.from(Z),{status:b}),$(new Set))},[a,Z,o]),ar=_?[...am].sort((a,b)=>{let c=a[_]||"",d=b[_]||"",e=c.localeCompare(d);return"asc"===ab?e:-e}):am,as=(0,j.useCallback)(b=>{if(a)for(let c of b)h(a.id,c.title,c.steps,c.expected)},[a,h]),at=(0,j.useCallback)(b=>{if(a)for(let c of b)h(a.id,c.title,c.steps,c.expected)},[a,h]);return a?(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 flex flex-col h-full relative",children:[(0,g.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-bc071752c54fb059 px-4 py-3 border-b",children:[(0,g.jsx)("h2",{style:{color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 text-base font-medium mb-2",children:a.label}),(0,g.jsx)(y,{value:c.passRate}),(0,g.jsx)("div",{className:"jsx-bc071752c54fb059 flex items-center gap-1.5 mt-2",children:[["all","All"],["untested","Untested"],["pass","Pass"],["fail","Fail"],["skip","Skip"]].map(([a,c])=>{let d=X===a,e="all"===a?b.length:b.filter(b=>b.status===a).length,f={all:{bg:"var(--bg-secondary)",text:"var(--text-secondary)"},untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)"},pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)"}}[a];return(0,g.jsxs)("button",{onClick:()=>Y(a),style:{backgroundColor:d?f.bg:"transparent",color:d?f.text:"var(--text-tertiary)",borderColor:d?"transparent":"var(--border)"},className:"jsx-bc071752c54fb059 flex items-center gap-1 px-2 py-0.5 text-[10px] font-medium rounded-full border transition-colors",children:[c,(0,g.jsx)("span",{style:{backgroundColor:d?"rgba(0,0,0,0.1)":"var(--bg-secondary)",color:d?f.text:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 px-1 py-0 text-[9px] rounded-full min-w-[16px] text-center",children:e})]},a)})})]}),B&&(0,g.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-bc071752c54fb059 px-4 py-3 border-b",children:[(0,g.jsx)("label",{style:{color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 text-xs font-medium mb-1 block",children:"Node Notes"}),(0,g.jsx)("textarea",{value:a.notes??"",onChange:b=>t(a.id,{notes:b.target.value}),placeholder:"Add notes for this node...",rows:3,style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 w-full px-3 py-2 text-sm bg-transparent outline-none border resize-none"})]}),(0,g.jsx)("div",{className:"jsx-bc071752c54fb059 px-4 py-3",children:(0,g.jsx)(z,{onAdd:b=>h(a.id,b),nodeLabel:a.label})}),Z.size>0&&(0,g.jsxs)("div",{style:{borderColor:"var(--accent)",backgroundColor:"var(--accent)",animation:"fadeInUp 150ms ease-out"},className:"jsx-bc071752c54fb059 mx-4 mb-2 px-3 py-2 rounded-lg border flex items-center gap-3",children:[(0,g.jsxs)("span",{className:"jsx-bc071752c54fb059 text-xs font-medium text-white",children:[Z.size," selected"]}),(0,g.jsx)("div",{className:"jsx-bc071752c54fb059 flex-1"}),["pass","fail","skip","untested"].map(a=>(0,g.jsxs)("button",{onClick:()=>aq(a),style:{color:"#fff"},className:"jsx-bc071752c54fb059 px-2 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-white/20",children:["Mark ",a.charAt(0).toUpperCase()+a.slice(1)]},a)),(0,g.jsx)("div",{className:"jsx-bc071752c54fb059 w-px h-4 bg-white/30"}),(0,g.jsx)("button",{onClick:ap,style:{color:"#fff"},className:"jsx-bc071752c54fb059 px-2 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-white/20",children:"Delete"}),(0,g.jsx)("button",{onClick:ao,style:{color:"#fff"},title:"Clear selection",className:"jsx-bc071752c54fb059 px-1.5 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-white/20",children:"\xd7"})]}),(0,g.jsx)("div",{className:"jsx-bc071752c54fb059 flex-1 min-h-0 overflow-auto px-2",children:0===b.length?(0,g.jsx)(x.p,{message:"No test cases yet. Use the quick-add bar or Generate button to add test cases."}):(0,g.jsx)(G,{testCases:ar,columns:aj,expandAll:T,selectedIds:Z,onToggleSelect:al,onToggleSelectAll:an,sortKey:_,sortDirection:ab,onSortChange:a=>{null===a?aa(null):_===a?ac(a=>"asc"===a?"desc":"asc"):(aa(a),ac("asc"))},onUpdate:(b,c)=>k(a.id,b,c),onDelete:b=>m(a.id,b),onReorder:b=>p(a.id,b)})}),(0,g.jsx)(H,{stats:c}),(0,g.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 flex-shrink-0 border-t py-2 flex justify-center relative",children:[R&&(0,g.jsxs)("div",{ref:ai,style:{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:2,backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)",animation:"fadeInUp 200ms ease-out",width:180},className:"jsx-bc071752c54fb059 absolute z-30 rounded-xl border",children:[(0,g.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-bc071752c54fb059 flex items-center justify-between px-3 py-2 border-b",children:[(0,g.jsx)("h4",{style:{color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 text-[11px] font-semibold",children:"Columns"}),(0,g.jsx)("button",{onClick:()=>S(!1),style:{color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 text-[10px] opacity-50 hover:opacity-100",children:"\xd7"})]}),(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 py-1 max-h-[240px] overflow-y-auto",children:[aj.map((c,d)=>{let e=!ak.includes(c.key);return(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 flex items-center justify-between px-3 py-1.5 text-[11px] hover:bg-[var(--bg-secondary)] transition-colors group/col",children:[(0,g.jsxs)("button",{onClick:()=>a&&r(a.id,c.key),style:{color:c.visible?"var(--text-primary)":"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 flex items-center gap-2 flex-1 text-left",children:[(0,g.jsx)("span",{className:"jsx-bc071752c54fb059 w-3 text-center",children:c.visible?"✓":""}),(0,g.jsx)("span",{className:"jsx-bc071752c54fb059",children:c.label})]}),(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 flex items-center gap-0.5 opacity-0 group-hover/col:opacity-100 transition-opacity",children:[(0,g.jsx)("button",{onClick:()=>a&&q?.(a.id,c.key,"up"),disabled:0===d,style:{color:"var(--text-tertiary)"},title:"Move up",className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded text-[10px] disabled:opacity-20 hover:bg-[var(--bg-secondary)]",children:"↑"}),(0,g.jsx)("button",{onClick:()=>a&&q?.(a.id,c.key,"down"),disabled:d===aj.length-1,style:{color:"var(--text-tertiary)"},title:"Move down",className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded text-[10px] disabled:opacity-20 hover:bg-[var(--bg-secondary)]",children:"↓"}),e&&(0,g.jsx)("button",{onClick:async()=>{if(a&&v)(!b.some(a=>{let b=a[c.key];return b&&"string"==typeof b&&""!==b.trim()})||!A||await A("Delete Column",`This column has data in some test cases. Delete "${c.label}" anyway?`))&&v(a.id,c.key)},style:{color:"var(--status-fail-text)"},title:`Delete ${c.label}`,className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded hover:opacity-100 transition-opacity text-[10px]",children:"\xd7"})]})]},c.key)}),ad?(0,g.jsx)("div",{className:"jsx-bc071752c54fb059 px-3 py-1.5",children:(0,g.jsx)("input",{ref:ah,value:af,onChange:a=>ag(a.target.value),onKeyDown:b=>{"Enter"===b.key&&af.trim()&&(u?.(a.id,af.trim()),ag(""),ae(!1)),"Escape"===b.key&&(ae(!1),ag(""))},onBlur:()=>{af.trim()&&u?.(a.id,af.trim()),ag(""),ae(!1)},placeholder:"Column name...",style:{borderColor:"var(--accent)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 w-full px-2 py-1 text-[11px] rounded border outline-none"})}):(0,g.jsxs)("button",{onClick:()=>ae(!0),style:{color:"var(--accent)"},className:"jsx-bc071752c54fb059 w-full px-3 py-1.5 text-[11px] text-left flex items-center gap-2 hover:bg-[var(--bg-secondary)] transition-colors",children:[(0,g.jsx)("span",{className:"jsx-bc071752c54fb059 w-3 text-center",children:"+"}),(0,g.jsx)("span",{className:"jsx-bc071752c54fb059",children:"Add New Column"})]})]})]}),(0,g.jsxs)(dy,{direction:"middle",iconSize:32,iconMagnification:44,iconDistance:100,children:[(0,g.jsx)(dz,{children:(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,g.jsx)("button",{onClick:()=>M(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,g.jsx)("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("polyline",{points:"14 2 14 8 20 8",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("polyline",{points:"10 9 9 9 8 9",className:"jsx-bc071752c54fb059"})]})}),(0,g.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Node Summary"})]})}),(0,g.jsx)(dX,{orientation:"vertical",className:"h-full"}),(0,g.jsx)(dz,{children:(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,g.jsx)("button",{onClick:()=>C(!B),style:{backgroundColor:B?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:B?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,g.jsx)("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",className:"jsx-bc071752c54fb059"})]})}),(0,g.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Notes"})]})}),(0,g.jsx)(dz,{children:(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,g.jsx)("button",{onClick:()=>E(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,g.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("polyline",{points:"7 10 12 15 17 10",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("line",{x1:"12",y1:"15",x2:"12",y2:"3",className:"jsx-bc071752c54fb059"})]})}),(0,g.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Export"})]})}),(0,g.jsx)(dz,{children:(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,g.jsx)("button",{onClick:()=>{let b=(0,I.wy)(a,am,d);navigator.clipboard.writeText(b).then(()=>{W(!0),setTimeout(()=>W(!1),2e3)})},style:{backgroundColor:V?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:V?(0,g.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:(0,g.jsx)("polyline",{points:"20 6 9 17 4 12",className:"jsx-bc071752c54fb059"})}):(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,g.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1",className:"jsx-bc071752c54fb059"})]})}),(0,g.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:V?"Copied!":"Copy as Markdown"})]})}),(0,g.jsx)(dz,{children:(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,g.jsx)("button",{onClick:()=>S(!R),style:{backgroundColor:R?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:R?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,g.jsx)("rect",{x:"3",y:"3",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("rect",{x:"14",y:"3",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("rect",{x:"14",y:"14",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("rect",{x:"3",y:"14",width:"7",height:"7",className:"jsx-bc071752c54fb059"})]})}),(0,g.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Columns"})]})}),(0,g.jsx)(dz,{children:(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,g.jsx)("button",{onClick:()=>U(a=>!a),style:{backgroundColor:T?"var(--bg-secondary)":"transparent"},className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full transition-colors",children:(0,g.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:T?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:T?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("polyline",{points:"7 3 3 6 7 9",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("polyline",{points:"17 15 21 18 17 21",className:"jsx-bc071752c54fb059"})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("polyline",{points:"17 3 21 6 17 9",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("polyline",{points:"7 15 3 18 7 21",className:"jsx-bc071752c54fb059"})]})})}),(0,g.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:T?"Collapse All":"Expand All"})]})}),(0,g.jsx)(dX,{orientation:"vertical",className:"h-full"}),(0,g.jsx)(dz,{children:(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,g.jsx)("button",{onClick:()=>O(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,g.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("polyline",{points:"17 8 12 3 7 8",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15",className:"jsx-bc071752c54fb059"})]})}),(0,g.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Import Cases"})]})}),(0,g.jsx)(dz,{children:(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,g.jsx)("button",{onClick:()=>Q(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,g.jsx)("circle",{cx:"12",cy:"12",r:"10",className:"jsx-bc071752c54fb059"}),(0,g.jsx)("polyline",{points:"12 6 12 12 16 14",className:"jsx-bc071752c54fb059"})]})}),(0,g.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"E2E Test"})]})}),(0,g.jsx)(dz,{children:(0,g.jsxs)("div",{className:"jsx-bc071752c54fb059 relative group",children:[(0,g.jsx)("button",{onClick:()=>K(!0),className:"jsx-bc071752c54fb059 w-full h-full flex items-center justify-center rounded-full hover:bg-[var(--bg-secondary)] transition-colors",children:(0,g.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:(0,g.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",className:"jsx-bc071752c54fb059"})})}),(0,g.jsx)("div",{style:{backgroundColor:"var(--text-primary)",color:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 text-[10px] font-medium rounded whitespace-nowrap opacity-0 group-hover:opacity-100 transition-opacity pointer-events-none",children:"Generate"})]})})]})]}),(0,g.jsx)(J,{open:D,onClose:()=>E(!1),node:a,testCases:b,columns:d}),(0,g.jsx)(dh,{open:F,onClose:()=>K(!1),node:a,onGenerate:as}),(0,g.jsx)(dj,{open:L,onClose:()=>M(!1),node:a,testCases:b,stats:c}),(0,g.jsx)(dm,{open:N,onClose:()=>O(!1),onImport:at,nodeLabel:a.label}),P&&a&&(0,g.jsx)(dn,{testCases:b,projectId:e,onClose:()=>Q(!1)}),(0,g.jsx)(i(),{id:"bc071752c54fb059",children:"@keyframes fadeInUp{from{opacity:0;transform:translatey(8px)}to{opacity:1;transform:translatey(0)}}"})]}):(0,g.jsx)("div",{className:"h-full",children:(0,g.jsx)(x.p,{message:"Select a node from the mindmap to view its test cases."})})}function dZ({nodes:a,testCases:b,onSelectNode:c,onClose:d}){let[e,f]=(0,j.useState)(""),[h,i]=(0,j.useState)(0),k=(0,j.useRef)(null),l=(0,j.useRef)(null),m=(0,j.useMemo)(()=>{if(!e.trim())return[];let c=e.toLowerCase().trim(),d=[];for(let e of a)for(let a of b[e.id]??[]){let b=a.title.toLowerCase().includes(c),f=a.steps.toLowerCase().includes(c),g=a.expected.toLowerCase().includes(c),h=a.code.toLowerCase().includes(c);if(b||f||g||h){let b="title",c=a.title;f?(b="steps",c=a.steps):g?(b="expected",c=a.expected):h&&(b="code",c=a.code),d.push({node:e,testCase:a,matchField:b,matchText:c})}}return d},[e,a,b]),n=(0,j.useCallback)(a=>{c(a.node.id),d()},[c,d]),o=(0,j.useCallback)(a=>{"Escape"===a.key?d():"ArrowDown"===a.key?(a.preventDefault(),i(a=>Math.min(a+1,m.length-1))):"ArrowUp"===a.key?(a.preventDefault(),i(a=>Math.max(a-1,0))):"Enter"===a.key&&m.length>0&&(a.preventDefault(),n(m[h]))},[m,h,n,d]),p=(a,b)=>{if(!b.trim())return a;let c=a.toLowerCase().indexOf(b.toLowerCase());if(-1===c)return a;let d=a.slice(0,c),e=a.slice(c,c+b.length),f=a.slice(c+b.length);return(0,g.jsxs)(g.Fragment,{children:[d.length>30&&"...",d.length>30?d.slice(-30):d,(0,g.jsx)("mark",{style:{backgroundColor:"var(--accent)",color:"#fff",borderRadius:2,padding:"0 1px"},children:e}),f.slice(0,40),f.length>40&&"..."]})},q={untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)"},pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)"}};return(0,g.jsx)("div",{className:"fixed inset-0 z-[350] flex items-start justify-center pt-[15vh]",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:d,children:(0,g.jsxs)("div",{className:"w-full max-w-lg rounded-xl overflow-hidden",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)"},onClick:a=>a.stopPropagation(),children:[(0,g.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 border-b",style:{borderColor:"var(--border)"},children:[(0,g.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,g.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,g.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),(0,g.jsx)("input",{ref:k,value:e,onChange:a=>f(a.target.value),onKeyDown:o,placeholder:"Search test cases...",className:"flex-1 bg-transparent outline-none text-sm",style:{color:"var(--text-primary)"}}),(0,g.jsx)("kbd",{className:"text-[10px] px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"ESC"})]}),(0,g.jsxs)("div",{ref:l,className:"max-h-[300px] overflow-y-auto",children:[e.trim()&&0===m.length&&(0,g.jsx)("div",{className:"px-4 py-8 text-center",children:(0,g.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["No test cases found for “",e,"”"]})}),m.map((a,b)=>{let c=q[a.testCase.status]||q.untested;return(0,g.jsxs)("div",{"data-search-item":!0,className:"flex items-start gap-3 px-4 py-2.5 cursor-pointer transition-colors",style:{backgroundColor:b===h?"var(--bg-secondary)":"transparent",borderLeft:b===h?"2px solid var(--accent)":"2px solid transparent"},onClick:()=>n(a),onMouseEnter:()=>i(b),children:[(0,g.jsx)("div",{className:"w-2 h-2 rounded-full mt-1.5 flex-shrink-0",style:{backgroundColor:c.text}}),(0,g.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,g.jsx)("div",{className:"flex items-center gap-2 mb-0.5",children:(0,g.jsx)("span",{className:"text-[10px] font-mono truncate",style:{color:"var(--text-tertiary)"},children:a.node.code||a.node.label})}),(0,g.jsx)("div",{className:"text-xs font-medium truncate",style:{color:"var(--text-primary)"},children:p(a.testCase.title,e)}),"title"!==a.matchField&&(0,g.jsxs)("div",{className:"text-[11px] truncate mt-0.5",style:{color:"var(--text-tertiary)"},children:[(0,g.jsxs)("span",{className:"font-medium",style:{color:"var(--text-secondary)"},children:[a.matchField,":"]})," ",p(a.matchText,e)]})]}),(0,g.jsx)("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded-full flex-shrink-0",style:{backgroundColor:c.bg,color:c.text},children:a.testCase.status})]},`${a.node.id}-${a.testCase.id}`)})]}),e.trim()&&m.length>0&&(0,g.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2 border-t",style:{borderColor:"var(--border)"},children:[(0,g.jsxs)("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:[m.length," result",1!==m.length?"s":""]}),(0,g.jsxs)("div",{className:"flex items-center gap-1",children:[(0,g.jsx)("kbd",{className:"text-[9px] px-1 py-0.5 rounded border",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"↑↓"}),(0,g.jsx)("span",{className:"text-[9px]",style:{color:"var(--text-tertiary)"},children:"navigate"})]}),(0,g.jsxs)("div",{className:"flex items-center gap-1",children:[(0,g.jsx)("kbd",{className:"text-[9px] px-1 py-0.5 rounded border",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"↵"}),(0,g.jsx)("span",{className:"text-[9px]",style:{color:"var(--text-tertiary)"},children:"go to node"})]})]})]})})}function d$(){let a=(0,l.useParams)(),b=(0,l.useRouter)(),c=a.projectId,{projects:d,activeProject:e,activeProjectId:f,selectedNodeId:h,setSelectedNodeId:k,switchProject:n,mindmap:o,testCases:p,pushState:q,lastSaved:r,canUndo:s,canRedo:t,undo:u,redo:w,confirmDialog:y}=(0,m.M)(),z=d[c]??null;(0,j.useRef)(null);let A=f===c?e:z,B=(0,j.useMemo)(()=>A?.flows.find(a=>a.id===h)??null,[A,h]),[C,D]=(0,j.useState)("mindmap"),[E,F]=(0,j.useState)(!1),[G,H]=(0,j.useState)(.5),[I,J]=(0,j.useState)(!1),[K,L]=(0,j.useState)(!1),[M,N]=(0,j.useState)(!1),[O,P]=(0,j.useState)(!1),Q=(0,j.useRef)(null),R=(0,j.useRef)(null),S=(0,j.useRef)(null),T=(0,j.useRef)(null),U=(0,j.useRef)({mouseX:0,startRatio:.5}),V=(0,j.useCallback)(a=>{a.preventDefault(),U.current={mouseX:a.clientX,startRatio:G},J(!0)},[G]);return z?A?(0,g.jsxs)("div",{className:"jsx-a894832df36b68ca h-full flex flex-col",children:[(0,g.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},className:"jsx-a894832df36b68ca flex md:hidden border-b flex-shrink-0",children:[(0,g.jsx)("button",{onClick:()=>D("mindmap"),style:{color:"mindmap"===C?"var(--accent)":"var(--text-tertiary)",borderBottom:"mindmap"===C?"2px solid var(--accent)":"2px solid transparent"},className:"jsx-a894832df36b68ca flex-1 px-4 py-2 text-xs font-medium transition-colors",children:"Mindmap"}),(0,g.jsx)("button",{onClick:()=>D("testcases"),style:{color:"testcases"===C?"var(--accent)":"var(--text-tertiary)",borderBottom:"testcases"===C?"2px solid var(--accent)":"2px solid transparent"},className:"jsx-a894832df36b68ca flex-1 px-4 py-2 text-xs font-medium transition-colors",children:"Test Cases"})]}),(0,g.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-a894832df36b68ca flex items-center justify-between px-4 py-1.5 border-b flex-shrink-0",children:[(0,g.jsx)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-a894832df36b68ca text-[10px]",children:r?(0,g.jsxs)("span",{className:"jsx-a894832df36b68ca",children:["Last saved ",function(a){let b=new Date(a),c=Math.floor((new Date().getTime()-b.getTime())/1e3),d=Math.floor(c/60),e=Math.floor(d/60);return c<10?"just now":c<60?`${c}s ago`:d<60?`${d}m ago`:e<24?`${e}h ago`:b.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}(r)]}):(0,g.jsx)("span",{className:"jsx-a894832df36b68ca",children:"Not saved yet"})}),(0,g.jsxs)("div",{className:"jsx-a894832df36b68ca flex items-center gap-2",children:[(0,g.jsxs)("button",{onClick:()=>F(!0),style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},title:"Search test cases (Ctrl+K)",className:"jsx-a894832df36b68ca flex items-center gap-1.5 px-2 py-1 rounded-md border text-[11px] transition-colors hover:bg-[var(--bg-secondary)]",children:[(0,g.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:[(0,g.jsx)("circle",{cx:"11",cy:"11",r:"8",className:"jsx-a894832df36b68ca"}),(0,g.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65",className:"jsx-a894832df36b68ca"})]}),(0,g.jsx)("span",{className:"jsx-a894832df36b68ca hidden sm:inline",children:"Search"}),(0,g.jsx)("kbd",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-a894832df36b68ca text-[9px] px-1 py-0.5 rounded border ml-1 hidden sm:inline",children:"⌘K"})]}),(0,g.jsx)("button",{onClick:()=>N(a=>!a),style:{color:"var(--text-tertiary)"},title:M?"Exit fullscreen":"Expand test cases",className:"jsx-a894832df36b68ca p-1 rounded transition-colors hover:bg-[var(--bg-secondary)]",children:M?(0,g.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:(0,g.jsx)("path",{d:"M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3m0 18v-3a2 2 0 012-2h3M3 16h3a2 2 0 012 2v3",className:"jsx-a894832df36b68ca"})}):(0,g.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:(0,g.jsx)("path",{d:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3",className:"jsx-a894832df36b68ca"})})}),(0,g.jsx)("button",{onClick:()=>b.push(`/projects/${c}/summary`),style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-a894832df36b68ca hidden md:block px-3 py-1 text-xs font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",children:"Project Report"}),(0,g.jsx)("button",{onClick:()=>{P(!0),setTimeout(()=>P(!1),1500);let a=new Event("save-project");window.dispatchEvent(a)},style:{borderColor:O?"var(--status-pass-text)":"var(--border)",color:O?"var(--status-pass-text)":"var(--text-secondary)",backgroundColor:O?"var(--status-pass-bg)":"transparent"},className:"jsx-a894832df36b68ca px-3 py-1 text-xs font-medium rounded-md border transition-all",children:O?"Saved!":"Save"})]})]}),(0,g.jsxs)("div",{ref:Q,style:{cursor:I?"col-resize":void 0},className:"jsx-a894832df36b68ca flex-1 flex min-h-0 relative",children:[!M&&(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{ref:R,style:{width:`${100*G}%`},className:`jsx-a894832df36b68ca
|
|
68
|
-
${"mindmap"===C?"flex":"hidden"}
|
|
9
|
+
`),()=>{j.current?.removeAttribute("data-motion-pop-id"),u.contains(t)&&u.removeChild(t)}},[b]),(0,e.jsx)(B,{isPresent:b,childRef:j,sizeRef:k,pop:g,children:!1===g?a:h.cloneElement(a,{ref:m})})}let D=({children:a,initial:b,isPresent:c,onExitComplete:d,custom:f,presenceAffectsLayout:g,mode:i,anchorX:j,anchorY:k,root:l})=>{let m=(0,v.M)(E),n=(0,h.useId)(),o=!0,p=(0,h.useMemo)(()=>(o=!1,{id:n,initial:b,isPresent:c,custom:f,onExitComplete:a=>{for(let b of(m.set(a,!0),m.values()))if(!b)return;d&&d()},register:a=>(m.set(a,!1),()=>m.delete(a))}),[c,m,d]);return g&&o&&(p={...p}),(0,h.useMemo)(()=>{m.forEach((a,b)=>m.set(b,!1))},[c]),h.useEffect(()=>{c||m.size||!d||d()},[c]),a=(0,e.jsx)(C,{pop:"popLayout"===i,isPresent:c,anchorX:j,anchorY:k,root:l,children:a}),(0,e.jsx)(x.t.Provider,{value:p,children:a})};function E(){return new Map}var F=c(92323);let G=a=>a.key||"";function H(a){let b=[];return h.Children.forEach(a,a=>{(0,h.isValidElement)(a)&&b.push(a)}),b}let I=({children:a,custom:b,initial:c=!0,onExitComplete:d,presenceAffectsLayout:f=!0,mode:g="sync",propagate:i=!1,anchorX:j="left",anchorY:k="top",root:l})=>{let[m,n]=(0,F.xQ)(i),o=(0,h.useMemo)(()=>H(a),[a]),p=i&&!m?[]:o.map(G),q=(0,h.useRef)(!0),r=(0,h.useRef)(o),s=(0,v.M)(()=>new Map),t=(0,h.useRef)(new Set),[x,y]=(0,h.useState)(o),[z,A]=(0,h.useState)(o);(0,w.E)(()=>{q.current=!1,r.current=o;for(let a=0;a<z.length;a++){let b=G(z[a]);p.includes(b)?(s.delete(b),t.current.delete(b)):!0!==s.get(b)&&s.set(b,!1)}},[z,p.length,p.join("-")]);let B=[];if(o!==x){let a=[...o];for(let b=0;b<z.length;b++){let c=z[b],d=G(c);p.includes(d)||(a.splice(b,0,c),B.push(c))}return"wait"===g&&B.length&&(a=B),A(H(a)),y(o),null}let{forceRender:C}=(0,h.useContext)(u.L);return(0,e.jsx)(e.Fragment,{children:z.map(a=>{let h=G(a),u=(!i||!!m)&&(o===z||p.includes(h));return(0,e.jsx)(D,{isPresent:u,initial:(!q.current||!!c)&&void 0,custom:b,presenceAffectsLayout:f,mode:g,root:l,onExitComplete:u?void 0:()=>{if(t.current.has(h)||!s.has(h))return;t.current.add(h),s.set(h,!0);let a=!0;s.forEach(b=>{b||(a=!1)}),a&&(C?.(),A(r.current),i&&n?.(),d&&d())},anchorX:j,anchorY:k,children:a},h)})})};var J=c(19188),K=c(98457);function L({value:a,className:b=""}){let c=Math.max(0,Math.min(100,a));return(0,e.jsx)("div",{className:`h-2 w-full overflow-hidden ${b}`,style:{backgroundColor:"var(--bg-secondary)",borderRadius:"var(--radius-pill)"},children:(0,e.jsx)("div",{className:"h-full transition-all duration-150 ease-out",style:{width:`${c}%`,backgroundColor:c>=80?"var(--status-pass-text)":c>=50?"var(--status-skip-text)":"var(--status-fail-text)",borderRadius:"var(--radius-pill)"}})})}function M({onAdd:a,nodeLabel:b}){let[c,d]=(0,h.useState)(""),f=(0,h.useRef)(null),g=()=>{c.trim()&&(a(c.trim()),d(""))};return(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("input",{ref:f,value:c,onChange:a=>d(a.target.value),onKeyDown:a=>{"Enter"===a.key&&g()},placeholder:`Add test case for "${b}"...`,className:"flex-1 px-3 py-2 text-sm bg-transparent outline-none border transition-colors focus:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)"}}),(0,e.jsx)("button",{onClick:g,disabled:!c.trim(),className:"px-4 py-2 text-sm font-medium rounded-md transition-opacity hover:opacity-80 disabled:opacity-30",style:{backgroundColor:"var(--accent)",color:"var(--bg-primary)",borderRadius:"var(--radius-sm)"},children:"+ Add"})]})}let N={untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)",label:"Untested"},pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)",label:"Pass"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)",label:"Fail"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)",label:"Skip"},blocked:{bg:"var(--status-blocked-bg)",text:"var(--status-blocked-text)",label:"Blocked"}},O=["untested","pass","fail","skip","blocked"];function P({status:a,onChange:b}){let c=N[a];return(0,e.jsx)("select",{value:a,onChange:a=>b(a.target.value),className:"text-[11px] font-medium px-2 py-0.5 rounded-full border-0 outline-none cursor-pointer appearance-none",style:{backgroundColor:c.bg,color:c.text,borderRadius:"var(--radius-pill)",minWidth:72},children:O.map(a=>(0,e.jsx)("option",{value:a,children:N[a].label},a))})}function Q({tc:a,visibleCols:b,expandAll:c,selectMode:d,selected:f,onToggleSelect:g,onUpdate:i,onDelete:j,onDragStart:k,onDragOver:l,onDrop:m}){let[n,o]=(0,h.useState)(null),[p,q]=(0,h.useState)(""),[r,s]=(0,h.useState)(!1),[t,u]=(0,h.useState)(null),[v,w]=(0,h.useState)(!1),x=(0,h.useRef)(null),y=b=>{q(a[b]??""),o(b)},z=()=>{n&&(i({[n]:p}),o(null))},A=a=>{i({status:a})},B=a=>{if("Enter"===a.key&&"steps"!==n&&z(),"Escape"===a.key&&(o(null),q("")),"Tab"===a.key){a.preventDefault(),z();let c=b.filter(a=>"status"!==a.key&&"code"!==a.key).map(a=>a.key),d=c.indexOf(n),e=a.shiftKey?c[d-1]:c[d+1];e&&y(e)}},C=b=>{let c=a[b];return c&&c.length>40};return(0,e.jsx)(e.Fragment,{children:(0,e.jsxs)("tr",{className:"group transition-colors",style:{backgroundColor:f?"rgba(111,78,55,0.06)":r?"var(--bg-secondary)":"transparent"},onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),draggable:!0,onDragStart:k,onDragOver:l,onDrop:m,children:[d&&(0,e.jsx)("td",{className:"px-2 py-1.5 border-b",style:{borderColor:"var(--border)",width:28},children:(0,e.jsx)("input",{type:"checkbox",checked:f,onChange:g,className:"cursor-pointer accent-[var(--accent)]",style:{width:14,height:14}})}),b.map(b=>(0,e.jsx)("td",{className:"px-2 py-1.5 text-xs border-b",style:{borderColor:"var(--border)",color:"var(--text-primary)",maxWidth:"steps"===b.key||"expected"===b.key?300:void 0,minWidth:"code"===b.key?60:void 0},children:"status"===b.key?(0,e.jsx)(P,{status:a.status,onChange:A}):"code"===b.key?(0,e.jsx)("span",{className:"font-mono text-[10px] cursor-pointer hover:underline transition-colors",style:{color:v?"var(--accent)":"var(--text-tertiary)"},onClick:b=>{b.stopPropagation(),a.code&&navigator.clipboard.writeText(a.code).then(()=>{w(!0),setTimeout(()=>w(!1),1500)})},title:"Click to copy",children:v?"Copied!":a.code||"—"}):"case_type"===b.key?(0,e.jsx)(S,{value:a.case_type||"General",onChange:a=>i({case_type:a})}):n===b.key?"steps"===b.key||"expected"===b.key||"notes"===b.key||"links"===b.key?(0,e.jsx)("textarea",{ref:x,value:p,onChange:a=>q(a.target.value),onBlur:z,onKeyDown:B,className:"w-full bg-transparent outline-none border rounded p-1 text-xs resize-none",style:{borderColor:"var(--accent)",color:"var(--text-primary)",minHeight:60},rows:3}):(0,e.jsx)("input",{ref:x,value:p,onChange:a=>q(a.target.value),onBlur:z,onKeyDown:B,className:"w-full bg-transparent outline-none border-b text-xs",style:{borderColor:"var(--accent)",color:"var(--text-primary)"}}):"links"===b.key?(0,e.jsxs)("div",{className:"flex flex-col gap-0.5",children:[a.links?a.links.split(",").map((b,c)=>{let d=b.trim();return d?(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("a",{href:d,target:"_blank",rel:"noopener noreferrer",className:"text-[11px] underline hover:opacity-80 transition-opacity",style:{color:"var(--accent)"},onClick:a=>a.stopPropagation(),children:d.length>30?d.slice(0,30)+"...":d}),(0,e.jsx)("button",{onClick:b=>{b.stopPropagation(),i({links:a.links.split(",").map(a=>a.trim()).filter(a=>a!==d).join(", ")})},className:"text-[10px] opacity-0 group-hover:opacity-100 hover:opacity-100 transition-opacity px-0.5",style:{color:"var(--status-fail-text)"},title:"Remove link",children:"\xd7"})]},c):null}):null,(0,e.jsx)("span",{className:"cursor-text text-[11px] opacity-0 group-hover:opacity-100 transition-opacity",onClick:()=>y(b.key),style:{color:"var(--text-tertiary)"},children:a.links?"+ Add link":"Add link..."})]}):(0,e.jsx)("span",{className:"cursor-text block",onClick:()=>{C(b.key)&&(t===b.key?u(null):u(b.key))},onDoubleClick:()=>y(b.key),title:C(b.key)?t===b.key||c?"Click to collapse \xb7 Double-click to edit":"Click to expand \xb7 Double-click to edit":"Double-click to edit",style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:t===b.key||c&&C(b.key)?"pre-wrap":"nowrap",display:"block",maxHeight:t===b.key||c&&C(b.key)?"none":"1.2em",lineHeight:"1.2em"},children:a[b.key]||(0,e.jsx)("span",{style:{color:"var(--text-tertiary)"},children:"—"})})},b.key)),(0,e.jsx)("td",{className:"px-1 py-1.5 border-b",style:{borderColor:"var(--border)"},children:r&&(0,e.jsx)("button",{onClick:j,className:"text-[10px] opacity-50 hover:opacity-100 transition-opacity px-0.5",style:{color:"var(--status-fail-text)"},children:"\xd7"})})]})})}let R={Positive:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},Negative:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},General:{bg:"var(--bg-secondary)",text:"var(--text-tertiary)"}};function S({value:a,onChange:b}){let c=R[a]||R.General;return(0,e.jsx)("select",{value:a,onChange:a=>b(a.target.value),className:"text-[10px] font-medium px-2 py-0.5 rounded-full border-0 outline-none cursor-pointer",style:{backgroundColor:c.bg,color:c.text},children:J.D_.map(a=>(0,e.jsx)("option",{value:a,children:a},a))})}function T({testCases:a,columns:b,expandAll:c,selectMode:d,selectedIds:f,onToggleSelect:g,onToggleSelectAll:i,sortKey:j,sortDirection:k,onSortChange:l,onUpdate:m,onDelete:n,onReorder:o,onAddColumn:p,onOpenColumns:q}){let[r,s]=(0,h.useState)(!1),[t,u]=(0,h.useState)(""),v=(0,h.useRef)(null),w=()=>{t.trim()&&p&&p(t.trim()),u(""),s(!1)},x=b.filter(a=>a.visible),y=a.length>0&&a.every(a=>f.has(a.id)),z=a.some(a=>f.has(a.id)),A=a=>{a.preventDefault(),a.dataTransfer.dropEffect="move"};return 0===a.length?null:(0,e.jsx)("div",{className:"overflow-x-auto",style:{minWidth:0},children:(0,e.jsxs)("table",{className:"text-xs",style:{minWidth:"900px",width:"100%"},children:[(0,e.jsx)("thead",{className:"sticky top-0 z-10",style:{backgroundColor:"var(--bg-primary)"},children:(0,e.jsxs)("tr",{children:[d&&(0,e.jsx)("th",{className:"px-2 py-1.5 border-b",style:{borderColor:"var(--border)",width:28},children:(0,e.jsx)("input",{type:"checkbox",checked:y,ref:a=>{a&&(a.indeterminate=z&&!y)},onChange:i,className:"cursor-pointer accent-[var(--accent)]",style:{width:14,height:14}})}),x.map(a=>(0,e.jsx)("th",{className:"px-2 py-1.5 text-left text-[10px] font-medium uppercase tracking-wider border-b cursor-pointer select-none hover:bg-[var(--bg-secondary)] transition-colors",style:{color:"var(--text-tertiary)",borderColor:"var(--border)",whiteSpace:"nowrap",minWidth:"code"===a.key?60:void 0},onClick:()=>l(a.key),children:(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("span",{children:a.label}),j===a.key&&(0,e.jsx)("span",{className:"text-[8px]",children:"asc"===k?"↑":"↓"})]})},a.key)),(0,e.jsx)("th",{className:"w-8 border-b",style:{borderColor:"var(--border)"},children:r?(0,e.jsx)("input",{ref:v,value:t,onChange:a=>u(a.target.value),onKeyDown:a=>{"Enter"===a.key&&w(),"Escape"===a.key&&(s(!1),u(""))},onBlur:w,placeholder:"Name...",className:"w-16 px-1 py-0.5 text-[10px] rounded border outline-none",style:{borderColor:"var(--accent)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"}}):(0,e.jsx)("button",{onClick:()=>s(!0),className:"w-5 h-5 flex items-center justify-center rounded text-[10px] transition-colors hover:bg-[var(--bg-secondary)]",style:{color:"var(--text-tertiary)"},title:"Add column",children:"+"})})]})}),(0,e.jsx)("tbody",{children:a.map(b=>(0,e.jsx)(Q,{tc:b,visibleCols:x,expandAll:c,selectMode:d,selected:f.has(b.id),onToggleSelect:()=>g(b.id),onUpdate:a=>m(b.id,a),onDelete:()=>n(b.id),onDragStart:a=>{var c;return c=b.id,void(a.dataTransfer.setData("text/plain",c),a.dataTransfer.effectAllowed="move")},onDragOver:A,onDrop:c=>((b,c)=>{b.preventDefault();let d=b.dataTransfer.getData("text/plain");if(d===c)return;let e=a.map(a=>a.id),f=e.indexOf(d),g=e.indexOf(c);if(-1===f||-1===g)return;let h=[...e];h.splice(f,1),h.splice(g,0,d),o(h)})(c,b.id)},b.id))})]})})}function U({stats:a,fullscreen:b,nodes:c,allTestCases:d,selectedNodeId:f,onSelectNode:g}){let[i,j]=(0,h.useState)(!1),k=(0,h.useRef)(null);return(0,e.jsxs)("div",{className:"flex items-center gap-4 px-4 py-2 text-xs border-t flex-wrap relative",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:[(0,e.jsxs)("span",{children:["Total: ",(0,e.jsx)("strong",{style:{color:"var(--text-primary)"},children:a.total})]}),(0,e.jsxs)("span",{children:["Pass: ",(0,e.jsx)("strong",{style:{color:"var(--status-pass-text)"},children:a.pass}),a.total>0&&` (${a.passRate}%)`]}),(0,e.jsxs)("span",{children:["Fail: ",(0,e.jsx)("strong",{style:{color:"var(--status-fail-text)"},children:a.fail})]}),(0,e.jsxs)("span",{children:["Skip: ",(0,e.jsx)("strong",{style:{color:"var(--status-skip-text)"},children:a.skip})]}),(0,e.jsxs)("span",{children:["Untested: ",(0,e.jsx)("strong",{style:{color:"var(--status-untested-text)"},children:a.untested})]}),(0,e.jsxs)("span",{children:["Blocked: ",(0,e.jsx)("strong",{style:{color:"var(--status-blocked-text)"},children:a.blocked})]}),b&&c&&c.length>0&&(0,e.jsxs)("div",{className:"ml-auto relative",ref:k,children:[(0,e.jsxs)("button",{onClick:()=>j(a=>!a),className:"flex items-center gap-1.5 px-2 py-1 text-[10px] font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:[(0,e.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,e.jsx)("polyline",{points:"8 12 12 16 16 12"}),(0,e.jsx)("line",{x1:"12",y1:"8",x2:"12",y2:"16"})]}),c.find(a=>a.id===f)?.label||"Jump to node",(0,e.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:i?"rotate(180deg)":"none",transition:"transform 150ms"},children:(0,e.jsx)("polyline",{points:"6 9 12 15 18 9"})})]}),i&&(0,e.jsx)("div",{className:"absolute z-50 bottom-full right-0 mb-1 w-56 max-h-[240px] overflow-y-auto rounded-lg border",style:{backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)",animation:"fadeInUp 150ms ease-out"},children:c.map(a=>{let b=d?.[a.id]??[],c=a.id===f,h=b.filter(a=>"pass"===a.status).length,i=b.filter(a=>"fail"===a.status).length;return(0,e.jsxs)("button",{onClick:()=>{g?.(a.id),j(!1)},className:"w-full flex items-center justify-between px-3 py-2 text-[11px] text-left transition-colors hover:bg-[var(--bg-secondary)]",style:{backgroundColor:c?"var(--bg-secondary)":"transparent",borderLeft:c?"2px solid var(--accent)":"2px solid transparent"},children:[(0,e.jsx)("span",{className:"truncate font-medium",style:{color:c?"var(--accent)":"var(--text-primary)"},children:a.label}),(0,e.jsx)("span",{className:"flex items-center gap-1.5 flex-shrink-0 ml-2",children:b.length>0&&(0,e.jsxs)(e.Fragment,{children:[i>0&&(0,e.jsxs)("span",{style:{color:"var(--status-fail-text)",fontSize:9},children:[i,"f"]}),h>0&&(0,e.jsxs)("span",{style:{color:"var(--status-pass-text)",fontSize:9},children:[h,"p"]}),(0,e.jsx)("span",{className:"font-mono",style:{color:"var(--text-tertiary)",fontSize:9},children:b.length})]})})]},a.id)})})]})]})}var V=c(22858);function W({open:a,onClose:b,node:c,testCases:d,columns:f}){let g=f&&f.length>0?f:J._X;return a?(0,e.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:b,children:(0,e.jsxs)("div",{className:"w-full max-w-sm mx-4 rounded-xl p-5",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-lg)"},onClick:a=>a.stopPropagation(),children:[(0,e.jsx)("h3",{className:"text-sm font-semibold mb-1",style:{color:"var(--text-primary)"},children:"Export Test Cases"}),(0,e.jsxs)("p",{className:"text-xs mb-4",style:{color:"var(--text-tertiary)"},children:["Export “",c.label,"” (",d.length," case",1!==d.length?"s":"",")"]}),(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,e.jsxs)("button",{onClick:()=>{(0,V.k5)(c,d,g),b()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,e.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Markdown (.md)"}),(0,e.jsx)("br",{}),(0,e.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Formatted table for documentation"})]}),(0,e.jsxs)("button",{onClick:()=>{(0,V.hX)(c,d),b()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,e.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"JSON (.json)"}),(0,e.jsx)("br",{}),(0,e.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Structured data backup"})]}),(0,e.jsxs)("button",{onClick:()=>{(0,V.Rz)(c,d,g),b()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,e.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"CSV (.csv)"}),(0,e.jsx)("br",{}),(0,e.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Spreadsheet-compatible format"})]}),(0,e.jsxs)("button",{onClick:async()=>{await (0,V.G$)(c,d,g),b()},className:"w-full text-left px-4 py-3 text-sm rounded-lg border transition-colors hover:border-[var(--border-hover)]",style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)"},children:[(0,e.jsx)("span",{className:"font-medium",style:{color:"var(--text-primary)"},children:"Excel (.xlsx)"}),(0,e.jsx)("br",{}),(0,e.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Styled spreadsheet for reporting"})]})]}),(0,e.jsx)("button",{onClick:b,className:"w-full mt-3 px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"})]})}):null}var X=c(36427),Y=c(19553);async function Z(a){let b=URL.createObjectURL(a),c=document.createElement("video");c.muted=!0,c.preload="auto",c.crossOrigin="anonymous",await new Promise((a,d)=>{c.onloadedmetadata=()=>a(),c.onerror=()=>d(Error("Failed to load video")),c.src=b}),await c.play().catch(()=>{}),c.pause();let d=c.duration;if(!isFinite(d)||d<=0)throw URL.revokeObjectURL(b),Error("Could not determine video duration");let e=Math.min(d<=10?4:8,Math.ceil(d)),f=[];for(let a=0;a<e;a++){let b=.1+a/e*(d-.2);f.push(Math.min(b,d-.05))}let g=document.createElement("canvas"),h=g.getContext("2d"),i=[];for(let a of f){await function(a,b){return new Promise(c=>{let d=()=>{a.removeEventListener("seeked",d),requestAnimationFrame(()=>c())};a.addEventListener("seeked",d),a.currentTime=b})}(c,a);let b=function(a,b,c){let{videoWidth:d,videoHeight:e}=a,f=d>1280?1280/d:1;return b.width=Math.round(d*f),b.height=Math.round(e*f),c.drawImage(a,0,0,b.width,b.height),b.toDataURL("image/jpeg",.82)}(c,g,h);i.push(b)}return URL.revokeObjectURL(b),{frames:i,duration:d,thumbnail:i[0]??""}}let $=["User can log in with valid credentials","Invalid input shows validation error","Form submits successfully and redirects","Edge case: empty required fields"],_=["While you wait... have this cute cat!","Hang tight! Here's a furry friend.","Generating... enjoy this kitty!","Almost there! Cat says hi.","Test cases incoming... meow!"];function aa({open:a,onClose:b,node:c,project:d,onGenerate:f}){let{isConnected:g,activeProvider:i,activeProviderId:j}=(0,Y.P)(),[k,l]=(0,h.useState)(""),[m,n]=(0,h.useState)(""),[o,p]=(0,h.useState)("en"),[q,r]=(0,h.useState)(!1),[s,t]=(0,h.useState)(!1),[u,v]=(0,h.useState)(null),[w,x]=(0,h.useState)([]),[y,z]=(0,h.useState)(""),[A,B]=(0,h.useState)(_[0]),[C,D]=(0,h.useState)(0),E=(0,h.useRef)(null),F=(0,h.useRef)(null),G=(0,h.useRef)(null),[H,I]=(0,h.useState)(!1),[J,K]=(0,h.useState)(!1),[L,M]=(0,h.useState)(null),[N,O]=(0,h.useState)([]),[P,Q]=(0,h.useState)(new Set),[R,S]=(0,h.useState)(!1),[T,U]=(0,h.useState)(null),V=(0,h.useCallback)(async()=>{try{let a=await fetch("https://api.thecatapi.com/v1/images/search?size=med"),b=await a.json();b?.[0]?.url&&z(b[0].url)}catch{z("")}B(_[Math.floor(Math.random()*_.length)])},[]),W=a=>new Promise((b,c)=>{if(!a.type.startsWith("image/"))return void c(Error("Not an image file"));if(a.size>5242880)return void c(Error("Image too large (max 5MB)"));let d=new FileReader;d.onload=()=>b(d.result),d.onerror=()=>c(Error("Failed to read file")),d.readAsDataURL(a)}),aa=(0,h.useCallback)(async a=>{if(!a.type.startsWith("video/"))return void v("Not a video file");if(a.size>0x3200000)return void v("Video too large (max 50MB)");K(!0),M("Loading video...");try{let b=await Z(a);if(b.duration>120){v(`Video too long (${Math.round(b.duration)}s). Max 120s.`),K(!1),M(null);return}M(`Extracted ${b.frames.length} frames. Select which to include...`),O(b.frames),Q(new Set(b.frames.map((a,b)=>b))),S(!0),v(null)}catch(a){v(a instanceof Error?a.message:"Failed to process video")}finally{K(!1),M(null)}},[]),ab=(0,h.useCallback)(()=>{let a=5-w.length,b=N.filter((a,b)=>P.has(b)).slice(0,a);b.length>0&&x(a=>[...a,...b]),O([]),Q(new Set),S(!1)},[N,P,w.length]),ac=(0,h.useCallback)(()=>{O([]),Q(new Set),S(!1)},[]),ad=(0,h.useCallback)(a=>{Q(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.size<5&&c.add(a),c})},[]),ae=(0,h.useCallback)(()=>{Q(new Set(Array.from({length:Math.min(N.length,5)},(a,b)=>b)))},[N]),af=(0,h.useCallback)(()=>{Q(new Set)},[]),ag=(0,h.useCallback)(async a=>{let b=5-w.length;if(b<=0)return void v("Maximum 5 images/frames allowed");let c=Array.from(a),d=c.filter(a=>a.type.startsWith("image/")),e=c.filter(a=>a.type.startsWith("video/")),f=d.slice(0,b),g=[];for(let a of f)try{let b=await W(a);g.push(b)}catch(a){v(a instanceof Error?a.message:"Failed to load image")}g.length>0&&(x(a=>[...a,...g]),v(null)),e.length>0&&await aa(e[0])},[w.length,aa]),ah=(0,h.useCallback)(a=>{x(b=>b.filter((b,c)=>c!==a))},[]),ai=(0,h.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),I(!0)},[]),aj=(0,h.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),I(!1)},[]),ak=(0,h.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),I(!1),a.dataTransfer.files.length>0&&ag(a.dataTransfer.files)},[ag]);(0,h.useCallback)(async a=>{await aa(a)},[aa]);let al=(0,h.useCallback)(a=>{a.target.files&&a.target.files.length>0&&(ag(a.target.files),a.target.value="")},[ag]),am=async()=>{if(!g)return void v("Please configure an AI provider in Integrations first.");if(!m.trim()&&0===w.length)return void v("Please describe the feature, paste a ticket, or attach an image.");t(!0),v(null);try{let a=await (0,X.Z7)({title:k,prompt:m,apiKey:i.apiKey,provider:j??void 0,model:i.defaultModel,language:o,baseURL:i.baseURL||void 0,images:w.length>0?w:void 0,projectName:d?.name,projectType:d?.type,projectNotes:d?.notes,nodeNotes:c.notes});f(a),b()}catch(a){v(a instanceof Error?a.message:"Generation failed")}finally{t(!1)}};return a?(0,e.jsxs)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:b,children:[(0,e.jsxs)("div",{className:"flex rounded-xl overflow-hidden",style:{maxWidth:s?"720px":"512px",width:"100%",margin:"0 16px",backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",transition:"max-width 400ms cubic-bezier(0.4, 0, 0.2, 1)"},onClick:a=>a.stopPropagation(),children:[(0,e.jsxs)("div",{className:"flex-1 min-w-0",style:{maxWidth:"512px"},children:[(0,e.jsxs)("div",{className:"px-5 pt-5 pb-4 border-b",style:{borderColor:"var(--border)"},children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,e.jsx)("div",{className:"w-6 h-6 rounded-md flex items-center justify-center",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)"},children:(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2"})})}),(0,e.jsx)("h3",{className:"text-sm font-semibold",style:{color:"var(--text-primary)"},children:"Generate Test Cases"})]}),(0,e.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["Describe the feature and let AI generate test cases for “",c.label,"”"]})]}),(0,e.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:"Test Case Title"}),(0,e.jsx)("input",{value:k,onChange:a=>l(a.target.value),className:"w-full px-3 py-2 text-sm rounded-lg outline-none border transition-colors focus:border-[var(--accent)]",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},placeholder:"Feature name..."})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:"Description / DoD / Ticket"}),(0,e.jsx)("textarea",{value:m,onChange:a=>n(a.target.value),rows:4,className:"w-full px-3 py-2 text-sm rounded-lg outline-none border resize-none transition-colors focus:border-[var(--accent)]",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},placeholder:"id"===o?"Jelaskan fitur, kriteria penerimaan, atau tempel tiket...":"Describe the feature, acceptance criteria, or paste a ticket..."}),(0,e.jsx)("div",{className:"flex flex-wrap gap-1.5 mt-2",children:$.map(a=>(0,e.jsxs)("button",{onClick:()=>n(b=>b?`${b}
|
|
10
|
+
${a}`:a),className:"px-2 py-0.5 text-[10px] rounded-full border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:["+ ",a]},a))})]}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("label",{className:"text-xs font-medium block mb-1.5",style:{color:"var(--text-secondary)"},children:["Screenshots & Videos ",(0,e.jsx)("span",{className:"font-normal",style:{color:"var(--text-tertiary)"},children:"(optional)"})]}),w.length>0&&(0,e.jsx)("div",{className:"flex flex-wrap gap-2 mb-2",children:w.map((a,b)=>(0,e.jsxs)("div",{className:"relative group rounded-lg overflow-hidden border",style:{borderColor:"var(--border)",width:72,height:72},children:[(0,e.jsx)("img",{src:a,alt:`Screenshot ${b+1}`,className:"w-full h-full object-cover"}),(0,e.jsx)("button",{onClick:()=>ah(b),className:"absolute top-0.5 right-0.5 w-5 h-5 rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.7)",color:"#fff"},title:"Remove",children:(0,e.jsxs)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,e.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]},b))}),(0,e.jsx)("div",{ref:G,onDragOver:ai,onDragLeave:aj,onDrop:ak,onClick:()=>E.current?.click(),className:"rounded-lg border-2 border-dashed cursor-pointer transition-colors",style:{borderColor:H?"var(--accent)":"var(--border)",backgroundColor:H?"var(--accent)08":"transparent",padding:w.length>0?"8px":"16px"},children:(0,e.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,e.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,e.jsx)("polyline",{points:"21 15 16 10 5 21"})]}),(0,e.jsx)("span",{className:"text-[11px]",style:{color:"var(--text-tertiary)"},children:w.length>0?`Add more (${w.length}/5) \xb7 paste, drop, or click`:"Paste from clipboard, drop, or click to upload"})]})}),!R&&w.length<5&&(0,e.jsx)("div",{className:"mt-2",children:J?(0,e.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg",style:{backgroundColor:"var(--bg-secondary)"},children:[(0,e.jsx)("svg",{className:"animate-spin",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"2",children:(0,e.jsx)("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"30 70"})}),(0,e.jsx)("span",{className:"text-[11px]",style:{color:"var(--text-secondary)"},children:L})]}):(0,e.jsxs)("button",{type:"button",onClick:a=>{a.stopPropagation(),F.current?.click()},className:"flex items-center gap-2 px-3 py-1.5 text-[11px] rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:[(0,e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("polygon",{points:"23 7 16 12 23 17 23 7"}),(0,e.jsx)("rect",{x:"1",y:"5",width:"15",height:"14",rx:"2",ry:"2"})]}),"Upload video (extract key frames)"]})}),R&&N.length>0&&(0,e.jsxs)("div",{className:"mt-2 p-3 rounded-lg border",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[(0,e.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,e.jsxs)("span",{className:"text-[11px] font-medium",style:{color:"var(--text-secondary)"},children:["Select frames ",(0,e.jsxs)("span",{style:{color:"var(--text-tertiary)"},children:["(",P.size,"/",5," max)"]})]}),(0,e.jsxs)("div",{className:"flex gap-1",children:[(0,e.jsx)("button",{type:"button",onClick:ae,className:"text-[10px] px-1.5 py-0.5 rounded hover:bg-[var(--bg-card)]",style:{color:"var(--text-tertiary)"},children:"All"}),(0,e.jsx)("button",{type:"button",onClick:af,className:"text-[10px] px-1.5 py-0.5 rounded hover:bg-[var(--bg-card)]",style:{color:"var(--text-tertiary)"},children:"None"})]})]}),(0,e.jsx)("div",{className:"flex flex-wrap gap-2 mb-3",children:N.map((a,b)=>(0,e.jsxs)("div",{className:"relative group rounded-md overflow-hidden border-2 transition-all cursor-pointer",style:{width:80,height:80,borderColor:P.has(b)?"var(--accent)":"var(--border)",opacity:P.has(b)?1:.5},children:[(0,e.jsx)("button",{type:"button",onClick:()=>ad(b),className:"w-full h-full",children:(0,e.jsx)("img",{src:a,alt:`Frame ${b+1}`,className:"w-full h-full object-cover"})}),(0,e.jsx)("button",{type:"button",onClick:b=>{b.stopPropagation(),U(a)},className:"absolute top-0.5 left-0.5 w-6 h-6 rounded flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",style:{backgroundColor:"rgba(0,0,0,0.7)",color:"#fff"},title:"Zoom",children:(0,e.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,e.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"}),(0,e.jsx)("line",{x1:"11",y1:"8",x2:"11",y2:"14"}),(0,e.jsx)("line",{x1:"8",y1:"11",x2:"14",y2:"11"})]})}),P.has(b)&&(0,e.jsx)("div",{className:"absolute top-0.5 right-0.5 w-5 h-5 rounded-full flex items-center justify-center",style:{backgroundColor:"var(--accent)",color:"#fff"},children:(0,e.jsx)("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,e.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,e.jsx)("span",{className:"absolute bottom-0 left-0 right-0 text-center text-[9px] py-0.5",style:{backgroundColor:"rgba(0,0,0,0.6)",color:"#fff"},children:b+1})]},b))}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("button",{type:"button",onClick:ac,className:"flex-1 px-3 py-1.5 text-[11px] rounded-md border transition-colors hover:bg-[var(--bg-card)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,e.jsxs)("button",{type:"button",onClick:ab,disabled:0===P.size,className:"flex-1 px-3 py-1.5 text-[11px] rounded-md transition-colors hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",style:{backgroundColor:"var(--accent)",color:"#fff"},children:["Add ",P.size," frame",1!==P.size?"s":""]})]})]}),(0,e.jsx)("input",{ref:E,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:al}),(0,e.jsx)("input",{ref:F,type:"file",accept:"video/*",className:"hidden",onChange:async a=>{let b=a.target.files?.[0];b&&(await aa(b),a.target.value="")}})]}),u&&(0,e.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:u}),!g&&(0,e.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-skip-bg)",color:"var(--status-skip-text)"},children:"No AI provider configured. Go to Integrations to set up."}),(0,e.jsxs)("div",{className:"rounded-lg border overflow-hidden",style:{borderColor:"var(--border)"},children:[(0,e.jsxs)("button",{onClick:()=>r(a=>!a),className:"w-full flex items-center justify-between px-3 py-2 transition-colors hover:bg-[var(--bg-secondary)]",children:[(0,e.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-secondary)"},children:"Language"}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-[10px] font-mono font-semibold px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},children:"en"===o?"EN":"ID"}),(0,e.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:q?"rotate(180deg)":"rotate(0deg)",transition:"transform 200ms ease-out"},children:(0,e.jsx)("polyline",{points:"6 9 12 15 18 9"})})]})]}),(0,e.jsx)("div",{style:{maxHeight:q?"80px":"0px",overflow:"hidden",transition:"max-height 200ms ease-out"},children:(0,e.jsx)("div",{className:"px-3 pb-2 pt-1",children:(0,e.jsxs)("select",{value:o,onChange:a=>{p(a.target.value),r(!1)},className:"w-full px-2.5 py-1.5 text-xs rounded-md border outline-none transition-colors cursor-pointer",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},children:[(0,e.jsx)("option",{value:"en",children:"English"}),(0,e.jsx)("option",{value:"id",children:"Bahasa Indonesia"})]})})})]})]}),(0,e.jsxs)("div",{className:"px-5 py-4 border-t flex gap-2",style:{borderColor:"var(--border)"},children:[(0,e.jsx)("button",{onClick:b,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,e.jsx)("button",{onClick:am,disabled:s||!g,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-all hover:opacity-90 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)",color:"#fff",boxShadow:"0 2px 8px rgba(141,110,99,0.3)"},children:s?(0,e.jsxs)("span",{className:"flex items-center justify-center gap-2",children:[(0,e.jsx)("svg",{className:"animate-spin",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,e.jsx)("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"30 70"})}),"Generating..."]}):"Generate Test Cases"})]})]}),(0,e.jsx)("div",{className:"flex-shrink-0 overflow-hidden",style:{width:s?"280px":"0px",transition:"width 400ms cubic-bezier(0.4, 0, 0.2, 1)"},children:(0,e.jsxs)("div",{className:"w-[280px] h-full flex flex-col items-center justify-center p-5 border-l",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)",opacity:+!!s,transition:"opacity 300ms ease-out 100ms"},children:[(0,e.jsx)("div",{className:"w-full rounded-xl overflow-hidden mb-4 border",style:{borderColor:"var(--border)",height:180,backgroundColor:"var(--bg-card)"},children:y&&(0,e.jsx)("img",{src:y,alt:"Cute cat",width:280,height:180,className:"w-full h-full object-cover",style:{animation:"fadeIn 800ms ease-out"},onError:a=>{a.target.style.display="none"}},C)}),(0,e.jsx)("p",{className:"text-xs text-center mb-3",style:{color:"var(--text-secondary)",animation:"fadeIn 800ms ease-out"},children:A}),(0,e.jsx)("button",{onClick:V,className:"px-3 py-1.5 text-[10px] rounded-full border transition-colors hover:bg-[var(--bg-card)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"New cat"})]})})]}),T&&(0,e.jsx)("div",{className:"fixed inset-0 z-[400] flex items-center justify-center p-8",style:{backgroundColor:"rgba(0,0,0,0.85)",animation:"fadeIn 150ms ease-out"},onClick:a=>{a.stopPropagation(),U(null)},children:(0,e.jsxs)("div",{className:"relative max-w-4xl max-h-full",onClick:a=>a.stopPropagation(),children:[(0,e.jsx)("img",{src:T,alt:"Frame preview",className:"max-w-full max-h-[80vh] object-contain rounded-lg",style:{boxShadow:"0 8px 32px rgba(0,0,0,0.5)"}}),(0,e.jsx)("button",{onClick:()=>U(null),className:"absolute -top-2 -right-2 w-8 h-8 rounded-full flex items-center justify-center transition-colors hover:opacity-80",style:{backgroundColor:"var(--bg-card)",color:"var(--text-primary)",boxShadow:"var(--shadow-lg)"},children:(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,e.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})]}):null}let ab={pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)"},untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)"},blocked:{bg:"var(--status-blocked-bg)",text:"var(--status-blocked-text)"}};function ac({open:a,onClose:b,node:c,testCases:d,stats:f}){return a?(0,e.jsxs)("div",{style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:b,className:"jsx-540c0278eef48442 fixed inset-0 z-[300] flex items-center justify-center",children:[(0,e.jsxs)("div",{style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)",borderRadius:"var(--radius-lg)",animation:"fadeInUp 200ms ease-out"},onClick:a=>a.stopPropagation(),className:"jsx-540c0278eef48442 w-full max-w-lg mx-4 rounded-xl overflow-hidden",children:[(0,e.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-540c0278eef48442 px-5 pt-5 pb-4 border-b",children:[(0,e.jsxs)("div",{className:"jsx-540c0278eef48442 flex items-center justify-between mb-2",children:[(0,e.jsxs)("div",{className:"jsx-540c0278eef48442 flex items-center gap-2",children:[c.code&&(0,e.jsx)("span",{style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] font-mono px-1.5 py-0.5 rounded",children:c.code}),(0,e.jsx)("h3",{style:{color:"var(--text-primary)"},className:"jsx-540c0278eef48442 text-sm font-semibold",children:c.label})]}),(0,e.jsx)("button",{onClick:b,style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] opacity-50 hover:opacity-100",children:"\xd7"})]}),c.notes&&(0,e.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-xs",children:c.notes})]}),(0,e.jsxs)("div",{className:"jsx-540c0278eef48442 grid grid-cols-4 gap-3 p-5",children:[(0,e.jsx)(ad,{label:"Total",value:f.total}),(0,e.jsx)(ad,{label:"Pass",value:f.pass,color:"var(--status-pass-text)"}),(0,e.jsx)(ad,{label:"Fail",value:f.fail,color:"var(--status-fail-text)"}),(0,e.jsx)(ad,{label:"Blocked",value:f.blocked,color:"var(--status-blocked-text)"}),(0,e.jsx)(ad,{label:"Untested",value:f.untested,color:"var(--status-untested-text)"})]}),(0,e.jsxs)("div",{className:"jsx-540c0278eef48442 px-5 pb-4",children:[(0,e.jsxs)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 flex items-center justify-between text-[10px] mb-1.5",children:[(0,e.jsx)("span",{className:"jsx-540c0278eef48442",children:"Pass Rate"}),(0,e.jsxs)("span",{style:{color:f.passRate>=80?"var(--status-pass-text)":f.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)",fontWeight:600},className:"jsx-540c0278eef48442",children:[f.passRate,"%"]})]}),(0,e.jsx)("div",{style:{backgroundColor:"var(--bg-secondary)"},className:"jsx-540c0278eef48442 h-2 w-full rounded-full overflow-hidden",children:(0,e.jsx)("div",{style:{width:`${f.passRate}%`,backgroundColor:f.passRate>=80?"var(--status-pass-text)":f.passRate>=50?"var(--status-skip-text)":"var(--status-fail-text)"},className:"jsx-540c0278eef48442 h-full rounded-full transition-all duration-500"})})]}),d.length>0&&(0,e.jsxs)("div",{className:"jsx-540c0278eef48442 px-5 pb-4",children:[(0,e.jsx)("h4",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[10px] font-semibold uppercase tracking-wider mb-2",children:"Test Cases"}),(0,e.jsx)("div",{className:"jsx-540c0278eef48442 space-y-1.5 max-h-48 overflow-y-auto",children:d.map(a=>{let b=ab[a.status]||ab.untested;return(0,e.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-540c0278eef48442 flex items-center gap-2 px-3 py-2 rounded-lg border",children:[(0,e.jsx)("span",{style:{backgroundColor:b.bg,color:b.text},className:"jsx-540c0278eef48442 text-[9px] font-mono px-1.5 py-0.5 rounded-full flex-shrink-0",children:a.status}),(0,e.jsx)("span",{style:{color:"var(--text-primary)"},className:"jsx-540c0278eef48442 text-[11px] flex-1 truncate",children:a.title}),a.code&&(0,e.jsx)("span",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-[9px] font-mono flex-shrink-0",children:a.code})]},a.id)})})]}),0===d.length&&(0,e.jsx)("div",{className:"jsx-540c0278eef48442 px-5 pb-5 text-center",children:(0,e.jsx)("p",{style:{color:"var(--text-tertiary)"},className:"jsx-540c0278eef48442 text-xs",children:"No test cases for this node yet."})}),(0,e.jsx)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-540c0278eef48442 px-5 py-3 border-t",children:(0,e.jsx)("button",{onClick:b,style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-540c0278eef48442 w-full px-3 py-2 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-card)]",children:"Close"})})]}),(0,e.jsx)(g(),{id:"540c0278eef48442",children:"@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeInUp{from{opacity:0;transform:translatey(12px)}to{opacity:1;transform:translatey(0)}}"})]}):null}function ad({label:a,value:b,color:c}){return(0,e.jsxs)("div",{className:"text-center p-2 rounded-lg border",style:{borderColor:"var(--border)"},children:[(0,e.jsx)("div",{className:"text-[10px] mb-0.5",style:{color:"var(--text-tertiary)"},children:a}),(0,e.jsx)("div",{className:"text-lg font-semibold",style:{color:c??"var(--text-primary)"},children:b})]})}function ae(a){let b=[],c="",d=!1;for(let e=0;e<a.length;e++){let f=a[e];d?'"'===f?e+1<a.length&&'"'===a[e+1]?(c+='"',e++):d=!1:c+=f:'"'===f?d=!0:","===f?(b.push(c),c=""):c+=f}return b.push(c),b}function af({open:a,onClose:b,onImport:c,nodeLabel:d}){let[f,g]=(0,h.useState)("csv"),[i,j]=(0,h.useState)(null),[k,l]=(0,h.useState)(null),[m,n]=(0,h.useState)(!1),o=(0,h.useRef)(null),p=()=>{j(null),l(null),n(!1)},q=(0,h.useCallback)(a=>{j(null),l(null);let b=new FileReader;b.onload=()=>{try{let c=b.result,d=a.name.endsWith(".json")||"application/json"===a.type?function(a){let b=JSON.parse(a),c=Array.isArray(b)?b:b.testCases||b.test_cases||b.cases;if(!Array.isArray(c))throw Error('JSON must be an array of test cases, or an object with a "testCases" array');let d=[];for(let a of c){if("string"==typeof a){a.trim()&&d.push({title:a.trim(),steps:"",expected:""});continue}if("object"!=typeof a||!a)continue;let b=a.title||a.name||a.testCase||a["test case"]||"";b&&"string"==typeof b&&d.push({title:b.trim(),steps:String(a.steps||a.instructions||"").trim(),expected:String(a.expected||a["expected result"]||a.result||"").trim()})}if(0===d.length)throw Error("No valid test cases found in JSON");return d}(c):function(a){let b=a.split("\n").map(a=>a.trim()).filter(a=>a.length>0);if(b.length<2)throw Error("CSV must have a header row and at least one data row");let c=ae(b[0]).map(a=>a.toLowerCase().trim()),d=c.findIndex(a=>"title"===a||"test case"===a||"testcase"===a||"name"===a||"test case title"===a),e=c.findIndex(a=>"steps"===a||"test steps"===a||"step"===a||"instructions"===a),f=c.findIndex(a=>"expected"===a||"expected result"===a||"expected results"===a||"result"===a);if(-1===d)throw Error('Could not find a "title" or "test case" column in the CSV header');let g=[];for(let a=1;a<b.length;a++){let c=ae(b[a]),h=(c[d]||"").trim();h&&g.push({title:h,steps:e>=0?(c[e]||"").trim():"",expected:f>=0?(c[f]||"").trim():""})}if(0===g.length)throw Error("No valid test cases found in CSV");return g}(c);l(d)}catch(a){j(a instanceof Error?a.message:"Failed to parse file")}},b.onerror=()=>j("Failed to read file"),b.readAsText(a)},[]);return a?(0,e.jsx)("div",{className:"fixed inset-0 z-[300] flex items-center justify-center",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:()=>{p(),b()},children:(0,e.jsxs)("div",{className:"w-full max-w-lg mx-4 rounded-xl overflow-hidden",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)"},onClick:a=>a.stopPropagation(),children:[(0,e.jsxs)("div",{className:"px-5 pt-5 pb-4 border-b",style:{borderColor:"var(--border)"},children:[(0,e.jsx)("h3",{className:"text-sm font-semibold mb-1",style:{color:"var(--text-primary)"},children:"Import Test Cases"}),(0,e.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["Import test cases into “",d,"” from CSV or JSON"]})]}),(0,e.jsxs)("div",{className:"px-5 py-4 space-y-4",children:[(0,e.jsxs)("div",{className:"text-[11px] rounded-lg px-3 py-2",style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},children:[(0,e.jsx)("p",{className:"font-medium mb-1",style:{color:"var(--text-secondary)"},children:"Supported formats:"}),(0,e.jsxs)("ul",{className:"space-y-0.5 ml-3",children:[(0,e.jsxs)("li",{children:[(0,e.jsx)("strong",{children:"CSV:"})," Header row with columns: title, steps, expected (or similar names)"]}),(0,e.jsxs)("li",{children:[(0,e.jsx)("strong",{children:"JSON:"}),' Array of objects with "title", "steps", "expected" fields']})]})]}),(0,e.jsx)("div",{onDragOver:a=>{a.preventDefault(),n(!0)},onDragLeave:()=>n(!1),onDrop:a=>{a.preventDefault(),n(!1);let b=a.dataTransfer.files[0];b&&q(b)},onClick:()=>o.current?.click(),className:"border-2 border-dashed rounded-lg cursor-pointer transition-colors py-8",style:{borderColor:m?"var(--accent)":"var(--border)",backgroundColor:m?"var(--accent)08":"transparent"},children:(0,e.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,e.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),(0,e.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,e.jsx)("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),(0,e.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:"Drop a .csv or .json file here, or click to browse"})]})}),(0,e.jsx)("input",{ref:o,type:"file",accept:".csv,.json",className:"hidden",onChange:a=>{let b=a.target.files?.[0];b&&q(b),a.target.value=""}}),i&&(0,e.jsx)("div",{className:"text-xs px-3 py-2 rounded-lg",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:i}),k&&k.length>0&&(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,e.jsxs)("span",{className:"text-xs font-medium",style:{color:"var(--text-secondary)"},children:["Preview (",k.length," test case",1!==k.length?"s":"",")"]}),(0,e.jsx)("button",{onClick:()=>l(null),className:"text-[10px] px-1.5 py-0.5 rounded border hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"Clear"})]}),(0,e.jsxs)("div",{className:"max-h-[200px] overflow-auto rounded-lg border",style:{borderColor:"var(--border)"},children:[(0,e.jsxs)("table",{className:"text-[11px] w-full",children:[(0,e.jsx)("thead",{children:(0,e.jsxs)("tr",{style:{backgroundColor:"var(--bg-secondary)"},children:[(0,e.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"#"}),(0,e.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Title"}),(0,e.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Steps"}),(0,e.jsx)("th",{className:"px-2 py-1.5 text-left font-medium",style:{color:"var(--text-tertiary)"},children:"Expected"})]})}),(0,e.jsx)("tbody",{children:k.slice(0,20).map((a,b)=>(0,e.jsxs)("tr",{className:"border-t",style:{borderColor:"var(--border)"},children:[(0,e.jsx)("td",{className:"px-2 py-1",style:{color:"var(--text-tertiary)"},children:b+1}),(0,e.jsx)("td",{className:"px-2 py-1",style:{color:"var(--text-primary)"},children:a.title}),(0,e.jsx)("td",{className:"px-2 py-1 max-w-[120px] truncate",style:{color:"var(--text-secondary)"},children:a.steps||"—"}),(0,e.jsx)("td",{className:"px-2 py-1 max-w-[120px] truncate",style:{color:"var(--text-secondary)"},children:a.expected||"—"})]},b))})]}),k.length>20&&(0,e.jsxs)("div",{className:"px-2 py-1 text-[10px] border-t",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:["...and ",k.length-20," more"]})]})]})]}),(0,e.jsxs)("div",{className:"px-5 py-4 border-t flex gap-2",style:{borderColor:"var(--border)"},children:[(0,e.jsx)("button",{onClick:()=>{p(),b()},className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,e.jsxs)("button",{onClick:()=>{k&&0!==k.length&&(c(k),p(),b())},disabled:!k||0===k.length,className:"flex-1 px-3 py-2.5 text-xs font-medium rounded-lg transition-all hover:opacity-90 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg, #8D6E63, #A1887F)",color:"#fff"},children:["Import ",k?`(${k.length})`:""]})]})]})}):null}function ag({testCases:a,projectId:b,onClose:c}){let{e2e:d,testCases:f}=(0,k.M)(),[g,i]=(0,h.useState)(d.config.baseUrl),[j,l]=(0,h.useState)(d.config.browser),[m,n]=(0,h.useState)(d.config.headless),[o,p]=(0,h.useState)(d.config.timeout),[q,r]=(0,h.useState)("runner"),[s,t]=(0,h.useState)(!1),[u,v]=(0,h.useState)(!1),[w,x]=(0,h.useState)([]),[y,z]=(0,h.useState)(null),[A,B]=(0,h.useState)([]),[C,D]=(0,h.useState)([]),[E,F]=(0,h.useState)(null),[G,H]=(0,h.useState)(!0),[I,J]=(0,h.useState)(22),[K,L]=(0,h.useState)(!0),M=(0,h.useRef)(!1),N=(0,h.useRef)(null),[O,P]=(0,h.useState)(""),[Q,R]=(0,h.useState)(!1),[S,T]=(0,h.useState)({}),[U,V]=(0,h.useState)(null),[W,X]=(0,h.useState)(""),[Y,Z]=(0,h.useState)(null),[$,_]=(0,h.useState)(null),aa=(0,h.useRef)(null),ab=(0,h.useRef)(null),[ac,ad]=(0,h.useState)(new Set(a.map(a=>a.id))),[ae,af]=(0,h.useState)(!1),ag=(0,h.useCallback)(a=>{a.preventDefault(),M.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none";let b=a=>{if(!M.current||!N.current)return;let b=N.current.getBoundingClientRect(),c=a.clientX;J(Math.min(Math.max((b.right-c)/b.width*100,15),50))},c=()=>{M.current=!1,document.body.style.cursor="",document.body.style.userSelect="",document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",c)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",c)},[]),ah=(0,h.useCallback)((a,b)=>{B(c=>[...c,{time:new Date,type:a,message:b}]),window.setTimeout(()=>{ab.current?.scrollIntoView({behavior:"smooth"})},50)},[]),ai=(0,h.useCallback)(a=>{ad(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),aj=(0,h.useCallback)(()=>{ac.size===a.length?ad(new Set):ad(new Set(a.map(a=>a.id)))},[a,ac]),ak=(0,h.useCallback)(()=>{let a=localStorage.getItem("qa-llm-config");if(!a)return null;let b=JSON.parse(a),c=b.activeProvider;if(!c||!b.providers?.[c])return null;let d=b.providers[c];return d.apiKey&&d.connected?{provider:c,model:d.defaultModel,apiKey:d.apiKey,baseURL:d.baseURL}:null},[]),al=(0,h.useCallback)(async()=>{let b=ak();if(!b)return void ah("error","Please configure LLM in Integrations page first");v(!0),ah("info","Generating test scripts...");try{let c=await fetch("/api/e2e",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:a.filter(a=>ac.has(a.id)),baseUrl:g,llmConfig:b,generateOnly:!0})});if(!c.ok)return void ah("error","Failed to generate scripts");let e=await c.json();for(let[b,c]of(T(a=>({...a,...e.scripts})),Object.entries(e.scripts))){let e=a.find(a=>a.id===b);e&&d.saveScript(b,e.title,e.code,c)}ah("success",`Generated ${Object.keys(e.scripts).length} test script(s)`),r("scripts")}catch(a){ah("error",`Error: ${a instanceof Error?a.message:String(a)}`)}finally{v(!1)}},[a,ac,g,ak,ah,d]),am=(0,h.useCallback)(async()=>{let c=a.filter(a=>ac.has(a.id));if(0===c.length)return;let e=ak();if(!e)return void ah("error","Please configure LLM in Integrations page first");t(!0),x([]),B([]),D([]),F(null),P(""),R(!1);let f=new AbortController;aa.current=f,ah("info",`Starting E2E test run with ${c.length} test(s)...`),ah("info",`Target: ${g}`),ah("info",`Browser: ${j} | Headless: ${m}`);try{let a=await fetch("/api/e2e",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:c,baseUrl:g,browser:j,headless:m,timeout:o,llmConfig:e}),signal:f.signal});if(!a.ok){let b=await a.json();ah("error",b.error||"Failed to run tests"),t(!1);return}let h=a.body?.getReader(),i=new TextDecoder,k="",l=[];if(h)for(;;){let{done:a,value:c}=await h.read();if(a)break;let e=(k+=i.decode(c,{stream:!0})).split("\n");for(let a of(k=e.pop()||"",e))if(a.startsWith("data: "))try{let c=JSON.parse(a.slice(6));switch(c.type){case"status":ah("info",c.message);break;case"testStart":z({index:c.index,title:c.title}),ah("info",`
|
|
11
|
+
━━━ Test ${c.index}/${c.total}: ${c.code} - ${c.title} ━━━`),c.script&&T(a=>({...a,[c.testCaseId]:c.script}));break;case"step":ah("info",` → ${c.message}`);break;case"aiThinking":ah("ai",` 🤖 ${c.message}`);break;case"aiAction":ah("ai",` 🎯 ${c.message}`);break;case"screenshot":F(c.image),D(a=>[...a,{image:c.image,label:c.label,timestamp:new Date}]);break;case"stepResult":ah("pass"===c.status?"success":"error",` ${"pass"===c.status?"✓":"✗"} ${c.message}`);break;case"healing":ah("healing",` 🔧 ${c.message}`);break;case"healingAction":ah("healing",` 💊 ${c.message}`);break;case"healed":ah("success",` ✨ ${c.message}`);break;case"aiAnalysis":ah("ai",` 📊 AI Analysis:
|
|
12
|
+
${c.message}`);break;case"error":ah("error",` ⚠ ${c.message}`);break;case"healingReport":P(c.report),c.report&&!c.report.includes("All tests passed")&&R(!0);break;case"testComplete":ah("pass"===c.status?"success":"error",`
|
|
13
|
+
${"pass"===c.status?"✓":"✗"} Test ${c.index} completed: ${c.status.toUpperCase()} (${c.duration}ms)`),c.script&&(T(a=>({...a,[c.testCaseId]:c.script})),d.saveScript(c.testCaseId,c.result?.testCaseTitle||"","",c.script)),l.push(c.result),x([...l]);break;case"complete":ah("success","\n═══════════════════════════════════════");let e=c.results.filter(a=>"pass"===a.status).length,f=c.results.filter(a=>"fail"===a.status||"error"===a.status).length;ah("success",`Test run complete: ${e} passed, ${f} failed`),d.saveRun({projectId:b,config:{baseUrl:g,browser:j,headless:m,timeout:o},results:c.results,totalPassed:e,totalFailed:f,totalDuration:c.results.reduce((a,b)=>a+b.duration,0),healingReport:O||void 0});break;case"aborted":ah("warning","\n━━━ Test run stopped by user ━━━")}}catch{}}}catch(a){a instanceof Error&&"AbortError"===a.name?ah("warning","\n━━━ Test run stopped by user ━━━"):ah("error",`Error: ${a instanceof Error?a.message:String(a)}`)}t(!1),z(null),aa.current=null},[a,ac,g,j,m,o,ah,ak,b,d,O]),an=(0,h.useCallback)(()=>{aa.current&&(ah("warning","Stopping test run..."),aa.current.abort())},[ah]),ao=(0,h.useCallback)(()=>{if(!U||!W)return;let b=a.find(a=>a.id===U);b&&(d.saveScript(b.id,b.title,b.code,W),T(a=>({...a,[b.id]:W})),ah("success",`Script saved for ${b.code}`)),V(null),X("")},[U,W,a,d,ah]);return(0,e.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-2 md:p-4",style:{backgroundColor:"rgba(0,0,0,0.5)"},children:[(0,e.jsxs)("div",{className:"w-full max-w-6xl max-h-[95vh] md:max-h-[92vh] rounded-lg shadow-xl flex flex-col",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)"},children:[(0,e.jsxs)("div",{className:"flex items-center justify-between p-3 md:p-4 border-b shrink-0",style:{borderColor:"var(--border)"},children:[(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("h2",{className:"text-base md:text-lg font-semibold truncate",style:{color:"var(--text-primary)"},children:"E2E Agentic Test Runner"}),(0,e.jsx)("p",{className:"text-xs mt-0.5 hidden sm:block",style:{color:"var(--text-tertiary)"},children:"AI-powered testing with script generation & live preview"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2 ml-2",children:["runner"===q&&(0,e.jsx)("button",{onClick:()=>L(!K),className:"md:hidden p-1.5 rounded",style:{backgroundColor:K?"var(--accent)":"var(--bg-secondary)",color:K?"white":"var(--text-secondary)"},title:"Toggle config panel",children:"☰"}),(0,e.jsx)("button",{onClick:c,className:"p-1 rounded hover:opacity-80",style:{color:"var(--text-tertiary)"},children:"✕"})]})]}),(0,e.jsx)("div",{className:"flex border-b overflow-x-auto shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[{id:"runner",label:"Runner",icon:"▶"},{id:"scripts",label:"Scripts",icon:"{ }"},{id:"history",label:"History",icon:"\uD83D\uDCCB"}].map(a=>(0,e.jsxs)("button",{onClick:()=>r(a.id),className:"px-3 md:px-4 py-2 text-xs flex items-center gap-1.5 transition-colors whitespace-nowrap",style:{backgroundColor:q===a.id?"var(--bg-secondary)":"transparent",color:q===a.id?"var(--accent)":"var(--text-tertiary)",borderBottom:q===a.id?"2px solid var(--accent)":"2px solid transparent"},children:[(0,e.jsx)("span",{children:a.icon}),a.label]},a.id))}),"runner"===q&&(0,e.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[(0,e.jsx)("div",{className:`${K?"max-h-[35vh] md:max-h-none":"max-h-0 md:max-h-none"} md:flex-[0_0_28%] border-b md:border-b-0 md:border-r overflow-auto transition-all duration-200 shrink-0`,style:{borderColor:"var(--border)"},children:(0,e.jsxs)("div",{className:"p-3 md:p-4 space-y-3 md:space-y-4",children:[(0,e.jsxs)("div",{className:"p-3 rounded-lg space-y-3",style:{backgroundColor:"var(--bg-secondary)",border:"1px solid var(--border)"},children:[(0,e.jsx)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Configuration"}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-xs block mb-1",style:{color:"var(--text-tertiary)"},children:"Target URL"}),(0,e.jsx)("input",{type:"url",value:g,onChange:a=>i(a.target.value),disabled:s,className:"w-full text-sm px-2 py-1.5 rounded disabled:opacity-50",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"},placeholder:"http://localhost:3000"})]}),(0,e.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-xs block mb-1",style:{color:"var(--text-tertiary)"},children:"Browser"}),(0,e.jsxs)("select",{value:j,onChange:a=>l(a.target.value),disabled:s,className:"w-full text-sm px-2 py-1.5 rounded disabled:opacity-50",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"},children:[(0,e.jsx)("option",{value:"chromium",children:"Chromium"}),(0,e.jsx)("option",{value:"firefox",children:"Firefox"}),(0,e.jsx)("option",{value:"webkit",children:"WebKit"}),(0,e.jsx)("option",{value:"edge",children:"Edge"})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("label",{className:"text-xs block mb-1",style:{color:"var(--text-tertiary)"},children:"Timeout (ms)"}),(0,e.jsx)("input",{type:"number",value:o,onChange:a=>p(Number(a.target.value)),disabled:s,className:"w-full text-sm px-2 py-1.5 rounded disabled:opacity-50",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)",color:"var(--text-primary)"}})]})]}),(0,e.jsxs)("label",{className:"flex items-center gap-2 text-xs cursor-pointer",children:[(0,e.jsx)("input",{type:"checkbox",checked:m,onChange:a=>n(a.target.checked),disabled:s,className:"accent-[var(--accent)]"}),(0,e.jsx)("span",{style:{color:"var(--text-secondary)"},children:"Run headless"})]})]}),(0,e.jsxs)("div",{children:[(0,e.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,e.jsxs)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:["Test Cases (",ac.size,"/",a.length,")"]}),(0,e.jsx)("button",{onClick:aj,disabled:s,className:"text-xs underline disabled:opacity-50",style:{color:"var(--accent)"},children:ac.size===a.length?"Deselect All":"Select All"})]}),(0,e.jsx)("div",{className:"max-h-[150px] md:max-h-[200px] overflow-auto rounded-lg",style:{border:"1px solid var(--border)"},children:a.map(a=>{let b=w.find(b=>b.testCaseId===a.id);return(0,e.jsxs)("label",{className:"flex items-center gap-2 px-3 py-2 text-xs border-b last:border-b-0 hover:opacity-80 cursor-pointer",style:{borderColor:"var(--border)",backgroundColor:ac.has(a.id)?"var(--bg-secondary)":"transparent"},children:[(0,e.jsx)("input",{type:"checkbox",checked:ac.has(a.id),onChange:()=>ai(a.id),disabled:s,className:"accent-[var(--accent)]"}),(0,e.jsx)("span",{className:"flex-1 truncate",style:{color:"var(--text-primary)"},children:a.code}),b&&(0,e.jsx)("span",{style:{color:"pass"===b.status?"var(--status-pass-text)":"var(--status-fail-text)"},children:"pass"===b.status?"✓":"✗"})]},a.id)})})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("button",{onClick:al,disabled:s||u||0===ac.size,className:"w-full px-3 py-2 text-xs rounded flex items-center justify-center gap-2 disabled:opacity-50",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:u?"⏳ Generating...":"{ } Generate Scripts"}),O&&(0,e.jsx)("button",{onClick:()=>R(!0),className:"w-full px-3 py-2 text-xs rounded flex items-center justify-center gap-2",style:{backgroundColor:"var(--status-skip-bg)",border:"1px solid var(--status-skip-border)",color:"var(--status-skip-text)"},children:"\uD83D\uDD27 View Healing Report"})]})]})}),(0,e.jsxs)("div",{ref:N,className:"flex-1 flex flex-col overflow-hidden min-h-0",children:[(0,e.jsxs)("div",{className:"flex-1 flex flex-col md:flex-row overflow-hidden min-h-0",children:[(0,e.jsxs)("div",{className:"flex-1 flex flex-col min-h-0 max-h-[45vh] md:max-h-none",children:[(0,e.jsx)("div",{className:"p-3 border-b",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Execution Log"}),s&&(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-pulse"}),(0,e.jsx)("span",{className:"text-xs truncate max-w-[150px]",style:{color:"var(--text-tertiary)"},children:y?y.title:"Processing..."})]})]})}),(0,e.jsxs)("div",{className:"flex-1 overflow-auto p-3 font-mono text-xs",style:{backgroundColor:"var(--bg-primary)"},children:[0===A.length?(0,e.jsx)("div",{className:"text-center py-8",style:{color:"var(--text-tertiary)"},children:'Click "Run Tests" to start'}):A.map((a,b)=>(0,e.jsx)("div",{className:"py-0.5",style:{color:(a=>{switch(a){case"error":return"var(--status-fail-text)";case"success":return"var(--status-pass-text)";case"ai":return"#8b5cf6";case"healing":return"#f59e0b";case"warning":return"var(--status-skip-text)";default:return"var(--text-secondary)"}})(a.type)},children:a.message.split("\n").map((a,b)=>(0,e.jsx)("div",{children:a||"\xa0"},b))},b)),(0,e.jsx)("div",{ref:ab})]})]}),(0,e.jsx)("div",{className:"w-1 md:w-1.5 cursor-col-resize hover:bg-[var(--accent)] transition-colors shrink-0",style:{backgroundColor:"var(--border)"},onMouseDown:ag}),(0,e.jsxs)("div",{className:"border-t md:border-t-0 md:border-l flex flex-col transition-all duration-200",style:{borderColor:"var(--border)",maxHeight:G?"300px":"36px",minHeight:G?"200px":"36px",width:"auto",flex:G?`0 0 ${I}%`:"0 0 36px",...ae?{maxHeight:"none",minHeight:"auto",flex:G?`0 0 ${I}%`:"0 0 36px"}:{}},children:[(0,e.jsxs)("div",{className:"p-2 md:p-3 border-b cursor-pointer flex items-center gap-2 shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},onClick:()=>H(!G),children:[(0,e.jsx)("span",{className:"text-sm",children:"\uD83D\uDDA5️"}),G&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{className:"text-sm font-medium flex-1",style:{color:"var(--text-primary)"},children:"Browser Preview"}),(0,e.jsx)("span",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:C.length>0?`${C.length} screenshots`:""})]})]}),G&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"flex-1 overflow-auto p-2",style:{backgroundColor:"var(--bg-secondary)"},children:E?(0,e.jsx)("img",{src:`data:image/jpeg;base64,${E}`,alt:"Browser preview",className:"w-full rounded"}):(0,e.jsx)("div",{className:"flex items-center justify-center h-full min-h-[100px] text-xs",style:{color:"#666"},children:s?"Waiting...":"Preview during execution"})}),C.length>0&&(0,e.jsx)("div",{className:"p-2 border-t overflow-x-auto flex gap-1 shrink-0",style:{borderColor:"var(--border)"},children:C.slice(-6).map((a,b)=>(0,e.jsx)("button",{onClick:()=>F(a.image),className:"flex-shrink-0 w-10 h-7 md:w-12 md:h-8 rounded overflow-hidden border",style:{border:E===a.image?"2px solid var(--accent)":"1px solid var(--border)"},title:a.label,children:(0,e.jsx)("img",{src:`data:image/jpeg;base64,${a.image}`,alt:a.label,className:"w-full h-full object-cover"})},b))})]})]})]}),w.length>0&&(0,e.jsx)("div",{className:"p-2 md:p-3 border-t shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:(0,e.jsxs)("div",{className:"flex flex-wrap gap-3 md:gap-4 text-xs md:text-sm",children:[(0,e.jsxs)("span",{style:{color:"var(--status-pass-text)"},children:["✓ ",w.filter(a=>"pass"===a.status).length]}),(0,e.jsxs)("span",{style:{color:"var(--status-fail-text)"},children:["✗ ",w.filter(a=>"fail"===a.status).length]}),(0,e.jsxs)("span",{style:{color:"var(--status-fail-text)"},children:["⚠ ",w.filter(a=>"error"===a.status).length]}),(0,e.jsxs)("span",{className:"ml-auto",style:{color:"var(--text-tertiary)"},children:[Math.round(w.reduce((a,b)=>a+b.duration,0)/1e3),"s"]})]})})]})]}),"scripts"===q&&(0,e.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[(0,e.jsx)("div",{className:"w-full md:w-64 border-b md:border-b-0 md:border-r overflow-auto max-h-[30vh] md:max-h-none",style:{borderColor:"var(--border)"},children:(0,e.jsxs)("div",{className:"p-3",children:[(0,e.jsx)("h3",{className:"text-sm font-medium mb-3",style:{color:"var(--text-primary)"},children:"Test Scripts"}),(0,e.jsx)("div",{className:"space-y-1",children:a.map(a=>{let b=!!S[a.id],c=Y===a.id;return(0,e.jsxs)("button",{onClick:()=>{Z(a.id),V(null)},className:"w-full text-left px-3 py-2 text-xs rounded flex items-center gap-2",style:{backgroundColor:c?"var(--bg-secondary)":"transparent",color:"var(--text-primary)",border:c?"1px solid var(--border)":"1px solid transparent"},children:[(0,e.jsx)("span",{className:b?"text-green-500":"text-gray-400",children:b?"✓":"○"}),(0,e.jsxs)("span",{className:"truncate",children:[a.code," - ",a.title]})]},a.id)})})]})}),(0,e.jsx)("div",{className:"flex-1 flex flex-col min-h-0 max-h-[45vh] md:max-h-none",children:Y?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"p-3 border-b flex items-center justify-between shrink-0",style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},children:[(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsxs)("h3",{className:"text-sm font-medium truncate",style:{color:"var(--text-primary)"},children:[a.find(a=>a.id===Y)?.code," - Script"]}),(0,e.jsx)("p",{className:"text-xs mt-0.5",style:{color:"var(--text-tertiary)"},children:U?"Editing":"Click Edit to modify"})]}),(0,e.jsx)("div",{className:"flex gap-2 ml-2",children:U?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("button",{onClick:()=>{V(null),X("")},className:"px-3 py-1.5 text-xs rounded",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:"Cancel"}),(0,e.jsx)("button",{onClick:ao,className:"px-3 py-1.5 text-xs rounded",style:{backgroundColor:"var(--accent)",color:"white"},children:"Save"})]}):(0,e.jsx)("button",{onClick:()=>{V(Y),X(S[Y]||"")},className:"px-3 py-1.5 text-xs rounded",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:"✏️ Edit"})})]}),(0,e.jsx)("div",{className:"flex-1 overflow-auto p-4",style:{backgroundColor:"#1e1e2e"},children:U?(0,e.jsx)("textarea",{value:W,onChange:a=>X(a.target.value),className:"w-full h-full min-h-[300px] font-mono text-sm p-4 rounded resize-none",style:{backgroundColor:"#1e1e2e",color:"#cdd6f4",border:"none",outline:"none"},spellCheck:!1}):S[Y]?(0,e.jsx)("pre",{className:"font-mono text-sm whitespace-pre-wrap",style:{color:"#cdd6f4"},children:S[Y]}):(0,e.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4",children:[(0,e.jsx)("p",{className:"text-sm",style:{color:"#666"},children:"No script generated yet"}),(0,e.jsx)("button",{onClick:al,disabled:u,className:"px-4 py-2 text-sm rounded disabled:opacity-50",style:{backgroundColor:"var(--accent)",color:"white"},children:u?"Generating...":"Generate Script"})]})})]}):(0,e.jsx)("div",{className:"flex-1 flex items-center justify-center p-4",children:(0,e.jsxs)("div",{className:"text-center",style:{color:"var(--text-tertiary)"},children:[(0,e.jsx)("p",{className:"text-3xl md:text-4xl mb-3"}),(0,e.jsx)("p",{className:"text-sm",children:"Select a test case to view its script"})]})})})]}),"history"===q&&(0,e.jsxs)("div",{className:"flex-1 overflow-hidden flex flex-col md:flex-row",children:[(0,e.jsx)("div",{className:"w-full md:w-80 border-b md:border-b-0 md:border-r overflow-auto max-h-[40vh] md:max-h-none",style:{borderColor:"var(--border)"},children:(0,e.jsxs)("div",{className:"p-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,e.jsxs)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:["Run History (",d.runs.length,")"]}),d.runs.length>0&&(0,e.jsx)("button",{onClick:d.clearRuns,className:"text-xs underline",style:{color:"var(--status-fail-text)"},children:"Clear All"})]}),0===d.runs.length?(0,e.jsx)("div",{className:"text-center py-8 text-xs",style:{color:"var(--text-tertiary)"},children:"No test runs yet"}):(0,e.jsx)("div",{className:"space-y-2",children:d.runs.map(a=>(0,e.jsxs)("div",{className:"p-3 rounded-lg group relative",style:{backgroundColor:$?.id===a.id?"var(--bg-secondary)":"transparent",border:$?.id===a.id?"1px solid var(--border)":"1px solid transparent"},children:[(0,e.jsxs)("button",{onClick:()=>_(a),className:"w-full text-left",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("span",{className:"text-xs font-medium",style:{color:"var(--text-primary)"},children:new Date(a.timestamp).toLocaleString()}),(0,e.jsxs)("span",{className:"text-xs",style:{color:a.totalFailed>0?"var(--status-fail-text)":"var(--status-pass-text)"},children:[a.totalPassed,"✓ ",a.totalFailed,"✗"]})]}),(0,e.jsxs)("div",{className:"text-xs mt-1 truncate",style:{color:"var(--text-tertiary)"},children:[a.config.baseUrl," • ",a.config.browser]})]}),(0,e.jsx)("button",{onClick:()=>{d.deleteRun(a.id),$?.id===a.id&&_(null)},className:"absolute top-2 right-2 p-1 rounded opacity-0 group-hover:opacity-100 transition-opacity",style:{color:"var(--status-fail-text)"},title:"Delete run",children:"✕"})]},a.id))})]})}),(0,e.jsx)("div",{className:"flex-1 overflow-auto",children:$?(0,e.jsxs)("div",{className:"p-4 space-y-4",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-medium",style:{color:"var(--text-primary)"},children:"Run Details"}),(0,e.jsx)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:new Date($.timestamp).toLocaleString()})]}),(0,e.jsxs)("div",{className:"flex gap-3 text-sm",children:[(0,e.jsxs)("span",{style:{color:"var(--status-pass-text)"},children:["✓ ",$.totalPassed]}),(0,e.jsxs)("span",{style:{color:"var(--status-fail-text)"},children:["✗ ",$.totalFailed]})]})]}),(0,e.jsx)("div",{className:"space-y-2",children:$.results.map((a,b)=>(0,e.jsxs)("div",{className:"p-3 rounded-lg",style:{backgroundColor:"var(--bg-secondary)",border:`1px solid ${"pass"===a.status?"var(--status-pass-border)":"var(--status-fail-border)"}`},children:[(0,e.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,e.jsxs)("span",{className:"text-sm font-medium truncate",style:{color:"var(--text-primary)"},children:[a.testCaseCode||`Test ${b+1}`," - ",a.testCaseTitle]}),(0,e.jsx)("span",{className:"text-xs px-2 py-0.5 rounded shrink-0",style:{backgroundColor:"pass"===a.status?"var(--status-pass-bg)":"var(--status-fail-bg)",color:"pass"===a.status?"var(--status-pass-text)":"var(--status-fail-text)"},children:a.status.toUpperCase()})]}),a.error&&(0,e.jsx)("p",{className:"text-xs mt-2 p-2 rounded break-words",style:{backgroundColor:"var(--status-fail-bg)",color:"var(--status-fail-text)"},children:a.error}),(0,e.jsx)("div",{className:"mt-2 space-y-1",children:a.steps.map((a,b)=>(0,e.jsxs)("div",{className:"flex items-start gap-2 text-xs",children:[(0,e.jsx)("span",{className:"shrink-0",style:{color:"pass"===a.status?"var(--status-pass-text)":"var(--status-fail-text)"},children:"pass"===a.status?"✓":"✗"}),(0,e.jsx)("span",{style:{color:"var(--text-secondary)"},children:a.step})]},b))}),a.aiAnalysis&&(0,e.jsxs)("div",{className:"mt-2 p-2 rounded text-xs break-words",style:{backgroundColor:"var(--bg-primary)",color:"var(--text-secondary)"},children:[(0,e.jsx)("strong",{children:"AI:"})," ",a.aiAnalysis]})]},a.testCaseId))})]}):(0,e.jsx)("div",{className:"flex items-center justify-center h-full p-4",children:(0,e.jsxs)("div",{className:"text-center",style:{color:"var(--text-tertiary)"},children:[(0,e.jsx)("p",{className:"text-3xl md:text-4xl mb-3",children:"\uD83D\uDCCB"}),(0,e.jsx)("p",{className:"text-sm",children:"Select a run to view details"})]})})})]}),(0,e.jsxs)("div",{className:"p-3 md:p-4 border-t flex items-center justify-between shrink-0",style:{borderColor:"var(--border)"},children:[(0,e.jsxs)("div",{className:"text-xs truncate max-w-[200px] md:max-w-none",style:{color:"var(--text-tertiary)"},children:[s&&y&&(0,e.jsxs)("span",{children:["Running: ",y.title]}),!s&&w.length>0&&(0,e.jsxs)("span",{children:[w.length," tests completed"]}),!s&&0===w.length&&"runner"===q&&(0,e.jsx)("span",{className:"hidden sm:inline",children:"Config saved per project"})]}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)("button",{onClick:c,disabled:s,className:"px-3 md:px-4 py-2 text-sm rounded disabled:opacity-50",style:{border:"1px solid var(--border)",color:"var(--text-secondary)"},children:"Close"}),"runner"===q&&(s?(0,e.jsx)("button",{onClick:an,className:"px-3 md:px-4 py-2 text-sm rounded flex items-center gap-2",style:{backgroundColor:"#ef4444",color:"white"},children:"■ Stop"}):(0,e.jsx)("button",{onClick:am,disabled:0===ac.size,className:"px-3 md:px-4 py-2 text-sm rounded disabled:opacity-50",style:{backgroundColor:"var(--accent)",color:"white"},children:"▶ Run"}))]})]})]}),Q&&(0,e.jsx)("div",{className:"fixed inset-0 z-60 flex items-center justify-center p-4",style:{backgroundColor:"rgba(0,0,0,0.6)"},children:(0,e.jsxs)("div",{className:"w-full max-w-2xl max-h-[80vh] rounded-lg shadow-xl flex flex-col",style:{backgroundColor:"var(--bg-primary)",border:"1px solid var(--border)"},children:[(0,e.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",style:{borderColor:"var(--border)"},children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",style:{color:"var(--text-primary)"},children:"\uD83D\uDD27 Healing Report"}),(0,e.jsx)("p",{className:"text-xs mt-1",style:{color:"var(--text-tertiary)"},children:"AI recommendations"})]}),(0,e.jsx)("button",{onClick:()=>R(!1),className:"p-1 rounded hover:opacity-80",style:{color:"var(--text-tertiary)"},children:"✕"})]}),(0,e.jsx)("div",{className:"flex-1 overflow-auto p-4",children:(0,e.jsx)("pre",{className:"whitespace-pre-wrap text-xs font-mono break-words",style:{color:"var(--text-secondary)"},children:O})}),(0,e.jsx)("div",{className:"p-4 border-t flex justify-end",style:{borderColor:"var(--border)"},children:(0,e.jsx)("button",{onClick:()=>R(!1),className:"px-4 py-2 text-sm rounded",style:{backgroundColor:"var(--accent)",color:"white"},children:"Close"})})]})})]})}let ah=c(43249).$,ai=36,aj=(d="mx-auto flex h-[54px] w-max items-center justify-center gap-1.5 rounded-xl border p-2",a=>ah(d,null==a?void 0:a.class,null==a?void 0:a.className)),ak=i().forwardRef(({className:a,children:b,iconSize:c=ai,direction:d="middle",...f},g)=>(0,e.jsx)("div",{ref:g,...f,className:(0,n.cn)(aj({className:a}),{"items-start":"top"===d,"items-center":"middle"===d,"items-end":"bottom"===d}),children:b}));ak.displayName="Dock";let al=({size:a=ai,label:b,className:c,children:d,...f})=>{let[g,i]=(0,h.useState)(!1);return(0,e.jsxs)("div",{className:(0,n.cn)("relative flex items-center cursor-pointer rounded-lg transition-all duration-200",c),style:{height:a},onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),...f,children:[(0,e.jsxs)("div",{className:"flex items-center justify-center flex-shrink-0 transition-all duration-200",style:{width:a,height:a},children:[d,g&&(0,e.jsx)("div",{className:"absolute inset-0 rounded-lg overflow-hidden pointer-events-none",style:{opacity:.15},children:(0,e.jsx)("div",{style:{position:"absolute",inset:0,background:"linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.4) 45%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.4) 55%, transparent 60%)",backgroundSize:"200% 100%",animation:"dockShimmer 1.5s ease-in-out"}})})]}),(0,e.jsx)(I,{children:g&&b&&(0,e.jsx)(m.P.span,{initial:{width:0,opacity:0},animate:{width:"auto",opacity:1},exit:{width:0,opacity:0},transition:{duration:.35,ease:[.25,.1,.25,1]},className:"text-[10px] font-medium whitespace-nowrap overflow-hidden flex-shrink-0 pr-2",style:{color:"var(--text-secondary)"},children:b})})]})};function am({selectedNode:a,testCases:b,stats:c,columns:d,projectId:f,project:i,fullscreen:k,allNodes:l,allTestCases:m,onSelectNode:n,onAddTestCase:o,onUpdateTestCase:p,onDeleteTestCase:q,onBulkDelete:r,onBulkUpdate:s,onReorderTestCases:t,onReorderColumn:u,onToggleColumn:v,onRenameColumn:w,onUpdateNode:x,onAddColumn:y,onDeleteColumn:z,confirmDialog:A}){(0,j.useRouter)();let[B,C]=(0,h.useState)(!1),[D,E]=(0,h.useState)(!1),[F,G]=(0,h.useState)(!1),[H,I]=(0,h.useState)(!1),[N,O]=(0,h.useState)(!1),[P,Q]=(0,h.useState)(!1),[R,S]=(0,h.useState)(!1),[V,X]=(0,h.useState)(!1),[Y,Z]=(0,h.useState)(!1),[$,_]=(0,h.useState)(new Set),[ab,ad]=(0,h.useState)(new Set),[ae,ah]=(0,h.useState)(!1),[ai,aj]=(0,h.useState)(new Set),[am,ap]=(0,h.useState)(null),[aq,ar]=(0,h.useState)("asc"),[as,at]=(0,h.useState)(!1),[au,av]=(0,h.useState)(""),aw=(0,h.useRef)(null),ax=(0,h.useRef)(null),ay=k?d:d.filter(a=>"code"!==a.key),az=J._X.map(a=>a.key),aA=(0,h.useCallback)(a=>{aj(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),aB=(0,h.useCallback)(a=>{_(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),aC=(0,h.useCallback)(()=>_(new Set),[]),aD=(0,h.useCallback)(a=>{ad(b=>{let c=new Set(b);return c.has(a)?c.delete(a):c.add(a),c})},[]),aE=(0,h.useCallback)(()=>ad(new Set),[]),aF=$.size+ab.size,aG=b.filter(a=>{let b=0===$.size||$.has(a.status),c=0===ab.size||ab.has(a.case_type);return b&&c}),aH=(0,h.useCallback)(()=>{ai.size===aG.length?aj(new Set):aj(new Set(aG.map(a=>a.id)))},[ai.size,aG]),aI=(0,h.useCallback)(()=>aj(new Set),[]),aJ=(0,h.useCallback)(async()=>{a&&0!==ai.size&&(!A||await A("Delete Test Cases",`Delete ${ai.size} selected test case(s)?`))&&(r(a.id,Array.from(ai)),aj(new Set))},[a,ai,r,A]),aK=(0,h.useCallback)(b=>{a&&0!==ai.size&&(s(a.id,Array.from(ai),{status:b}),aj(new Set))},[a,ai,s]),aL=am?[...aG].sort((a,b)=>{let c=a[am]||"",d=b[am]||"",e=c.localeCompare(d);return"asc"===aq?e:-e}):aG,aM=(0,h.useCallback)(b=>{if(a)for(let c of b)o(a.id,c.title,c.steps,c.expected)},[a,o]),aN=(0,h.useCallback)(b=>{if(a)for(let c of b)o(a.id,c.title,c.steps,c.expected)},[a,o]);return a?(0,e.jsxs)("div",{className:"jsx-bc071752c54fb059 flex flex-col h-full relative",children:[(0,e.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-bc071752c54fb059 px-4 py-3 border-b",children:[(0,e.jsx)("h2",{style:{color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 text-base font-medium mb-2",children:a.label}),(0,e.jsx)(L,{value:c.passRate}),(0,e.jsxs)("div",{className:"jsx-bc071752c54fb059 flex items-center gap-1.5 mt-2 flex-wrap",children:[(0,e.jsx)("button",{onClick:()=>{ah(a=>!a),ae&&aj(new Set)},style:{backgroundColor:ae?"var(--accent)":"transparent",color:ae?"#fff":"var(--text-tertiary)",borderColor:ae?"transparent":"var(--border)"},className:"jsx-bc071752c54fb059 px-3 py-0.5 text-[10px] font-medium rounded-sm border transition-colors",children:"Select"}),ae&&ai.size>0&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("span",{style:{backgroundColor:"var(--accent)",color:"#fff"},className:"jsx-bc071752c54fb059 px-2 py-0.5 text-[10px] font-medium rounded-sm",children:[ai.size," selected"]}),(0,e.jsx)("button",{onClick:aI,style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-bc071752c54fb059 px-2 py-0.5 text-[10px] font-medium rounded-sm border transition-colors hover:bg-[var(--bg-secondary)]",children:"Unselect All"})]}),(0,e.jsxs)("div",{className:"jsx-bc071752c54fb059 relative flex items-center gap-1",children:[(0,e.jsx)("button",{onClick:()=>Z(a=>!a),style:{color:aF>0||Y?"var(--accent)":"var(--text-tertiary)"},title:"Filters",className:"jsx-bc071752c54fb059 relative p-1 rounded-sm transition-colors hover:bg-[var(--bg-secondary)]",children:(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:aF>0?"2.5":"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:(0,e.jsx)("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",className:"jsx-bc071752c54fb059"})})}),aF>0&&!Y&&(0,e.jsxs)("span",{style:{color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 text-[10px] font-medium",children:[aF," filter",aF>1?"s":""," active"]})]}),(0,e.jsx)("div",{className:"jsx-bc071752c54fb059 flex-1"}),(0,e.jsx)("button",{onClick:()=>C(a=>!a),style:{color:B?"var(--accent)":"var(--text-tertiary)"},title:"Notes",className:"jsx-bc071752c54fb059 p-1 rounded transition-colors hover:bg-[var(--bg-secondary)]",children:(0,e.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,e.jsx)("path",{d:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("path",{d:"M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z",className:"jsx-bc071752c54fb059"})]})}),(0,e.jsx)("button",{onClick:()=>X(a=>!a),style:{color:V?"var(--accent)":"var(--text-tertiary)"},title:V?"Collapse All":"Expand All",className:"jsx-bc071752c54fb059 p-1 rounded transition-colors hover:bg-[var(--bg-secondary)]",children:(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:V?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("polyline",{points:"7 3 3 6 7 9",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("polyline",{points:"17 15 21 18 17 21",className:"jsx-bc071752c54fb059"})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("polyline",{points:"17 3 21 6 17 9",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("polyline",{points:"7 15 3 18 7 21",className:"jsx-bc071752c54fb059"})]})})})]}),Y&&(0,e.jsxs)("div",{className:"jsx-bc071752c54fb059 flex items-center gap-1.5 flex-wrap",children:[(0,e.jsx)("div",{style:{backgroundColor:"var(--border)"},className:"jsx-bc071752c54fb059 w-px h-4 mx-0.5"}),[["all","All"],["untested","Untested"],["pass","Pass"],["fail","Fail"],["skip","Skip"],["blocked","Blocked"]].map(([a,c])=>{let d="all"===a?0===$.size:$.has(a),f="all"===a?b.length:b.filter(b=>b.status===a).length,g={all:{bg:"var(--bg-secondary)",text:"var(--text-secondary)"},untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)"},pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)"},blocked:{bg:"var(--status-blocked-bg)",text:"var(--status-blocked-text)"}}[a];return(0,e.jsxs)("button",{onClick:()=>"all"===a?aC():aB(a),style:{backgroundColor:d?g.bg:"transparent",color:d?g.text:"var(--text-tertiary)",borderColor:d?"transparent":"var(--border)"},className:"jsx-bc071752c54fb059 flex items-center gap-1 px-2 py-0.5 text-[10px] font-medium rounded-full border transition-colors",children:[c,(0,e.jsx)("span",{style:{backgroundColor:d?"rgba(0,0,0,0.1)":"var(--bg-secondary)",color:d?g.text:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 px-1 py-0 text-[9px] rounded-full min-w-[16px] text-center",children:f})]},a)}),(0,e.jsx)("div",{style:{backgroundColor:"var(--border)"},className:"jsx-bc071752c54fb059 w-px h-4 mx-0.5"}),[["all","All"],...J.D_.map(a=>[a,a])].map(([a,c])=>{let d="all"===a?0===ab.size:ab.has(a),f="all"===a?b.length:b.filter(b=>b.case_type===a).length,g={all:{bg:"var(--bg-secondary)",text:"var(--text-secondary)"},Positive:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},Negative:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},General:{bg:"var(--bg-secondary)",text:"var(--text-tertiary)"}},h=g[a]||g.General;return(0,e.jsxs)("button",{onClick:()=>"all"===a?aE():aD(a),style:{backgroundColor:d?h.bg:"transparent",color:d?h.text:"var(--text-tertiary)",borderColor:d?"transparent":"var(--border)"},className:"jsx-bc071752c54fb059 flex items-center gap-1 px-2 py-0.5 text-[10px] font-medium rounded-full border transition-colors",children:[c,(0,e.jsx)("span",{style:{backgroundColor:d?"rgba(0,0,0,0.1)":"var(--bg-secondary)",color:d?h.text:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 px-1 py-0 text-[9px] rounded-full min-w-[16px] text-center",children:f})]},`ct-${a}`)})]})]}),B&&(0,e.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-bc071752c54fb059 px-4 py-3 border-b",children:[(0,e.jsx)("label",{style:{color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 text-xs font-medium mb-1 block",children:"Node Notes"}),(0,e.jsx)("textarea",{value:a.notes??"",onChange:b=>x(a.id,{notes:b.target.value}),placeholder:"Add notes for this node...",rows:3,style:{borderColor:"var(--border)",borderRadius:"var(--radius-sm)",color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 w-full px-3 py-2 text-sm bg-transparent outline-none border resize-none"})]}),(0,e.jsx)("div",{className:"jsx-bc071752c54fb059 px-4 py-3",children:(0,e.jsx)(M,{onAdd:b=>o(a.id,b),nodeLabel:a.label})}),(0,e.jsx)("div",{className:"jsx-bc071752c54fb059 flex-1 min-h-0 overflow-auto px-2",children:0===b.length?(0,e.jsx)(K.p,{message:"No test cases yet. Use the quick-add bar or Generate button to add test cases."}):(0,e.jsx)(T,{testCases:aL,columns:ay,expandAll:V,selectMode:ae,selectedIds:ai,onToggleSelect:aA,onToggleSelectAll:aH,sortKey:am,sortDirection:aq,onSortChange:a=>{null===a?ap(null):am===a?ar(a=>"asc"===a?"desc":"asc"):(ap(a),ar("asc"))},onUpdate:(b,c)=>p(a.id,b,c),onDelete:b=>q(a.id,b),onReorder:b=>t(a.id,b),onAddColumn:y?b=>y(a.id,b):void 0,onOpenColumns:()=>S(!0)})}),ae&&ai.size>0&&(0,e.jsxs)("div",{style:{borderColor:"var(--border)",animation:"fadeInUp 150ms ease-out"},className:"jsx-bc071752c54fb059 px-4 py-2 border-t flex items-center gap-3",children:[(0,e.jsxs)("span",{style:{color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 text-xs font-medium",children:[ai.size," selected"]}),(0,e.jsx)("div",{className:"jsx-bc071752c54fb059 flex-1"}),[["pass","P"],["fail","F"],["skip","K"],["untested","U"],["blocked","B"]].map(([a,b])=>(0,e.jsxs)("button",{onClick:()=>aK(a),style:{borderColor:"var(--border)",color:"var(--text-secondary)"},title:`Mark ${a} (${b})`,className:"jsx-bc071752c54fb059 px-2 py-1 text-[10px] font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",children:[a.charAt(0).toUpperCase()+a.slice(1),(0,e.jsx)("kbd",{style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 ml-1 text-[8px] px-0.5 rounded",children:b})]},a)),(0,e.jsx)("div",{style:{backgroundColor:"var(--border)"},className:"jsx-bc071752c54fb059 w-px h-4"}),(0,e.jsxs)("button",{onClick:aJ,style:{borderColor:"var(--border)",color:"var(--status-fail-text)"},title:"Delete (D)",className:"jsx-bc071752c54fb059 px-2 py-1 text-[10px] font-medium rounded-md border transition-colors hover:bg-[var(--status-fail-bg)]",children:["Delete",(0,e.jsx)("kbd",{style:{backgroundColor:"var(--bg-secondary)",color:"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 ml-1 text-[8px] px-0.5 rounded",children:"D"})]}),(0,e.jsx)("button",{onClick:aI,style:{color:"var(--text-tertiary)"},title:"Clear (Esc)",className:"jsx-bc071752c54fb059 px-1.5 py-1 text-[10px] font-medium rounded-md transition-colors hover:bg-[var(--bg-secondary)]",children:"\xd7"})]}),(0,e.jsx)(U,{stats:c,fullscreen:k,nodes:l,allTestCases:m,selectedNodeId:a?.id,onSelectNode:n}),(0,e.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-primary)"},className:"jsx-bc071752c54fb059 flex-shrink-0 border-t py-2 flex justify-center relative",children:[R&&(0,e.jsx)("div",{ref:ax,style:{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:4,backgroundColor:"var(--bg-card)",borderColor:"var(--border)",boxShadow:"var(--shadow-lg)",animation:"fadeIn 150ms ease-out",width:180},className:"jsx-bc071752c54fb059 absolute z-30 rounded-lg border",children:(0,e.jsxs)("div",{className:"jsx-bc071752c54fb059 py-1 max-h-[240px] overflow-y-auto",children:[d.map((c,f)=>{let g=!az.includes(c.key);return(0,e.jsxs)("div",{className:"jsx-bc071752c54fb059 flex items-center justify-between px-3 py-1.5 text-[11px] hover:bg-[var(--bg-secondary)] transition-colors group/col",children:[(0,e.jsxs)("button",{onClick:()=>a&&v(a.id,c.key),style:{color:c.visible?"var(--text-primary)":"var(--text-tertiary)"},className:"jsx-bc071752c54fb059 flex items-center gap-2 flex-1 text-left",children:[(0,e.jsx)("span",{className:"jsx-bc071752c54fb059 w-3 text-center",children:c.visible?"✓":""}),(0,e.jsx)("span",{className:"jsx-bc071752c54fb059",children:c.label})]}),(0,e.jsxs)("div",{className:"jsx-bc071752c54fb059 flex items-center gap-0.5 opacity-0 group-hover/col:opacity-100 transition-opacity",children:[(0,e.jsx)("button",{onClick:()=>a&&u?.(a.id,c.key,"up"),disabled:0===f,style:{color:"var(--text-tertiary)"},title:"Move up",className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded text-[10px] disabled:opacity-20 hover:bg-[var(--bg-secondary)]",children:"↑"}),(0,e.jsx)("button",{onClick:()=>a&&u?.(a.id,c.key,"down"),disabled:f===d.length-1,style:{color:"var(--text-tertiary)"},title:"Move down",className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded text-[10px] disabled:opacity-20 hover:bg-[var(--bg-secondary)]",children:"↓"}),g&&(0,e.jsx)("button",{onClick:async()=>{if(a&&z)(!b.some(a=>{let b=a[c.key];return b&&"string"==typeof b&&""!==b.trim()})||!A||await A("Delete Column",`This column has data in some test cases. Delete "${c.label}" anyway?`))&&z(a.id,c.key)},style:{color:"var(--status-fail-text)"},title:`Delete ${c.label}`,className:"jsx-bc071752c54fb059 w-4 h-4 flex items-center justify-center rounded hover:opacity-100 transition-opacity text-[10px]",children:"\xd7"})]})]},c.key)}),as?(0,e.jsx)("div",{className:"jsx-bc071752c54fb059 px-3 py-1.5",children:(0,e.jsx)("input",{ref:aw,value:au,onChange:a=>av(a.target.value),onKeyDown:b=>{"Enter"===b.key&&au.trim()&&(y?.(a.id,au.trim()),av(""),at(!1)),"Escape"===b.key&&(at(!1),av(""))},onBlur:()=>{au.trim()&&y?.(a.id,au.trim()),av(""),at(!1)},placeholder:"Column name...",style:{borderColor:"var(--accent)",backgroundColor:"var(--bg-card)",color:"var(--text-primary)"},className:"jsx-bc071752c54fb059 w-full px-2 py-1 text-[11px] rounded border outline-none"})}):(0,e.jsxs)("button",{onClick:()=>at(!0),style:{color:"var(--accent)"},className:"jsx-bc071752c54fb059 w-full px-3 py-1.5 text-[11px] text-left flex items-center gap-2 hover:bg-[var(--bg-secondary)] transition-colors",children:[(0,e.jsx)("span",{className:"jsx-bc071752c54fb059 w-3 text-center",children:"+"}),(0,e.jsx)("span",{className:"jsx-bc071752c54fb059",children:"Add Column"})]})]})}),(0,e.jsxs)(ak,{direction:"middle",iconSize:36,children:[(0,e.jsx)(al,{label:"Summary",onClick:()=>I(!0),children:(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,e.jsx)("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("polyline",{points:"14 2 14 8 20 8",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("polyline",{points:"10 9 9 9 8 9",className:"jsx-bc071752c54fb059"})]})}),(0,e.jsx)(al,{label:"Columns",onClick:()=>S(!R),children:(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:R?"var(--accent)":"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,e.jsx)("rect",{x:"3",y:"3",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("rect",{x:"14",y:"3",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("rect",{x:"14",y:"14",width:"7",height:"7",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("rect",{x:"3",y:"14",width:"7",height:"7",className:"jsx-bc071752c54fb059"})]})}),(0,e.jsx)("div",{style:{backgroundColor:"var(--border)"},className:"jsx-bc071752c54fb059 w-px h-5 mx-0.5 flex-shrink-0"}),(0,e.jsx)(ao,{onExport:()=>E(!0),onImport:()=>O(!0)}),(0,e.jsx)(an,{selectedNode:a,filteredTestCases:aG,columns:d}),(0,e.jsx)("div",{style:{backgroundColor:"var(--border)"},className:"jsx-bc071752c54fb059 w-px h-5 mx-0.5 flex-shrink-0"}),(0,e.jsx)(al,{label:"E2E Test",onClick:()=>Q(!0),children:(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:[(0,e.jsx)("circle",{cx:"12",cy:"12",r:"10",className:"jsx-bc071752c54fb059"}),(0,e.jsx)("polyline",{points:"12 6 12 12 16 14",className:"jsx-bc071752c54fb059"})]})}),(0,e.jsx)(al,{label:"Generate",onClick:()=>G(!0),children:(0,e.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-bc071752c54fb059",children:(0,e.jsx)("polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",className:"jsx-bc071752c54fb059"})})})]})]}),(0,e.jsx)(W,{open:D,onClose:()=>E(!1),node:a,testCases:aL,columns:d}),(0,e.jsx)(aa,{open:F,onClose:()=>G(!1),node:a,project:i,onGenerate:aM}),(0,e.jsx)(ac,{open:H,onClose:()=>I(!1),node:a,testCases:b,stats:c}),(0,e.jsx)(af,{open:N,onClose:()=>O(!1),onImport:aN,nodeLabel:a.label}),P&&a&&(0,e.jsx)(ag,{testCases:b,projectId:f,onClose:()=>Q(!1)}),(0,e.jsx)(g(),{id:"bc071752c54fb059",children:"@keyframes fadeInUp{from{opacity:0;transform:translatey(8px)}to{opacity:1;transform:translatey(0)}}"})]}):(0,e.jsx)("div",{className:"h-full",children:(0,e.jsx)(K.p,{message:"Select a node from the mindmap to view its test cases."})})}function an({selectedNode:a,filteredTestCases:b,columns:c}){let[d,f]=(0,h.useState)(!1),[g,i]=(0,h.useState)(null),j=d=>{let e="md"===d?(0,V.wy)(a,b,c):(0,V.nN)(a,b);navigator.clipboard.writeText(e).then(()=>{i(d),setTimeout(()=>i(null),2e3)})};return(0,e.jsxs)("div",{className:"relative flex items-center cursor-pointer rounded-lg",style:{height:36},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:[(0,e.jsxs)("div",{className:"flex items-center justify-center flex-shrink-0",style:{width:36,height:36},children:[(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,e.jsx)("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]}),d&&(0,e.jsx)("div",{className:"absolute inset-0 rounded-lg overflow-hidden pointer-events-none",style:{opacity:.15},children:(0,e.jsx)("div",{style:{position:"absolute",inset:0,background:"linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.4) 45%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.4) 55%, transparent 60%)",backgroundSize:"200% 100%",animation:"dockShimmer 1.5s ease-in-out"}})})]}),(0,e.jsx)(I,{children:d&&(0,e.jsxs)(m.P.div,{initial:{width:0,opacity:0},animate:{width:"auto",opacity:1},exit:{width:0,opacity:0},transition:{duration:.5,ease:[.25,.1,.25,1]},className:"flex items-center gap-0 overflow-hidden whitespace-nowrap flex-shrink-0",children:[(0,e.jsx)("button",{onClick:a=>{a.stopPropagation(),j("md")},className:"text-[10px] font-medium px-1.5 py-0.5 rounded transition-colors hover:bg-[var(--bg-secondary)]",style:{color:"md"===g?"var(--accent)":"var(--text-secondary)"},children:"md"===g?"Copied!":"Markdown"}),(0,e.jsx)("span",{className:"text-[10px]",style:{color:"var(--border)"},children:"|"}),(0,e.jsx)("button",{onClick:a=>{a.stopPropagation(),j("json")},className:"text-[10px] font-medium px-1.5 py-0.5 rounded transition-colors hover:bg-[var(--bg-secondary)]",style:{color:"json"===g?"var(--accent)":"var(--text-secondary)"},children:"json"===g?"Copied!":"JSON"})]})})]})}function ao({onExport:a,onImport:b}){let[c,d]=(0,h.useState)(!1);return(0,e.jsxs)("div",{className:"relative flex items-center cursor-pointer rounded-lg",style:{height:36},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[(0,e.jsxs)("div",{className:"flex items-center justify-center flex-shrink-0",style:{width:36,height:36},children:[(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-secondary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("polyline",{points:"17 1 21 5 17 9"}),(0,e.jsx)("path",{d:"M3 11V9a4 4 0 014-4h14"}),(0,e.jsx)("polyline",{points:"7 23 3 19 7 15"}),(0,e.jsx)("path",{d:"M21 13v2a4 4 0 01-4 4H3"})]}),c&&(0,e.jsx)("div",{className:"absolute inset-0 rounded-lg overflow-hidden pointer-events-none",style:{opacity:.15},children:(0,e.jsx)("div",{style:{position:"absolute",inset:0,background:"linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.4) 45%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.4) 55%, transparent 60%)",backgroundSize:"200% 100%",animation:"dockShimmer 1.5s ease-in-out"}})})]}),(0,e.jsx)(I,{children:c&&(0,e.jsxs)(m.P.div,{initial:{width:0,opacity:0},animate:{width:"auto",opacity:1},exit:{width:0,opacity:0},transition:{duration:.5,ease:[.25,.1,.25,1]},className:"flex items-center gap-0 overflow-hidden whitespace-nowrap flex-shrink-0",children:[(0,e.jsx)("button",{onClick:b=>{b.stopPropagation(),a()},className:"text-[10px] font-medium px-1.5 py-0.5 rounded transition-colors hover:bg-[var(--bg-secondary)]",style:{color:"var(--text-secondary)"},children:"Export"}),(0,e.jsx)("span",{className:"text-[10px]",style:{color:"var(--border)"},children:"|"}),(0,e.jsx)("button",{onClick:a=>{a.stopPropagation(),b()},className:"text-[10px] font-medium px-1.5 py-0.5 rounded transition-colors hover:bg-[var(--bg-secondary)]",style:{color:"var(--text-secondary)"},children:"Import"})]})})]})}function ap({nodes:a,testCases:b,onSelectNode:c,onClose:d}){let[f,g]=(0,h.useState)(""),[i,j]=(0,h.useState)(0),k=(0,h.useRef)(null),l=(0,h.useRef)(null),m=(0,h.useMemo)(()=>{if(!f.trim())return[];let c=f.toLowerCase().trim(),d=[];for(let e of a)for(let a of b[e.id]??[]){let b=a.title.toLowerCase().includes(c),f=a.steps.toLowerCase().includes(c),g=a.expected.toLowerCase().includes(c),h=a.code.toLowerCase().includes(c);if(b||f||g||h){let b="title",c=a.title;f?(b="steps",c=a.steps):g?(b="expected",c=a.expected):h&&(b="code",c=a.code),d.push({node:e,testCase:a,matchField:b,matchText:c})}}return d},[f,a,b]),n=(0,h.useCallback)(a=>{c(a.node.id),d()},[c,d]),o=(0,h.useCallback)(a=>{"Escape"===a.key?d():"ArrowDown"===a.key?(a.preventDefault(),j(a=>Math.min(a+1,m.length-1))):"ArrowUp"===a.key?(a.preventDefault(),j(a=>Math.max(a-1,0))):"Enter"===a.key&&m.length>0&&(a.preventDefault(),n(m[i]))},[m,i,n,d]),p=(a,b)=>{if(!b.trim())return a;let c=a.toLowerCase().indexOf(b.toLowerCase());if(-1===c)return a;let d=a.slice(0,c),f=a.slice(c,c+b.length),g=a.slice(c+b.length);return(0,e.jsxs)(e.Fragment,{children:[d.length>30&&"...",d.length>30?d.slice(-30):d,(0,e.jsx)("mark",{style:{backgroundColor:"var(--accent)",color:"#fff",borderRadius:2,padding:"0 1px"},children:f}),g.slice(0,40),g.length>40&&"..."]})},q={untested:{bg:"var(--status-untested-bg)",text:"var(--status-untested-text)"},pass:{bg:"var(--status-pass-bg)",text:"var(--status-pass-text)"},fail:{bg:"var(--status-fail-bg)",text:"var(--status-fail-text)"},skip:{bg:"var(--status-skip-bg)",text:"var(--status-skip-text)"},blocked:{bg:"var(--status-blocked-bg)",text:"var(--status-blocked-text)"}};return(0,e.jsx)("div",{className:"fixed inset-0 z-[350] flex items-start justify-center pt-[15vh]",style:{backgroundColor:"rgba(0,0,0,0.3)",animation:"fadeIn 150ms ease-out"},onClick:d,children:(0,e.jsxs)("div",{className:"w-full max-w-lg rounded-xl overflow-hidden",style:{backgroundColor:"var(--bg-card)",boxShadow:"var(--shadow-lg)"},onClick:a=>a.stopPropagation(),children:[(0,e.jsxs)("div",{className:"flex items-center gap-2 px-4 py-3 border-b",style:{borderColor:"var(--border)"},children:[(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"var(--text-tertiary)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,e.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,e.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]}),(0,e.jsx)("input",{ref:k,value:f,onChange:a=>g(a.target.value),onKeyDown:o,placeholder:"Search test cases...",className:"flex-1 bg-transparent outline-none text-sm",style:{color:"var(--text-primary)"}}),(0,e.jsx)("kbd",{className:"text-[10px] px-1.5 py-0.5 rounded border",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"ESC"})]}),(0,e.jsxs)("div",{ref:l,className:"max-h-[300px] overflow-y-auto",children:[f.trim()&&0===m.length&&(0,e.jsx)("div",{className:"px-4 py-8 text-center",children:(0,e.jsxs)("p",{className:"text-xs",style:{color:"var(--text-tertiary)"},children:["No test cases found for “",f,"”"]})}),m.map((a,b)=>{let c=q[a.testCase.status]||q.untested;return(0,e.jsxs)("div",{"data-search-item":!0,className:"flex items-start gap-3 px-4 py-2.5 cursor-pointer transition-colors",style:{backgroundColor:b===i?"var(--bg-secondary)":"transparent",borderLeft:b===i?"2px solid var(--accent)":"2px solid transparent"},onClick:()=>n(a),onMouseEnter:()=>j(b),children:[(0,e.jsx)("div",{className:"w-2 h-2 rounded-full mt-1.5 flex-shrink-0",style:{backgroundColor:c.text}}),(0,e.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,e.jsx)("div",{className:"flex items-center gap-2 mb-0.5",children:(0,e.jsx)("span",{className:"text-[10px] font-mono truncate",style:{color:"var(--text-tertiary)"},children:a.node.code||a.node.label})}),(0,e.jsx)("div",{className:"text-xs font-medium truncate",style:{color:"var(--text-primary)"},children:p(a.testCase.title,f)}),"title"!==a.matchField&&(0,e.jsxs)("div",{className:"text-[11px] truncate mt-0.5",style:{color:"var(--text-tertiary)"},children:[(0,e.jsxs)("span",{className:"font-medium",style:{color:"var(--text-secondary)"},children:[a.matchField,":"]})," ",p(a.matchText,f)]})]}),(0,e.jsx)("span",{className:"text-[10px] font-medium px-1.5 py-0.5 rounded-full flex-shrink-0",style:{backgroundColor:c.bg,color:c.text},children:a.testCase.status})]},`${a.node.id}-${a.testCase.id}`)})]}),f.trim()&&m.length>0&&(0,e.jsxs)("div",{className:"flex items-center gap-3 px-4 py-2 border-t",style:{borderColor:"var(--border)"},children:[(0,e.jsxs)("span",{className:"text-[10px]",style:{color:"var(--text-tertiary)"},children:[m.length," result",1!==m.length?"s":""]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("kbd",{className:"text-[9px] px-1 py-0.5 rounded border",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"↑↓"}),(0,e.jsx)("span",{className:"text-[9px]",style:{color:"var(--text-tertiary)"},children:"navigate"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("kbd",{className:"text-[9px] px-1 py-0.5 rounded border",style:{borderColor:"var(--border)",color:"var(--text-tertiary)"},children:"↵"}),(0,e.jsx)("span",{className:"text-[9px]",style:{color:"var(--text-tertiary)"},children:"go to node"})]})]})]})})}function aq(){let a=(0,j.useParams)(),b=(0,j.useRouter)(),c=a.projectId,{projects:d,activeProject:f,activeProjectId:i,selectedNodeId:l,setSelectedNodeId:m,switchProject:n,mindmap:o,testCases:p,pushState:q,lastSaved:r,canUndo:s,canRedo:u,undo:v,redo:w,confirmDialog:x}=(0,k.M)(),y=d[c]??null;(0,h.useRef)(null);let z=i===c?f:y,A=(0,h.useMemo)(()=>z?.flows.find(a=>a.id===l)??null,[z,l]),[B,C]=(0,h.useState)("mindmap"),[D,E]=(0,h.useState)(!1),[F,G]=(0,h.useState)(()=>new Date),[H,I]=(0,h.useState)(.5),[J,L]=(0,h.useState)(!1),[M,N]=(0,h.useState)(!1),[O,P]=(0,h.useState)(!1),[Q,R]=(0,h.useState)(!1),S=(0,h.useRef)(null),T=(0,h.useRef)(null),U=(0,h.useRef)(null),V=(0,h.useRef)(null),W=(0,h.useRef)({mouseX:0,startRatio:.5}),X=(0,h.useCallback)(a=>{a.preventDefault(),W.current={mouseX:a.clientX,startRatio:H},L(!0)},[H]);return y?z?(0,e.jsxs)("div",{className:"jsx-a894832df36b68ca h-full flex flex-col",children:[(0,e.jsxs)("div",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-card)"},className:"jsx-a894832df36b68ca flex md:hidden border-b flex-shrink-0",children:[(0,e.jsx)("button",{onClick:()=>C("mindmap"),style:{color:"mindmap"===B?"var(--accent)":"var(--text-tertiary)",borderBottom:"mindmap"===B?"2px solid var(--accent)":"2px solid transparent"},className:"jsx-a894832df36b68ca flex-1 px-4 py-2 text-xs font-medium transition-colors",children:"Mindmap"}),(0,e.jsx)("button",{onClick:()=>C("testcases"),style:{color:"testcases"===B?"var(--accent)":"var(--text-tertiary)",borderBottom:"testcases"===B?"2px solid var(--accent)":"2px solid transparent"},className:"jsx-a894832df36b68ca flex-1 px-4 py-2 text-xs font-medium transition-colors",children:"Test Cases"})]}),(0,e.jsxs)("div",{style:{borderColor:"var(--border)"},className:"jsx-a894832df36b68ca flex items-center justify-between px-4 py-1.5 border-b flex-shrink-0",children:[(0,e.jsx)("div",{style:{color:"var(--text-tertiary)"},className:"jsx-a894832df36b68ca text-[10px]",children:r?(0,e.jsxs)("span",{className:"jsx-a894832df36b68ca",children:["Last saved ",function(a,b){let c=new Date(a),d=Math.floor((b.getTime()-c.getTime())/1e3),e=Math.floor(d/60),f=Math.floor(e/60);return d<10?"just now":d<60?`${d}s ago`:e<60?`${e}m ago`:f<24?`${f}h ago`:c.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}(r,F)]}):(0,e.jsx)("span",{className:"jsx-a894832df36b68ca",children:"Not saved yet"})}),(0,e.jsxs)("div",{className:"jsx-a894832df36b68ca flex items-center gap-2",children:[(0,e.jsxs)("button",{onClick:()=>E(!0),style:{borderColor:"var(--border)",color:"var(--text-tertiary)",minWidth:160},title:"Search test cases (Ctrl+K)",className:"jsx-a894832df36b68ca flex items-center gap-1.5 px-4 py-1 rounded-md border text-[11px] transition-colors hover:bg-[var(--bg-secondary)]",children:[(0,e.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:[(0,e.jsx)("circle",{cx:"11",cy:"11",r:"8",className:"jsx-a894832df36b68ca"}),(0,e.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65",className:"jsx-a894832df36b68ca"})]}),(0,e.jsx)("span",{className:"jsx-a894832df36b68ca hidden sm:inline",children:"Search test cases..."}),(0,e.jsx)("kbd",{style:{borderColor:"var(--border)",backgroundColor:"var(--bg-secondary)"},className:"jsx-a894832df36b68ca text-[9px] px-1 py-0.5 rounded border ml-auto hidden sm:inline",children:"⌘K"})]}),(0,e.jsx)("button",{onClick:()=>b.push(`/projects/${c}/summary`),style:{borderColor:"var(--border)",color:"var(--text-secondary)"},className:"jsx-a894832df36b68ca hidden md:block px-3 py-1 text-xs font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",children:"Project Report"}),(0,e.jsx)("button",{onClick:()=>{R(!0),setTimeout(()=>R(!1),1500);let a=new Event("save-project");window.dispatchEvent(a)},style:{borderColor:Q?"var(--status-pass-text)":"var(--border)",color:Q?"var(--status-pass-text)":"var(--text-secondary)",backgroundColor:Q?"var(--status-pass-bg)":"transparent"},className:"jsx-a894832df36b68ca px-3 py-1 text-xs font-medium rounded-md border transition-all",children:Q?"Saved!":"Save"}),(0,e.jsx)("div",{className:"jsx-a894832df36b68ca flex-1"}),(0,e.jsx)("button",{onClick:()=>P(a=>!a),style:{color:"var(--text-tertiary)"},title:O?"Exit fullscreen":"Expand test cases",className:"jsx-a894832df36b68ca p-1.5 rounded transition-colors hover:bg-[var(--bg-secondary)]",children:O?(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:(0,e.jsx)("path",{d:"M8 3v3a2 2 0 01-2 2H3m18 0h-3a2 2 0 01-2-2V3m0 18v-3a2 2 0 012-2h3M3 16h3a2 2 0 012 2v3",className:"jsx-a894832df36b68ca"})}):(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-a894832df36b68ca",children:(0,e.jsx)("path",{d:"M8 3H5a2 2 0 00-2 2v3m18 0V5a2 2 0 00-2-2h-3m0 18h3a2 2 0 002-2v-3M3 16v3a2 2 0 002 2h3",className:"jsx-a894832df36b68ca"})})})]})]}),(0,e.jsxs)("div",{ref:S,style:{cursor:J?"col-resize":void 0},className:"jsx-a894832df36b68ca flex-1 flex min-h-0 relative",children:[!O&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{ref:T,style:{width:`${100*H}%`},className:`jsx-a894832df36b68ca
|
|
14
|
+
${"mindmap"===B?"flex":"hidden"}
|
|
69
15
|
md:flex flex-col min-w-0 mobile-full-width
|
|
70
|
-
`,children:(0,
|
|
71
|
-
${"testcases"===
|
|
16
|
+
`,children:(0,e.jsx)(t,{nodes:o.nodes,edges:o.edges,testCases:z.testCases??{},selectedNodeId:l,onSelect:o.selectNode,onAddNode:(a,b,c,d)=>{q("Add node"),o.addNode(a,b,c,d)},onDeleteNode:a=>{q("Delete node"),o.deleteNode(a)},onDeleteNodes:a=>{q("Delete nodes"),o.deleteNodes(a)},onUnlinkNode:a=>{q("Unlink node"),o.unlinkNode(a)},onRenameNode:(a,b)=>{q("Rename node"),o.renameNode(a,b)},onUpdateNode:(a,b)=>{q("Update node"),o.updateNode(a,b)},onAddEdge:(a,b,c)=>{q("Add edge"),o.addEdge(a,b,c)},onDeleteEdge:a=>{q("Delete edge"),o.deleteEdge(a)},onUpdateEdge:(a,b)=>{q("Update edge"),o.updateEdge(a,b)},onResetLayout:()=>{q("Reset layout"),o.resetLayout()},canUndo:s,canRedo:u,onUndo:v,onRedo:w})}),(0,e.jsxs)("div",{ref:V,style:{width:20,cursor:"col-resize"},onMouseDown:X,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),className:"jsx-a894832df36b68ca hidden md:flex items-center justify-center flex-shrink-0 select-none relative group",children:[(0,e.jsx)("div",{style:{backgroundColor:M||J?"var(--bg-secondary)":"transparent"},className:"jsx-a894832df36b68ca absolute inset-y-0 -left-2 -right-2 transition-colors duration-150"}),(0,e.jsx)("div",{style:{backgroundColor:"var(--border)",opacity:M||J?0:1},className:"jsx-a894832df36b68ca absolute inset-y-0 left-1/2 -translate-x-1/2 w-[1px] transition-opacity duration-150"}),(0,e.jsx)("div",{style:{background:"linear-gradient(180deg, #9E7AFF 0%, #FE8BBB 50%, #9E7AFF 100%)",opacity:M||J?.8:.4,animation:"beamFlow 3s ease-in-out infinite",backgroundSize:"100% 200%"},className:"jsx-a894832df36b68ca absolute inset-y-0 left-1/2 -translate-x-1/2 w-[2px] transition-opacity duration-150"}),(0,e.jsxs)("div",{className:"jsx-a894832df36b68ca relative z-10 flex flex-col gap-1.5",children:[(0,e.jsx)("div",{style:{backgroundColor:M||J?"var(--text-secondary)":"var(--text-tertiary)"},className:"jsx-a894832df36b68ca w-1.5 h-1.5 rounded-full transition-colors duration-150"}),(0,e.jsx)("div",{style:{backgroundColor:M||J?"var(--text-secondary)":"var(--text-tertiary)"},className:"jsx-a894832df36b68ca w-1.5 h-1.5 rounded-full transition-colors duration-150"}),(0,e.jsx)("div",{style:{backgroundColor:M||J?"var(--text-secondary)":"var(--text-tertiary)"},className:"jsx-a894832df36b68ca w-1.5 h-1.5 rounded-full transition-colors duration-150"})]})]})]}),(0,e.jsx)("div",{ref:U,style:{width:O?"100%":`${(1-H)*100}%`},className:`jsx-a894832df36b68ca
|
|
17
|
+
${"testcases"===B?"flex":"hidden"}
|
|
72
18
|
md:flex flex-col min-w-0 mobile-full-width
|
|
73
|
-
`,children:(0,
|
|
19
|
+
`,children:(0,e.jsx)(am,{selectedNode:A,testCases:p.testCases,stats:p.stats,columns:l?z.columnConfigs?.[l]??z.columnConfig??[]:z.columnConfig??[],projectId:c,project:z,fullscreen:O,allNodes:z.flows,allTestCases:z.testCases,onSelectNode:a=>{m(a),o.selectNode(a)},onAddTestCase:(...a)=>{q("Add test case"),p.addTestCase(...a)},onUpdateTestCase:(...a)=>{q("Update test case"),p.updateTestCase(...a)},onDeleteTestCase:(...a)=>{q("Delete test case"),p.deleteTestCase(...a)},onBulkDelete:(...a)=>{q("Delete test cases"),p.bulkDeleteTestCases(...a)},onBulkUpdate:(...a)=>{q("Update test cases"),p.bulkUpdateTestCases(...a)},onReorderTestCases:(...a)=>{q("Reorder test cases"),p.reorderTestCases(...a)},onToggleColumn:(...a)=>{q("Toggle column"),p.toggleColumnVisibility(...a)},onRenameColumn:(...a)=>{q("Rename column"),p.updateColumnConfig(...a)},onUpdateNode:(...a)=>{q("Update node"),o.updateNode(...a)},onAddColumn:(...a)=>{q("Add column"),p.addColumn(...a)},onDeleteColumn:(...a)=>{q("Delete column"),p.deleteColumn(...a)},onReorderColumn:(...a)=>{q("Reorder column"),p.reorderColumn(...a)},confirmDialog:x})})]}),(0,e.jsx)(g(),{id:"a894832df36b68ca",children:"@media(max-width:767px){.mobile-full-width.jsx-a894832df36b68ca{width:100%!important}}"}),D&&z&&(0,e.jsx)(ap,{nodes:z.flows,testCases:z.testCases??{},onSelectNode:a=>{m(a),o.selectNode(a)},onClose:()=>E(!1)})]}):(0,e.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,e.jsx)("div",{className:"text-sm",style:{color:"var(--text-tertiary)"},children:"Loading project..."})}):(0,e.jsx)(K.p,{message:"Project not found.",action:{label:"Back to Projects",onClick:()=>b.push("/projects")}})}al.displayName="DockIcon"},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},12412:a=>{"use strict";a.exports=require("assert")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},22017:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>E.a,__next_app__:()=>K,handler:()=>M,pages:()=>J,routeModule:()=>L,tree:()=>I});var d=c(49754),e=c(9117),f=c(46595),g=c(32324),h=c(39326),i=c(38928),j=c(20175),k=c(12),l=c(54290),m=c(12696),n=c(52574),o=c(82802),p=c(77533),q=c(45229),r=c(32822),s=c(261),t=c(26453),u=c(52474),v=c(26713),w=c(51356),x=c(62685),y=c(36225),z=c(63446),A=c(2762),B=c(45742),C=c(86439),D=c(81170),E=c.n(D),F=c(62506),G=c(91203),H={};for(let a in F)0>["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(H[a]=()=>F[a]);c.d(b,H);let I={children:["",{children:["(dashboard)",{children:["projects",{children:["[projectId]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,41009)),"/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/projects/[projectId]/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,97788)),"/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/layout.tsx"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,87028,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,90461,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,32768,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,51472)),"/home/sltr91025/code-repository/open-source/test-lah/src/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,81170,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,87028,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,90461,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,32768,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.children,J=["/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/projects/[projectId]/page.tsx"],K={require:c,loadChunk:()=>Promise.resolve()},L=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/projects/[projectId]/page",pathname:"/projects/[projectId]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:I},distDir:".next",relativeProjectDir:""});async function M(a,b,d){var D;let H="/(dashboard)/projects/[projectId]/page";"/index"===H&&(H="/");let N=(0,h.getRequestMeta)(a,"postponed"),O=(0,h.getRequestMeta)(a,"minimalMode"),P=await L.prepare(a,b,{srcPage:H,multiZoneDraftMode:!1});if(!P)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Q,query:R,params:S,parsedUrl:T,pageIsDynamic:U,buildManifest:V,nextFontManifest:W,reactLoadableManifest:X,serverActionsManifest:Y,clientReferenceManifest:Z,subresourceIntegrityManifest:$,prerenderManifest:_,isDraftMode:aa,resolvedPathname:ab,revalidateOnlyGenerated:ac,routerServerContext:ad,nextConfig:ae,interceptionRoutePatterns:af}=P,ag=T.pathname||"/",ah=(0,s.normalizeAppPath)(H),{isOnDemandRevalidate:ai}=P,aj=L.match(ag,_),ak=!!_.routes[ab],al=!!(aj||ak||_.routes[ah]),am=a.headers["user-agent"]||"",an=(0,v.getBotType)(am),ao=(0,q.isHtmlBotRequest)(a),ap=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[u.NEXT_ROUTER_PREFETCH_HEADER],aq=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[u.RSC_HEADER]),ar=(0,t.getIsPossibleServerAction)(a),as=(0,m.checkIsAppPPREnabled)(ae.experimental.ppr)&&(null==(D=_.routes[ah]??_.dynamicRoutes[ah])?void 0:D.renderingMode)==="PARTIALLY_STATIC",at=!1,au=!1,av=as?N:void 0,aw=as&&aq&&!ap,ax=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ay=!am||(0,q.shouldServeStreamingMetadata)(am,ae.htmlLimitedBots);ao&&as&&(al=!1,ay=!1);let az=!0===L.isDev||!al||"string"==typeof N||aw,aA=ao&&as,aB=null;aa||!al||az||ar||av||aw||(aB=ab);let aC=aB;!aC&&L.isDev&&(aC=ab),L.isDev||aa||!al||!aq||aw||(0,k.d)(a.headers);let aD={...F,tree:I,pages:J,GlobalError:E(),handler:M,routeModule:L,__next_app__:K};Y&&Z&&(0,p.setReferenceManifestsSingleton)({page:H,clientReferenceManifest:Z,serverActionsManifest:Y,serverModuleMap:(0,r.createServerModuleMap)({serverActionsManifest:Y})});let aE=a.method||"GET",aF=(0,g.getTracer)(),aG=aF.getActiveScopeSpan();try{let f=L.getVaryHeader(ab,af);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return L.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=aF.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${aE} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aE} ${a.url}`)})},m=async({span:e,postponed:f,fallbackRouteParams:g})=>{let i={query:R,params:S,page:ah,sharedContext:{buildId:Q},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aD,Component:(0,j.T)(aD),params:S,routeModule:L,page:H,postponed:f,shouldWaitOnAllReady:aA,serveStreamingMetadata:ay,supportsDynamicResponse:"string"==typeof f||az,buildManifest:V,nextFontManifest:W,reactLoadableManifest:X,subresourceIntegrityManifest:$,serverActionsManifest:Y,clientReferenceManifest:Z,setIsrStatus:null==ad?void 0:ad.setIsrStatus,dir:c(33873).join(process.cwd(),L.relativeProjectDir),isDraftMode:aa,isRevalidate:al&&!f&&!aw,botType:an,isOnDemandRevalidate:ai,isPossibleServerAction:ar,assetPrefix:ae.assetPrefix,nextConfigOutput:ae.output,crossOrigin:ae.crossOrigin,trailingSlash:ae.trailingSlash,previewProps:_.preview,deploymentId:ae.deploymentId,enableTainting:ae.experimental.taint,htmlLimitedBots:ae.htmlLimitedBots,devtoolSegmentExplorer:ae.experimental.devtoolSegmentExplorer,reactMaxHeadersLength:ae.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:ae.experimental.cacheLife,basePath:ae.basePath,serverActions:ae.experimental.serverActions,...at?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isRevalidate:!0,isDebugDynamicAccesses:at}:{},experimental:{isRoutePPREnabled:as,expireTime:ae.expireTime,staleTimes:ae.experimental.staleTimes,cacheComponents:!!ae.experimental.cacheComponents,clientSegmentCache:!!ae.experimental.clientSegmentCache,clientParamParsing:!!ae.experimental.clientParamParsing,dynamicOnHover:!!ae.experimental.dynamicOnHover,inlineCss:!!ae.experimental.inlineCss,authInterrupts:!!ae.experimental.authInterrupts,clientTraceMetadata:ae.experimental.clientTraceMetadata||[]},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d)=>L.onRequestError(a,b,d,ad),err:(0,h.getRequestMeta)(a,"invokeError"),dev:L.isDev}},l=await k(e,i),{metadata:m}=l,{cacheControl:n,headers:o={},fetchTags:p}=m;if(p&&(o[z.NEXT_CACHE_TAGS_HEADER]=p),a.fetchMetrics=m.fetchMetrics,al&&(null==n?void 0:n.revalidate)===0&&!L.isDev&&!as){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ab}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
|
|
20
|
+
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:w.CachedRouteKind.APP_PAGE,html:l,headers:o,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:n}},n=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i})=>{let j,k=!1===L.isDev,l=c||b.writableEnded;if(ai&&ac&&!f&&!O)return(null==ad?void 0:ad.render404)?await ad.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(aj&&(j=(0,x.parseFallbackField)(aj.fallback)),j===x.FallbackMode.PRERENDER&&(0,v.isBot)(am)&&(!as||ao)&&(j=x.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ai=!0),ai&&(j!==x.FallbackMode.NOT_FOUND||f)&&(j=x.FallbackMode.BLOCKING_STATIC_RENDER),!O&&j!==x.FallbackMode.BLOCKING_STATIC_RENDER&&aC&&!l&&!aa&&U&&(k||!ak)){let b;if((k||aj)&&j===x.FallbackMode.NOT_FOUND)throw new C.NoFallbackError;if(as&&!aq){let c="string"==typeof(null==aj?void 0:aj.fallback)?aj.fallback:k?ah:null;if(b=await L.handleResponse({cacheKey:c,req:a,nextConfig:ae,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:_,isRoutePPREnabled:as,responseGenerator:async()=>m({span:i,postponed:void 0,fallbackRouteParams:k||au?(0,o.u)(ah):null}),waitUntil:d.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let n=ai||g||!av?void 0:av;if(at&&void 0!==n)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:w.CachedRouteKind.PAGES,html:y.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let p=U&&as&&((0,h.getRequestMeta)(a,"renderFallbackShell")||au)?(0,o.u)(ag):null;return m({span:i,postponed:n,fallbackRouteParams:p})},p=async c=>{var f,g,i,j,k;let l,o=await L.handleResponse({cacheKey:aB,responseGenerator:a=>n({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ai,isRoutePPREnabled:as,req:a,nextConfig:ae,prerenderManifest:_,waitUntil:d.waitUntil});if(aa&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),L.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!o){if(aB)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=o.value)?void 0:f.kind)!==w.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=o.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof o.value.postponed;al&&!aw&&(!p||ap)&&(O||b.setHeader("x-nextjs-cache",ai?"REVALIDATED":o.isMiss?"MISS":o.isStale?"STALE":"HIT"),b.setHeader(u.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=o;if(av)l={revalidate:0,expire:void 0};else if(O&&aq&&!ap&&as)l={revalidate:0,expire:void 0};else if(!L.isDev)if(aa)l={revalidate:0,expire:void 0};else if(al){if(o.cacheControl)if("number"==typeof o.cacheControl.revalidate){if(o.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${o.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:o.cacheControl.revalidate,expire:(null==(j=o.cacheControl)?void 0:j.expire)??ae.expireTime}}else l={revalidate:z.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(o.cacheControl=l,"string"==typeof ax&&(null==q?void 0:q.kind)===w.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(u.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[z.NEXT_CACHE_TAGS_HEADER];O&&al&&c&&"string"==typeof c&&b.setHeader(z.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ax);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.fromStatic(d,u.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.EMPTY,cacheControl:o.cacheControl}))}let r=(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...o,value:{...o.value,kind:"PAGE"}},{url:(0,h.getRequestMeta)(a,"initURL")}))return null;if(p&&av)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(O&&al||delete a[z.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let s=null==(g=q.headers)?void 0:g[z.NEXT_CACHE_TAGS_HEADER];if(O&&al&&s&&"string"==typeof s&&b.setHeader(z.NEXT_CACHE_TAGS_HEADER,s),!q.status||aq&&as||(b.statusCode=q.status),!O&&q.status&&G.RedirectStatusCode[q.status]&&aq&&(b.statusCode=200),p&&b.setHeader(u.NEXT_DID_POSTPONE_HEADER,"1"),aq&&!aa){if(void 0===q.rscData){if(q.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:q.html,cacheControl:aw?{revalidate:0,expire:void 0}:o.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.fromStatic(q.rscData,u.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl})}let t=q.html;if(!p||O||aq)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:t,cacheControl:o.cacheControl});if(at)return t.push(new ReadableStream({start(a){a.enqueue(A.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}});let v=new TransformStream;return t.push(v.readable),m({span:c,postponed:q.postponed,fallbackRouteParams:null}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==w.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(v.writable)}).catch(a=>{v.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}})};if(!aG)return await aF.withPropagatedContext(a.headers,()=>aF.trace(i.BaseServerSpan.handleRequest,{spanName:`${aE} ${a.url}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aE,"http.target":a.url}},p));await p(aG)}catch(b){throw b instanceof C.NoFallbackError||await L.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"render",revalidateReason:(0,f.c)({isRevalidate:al,isOnDemandRevalidate:ai})},ad),b}}},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},41009:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(97954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/projects/[projectId]/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/sltr91025/code-repository/open-source/test-lah/src/app/(dashboard)/projects/[projectId]/page.tsx","default")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},41204:a=>{"use strict";a.exports=require("string_decoder")},42692:(a,b,c)=>{Promise.resolve().then(c.bind(c,8611))},44943:(a,b,c)=>{"use strict";c.d(b,{cn:()=>f});var d=c(43249),e=c(58829);function f(...a){return(0,e.QP)((0,d.$)(a))}},49485:a=>{"use strict";a.exports=require("rimraf")},55511:a=>{"use strict";a.exports=require("crypto")},61252:(a,b,c)=>{Promise.resolve().then(c.bind(c,41009))},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},74075:a=>{"use strict";a.exports=require("zlib")},79428:a=>{"use strict";a.exports=require("buffer")},81115:a=>{"use strict";a.exports=require("constants")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},98457:(a,b,c)=>{"use strict";c.d(b,{p:()=>e});var d=c(21124);function e({message:a,action:b,secondaryAction:c}){return(0,d.jsxs)("div",{className:"flex flex-col items-center justify-center h-full gap-4 px-6 text-center",children:[(0,d.jsx)("img",{src:"https://static.vecteezy.com/system/resources/thumbnails/067/162/149/small/cute-duck-meme-sticker-transparent-cute-illustration-free-png.png",alt:"",className:"w-28 h-28 object-contain select-none opacity-15",draggable:!1}),(0,d.jsx)("p",{className:"text-sm max-w-[280px]",style:{color:"var(--text-tertiary)"},children:a}),(b||c)&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[b&&(0,d.jsx)("button",{onClick:b.onClick,className:"px-4 py-2 text-sm font-medium rounded-md transition-opacity hover:opacity-80",style:{backgroundColor:"var(--accent)",color:"var(--bg-primary)",borderRadius:"var(--radius-pill)"},children:b.label}),c&&(0,d.jsx)("button",{onClick:c.onClick,className:"px-4 py-2 text-sm font-medium rounded-md border transition-colors hover:bg-[var(--bg-secondary)]",style:{borderColor:"var(--border)",color:"var(--text-secondary)",borderRadius:"var(--radius-pill)"},children:c.label})]})]})}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[873,917,736,506,485,824,779,423,615,898],()=>b(b.s=22017));module.exports=c})();
|