@tuongaz/seeflow 0.1.104 → 0.1.105

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.
Files changed (59) hide show
  1. package/dist/web/assets/{architectureDiagram-3BPJPVTR-S06hgR1x.js → architectureDiagram-3BPJPVTR-Dn9FQt2V.js} +1 -1
  2. package/dist/web/assets/{blockDiagram-GPEHLZMM-ZdAkZGrj.js → blockDiagram-GPEHLZMM-Difk1XOK.js} +1 -1
  3. package/dist/web/assets/{c4Diagram-AAUBKEIU-C5MfRz02.js → c4Diagram-AAUBKEIU-2-WiMvCN.js} +1 -1
  4. package/dist/web/assets/channel-CrVPaFj0.js +1 -0
  5. package/dist/web/assets/{chart-BxTNHoKY.js → chart-D2hW0kXw.js} +1 -1
  6. package/dist/web/assets/{chunk-2J33WTMH-Bn46MReV.js → chunk-2J33WTMH-BPHmI1De.js} +1 -1
  7. package/dist/web/assets/{chunk-4BX2VUAB-CXHVHaLs.js → chunk-4BX2VUAB-Ay38fe5g.js} +1 -1
  8. package/dist/web/assets/{chunk-55IACEB6-CRgBKrhO.js → chunk-55IACEB6-5ygNV__l.js} +1 -1
  9. package/dist/web/assets/{chunk-727SXJPM-BH62wjtB.js → chunk-727SXJPM-kQNWdsxV.js} +1 -1
  10. package/dist/web/assets/{chunk-AQP2D5EJ-RxGAqK2A.js → chunk-AQP2D5EJ-DzeeRd3w.js} +1 -1
  11. package/dist/web/assets/{chunk-FMBD7UC4-Cb-wgtwe.js → chunk-FMBD7UC4-CUar6TO-.js} +1 -1
  12. package/dist/web/assets/{chunk-ND2GUHAM-CJlFQBdh.js → chunk-ND2GUHAM-CNZ3763c.js} +1 -1
  13. package/dist/web/assets/{chunk-QZHKN3VN-DjoTSKYv.js → chunk-QZHKN3VN-FKGOAesZ.js} +1 -1
  14. package/dist/web/assets/classDiagram-4FO5ZUOK-yNcOh78q.js +1 -0
  15. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-yNcOh78q.js +1 -0
  16. package/dist/web/assets/{code-block-DwqzBBWk.js → code-block-SZDhhr7T.js} +1 -1
  17. package/dist/web/assets/{cose-bilkent-S5V4N54A-DpGzn2ro.js → cose-bilkent-S5V4N54A--DNtr1GO.js} +1 -1
  18. package/dist/web/assets/{dagre-BM42HDAG-CUapj-lK.js → dagre-BM42HDAG-cIlGgsEQ.js} +1 -1
  19. package/dist/web/assets/{diagram-2AECGRRQ-7ISjO-i-.js → diagram-2AECGRRQ-DjoBzBLH.js} +1 -1
  20. package/dist/web/assets/{diagram-5GNKFQAL-DCPWI1Ok.js → diagram-5GNKFQAL-mmesu8tu.js} +1 -1
  21. package/dist/web/assets/{diagram-KO2AKTUF-zSsOIiq1.js → diagram-KO2AKTUF-DeKWe4-a.js} +1 -1
  22. package/dist/web/assets/{diagram-LMA3HP47-BcqSq_nr.js → diagram-LMA3HP47-NHxUC_r2.js} +1 -1
  23. package/dist/web/assets/{diagram-OG6HWLK6-Dw6nG7MD.js → diagram-OG6HWLK6-DoVcjbAs.js} +1 -1
  24. package/dist/web/assets/{erDiagram-TEJ5UH35-B3QPOZAY.js → erDiagram-TEJ5UH35-DOr0sCAJ.js} +1 -1
  25. package/dist/web/assets/{flowDiagram-I6XJVG4X-Ceu3sQuX.js → flowDiagram-I6XJVG4X-Blcjaj5z.js} +1 -1
  26. package/dist/web/assets/{ganttDiagram-6RSMTGT7-B26peYjY.js → ganttDiagram-6RSMTGT7-XOZAg1O8.js} +1 -1
  27. package/dist/web/assets/{gitGraphDiagram-PVQCEYII-CX8DOFLm.js → gitGraphDiagram-PVQCEYII-CwWAqRfA.js} +1 -1
  28. package/dist/web/assets/{iconify-DAxofKes.js → iconify-pbuBzLPb.js} +1 -1
  29. package/dist/web/assets/{index-B7r8KKap.js → index-COPB-kTN.js} +6 -6
  30. package/dist/web/assets/{index.es-wzlW-y-I.js → index.es-BnIUUbgb.js} +1 -1
  31. package/dist/web/assets/{infoDiagram-5YYISTIA-DDVBGLt8.js → infoDiagram-5YYISTIA-BDrdYBmZ.js} +1 -1
  32. package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-C6qCp-Zn.js → ishikawaDiagram-YF4QCWOH-Ccq3BiV9.js} +1 -1
  33. package/dist/web/assets/{journeyDiagram-JHISSGLW-DX8AxLaA.js → journeyDiagram-JHISSGLW-Byhhmys_.js} +1 -1
  34. package/dist/web/assets/{jspdf.es.min-ykdbTFYz.js → jspdf.es.min-DRscdcGG.js} +3 -3
  35. package/dist/web/assets/{kanban-definition-UN3LZRKU-B8-itdXZ.js → kanban-definition-UN3LZRKU-C4V7XsI8.js} +1 -1
  36. package/dist/web/assets/{linear-Dqxq5R6C.js → linear-9s7Nhsku.js} +1 -1
  37. package/dist/web/assets/{markdown-D9XDrg2s.js → markdown--co0piIh.js} +1 -1
  38. package/dist/web/assets/{mermaid.core-DujK2Rzn.js → mermaid.core-BzxthQo1.js} +4 -4
  39. package/dist/web/assets/{mindmap-definition-RKZ34NQL-CXa-5n8a.js → mindmap-definition-RKZ34NQL-DPEOdrP-.js} +1 -1
  40. package/dist/web/assets/{pieDiagram-4H26LBE5-CGlnQV5E.js → pieDiagram-4H26LBE5-JUVRBM8g.js} +1 -1
  41. package/dist/web/assets/{quadrantDiagram-W4KKPZXB-L_Ap8kcw.js → quadrantDiagram-W4KKPZXB-B-O3T7Ql.js} +1 -1
  42. package/dist/web/assets/{requirementDiagram-4Y6WPE33-B2Io1TQi.js → requirementDiagram-4Y6WPE33-cMHqY0_G.js} +1 -1
  43. package/dist/web/assets/{sankeyDiagram-5OEKKPKP-DeARBi7s.js → sankeyDiagram-5OEKKPKP-CO0aG09B.js} +1 -1
  44. package/dist/web/assets/{sequenceDiagram-3UESZ5HK-BR0jm0Tk.js → sequenceDiagram-3UESZ5HK-DkvyDkYb.js} +1 -1
  45. package/dist/web/assets/{stateDiagram-AJRCARHV-Ck_33KQ3.js → stateDiagram-AJRCARHV-DKseQ2AJ.js} +1 -1
  46. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-C30cJIVE.js +1 -0
  47. package/dist/web/assets/{time-DY4vPLRk.js → time-E94H-3Js.js} +1 -1
  48. package/dist/web/assets/{timeline-definition-PNZ67QCA-DMm8bfvY.js → timeline-definition-PNZ67QCA-B9uWXMTl.js} +1 -1
  49. package/dist/web/assets/{vennDiagram-CIIHVFJN-BEfqdSFT.js → vennDiagram-CIIHVFJN-DuHHMFEd.js} +1 -1
  50. package/dist/web/assets/{wardley-L42UT6IY-Bmxjf0CJ.js → wardley-L42UT6IY-C_uCcesD.js} +1 -1
  51. package/dist/web/assets/{wardleyDiagram-YWT4CUSO-D4ialTz3.js → wardleyDiagram-YWT4CUSO-DbA4lTWI.js} +1 -1
  52. package/dist/web/assets/{xychartDiagram-2RQKCTM6-nm_TLxlx.js → xychartDiagram-2RQKCTM6-BX4GX1ip.js} +1 -1
  53. package/dist/web/index.html +1 -1
  54. package/package.json +1 -1
  55. package/src/server.ts +2 -2
  56. package/dist/web/assets/channel-D-VTcFiH.js +0 -1
  57. package/dist/web/assets/classDiagram-4FO5ZUOK-DoPcjHFc.js +0 -1
  58. package/dist/web/assets/classDiagram-v2-Q7XG4LA2-DoPcjHFc.js +0 -1
  59. package/dist/web/assets/stateDiagram-v2-BHNVJYJU-D122sbeB.js +0 -1
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chart-BxTNHoKY.js","assets/step-CWvwoXpJ.js","assets/band-BEGRCkg7.js","assets/init-BFKUnIhM.js","assets/ordinal-BQ3KlzSu.js","assets/linear-Dqxq5R6C.js","assets/defaultLocale-CrowFXzY.js","assets/time-DY4vPLRk.js","assets/mermaid.core-DujK2Rzn.js","assets/purify.es-CLGrRn1w.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chart-D2hW0kXw.js","assets/step-CWvwoXpJ.js","assets/band-BEGRCkg7.js","assets/init-BFKUnIhM.js","assets/ordinal-BQ3KlzSu.js","assets/linear-9s7Nhsku.js","assets/defaultLocale-CrowFXzY.js","assets/time-E94H-3Js.js","assets/mermaid.core-BzxthQo1.js","assets/purify.es-CLGrRn1w.js"])))=>i.map(i=>d[i]);
2
2
  function lie(e,t){for(var n=0;n<t.length;n++){const o=t[n];if(typeof o!="string"&&!Array.isArray(o)){for(const r in o)if(r!=="default"&&!(r in e)){const a=Object.getOwnPropertyDescriptor(o,r);a&&Object.defineProperty(e,r,a.get?a:{enumerable:!0,get:()=>o[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&o(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();var mP=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var aX={exports:{}},Iz={},iX={exports:{}},Je={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -8443,7 +8443,7 @@ Error generating stack: `+a.message+`
8443
8443
  *
8444
8444
  * This source code is licensed under the ISC license.
8445
8445
  * See the LICENSE file in the root directory of this source tree.
8446
- */const SAe=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:dy,AArrowDownIcon:dy,AArrowUp:uy,AArrowUpIcon:uy,ALargeSmall:hy,ALargeSmallIcon:hy,Accessibility:fy,AccessibilityIcon:fy,Activity:py,ActivityIcon:py,ActivitySquare:Zl,ActivitySquareIcon:Zl,AirVent:yy,AirVentIcon:yy,Airplay:my,AirplayIcon:my,AlarmCheck:ys,AlarmCheckIcon:ys,AlarmClock:ky,AlarmClockCheck:ys,AlarmClockCheckIcon:ys,AlarmClockIcon:ky,AlarmClockMinus:ms,AlarmClockMinusIcon:ms,AlarmClockOff:gy,AlarmClockOffIcon:gy,AlarmClockPlus:gs,AlarmClockPlusIcon:gs,AlarmMinus:ms,AlarmMinusIcon:ms,AlarmPlus:gs,AlarmPlusIcon:gs,AlarmSmoke:vy,AlarmSmokeIcon:vy,Album:xy,AlbumIcon:xy,AlertCircle:ci,AlertCircleIcon:ci,AlertOctagon:Cl,AlertOctagonIcon:Cl,AlertTriangle:Pr,AlertTriangleIcon:Pr,AlignCenter:ui,AlignCenterHorizontal:My,AlignCenterHorizontalIcon:My,AlignCenterIcon:ui,AlignCenterVertical:wy,AlignCenterVerticalIcon:wy,AlignEndHorizontal:by,AlignEndHorizontalIcon:by,AlignEndVertical:_y,AlignEndVerticalIcon:_y,AlignHorizontalDistributeCenter:Cy,AlignHorizontalDistributeCenterIcon:Cy,AlignHorizontalDistributeEnd:Sy,AlignHorizontalDistributeEndIcon:Sy,AlignHorizontalDistributeStart:Ly,AlignHorizontalDistributeStartIcon:Ly,AlignHorizontalJustifyCenter:Ny,AlignHorizontalJustifyCenterIcon:Ny,AlignHorizontalJustifyEnd:Ay,AlignHorizontalJustifyEndIcon:Ay,AlignHorizontalJustifyStart:Iy,AlignHorizontalJustifyStartIcon:Iy,AlignHorizontalSpaceAround:Ey,AlignHorizontalSpaceAroundIcon:Ey,AlignHorizontalSpaceBetween:jy,AlignHorizontalSpaceBetweenIcon:jy,AlignJustify:X1,AlignJustifyIcon:X1,AlignLeft:Vo,AlignLeftIcon:Vo,AlignRight:hi,AlignRightIcon:hi,AlignStartHorizontal:$y,AlignStartHorizontalIcon:$y,AlignStartVertical:Py,AlignStartVerticalIcon:Py,AlignVerticalDistributeCenter:zy,AlignVerticalDistributeCenterIcon:zy,AlignVerticalDistributeEnd:Ry,AlignVerticalDistributeEndIcon:Ry,AlignVerticalDistributeStart:Ty,AlignVerticalDistributeStartIcon:Ty,AlignVerticalJustifyCenter:Dy,AlignVerticalJustifyCenterIcon:Dy,AlignVerticalJustifyEnd:Hy,AlignVerticalJustifyEndIcon:Hy,AlignVerticalJustifyStart:Oy,AlignVerticalJustifyStartIcon:Oy,AlignVerticalSpaceAround:Fy,AlignVerticalSpaceAroundIcon:Fy,AlignVerticalSpaceBetween:qy,AlignVerticalSpaceBetweenIcon:qy,Ambulance:Vy,AmbulanceIcon:Vy,Ampersand:By,AmpersandIcon:By,Ampersands:Uy,AmpersandsIcon:Uy,Amphora:Wy,AmphoraIcon:Wy,Anchor:Gy,AnchorIcon:Gy,Angry:Ky,AngryIcon:Ky,Annoyed:Xy,AnnoyedIcon:Xy,Antenna:Zy,AntennaIcon:Zy,Anvil:Yy,AnvilIcon:Yy,Aperture:Qy,ApertureIcon:Qy,AppWindow:em,AppWindowIcon:em,AppWindowMac:Jy,AppWindowMacIcon:Jy,Apple:tm,AppleIcon:tm,Archive:rm,ArchiveIcon:rm,ArchiveRestore:nm,ArchiveRestoreIcon:nm,ArchiveX:om,ArchiveXIcon:om,AreaChart:js,AreaChartIcon:js,Armchair:am,ArmchairIcon:am,ArrowBigDown:sm,ArrowBigDownDash:im,ArrowBigDownDashIcon:im,ArrowBigDownIcon:sm,ArrowBigLeft:lm,ArrowBigLeftDash:cm,ArrowBigLeftDashIcon:cm,ArrowBigLeftIcon:lm,ArrowBigRight:um,ArrowBigRightDash:dm,ArrowBigRightDashIcon:dm,ArrowBigRightIcon:um,ArrowBigUp:fm,ArrowBigUpDash:hm,ArrowBigUpDashIcon:hm,ArrowBigUpIcon:fm,ArrowDown:bm,ArrowDown01:pm,ArrowDown01Icon:pm,ArrowDown10:ym,ArrowDown10Icon:ym,ArrowDownAZ:ks,ArrowDownAZIcon:ks,ArrowDownAz:ks,ArrowDownAzIcon:ks,ArrowDownCircle:Ws,ArrowDownCircleIcon:Ws,ArrowDownFromLine:mm,ArrowDownFromLineIcon:mm,ArrowDownIcon:bm,ArrowDownLeft:km,ArrowDownLeftFromCircle:Gs,ArrowDownLeftFromCircleIcon:Gs,ArrowDownLeftFromSquare:t1,ArrowDownLeftFromSquareIcon:t1,ArrowDownLeftIcon:km,ArrowDownLeftSquare:Yl,ArrowDownLeftSquareIcon:Yl,ArrowDownNarrowWide:gm,ArrowDownNarrowWideIcon:gm,ArrowDownRight:xm,ArrowDownRightFromCircle:Xs,ArrowDownRightFromCircleIcon:Xs,ArrowDownRightFromSquare:n1,ArrowDownRightFromSquareIcon:n1,ArrowDownRightIcon:xm,ArrowDownRightSquare:Ql,ArrowDownRightSquareIcon:Ql,ArrowDownSquare:Jl,ArrowDownSquareIcon:Jl,ArrowDownToDot:vm,ArrowDownToDotIcon:vm,ArrowDownToLine:wm,ArrowDownToLineIcon:wm,ArrowDownUp:Mm,ArrowDownUpIcon:Mm,ArrowDownWideNarrow:vs,ArrowDownWideNarrowIcon:vs,ArrowDownZA:xs,ArrowDownZAIcon:xs,ArrowDownZa:xs,ArrowDownZaIcon:xs,ArrowLeft:Sm,ArrowLeftCircle:Ks,ArrowLeftCircleIcon:Ks,ArrowLeftFromLine:_m,ArrowLeftFromLineIcon:_m,ArrowLeftIcon:Sm,ArrowLeftRight:X2,ArrowLeftRightIcon:X2,ArrowLeftSquare:e1,ArrowLeftSquareIcon:e1,ArrowLeftToLine:Cm,ArrowLeftToLineIcon:Cm,ArrowRight:a0,ArrowRightCircle:Qs,ArrowRightCircleIcon:Qs,ArrowRightFromLine:Lm,ArrowRightFromLineIcon:Lm,ArrowRightIcon:a0,ArrowRightLeft:Nm,ArrowRightLeftIcon:Nm,ArrowRightSquare:a1,ArrowRightSquareIcon:a1,ArrowRightToLine:Im,ArrowRightToLineIcon:Im,ArrowUp:Hm,ArrowUp01:Am,ArrowUp01Icon:Am,ArrowUp10:Em,ArrowUp10Icon:Em,ArrowUpAZ:ws,ArrowUpAZIcon:ws,ArrowUpAz:ws,ArrowUpAzIcon:ws,ArrowUpCircle:Js,ArrowUpCircleIcon:Js,ArrowUpDown:jm,ArrowUpDownIcon:jm,ArrowUpFromDot:$m,ArrowUpFromDotIcon:$m,ArrowUpFromLine:Pm,ArrowUpFromLineIcon:Pm,ArrowUpIcon:Hm,ArrowUpLeft:zm,ArrowUpLeftFromCircle:Zs,ArrowUpLeftFromCircleIcon:Zs,ArrowUpLeftFromSquare:o1,ArrowUpLeftFromSquareIcon:o1,ArrowUpLeftIcon:zm,ArrowUpLeftSquare:i1,ArrowUpLeftSquareIcon:i1,ArrowUpNarrowWide:Ms,ArrowUpNarrowWideIcon:Ms,ArrowUpRight:Tm,ArrowUpRightFromCircle:Ys,ArrowUpRightFromCircleIcon:Ys,ArrowUpRightFromSquare:r1,ArrowUpRightFromSquareIcon:r1,ArrowUpRightIcon:Tm,ArrowUpRightSquare:l1,ArrowUpRightSquareIcon:l1,ArrowUpSquare:s1,ArrowUpSquareIcon:s1,ArrowUpToLine:Rm,ArrowUpToLineIcon:Rm,ArrowUpWideNarrow:Dm,ArrowUpWideNarrowIcon:Dm,ArrowUpZA:bs,ArrowUpZAIcon:bs,ArrowUpZa:bs,ArrowUpZaIcon:bs,ArrowsUpFromLine:Om,ArrowsUpFromLineIcon:Om,Asterisk:Fm,AsteriskIcon:Fm,AsteriskSquare:c1,AsteriskSquareIcon:c1,AtSign:qm,AtSignIcon:qm,Atom:Vm,AtomIcon:Vm,AudioLines:Bm,AudioLinesIcon:Bm,AudioWaveform:Wm,AudioWaveformIcon:Wm,Award:Um,AwardIcon:Um,Axe:Gm,AxeIcon:Gm,Axis3D:_s,Axis3DIcon:_s,Axis3d:_s,Axis3dIcon:_s,Baby:Km,BabyIcon:Km,Backpack:Xm,BackpackIcon:Xm,Badge:ug,BadgeAlert:Ym,BadgeAlertIcon:Ym,BadgeCent:Zm,BadgeCentIcon:Zm,BadgeCheck:Cs,BadgeCheckIcon:Cs,BadgeDollarSign:Qm,BadgeDollarSignIcon:Qm,BadgeEuro:eg,BadgeEuroIcon:eg,BadgeHelp:Ss,BadgeHelpIcon:Ss,BadgeIcon:ug,BadgeIndianRupee:Jm,BadgeIndianRupeeIcon:Jm,BadgeInfo:tg,BadgeInfoIcon:tg,BadgeJapaneseYen:ng,BadgeJapaneseYenIcon:ng,BadgeMinus:og,BadgeMinusIcon:og,BadgePercent:rg,BadgePercentIcon:rg,BadgePlus:ag,BadgePlusIcon:ag,BadgePoundSterling:ig,BadgePoundSterlingIcon:ig,BadgeQuestionMark:Ss,BadgeQuestionMarkIcon:Ss,BadgeRussianRuble:sg,BadgeRussianRubleIcon:sg,BadgeSwissFranc:cg,BadgeSwissFrancIcon:cg,BadgeTurkishLira:lg,BadgeTurkishLiraIcon:lg,BadgeX:dg,BadgeXIcon:dg,BaggageClaim:hg,BaggageClaimIcon:hg,Balloon:fg,BalloonIcon:fg,Ban:Z2,BanIcon:Z2,Banana:pg,BananaIcon:pg,Bandage:yg,BandageIcon:yg,Banknote:vg,BanknoteArrowDown:mg,BanknoteArrowDownIcon:mg,BanknoteArrowUp:gg,BanknoteArrowUpIcon:gg,BanknoteIcon:vg,BanknoteX:kg,BanknoteXIcon:kg,BarChart:Os,BarChart2:Fs,BarChart2Icon:Fs,BarChart3:Ds,BarChart3Icon:Ds,BarChart4:Ts,BarChart4Icon:Ts,BarChartBig:Rs,BarChartBigIcon:Rs,BarChartHorizontal:Ps,BarChartHorizontalBig:$s,BarChartHorizontalBigIcon:$s,BarChartHorizontalIcon:Ps,BarChartIcon:Os,Barcode:xg,BarcodeIcon:xg,Barrel:wg,BarrelIcon:wg,Baseline:Mg,BaselineIcon:Mg,Bath:bg,BathIcon:bg,Battery:Ag,BatteryCharging:_g,BatteryChargingIcon:_g,BatteryFull:Cg,BatteryFullIcon:Cg,BatteryIcon:Ag,BatteryLow:Sg,BatteryLowIcon:Sg,BatteryMedium:Lg,BatteryMediumIcon:Lg,BatteryPlus:Ng,BatteryPlusIcon:Ng,BatteryWarning:Ig,BatteryWarningIcon:Ig,Beaker:Eg,BeakerIcon:Eg,Bean:$g,BeanIcon:$g,BeanOff:jg,BeanOffIcon:jg,Bed:Rg,BedDouble:Pg,BedDoubleIcon:Pg,BedIcon:Rg,BedSingle:zg,BedSingleIcon:zg,Beef:Tg,BeefIcon:Tg,Beer:Hg,BeerIcon:Hg,BeerOff:Dg,BeerOffIcon:Dg,Bell:Wg,BellDot:Og,BellDotIcon:Og,BellElectric:Fg,BellElectricIcon:Fg,BellIcon:Wg,BellMinus:qg,BellMinusIcon:qg,BellOff:Vg,BellOffIcon:Vg,BellPlus:Bg,BellPlusIcon:Bg,BellRing:Ug,BellRingIcon:Ug,BetweenHorizonalEnd:Ls,BetweenHorizonalEndIcon:Ls,BetweenHorizonalStart:Ns,BetweenHorizonalStartIcon:Ns,BetweenHorizontalEnd:Ls,BetweenHorizontalEndIcon:Ls,BetweenHorizontalStart:Ns,BetweenHorizontalStartIcon:Ns,BetweenVerticalEnd:Gg,BetweenVerticalEndIcon:Gg,BetweenVerticalStart:Kg,BetweenVerticalStartIcon:Kg,BicepsFlexed:Xg,BicepsFlexedIcon:Xg,Bike:Zg,BikeIcon:Zg,Binary:Yg,BinaryIcon:Yg,Binoculars:Qg,BinocularsIcon:Qg,Biohazard:Jg,BiohazardIcon:Jg,Bird:ek,BirdIcon:ek,Birdhouse:tk,BirdhouseIcon:tk,Bitcoin:nk,BitcoinIcon:nk,Blend:ok,BlendIcon:ok,Blinds:rk,BlindsIcon:rk,Blocks:ak,BlocksIcon:ak,Bluetooth:lk,BluetoothConnected:ik,BluetoothConnectedIcon:ik,BluetoothIcon:lk,BluetoothOff:sk,BluetoothOffIcon:sk,BluetoothSearching:ck,BluetoothSearchingIcon:ck,Bold:dk,BoldIcon:dk,Bolt:uk,BoltIcon:uk,Bomb:hk,BombIcon:hk,Bone:fk,BoneIcon:fk,Book:Dk,BookA:pk,BookAIcon:pk,BookAlert:yk,BookAlertIcon:yk,BookAudio:mk,BookAudioIcon:mk,BookCheck:gk,BookCheckIcon:gk,BookCopy:kk,BookCopyIcon:kk,BookDashed:Is,BookDashedIcon:Is,BookDown:vk,BookDownIcon:vk,BookHeadphones:xk,BookHeadphonesIcon:xk,BookHeart:wk,BookHeartIcon:wk,BookIcon:Dk,BookImage:Mk,BookImageIcon:Mk,BookKey:bk,BookKeyIcon:bk,BookLock:_k,BookLockIcon:_k,BookMarked:Ck,BookMarkedIcon:Ck,BookMinus:Sk,BookMinusIcon:Sk,BookOpen:Ik,BookOpenCheck:Lk,BookOpenCheckIcon:Lk,BookOpenIcon:Ik,BookOpenText:Nk,BookOpenTextIcon:Nk,BookPlus:Ak,BookPlusIcon:Ak,BookSearch:Ek,BookSearchIcon:Ek,BookTemplate:Is,BookTemplateIcon:Is,BookText:jk,BookTextIcon:jk,BookType:$k,BookTypeIcon:$k,BookUp:zk,BookUp2:Pk,BookUp2Icon:Pk,BookUpIcon:zk,BookUser:Rk,BookUserIcon:Rk,BookX:Tk,BookXIcon:Tk,Bookmark:Vk,BookmarkCheck:Hk,BookmarkCheckIcon:Hk,BookmarkIcon:Vk,BookmarkMinus:Ok,BookmarkMinusIcon:Ok,BookmarkPlus:Fk,BookmarkPlusIcon:Fk,BookmarkX:qk,BookmarkXIcon:qk,BoomBox:Bk,BoomBoxIcon:Bk,Bot:Wk,BotIcon:Wk,BotMessageSquare:Uk,BotMessageSquareIcon:Uk,BotOff:Gk,BotOffIcon:Gk,BottleWine:Kk,BottleWineIcon:Kk,BowArrow:Xk,BowArrowIcon:Xk,Box:Zk,BoxIcon:Zk,BoxSelect:x1,BoxSelectIcon:x1,Boxes:Yk,BoxesIcon:Yk,Braces:As,BracesIcon:As,Brackets:Qk,BracketsIcon:Qk,Brain:t4,BrainCircuit:Jk,BrainCircuitIcon:Jk,BrainCog:e4,BrainCogIcon:e4,BrainIcon:t4,BrickWall:r4,BrickWallFire:n4,BrickWallFireIcon:n4,BrickWallIcon:r4,BrickWallShield:o4,BrickWallShieldIcon:o4,Briefcase:c4,BriefcaseBusiness:a4,BriefcaseBusinessIcon:a4,BriefcaseConveyorBelt:i4,BriefcaseConveyorBeltIcon:i4,BriefcaseIcon:c4,BriefcaseMedical:s4,BriefcaseMedicalIcon:s4,BringToFront:l4,BringToFrontIcon:l4,Brush:h4,BrushCleaning:d4,BrushCleaningIcon:d4,BrushIcon:h4,Bubbles:u4,BubblesIcon:u4,Bug:y4,BugIcon:y4,BugOff:f4,BugOffIcon:f4,BugPlay:p4,BugPlayIcon:p4,Building:m4,Building2:g4,Building2Icon:g4,BuildingIcon:m4,Bus:v4,BusFront:k4,BusFrontIcon:k4,BusIcon:v4,Cable:w4,CableCar:x4,CableCarIcon:x4,CableIcon:w4,Cake:b4,CakeIcon:b4,CakeSlice:M4,CakeSliceIcon:M4,Calculator:_4,CalculatorIcon:_4,Calendar:U4,Calendar1:C4,Calendar1Icon:C4,CalendarArrowDown:S4,CalendarArrowDownIcon:S4,CalendarArrowUp:L4,CalendarArrowUpIcon:L4,CalendarCheck:I4,CalendarCheck2:N4,CalendarCheck2Icon:N4,CalendarCheckIcon:I4,CalendarClock:A4,CalendarClockIcon:A4,CalendarCog:E4,CalendarCogIcon:E4,CalendarDays:j4,CalendarDaysIcon:j4,CalendarFold:$4,CalendarFoldIcon:$4,CalendarHeart:P4,CalendarHeartIcon:P4,CalendarIcon:U4,CalendarMinus:R4,CalendarMinus2:z4,CalendarMinus2Icon:z4,CalendarMinusIcon:R4,CalendarOff:T4,CalendarOffIcon:T4,CalendarPlus:O4,CalendarPlus2:D4,CalendarPlus2Icon:D4,CalendarPlusIcon:O4,CalendarRange:H4,CalendarRangeIcon:H4,CalendarSearch:F4,CalendarSearchIcon:F4,CalendarSync:q4,CalendarSyncIcon:q4,CalendarX:B4,CalendarX2:V4,CalendarX2Icon:V4,CalendarXIcon:B4,Calendars:W4,CalendarsIcon:W4,Camera:K4,CameraIcon:K4,CameraOff:G4,CameraOffIcon:G4,CandlestickChart:zs,CandlestickChartIcon:zs,Candy:Y4,CandyCane:X4,CandyCaneIcon:X4,CandyIcon:Y4,CandyOff:Z4,CandyOffIcon:Z4,Cannabis:J4,CannabisIcon:J4,CannabisOff:Q4,CannabisOffIcon:Q4,Captions:Es,CaptionsIcon:Es,CaptionsOff:e5,CaptionsOffIcon:e5,Car:o5,CarFront:t5,CarFrontIcon:t5,CarIcon:o5,CarTaxiFront:n5,CarTaxiFrontIcon:n5,Caravan:r5,CaravanIcon:r5,CardSim:a5,CardSimIcon:a5,Carrot:i5,CarrotIcon:i5,CaseLower:s5,CaseLowerIcon:s5,CaseSensitive:c5,CaseSensitiveIcon:c5,CaseUpper:l5,CaseUpperIcon:l5,CassetteTape:d5,CassetteTapeIcon:d5,Cast:u5,CastIcon:u5,Castle:h5,CastleIcon:h5,Cat:f5,CatIcon:f5,Cctv:p5,CctvIcon:p5,ChartArea:js,ChartAreaIcon:js,ChartBar:Ps,ChartBarBig:$s,ChartBarBigIcon:$s,ChartBarDecreasing:y5,ChartBarDecreasingIcon:y5,ChartBarIcon:Ps,ChartBarIncreasing:m5,ChartBarIncreasingIcon:m5,ChartBarStacked:g5,ChartBarStackedIcon:g5,ChartCandlestick:zs,ChartCandlestickIcon:zs,ChartColumn:Ds,ChartColumnBig:Rs,ChartColumnBigIcon:Rs,ChartColumnDecreasing:k5,ChartColumnDecreasingIcon:k5,ChartColumnIcon:Ds,ChartColumnIncreasing:Ts,ChartColumnIncreasingIcon:Ts,ChartColumnStacked:v5,ChartColumnStackedIcon:v5,ChartGantt:x5,ChartGanttIcon:x5,ChartLine:Hs,ChartLineIcon:Hs,ChartNetwork:w5,ChartNetworkIcon:w5,ChartNoAxesColumn:Fs,ChartNoAxesColumnDecreasing:M5,ChartNoAxesColumnDecreasingIcon:M5,ChartNoAxesColumnIcon:Fs,ChartNoAxesColumnIncreasing:Os,ChartNoAxesColumnIncreasingIcon:Os,ChartNoAxesCombined:b5,ChartNoAxesCombinedIcon:b5,ChartNoAxesGantt:qs,ChartNoAxesGanttIcon:qs,ChartPie:Vs,ChartPieIcon:Vs,ChartScatter:Bs,ChartScatterIcon:Bs,ChartSpline:_5,ChartSplineIcon:_5,Check:Ni,CheckCheck:C5,CheckCheckIcon:C5,CheckCircle:ec,CheckCircle2:li,CheckCircle2Icon:li,CheckCircleIcon:ec,CheckIcon:Ni,CheckLine:S5,CheckLineIcon:S5,CheckSquare:u1,CheckSquare2:h1,CheckSquare2Icon:h1,CheckSquareIcon:u1,ChefHat:L5,ChefHatIcon:L5,Cherry:N5,CherryIcon:N5,ChessBishop:I5,ChessBishopIcon:I5,ChessKing:A5,ChessKingIcon:A5,ChessKnight:E5,ChessKnightIcon:E5,ChessPawn:j5,ChessPawnIcon:j5,ChessQueen:$5,ChessQueenIcon:$5,ChessRook:z5,ChessRookIcon:z5,ChevronDown:P5,ChevronDownCircle:tc,ChevronDownCircleIcon:tc,ChevronDownIcon:P5,ChevronDownSquare:f1,ChevronDownSquareIcon:f1,ChevronFirst:R5,ChevronFirstIcon:R5,ChevronLast:T5,ChevronLastIcon:T5,ChevronLeft:D5,ChevronLeftCircle:nc,ChevronLeftCircleIcon:nc,ChevronLeftIcon:D5,ChevronLeftSquare:p1,ChevronLeftSquareIcon:p1,ChevronRight:H5,ChevronRightCircle:oc,ChevronRightCircleIcon:oc,ChevronRightIcon:H5,ChevronRightSquare:m1,ChevronRightSquareIcon:m1,ChevronUp:O5,ChevronUpCircle:rc,ChevronUpCircleIcon:rc,ChevronUpIcon:O5,ChevronUpSquare:y1,ChevronUpSquareIcon:y1,ChevronsDown:q5,ChevronsDownIcon:q5,ChevronsDownUp:F5,ChevronsDownUpIcon:F5,ChevronsLeft:U5,ChevronsLeftIcon:U5,ChevronsLeftRight:B5,ChevronsLeftRightEllipsis:V5,ChevronsLeftRightEllipsisIcon:V5,ChevronsLeftRightIcon:B5,ChevronsRight:G5,ChevronsRightIcon:G5,ChevronsRightLeft:W5,ChevronsRightLeftIcon:W5,ChevronsUp:X5,ChevronsUpDown:K5,ChevronsUpDownIcon:K5,ChevronsUpIcon:X5,Chrome:Us,ChromeIcon:Us,Chromium:Us,ChromiumIcon:Us,Church:Z5,ChurchIcon:Z5,Cigarette:Q5,CigaretteIcon:Q5,CigaretteOff:Y5,CigaretteOffIcon:Y5,Circle:Y2,CircleAlert:ci,CircleAlertIcon:ci,CircleArrowDown:Ws,CircleArrowDownIcon:Ws,CircleArrowLeft:Ks,CircleArrowLeftIcon:Ks,CircleArrowOutDownLeft:Gs,CircleArrowOutDownLeftIcon:Gs,CircleArrowOutDownRight:Xs,CircleArrowOutDownRightIcon:Xs,CircleArrowOutUpLeft:Zs,CircleArrowOutUpLeftIcon:Zs,CircleArrowOutUpRight:Ys,CircleArrowOutUpRightIcon:Ys,CircleArrowRight:Qs,CircleArrowRightIcon:Qs,CircleArrowUp:Js,CircleArrowUpIcon:Js,CircleCheck:li,CircleCheckBig:ec,CircleCheckBigIcon:ec,CircleCheckIcon:li,CircleChevronDown:tc,CircleChevronDownIcon:tc,CircleChevronLeft:nc,CircleChevronLeftIcon:nc,CircleChevronRight:oc,CircleChevronRightIcon:oc,CircleChevronUp:rc,CircleChevronUpIcon:rc,CircleDashed:J5,CircleDashedIcon:J5,CircleDivide:ac,CircleDivideIcon:ac,CircleDollarSign:ev,CircleDollarSignIcon:ev,CircleDot:nv,CircleDotDashed:tv,CircleDotDashedIcon:tv,CircleDotIcon:nv,CircleEllipsis:ov,CircleEllipsisIcon:ov,CircleEqual:rv,CircleEqualIcon:rv,CircleFadingArrowUp:av,CircleFadingArrowUpIcon:av,CircleFadingPlus:iv,CircleFadingPlusIcon:iv,CircleGauge:ic,CircleGaugeIcon:ic,CircleHelp:qo,CircleHelpIcon:qo,CircleIcon:Y2,CircleMinus:sc,CircleMinusIcon:sc,CircleOff:sv,CircleOffIcon:sv,CircleParking:lc,CircleParkingIcon:lc,CircleParkingOff:cc,CircleParkingOffIcon:cc,CirclePause:dc,CirclePauseIcon:dc,CirclePercent:uc,CirclePercentIcon:uc,CirclePile:cv,CirclePileIcon:cv,CirclePlay:hc,CirclePlayIcon:hc,CirclePlus:fc,CirclePlusIcon:fc,CirclePoundSterling:lv,CirclePoundSterlingIcon:lv,CirclePower:pc,CirclePowerIcon:pc,CircleQuestionMark:qo,CircleQuestionMarkIcon:qo,CircleSlash:dv,CircleSlash2:yc,CircleSlash2Icon:yc,CircleSlashIcon:dv,CircleSlashed:yc,CircleSlashedIcon:yc,CircleSmall:uv,CircleSmallIcon:uv,CircleStar:hv,CircleStarIcon:hv,CircleStop:gc,CircleStopIcon:gc,CircleUser:kc,CircleUserIcon:kc,CircleUserRound:mc,CircleUserRoundIcon:mc,CircleX:vc,CircleXIcon:vc,CircuitBoard:fv,CircuitBoardIcon:fv,Citrus:pv,CitrusIcon:pv,Clapperboard:yv,ClapperboardIcon:yv,Clipboard:Cv,ClipboardCheck:mv,ClipboardCheckIcon:mv,ClipboardClock:gv,ClipboardClockIcon:gv,ClipboardCopy:kv,ClipboardCopyIcon:kv,ClipboardEdit:wc,ClipboardEditIcon:wc,ClipboardIcon:Cv,ClipboardList:vv,ClipboardListIcon:vv,ClipboardMinus:xv,ClipboardMinusIcon:xv,ClipboardPaste:wv,ClipboardPasteIcon:wv,ClipboardPen:wc,ClipboardPenIcon:wc,ClipboardPenLine:xc,ClipboardPenLineIcon:xc,ClipboardPlus:Mv,ClipboardPlusIcon:Mv,ClipboardSignature:xc,ClipboardSignatureIcon:xc,ClipboardType:bv,ClipboardTypeIcon:bv,ClipboardX:_v,ClipboardXIcon:_v,Clock:Bv,Clock1:Sv,Clock10:Lv,Clock10Icon:Lv,Clock11:Nv,Clock11Icon:Nv,Clock12:Iv,Clock12Icon:Iv,Clock1Icon:Sv,Clock2:Av,Clock2Icon:Av,Clock3:Ev,Clock3Icon:Ev,Clock4:jv,Clock4Icon:jv,Clock5:$v,Clock5Icon:$v,Clock6:Pv,Clock6Icon:Pv,Clock7:zv,Clock7Icon:zv,Clock8:Rv,Clock8Icon:Rv,Clock9:Tv,Clock9Icon:Tv,ClockAlert:Dv,ClockAlertIcon:Dv,ClockArrowDown:Hv,ClockArrowDownIcon:Hv,ClockArrowUp:qv,ClockArrowUpIcon:qv,ClockCheck:Ov,ClockCheckIcon:Ov,ClockFading:Fv,ClockFadingIcon:Fv,ClockIcon:Bv,ClockPlus:Vv,ClockPlusIcon:Vv,ClosedCaption:Uv,ClosedCaptionIcon:Uv,Cloud:Q2,CloudAlert:Wv,CloudAlertIcon:Wv,CloudBackup:Gv,CloudBackupIcon:Gv,CloudCheck:Kv,CloudCheckIcon:Kv,CloudCog:Xv,CloudCogIcon:Xv,CloudDownload:Mc,CloudDownloadIcon:Mc,CloudDrizzle:Zv,CloudDrizzleIcon:Zv,CloudFog:Yv,CloudFogIcon:Yv,CloudHail:Qv,CloudHailIcon:Qv,CloudIcon:Q2,CloudLightning:Jv,CloudLightningIcon:Jv,CloudMoon:tx,CloudMoonIcon:tx,CloudMoonRain:ex,CloudMoonRainIcon:ex,CloudOff:nx,CloudOffIcon:nx,CloudRain:rx,CloudRainIcon:rx,CloudRainWind:ox,CloudRainWindIcon:ox,CloudSnow:ax,CloudSnowIcon:ax,CloudSun:sx,CloudSunIcon:sx,CloudSunRain:ix,CloudSunRainIcon:ix,CloudSync:cx,CloudSyncIcon:cx,CloudUpload:bc,CloudUploadIcon:bc,Cloudy:lx,CloudyIcon:lx,Clover:dx,CloverIcon:dx,Club:ux,ClubIcon:ux,Code:hx,Code2:_c,Code2Icon:_c,CodeIcon:hx,CodeSquare:g1,CodeSquareIcon:g1,CodeXml:_c,CodeXmlIcon:_c,Codepen:fx,CodepenIcon:fx,Codesandbox:px,CodesandboxIcon:px,Coffee:yx,CoffeeIcon:yx,Cog:mx,CogIcon:mx,Coins:gx,CoinsIcon:gx,Columns:Cc,Columns2:Cc,Columns2Icon:Cc,Columns3:di,Columns3Cog:_r,Columns3CogIcon:_r,Columns3Icon:di,Columns4:kx,Columns4Icon:kx,ColumnsIcon:Cc,ColumnsSettings:_r,ColumnsSettingsIcon:_r,Combine:vx,CombineIcon:vx,Command:xx,CommandIcon:xx,Compass:wx,CompassIcon:wx,Component:Mx,ComponentIcon:Mx,Computer:bx,ComputerIcon:bx,ConciergeBell:_x,ConciergeBellIcon:_x,Cone:Cx,ConeIcon:Cx,Construction:Sx,ConstructionIcon:Sx,Contact:Lx,Contact2:Sc,Contact2Icon:Sc,ContactIcon:Lx,ContactRound:Sc,ContactRoundIcon:Sc,Container:Nx,ContainerIcon:Nx,Contrast:Ix,ContrastIcon:Ix,Cookie:Ax,CookieIcon:Ax,CookingPot:Ex,CookingPotIcon:Ex,Copy:Tx,CopyCheck:jx,CopyCheckIcon:jx,CopyIcon:Tx,CopyMinus:$x,CopyMinusIcon:$x,CopyPlus:Px,CopyPlusIcon:Px,CopySlash:zx,CopySlashIcon:zx,CopyX:Rx,CopyXIcon:Rx,Copyleft:Hx,CopyleftIcon:Hx,Copyright:Dx,CopyrightIcon:Dx,CornerDownLeft:Ox,CornerDownLeftIcon:Ox,CornerDownRight:Fx,CornerDownRightIcon:Fx,CornerLeftDown:qx,CornerLeftDownIcon:qx,CornerLeftUp:Vx,CornerLeftUpIcon:Vx,CornerRightDown:Ux,CornerRightDownIcon:Ux,CornerRightUp:Bx,CornerRightUpIcon:Bx,CornerUpLeft:Gx,CornerUpLeftIcon:Gx,CornerUpRight:Wx,CornerUpRightIcon:Wx,Cpu:Kx,CpuIcon:Kx,CreativeCommons:Xx,CreativeCommonsIcon:Xx,CreditCard:Zx,CreditCardIcon:Zx,Croissant:Yx,CroissantIcon:Yx,Crop:Qx,CropIcon:Qx,Cross:Jx,CrossIcon:Jx,Crosshair:e3,CrosshairIcon:e3,Crown:t3,CrownIcon:t3,Cuboid:n3,CuboidIcon:n3,CupSoda:o3,CupSodaIcon:o3,CurlyBraces:As,CurlyBracesIcon:As,Currency:r3,CurrencyIcon:r3,Cylinder:a3,CylinderIcon:a3,Dam:i3,DamIcon:i3,Database:J2,DatabaseBackup:s3,DatabaseBackupIcon:s3,DatabaseIcon:J2,DatabaseSearch:c3,DatabaseSearchIcon:c3,DatabaseZap:l3,DatabaseZapIcon:l3,DecimalsArrowLeft:d3,DecimalsArrowLeftIcon:d3,DecimalsArrowRight:u3,DecimalsArrowRightIcon:u3,Delete:h3,DeleteIcon:h3,Dessert:f3,DessertIcon:f3,Diameter:p3,DiameterIcon:p3,Diamond:eh,DiamondIcon:eh,DiamondMinus:y3,DiamondMinusIcon:y3,DiamondPercent:Lc,DiamondPercentIcon:Lc,DiamondPlus:m3,DiamondPlusIcon:m3,Dice1:g3,Dice1Icon:g3,Dice2:v3,Dice2Icon:v3,Dice3:k3,Dice3Icon:k3,Dice4:x3,Dice4Icon:x3,Dice5:w3,Dice5Icon:w3,Dice6:M3,Dice6Icon:M3,Dices:b3,DicesIcon:b3,Diff:_3,DiffIcon:_3,Disc:N3,Disc2:C3,Disc2Icon:C3,Disc3:L3,Disc3Icon:L3,DiscAlbum:S3,DiscAlbumIcon:S3,DiscIcon:N3,Divide:I3,DivideCircle:ac,DivideCircleIcon:ac,DivideIcon:I3,DivideSquare:w1,DivideSquareIcon:w1,Dna:E3,DnaIcon:E3,DnaOff:A3,DnaOffIcon:A3,Dock:j3,DockIcon:j3,Dog:$3,DogIcon:$3,DollarSign:P3,DollarSignIcon:P3,Donut:z3,DonutIcon:z3,DoorClosed:T3,DoorClosedIcon:T3,DoorClosedLocked:R3,DoorClosedLockedIcon:R3,DoorOpen:D3,DoorOpenIcon:D3,Dot:H3,DotIcon:H3,DotSquare:M1,DotSquareIcon:M1,Download:i0,DownloadCloud:Mc,DownloadCloudIcon:Mc,DownloadIcon:i0,DraftingCompass:O3,DraftingCompassIcon:O3,Drama:F3,DramaIcon:F3,Dribbble:q3,DribbbleIcon:q3,Drill:V3,DrillIcon:V3,Drone:B3,DroneIcon:B3,Droplet:W3,DropletIcon:W3,DropletOff:U3,DropletOffIcon:U3,Droplets:G3,DropletsIcon:G3,Drum:K3,DrumIcon:K3,Drumstick:X3,DrumstickIcon:X3,Dumbbell:Z3,DumbbellIcon:Z3,Ear:Y3,EarIcon:Y3,EarOff:Q3,EarOffIcon:Q3,Earth:Nc,EarthIcon:Nc,EarthLock:J3,EarthLockIcon:J3,Eclipse:e8,EclipseIcon:e8,Edit:eo,Edit2:Dl,Edit2Icon:Dl,Edit3:Tl,Edit3Icon:Tl,EditIcon:eo,Egg:o8,EggFried:t8,EggFriedIcon:t8,EggIcon:o8,EggOff:n8,EggOffIcon:n8,Ellipsis:Ac,EllipsisIcon:Ac,EllipsisVertical:Ic,EllipsisVerticalIcon:Ic,Equal:i8,EqualApproximately:r8,EqualApproximatelyIcon:r8,EqualIcon:i8,EqualNot:a8,EqualNotIcon:a8,EqualSquare:b1,EqualSquareIcon:b1,Eraser:s8,EraserIcon:s8,EthernetPort:c8,EthernetPortIcon:c8,Euro:l8,EuroIcon:l8,EvCharger:d8,EvChargerIcon:d8,Expand:u8,ExpandIcon:u8,ExternalLink:th,ExternalLinkIcon:th,Eye:p8,EyeClosed:h8,EyeClosedIcon:h8,EyeIcon:p8,EyeOff:f8,EyeOffIcon:f8,Facebook:y8,FacebookIcon:y8,Factory:m8,FactoryIcon:m8,Fan:k8,FanIcon:k8,FastForward:g8,FastForwardIcon:g8,Feather:v8,FeatherIcon:v8,Fence:x8,FenceIcon:x8,FerrisWheel:w8,FerrisWheelIcon:w8,Figma:M8,FigmaIcon:M8,File:Z8,FileArchive:b8,FileArchiveIcon:b8,FileAudio:Cr,FileAudio2:Cr,FileAudio2Icon:Cr,FileAudioIcon:Cr,FileAxis3D:Ec,FileAxis3DIcon:Ec,FileAxis3d:Ec,FileAxis3dIcon:Ec,FileBadge:jc,FileBadge2:jc,FileBadge2Icon:jc,FileBadgeIcon:jc,FileBarChart:zc,FileBarChart2:Rc,FileBarChart2Icon:Rc,FileBarChartIcon:zc,FileBox:_8,FileBoxIcon:_8,FileBraces:Pc,FileBracesCorner:$c,FileBracesCornerIcon:$c,FileBracesIcon:Pc,FileChartColumn:Rc,FileChartColumnIcon:Rc,FileChartColumnIncreasing:zc,FileChartColumnIncreasingIcon:zc,FileChartLine:Tc,FileChartLineIcon:Tc,FileChartPie:Dc,FileChartPieIcon:Dc,FileCheck:C8,FileCheck2:Hc,FileCheck2Icon:Hc,FileCheckCorner:Hc,FileCheckCornerIcon:Hc,FileCheckIcon:C8,FileClock:L8,FileClockIcon:L8,FileCode:S8,FileCode2:Oc,FileCode2Icon:Oc,FileCodeCorner:Oc,FileCodeCornerIcon:Oc,FileCodeIcon:S8,FileCog:Fc,FileCog2:Fc,FileCog2Icon:Fc,FileCogIcon:Fc,FileDiff:N8,FileDiffIcon:N8,FileDigit:I8,FileDigitIcon:I8,FileDown:nh,FileDownIcon:nh,FileEdit:Gc,FileEditIcon:Gc,FileExclamationPoint:qc,FileExclamationPointIcon:qc,FileHeadphone:Cr,FileHeadphoneIcon:Cr,FileHeart:A8,FileHeartIcon:A8,FileIcon:Z8,FileImage:E8,FileImageIcon:E8,FileInput:j8,FileInputIcon:j8,FileJson:Pc,FileJson2:$c,FileJson2Icon:$c,FileJsonIcon:Pc,FileKey:Vc,FileKey2:Vc,FileKey2Icon:Vc,FileKeyIcon:Vc,FileLineChart:Tc,FileLineChartIcon:Tc,FileLock:Bc,FileLock2:Bc,FileLock2Icon:Bc,FileLockIcon:Bc,FileMinus:$8,FileMinus2:Uc,FileMinus2Icon:Uc,FileMinusCorner:Uc,FileMinusCornerIcon:Uc,FileMinusIcon:$8,FileMusic:z8,FileMusicIcon:z8,FileOutput:P8,FileOutputIcon:P8,FilePen:Gc,FilePenIcon:Gc,FilePenLine:Wc,FilePenLineIcon:Wc,FilePieChart:Dc,FilePieChartIcon:Dc,FilePlay:Kc,FilePlayIcon:Kc,FilePlus:R8,FilePlus2:Xc,FilePlus2Icon:Xc,FilePlusCorner:Xc,FilePlusCornerIcon:Xc,FilePlusIcon:R8,FileQuestion:Zc,FileQuestionIcon:Zc,FileQuestionMark:Zc,FileQuestionMarkIcon:Zc,FileScan:T8,FileScanIcon:T8,FileSearch:D8,FileSearch2:Yc,FileSearch2Icon:Yc,FileSearchCorner:Yc,FileSearchCornerIcon:Yc,FileSearchIcon:D8,FileSignal:Qc,FileSignalIcon:Qc,FileSignature:Wc,FileSignatureIcon:Wc,FileSliders:H8,FileSlidersIcon:H8,FileSpreadsheet:O8,FileSpreadsheetIcon:O8,FileStack:F8,FileStackIcon:F8,FileSymlink:q8,FileSymlinkIcon:q8,FileTerminal:V8,FileTerminalIcon:V8,FileText:B8,FileTextIcon:B8,FileType:U8,FileType2:Jc,FileType2Icon:Jc,FileTypeCorner:Jc,FileTypeCornerIcon:Jc,FileTypeIcon:U8,FileUp:W8,FileUpIcon:W8,FileUser:G8,FileUserIcon:G8,FileVideo:Kc,FileVideo2:el,FileVideo2Icon:el,FileVideoCamera:el,FileVideoCameraIcon:el,FileVideoIcon:Kc,FileVolume:K8,FileVolume2:Qc,FileVolume2Icon:Qc,FileVolumeIcon:K8,FileWarning:qc,FileWarningIcon:qc,FileX:X8,FileX2:tl,FileX2Icon:tl,FileXCorner:tl,FileXCornerIcon:tl,FileXIcon:X8,Files:Y8,FilesIcon:Y8,Film:Q8,FilmIcon:Q8,Filter:il,FilterIcon:il,FilterX:al,FilterXIcon:al,Fingerprint:nl,FingerprintIcon:nl,FingerprintPattern:nl,FingerprintPatternIcon:nl,FireExtinguisher:J8,FireExtinguisherIcon:J8,Fish:n6,FishIcon:n6,FishOff:e6,FishOffIcon:e6,FishSymbol:t6,FishSymbolIcon:t6,FishingHook:o6,FishingHookIcon:o6,Flag:s6,FlagIcon:s6,FlagOff:r6,FlagOffIcon:r6,FlagTriangleLeft:a6,FlagTriangleLeftIcon:a6,FlagTriangleRight:i6,FlagTriangleRightIcon:i6,Flame:l6,FlameIcon:l6,FlameKindling:c6,FlameKindlingIcon:c6,Flashlight:u6,FlashlightIcon:u6,FlashlightOff:d6,FlashlightOffIcon:d6,FlaskConical:p6,FlaskConicalIcon:p6,FlaskConicalOff:h6,FlaskConicalOffIcon:h6,FlaskRound:f6,FlaskRoundIcon:f6,FlipHorizontal:m6,FlipHorizontal2:y6,FlipHorizontal2Icon:y6,FlipHorizontalIcon:m6,FlipVertical:k6,FlipVertical2:g6,FlipVertical2Icon:g6,FlipVerticalIcon:k6,Flower:x6,Flower2:v6,Flower2Icon:v6,FlowerIcon:x6,Focus:w6,FocusIcon:w6,FoldHorizontal:M6,FoldHorizontalIcon:M6,FoldVertical:b6,FoldVerticalIcon:b6,Folder:Z6,FolderArchive:_6,FolderArchiveIcon:_6,FolderCheck:C6,FolderCheckIcon:C6,FolderClock:S6,FolderClockIcon:S6,FolderClosed:N6,FolderClosedIcon:N6,FolderCode:L6,FolderCodeIcon:L6,FolderCog:ol,FolderCog2:ol,FolderCog2Icon:ol,FolderCogIcon:ol,FolderDot:I6,FolderDotIcon:I6,FolderDown:A6,FolderDownIcon:A6,FolderEdit:rl,FolderEditIcon:rl,FolderGit:j6,FolderGit2:E6,FolderGit2Icon:E6,FolderGitIcon:j6,FolderHeart:$6,FolderHeartIcon:$6,FolderIcon:Z6,FolderInput:P6,FolderInputIcon:P6,FolderKanban:z6,FolderKanbanIcon:z6,FolderKey:R6,FolderKeyIcon:R6,FolderLock:T6,FolderLockIcon:T6,FolderMinus:D6,FolderMinusIcon:D6,FolderOpen:oh,FolderOpenDot:H6,FolderOpenDotIcon:H6,FolderOpenIcon:oh,FolderOutput:O6,FolderOutputIcon:O6,FolderPen:rl,FolderPenIcon:rl,FolderPlus:F6,FolderPlusIcon:F6,FolderRoot:q6,FolderRootIcon:q6,FolderSearch:B6,FolderSearch2:V6,FolderSearch2Icon:V6,FolderSearchIcon:B6,FolderSymlink:U6,FolderSymlinkIcon:U6,FolderSync:W6,FolderSyncIcon:W6,FolderTree:G6,FolderTreeIcon:G6,FolderUp:K6,FolderUpIcon:K6,FolderX:X6,FolderXIcon:X6,Folders:Y6,FoldersIcon:Y6,Footprints:Q6,FootprintsIcon:Q6,ForkKnife:ud,ForkKnifeCrossed:dd,ForkKnifeCrossedIcon:dd,ForkKnifeIcon:ud,Forklift:tw,ForkliftIcon:tw,Form:J6,FormIcon:J6,FormInput:Ol,FormInputIcon:Ol,Forward:ew,ForwardIcon:ew,Frame:nw,FrameIcon:nw,Framer:aw,FramerIcon:aw,Frown:ow,FrownIcon:ow,Fuel:rw,FuelIcon:rw,Fullscreen:iw,FullscreenIcon:iw,FunctionSquare:_1,FunctionSquareIcon:_1,Funnel:il,FunnelIcon:il,FunnelPlus:sw,FunnelPlusIcon:sw,FunnelX:al,FunnelXIcon:al,GalleryHorizontal:lw,GalleryHorizontalEnd:cw,GalleryHorizontalEndIcon:cw,GalleryHorizontalIcon:lw,GalleryThumbnails:dw,GalleryThumbnailsIcon:dw,GalleryVertical:hw,GalleryVerticalEnd:uw,GalleryVerticalEndIcon:uw,GalleryVerticalIcon:hw,Gamepad:mw,Gamepad2:fw,Gamepad2Icon:fw,GamepadDirectional:pw,GamepadDirectionalIcon:pw,GamepadIcon:mw,GanttChart:qs,GanttChartIcon:qs,GanttChartSquare:Ir,GanttChartSquareIcon:Ir,Gauge:yw,GaugeCircle:ic,GaugeCircleIcon:ic,GaugeIcon:yw,Gavel:gw,GavelIcon:gw,Gem:kw,GemIcon:kw,GeorgianLari:vw,GeorgianLariIcon:vw,Ghost:ww,GhostIcon:ww,Gift:xw,GiftIcon:xw,GitBranch:_w,GitBranchIcon:_w,GitBranchMinus:Mw,GitBranchMinusIcon:Mw,GitBranchPlus:bw,GitBranchPlusIcon:bw,GitCommit:sl,GitCommitHorizontal:sl,GitCommitHorizontalIcon:sl,GitCommitIcon:sl,GitCommitVertical:Cw,GitCommitVerticalIcon:Cw,GitCompare:Lw,GitCompareArrows:Sw,GitCompareArrowsIcon:Sw,GitCompareIcon:Lw,GitFork:Nw,GitForkIcon:Nw,GitGraph:Iw,GitGraphIcon:Iw,GitMerge:Aw,GitMergeIcon:Aw,GitPullRequest:Rw,GitPullRequestArrow:Ew,GitPullRequestArrowIcon:Ew,GitPullRequestClosed:jw,GitPullRequestClosedIcon:jw,GitPullRequestCreate:Pw,GitPullRequestCreateArrow:$w,GitPullRequestCreateArrowIcon:$w,GitPullRequestCreateIcon:Pw,GitPullRequestDraft:zw,GitPullRequestDraftIcon:zw,GitPullRequestIcon:Rw,Github:Tw,GithubIcon:Tw,Gitlab:Dw,GitlabIcon:Dw,GlassWater:Hw,GlassWaterIcon:Hw,Glasses:Ow,GlassesIcon:Ow,Globe:Vw,Globe2:Nc,Globe2Icon:Nc,GlobeIcon:Vw,GlobeLock:Fw,GlobeLockIcon:Fw,GlobeX:qw,GlobeXIcon:qw,Goal:Bw,GoalIcon:Bw,Gpu:Uw,GpuIcon:Uw,Grab:hl,GrabIcon:hl,GraduationCap:Ww,GraduationCapIcon:Ww,Grape:Gw,GrapeIcon:Gw,Grid:Sr,Grid2X2:ul,Grid2X2Check:cl,Grid2X2CheckIcon:cl,Grid2X2Icon:ul,Grid2X2Plus:ll,Grid2X2PlusIcon:ll,Grid2X2X:dl,Grid2X2XIcon:dl,Grid2x2:ul,Grid2x2Check:cl,Grid2x2CheckIcon:cl,Grid2x2Icon:ul,Grid2x2Plus:ll,Grid2x2PlusIcon:ll,Grid2x2X:dl,Grid2x2XIcon:dl,Grid3X3:Sr,Grid3X3Icon:Sr,Grid3x2:Kw,Grid3x2Icon:Kw,Grid3x3:Sr,Grid3x3Icon:Sr,GridIcon:Sr,Grip:Zw,GripHorizontal:Xw,GripHorizontalIcon:Xw,GripIcon:Zw,GripVertical:Yw,GripVerticalIcon:Yw,Group:Qw,GroupIcon:Qw,Guitar:Jw,GuitarIcon:Jw,Ham:e7,HamIcon:e7,Hamburger:t7,HamburgerIcon:t7,Hammer:n7,HammerIcon:n7,Hand:rh,HandCoins:o7,HandCoinsIcon:o7,HandFist:r7,HandFistIcon:r7,HandGrab:hl,HandGrabIcon:hl,HandHeart:a7,HandHeartIcon:a7,HandHelping:fl,HandHelpingIcon:fl,HandIcon:rh,HandMetal:i7,HandMetalIcon:i7,HandPlatter:s7,HandPlatterIcon:s7,Handbag:c7,HandbagIcon:c7,Handshake:l7,HandshakeIcon:l7,HardDrive:h7,HardDriveDownload:d7,HardDriveDownloadIcon:d7,HardDriveIcon:h7,HardDriveUpload:u7,HardDriveUploadIcon:u7,HardHat:f7,HardHatIcon:f7,Hash:p7,HashIcon:p7,HatGlasses:y7,HatGlassesIcon:y7,Haze:m7,HazeIcon:m7,Hd:g7,HdIcon:g7,HdmiPort:k7,HdmiPortIcon:k7,Heading:C7,Heading1:v7,Heading1Icon:v7,Heading2:x7,Heading2Icon:x7,Heading3:w7,Heading3Icon:w7,Heading4:M7,Heading4Icon:M7,Heading5:b7,Heading5Icon:b7,Heading6:_7,Heading6Icon:_7,HeadingIcon:C7,HeadphoneOff:S7,HeadphoneOffIcon:S7,Headphones:L7,HeadphonesIcon:L7,Headset:N7,HeadsetIcon:N7,Heart:z7,HeartCrack:I7,HeartCrackIcon:I7,HeartHandshake:E7,HeartHandshakeIcon:E7,HeartIcon:z7,HeartMinus:A7,HeartMinusIcon:A7,HeartOff:j7,HeartOffIcon:j7,HeartPlus:$7,HeartPlusIcon:$7,HeartPulse:P7,HeartPulseIcon:P7,Heater:R7,HeaterIcon:R7,Helicopter:T7,HelicopterIcon:T7,HelpCircle:qo,HelpCircleIcon:qo,HelpingHand:fl,HelpingHandIcon:fl,Hexagon:ah,HexagonIcon:ah,Highlighter:D7,HighlighterIcon:D7,History:H7,HistoryIcon:H7,Home:pl,HomeIcon:pl,Hop:O7,HopIcon:O7,HopOff:F7,HopOffIcon:F7,Hospital:q7,HospitalIcon:q7,Hotel:V7,HotelIcon:V7,Hourglass:B7,HourglassIcon:B7,House:pl,HouseHeart:U7,HouseHeartIcon:U7,HouseIcon:pl,HousePlug:W7,HousePlugIcon:W7,HousePlus:G7,HousePlusIcon:G7,HouseWifi:K7,HouseWifiIcon:K7,IceCream:ml,IceCream2:yl,IceCream2Icon:yl,IceCreamBowl:yl,IceCreamBowlIcon:yl,IceCreamCone:ml,IceCreamConeIcon:ml,IceCreamIcon:ml,Icon:jY,IdCard:Z7,IdCardIcon:Z7,IdCardLanyard:X7,IdCardLanyardIcon:X7,Image:sh,ImageDown:Y7,ImageDownIcon:Y7,ImageIcon:sh,ImageMinus:J7,ImageMinusIcon:J7,ImageOff:Q7,ImageOffIcon:Q7,ImagePlay:eM,ImagePlayIcon:eM,ImagePlus:ih,ImagePlusIcon:ih,ImageUp:tM,ImageUpIcon:tM,ImageUpscale:nM,ImageUpscaleIcon:nM,Images:oM,ImagesIcon:oM,Import:rM,ImportIcon:rM,Inbox:aM,InboxIcon:aM,Indent:Nr,IndentDecrease:Lr,IndentDecreaseIcon:Lr,IndentIcon:Nr,IndentIncrease:Nr,IndentIncreaseIcon:Nr,IndianRupee:iM,IndianRupeeIcon:iM,Infinity:cM,InfinityIcon:cM,Info:sM,InfoIcon:sM,Inspect:A1,InspectIcon:A1,InspectionPanel:lM,InspectionPanelIcon:lM,Instagram:dM,InstagramIcon:dM,Italic:uM,ItalicIcon:uM,IterationCcw:hM,IterationCcwIcon:hM,IterationCw:fM,IterationCwIcon:fM,JapaneseYen:pM,JapaneseYenIcon:pM,Joystick:yM,JoystickIcon:yM,Kanban:mM,KanbanIcon:mM,KanbanSquare:C1,KanbanSquareDashed:k1,KanbanSquareDashedIcon:k1,KanbanSquareIcon:C1,Kayak:gM,KayakIcon:gM,Key:xM,KeyIcon:xM,KeyRound:kM,KeyRoundIcon:kM,KeySquare:vM,KeySquareIcon:vM,Keyboard:bM,KeyboardIcon:bM,KeyboardMusic:wM,KeyboardMusicIcon:wM,KeyboardOff:MM,KeyboardOffIcon:MM,Lamp:IM,LampCeiling:_M,LampCeilingIcon:_M,LampDesk:CM,LampDeskIcon:CM,LampFloor:SM,LampFloorIcon:SM,LampIcon:IM,LampWallDown:LM,LampWallDownIcon:LM,LampWallUp:NM,LampWallUpIcon:NM,LandPlot:AM,LandPlotIcon:AM,Landmark:EM,LandmarkIcon:EM,Languages:jM,LanguagesIcon:jM,Laptop:zM,Laptop2:gl,Laptop2Icon:gl,LaptopIcon:zM,LaptopMinimal:gl,LaptopMinimalCheck:$M,LaptopMinimalCheckIcon:$M,LaptopMinimalIcon:gl,Lasso:RM,LassoIcon:RM,LassoSelect:PM,LassoSelectIcon:PM,Laugh:TM,LaughIcon:TM,Layers:ka,Layers2:DM,Layers2Icon:DM,Layers3:ka,Layers3Icon:ka,LayersIcon:ka,LayersPlus:HM,LayersPlusIcon:HM,Layout:Rl,LayoutDashboard:ch,LayoutDashboardIcon:ch,LayoutGrid:OM,LayoutGridIcon:OM,LayoutIcon:Rl,LayoutList:FM,LayoutListIcon:FM,LayoutPanelLeft:qM,LayoutPanelLeftIcon:qM,LayoutPanelTop:BM,LayoutPanelTopIcon:BM,LayoutTemplate:VM,LayoutTemplateIcon:VM,Leaf:UM,LeafIcon:UM,LeafyGreen:WM,LeafyGreenIcon:WM,Lectern:GM,LecternIcon:GM,LetterText:Z1,LetterTextIcon:Z1,Library:XM,LibraryBig:KM,LibraryBigIcon:KM,LibraryIcon:XM,LibrarySquare:S1,LibrarySquareIcon:S1,LifeBuoy:ZM,LifeBuoyIcon:ZM,Ligature:YM,LigatureIcon:YM,Lightbulb:JM,LightbulbIcon:JM,LightbulbOff:QM,LightbulbOffIcon:QM,LineChart:Hs,LineChartIcon:Hs,LineSquiggle:eb,LineSquiggleIcon:eb,Link:nb,Link2:Ii,Link2Icon:Ii,Link2Off:tb,Link2OffIcon:tb,LinkIcon:nb,Linkedin:ob,LinkedinIcon:ob,List:Mb,ListCheck:rb,ListCheckIcon:rb,ListChecks:ab,ListChecksIcon:ab,ListChevronsDownUp:ib,ListChevronsDownUpIcon:ib,ListChevronsUpDown:cb,ListChevronsUpDownIcon:cb,ListCollapse:sb,ListCollapseIcon:sb,ListEnd:lb,ListEndIcon:lb,ListFilter:ub,ListFilterIcon:ub,ListFilterPlus:db,ListFilterPlusIcon:db,ListIcon:Mb,ListIndentDecrease:Lr,ListIndentDecreaseIcon:Lr,ListIndentIncrease:Nr,ListIndentIncreaseIcon:Nr,ListMinus:hb,ListMinusIcon:hb,ListMusic:fb,ListMusicIcon:fb,ListOrdered:pb,ListOrderedIcon:pb,ListPlus:yb,ListPlusIcon:yb,ListRestart:mb,ListRestartIcon:mb,ListStart:gb,ListStartIcon:gb,ListTodo:kb,ListTodoIcon:kb,ListTree:vb,ListTreeIcon:vb,ListVideo:xb,ListVideoIcon:xb,ListX:wb,ListXIcon:wb,Loader:_b,Loader2:Vn,Loader2Icon:Vn,LoaderCircle:Vn,LoaderCircleIcon:Vn,LoaderIcon:_b,LoaderPinwheel:bb,LoaderPinwheelIcon:bb,Locate:Lb,LocateFixed:Cb,LocateFixedIcon:Cb,LocateIcon:Lb,LocateOff:Sb,LocateOffIcon:Sb,LocationEdit:wl,LocationEditIcon:wl,Lock:Ib,LockIcon:Ib,LockKeyhole:Nb,LockKeyholeIcon:Nb,LockKeyholeOpen:kl,LockKeyholeOpenIcon:kl,LockOpen:vl,LockOpenIcon:vl,LogIn:Ab,LogInIcon:Ab,LogOut:Eb,LogOutIcon:Eb,Logs:jb,LogsIcon:jb,Lollipop:$b,LollipopIcon:$b,LucideAArrowDown:dy,LucideAArrowUp:uy,LucideALargeSmall:hy,LucideAccessibility:fy,LucideActivity:py,LucideActivitySquare:Zl,LucideAirVent:yy,LucideAirplay:my,LucideAlarmCheck:ys,LucideAlarmClock:ky,LucideAlarmClockCheck:ys,LucideAlarmClockMinus:ms,LucideAlarmClockOff:gy,LucideAlarmClockPlus:gs,LucideAlarmMinus:ms,LucideAlarmPlus:gs,LucideAlarmSmoke:vy,LucideAlbum:xy,LucideAlertCircle:ci,LucideAlertOctagon:Cl,LucideAlertTriangle:Pr,LucideAlignCenter:ui,LucideAlignCenterHorizontal:My,LucideAlignCenterVertical:wy,LucideAlignEndHorizontal:by,LucideAlignEndVertical:_y,LucideAlignHorizontalDistributeCenter:Cy,LucideAlignHorizontalDistributeEnd:Sy,LucideAlignHorizontalDistributeStart:Ly,LucideAlignHorizontalJustifyCenter:Ny,LucideAlignHorizontalJustifyEnd:Ay,LucideAlignHorizontalJustifyStart:Iy,LucideAlignHorizontalSpaceAround:Ey,LucideAlignHorizontalSpaceBetween:jy,LucideAlignJustify:X1,LucideAlignLeft:Vo,LucideAlignRight:hi,LucideAlignStartHorizontal:$y,LucideAlignStartVertical:Py,LucideAlignVerticalDistributeCenter:zy,LucideAlignVerticalDistributeEnd:Ry,LucideAlignVerticalDistributeStart:Ty,LucideAlignVerticalJustifyCenter:Dy,LucideAlignVerticalJustifyEnd:Hy,LucideAlignVerticalJustifyStart:Oy,LucideAlignVerticalSpaceAround:Fy,LucideAlignVerticalSpaceBetween:qy,LucideAmbulance:Vy,LucideAmpersand:By,LucideAmpersands:Uy,LucideAmphora:Wy,LucideAnchor:Gy,LucideAngry:Ky,LucideAnnoyed:Xy,LucideAntenna:Zy,LucideAnvil:Yy,LucideAperture:Qy,LucideAppWindow:em,LucideAppWindowMac:Jy,LucideApple:tm,LucideArchive:rm,LucideArchiveRestore:nm,LucideArchiveX:om,LucideAreaChart:js,LucideArmchair:am,LucideArrowBigDown:sm,LucideArrowBigDownDash:im,LucideArrowBigLeft:lm,LucideArrowBigLeftDash:cm,LucideArrowBigRight:um,LucideArrowBigRightDash:dm,LucideArrowBigUp:fm,LucideArrowBigUpDash:hm,LucideArrowDown:bm,LucideArrowDown01:pm,LucideArrowDown10:ym,LucideArrowDownAZ:ks,LucideArrowDownAz:ks,LucideArrowDownCircle:Ws,LucideArrowDownFromLine:mm,LucideArrowDownLeft:km,LucideArrowDownLeftFromCircle:Gs,LucideArrowDownLeftFromSquare:t1,LucideArrowDownLeftSquare:Yl,LucideArrowDownNarrowWide:gm,LucideArrowDownRight:xm,LucideArrowDownRightFromCircle:Xs,LucideArrowDownRightFromSquare:n1,LucideArrowDownRightSquare:Ql,LucideArrowDownSquare:Jl,LucideArrowDownToDot:vm,LucideArrowDownToLine:wm,LucideArrowDownUp:Mm,LucideArrowDownWideNarrow:vs,LucideArrowDownZA:xs,LucideArrowDownZa:xs,LucideArrowLeft:Sm,LucideArrowLeftCircle:Ks,LucideArrowLeftFromLine:_m,LucideArrowLeftRight:X2,LucideArrowLeftSquare:e1,LucideArrowLeftToLine:Cm,LucideArrowRight:a0,LucideArrowRightCircle:Qs,LucideArrowRightFromLine:Lm,LucideArrowRightLeft:Nm,LucideArrowRightSquare:a1,LucideArrowRightToLine:Im,LucideArrowUp:Hm,LucideArrowUp01:Am,LucideArrowUp10:Em,LucideArrowUpAZ:ws,LucideArrowUpAz:ws,LucideArrowUpCircle:Js,LucideArrowUpDown:jm,LucideArrowUpFromDot:$m,LucideArrowUpFromLine:Pm,LucideArrowUpLeft:zm,LucideArrowUpLeftFromCircle:Zs,LucideArrowUpLeftFromSquare:o1,LucideArrowUpLeftSquare:i1,LucideArrowUpNarrowWide:Ms,LucideArrowUpRight:Tm,LucideArrowUpRightFromCircle:Ys,LucideArrowUpRightFromSquare:r1,LucideArrowUpRightSquare:l1,LucideArrowUpSquare:s1,LucideArrowUpToLine:Rm,LucideArrowUpWideNarrow:Dm,LucideArrowUpZA:bs,LucideArrowUpZa:bs,LucideArrowsUpFromLine:Om,LucideAsterisk:Fm,LucideAsteriskSquare:c1,LucideAtSign:qm,LucideAtom:Vm,LucideAudioLines:Bm,LucideAudioWaveform:Wm,LucideAward:Um,LucideAxe:Gm,LucideAxis3D:_s,LucideAxis3d:_s,LucideBaby:Km,LucideBackpack:Xm,LucideBadge:ug,LucideBadgeAlert:Ym,LucideBadgeCent:Zm,LucideBadgeCheck:Cs,LucideBadgeDollarSign:Qm,LucideBadgeEuro:eg,LucideBadgeHelp:Ss,LucideBadgeIndianRupee:Jm,LucideBadgeInfo:tg,LucideBadgeJapaneseYen:ng,LucideBadgeMinus:og,LucideBadgePercent:rg,LucideBadgePlus:ag,LucideBadgePoundSterling:ig,LucideBadgeQuestionMark:Ss,LucideBadgeRussianRuble:sg,LucideBadgeSwissFranc:cg,LucideBadgeTurkishLira:lg,LucideBadgeX:dg,LucideBaggageClaim:hg,LucideBalloon:fg,LucideBan:Z2,LucideBanana:pg,LucideBandage:yg,LucideBanknote:vg,LucideBanknoteArrowDown:mg,LucideBanknoteArrowUp:gg,LucideBanknoteX:kg,LucideBarChart:Os,LucideBarChart2:Fs,LucideBarChart3:Ds,LucideBarChart4:Ts,LucideBarChartBig:Rs,LucideBarChartHorizontal:Ps,LucideBarChartHorizontalBig:$s,LucideBarcode:xg,LucideBarrel:wg,LucideBaseline:Mg,LucideBath:bg,LucideBattery:Ag,LucideBatteryCharging:_g,LucideBatteryFull:Cg,LucideBatteryLow:Sg,LucideBatteryMedium:Lg,LucideBatteryPlus:Ng,LucideBatteryWarning:Ig,LucideBeaker:Eg,LucideBean:$g,LucideBeanOff:jg,LucideBed:Rg,LucideBedDouble:Pg,LucideBedSingle:zg,LucideBeef:Tg,LucideBeer:Hg,LucideBeerOff:Dg,LucideBell:Wg,LucideBellDot:Og,LucideBellElectric:Fg,LucideBellMinus:qg,LucideBellOff:Vg,LucideBellPlus:Bg,LucideBellRing:Ug,LucideBetweenHorizonalEnd:Ls,LucideBetweenHorizonalStart:Ns,LucideBetweenHorizontalEnd:Ls,LucideBetweenHorizontalStart:Ns,LucideBetweenVerticalEnd:Gg,LucideBetweenVerticalStart:Kg,LucideBicepsFlexed:Xg,LucideBike:Zg,LucideBinary:Yg,LucideBinoculars:Qg,LucideBiohazard:Jg,LucideBird:ek,LucideBirdhouse:tk,LucideBitcoin:nk,LucideBlend:ok,LucideBlinds:rk,LucideBlocks:ak,LucideBluetooth:lk,LucideBluetoothConnected:ik,LucideBluetoothOff:sk,LucideBluetoothSearching:ck,LucideBold:dk,LucideBolt:uk,LucideBomb:hk,LucideBone:fk,LucideBook:Dk,LucideBookA:pk,LucideBookAlert:yk,LucideBookAudio:mk,LucideBookCheck:gk,LucideBookCopy:kk,LucideBookDashed:Is,LucideBookDown:vk,LucideBookHeadphones:xk,LucideBookHeart:wk,LucideBookImage:Mk,LucideBookKey:bk,LucideBookLock:_k,LucideBookMarked:Ck,LucideBookMinus:Sk,LucideBookOpen:Ik,LucideBookOpenCheck:Lk,LucideBookOpenText:Nk,LucideBookPlus:Ak,LucideBookSearch:Ek,LucideBookTemplate:Is,LucideBookText:jk,LucideBookType:$k,LucideBookUp:zk,LucideBookUp2:Pk,LucideBookUser:Rk,LucideBookX:Tk,LucideBookmark:Vk,LucideBookmarkCheck:Hk,LucideBookmarkMinus:Ok,LucideBookmarkPlus:Fk,LucideBookmarkX:qk,LucideBoomBox:Bk,LucideBot:Wk,LucideBotMessageSquare:Uk,LucideBotOff:Gk,LucideBottleWine:Kk,LucideBowArrow:Xk,LucideBox:Zk,LucideBoxSelect:x1,LucideBoxes:Yk,LucideBraces:As,LucideBrackets:Qk,LucideBrain:t4,LucideBrainCircuit:Jk,LucideBrainCog:e4,LucideBrickWall:r4,LucideBrickWallFire:n4,LucideBrickWallShield:o4,LucideBriefcase:c4,LucideBriefcaseBusiness:a4,LucideBriefcaseConveyorBelt:i4,LucideBriefcaseMedical:s4,LucideBringToFront:l4,LucideBrush:h4,LucideBrushCleaning:d4,LucideBubbles:u4,LucideBug:y4,LucideBugOff:f4,LucideBugPlay:p4,LucideBuilding:m4,LucideBuilding2:g4,LucideBus:v4,LucideBusFront:k4,LucideCable:w4,LucideCableCar:x4,LucideCake:b4,LucideCakeSlice:M4,LucideCalculator:_4,LucideCalendar:U4,LucideCalendar1:C4,LucideCalendarArrowDown:S4,LucideCalendarArrowUp:L4,LucideCalendarCheck:I4,LucideCalendarCheck2:N4,LucideCalendarClock:A4,LucideCalendarCog:E4,LucideCalendarDays:j4,LucideCalendarFold:$4,LucideCalendarHeart:P4,LucideCalendarMinus:R4,LucideCalendarMinus2:z4,LucideCalendarOff:T4,LucideCalendarPlus:O4,LucideCalendarPlus2:D4,LucideCalendarRange:H4,LucideCalendarSearch:F4,LucideCalendarSync:q4,LucideCalendarX:B4,LucideCalendarX2:V4,LucideCalendars:W4,LucideCamera:K4,LucideCameraOff:G4,LucideCandlestickChart:zs,LucideCandy:Y4,LucideCandyCane:X4,LucideCandyOff:Z4,LucideCannabis:J4,LucideCannabisOff:Q4,LucideCaptions:Es,LucideCaptionsOff:e5,LucideCar:o5,LucideCarFront:t5,LucideCarTaxiFront:n5,LucideCaravan:r5,LucideCardSim:a5,LucideCarrot:i5,LucideCaseLower:s5,LucideCaseSensitive:c5,LucideCaseUpper:l5,LucideCassetteTape:d5,LucideCast:u5,LucideCastle:h5,LucideCat:f5,LucideCctv:p5,LucideChartArea:js,LucideChartBar:Ps,LucideChartBarBig:$s,LucideChartBarDecreasing:y5,LucideChartBarIncreasing:m5,LucideChartBarStacked:g5,LucideChartCandlestick:zs,LucideChartColumn:Ds,LucideChartColumnBig:Rs,LucideChartColumnDecreasing:k5,LucideChartColumnIncreasing:Ts,LucideChartColumnStacked:v5,LucideChartGantt:x5,LucideChartLine:Hs,LucideChartNetwork:w5,LucideChartNoAxesColumn:Fs,LucideChartNoAxesColumnDecreasing:M5,LucideChartNoAxesColumnIncreasing:Os,LucideChartNoAxesCombined:b5,LucideChartNoAxesGantt:qs,LucideChartPie:Vs,LucideChartScatter:Bs,LucideChartSpline:_5,LucideCheck:Ni,LucideCheckCheck:C5,LucideCheckCircle:ec,LucideCheckCircle2:li,LucideCheckLine:S5,LucideCheckSquare:u1,LucideCheckSquare2:h1,LucideChefHat:L5,LucideCherry:N5,LucideChessBishop:I5,LucideChessKing:A5,LucideChessKnight:E5,LucideChessPawn:j5,LucideChessQueen:$5,LucideChessRook:z5,LucideChevronDown:P5,LucideChevronDownCircle:tc,LucideChevronDownSquare:f1,LucideChevronFirst:R5,LucideChevronLast:T5,LucideChevronLeft:D5,LucideChevronLeftCircle:nc,LucideChevronLeftSquare:p1,LucideChevronRight:H5,LucideChevronRightCircle:oc,LucideChevronRightSquare:m1,LucideChevronUp:O5,LucideChevronUpCircle:rc,LucideChevronUpSquare:y1,LucideChevronsDown:q5,LucideChevronsDownUp:F5,LucideChevronsLeft:U5,LucideChevronsLeftRight:B5,LucideChevronsLeftRightEllipsis:V5,LucideChevronsRight:G5,LucideChevronsRightLeft:W5,LucideChevronsUp:X5,LucideChevronsUpDown:K5,LucideChrome:Us,LucideChromium:Us,LucideChurch:Z5,LucideCigarette:Q5,LucideCigaretteOff:Y5,LucideCircle:Y2,LucideCircleAlert:ci,LucideCircleArrowDown:Ws,LucideCircleArrowLeft:Ks,LucideCircleArrowOutDownLeft:Gs,LucideCircleArrowOutDownRight:Xs,LucideCircleArrowOutUpLeft:Zs,LucideCircleArrowOutUpRight:Ys,LucideCircleArrowRight:Qs,LucideCircleArrowUp:Js,LucideCircleCheck:li,LucideCircleCheckBig:ec,LucideCircleChevronDown:tc,LucideCircleChevronLeft:nc,LucideCircleChevronRight:oc,LucideCircleChevronUp:rc,LucideCircleDashed:J5,LucideCircleDivide:ac,LucideCircleDollarSign:ev,LucideCircleDot:nv,LucideCircleDotDashed:tv,LucideCircleEllipsis:ov,LucideCircleEqual:rv,LucideCircleFadingArrowUp:av,LucideCircleFadingPlus:iv,LucideCircleGauge:ic,LucideCircleHelp:qo,LucideCircleMinus:sc,LucideCircleOff:sv,LucideCircleParking:lc,LucideCircleParkingOff:cc,LucideCirclePause:dc,LucideCirclePercent:uc,LucideCirclePile:cv,LucideCirclePlay:hc,LucideCirclePlus:fc,LucideCirclePoundSterling:lv,LucideCirclePower:pc,LucideCircleQuestionMark:qo,LucideCircleSlash:dv,LucideCircleSlash2:yc,LucideCircleSlashed:yc,LucideCircleSmall:uv,LucideCircleStar:hv,LucideCircleStop:gc,LucideCircleUser:kc,LucideCircleUserRound:mc,LucideCircleX:vc,LucideCircuitBoard:fv,LucideCitrus:pv,LucideClapperboard:yv,LucideClipboard:Cv,LucideClipboardCheck:mv,LucideClipboardClock:gv,LucideClipboardCopy:kv,LucideClipboardEdit:wc,LucideClipboardList:vv,LucideClipboardMinus:xv,LucideClipboardPaste:wv,LucideClipboardPen:wc,LucideClipboardPenLine:xc,LucideClipboardPlus:Mv,LucideClipboardSignature:xc,LucideClipboardType:bv,LucideClipboardX:_v,LucideClock:Bv,LucideClock1:Sv,LucideClock10:Lv,LucideClock11:Nv,LucideClock12:Iv,LucideClock2:Av,LucideClock3:Ev,LucideClock4:jv,LucideClock5:$v,LucideClock6:Pv,LucideClock7:zv,LucideClock8:Rv,LucideClock9:Tv,LucideClockAlert:Dv,LucideClockArrowDown:Hv,LucideClockArrowUp:qv,LucideClockCheck:Ov,LucideClockFading:Fv,LucideClockPlus:Vv,LucideClosedCaption:Uv,LucideCloud:Q2,LucideCloudAlert:Wv,LucideCloudBackup:Gv,LucideCloudCheck:Kv,LucideCloudCog:Xv,LucideCloudDownload:Mc,LucideCloudDrizzle:Zv,LucideCloudFog:Yv,LucideCloudHail:Qv,LucideCloudLightning:Jv,LucideCloudMoon:tx,LucideCloudMoonRain:ex,LucideCloudOff:nx,LucideCloudRain:rx,LucideCloudRainWind:ox,LucideCloudSnow:ax,LucideCloudSun:sx,LucideCloudSunRain:ix,LucideCloudSync:cx,LucideCloudUpload:bc,LucideCloudy:lx,LucideClover:dx,LucideClub:ux,LucideCode:hx,LucideCode2:_c,LucideCodeSquare:g1,LucideCodeXml:_c,LucideCodepen:fx,LucideCodesandbox:px,LucideCoffee:yx,LucideCog:mx,LucideCoins:gx,LucideColumns:Cc,LucideColumns2:Cc,LucideColumns3:di,LucideColumns3Cog:_r,LucideColumns4:kx,LucideColumnsSettings:_r,LucideCombine:vx,LucideCommand:xx,LucideCompass:wx,LucideComponent:Mx,LucideComputer:bx,LucideConciergeBell:_x,LucideCone:Cx,LucideConstruction:Sx,LucideContact:Lx,LucideContact2:Sc,LucideContactRound:Sc,LucideContainer:Nx,LucideContrast:Ix,LucideCookie:Ax,LucideCookingPot:Ex,LucideCopy:Tx,LucideCopyCheck:jx,LucideCopyMinus:$x,LucideCopyPlus:Px,LucideCopySlash:zx,LucideCopyX:Rx,LucideCopyleft:Hx,LucideCopyright:Dx,LucideCornerDownLeft:Ox,LucideCornerDownRight:Fx,LucideCornerLeftDown:qx,LucideCornerLeftUp:Vx,LucideCornerRightDown:Ux,LucideCornerRightUp:Bx,LucideCornerUpLeft:Gx,LucideCornerUpRight:Wx,LucideCpu:Kx,LucideCreativeCommons:Xx,LucideCreditCard:Zx,LucideCroissant:Yx,LucideCrop:Qx,LucideCross:Jx,LucideCrosshair:e3,LucideCrown:t3,LucideCuboid:n3,LucideCupSoda:o3,LucideCurlyBraces:As,LucideCurrency:r3,LucideCylinder:a3,LucideDam:i3,LucideDatabase:J2,LucideDatabaseBackup:s3,LucideDatabaseSearch:c3,LucideDatabaseZap:l3,LucideDecimalsArrowLeft:d3,LucideDecimalsArrowRight:u3,LucideDelete:h3,LucideDessert:f3,LucideDiameter:p3,LucideDiamond:eh,LucideDiamondMinus:y3,LucideDiamondPercent:Lc,LucideDiamondPlus:m3,LucideDice1:g3,LucideDice2:v3,LucideDice3:k3,LucideDice4:x3,LucideDice5:w3,LucideDice6:M3,LucideDices:b3,LucideDiff:_3,LucideDisc:N3,LucideDisc2:C3,LucideDisc3:L3,LucideDiscAlbum:S3,LucideDivide:I3,LucideDivideCircle:ac,LucideDivideSquare:w1,LucideDna:E3,LucideDnaOff:A3,LucideDock:j3,LucideDog:$3,LucideDollarSign:P3,LucideDonut:z3,LucideDoorClosed:T3,LucideDoorClosedLocked:R3,LucideDoorOpen:D3,LucideDot:H3,LucideDotSquare:M1,LucideDownload:i0,LucideDownloadCloud:Mc,LucideDraftingCompass:O3,LucideDrama:F3,LucideDribbble:q3,LucideDrill:V3,LucideDrone:B3,LucideDroplet:W3,LucideDropletOff:U3,LucideDroplets:G3,LucideDrum:K3,LucideDrumstick:X3,LucideDumbbell:Z3,LucideEar:Y3,LucideEarOff:Q3,LucideEarth:Nc,LucideEarthLock:J3,LucideEclipse:e8,LucideEdit:eo,LucideEdit2:Dl,LucideEdit3:Tl,LucideEgg:o8,LucideEggFried:t8,LucideEggOff:n8,LucideEllipsis:Ac,LucideEllipsisVertical:Ic,LucideEqual:i8,LucideEqualApproximately:r8,LucideEqualNot:a8,LucideEqualSquare:b1,LucideEraser:s8,LucideEthernetPort:c8,LucideEuro:l8,LucideEvCharger:d8,LucideExpand:u8,LucideExternalLink:th,LucideEye:p8,LucideEyeClosed:h8,LucideEyeOff:f8,LucideFacebook:y8,LucideFactory:m8,LucideFan:k8,LucideFastForward:g8,LucideFeather:v8,LucideFence:x8,LucideFerrisWheel:w8,LucideFigma:M8,LucideFile:Z8,LucideFileArchive:b8,LucideFileAudio:Cr,LucideFileAudio2:Cr,LucideFileAxis3D:Ec,LucideFileAxis3d:Ec,LucideFileBadge:jc,LucideFileBadge2:jc,LucideFileBarChart:zc,LucideFileBarChart2:Rc,LucideFileBox:_8,LucideFileBraces:Pc,LucideFileBracesCorner:$c,LucideFileChartColumn:Rc,LucideFileChartColumnIncreasing:zc,LucideFileChartLine:Tc,LucideFileChartPie:Dc,LucideFileCheck:C8,LucideFileCheck2:Hc,LucideFileCheckCorner:Hc,LucideFileClock:L8,LucideFileCode:S8,LucideFileCode2:Oc,LucideFileCodeCorner:Oc,LucideFileCog:Fc,LucideFileCog2:Fc,LucideFileDiff:N8,LucideFileDigit:I8,LucideFileDown:nh,LucideFileEdit:Gc,LucideFileExclamationPoint:qc,LucideFileHeadphone:Cr,LucideFileHeart:A8,LucideFileImage:E8,LucideFileInput:j8,LucideFileJson:Pc,LucideFileJson2:$c,LucideFileKey:Vc,LucideFileKey2:Vc,LucideFileLineChart:Tc,LucideFileLock:Bc,LucideFileLock2:Bc,LucideFileMinus:$8,LucideFileMinus2:Uc,LucideFileMinusCorner:Uc,LucideFileMusic:z8,LucideFileOutput:P8,LucideFilePen:Gc,LucideFilePenLine:Wc,LucideFilePieChart:Dc,LucideFilePlay:Kc,LucideFilePlus:R8,LucideFilePlus2:Xc,LucideFilePlusCorner:Xc,LucideFileQuestion:Zc,LucideFileQuestionMark:Zc,LucideFileScan:T8,LucideFileSearch:D8,LucideFileSearch2:Yc,LucideFileSearchCorner:Yc,LucideFileSignal:Qc,LucideFileSignature:Wc,LucideFileSliders:H8,LucideFileSpreadsheet:O8,LucideFileStack:F8,LucideFileSymlink:q8,LucideFileTerminal:V8,LucideFileText:B8,LucideFileType:U8,LucideFileType2:Jc,LucideFileTypeCorner:Jc,LucideFileUp:W8,LucideFileUser:G8,LucideFileVideo:Kc,LucideFileVideo2:el,LucideFileVideoCamera:el,LucideFileVolume:K8,LucideFileVolume2:Qc,LucideFileWarning:qc,LucideFileX:X8,LucideFileX2:tl,LucideFileXCorner:tl,LucideFiles:Y8,LucideFilm:Q8,LucideFilter:il,LucideFilterX:al,LucideFingerprint:nl,LucideFingerprintPattern:nl,LucideFireExtinguisher:J8,LucideFish:n6,LucideFishOff:e6,LucideFishSymbol:t6,LucideFishingHook:o6,LucideFlag:s6,LucideFlagOff:r6,LucideFlagTriangleLeft:a6,LucideFlagTriangleRight:i6,LucideFlame:l6,LucideFlameKindling:c6,LucideFlashlight:u6,LucideFlashlightOff:d6,LucideFlaskConical:p6,LucideFlaskConicalOff:h6,LucideFlaskRound:f6,LucideFlipHorizontal:m6,LucideFlipHorizontal2:y6,LucideFlipVertical:k6,LucideFlipVertical2:g6,LucideFlower:x6,LucideFlower2:v6,LucideFocus:w6,LucideFoldHorizontal:M6,LucideFoldVertical:b6,LucideFolder:Z6,LucideFolderArchive:_6,LucideFolderCheck:C6,LucideFolderClock:S6,LucideFolderClosed:N6,LucideFolderCode:L6,LucideFolderCog:ol,LucideFolderCog2:ol,LucideFolderDot:I6,LucideFolderDown:A6,LucideFolderEdit:rl,LucideFolderGit:j6,LucideFolderGit2:E6,LucideFolderHeart:$6,LucideFolderInput:P6,LucideFolderKanban:z6,LucideFolderKey:R6,LucideFolderLock:T6,LucideFolderMinus:D6,LucideFolderOpen:oh,LucideFolderOpenDot:H6,LucideFolderOutput:O6,LucideFolderPen:rl,LucideFolderPlus:F6,LucideFolderRoot:q6,LucideFolderSearch:B6,LucideFolderSearch2:V6,LucideFolderSymlink:U6,LucideFolderSync:W6,LucideFolderTree:G6,LucideFolderUp:K6,LucideFolderX:X6,LucideFolders:Y6,LucideFootprints:Q6,LucideForkKnife:ud,LucideForkKnifeCrossed:dd,LucideForklift:tw,LucideForm:J6,LucideFormInput:Ol,LucideForward:ew,LucideFrame:nw,LucideFramer:aw,LucideFrown:ow,LucideFuel:rw,LucideFullscreen:iw,LucideFunctionSquare:_1,LucideFunnel:il,LucideFunnelPlus:sw,LucideFunnelX:al,LucideGalleryHorizontal:lw,LucideGalleryHorizontalEnd:cw,LucideGalleryThumbnails:dw,LucideGalleryVertical:hw,LucideGalleryVerticalEnd:uw,LucideGamepad:mw,LucideGamepad2:fw,LucideGamepadDirectional:pw,LucideGanttChart:qs,LucideGanttChartSquare:Ir,LucideGauge:yw,LucideGaugeCircle:ic,LucideGavel:gw,LucideGem:kw,LucideGeorgianLari:vw,LucideGhost:ww,LucideGift:xw,LucideGitBranch:_w,LucideGitBranchMinus:Mw,LucideGitBranchPlus:bw,LucideGitCommit:sl,LucideGitCommitHorizontal:sl,LucideGitCommitVertical:Cw,LucideGitCompare:Lw,LucideGitCompareArrows:Sw,LucideGitFork:Nw,LucideGitGraph:Iw,LucideGitMerge:Aw,LucideGitPullRequest:Rw,LucideGitPullRequestArrow:Ew,LucideGitPullRequestClosed:jw,LucideGitPullRequestCreate:Pw,LucideGitPullRequestCreateArrow:$w,LucideGitPullRequestDraft:zw,LucideGithub:Tw,LucideGitlab:Dw,LucideGlassWater:Hw,LucideGlasses:Ow,LucideGlobe:Vw,LucideGlobe2:Nc,LucideGlobeLock:Fw,LucideGlobeX:qw,LucideGoal:Bw,LucideGpu:Uw,LucideGrab:hl,LucideGraduationCap:Ww,LucideGrape:Gw,LucideGrid:Sr,LucideGrid2X2:ul,LucideGrid2X2Check:cl,LucideGrid2X2Plus:ll,LucideGrid2X2X:dl,LucideGrid2x2:ul,LucideGrid2x2Check:cl,LucideGrid2x2Plus:ll,LucideGrid2x2X:dl,LucideGrid3X3:Sr,LucideGrid3x2:Kw,LucideGrid3x3:Sr,LucideGrip:Zw,LucideGripHorizontal:Xw,LucideGripVertical:Yw,LucideGroup:Qw,LucideGuitar:Jw,LucideHam:e7,LucideHamburger:t7,LucideHammer:n7,LucideHand:rh,LucideHandCoins:o7,LucideHandFist:r7,LucideHandGrab:hl,LucideHandHeart:a7,LucideHandHelping:fl,LucideHandMetal:i7,LucideHandPlatter:s7,LucideHandbag:c7,LucideHandshake:l7,LucideHardDrive:h7,LucideHardDriveDownload:d7,LucideHardDriveUpload:u7,LucideHardHat:f7,LucideHash:p7,LucideHatGlasses:y7,LucideHaze:m7,LucideHd:g7,LucideHdmiPort:k7,LucideHeading:C7,LucideHeading1:v7,LucideHeading2:x7,LucideHeading3:w7,LucideHeading4:M7,LucideHeading5:b7,LucideHeading6:_7,LucideHeadphoneOff:S7,LucideHeadphones:L7,LucideHeadset:N7,LucideHeart:z7,LucideHeartCrack:I7,LucideHeartHandshake:E7,LucideHeartMinus:A7,LucideHeartOff:j7,LucideHeartPlus:$7,LucideHeartPulse:P7,LucideHeater:R7,LucideHelicopter:T7,LucideHelpCircle:qo,LucideHelpingHand:fl,LucideHexagon:ah,LucideHighlighter:D7,LucideHistory:H7,LucideHome:pl,LucideHop:O7,LucideHopOff:F7,LucideHospital:q7,LucideHotel:V7,LucideHourglass:B7,LucideHouse:pl,LucideHouseHeart:U7,LucideHousePlug:W7,LucideHousePlus:G7,LucideHouseWifi:K7,LucideIceCream:ml,LucideIceCream2:yl,LucideIceCreamBowl:yl,LucideIceCreamCone:ml,LucideIdCard:Z7,LucideIdCardLanyard:X7,LucideImage:sh,LucideImageDown:Y7,LucideImageMinus:J7,LucideImageOff:Q7,LucideImagePlay:eM,LucideImagePlus:ih,LucideImageUp:tM,LucideImageUpscale:nM,LucideImages:oM,LucideImport:rM,LucideInbox:aM,LucideIndent:Nr,LucideIndentDecrease:Lr,LucideIndentIncrease:Nr,LucideIndianRupee:iM,LucideInfinity:cM,LucideInfo:sM,LucideInspect:A1,LucideInspectionPanel:lM,LucideInstagram:dM,LucideItalic:uM,LucideIterationCcw:hM,LucideIterationCw:fM,LucideJapaneseYen:pM,LucideJoystick:yM,LucideKanban:mM,LucideKanbanSquare:C1,LucideKanbanSquareDashed:k1,LucideKayak:gM,LucideKey:xM,LucideKeyRound:kM,LucideKeySquare:vM,LucideKeyboard:bM,LucideKeyboardMusic:wM,LucideKeyboardOff:MM,LucideLamp:IM,LucideLampCeiling:_M,LucideLampDesk:CM,LucideLampFloor:SM,LucideLampWallDown:LM,LucideLampWallUp:NM,LucideLandPlot:AM,LucideLandmark:EM,LucideLanguages:jM,LucideLaptop:zM,LucideLaptop2:gl,LucideLaptopMinimal:gl,LucideLaptopMinimalCheck:$M,LucideLasso:RM,LucideLassoSelect:PM,LucideLaugh:TM,LucideLayers:ka,LucideLayers2:DM,LucideLayers3:ka,LucideLayersPlus:HM,LucideLayout:Rl,LucideLayoutDashboard:ch,LucideLayoutGrid:OM,LucideLayoutList:FM,LucideLayoutPanelLeft:qM,LucideLayoutPanelTop:BM,LucideLayoutTemplate:VM,LucideLeaf:UM,LucideLeafyGreen:WM,LucideLectern:GM,LucideLetterText:Z1,LucideLibrary:XM,LucideLibraryBig:KM,LucideLibrarySquare:S1,LucideLifeBuoy:ZM,LucideLigature:YM,LucideLightbulb:JM,LucideLightbulbOff:QM,LucideLineChart:Hs,LucideLineSquiggle:eb,LucideLink:nb,LucideLink2:Ii,LucideLink2Off:tb,LucideLinkedin:ob,LucideList:Mb,LucideListCheck:rb,LucideListChecks:ab,LucideListChevronsDownUp:ib,LucideListChevronsUpDown:cb,LucideListCollapse:sb,LucideListEnd:lb,LucideListFilter:ub,LucideListFilterPlus:db,LucideListIndentDecrease:Lr,LucideListIndentIncrease:Nr,LucideListMinus:hb,LucideListMusic:fb,LucideListOrdered:pb,LucideListPlus:yb,LucideListRestart:mb,LucideListStart:gb,LucideListTodo:kb,LucideListTree:vb,LucideListVideo:xb,LucideListX:wb,LucideLoader:_b,LucideLoader2:Vn,LucideLoaderCircle:Vn,LucideLoaderPinwheel:bb,LucideLocate:Lb,LucideLocateFixed:Cb,LucideLocateOff:Sb,LucideLocationEdit:wl,LucideLock:Ib,LucideLockKeyhole:Nb,LucideLockKeyholeOpen:kl,LucideLockOpen:vl,LucideLogIn:Ab,LucideLogOut:Eb,LucideLogs:jb,LucideLollipop:$b,LucideLuggage:Pb,LucideMSquare:L1,LucideMagnet:zb,LucideMail:Vb,LucideMailCheck:Rb,LucideMailMinus:Tb,LucideMailOpen:Db,LucideMailPlus:Hb,LucideMailQuestion:xl,LucideMailQuestionMark:xl,LucideMailSearch:Ob,LucideMailWarning:Fb,LucideMailX:qb,LucideMailbox:Ub,LucideMails:Bb,LucideMap:i9,LucideMapMinus:Wb,LucideMapPin:o9,LucideMapPinCheck:Kb,LucideMapPinCheckInside:Gb,LucideMapPinHouse:Xb,LucideMapPinMinus:Yb,LucideMapPinMinusInside:Zb,LucideMapPinOff:Qb,LucideMapPinPen:wl,LucideMapPinPlus:e9,LucideMapPinPlusInside:Jb,LucideMapPinX:t9,LucideMapPinXInside:n9,LucideMapPinned:r9,LucideMapPlus:a9,LucideMars:c9,LucideMarsStroke:s9,LucideMartini:l9,LucideMaximize:d9,LucideMaximize2:Md,LucideMedal:u9,LucideMegaphone:f9,LucideMegaphoneOff:h9,LucideMeh:p9,LucideMemoryStick:y9,LucideMenu:g9,LucideMenuSquare:N1,LucideMerge:m9,LucideMessageCircle:L9,LucideMessageCircleCode:k9,LucideMessageCircleDashed:v9,LucideMessageCircleHeart:x9,LucideMessageCircleMore:w9,LucideMessageCircleOff:M9,LucideMessageCirclePlus:b9,LucideMessageCircleQuestion:Ml,LucideMessageCircleQuestionMark:Ml,LucideMessageCircleReply:_9,LucideMessageCircleWarning:C9,LucideMessageCircleX:S9,LucideMessageSquare:V9,LucideMessageSquareCode:N9,LucideMessageSquareDashed:I9,LucideMessageSquareDiff:A9,LucideMessageSquareDot:E9,LucideMessageSquareHeart:j9,LucideMessageSquareLock:$9,LucideMessageSquareMore:P9,LucideMessageSquareOff:z9,LucideMessageSquarePlus:R9,LucideMessageSquareQuote:T9,LucideMessageSquareReply:D9,LucideMessageSquareShare:H9,LucideMessageSquareText:O9,LucideMessageSquareWarning:F9,LucideMessageSquareX:q9,LucideMessagesSquare:B9,LucideMic:W9,LucideMic2:bl,LucideMicOff:U9,LucideMicVocal:bl,LucideMicrochip:G9,LucideMicroscope:K9,LucideMicrowave:X9,LucideMilestone:Z9,LucideMilk:Q9,LucideMilkOff:Y9,LucideMinimize:e_,LucideMinimize2:J9,LucideMinus:lh,LucideMinusCircle:sc,LucideMinusSquare:I1,LucideMonitor:p_,LucideMonitorCheck:t_,LucideMonitorCloud:n_,LucideMonitorCog:o_,LucideMonitorDot:r_,LucideMonitorDown:a_,LucideMonitorOff:i_,LucideMonitorPause:s_,LucideMonitorPlay:c_,LucideMonitorSmartphone:l_,LucideMonitorSpeaker:d_,LucideMonitorStop:u_,LucideMonitorUp:h_,LucideMonitorX:f_,LucideMoon:m_,LucideMoonStar:y_,LucideMoreHorizontal:Ac,LucideMoreVertical:Ic,LucideMotorbike:g_,LucideMountain:v_,LucideMountainSnow:k_,LucideMouse:C_,LucideMouseOff:x_,LucideMousePointer:__,LucideMousePointer2:dh,LucideMousePointer2Off:w_,LucideMousePointerBan:M_,LucideMousePointerClick:b_,LucideMousePointerSquareDashed:v1,LucideMove:T_,LucideMove3D:_l,LucideMove3d:_l,LucideMoveDiagonal:L_,LucideMoveDiagonal2:S_,LucideMoveDown:A_,LucideMoveDownLeft:N_,LucideMoveDownRight:I_,LucideMoveHorizontal:E_,LucideMoveLeft:uh,LucideMoveRight:j_,LucideMoveUp:z_,LucideMoveUpLeft:$_,LucideMoveUpRight:P_,LucideMoveVertical:R_,LucideMusic:F_,LucideMusic2:D_,LucideMusic3:H_,LucideMusic4:O_,LucideNavigation:U_,LucideNavigation2:V_,LucideNavigation2Off:q_,LucideNavigationOff:B_,LucideNetwork:W_,LucideNewspaper:G_,LucideNfc:K_,LucideNonBinary:X_,LucideNotebook:J_,LucideNotebookPen:Z_,LucideNotebookTabs:Y_,LucideNotebookText:Q_,LucideNotepadText:tC,LucideNotepadTextDashed:eC,LucideNut:nC,LucideNutOff:oC,LucideOctagon:aC,LucideOctagonAlert:Cl,LucideOctagonMinus:rC,LucideOctagonPause:Sl,LucideOctagonX:Ll,LucideOmega:iC,LucideOption:cC,LucideOrbit:sC,LucideOrigami:lC,LucideOutdent:Lr,LucidePackage:gC,LucidePackage2:dC,LucidePackageCheck:uC,LucidePackageMinus:hC,LucidePackageOpen:fC,LucidePackagePlus:pC,LucidePackageSearch:yC,LucidePackageX:mC,LucidePaintBucket:kC,LucidePaintRoller:vC,LucidePaintbrush:xC,LucidePaintbrush2:Nl,LucidePaintbrushVertical:Nl,LucidePalette:wC,LucidePalmtree:ed,LucidePanda:MC,LucidePanelBottom:_C,LucidePanelBottomClose:bC,LucidePanelBottomDashed:Il,LucidePanelBottomInactive:Il,LucidePanelBottomOpen:CC,LucidePanelLeft:$l,LucidePanelLeftClose:Al,LucidePanelLeftDashed:El,LucidePanelLeftInactive:El,LucidePanelLeftOpen:jl,LucidePanelLeftRightDashed:SC,LucidePanelRight:LC,LucidePanelRightClose:hh,LucidePanelRightDashed:Pl,LucidePanelRightInactive:Pl,LucidePanelRightOpen:fh,LucidePanelTop:EC,LucidePanelTopBottomDashed:NC,LucidePanelTopClose:IC,LucidePanelTopDashed:zl,LucidePanelTopInactive:zl,LucidePanelTopOpen:AC,LucidePanelsLeftBottom:jC,LucidePanelsLeftRight:di,LucidePanelsRightBottom:$C,LucidePanelsTopBottom:Vl,LucidePanelsTopLeft:Rl,LucidePaperclip:PC,LucideParentheses:RC,LucideParkingCircle:lc,LucideParkingCircleOff:cc,LucideParkingMeter:zC,LucideParkingSquare:j1,LucideParkingSquareOff:E1,LucidePartyPopper:TC,LucidePause:DC,LucidePauseCircle:dc,LucidePauseOctagon:Sl,LucidePawPrint:HC,LucidePcCase:OC,LucidePen:Dl,LucidePenBox:eo,LucidePenLine:Tl,LucidePenOff:FC,LucidePenSquare:eo,LucidePenTool:qC,LucidePencil:yh,LucidePencilLine:ph,LucidePencilOff:VC,LucidePencilRuler:BC,LucidePentagon:UC,LucidePercent:WC,LucidePercentCircle:uc,LucidePercentDiamond:Lc,LucidePercentSquare:$1,LucidePersonStanding:KC,LucidePhilippinePeso:GC,LucidePhone:tS,LucidePhoneCall:XC,LucidePhoneForwarded:ZC,LucidePhoneIncoming:YC,LucidePhoneMissed:QC,LucidePhoneOff:JC,LucidePhoneOutgoing:eS,LucidePi:nS,LucidePiSquare:R1,LucidePiano:oS,LucidePickaxe:rS,LucidePictureInPicture:iS,LucidePictureInPicture2:aS,LucidePieChart:Vs,LucidePiggyBank:sS,LucidePilcrow:dS,LucidePilcrowLeft:cS,LucidePilcrowRight:lS,LucidePilcrowSquare:P1,LucidePill:hS,LucidePillBottle:uS,LucidePin:pS,LucidePinOff:fS,LucidePipette:yS,LucidePizza:mS,LucidePlane:vS,LucidePlaneLanding:gS,LucidePlaneTakeoff:kS,LucidePlay:bd,LucidePlayCircle:hc,LucidePlaySquare:z1,LucidePlug:wS,LucidePlug2:xS,LucidePlugZap:Hl,LucidePlugZap2:Hl,LucidePlus:mh,LucidePlusCircle:fc,LucidePlusSquare:T1,LucidePocket:bS,LucidePocketKnife:MS,LucidePodcast:CS,LucidePointer:SS,LucidePointerOff:_S,LucidePopcorn:LS,LucidePopsicle:NS,LucidePoundSterling:IS,LucidePower:ES,LucidePowerCircle:pc,LucidePowerOff:AS,LucidePowerSquare:D1,LucidePresentation:jS,LucidePrinter:zS,LucidePrinterCheck:$S,LucidePrinterX:PS,LucideProjector:TS,LucideProportions:RS,LucidePuzzle:DS,LucidePyramid:HS,LucideQrCode:OS,LucideQuote:FS,LucideRabbit:qS,LucideRadar:VS,LucideRadiation:BS,LucideRadical:US,LucideRadio:KS,LucideRadioReceiver:WS,LucideRadioTower:GS,LucideRadius:XS,LucideRailSymbol:ZS,LucideRainbow:YS,LucideRat:QS,LucideRatio:JS,LucideReceipt:lL,LucideReceiptCent:eL,LucideReceiptEuro:tL,LucideReceiptIndianRupee:nL,LucideReceiptJapaneseYen:oL,LucideReceiptPoundSterling:rL,LucideReceiptRussianRuble:aL,LucideReceiptSwissFranc:iL,LucideReceiptText:sL,LucideReceiptTurkishLira:cL,LucideRectangleCircle:dL,LucideRectangleEllipsis:Ol,LucideRectangleGoggles:uL,LucideRectangleHorizontal:hL,LucideRectangleVertical:fL,LucideRecycle:pL,LucideRedo:gL,LucideRedo2:yL,LucideRedoDot:mL,LucideRefreshCcw:xL,LucideRefreshCcwDot:kL,LucideRefreshCw:wL,LucideRefreshCwOff:vL,LucideRefrigerator:ML,LucideRegex:bL,LucideRemoveFormatting:_L,LucideRepeat:LL,LucideRepeat1:SL,LucideRepeat2:CL,LucideReplace:IL,LucideReplaceAll:NL,LucideReply:EL,LucideReplyAll:AL,LucideRewind:jL,LucideRibbon:PL,LucideRocket:$L,LucideRockingChair:zL,LucideRollerCoaster:RL,LucideRose:TL,LucideRotate3D:Fl,LucideRotate3d:Fl,LucideRotateCcw:OL,LucideRotateCcwKey:DL,LucideRotateCcwSquare:HL,LucideRotateCw:qL,LucideRotateCwSquare:FL,LucideRoute:BL,LucideRouteOff:VL,LucideRouter:UL,LucideRows:ql,LucideRows2:ql,LucideRows3:Vl,LucideRows4:WL,LucideRss:GL,LucideRuler:XL,LucideRulerDimensionLine:KL,LucideRussianRuble:ZL,LucideSailboat:YL,LucideSalad:QL,LucideSandwich:JL,LucideSatellite:tN,LucideSatelliteDish:eN,LucideSaudiRiyal:nN,LucideSave:aN,LucideSaveAll:oN,LucideSaveOff:rN,LucideScale:iN,LucideScale3D:Bl,LucideScale3d:Bl,LucideScaling:sN,LucideScan:mN,LucideScanBarcode:cN,LucideScanEye:lN,LucideScanFace:dN,LucideScanHeart:uN,LucideScanLine:hN,LucideScanQrCode:fN,LucideScanSearch:pN,LucideScanText:yN,LucideScatterChart:Bs,LucideSchool:gN,LucideSchool2:nd,LucideScissors:xN,LucideScissorsLineDashed:kN,LucideScissorsSquare:H1,LucideScissorsSquareDashedBottom:d1,LucideScooter:vN,LucideScreenShare:MN,LucideScreenShareOff:wN,LucideScroll:_N,LucideScrollText:bN,LucideSearch:gh,LucideSearchAlert:CN,LucideSearchCheck:SN,LucideSearchCode:LN,LucideSearchSlash:NN,LucideSearchX:IN,LucideSection:AN,LucideSend:jN,LucideSendHorizonal:Ul,LucideSendHorizontal:Ul,LucideSendToBack:EN,LucideSeparatorHorizontal:PN,LucideSeparatorVertical:$N,LucideServer:kh,LucideServerCog:zN,LucideServerCrash:RN,LucideServerOff:TN,LucideSettings:HN,LucideSettings2:DN,LucideShapes:vh,LucideShare:ON,LucideShare2:xh,LucideSheet:FN,LucideShell:qN,LucideShield:QN,LucideShieldAlert:VN,LucideShieldBan:BN,LucideShieldCheck:UN,LucideShieldClose:Gl,LucideShieldEllipsis:WN,LucideShieldHalf:GN,LucideShieldMinus:KN,LucideShieldOff:XN,LucideShieldPlus:ZN,LucideShieldQuestion:Wl,LucideShieldQuestionMark:Wl,LucideShieldUser:YN,LucideShieldX:Gl,LucideShip:tI,LucideShipWheel:JN,LucideShirt:eI,LucideShoppingBag:oI,LucideShoppingBasket:nI,LucideShoppingCart:rI,LucideShovel:aI,LucideShowerHead:iI,LucideShredder:sI,LucideShrimp:cI,LucideShrink:lI,LucideShrub:dI,LucideShuffle:uI,LucideSidebar:$l,LucideSidebarClose:Al,LucideSidebarOpen:jl,LucideSigma:hI,LucideSigmaSquare:O1,LucideSignal:gI,LucideSignalHigh:fI,LucideSignalLow:pI,LucideSignalMedium:yI,LucideSignalZero:mI,LucideSignature:kI,LucideSignpost:xI,LucideSignpostBig:vI,LucideSiren:wI,LucideSkipBack:MI,LucideSkipForward:bI,LucideSkull:_I,LucideSlack:CI,LucideSlash:SI,LucideSlashSquare:F1,LucideSlice:LI,LucideSliders:Kl,LucideSlidersHorizontal:NI,LucideSlidersVertical:Kl,LucideSmartphone:EI,LucideSmartphoneCharging:II,LucideSmartphoneNfc:AI,LucideSmile:$I,LucideSmilePlus:jI,LucideSnail:PI,LucideSnowflake:zI,LucideSoapDispenserDroplet:RI,LucideSofa:TI,LucideSolarPanel:DI,LucideSortAsc:Ms,LucideSortDesc:vs,LucideSoup:HI,LucideSpace:OI,LucideSpade:FI,LucideSparkle:qI,LucideSparkles:Xl,LucideSpeaker:VI,LucideSpeech:BI,LucideSpellCheck:WI,LucideSpellCheck2:UI,LucideSpline:GI,LucideSplinePointer:KI,LucideSplit:XI,LucideSplitSquareHorizontal:q1,LucideSplitSquareVertical:V1,LucideSpool:ZI,LucideSpotlight:YI,LucideSprayCan:QI,LucideSprout:JI,LucideSquare:s0,LucideSquareActivity:Zl,LucideSquareArrowDown:Jl,LucideSquareArrowDownLeft:Yl,LucideSquareArrowDownRight:Ql,LucideSquareArrowLeft:e1,LucideSquareArrowOutDownLeft:t1,LucideSquareArrowOutDownRight:n1,LucideSquareArrowOutUpLeft:o1,LucideSquareArrowOutUpRight:r1,LucideSquareArrowRight:a1,LucideSquareArrowUp:s1,LucideSquareArrowUpLeft:i1,LucideSquareArrowUpRight:l1,LucideSquareAsterisk:c1,LucideSquareBottomDashedScissors:d1,LucideSquareChartGantt:Ir,LucideSquareCheck:h1,LucideSquareCheckBig:u1,LucideSquareChevronDown:f1,LucideSquareChevronLeft:p1,LucideSquareChevronRight:m1,LucideSquareChevronUp:y1,LucideSquareCode:g1,LucideSquareDashed:x1,LucideSquareDashedBottom:tA,LucideSquareDashedBottomCode:eA,LucideSquareDashedKanban:k1,LucideSquareDashedMousePointer:v1,LucideSquareDashedTopSolid:nA,LucideSquareDivide:w1,LucideSquareDot:M1,LucideSquareEqual:b1,LucideSquareFunction:_1,LucideSquareGanttChart:Ir,LucideSquareKanban:C1,LucideSquareLibrary:S1,LucideSquareM:L1,LucideSquareMenu:N1,LucideSquareMinus:I1,LucideSquareMousePointer:A1,LucideSquareParking:j1,LucideSquareParkingOff:E1,LucideSquarePause:oA,LucideSquarePen:eo,LucideSquarePercent:$1,LucideSquarePi:R1,LucideSquarePilcrow:P1,LucideSquarePlay:z1,LucideSquarePlus:T1,LucideSquarePower:D1,LucideSquareRadical:rA,LucideSquareRoundCorner:aA,LucideSquareScissors:H1,LucideSquareSigma:O1,LucideSquareSlash:F1,LucideSquareSplitHorizontal:q1,LucideSquareSplitVertical:V1,LucideSquareSquare:sA,LucideSquareStack:iA,LucideSquareStar:lA,LucideSquareStop:cA,LucideSquareTerminal:B1,LucideSquareUser:W1,LucideSquareUserRound:U1,LucideSquareX:G1,LucideSquaresExclude:dA,LucideSquaresIntersect:uA,LucideSquaresSubtract:hA,LucideSquaresUnite:fA,LucideSquircle:c0,LucideSquircleDashed:pA,LucideSquirrel:yA,LucideStamp:mA,LucideStar:vA,LucideStarHalf:gA,LucideStarOff:kA,LucideStars:Xl,LucideStepBack:xA,LucideStepForward:wA,LucideStethoscope:MA,LucideSticker:l0,LucideStickyNote:wh,LucideStone:bA,LucideStopCircle:gc,LucideStore:_A,LucideStretchHorizontal:SA,LucideStretchVertical:CA,LucideStrikethrough:LA,LucideSubscript:NA,LucideSubtitles:Es,LucideSun:$A,LucideSunDim:IA,LucideSunMedium:AA,LucideSunMoon:EA,LucideSunSnow:jA,LucideSunrise:PA,LucideSunset:zA,LucideSuperscript:RA,LucideSwatchBook:TA,LucideSwissFranc:DA,LucideSwitchCamera:HA,LucideSword:OA,LucideSwords:FA,LucideSyringe:qA,LucideTable:ZA,LucideTable2:VA,LucideTableCellsMerge:BA,LucideTableCellsSplit:UA,LucideTableColumnsSplit:WA,LucideTableConfig:_r,LucideTableOfContents:GA,LucideTableProperties:KA,LucideTableRowsSplit:XA,LucideTablet:QA,LucideTabletSmartphone:YA,LucideTablets:JA,LucideTag:eE,LucideTags:tE,LucideTally1:nE,LucideTally2:oE,LucideTally3:rE,LucideTally4:aE,LucideTally5:iE,LucideTangent:sE,LucideTarget:cE,LucideTelescope:lE,LucideTent:uE,LucideTentTree:dE,LucideTerminal:hE,LucideTerminalSquare:B1,LucideTestTube:fE,LucideTestTube2:K1,LucideTestTubeDiagonal:K1,LucideTestTubes:pE,LucideText:Vo,LucideTextAlignCenter:ui,LucideTextAlignEnd:hi,LucideTextAlignJustify:X1,LucideTextAlignStart:Vo,LucideTextCursor:mE,LucideTextCursorInput:yE,LucideTextInitial:Z1,LucideTextQuote:gE,LucideTextSearch:kE,LucideTextSelect:Y1,LucideTextSelection:Y1,LucideTextWrap:Q1,LucideTheater:vE,LucideThermometer:ME,LucideThermometerSnowflake:xE,LucideThermometerSun:wE,LucideThumbsDown:bE,LucideThumbsUp:_E,LucideTicket:EE,LucideTicketCheck:CE,LucideTicketMinus:SE,LucideTicketPercent:LE,LucideTicketPlus:NE,LucideTicketSlash:IE,LucideTicketX:AE,LucideTickets:$E,LucideTicketsPlane:jE,LucideTimer:RE,LucideTimerOff:PE,LucideTimerReset:zE,LucideToggleLeft:TE,LucideToggleRight:DE,LucideToilet:HE,LucideToolCase:FE,LucideToolbox:OE,LucideTornado:qE,LucideTorus:VE,LucideTouchpad:UE,LucideTouchpadOff:BE,LucideTowerControl:WE,LucideToyBrick:GE,LucideTractor:KE,LucideTrafficCone:XE,LucideTrain:J1,LucideTrainFront:YE,LucideTrainFrontTunnel:ZE,LucideTrainTrack:QE,LucideTramFront:J1,LucideTransgender:JE,LucideTrash:ej,LucideTrash2:Mh,LucideTreeDeciduous:tj,LucideTreePalm:ed,LucideTreePine:nj,LucideTrees:oj,LucideTrello:rj,LucideTrendingDown:aj,LucideTrendingUp:sj,LucideTrendingUpDown:ij,LucideTriangle:dj,LucideTriangleAlert:Pr,LucideTriangleDashed:cj,LucideTriangleRight:lj,LucideTrophy:uj,LucideTruck:fj,LucideTruckElectric:hj,LucideTurkishLira:pj,LucideTurntable:yj,LucideTurtle:mj,LucideTv:kj,LucideTv2:td,LucideTvMinimal:td,LucideTvMinimalPlay:gj,LucideTwitch:vj,LucideTwitter:xj,LucideType:d0,LucideTypeOutline:wj,LucideUmbrella:bj,LucideUmbrellaOff:Mj,LucideUnderline:_j,LucideUndo:Lj,LucideUndo2:Cj,LucideUndoDot:Sj,LucideUnfoldHorizontal:Nj,LucideUnfoldVertical:Ij,LucideUngroup:Aj,LucideUniversity:nd,LucideUnlink:jj,LucideUnlink2:Ej,LucideUnlock:vl,LucideUnlockKeyhole:kl,LucideUnplug:$j,LucideUpload:bh,LucideUploadCloud:bc,LucideUsb:Pj,LucideUser:_h,LucideUser2:cd,LucideUserCheck:zj,LucideUserCheck2:od,LucideUserCircle:kc,LucideUserCircle2:mc,LucideUserCog:Rj,LucideUserCog2:rd,LucideUserKey:Tj,LucideUserLock:Dj,LucideUserMinus:Hj,LucideUserMinus2:ad,LucideUserPen:Oj,LucideUserPlus:Fj,LucideUserPlus2:id,LucideUserRound:cd,LucideUserRoundCheck:od,LucideUserRoundCog:rd,LucideUserRoundKey:qj,LucideUserRoundMinus:ad,LucideUserRoundPen:Vj,LucideUserRoundPlus:id,LucideUserRoundSearch:Bj,LucideUserRoundX:sd,LucideUserSearch:Uj,LucideUserSquare:W1,LucideUserSquare2:U1,LucideUserStar:Wj,LucideUserX:Gj,LucideUserX2:sd,LucideUsers:Ch,LucideUsers2:ld,LucideUsersRound:ld,LucideUtensils:ud,LucideUtensilsCrossed:dd,LucideUtilityPole:Kj,LucideVan:Xj,LucideVariable:Zj,LucideVault:Yj,LucideVectorSquare:Qj,LucideVegan:Jj,LucideVenetianMask:e$,LucideVenus:n$,LucideVenusAndMars:t$,LucideVerified:Cs,LucideVibrate:r$,LucideVibrateOff:o$,LucideVideo:i$,LucideVideoOff:a$,LucideVideotape:s$,LucideView:c$,LucideVoicemail:l$,LucideVolleyball:d$,LucideVolume:y$,LucideVolume1:u$,LucideVolume2:h$,LucideVolumeOff:f$,LucideVolumeX:p$,LucideVote:m$,LucideWallet:k$,LucideWallet2:hd,LucideWalletCards:g$,LucideWalletMinimal:hd,LucideWallpaper:v$,LucideWand:x$,LucideWand2:fd,LucideWandSparkles:fd,LucideWarehouse:w$,LucideWashingMachine:M$,LucideWatch:b$,LucideWaves:L$,LucideWavesArrowDown:_$,LucideWavesArrowUp:C$,LucideWavesLadder:S$,LucideWaypoints:N$,LucideWebcam:I$,LucideWebhook:E$,LucideWebhookOff:A$,LucideWeight:$$,LucideWeightTilde:j$,LucideWheat:R$,LucideWheatOff:P$,LucideWholeWord:z$,LucideWifi:B$,LucideWifiCog:T$,LucideWifiHigh:D$,LucideWifiLow:H$,LucideWifiOff:O$,LucideWifiPen:F$,LucideWifiSync:q$,LucideWifiZero:V$,LucideWind:W$,LucideWindArrowDown:U$,LucideWine:K$,LucideWineOff:G$,LucideWorkflow:X$,LucideWorm:Z$,LucideWrapText:Q1,LucideWrench:Y$,LucideX:Ai,LucideXCircle:vc,LucideXOctagon:Ll,LucideXSquare:G1,LucideYoutube:Q$,LucideZap:eP,LucideZapOff:J$,LucideZoomIn:tP,LucideZoomOut:nP,Luggage:Pb,LuggageIcon:Pb,MSquare:L1,MSquareIcon:L1,Magnet:zb,MagnetIcon:zb,Mail:Vb,MailCheck:Rb,MailCheckIcon:Rb,MailIcon:Vb,MailMinus:Tb,MailMinusIcon:Tb,MailOpen:Db,MailOpenIcon:Db,MailPlus:Hb,MailPlusIcon:Hb,MailQuestion:xl,MailQuestionIcon:xl,MailQuestionMark:xl,MailQuestionMarkIcon:xl,MailSearch:Ob,MailSearchIcon:Ob,MailWarning:Fb,MailWarningIcon:Fb,MailX:qb,MailXIcon:qb,Mailbox:Ub,MailboxIcon:Ub,Mails:Bb,MailsIcon:Bb,Map:i9,MapIcon:i9,MapMinus:Wb,MapMinusIcon:Wb,MapPin:o9,MapPinCheck:Kb,MapPinCheckIcon:Kb,MapPinCheckInside:Gb,MapPinCheckInsideIcon:Gb,MapPinHouse:Xb,MapPinHouseIcon:Xb,MapPinIcon:o9,MapPinMinus:Yb,MapPinMinusIcon:Yb,MapPinMinusInside:Zb,MapPinMinusInsideIcon:Zb,MapPinOff:Qb,MapPinOffIcon:Qb,MapPinPen:wl,MapPinPenIcon:wl,MapPinPlus:e9,MapPinPlusIcon:e9,MapPinPlusInside:Jb,MapPinPlusInsideIcon:Jb,MapPinX:t9,MapPinXIcon:t9,MapPinXInside:n9,MapPinXInsideIcon:n9,MapPinned:r9,MapPinnedIcon:r9,MapPlus:a9,MapPlusIcon:a9,Mars:c9,MarsIcon:c9,MarsStroke:s9,MarsStrokeIcon:s9,Martini:l9,MartiniIcon:l9,Maximize:d9,Maximize2:Md,Maximize2Icon:Md,MaximizeIcon:d9,Medal:u9,MedalIcon:u9,Megaphone:f9,MegaphoneIcon:f9,MegaphoneOff:h9,MegaphoneOffIcon:h9,Meh:p9,MehIcon:p9,MemoryStick:y9,MemoryStickIcon:y9,Menu:g9,MenuIcon:g9,MenuSquare:N1,MenuSquareIcon:N1,Merge:m9,MergeIcon:m9,MessageCircle:L9,MessageCircleCode:k9,MessageCircleCodeIcon:k9,MessageCircleDashed:v9,MessageCircleDashedIcon:v9,MessageCircleHeart:x9,MessageCircleHeartIcon:x9,MessageCircleIcon:L9,MessageCircleMore:w9,MessageCircleMoreIcon:w9,MessageCircleOff:M9,MessageCircleOffIcon:M9,MessageCirclePlus:b9,MessageCirclePlusIcon:b9,MessageCircleQuestion:Ml,MessageCircleQuestionIcon:Ml,MessageCircleQuestionMark:Ml,MessageCircleQuestionMarkIcon:Ml,MessageCircleReply:_9,MessageCircleReplyIcon:_9,MessageCircleWarning:C9,MessageCircleWarningIcon:C9,MessageCircleX:S9,MessageCircleXIcon:S9,MessageSquare:V9,MessageSquareCode:N9,MessageSquareCodeIcon:N9,MessageSquareDashed:I9,MessageSquareDashedIcon:I9,MessageSquareDiff:A9,MessageSquareDiffIcon:A9,MessageSquareDot:E9,MessageSquareDotIcon:E9,MessageSquareHeart:j9,MessageSquareHeartIcon:j9,MessageSquareIcon:V9,MessageSquareLock:$9,MessageSquareLockIcon:$9,MessageSquareMore:P9,MessageSquareMoreIcon:P9,MessageSquareOff:z9,MessageSquareOffIcon:z9,MessageSquarePlus:R9,MessageSquarePlusIcon:R9,MessageSquareQuote:T9,MessageSquareQuoteIcon:T9,MessageSquareReply:D9,MessageSquareReplyIcon:D9,MessageSquareShare:H9,MessageSquareShareIcon:H9,MessageSquareText:O9,MessageSquareTextIcon:O9,MessageSquareWarning:F9,MessageSquareWarningIcon:F9,MessageSquareX:q9,MessageSquareXIcon:q9,MessagesSquare:B9,MessagesSquareIcon:B9,Mic:W9,Mic2:bl,Mic2Icon:bl,MicIcon:W9,MicOff:U9,MicOffIcon:U9,MicVocal:bl,MicVocalIcon:bl,Microchip:G9,MicrochipIcon:G9,Microscope:K9,MicroscopeIcon:K9,Microwave:X9,MicrowaveIcon:X9,Milestone:Z9,MilestoneIcon:Z9,Milk:Q9,MilkIcon:Q9,MilkOff:Y9,MilkOffIcon:Y9,Minimize:e_,Minimize2:J9,Minimize2Icon:J9,MinimizeIcon:e_,Minus:lh,MinusCircle:sc,MinusCircleIcon:sc,MinusIcon:lh,MinusSquare:I1,MinusSquareIcon:I1,Monitor:p_,MonitorCheck:t_,MonitorCheckIcon:t_,MonitorCloud:n_,MonitorCloudIcon:n_,MonitorCog:o_,MonitorCogIcon:o_,MonitorDot:r_,MonitorDotIcon:r_,MonitorDown:a_,MonitorDownIcon:a_,MonitorIcon:p_,MonitorOff:i_,MonitorOffIcon:i_,MonitorPause:s_,MonitorPauseIcon:s_,MonitorPlay:c_,MonitorPlayIcon:c_,MonitorSmartphone:l_,MonitorSmartphoneIcon:l_,MonitorSpeaker:d_,MonitorSpeakerIcon:d_,MonitorStop:u_,MonitorStopIcon:u_,MonitorUp:h_,MonitorUpIcon:h_,MonitorX:f_,MonitorXIcon:f_,Moon:m_,MoonIcon:m_,MoonStar:y_,MoonStarIcon:y_,MoreHorizontal:Ac,MoreHorizontalIcon:Ac,MoreVertical:Ic,MoreVerticalIcon:Ic,Motorbike:g_,MotorbikeIcon:g_,Mountain:v_,MountainIcon:v_,MountainSnow:k_,MountainSnowIcon:k_,Mouse:C_,MouseIcon:C_,MouseOff:x_,MouseOffIcon:x_,MousePointer:__,MousePointer2:dh,MousePointer2Icon:dh,MousePointer2Off:w_,MousePointer2OffIcon:w_,MousePointerBan:M_,MousePointerBanIcon:M_,MousePointerClick:b_,MousePointerClickIcon:b_,MousePointerIcon:__,MousePointerSquareDashed:v1,MousePointerSquareDashedIcon:v1,Move:T_,Move3D:_l,Move3DIcon:_l,Move3d:_l,Move3dIcon:_l,MoveDiagonal:L_,MoveDiagonal2:S_,MoveDiagonal2Icon:S_,MoveDiagonalIcon:L_,MoveDown:A_,MoveDownIcon:A_,MoveDownLeft:N_,MoveDownLeftIcon:N_,MoveDownRight:I_,MoveDownRightIcon:I_,MoveHorizontal:E_,MoveHorizontalIcon:E_,MoveIcon:T_,MoveLeft:uh,MoveLeftIcon:uh,MoveRight:j_,MoveRightIcon:j_,MoveUp:z_,MoveUpIcon:z_,MoveUpLeft:$_,MoveUpLeftIcon:$_,MoveUpRight:P_,MoveUpRightIcon:P_,MoveVertical:R_,MoveVerticalIcon:R_,Music:F_,Music2:D_,Music2Icon:D_,Music3:H_,Music3Icon:H_,Music4:O_,Music4Icon:O_,MusicIcon:F_,Navigation:U_,Navigation2:V_,Navigation2Icon:V_,Navigation2Off:q_,Navigation2OffIcon:q_,NavigationIcon:U_,NavigationOff:B_,NavigationOffIcon:B_,Network:W_,NetworkIcon:W_,Newspaper:G_,NewspaperIcon:G_,Nfc:K_,NfcIcon:K_,NonBinary:X_,NonBinaryIcon:X_,Notebook:J_,NotebookIcon:J_,NotebookPen:Z_,NotebookPenIcon:Z_,NotebookTabs:Y_,NotebookTabsIcon:Y_,NotebookText:Q_,NotebookTextIcon:Q_,NotepadText:tC,NotepadTextDashed:eC,NotepadTextDashedIcon:eC,NotepadTextIcon:tC,Nut:nC,NutIcon:nC,NutOff:oC,NutOffIcon:oC,Octagon:aC,OctagonAlert:Cl,OctagonAlertIcon:Cl,OctagonIcon:aC,OctagonMinus:rC,OctagonMinusIcon:rC,OctagonPause:Sl,OctagonPauseIcon:Sl,OctagonX:Ll,OctagonXIcon:Ll,Omega:iC,OmegaIcon:iC,Option:cC,OptionIcon:cC,Orbit:sC,OrbitIcon:sC,Origami:lC,OrigamiIcon:lC,Outdent:Lr,OutdentIcon:Lr,Package:gC,Package2:dC,Package2Icon:dC,PackageCheck:uC,PackageCheckIcon:uC,PackageIcon:gC,PackageMinus:hC,PackageMinusIcon:hC,PackageOpen:fC,PackageOpenIcon:fC,PackagePlus:pC,PackagePlusIcon:pC,PackageSearch:yC,PackageSearchIcon:yC,PackageX:mC,PackageXIcon:mC,PaintBucket:kC,PaintBucketIcon:kC,PaintRoller:vC,PaintRollerIcon:vC,Paintbrush:xC,Paintbrush2:Nl,Paintbrush2Icon:Nl,PaintbrushIcon:xC,PaintbrushVertical:Nl,PaintbrushVerticalIcon:Nl,Palette:wC,PaletteIcon:wC,Palmtree:ed,PalmtreeIcon:ed,Panda:MC,PandaIcon:MC,PanelBottom:_C,PanelBottomClose:bC,PanelBottomCloseIcon:bC,PanelBottomDashed:Il,PanelBottomDashedIcon:Il,PanelBottomIcon:_C,PanelBottomInactive:Il,PanelBottomInactiveIcon:Il,PanelBottomOpen:CC,PanelBottomOpenIcon:CC,PanelLeft:$l,PanelLeftClose:Al,PanelLeftCloseIcon:Al,PanelLeftDashed:El,PanelLeftDashedIcon:El,PanelLeftIcon:$l,PanelLeftInactive:El,PanelLeftInactiveIcon:El,PanelLeftOpen:jl,PanelLeftOpenIcon:jl,PanelLeftRightDashed:SC,PanelLeftRightDashedIcon:SC,PanelRight:LC,PanelRightClose:hh,PanelRightCloseIcon:hh,PanelRightDashed:Pl,PanelRightDashedIcon:Pl,PanelRightIcon:LC,PanelRightInactive:Pl,PanelRightInactiveIcon:Pl,PanelRightOpen:fh,PanelRightOpenIcon:fh,PanelTop:EC,PanelTopBottomDashed:NC,PanelTopBottomDashedIcon:NC,PanelTopClose:IC,PanelTopCloseIcon:IC,PanelTopDashed:zl,PanelTopDashedIcon:zl,PanelTopIcon:EC,PanelTopInactive:zl,PanelTopInactiveIcon:zl,PanelTopOpen:AC,PanelTopOpenIcon:AC,PanelsLeftBottom:jC,PanelsLeftBottomIcon:jC,PanelsLeftRight:di,PanelsLeftRightIcon:di,PanelsRightBottom:$C,PanelsRightBottomIcon:$C,PanelsTopBottom:Vl,PanelsTopBottomIcon:Vl,PanelsTopLeft:Rl,PanelsTopLeftIcon:Rl,Paperclip:PC,PaperclipIcon:PC,Parentheses:RC,ParenthesesIcon:RC,ParkingCircle:lc,ParkingCircleIcon:lc,ParkingCircleOff:cc,ParkingCircleOffIcon:cc,ParkingMeter:zC,ParkingMeterIcon:zC,ParkingSquare:j1,ParkingSquareIcon:j1,ParkingSquareOff:E1,ParkingSquareOffIcon:E1,PartyPopper:TC,PartyPopperIcon:TC,Pause:DC,PauseCircle:dc,PauseCircleIcon:dc,PauseIcon:DC,PauseOctagon:Sl,PauseOctagonIcon:Sl,PawPrint:HC,PawPrintIcon:HC,PcCase:OC,PcCaseIcon:OC,Pen:Dl,PenBox:eo,PenBoxIcon:eo,PenIcon:Dl,PenLine:Tl,PenLineIcon:Tl,PenOff:FC,PenOffIcon:FC,PenSquare:eo,PenSquareIcon:eo,PenTool:qC,PenToolIcon:qC,Pencil:yh,PencilIcon:yh,PencilLine:ph,PencilLineIcon:ph,PencilOff:VC,PencilOffIcon:VC,PencilRuler:BC,PencilRulerIcon:BC,Pentagon:UC,PentagonIcon:UC,Percent:WC,PercentCircle:uc,PercentCircleIcon:uc,PercentDiamond:Lc,PercentDiamondIcon:Lc,PercentIcon:WC,PercentSquare:$1,PercentSquareIcon:$1,PersonStanding:KC,PersonStandingIcon:KC,PhilippinePeso:GC,PhilippinePesoIcon:GC,Phone:tS,PhoneCall:XC,PhoneCallIcon:XC,PhoneForwarded:ZC,PhoneForwardedIcon:ZC,PhoneIcon:tS,PhoneIncoming:YC,PhoneIncomingIcon:YC,PhoneMissed:QC,PhoneMissedIcon:QC,PhoneOff:JC,PhoneOffIcon:JC,PhoneOutgoing:eS,PhoneOutgoingIcon:eS,Pi:nS,PiIcon:nS,PiSquare:R1,PiSquareIcon:R1,Piano:oS,PianoIcon:oS,Pickaxe:rS,PickaxeIcon:rS,PictureInPicture:iS,PictureInPicture2:aS,PictureInPicture2Icon:aS,PictureInPictureIcon:iS,PieChart:Vs,PieChartIcon:Vs,PiggyBank:sS,PiggyBankIcon:sS,Pilcrow:dS,PilcrowIcon:dS,PilcrowLeft:cS,PilcrowLeftIcon:cS,PilcrowRight:lS,PilcrowRightIcon:lS,PilcrowSquare:P1,PilcrowSquareIcon:P1,Pill:hS,PillBottle:uS,PillBottleIcon:uS,PillIcon:hS,Pin:pS,PinIcon:pS,PinOff:fS,PinOffIcon:fS,Pipette:yS,PipetteIcon:yS,Pizza:mS,PizzaIcon:mS,Plane:vS,PlaneIcon:vS,PlaneLanding:gS,PlaneLandingIcon:gS,PlaneTakeoff:kS,PlaneTakeoffIcon:kS,Play:bd,PlayCircle:hc,PlayCircleIcon:hc,PlayIcon:bd,PlaySquare:z1,PlaySquareIcon:z1,Plug:wS,Plug2:xS,Plug2Icon:xS,PlugIcon:wS,PlugZap:Hl,PlugZap2:Hl,PlugZap2Icon:Hl,PlugZapIcon:Hl,Plus:mh,PlusCircle:fc,PlusCircleIcon:fc,PlusIcon:mh,PlusSquare:T1,PlusSquareIcon:T1,Pocket:bS,PocketIcon:bS,PocketKnife:MS,PocketKnifeIcon:MS,Podcast:CS,PodcastIcon:CS,Pointer:SS,PointerIcon:SS,PointerOff:_S,PointerOffIcon:_S,Popcorn:LS,PopcornIcon:LS,Popsicle:NS,PopsicleIcon:NS,PoundSterling:IS,PoundSterlingIcon:IS,Power:ES,PowerCircle:pc,PowerCircleIcon:pc,PowerIcon:ES,PowerOff:AS,PowerOffIcon:AS,PowerSquare:D1,PowerSquareIcon:D1,Presentation:jS,PresentationIcon:jS,Printer:zS,PrinterCheck:$S,PrinterCheckIcon:$S,PrinterIcon:zS,PrinterX:PS,PrinterXIcon:PS,Projector:TS,ProjectorIcon:TS,Proportions:RS,ProportionsIcon:RS,Puzzle:DS,PuzzleIcon:DS,Pyramid:HS,PyramidIcon:HS,QrCode:OS,QrCodeIcon:OS,Quote:FS,QuoteIcon:FS,Rabbit:qS,RabbitIcon:qS,Radar:VS,RadarIcon:VS,Radiation:BS,RadiationIcon:BS,Radical:US,RadicalIcon:US,Radio:KS,RadioIcon:KS,RadioReceiver:WS,RadioReceiverIcon:WS,RadioTower:GS,RadioTowerIcon:GS,Radius:XS,RadiusIcon:XS,RailSymbol:ZS,RailSymbolIcon:ZS,Rainbow:YS,RainbowIcon:YS,Rat:QS,RatIcon:QS,Ratio:JS,RatioIcon:JS,Receipt:lL,ReceiptCent:eL,ReceiptCentIcon:eL,ReceiptEuro:tL,ReceiptEuroIcon:tL,ReceiptIcon:lL,ReceiptIndianRupee:nL,ReceiptIndianRupeeIcon:nL,ReceiptJapaneseYen:oL,ReceiptJapaneseYenIcon:oL,ReceiptPoundSterling:rL,ReceiptPoundSterlingIcon:rL,ReceiptRussianRuble:aL,ReceiptRussianRubleIcon:aL,ReceiptSwissFranc:iL,ReceiptSwissFrancIcon:iL,ReceiptText:sL,ReceiptTextIcon:sL,ReceiptTurkishLira:cL,ReceiptTurkishLiraIcon:cL,RectangleCircle:dL,RectangleCircleIcon:dL,RectangleEllipsis:Ol,RectangleEllipsisIcon:Ol,RectangleGoggles:uL,RectangleGogglesIcon:uL,RectangleHorizontal:hL,RectangleHorizontalIcon:hL,RectangleVertical:fL,RectangleVerticalIcon:fL,Recycle:pL,RecycleIcon:pL,Redo:gL,Redo2:yL,Redo2Icon:yL,RedoDot:mL,RedoDotIcon:mL,RedoIcon:gL,RefreshCcw:xL,RefreshCcwDot:kL,RefreshCcwDotIcon:kL,RefreshCcwIcon:xL,RefreshCw:wL,RefreshCwIcon:wL,RefreshCwOff:vL,RefreshCwOffIcon:vL,Refrigerator:ML,RefrigeratorIcon:ML,Regex:bL,RegexIcon:bL,RemoveFormatting:_L,RemoveFormattingIcon:_L,Repeat:LL,Repeat1:SL,Repeat1Icon:SL,Repeat2:CL,Repeat2Icon:CL,RepeatIcon:LL,Replace:IL,ReplaceAll:NL,ReplaceAllIcon:NL,ReplaceIcon:IL,Reply:EL,ReplyAll:AL,ReplyAllIcon:AL,ReplyIcon:EL,Rewind:jL,RewindIcon:jL,Ribbon:PL,RibbonIcon:PL,Rocket:$L,RocketIcon:$L,RockingChair:zL,RockingChairIcon:zL,RollerCoaster:RL,RollerCoasterIcon:RL,Rose:TL,RoseIcon:TL,Rotate3D:Fl,Rotate3DIcon:Fl,Rotate3d:Fl,Rotate3dIcon:Fl,RotateCcw:OL,RotateCcwIcon:OL,RotateCcwKey:DL,RotateCcwKeyIcon:DL,RotateCcwSquare:HL,RotateCcwSquareIcon:HL,RotateCw:qL,RotateCwIcon:qL,RotateCwSquare:FL,RotateCwSquareIcon:FL,Route:BL,RouteIcon:BL,RouteOff:VL,RouteOffIcon:VL,Router:UL,RouterIcon:UL,Rows:ql,Rows2:ql,Rows2Icon:ql,Rows3:Vl,Rows3Icon:Vl,Rows4:WL,Rows4Icon:WL,RowsIcon:ql,Rss:GL,RssIcon:GL,Ruler:XL,RulerDimensionLine:KL,RulerDimensionLineIcon:KL,RulerIcon:XL,RussianRuble:ZL,RussianRubleIcon:ZL,Sailboat:YL,SailboatIcon:YL,Salad:QL,SaladIcon:QL,Sandwich:JL,SandwichIcon:JL,Satellite:tN,SatelliteDish:eN,SatelliteDishIcon:eN,SatelliteIcon:tN,SaudiRiyal:nN,SaudiRiyalIcon:nN,Save:aN,SaveAll:oN,SaveAllIcon:oN,SaveIcon:aN,SaveOff:rN,SaveOffIcon:rN,Scale:iN,Scale3D:Bl,Scale3DIcon:Bl,Scale3d:Bl,Scale3dIcon:Bl,ScaleIcon:iN,Scaling:sN,ScalingIcon:sN,Scan:mN,ScanBarcode:cN,ScanBarcodeIcon:cN,ScanEye:lN,ScanEyeIcon:lN,ScanFace:dN,ScanFaceIcon:dN,ScanHeart:uN,ScanHeartIcon:uN,ScanIcon:mN,ScanLine:hN,ScanLineIcon:hN,ScanQrCode:fN,ScanQrCodeIcon:fN,ScanSearch:pN,ScanSearchIcon:pN,ScanText:yN,ScanTextIcon:yN,ScatterChart:Bs,ScatterChartIcon:Bs,School:gN,School2:nd,School2Icon:nd,SchoolIcon:gN,Scissors:xN,ScissorsIcon:xN,ScissorsLineDashed:kN,ScissorsLineDashedIcon:kN,ScissorsSquare:H1,ScissorsSquareDashedBottom:d1,ScissorsSquareDashedBottomIcon:d1,ScissorsSquareIcon:H1,Scooter:vN,ScooterIcon:vN,ScreenShare:MN,ScreenShareIcon:MN,ScreenShareOff:wN,ScreenShareOffIcon:wN,Scroll:_N,ScrollIcon:_N,ScrollText:bN,ScrollTextIcon:bN,Search:gh,SearchAlert:CN,SearchAlertIcon:CN,SearchCheck:SN,SearchCheckIcon:SN,SearchCode:LN,SearchCodeIcon:LN,SearchIcon:gh,SearchSlash:NN,SearchSlashIcon:NN,SearchX:IN,SearchXIcon:IN,Section:AN,SectionIcon:AN,Send:jN,SendHorizonal:Ul,SendHorizonalIcon:Ul,SendHorizontal:Ul,SendHorizontalIcon:Ul,SendIcon:jN,SendToBack:EN,SendToBackIcon:EN,SeparatorHorizontal:PN,SeparatorHorizontalIcon:PN,SeparatorVertical:$N,SeparatorVerticalIcon:$N,Server:kh,ServerCog:zN,ServerCogIcon:zN,ServerCrash:RN,ServerCrashIcon:RN,ServerIcon:kh,ServerOff:TN,ServerOffIcon:TN,Settings:HN,Settings2:DN,Settings2Icon:DN,SettingsIcon:HN,Shapes:vh,ShapesIcon:vh,Share:ON,Share2:xh,Share2Icon:xh,ShareIcon:ON,Sheet:FN,SheetIcon:FN,Shell:qN,ShellIcon:qN,Shield:QN,ShieldAlert:VN,ShieldAlertIcon:VN,ShieldBan:BN,ShieldBanIcon:BN,ShieldCheck:UN,ShieldCheckIcon:UN,ShieldClose:Gl,ShieldCloseIcon:Gl,ShieldEllipsis:WN,ShieldEllipsisIcon:WN,ShieldHalf:GN,ShieldHalfIcon:GN,ShieldIcon:QN,ShieldMinus:KN,ShieldMinusIcon:KN,ShieldOff:XN,ShieldOffIcon:XN,ShieldPlus:ZN,ShieldPlusIcon:ZN,ShieldQuestion:Wl,ShieldQuestionIcon:Wl,ShieldQuestionMark:Wl,ShieldQuestionMarkIcon:Wl,ShieldUser:YN,ShieldUserIcon:YN,ShieldX:Gl,ShieldXIcon:Gl,Ship:tI,ShipIcon:tI,ShipWheel:JN,ShipWheelIcon:JN,Shirt:eI,ShirtIcon:eI,ShoppingBag:oI,ShoppingBagIcon:oI,ShoppingBasket:nI,ShoppingBasketIcon:nI,ShoppingCart:rI,ShoppingCartIcon:rI,Shovel:aI,ShovelIcon:aI,ShowerHead:iI,ShowerHeadIcon:iI,Shredder:sI,ShredderIcon:sI,Shrimp:cI,ShrimpIcon:cI,Shrink:lI,ShrinkIcon:lI,Shrub:dI,ShrubIcon:dI,Shuffle:uI,ShuffleIcon:uI,Sidebar:$l,SidebarClose:Al,SidebarCloseIcon:Al,SidebarIcon:$l,SidebarOpen:jl,SidebarOpenIcon:jl,Sigma:hI,SigmaIcon:hI,SigmaSquare:O1,SigmaSquareIcon:O1,Signal:gI,SignalHigh:fI,SignalHighIcon:fI,SignalIcon:gI,SignalLow:pI,SignalLowIcon:pI,SignalMedium:yI,SignalMediumIcon:yI,SignalZero:mI,SignalZeroIcon:mI,Signature:kI,SignatureIcon:kI,Signpost:xI,SignpostBig:vI,SignpostBigIcon:vI,SignpostIcon:xI,Siren:wI,SirenIcon:wI,SkipBack:MI,SkipBackIcon:MI,SkipForward:bI,SkipForwardIcon:bI,Skull:_I,SkullIcon:_I,Slack:CI,SlackIcon:CI,Slash:SI,SlashIcon:SI,SlashSquare:F1,SlashSquareIcon:F1,Slice:LI,SliceIcon:LI,Sliders:Kl,SlidersHorizontal:NI,SlidersHorizontalIcon:NI,SlidersIcon:Kl,SlidersVertical:Kl,SlidersVerticalIcon:Kl,Smartphone:EI,SmartphoneCharging:II,SmartphoneChargingIcon:II,SmartphoneIcon:EI,SmartphoneNfc:AI,SmartphoneNfcIcon:AI,Smile:$I,SmileIcon:$I,SmilePlus:jI,SmilePlusIcon:jI,Snail:PI,SnailIcon:PI,Snowflake:zI,SnowflakeIcon:zI,SoapDispenserDroplet:RI,SoapDispenserDropletIcon:RI,Sofa:TI,SofaIcon:TI,SolarPanel:DI,SolarPanelIcon:DI,SortAsc:Ms,SortAscIcon:Ms,SortDesc:vs,SortDescIcon:vs,Soup:HI,SoupIcon:HI,Space:OI,SpaceIcon:OI,Spade:FI,SpadeIcon:FI,Sparkle:qI,SparkleIcon:qI,Sparkles:Xl,SparklesIcon:Xl,Speaker:VI,SpeakerIcon:VI,Speech:BI,SpeechIcon:BI,SpellCheck:WI,SpellCheck2:UI,SpellCheck2Icon:UI,SpellCheckIcon:WI,Spline:GI,SplineIcon:GI,SplinePointer:KI,SplinePointerIcon:KI,Split:XI,SplitIcon:XI,SplitSquareHorizontal:q1,SplitSquareHorizontalIcon:q1,SplitSquareVertical:V1,SplitSquareVerticalIcon:V1,Spool:ZI,SpoolIcon:ZI,Spotlight:YI,SpotlightIcon:YI,SprayCan:QI,SprayCanIcon:QI,Sprout:JI,SproutIcon:JI,Square:s0,SquareActivity:Zl,SquareActivityIcon:Zl,SquareArrowDown:Jl,SquareArrowDownIcon:Jl,SquareArrowDownLeft:Yl,SquareArrowDownLeftIcon:Yl,SquareArrowDownRight:Ql,SquareArrowDownRightIcon:Ql,SquareArrowLeft:e1,SquareArrowLeftIcon:e1,SquareArrowOutDownLeft:t1,SquareArrowOutDownLeftIcon:t1,SquareArrowOutDownRight:n1,SquareArrowOutDownRightIcon:n1,SquareArrowOutUpLeft:o1,SquareArrowOutUpLeftIcon:o1,SquareArrowOutUpRight:r1,SquareArrowOutUpRightIcon:r1,SquareArrowRight:a1,SquareArrowRightIcon:a1,SquareArrowUp:s1,SquareArrowUpIcon:s1,SquareArrowUpLeft:i1,SquareArrowUpLeftIcon:i1,SquareArrowUpRight:l1,SquareArrowUpRightIcon:l1,SquareAsterisk:c1,SquareAsteriskIcon:c1,SquareBottomDashedScissors:d1,SquareBottomDashedScissorsIcon:d1,SquareChartGantt:Ir,SquareChartGanttIcon:Ir,SquareCheck:h1,SquareCheckBig:u1,SquareCheckBigIcon:u1,SquareCheckIcon:h1,SquareChevronDown:f1,SquareChevronDownIcon:f1,SquareChevronLeft:p1,SquareChevronLeftIcon:p1,SquareChevronRight:m1,SquareChevronRightIcon:m1,SquareChevronUp:y1,SquareChevronUpIcon:y1,SquareCode:g1,SquareCodeIcon:g1,SquareDashed:x1,SquareDashedBottom:tA,SquareDashedBottomCode:eA,SquareDashedBottomCodeIcon:eA,SquareDashedBottomIcon:tA,SquareDashedIcon:x1,SquareDashedKanban:k1,SquareDashedKanbanIcon:k1,SquareDashedMousePointer:v1,SquareDashedMousePointerIcon:v1,SquareDashedTopSolid:nA,SquareDashedTopSolidIcon:nA,SquareDivide:w1,SquareDivideIcon:w1,SquareDot:M1,SquareDotIcon:M1,SquareEqual:b1,SquareEqualIcon:b1,SquareFunction:_1,SquareFunctionIcon:_1,SquareGanttChart:Ir,SquareGanttChartIcon:Ir,SquareIcon:s0,SquareKanban:C1,SquareKanbanIcon:C1,SquareLibrary:S1,SquareLibraryIcon:S1,SquareM:L1,SquareMIcon:L1,SquareMenu:N1,SquareMenuIcon:N1,SquareMinus:I1,SquareMinusIcon:I1,SquareMousePointer:A1,SquareMousePointerIcon:A1,SquareParking:j1,SquareParkingIcon:j1,SquareParkingOff:E1,SquareParkingOffIcon:E1,SquarePause:oA,SquarePauseIcon:oA,SquarePen:eo,SquarePenIcon:eo,SquarePercent:$1,SquarePercentIcon:$1,SquarePi:R1,SquarePiIcon:R1,SquarePilcrow:P1,SquarePilcrowIcon:P1,SquarePlay:z1,SquarePlayIcon:z1,SquarePlus:T1,SquarePlusIcon:T1,SquarePower:D1,SquarePowerIcon:D1,SquareRadical:rA,SquareRadicalIcon:rA,SquareRoundCorner:aA,SquareRoundCornerIcon:aA,SquareScissors:H1,SquareScissorsIcon:H1,SquareSigma:O1,SquareSigmaIcon:O1,SquareSlash:F1,SquareSlashIcon:F1,SquareSplitHorizontal:q1,SquareSplitHorizontalIcon:q1,SquareSplitVertical:V1,SquareSplitVerticalIcon:V1,SquareSquare:sA,SquareSquareIcon:sA,SquareStack:iA,SquareStackIcon:iA,SquareStar:lA,SquareStarIcon:lA,SquareStop:cA,SquareStopIcon:cA,SquareTerminal:B1,SquareTerminalIcon:B1,SquareUser:W1,SquareUserIcon:W1,SquareUserRound:U1,SquareUserRoundIcon:U1,SquareX:G1,SquareXIcon:G1,SquaresExclude:dA,SquaresExcludeIcon:dA,SquaresIntersect:uA,SquaresIntersectIcon:uA,SquaresSubtract:hA,SquaresSubtractIcon:hA,SquaresUnite:fA,SquaresUniteIcon:fA,Squircle:c0,SquircleDashed:pA,SquircleDashedIcon:pA,SquircleIcon:c0,Squirrel:yA,SquirrelIcon:yA,Stamp:mA,StampIcon:mA,Star:vA,StarHalf:gA,StarHalfIcon:gA,StarIcon:vA,StarOff:kA,StarOffIcon:kA,Stars:Xl,StarsIcon:Xl,StepBack:xA,StepBackIcon:xA,StepForward:wA,StepForwardIcon:wA,Stethoscope:MA,StethoscopeIcon:MA,Sticker:l0,StickerIcon:l0,StickyNote:wh,StickyNoteIcon:wh,Stone:bA,StoneIcon:bA,StopCircle:gc,StopCircleIcon:gc,Store:_A,StoreIcon:_A,StretchHorizontal:SA,StretchHorizontalIcon:SA,StretchVertical:CA,StretchVerticalIcon:CA,Strikethrough:LA,StrikethroughIcon:LA,Subscript:NA,SubscriptIcon:NA,Subtitles:Es,SubtitlesIcon:Es,Sun:$A,SunDim:IA,SunDimIcon:IA,SunIcon:$A,SunMedium:AA,SunMediumIcon:AA,SunMoon:EA,SunMoonIcon:EA,SunSnow:jA,SunSnowIcon:jA,Sunrise:PA,SunriseIcon:PA,Sunset:zA,SunsetIcon:zA,Superscript:RA,SuperscriptIcon:RA,SwatchBook:TA,SwatchBookIcon:TA,SwissFranc:DA,SwissFrancIcon:DA,SwitchCamera:HA,SwitchCameraIcon:HA,Sword:OA,SwordIcon:OA,Swords:FA,SwordsIcon:FA,Syringe:qA,SyringeIcon:qA,Table:ZA,Table2:VA,Table2Icon:VA,TableCellsMerge:BA,TableCellsMergeIcon:BA,TableCellsSplit:UA,TableCellsSplitIcon:UA,TableColumnsSplit:WA,TableColumnsSplitIcon:WA,TableConfig:_r,TableConfigIcon:_r,TableIcon:ZA,TableOfContents:GA,TableOfContentsIcon:GA,TableProperties:KA,TablePropertiesIcon:KA,TableRowsSplit:XA,TableRowsSplitIcon:XA,Tablet:QA,TabletIcon:QA,TabletSmartphone:YA,TabletSmartphoneIcon:YA,Tablets:JA,TabletsIcon:JA,Tag:eE,TagIcon:eE,Tags:tE,TagsIcon:tE,Tally1:nE,Tally1Icon:nE,Tally2:oE,Tally2Icon:oE,Tally3:rE,Tally3Icon:rE,Tally4:aE,Tally4Icon:aE,Tally5:iE,Tally5Icon:iE,Tangent:sE,TangentIcon:sE,Target:cE,TargetIcon:cE,Telescope:lE,TelescopeIcon:lE,Tent:uE,TentIcon:uE,TentTree:dE,TentTreeIcon:dE,Terminal:hE,TerminalIcon:hE,TerminalSquare:B1,TerminalSquareIcon:B1,TestTube:fE,TestTube2:K1,TestTube2Icon:K1,TestTubeDiagonal:K1,TestTubeDiagonalIcon:K1,TestTubeIcon:fE,TestTubes:pE,TestTubesIcon:pE,Text:Vo,TextAlignCenter:ui,TextAlignCenterIcon:ui,TextAlignEnd:hi,TextAlignEndIcon:hi,TextAlignJustify:X1,TextAlignJustifyIcon:X1,TextAlignStart:Vo,TextAlignStartIcon:Vo,TextCursor:mE,TextCursorIcon:mE,TextCursorInput:yE,TextCursorInputIcon:yE,TextIcon:Vo,TextInitial:Z1,TextInitialIcon:Z1,TextQuote:gE,TextQuoteIcon:gE,TextSearch:kE,TextSearchIcon:kE,TextSelect:Y1,TextSelectIcon:Y1,TextSelection:Y1,TextSelectionIcon:Y1,TextWrap:Q1,TextWrapIcon:Q1,Theater:vE,TheaterIcon:vE,Thermometer:ME,ThermometerIcon:ME,ThermometerSnowflake:xE,ThermometerSnowflakeIcon:xE,ThermometerSun:wE,ThermometerSunIcon:wE,ThumbsDown:bE,ThumbsDownIcon:bE,ThumbsUp:_E,ThumbsUpIcon:_E,Ticket:EE,TicketCheck:CE,TicketCheckIcon:CE,TicketIcon:EE,TicketMinus:SE,TicketMinusIcon:SE,TicketPercent:LE,TicketPercentIcon:LE,TicketPlus:NE,TicketPlusIcon:NE,TicketSlash:IE,TicketSlashIcon:IE,TicketX:AE,TicketXIcon:AE,Tickets:$E,TicketsIcon:$E,TicketsPlane:jE,TicketsPlaneIcon:jE,Timer:RE,TimerIcon:RE,TimerOff:PE,TimerOffIcon:PE,TimerReset:zE,TimerResetIcon:zE,ToggleLeft:TE,ToggleLeftIcon:TE,ToggleRight:DE,ToggleRightIcon:DE,Toilet:HE,ToiletIcon:HE,ToolCase:FE,ToolCaseIcon:FE,Toolbox:OE,ToolboxIcon:OE,Tornado:qE,TornadoIcon:qE,Torus:VE,TorusIcon:VE,Touchpad:UE,TouchpadIcon:UE,TouchpadOff:BE,TouchpadOffIcon:BE,TowerControl:WE,TowerControlIcon:WE,ToyBrick:GE,ToyBrickIcon:GE,Tractor:KE,TractorIcon:KE,TrafficCone:XE,TrafficConeIcon:XE,Train:J1,TrainFront:YE,TrainFrontIcon:YE,TrainFrontTunnel:ZE,TrainFrontTunnelIcon:ZE,TrainIcon:J1,TrainTrack:QE,TrainTrackIcon:QE,TramFront:J1,TramFrontIcon:J1,Transgender:JE,TransgenderIcon:JE,Trash:ej,Trash2:Mh,Trash2Icon:Mh,TrashIcon:ej,TreeDeciduous:tj,TreeDeciduousIcon:tj,TreePalm:ed,TreePalmIcon:ed,TreePine:nj,TreePineIcon:nj,Trees:oj,TreesIcon:oj,Trello:rj,TrelloIcon:rj,TrendingDown:aj,TrendingDownIcon:aj,TrendingUp:sj,TrendingUpDown:ij,TrendingUpDownIcon:ij,TrendingUpIcon:sj,Triangle:dj,TriangleAlert:Pr,TriangleAlertIcon:Pr,TriangleDashed:cj,TriangleDashedIcon:cj,TriangleIcon:dj,TriangleRight:lj,TriangleRightIcon:lj,Trophy:uj,TrophyIcon:uj,Truck:fj,TruckElectric:hj,TruckElectricIcon:hj,TruckIcon:fj,TurkishLira:pj,TurkishLiraIcon:pj,Turntable:yj,TurntableIcon:yj,Turtle:mj,TurtleIcon:mj,Tv:kj,Tv2:td,Tv2Icon:td,TvIcon:kj,TvMinimal:td,TvMinimalIcon:td,TvMinimalPlay:gj,TvMinimalPlayIcon:gj,Twitch:vj,TwitchIcon:vj,Twitter:xj,TwitterIcon:xj,Type:d0,TypeIcon:d0,TypeOutline:wj,TypeOutlineIcon:wj,Umbrella:bj,UmbrellaIcon:bj,UmbrellaOff:Mj,UmbrellaOffIcon:Mj,Underline:_j,UnderlineIcon:_j,Undo:Lj,Undo2:Cj,Undo2Icon:Cj,UndoDot:Sj,UndoDotIcon:Sj,UndoIcon:Lj,UnfoldHorizontal:Nj,UnfoldHorizontalIcon:Nj,UnfoldVertical:Ij,UnfoldVerticalIcon:Ij,Ungroup:Aj,UngroupIcon:Aj,University:nd,UniversityIcon:nd,Unlink:jj,Unlink2:Ej,Unlink2Icon:Ej,UnlinkIcon:jj,Unlock:vl,UnlockIcon:vl,UnlockKeyhole:kl,UnlockKeyholeIcon:kl,Unplug:$j,UnplugIcon:$j,Upload:bh,UploadCloud:bc,UploadCloudIcon:bc,UploadIcon:bh,Usb:Pj,UsbIcon:Pj,User:_h,User2:cd,User2Icon:cd,UserCheck:zj,UserCheck2:od,UserCheck2Icon:od,UserCheckIcon:zj,UserCircle:kc,UserCircle2:mc,UserCircle2Icon:mc,UserCircleIcon:kc,UserCog:Rj,UserCog2:rd,UserCog2Icon:rd,UserCogIcon:Rj,UserIcon:_h,UserKey:Tj,UserKeyIcon:Tj,UserLock:Dj,UserLockIcon:Dj,UserMinus:Hj,UserMinus2:ad,UserMinus2Icon:ad,UserMinusIcon:Hj,UserPen:Oj,UserPenIcon:Oj,UserPlus:Fj,UserPlus2:id,UserPlus2Icon:id,UserPlusIcon:Fj,UserRound:cd,UserRoundCheck:od,UserRoundCheckIcon:od,UserRoundCog:rd,UserRoundCogIcon:rd,UserRoundIcon:cd,UserRoundKey:qj,UserRoundKeyIcon:qj,UserRoundMinus:ad,UserRoundMinusIcon:ad,UserRoundPen:Vj,UserRoundPenIcon:Vj,UserRoundPlus:id,UserRoundPlusIcon:id,UserRoundSearch:Bj,UserRoundSearchIcon:Bj,UserRoundX:sd,UserRoundXIcon:sd,UserSearch:Uj,UserSearchIcon:Uj,UserSquare:W1,UserSquare2:U1,UserSquare2Icon:U1,UserSquareIcon:W1,UserStar:Wj,UserStarIcon:Wj,UserX:Gj,UserX2:sd,UserX2Icon:sd,UserXIcon:Gj,Users:Ch,Users2:ld,Users2Icon:ld,UsersIcon:Ch,UsersRound:ld,UsersRoundIcon:ld,Utensils:ud,UtensilsCrossed:dd,UtensilsCrossedIcon:dd,UtensilsIcon:ud,UtilityPole:Kj,UtilityPoleIcon:Kj,Van:Xj,VanIcon:Xj,Variable:Zj,VariableIcon:Zj,Vault:Yj,VaultIcon:Yj,VectorSquare:Qj,VectorSquareIcon:Qj,Vegan:Jj,VeganIcon:Jj,VenetianMask:e$,VenetianMaskIcon:e$,Venus:n$,VenusAndMars:t$,VenusAndMarsIcon:t$,VenusIcon:n$,Verified:Cs,VerifiedIcon:Cs,Vibrate:r$,VibrateIcon:r$,VibrateOff:o$,VibrateOffIcon:o$,Video:i$,VideoIcon:i$,VideoOff:a$,VideoOffIcon:a$,Videotape:s$,VideotapeIcon:s$,View:c$,ViewIcon:c$,Voicemail:l$,VoicemailIcon:l$,Volleyball:d$,VolleyballIcon:d$,Volume:y$,Volume1:u$,Volume1Icon:u$,Volume2:h$,Volume2Icon:h$,VolumeIcon:y$,VolumeOff:f$,VolumeOffIcon:f$,VolumeX:p$,VolumeXIcon:p$,Vote:m$,VoteIcon:m$,Wallet:k$,Wallet2:hd,Wallet2Icon:hd,WalletCards:g$,WalletCardsIcon:g$,WalletIcon:k$,WalletMinimal:hd,WalletMinimalIcon:hd,Wallpaper:v$,WallpaperIcon:v$,Wand:x$,Wand2:fd,Wand2Icon:fd,WandIcon:x$,WandSparkles:fd,WandSparklesIcon:fd,Warehouse:w$,WarehouseIcon:w$,WashingMachine:M$,WashingMachineIcon:M$,Watch:b$,WatchIcon:b$,Waves:L$,WavesArrowDown:_$,WavesArrowDownIcon:_$,WavesArrowUp:C$,WavesArrowUpIcon:C$,WavesIcon:L$,WavesLadder:S$,WavesLadderIcon:S$,Waypoints:N$,WaypointsIcon:N$,Webcam:I$,WebcamIcon:I$,Webhook:E$,WebhookIcon:E$,WebhookOff:A$,WebhookOffIcon:A$,Weight:$$,WeightIcon:$$,WeightTilde:j$,WeightTildeIcon:j$,Wheat:R$,WheatIcon:R$,WheatOff:P$,WheatOffIcon:P$,WholeWord:z$,WholeWordIcon:z$,Wifi:B$,WifiCog:T$,WifiCogIcon:T$,WifiHigh:D$,WifiHighIcon:D$,WifiIcon:B$,WifiLow:H$,WifiLowIcon:H$,WifiOff:O$,WifiOffIcon:O$,WifiPen:F$,WifiPenIcon:F$,WifiSync:q$,WifiSyncIcon:q$,WifiZero:V$,WifiZeroIcon:V$,Wind:W$,WindArrowDown:U$,WindArrowDownIcon:U$,WindIcon:W$,Wine:K$,WineIcon:K$,WineOff:G$,WineOffIcon:G$,Workflow:X$,WorkflowIcon:X$,Worm:Z$,WormIcon:Z$,WrapText:Q1,WrapTextIcon:Q1,Wrench:Y$,WrenchIcon:Y$,X:Ai,XCircle:vc,XCircleIcon:vc,XIcon:Ai,XOctagon:Ll,XOctagonIcon:Ll,XSquare:G1,XSquareIcon:G1,Youtube:Q$,YoutubeIcon:Q$,Zap:eP,ZapIcon:eP,ZapOff:J$,ZapOffIcon:J$,ZoomIn:tP,ZoomInIcon:tP,ZoomOut:nP,ZoomOutIcon:nP,createLucideIcon:d,icons:CAe},Symbol.toStringTag,{value:"Module"})),LAe=new Set(["createLucideIcon","Icon","icons","default"]),NAe=Symbol.for("react.forward_ref");function IAe(e){return typeof e=="function"?!0:e!==null&&typeof e=="object"?e.$$typeof===NAe:!1}function AAe(e){return e.replace(/[A-Z]/g,(t,n)=>n===0?t.toLowerCase():`-${t.toLowerCase()}`)}function EAe(){const e={};for(const[t,n]of Object.entries(SAe))LAe.has(t)||IAe(n)&&(e[AAe(t)]=n);return e}const Zh=EAe(),jAe="help-circle",$Ae=Object.keys(Zh).sort(),PAe=["logos:aws","logos:google-cloud","logos:microsoft-azure"],qP={lucide:$Ae,aws:[],gcp:[],azure:[],iconify:[...PAe]};function bH(e){for(const t of e)t.installed?qP[t.vendor]=[...t.iconNames]:qP[t.vendor]=[]}const zAe=["aws","gcp","azure","iconify"];function $Y(e){if(typeof e!="string")return null;const t=e.trim();if(t.length===0)return null;const n=t.indexOf(":");if(n===-1)return{vendor:"lucide",name:t};const o=t.slice(0,n),r=t.slice(n+1);return r.length===0?null:o==="lucide"?{vendor:"lucide",name:r}:zAe.includes(o)?{vendor:o,name:r}:null}function RAe(e){return e.vendor==="lucide"?e.name:`${e.vendor}:${e.name}`}function TAe(e,t){const n=$Y(e);if(!n)return null;if(n.vendor==="lucide"){const o=Zh[n.name];return o?{kind:"lucide",component:o}:null}return n.vendor==="iconify"?{kind:"iconify",identifier:n.name}:{kind:"svg-url",url:`${t.studioBaseUrl}/api/icons/${n.vendor}/${n.name}.svg`}}const DAe="modulepreload",HAe=function(e){return"/"+e},GB={},X0=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),s=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=HAe(c),c in GB)return;GB[c]=!0;const l=c.endsWith(".css"),h=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":DAe,l||(u.as="script"),u.crossOrigin="",u.href=c,s&&u.setAttribute("nonce",s),document.head.appendChild(u),l)return new Promise((p,y)=>{u.addEventListener("load",p),u.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return r.then(i=>{for(const s of i||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};let gp=null;function OAe(){return gp||(gp=X0(()=>import("./iconify-DAxofKes.js"),[]).then(e=>e,()=>null),gp)}function PY(e,t){return f.jsx(qo,{className:e,"aria-label":t,"aria-hidden":t===void 0?!0:void 0,"data-testid":"icon-renderer-placeholder"})}function FAe({identifier:e,className:t,ariaLabel:n,color:o}){const[r,a]=m.useState(null);if(m.useEffect(()=>{let s=!0;return OAe().then(c=>{s&&a(c)}),()=>{s=!1}},[]),!r)return PY(t,n);const i=r.Icon;return f.jsx(i,{icon:e,className:t,color:o,"aria-label":n,"aria-hidden":n===void 0?!0:void 0})}function zY({iconId:e,studioBaseUrl:t,className:n,ariaLabel:o,color:r,strokeWidth:a,absoluteStrokeWidth:i}){const s=TAe(e,{studioBaseUrl:t});if(!s)return PY(n,o);if(s.kind==="lucide"){const c=s.component;return f.jsx(c,{className:n,color:r,strokeWidth:a,absoluteStrokeWidth:i,"aria-label":o,"aria-hidden":o===void 0?!0:void 0})}return s.kind==="svg-url"?f.jsx("img",{src:s.url,loading:"lazy",draggable:!1,className:n,alt:o??"","aria-hidden":o===void 0?!0:void 0}):f.jsx(FAe,{identifier:s.identifier,className:n,ariaLabel:o,color:r})}const qAe={studioBaseUrl:""},AF=m.createContext(qAe);function VAe({value:e,children:t}){return f.jsx(AF.Provider,{value:e,children:t})}const BAe=[".png",".jpg",".jpeg",".gif",".webp",".svg"],UAe=400,_H={width:200,height:200},WAe=e=>{const t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""},GAe=e=>{if(e.type.startsWith("image/")){const t=e.type.slice(6).toLowerCase();if(t==="png"||t==="jpeg"||t==="jpg"||t==="gif"||t==="webp"||t==="svg+xml")return!0}return BAe.includes(WAe(e.name))},KAe=e=>{if(!e)return[];const t=e.files;if(!t||t.length===0)return[];const n=[];for(let o=0;o<t.length;o++){const r=t.item(o);r&&GAe(r)&&n.push(r)}return n},XAe=(e,t=UAe)=>{if(e.width<=0||e.height<=0)return{..._H};const n=Math.max(e.width,e.height);if(n<=t)return{width:Math.round(e.width),height:Math.round(e.height)};const o=t/n;return{width:Math.round(e.width*o),height:Math.round(e.height*o)}},ZAe=24,YAe=4,QAe=(e,t,n=ZAe,o=YAe)=>{if(e.length===0)return[];const r=Math.min(e.length,Math.max(1,o)),a=Math.ceil(e.length/r),i=new Array(r).fill(0),s=new Array(a).fill(0);e.forEach((g,k)=>{const x=k%r,v=Math.floor(k/r);i[x]=Math.max(i[x],g.width),s[v]=Math.max(s[v],g.height)});const c=new Array(r).fill(0);for(let g=1;g<r;g++)c[g]=c[g-1]+i[g-1]+n;const l=new Array(a).fill(0);for(let g=1;g<a;g++)l[g]=l[g-1]+s[g-1]+n;const h=i.reduce((g,k)=>g+k,0)+n*(r-1),u=s.reduce((g,k)=>g+k,0)+n*(a-1),p=t.x-h/2,y=t.y-u/2;return e.map((g,k)=>{const x=k%r,v=Math.floor(k/r);return{x:p+c[x],y:y+l[v]}})},JAe=async e=>{const t=KAe(e.dataTransfer);if(t.length===0||!e.rfInstance)return!1;const n=e.rfInstance.screenToFlowPosition(e.clientPos),o=await Promise.all(t.map(a=>e.computeDims(a))),r=QAe(o,n);return t.forEach((a,i)=>{e.dispatch({file:a,position:r[i],dims:o[i],originalFilename:a.name})}),!0},eEe=e=>new Promise(t=>{let n=null;const o=a=>{n&&URL.revokeObjectURL(n),t(a)};try{n=URL.createObjectURL(e)}catch{t({..._H});return}const r=new Image;r.onload=()=>{o(XAe({width:r.naturalWidth,height:r.naturalHeight}))},r.onerror=()=>{o({..._H})},r.src=n}),tEe=2048,nEe=e=>{const t=e.type.toLowerCase();return t==="image/png"||t==="image/jpeg"||t==="image/webp"},oEe=async(e,t=tEe)=>{if(!nEe(e))return e;try{const n=await createImageBitmap(e),o=Math.max(n.width,n.height);if(o<=t)return n.close(),e;const r=t/o,a=Math.round(n.width*r),i=Math.round(n.height*r),s=document.createElement("canvas");s.width=a,s.height=i;const c=s.getContext("2d");if(!c)return n.close(),e;c.drawImage(n,0,0,a,i),n.close();const l=await new Promise(h=>{s.toBlob(u=>h(u),e.type)});return l?new File([l],e.name,{type:e.type,lastModified:e.lastModified}):e}catch{return e}};function RY(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=RY(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function TY(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=RY(e))&&(o&&(o+=" "),o+=t);return o}const EF="-",rEe=e=>{const t=iEe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const s=i.split(EF);return s[0]===""&&s.length!==1&&s.shift(),DY(s,t)||aEe(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&o[i]?[...c,...o[i]]:c}}},DY=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?DY(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const a=e.join(EF);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},KB=/^\[(.+)\]$/,aEe=e=>{if(KB.test(e)){const t=KB.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},iEe=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return cEe(Object.entries(e.classGroups),n).forEach(([a,i])=>{CH(i,o,a,t)}),o},CH=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const a=r===""?t:XB(t,r);a.classGroupId=n;return}if(typeof r=="function"){if(sEe(r)){CH(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([a,i])=>{CH(i,XB(t,a),n,o)})})},XB=(e,t)=>{let n=e;return t.split(EF).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},sEe=e=>e.isThemeGetter,cEe=(e,t)=>t?e.map(([n,o])=>{const r=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,r]}):e,lEe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,o=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return r(a,i),i},set(a,i){n.has(a)?n.set(a,i):r(a,i)}}},HY="!",dEe=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],a=t.length,i=s=>{const c=[];let l=0,h=0,u;for(let x=0;x<s.length;x++){let v=s[x];if(l===0){if(v===r&&(o||s.slice(x,x+a)===t)){c.push(s.slice(h,x)),h=x+a;continue}if(v==="/"){u=x;continue}}v==="["?l++:v==="]"&&l--}const p=c.length===0?s:s.substring(h),y=p.startsWith(HY),g=y?p.substring(1):p,k=u&&u>h?u-h:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:k}};return n?s=>n({className:s,parseClassName:i}):i},uEe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},hEe=e=>({cache:lEe(e.cacheSize),parseClassName:dEe(e),...rEe(e)}),fEe=/\s+/,pEe=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,a=[],i=e.trim().split(fEe);let s="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:h,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:y}=n(l);let g=!!y,k=o(g?p.substring(0,y):p);if(!k){if(!g){s=l+(s.length>0?" "+s:s);continue}if(k=o(p),!k){s=l+(s.length>0?" "+s:s);continue}g=!1}const x=uEe(h).join(":"),v=u?x+HY:x,M=v+k;if(a.includes(M))continue;a.push(M);const w=r(k,g);for(let b=0;b<w.length;++b){const C=w[b];a.push(v+C)}s=l+(s.length>0?" "+s:s)}return s};function yEe(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=OY(t))&&(o&&(o+=" "),o+=n);return o}const OY=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=OY(e[o]))&&(n&&(n+=" "),n+=t);return n};function mEe(e,...t){let n,o,r,a=i;function i(c){const l=t.reduce((h,u)=>u(h),e());return n=hEe(l),o=n.cache.get,r=n.cache.set,a=s,s(c)}function s(c){const l=o(c);if(l)return l;const h=pEe(c,n);return r(c,h),h}return function(){return a(yEe.apply(null,arguments))}}const wt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},FY=/^\[(?:([a-z-]+):)?(.+)\]$/i,gEe=/^\d+\/\d+$/,kEe=new Set(["px","full","screen"]),vEe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xEe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wEe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,MEe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bEe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ua=e=>u0(e)||kEe.has(e)||gEe.test(e),Ja=e=>Z0(e,"length",EEe),u0=e=>!!e&&!Number.isNaN(Number(e)),LT=e=>Z0(e,"number",u0),b2=e=>!!e&&Number.isInteger(Number(e)),_Ee=e=>e.endsWith("%")&&u0(e.slice(0,-1)),Be=e=>FY.test(e),ei=e=>vEe.test(e),CEe=new Set(["length","size","percentage"]),SEe=e=>Z0(e,CEe,qY),LEe=e=>Z0(e,"position",qY),NEe=new Set(["image","url"]),IEe=e=>Z0(e,NEe,$Ee),AEe=e=>Z0(e,"",jEe),_2=()=>!0,Z0=(e,t,n)=>{const o=FY.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},EEe=e=>xEe.test(e)&&!wEe.test(e),qY=()=>!1,jEe=e=>MEe.test(e),$Ee=e=>bEe.test(e),PEe=()=>{const e=wt("colors"),t=wt("spacing"),n=wt("blur"),o=wt("brightness"),r=wt("borderColor"),a=wt("borderRadius"),i=wt("borderSpacing"),s=wt("borderWidth"),c=wt("contrast"),l=wt("grayscale"),h=wt("hueRotate"),u=wt("invert"),p=wt("gap"),y=wt("gradientColorStops"),g=wt("gradientColorStopPositions"),k=wt("inset"),x=wt("margin"),v=wt("opacity"),M=wt("padding"),w=wt("saturate"),b=wt("scale"),C=wt("sepia"),_=wt("skew"),S=wt("space"),E=wt("translate"),P=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",Be,t],z=()=>[Be,t],U=()=>["",ua,Ja],A=()=>["auto",u0,Be],T=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Be],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[u0,Be];return{cacheSize:500,separator:":",theme:{colors:[_2],spacing:[ua,Ja],blur:["none","",ei,Be],brightness:q(),borderColor:[e],borderRadius:["none","","full",ei,Be],borderSpacing:z(),borderWidth:U(),contrast:q(),grayscale:R(),hueRotate:q(),invert:R(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[_Ee,Ja],inset:j(),margin:j(),opacity:q(),padding:z(),saturate:q(),scale:q(),sepia:R(),skew:q(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[ei]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...T(),Be]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",b2,Be]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",b2,Be]}],"grid-cols":[{"grid-cols":[_2]}],"col-start-end":[{col:["auto",{span:["full",b2,Be]},Be]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[_2]}],"row-start-end":[{row:["auto",{span:[b2,Be]},Be]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[ei]},ei]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ei,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",LT]}],"font-family":[{font:[_2]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Be]}],"line-clamp":[{"line-clamp":["none",u0,LT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ua,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ua,Ja]}],"underline-offset":[{"underline-offset":["auto",ua,Be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...T(),LEe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",SEe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},IEe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:D()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[ua,Be]}],"outline-w":[{outline:[ua,Ja]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ua,Ja]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ei,AEe]}],"shadow-color":[{shadow:[_2]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ei,Be]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[b2,Be]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ua,Ja,LT]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},zEe=mEe(PEe);function ne(...e){return zEe(TY(e))}function Xt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=Xt(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var REe={value:()=>{}};function Xz(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new oP(n)}function oP(e){this._=e}function TEe(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}oP.prototype=Xz.prototype={constructor:oP,on:function(e,t){var n=this._,o=TEe(e+"",n),r,a=-1,i=o.length;if(arguments.length<2){for(;++a<i;)if((r=(e=o[a]).type)&&(r=DEe(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<i;)if(r=(e=o[a]).type)n[r]=ZB(n[r],e.name,t);else if(t==null)for(r in n)n[r]=ZB(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new oP(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,a;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,r=a.length;o<r;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,a=o.length;r<a;++r)o[r].value.apply(t,n)}};function DEe(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function ZB(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=REe,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var SH="http://www.w3.org/1999/xhtml";const YB={svg:"http://www.w3.org/2000/svg",xhtml:SH,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zz(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),YB.hasOwnProperty(t)?{space:YB[t],local:e}:e}function HEe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===SH&&t.documentElement.namespaceURI===SH?t.createElement(e):t.createElementNS(n,e)}}function OEe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function VY(e){var t=Zz(e);return(t.local?OEe:HEe)(t)}function FEe(){}function jF(e){return e==null?FEe:function(){return this.querySelector(e)}}function qEe(e){typeof e!="function"&&(e=jF(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=new Array(i),c,l,h=0;h<i;++h)(c=a[h])&&(l=e.call(c,c.__data__,h,a))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new ho(o,this._parents)}function VEe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function BEe(){return[]}function BY(e){return e==null?BEe:function(){return this.querySelectorAll(e)}}function UEe(e){return function(){return VEe(e.apply(this,arguments))}}function WEe(e){typeof e=="function"?e=UEe(e):e=BY(e);for(var t=this._groups,n=t.length,o=[],r=[],a=0;a<n;++a)for(var i=t[a],s=i.length,c,l=0;l<s;++l)(c=i[l])&&(o.push(e.call(c,c.__data__,l,i)),r.push(c));return new ho(o,r)}function UY(e){return function(){return this.matches(e)}}function WY(e){return function(t){return t.matches(e)}}var GEe=Array.prototype.find;function KEe(e){return function(){return GEe.call(this.children,e)}}function XEe(){return this.firstElementChild}function ZEe(e){return this.select(e==null?XEe:KEe(typeof e=="function"?e:WY(e)))}var YEe=Array.prototype.filter;function QEe(){return Array.from(this.children)}function JEe(e){return function(){return YEe.call(this.children,e)}}function eje(e){return this.selectAll(e==null?QEe:JEe(typeof e=="function"?e:WY(e)))}function tje(e){typeof e!="function"&&(e=UY(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=[],c,l=0;l<i;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new ho(o,this._parents)}function GY(e){return new Array(e.length)}function nje(){return new ho(this._enter||this._groups.map(GY),this._parents)}function VP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}VP.prototype={constructor:VP,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function oje(e){return function(){return e}}function rje(e,t,n,o,r,a){for(var i=0,s,c=t.length,l=a.length;i<l;++i)(s=t[i])?(s.__data__=a[i],o[i]=s):n[i]=new VP(e,a[i]);for(;i<c;++i)(s=t[i])&&(r[i]=s)}function aje(e,t,n,o,r,a,i){var s,c,l=new Map,h=t.length,u=a.length,p=new Array(h),y;for(s=0;s<h;++s)(c=t[s])&&(p[s]=y=i.call(c,c.__data__,s,t)+"",l.has(y)?r[s]=c:l.set(y,c));for(s=0;s<u;++s)y=i.call(e,a[s],s,a)+"",(c=l.get(y))?(o[s]=c,c.__data__=a[s],l.delete(y)):n[s]=new VP(e,a[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(p[s])===c&&(r[s]=c)}function ije(e){return e.__data__}function sje(e,t){if(!arguments.length)return Array.from(this,ije);var n=t?aje:rje,o=this._parents,r=this._groups;typeof e!="function"&&(e=oje(e));for(var a=r.length,i=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var h=o[l],u=r[l],p=u.length,y=cje(e.call(h,h&&h.__data__,l,o)),g=y.length,k=s[l]=new Array(g),x=i[l]=new Array(g),v=c[l]=new Array(p);n(h,u,k,x,v,y,t);for(var M=0,w=0,b,C;M<g;++M)if(b=k[M]){for(M>=w&&(w=M+1);!(C=x[w])&&++w<g;);b._next=C||null}}return i=new ho(i,o),i._enter=s,i._exit=c,i}function cje(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lje(){return new ho(this._exit||this._groups.map(GY),this._parents)}function dje(e,t,n){var o=this.enter(),r=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?a.remove():n(a),o&&r?o.merge(r).order():r}function uje(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,a=o.length,i=Math.min(r,a),s=new Array(r),c=0;c<i;++c)for(var l=n[c],h=o[c],u=l.length,p=s[c]=new Array(u),y,g=0;g<u;++g)(y=l[g]||h[g])&&(p[g]=y);for(;c<r;++c)s[c]=n[c];return new ho(s,this._parents)}function hje(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,a=o[r],i;--r>=0;)(i=o[r])&&(a&&i.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(i,a),a=i);return this}function fje(e){e||(e=pje);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var n=this._groups,o=n.length,r=new Array(o),a=0;a<o;++a){for(var i=n[a],s=i.length,c=r[a]=new Array(s),l,h=0;h<s;++h)(l=i[h])&&(c[h]=l);c.sort(t)}return new ho(r,this._parents).order()}function pje(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function yje(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function mje(){return Array.from(this)}function gje(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,a=o.length;r<a;++r){var i=o[r];if(i)return i}return null}function kje(){let e=0;for(const t of this)++e;return e}function vje(){return!this.node()}function xje(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],a=0,i=r.length,s;a<i;++a)(s=r[a])&&e.call(s,s.__data__,a,r);return this}function wje(e){return function(){this.removeAttribute(e)}}function Mje(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bje(e,t){return function(){this.setAttribute(e,t)}}function _je(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Cje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Sje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Lje(e,t){var n=Zz(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Mje:wje:typeof t=="function"?n.local?Sje:Cje:n.local?_je:bje)(n,t))}function KY(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Nje(e){return function(){this.style.removeProperty(e)}}function Ije(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Aje(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Eje(e,t,n){return arguments.length>1?this.each((t==null?Nje:typeof t=="function"?Aje:Ije)(e,t,n??"")):C0(this.node(),e)}function C0(e,t){return e.style.getPropertyValue(t)||KY(e).getComputedStyle(e,null).getPropertyValue(t)}function jje(e){return function(){delete this[e]}}function $je(e,t){return function(){this[e]=t}}function Pje(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function zje(e,t){return arguments.length>1?this.each((t==null?jje:typeof t=="function"?Pje:$je)(e,t)):this.node()[e]}function XY(e){return e.trim().split(/^|\s+/)}function $F(e){return e.classList||new ZY(e)}function ZY(e){this._node=e,this._names=XY(e.getAttribute("class")||"")}ZY.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function YY(e,t){for(var n=$F(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function QY(e,t){for(var n=$F(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function Rje(e){return function(){YY(this,e)}}function Tje(e){return function(){QY(this,e)}}function Dje(e,t){return function(){(t.apply(this,arguments)?YY:QY)(this,e)}}function Hje(e,t){var n=XY(e+"");if(arguments.length<2){for(var o=$F(this.node()),r=-1,a=n.length;++r<a;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?Dje:t?Rje:Tje)(n,t))}function Oje(){this.textContent=""}function Fje(e){return function(){this.textContent=e}}function qje(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Vje(e){return arguments.length?this.each(e==null?Oje:(typeof e=="function"?qje:Fje)(e)):this.node().textContent}function Bje(){this.innerHTML=""}function Uje(e){return function(){this.innerHTML=e}}function Wje(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Gje(e){return arguments.length?this.each(e==null?Bje:(typeof e=="function"?Wje:Uje)(e)):this.node().innerHTML}function Kje(){this.nextSibling&&this.parentNode.appendChild(this)}function Xje(){return this.each(Kje)}function Zje(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Yje(){return this.each(Zje)}function Qje(e){var t=typeof e=="function"?e:VY(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Jje(){return null}function e$e(e,t){var n=typeof e=="function"?e:VY(e),o=t==null?Jje:typeof t=="function"?t:jF(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function t$e(){var e=this.parentNode;e&&e.removeChild(this)}function n$e(){return this.each(t$e)}function o$e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function r$e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function a$e(e){return this.select(e?r$e:o$e)}function i$e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function s$e(e){return function(t){e.call(this,t,this.__data__)}}function c$e(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function l$e(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,a;n<r;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function d$e(e,t,n){return function(){var o=this.__on,r,a=s$e(t);if(o){for(var i=0,s=o.length;i<s;++i)if((r=o[i]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),r.value=t;return}}this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function u$e(e,t,n){var o=c$e(e+""),r,a=o.length,i;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,h;c<l;++c)for(r=0,h=s[c];r<a;++r)if((i=o[r]).type===h.type&&i.name===h.name)return h.value}return}for(s=t?d$e:l$e,r=0;r<a;++r)this.each(s(o[r],t,n));return this}function JY(e,t,n){var o=KY(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function h$e(e,t){return function(){return JY(this,e,t)}}function f$e(e,t){return function(){return JY(this,e,t.apply(this,arguments))}}function p$e(e,t){return this.each((typeof t=="function"?f$e:h$e)(e,t))}function*y$e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,a=o.length,i;r<a;++r)(i=o[r])&&(yield i)}var eQ=[null];function ho(e,t){this._groups=e,this._parents=t}function bf(){return new ho([[document.documentElement]],eQ)}function m$e(){return this}ho.prototype=bf.prototype={constructor:ho,select:qEe,selectAll:WEe,selectChild:ZEe,selectChildren:eje,filter:tje,data:sje,enter:nje,exit:lje,join:dje,merge:uje,selection:m$e,order:hje,sort:fje,call:yje,nodes:mje,node:gje,size:kje,empty:vje,each:xje,attr:Lje,style:Eje,property:zje,classed:Hje,text:Vje,html:Gje,raise:Xje,lower:Yje,append:Qje,insert:e$e,remove:n$e,clone:a$e,datum:i$e,on:u$e,dispatch:p$e,[Symbol.iterator]:y$e};function ro(e){return typeof e=="string"?new ho([[document.querySelector(e)]],[document.documentElement]):new ho([[e]],eQ)}function g$e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Go(e,t){if(e=g$e(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const k$e={passive:!1},Yh={capture:!0,passive:!1};function NT(e){e.stopImmediatePropagation()}function h0(e){e.preventDefault(),e.stopImmediatePropagation()}function tQ(e){var t=e.document.documentElement,n=ro(e).on("dragstart.drag",h0,Yh);"onselectstart"in t?n.on("selectstart.drag",h0,Yh):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function nQ(e,t){var n=e.document.documentElement,o=ro(e).on("dragstart.drag",null);t&&(o.on("click.drag",h0,Yh),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const kp=e=>()=>e;function LH(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:a,x:i,y:s,dx:c,dy:l,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:h}})}LH.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function v$e(e){return!e.ctrlKey&&!e.button}function x$e(){return this.parentNode}function w$e(e,t){return t??{x:e.x,y:e.y}}function M$e(){return navigator.maxTouchPoints||"ontouchstart"in this}function oQ(){var e=v$e,t=x$e,n=w$e,o=M$e,r={},a=Xz("start","drag","end"),i=0,s,c,l,h,u=0;function p(b){b.on("mousedown.drag",y).filter(o).on("touchstart.drag",x).on("touchmove.drag",v,k$e).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(b,C){if(!(h||!e.call(this,b,C))){var _=w(this,t.call(this,b,C),b,C,"mouse");_&&(ro(b.view).on("mousemove.drag",g,Yh).on("mouseup.drag",k,Yh),tQ(b.view),NT(b),l=!1,s=b.clientX,c=b.clientY,_("start",b))}}function g(b){if(h0(b),!l){var C=b.clientX-s,_=b.clientY-c;l=C*C+_*_>u}r.mouse("drag",b)}function k(b){ro(b.view).on("mousemove.drag mouseup.drag",null),nQ(b.view,l),h0(b),r.mouse("end",b)}function x(b,C){if(e.call(this,b,C)){var _=b.changedTouches,S=t.call(this,b,C),E=_.length,P,N;for(P=0;P<E;++P)(N=w(this,S,b,C,_[P].identifier,_[P]))&&(NT(b),N("start",b,_[P]))}}function v(b){var C=b.changedTouches,_=C.length,S,E;for(S=0;S<_;++S)(E=r[C[S].identifier])&&(h0(b),E("drag",b,C[S]))}function M(b){var C=b.changedTouches,_=C.length,S,E;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),S=0;S<_;++S)(E=r[C[S].identifier])&&(NT(b),E("end",b,C[S]))}function w(b,C,_,S,E,P){var N=a.copy(),j=Go(P||_,C),z,U,A;if((A=n.call(b,new LH("beforestart",{sourceEvent:_,target:p,identifier:E,active:i,x:j[0],y:j[1],dx:0,dy:0,dispatch:N}),S))!=null)return z=A.x-j[0]||0,U=A.y-j[1]||0,function T(D,O,I){var R=j,L;switch(D){case"start":r[E]=T,L=i++;break;case"end":delete r[E],--i;case"drag":j=Go(I||O,C),L=i;break}N.call(D,b,new LH(D,{sourceEvent:O,subject:A,target:p,identifier:E,active:L,x:j[0]+z,y:j[1]+U,dx:j[0]-R[0],dy:j[1]-R[1],dispatch:N}),S)}}return p.filter=function(b){return arguments.length?(e=typeof b=="function"?b:kp(!!b),p):e},p.container=function(b){return arguments.length?(t=typeof b=="function"?b:kp(b),p):t},p.subject=function(b){return arguments.length?(n=typeof b=="function"?b:kp(b),p):n},p.touchable=function(b){return arguments.length?(o=typeof b=="function"?b:kp(!!b),p):o},p.on=function(){var b=a.on.apply(a,arguments);return b===a?p:b},p.clickDistance=function(b){return arguments.length?(u=(b=+b)*b,p):Math.sqrt(u)},p}function PF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function rQ(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function _f(){}var Qh=.7,BP=1/Qh,f0="\\s*([+-]?\\d+)\\s*",Jh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Br="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b$e=/^#([0-9a-f]{3,8})$/,_$e=new RegExp(`^rgb\\(${f0},${f0},${f0}\\)$`),C$e=new RegExp(`^rgb\\(${Br},${Br},${Br}\\)$`),S$e=new RegExp(`^rgba\\(${f0},${f0},${f0},${Jh}\\)$`),L$e=new RegExp(`^rgba\\(${Br},${Br},${Br},${Jh}\\)$`),N$e=new RegExp(`^hsl\\(${Jh},${Br},${Br}\\)$`),I$e=new RegExp(`^hsla\\(${Jh},${Br},${Br},${Jh}\\)$`),QB={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};PF(_f,Ed,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:JB,formatHex:JB,formatHex8:A$e,formatHsl:E$e,formatRgb:eU,toString:eU});function JB(){return this.rgb().formatHex()}function A$e(){return this.rgb().formatHex8()}function E$e(){return aQ(this).formatHsl()}function eU(){return this.rgb().formatRgb()}function Ed(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=b$e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tU(t):n===3?new Un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?vp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?vp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=_$e.exec(e))?new Un(t[1],t[2],t[3],1):(t=C$e.exec(e))?new Un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=S$e.exec(e))?vp(t[1],t[2],t[3],t[4]):(t=L$e.exec(e))?vp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=N$e.exec(e))?rU(t[1],t[2]/100,t[3]/100,1):(t=I$e.exec(e))?rU(t[1],t[2]/100,t[3]/100,t[4]):QB.hasOwnProperty(e)?tU(QB[e]):e==="transparent"?new Un(NaN,NaN,NaN,0):null}function tU(e){return new Un(e>>16&255,e>>8&255,e&255,1)}function vp(e,t,n,o){return o<=0&&(e=t=n=NaN),new Un(e,t,n,o)}function j$e(e){return e instanceof _f||(e=Ed(e)),e?(e=e.rgb(),new Un(e.r,e.g,e.b,e.opacity)):new Un}function NH(e,t,n,o){return arguments.length===1?j$e(e):new Un(e,t,n,o??1)}function Un(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}PF(Un,NH,rQ(_f,{brighter(e){return e=e==null?BP:Math.pow(BP,e),new Un(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qh:Math.pow(Qh,e),new Un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Un(_d(this.r),_d(this.g),_d(this.b),UP(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nU,formatHex:nU,formatHex8:$$e,formatRgb:oU,toString:oU}));function nU(){return`#${vd(this.r)}${vd(this.g)}${vd(this.b)}`}function $$e(){return`#${vd(this.r)}${vd(this.g)}${vd(this.b)}${vd((isNaN(this.opacity)?1:this.opacity)*255)}`}function oU(){const e=UP(this.opacity);return`${e===1?"rgb(":"rgba("}${_d(this.r)}, ${_d(this.g)}, ${_d(this.b)}${e===1?")":`, ${e})`}`}function UP(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _d(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vd(e){return e=_d(e),(e<16?"0":"")+e.toString(16)}function rU(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Zo(e,t,n,o)}function aQ(e){if(e instanceof Zo)return new Zo(e.h,e.s,e.l,e.opacity);if(e instanceof _f||(e=Ed(e)),!e)return new Zo;if(e instanceof Zo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),a=Math.max(t,n,o),i=NaN,s=a-r,c=(a+r)/2;return s?(t===a?i=(n-o)/s+(n<o)*6:n===a?i=(o-t)/s+2:i=(t-n)/s+4,s/=c<.5?a+r:2-a-r,i*=60):s=c>0&&c<1?0:i,new Zo(i,s,c,e.opacity)}function P$e(e,t,n,o){return arguments.length===1?aQ(e):new Zo(e,t,n,o??1)}function Zo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}PF(Zo,P$e,rQ(_f,{brighter(e){return e=e==null?BP:Math.pow(BP,e),new Zo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qh:Math.pow(Qh,e),new Zo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new Un(IT(e>=240?e-240:e+120,r,o),IT(e,r,o),IT(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Zo(aU(this.h),xp(this.s),xp(this.l),UP(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=UP(this.opacity);return`${e===1?"hsl(":"hsla("}${aU(this.h)}, ${xp(this.s)*100}%, ${xp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function aU(e){return e=(e||0)%360,e<0?e+360:e}function xp(e){return Math.max(0,Math.min(1,e||0))}function IT(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Yz=e=>()=>e;function iQ(e,t){return function(n){return e+n*t}}function z$e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Pit(e,t){var n=t-e;return n?iQ(e,n>180||n<-180?n-360*Math.round(n/360):n):Yz(isNaN(e)?t:e)}function R$e(e){return(e=+e)==1?sQ:function(t,n){return n-t?z$e(t,n,e):Yz(isNaN(t)?n:t)}}function sQ(e,t){var n=t-e;return n?iQ(e,n):Yz(isNaN(e)?t:e)}const WP=function e(t){var n=R$e(t);function o(r,a){var i=n((r=NH(r)).r,(a=NH(a)).r),s=n(r.g,a.g),c=n(r.b,a.b),l=sQ(r.opacity,a.opacity);return function(h){return r.r=i(h),r.g=s(h),r.b=c(h),r.opacity=l(h),r+""}}return o.gamma=e,o}(1);function T$e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(a){for(r=0;r<n;++r)o[r]=e[r]*(1-a)+t[r]*a;return o}}function D$e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function H$e(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),a=new Array(n),i;for(i=0;i<o;++i)r[i]=Sh(e[i],t[i]);for(;i<n;++i)a[i]=t[i];return function(s){for(i=0;i<o;++i)a[i]=r[i](s);return a}}function O$e(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function zr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function F$e(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Sh(e[r],t[r]):o[r]=t[r];return function(a){for(r in n)o[r]=n[r](a);return o}}var IH=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,AT=new RegExp(IH.source,"g");function q$e(e){return function(){return e}}function V$e(e){return function(t){return e(t)+""}}function cQ(e,t){var n=IH.lastIndex=AT.lastIndex=0,o,r,a,i=-1,s=[],c=[];for(e=e+"",t=t+"";(o=IH.exec(e))&&(r=AT.exec(t));)(a=r.index)>n&&(a=t.slice(n,a),s[i]?s[i]+=a:s[++i]=a),(o=o[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,c.push({i,x:zr(o,r)})),n=AT.lastIndex;return n<t.length&&(a=t.slice(n),s[i]?s[i]+=a:s[++i]=a),s.length<2?c[0]?V$e(c[0].x):q$e(t):(t=c.length,function(l){for(var h=0,u;h<t;++h)s[(u=c[h]).i]=u.x(l);return s.join("")})}function Sh(e,t){var n=typeof t,o;return t==null||n==="boolean"?Yz(t):(n==="number"?zr:n==="string"?(o=Ed(t))?(t=o,WP):cQ:t instanceof Ed?WP:t instanceof Date?O$e:D$e(t)?T$e:Array.isArray(t)?H$e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?F$e:zr)(e,t)}var iU=180/Math.PI,AH={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lQ(e,t,n,o,r,a){var i,s,c;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(c=e*n+t*o)&&(n-=e*c,o-=t*c),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,c/=s),e*o<t*n&&(e=-e,t=-t,c=-c,i=-i),{translateX:r,translateY:a,rotate:Math.atan2(t,e)*iU,skewX:Math.atan(c)*iU,scaleX:i,scaleY:s}}var wp;function B$e(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?AH:lQ(t.a,t.b,t.c,t.d,t.e,t.f)}function U$e(e){return e==null||(wp||(wp=document.createElementNS("http://www.w3.org/2000/svg","g")),wp.setAttribute("transform",e),!(e=wp.transform.baseVal.consolidate()))?AH:(e=e.matrix,lQ(e.a,e.b,e.c,e.d,e.e,e.f))}function dQ(e,t,n,o){function r(l){return l.length?l.pop()+" ":""}function a(l,h,u,p,y,g){if(l!==u||h!==p){var k=y.push("translate(",null,t,null,n);g.push({i:k-4,x:zr(l,u)},{i:k-2,x:zr(h,p)})}else(u||p)&&y.push("translate("+u+t+p+n)}function i(l,h,u,p){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),p.push({i:u.push(r(u)+"rotate(",null,o)-2,x:zr(l,h)})):h&&u.push(r(u)+"rotate("+h+o)}function s(l,h,u,p){l!==h?p.push({i:u.push(r(u)+"skewX(",null,o)-2,x:zr(l,h)}):h&&u.push(r(u)+"skewX("+h+o)}function c(l,h,u,p,y,g){if(l!==u||h!==p){var k=y.push(r(y)+"scale(",null,",",null,")");g.push({i:k-4,x:zr(l,u)},{i:k-2,x:zr(h,p)})}else(u!==1||p!==1)&&y.push(r(y)+"scale("+u+","+p+")")}return function(l,h){var u=[],p=[];return l=e(l),h=e(h),a(l.translateX,l.translateY,h.translateX,h.translateY,u,p),i(l.rotate,h.rotate,u,p),s(l.skewX,h.skewX,u,p),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,u,p),l=h=null,function(y){for(var g=-1,k=p.length,x;++g<k;)u[(x=p[g]).i]=x.x(y);return u.join("")}}}var W$e=dQ(B$e,"px, ","px)","deg)"),G$e=dQ(U$e,", ",")",")"),K$e=1e-12;function sU(e){return((e=Math.exp(e))+1/e)/2}function X$e(e){return((e=Math.exp(e))-1/e)/2}function Z$e(e){return((e=Math.exp(2*e))-1)/(e+1)}const rP=function e(t,n,o){function r(a,i){var s=a[0],c=a[1],l=a[2],h=i[0],u=i[1],p=i[2],y=h-s,g=u-c,k=y*y+g*g,x,v;if(k<K$e)v=Math.log(p/l)/t,x=function(S){return[s+S*y,c+S*g,l*Math.exp(t*S*v)]};else{var M=Math.sqrt(k),w=(p*p-l*l+o*k)/(2*l*n*M),b=(p*p-l*l-o*k)/(2*p*n*M),C=Math.log(Math.sqrt(w*w+1)-w),_=Math.log(Math.sqrt(b*b+1)-b);v=(_-C)/t,x=function(S){var E=S*v,P=sU(C),N=l/(n*M)*(P*Z$e(t*E+C)-X$e(C));return[s+N*y,c+N*g,l*P/sU(t*E+C)]}}return x.duration=v*1e3*t/Math.SQRT2,x}return r.rho=function(a){var i=Math.max(.001,+a),s=i*i,c=s*s;return e(i,s,c)},r}(Math.SQRT2,2,4);var S0=0,z2=0,C2=0,uQ=1e3,GP,R2,KP=0,jd=0,Qz=0,ef=typeof performance=="object"&&performance.now?performance:Date,hQ=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function zF(){return jd||(hQ(Y$e),jd=ef.now()+Qz)}function Y$e(){jd=0}function XP(){this._call=this._time=this._next=null}XP.prototype=fQ.prototype={constructor:XP,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?zF():+n)+(t==null?0:+t),!this._next&&R2!==this&&(R2?R2._next=this:GP=this,R2=this),this._call=e,this._time=n,EH()},stop:function(){this._call&&(this._call=null,this._time=1/0,EH())}};function fQ(e,t,n){var o=new XP;return o.restart(e,t,n),o}function Q$e(){zF(),++S0;for(var e=GP,t;e;)(t=jd-e._time)>=0&&e._call.call(void 0,t),e=e._next;--S0}function cU(){jd=(KP=ef.now())+Qz,S0=z2=0;try{Q$e()}finally{S0=0,ePe(),jd=0}}function J$e(){var e=ef.now(),t=e-KP;t>uQ&&(Qz-=t,KP=e)}function ePe(){for(var e,t=GP,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:GP=n);R2=e,EH(o)}function EH(e){if(!S0){z2&&(z2=clearTimeout(z2));var t=e-jd;t>24?(e<1/0&&(z2=setTimeout(cU,e-ef.now()-Qz)),C2&&(C2=clearInterval(C2))):(C2||(KP=ef.now(),C2=setInterval(J$e,uQ)),S0=1,hQ(cU))}}function lU(e,t,n){var o=new XP;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var tPe=Xz("start","end","cancel","interrupt"),nPe=[],pQ=0,dU=1,jH=2,aP=3,uU=4,$H=5,iP=6;function Jz(e,t,n,o,r,a){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;oPe(e,n,{name:t,index:o,group:r,on:tPe,tween:nPe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:pQ})}function RF(e,t){var n=ir(e,t);if(n.state>pQ)throw new Error("too late; already scheduled");return n}function Qr(e,t){var n=ir(e,t);if(n.state>aP)throw new Error("too late; already running");return n}function ir(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function oPe(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=fQ(a,0,n.time);function a(l){n.state=dU,n.timer.restart(i,n.delay,n.time),n.delay<=l&&i(l-n.delay)}function i(l){var h,u,p,y;if(n.state!==dU)return c();for(h in o)if(y=o[h],y.name===n.name){if(y.state===aP)return lU(i);y.state===uU?(y.state=iP,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete o[h]):+h<t&&(y.state=iP,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete o[h])}if(lU(function(){n.state===aP&&(n.state=uU,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=jH,n.on.call("start",e,e.__data__,n.index,n.group),n.state===jH){for(n.state=aP,r=new Array(p=n.tween.length),h=0,u=-1;h<p;++h)(y=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=y);r.length=u+1}}function s(l){for(var h=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=$H,1),u=-1,p=r.length;++u<p;)r[u].call(e,h);n.state===$H&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=iP,n.timer.stop(),delete o[t];for(var l in o)return;delete e.__transition}}function sP(e,t){var n=e.__transition,o,r,a=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((o=n[i]).name!==t){a=!1;continue}r=o.state>jH&&o.state<$H,o.state=iP,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[i]}a&&delete e.__transition}}function rPe(e){return this.each(function(){sP(this,e)})}function aPe(e,t){var n,o;return function(){var r=Qr(this,e),a=r.tween;if(a!==n){o=n=a;for(var i=0,s=o.length;i<s;++i)if(o[i].name===t){o=o.slice(),o.splice(i,1);break}}r.tween=o}}function iPe(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var a=Qr(this,e),i=a.tween;if(i!==o){r=(o=i).slice();for(var s={name:t,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===t){r[c]=s;break}c===l&&r.push(s)}a.tween=r}}function sPe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=ir(this.node(),n).tween,r=0,a=o.length,i;r<a;++r)if((i=o[r]).name===e)return i.value;return null}return this.each((t==null?aPe:iPe)(n,e,t))}function TF(e,t,n){var o=e._id;return e.each(function(){var r=Qr(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return ir(r,o).value[t]}}function yQ(e,t){var n;return(typeof t=="number"?zr:t instanceof Ed?WP:(n=Ed(t))?(t=n,WP):cQ)(e,t)}function cPe(e){return function(){this.removeAttribute(e)}}function lPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dPe(e,t,n){var o,r=n+"",a;return function(){var i=this.getAttribute(e);return i===r?null:i===o?a:a=t(o=i,n)}}function uPe(e,t,n){var o,r=n+"",a;return function(){var i=this.getAttributeNS(e.space,e.local);return i===r?null:i===o?a:a=t(o=i,n)}}function hPe(e,t,n){var o,r,a;return function(){var i,s=n(this),c;return s==null?void this.removeAttribute(e):(i=this.getAttribute(e),c=s+"",i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s)))}}function fPe(e,t,n){var o,r,a;return function(){var i,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),c=s+"",i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s)))}}function pPe(e,t){var n=Zz(e),o=n==="transform"?G$e:yQ;return this.attrTween(e,typeof t=="function"?(n.local?fPe:hPe)(n,o,TF(this,"attr."+e,t)):t==null?(n.local?lPe:cPe)(n):(n.local?uPe:dPe)(n,o,t))}function yPe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function mPe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function gPe(e,t){var n,o;function r(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&mPe(e,a)),n}return r._value=t,r}function kPe(e,t){var n,o;function r(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&yPe(e,a)),n}return r._value=t,r}function vPe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Zz(e);return this.tween(n,(o.local?gPe:kPe)(o,t))}function xPe(e,t){return function(){RF(this,e).delay=+t.apply(this,arguments)}}function wPe(e,t){return t=+t,function(){RF(this,e).delay=t}}function MPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xPe:wPe)(t,e)):ir(this.node(),t).delay}function bPe(e,t){return function(){Qr(this,e).duration=+t.apply(this,arguments)}}function _Pe(e,t){return t=+t,function(){Qr(this,e).duration=t}}function CPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?bPe:_Pe)(t,e)):ir(this.node(),t).duration}function SPe(e,t){if(typeof t!="function")throw new Error;return function(){Qr(this,e).ease=t}}function LPe(e){var t=this._id;return arguments.length?this.each(SPe(t,e)):ir(this.node(),t).ease}function NPe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Qr(this,e).ease=n}}function IPe(e){if(typeof e!="function")throw new Error;return this.each(NPe(this._id,e))}function APe(e){typeof e!="function"&&(e=UY(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=[],c,l=0;l<i;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Aa(o,this._parents,this._name,this._id)}function EPe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,a=Math.min(o,r),i=new Array(o),s=0;s<a;++s)for(var c=t[s],l=n[s],h=c.length,u=i[s]=new Array(h),p,y=0;y<h;++y)(p=c[y]||l[y])&&(u[y]=p);for(;s<o;++s)i[s]=t[s];return new Aa(i,this._parents,this._name,this._id)}function jPe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function $Pe(e,t,n){var o,r,a=jPe(t)?RF:Qr;return function(){var i=a(this,e),s=i.on;s!==o&&(r=(o=s).copy()).on(t,n),i.on=r}}function PPe(e,t){var n=this._id;return arguments.length<2?ir(this.node(),n).on.on(e):this.each($Pe(n,e,t))}function zPe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function RPe(){return this.on("end.remove",zPe(this._id))}function TPe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=jF(e));for(var o=this._groups,r=o.length,a=new Array(r),i=0;i<r;++i)for(var s=o[i],c=s.length,l=a[i]=new Array(c),h,u,p=0;p<c;++p)(h=s[p])&&(u=e.call(h,h.__data__,p,s))&&("__data__"in h&&(u.__data__=h.__data__),l[p]=u,Jz(l[p],t,n,p,l,ir(h,n)));return new Aa(a,this._parents,t,n)}function DPe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=BY(e));for(var o=this._groups,r=o.length,a=[],i=[],s=0;s<r;++s)for(var c=o[s],l=c.length,h,u=0;u<l;++u)if(h=c[u]){for(var p=e.call(h,h.__data__,u,c),y,g=ir(h,n),k=0,x=p.length;k<x;++k)(y=p[k])&&Jz(y,t,n,k,p,g);a.push(p),i.push(h)}return new Aa(a,i,t,n)}var HPe=bf.prototype.constructor;function OPe(){return new HPe(this._groups,this._parents)}function FPe(e,t){var n,o,r;return function(){var a=C0(this,e),i=(this.style.removeProperty(e),C0(this,e));return a===i?null:a===n&&i===o?r:r=t(n=a,o=i)}}function mQ(e){return function(){this.style.removeProperty(e)}}function qPe(e,t,n){var o,r=n+"",a;return function(){var i=C0(this,e);return i===r?null:i===o?a:a=t(o=i,n)}}function VPe(e,t,n){var o,r,a;return function(){var i=C0(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),C0(this,e))),i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s))}}function BPe(e,t){var n,o,r,a="style."+t,i="end."+a,s;return function(){var c=Qr(this,e),l=c.on,h=c.value[a]==null?s||(s=mQ(t)):void 0;(l!==n||r!==h)&&(o=(n=l).copy()).on(i,r=h),c.on=o}}function UPe(e,t,n){var o=(e+="")=="transform"?W$e:yQ;return t==null?this.styleTween(e,FPe(e,o)).on("end.style."+e,mQ(e)):typeof t=="function"?this.styleTween(e,VPe(e,o,TF(this,"style."+e,t))).each(BPe(this._id,e)):this.styleTween(e,qPe(e,o,t),n).on("end.style."+e,null)}function WPe(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function GPe(e,t,n){var o,r;function a(){var i=t.apply(this,arguments);return i!==r&&(o=(r=i)&&WPe(e,i,n)),o}return a._value=t,a}function KPe(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,GPe(e,t,n??""))}function XPe(e){return function(){this.textContent=e}}function ZPe(e){return function(){var t=e(this);this.textContent=t??""}}function YPe(e){return this.tween("text",typeof e=="function"?ZPe(TF(this,"text",e)):XPe(e==null?"":e+""))}function QPe(e){return function(t){this.textContent=e.call(this,t)}}function JPe(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&QPe(r)),t}return o._value=e,o}function eze(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,JPe(e))}function tze(){for(var e=this._name,t=this._id,n=gQ(),o=this._groups,r=o.length,a=0;a<r;++a)for(var i=o[a],s=i.length,c,l=0;l<s;++l)if(c=i[l]){var h=ir(c,t);Jz(c,e,n,l,i,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Aa(o,this._parents,e,n)}function nze(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(a,i){var s={value:i},c={value:function(){--r===0&&a()}};n.each(function(){var l=Qr(this,o),h=l.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),r===0&&a()})}var oze=0;function Aa(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function gQ(){return++oze}var ha=bf.prototype;Aa.prototype={constructor:Aa,select:TPe,selectAll:DPe,selectChild:ha.selectChild,selectChildren:ha.selectChildren,filter:APe,merge:EPe,selection:OPe,transition:tze,call:ha.call,nodes:ha.nodes,node:ha.node,size:ha.size,empty:ha.empty,each:ha.each,on:PPe,attr:pPe,attrTween:vPe,style:UPe,styleTween:KPe,text:YPe,textTween:eze,remove:RPe,tween:sPe,delay:MPe,duration:CPe,ease:LPe,easeVarying:IPe,end:nze,[Symbol.iterator]:ha[Symbol.iterator]};function rze(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var aze={time:null,delay:0,duration:250,ease:rze};function ize(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function sze(e){var t,n;e instanceof Aa?(t=e._id,e=e._name):(t=gQ(),(n=aze).time=zF(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,a=0;a<r;++a)for(var i=o[a],s=i.length,c,l=0;l<s;++l)(c=i[l])&&Jz(c,e,t,l,i,n||ize(c,t));return new Aa(o,this._parents,e,t)}bf.prototype.interrupt=rPe;bf.prototype.transition=sze;const Mp=e=>()=>e;function cze(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function wa(e,t,n){this.k=e,this.x=t,this.y=n}wa.prototype={constructor:wa,scale:function(e){return e===1?this:new wa(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new wa(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var eR=new wa(1,0,0);kQ.prototype=wa.prototype;function kQ(e){for(;!e.__zoom;)if(!(e=e.parentNode))return eR;return e.__zoom}function ET(e){e.stopImmediatePropagation()}function S2(e){e.preventDefault(),e.stopImmediatePropagation()}function lze(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function dze(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function hU(){return this.__zoom||eR}function uze(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function hze(){return navigator.maxTouchPoints||"ontouchstart"in this}function fze(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function vQ(){var e=lze,t=dze,n=fze,o=uze,r=hze,a=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],s=250,c=rP,l=Xz("start","zoom","end"),h,u,p,y=500,g=150,k=0,x=10;function v(A){A.property("__zoom",hU).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",N).filter(r).on("touchstart.zoom",j).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(A,T,D,O){var I=A.selection?A.selection():A;I.property("__zoom",hU),A!==I?C(A,T,D,O):I.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},v.scaleBy=function(A,T,D,O){v.scaleTo(A,function(){var I=this.__zoom.k,R=typeof T=="function"?T.apply(this,arguments):T;return I*R},D,O)},v.scaleTo=function(A,T,D,O){v.transform(A,function(){var I=t.apply(this,arguments),R=this.__zoom,L=D==null?b(I):typeof D=="function"?D.apply(this,arguments):D,q=R.invert(L),H=typeof T=="function"?T.apply(this,arguments):T;return n(w(M(R,H),L,q),I,i)},D,O)},v.translateBy=function(A,T,D,O){v.transform(A,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),i)},null,O)},v.translateTo=function(A,T,D,O,I){v.transform(A,function(){var R=t.apply(this,arguments),L=this.__zoom,q=O==null?b(R):typeof O=="function"?O.apply(this,arguments):O;return n(eR.translate(q[0],q[1]).scale(L.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof D=="function"?-D.apply(this,arguments):-D),R,i)},O,I)};function M(A,T){return T=Math.max(a[0],Math.min(a[1],T)),T===A.k?A:new wa(T,A.x,A.y)}function w(A,T,D){var O=T[0]-D[0]*A.k,I=T[1]-D[1]*A.k;return O===A.x&&I===A.y?A:new wa(A.k,O,I)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function C(A,T,D,O){A.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var I=this,R=arguments,L=_(I,R).event(O),q=t.apply(I,R),H=D==null?b(q):typeof D=="function"?D.apply(I,R):D,$=Math.max(q[1][0]-q[0][0],q[1][1]-q[0][1]),X=I.__zoom,G=typeof T=="function"?T.apply(I,R):T,Q=c(X.invert(H).concat($/X.k),G.invert(H).concat($/G.k));return function(oe){if(oe===1)oe=G;else{var re=Q(oe),te=$/re[2];oe=new wa(te,H[0]-re[0]*te,H[1]-re[1]*te)}L.zoom(null,oe)}})}function _(A,T,D){return!D&&A.__zooming||new S(A,T)}function S(A,T){this.that=A,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,T),this.taps=0}S.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,T){return this.mouse&&A!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=T.invert(this.touch1[0])),this.that.__zoom=T,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var T=ro(this.that).datum();l.call(A,this.that,new cze(A,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:l}),T)}};function E(A,...T){if(!e.apply(this,arguments))return;var D=_(this,T).event(A),O=this.__zoom,I=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),R=Go(A);if(D.wheel)(D.mouse[0][0]!==R[0]||D.mouse[0][1]!==R[1])&&(D.mouse[1]=O.invert(D.mouse[0]=R)),clearTimeout(D.wheel);else{if(O.k===I)return;D.mouse=[R,O.invert(R)],sP(this),D.start()}S2(A),D.wheel=setTimeout(L,g),D.zoom("mouse",n(w(M(O,I),D.mouse[0],D.mouse[1]),D.extent,i));function L(){D.wheel=null,D.end()}}function P(A,...T){if(p||!e.apply(this,arguments))return;var D=A.currentTarget,O=_(this,T,!0).event(A),I=ro(A.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",$,!0),R=Go(A,D),L=A.clientX,q=A.clientY;tQ(A.view),ET(A),O.mouse=[R,this.__zoom.invert(R)],sP(this),O.start();function H(X){if(S2(X),!O.moved){var G=X.clientX-L,Q=X.clientY-q;O.moved=G*G+Q*Q>k}O.event(X).zoom("mouse",n(w(O.that.__zoom,O.mouse[0]=Go(X,D),O.mouse[1]),O.extent,i))}function $(X){I.on("mousemove.zoom mouseup.zoom",null),nQ(X.view,O.moved),S2(X),O.event(X).end()}}function N(A,...T){if(e.apply(this,arguments)){var D=this.__zoom,O=Go(A.changedTouches?A.changedTouches[0]:A,this),I=D.invert(O),R=D.k*(A.shiftKey?.5:2),L=n(w(M(D,R),O,I),t.apply(this,T),i);S2(A),s>0?ro(this).transition().duration(s).call(C,L,O,A):ro(this).call(v.transform,L,O,A)}}function j(A,...T){if(e.apply(this,arguments)){var D=A.touches,O=D.length,I=_(this,T,A.changedTouches.length===O).event(A),R,L,q,H;for(ET(A),L=0;L<O;++L)q=D[L],H=Go(q,this),H=[H,this.__zoom.invert(H),q.identifier],I.touch0?!I.touch1&&I.touch0[2]!==H[2]&&(I.touch1=H,I.taps=0):(I.touch0=H,R=!0,I.taps=1+!!h);h&&(h=clearTimeout(h)),R&&(I.taps<2&&(u=H[0],h=setTimeout(function(){h=null},y)),sP(this),I.start())}}function z(A,...T){if(this.__zooming){var D=_(this,T).event(A),O=A.changedTouches,I=O.length,R,L,q,H;for(S2(A),R=0;R<I;++R)L=O[R],q=Go(L,this),D.touch0&&D.touch0[2]===L.identifier?D.touch0[0]=q:D.touch1&&D.touch1[2]===L.identifier&&(D.touch1[0]=q);if(L=D.that.__zoom,D.touch1){var $=D.touch0[0],X=D.touch0[1],G=D.touch1[0],Q=D.touch1[1],oe=(oe=G[0]-$[0])*oe+(oe=G[1]-$[1])*oe,re=(re=Q[0]-X[0])*re+(re=Q[1]-X[1])*re;L=M(L,Math.sqrt(oe/re)),q=[($[0]+G[0])/2,($[1]+G[1])/2],H=[(X[0]+Q[0])/2,(X[1]+Q[1])/2]}else if(D.touch0)q=D.touch0[0],H=D.touch0[1];else return;D.zoom("touch",n(w(L,q,H),D.extent,i))}}function U(A,...T){if(this.__zooming){var D=_(this,T).event(A),O=A.changedTouches,I=O.length,R,L;for(ET(A),p&&clearTimeout(p),p=setTimeout(function(){p=null},y),R=0;R<I;++R)L=O[R],D.touch0&&D.touch0[2]===L.identifier?delete D.touch0:D.touch1&&D.touch1[2]===L.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(L=Go(L,this),Math.hypot(u[0]-L[0],u[1]-L[1])<x)){var q=ro(this).on("dblclick.zoom");q&&q.apply(this,arguments)}}}return v.wheelDelta=function(A){return arguments.length?(o=typeof A=="function"?A:Mp(+A),v):o},v.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Mp(!!A),v):e},v.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Mp(!!A),v):r},v.extent=function(A){return arguments.length?(t=typeof A=="function"?A:Mp([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),v):t},v.scaleExtent=function(A){return arguments.length?(a[0]=+A[0],a[1]=+A[1],v):[a[0],a[1]]},v.translateExtent=function(A){return arguments.length?(i[0][0]=+A[0][0],i[1][0]=+A[1][0],i[0][1]=+A[0][1],i[1][1]=+A[1][1],v):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},v.constrain=function(A){return arguments.length?(n=A,v):n},v.duration=function(A){return arguments.length?(s=+A,v):s},v.interpolate=function(A){return arguments.length?(c=A,v):c},v.on=function(){var A=l.on.apply(l,arguments);return A===l?v:A},v.clickDistance=function(A){return arguments.length?(k=(A=+A)*A,v):Math.sqrt(k)},v.tapDistance=function(A){return arguments.length?(x=+A,v):x},v}const Kr={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},tf=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],xQ=["Enter"," ","Escape"],wQ={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var L0;(function(e){e.Strict="strict",e.Loose="loose"})(L0||(L0={}));var Cd;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Cd||(Cd={}));var N0;(function(e){e.Partial="partial",e.Full="full"})(N0||(N0={}));const MQ={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var mi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(mi||(mi={}));var nf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(nf||(nf={}));var fe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(fe||(fe={}));const fU={[fe.Left]:fe.Right,[fe.Right]:fe.Left,[fe.Top]:fe.Bottom,[fe.Bottom]:fe.Top};function bQ(e){return e===null?null:e?"valid":"invalid"}const _Q=e=>"id"in e&&"source"in e&&"target"in e,pze=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),DF=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Cf=(e,t=[0,0])=>{const{width:n,height:o}=za(e),r=e.origin??t,a=n*r[0],i=o*r[1];return{x:e.position.x-a,y:e.position.y-i}},yze=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,r)=>{const a=typeof r=="string";let i=!t.nodeLookup&&!a?r:void 0;t.nodeLookup&&(i=a?t.nodeLookup.get(r):DF(r)?r:t.nodeLookup.get(r.id));const s=i?ZP(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return tR(o,s)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return nR(n)},Sf=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=tR(n,ZP(r)),o=!0)}),o?nR(n):{x:0,y:0,width:0,height:0}},HF=(e,t,[n,o,r]=[0,0,1],a=!1,i=!1)=>{const s={...Nf(t,[n,o,r]),width:t.width/r,height:t.height/r},c=[];for(const l of e.values()){const{measured:h,selectable:u=!0,hidden:p=!1}=l;if(i&&!u||p)continue;const y=h.width??l.width??l.initialWidth??null,g=h.height??l.height??l.initialHeight??null,k=of(s,A0(l)),x=(y??0)*(g??0),v=a&&k>0;(!l.internals.handleBounds||v||k>=x||l.dragging)&&c.push(l)}return c},mze=(e,t)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function gze(e,t){const n=new Map,o=t!=null&&t.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function kze({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:a},i){if(e.size===0)return Promise.resolve(!0);const s=gze(e,i),c=Sf(s),l=OF(c,t,n,(i==null?void 0:i.minZoom)??r,(i==null?void 0:i.maxZoom)??a,(i==null?void 0:i.padding)??.1);return await o.setViewport(l,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),Promise.resolve(!0)}function CQ({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:a}){const i=n.get(e),s=i.parentId?n.get(i.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},h=i.origin??o;let u=i.extent||r;if(i.extent==="parent"&&!i.expandParent)if(!s)a==null||a("005",Kr.error005());else{const y=s.measured.width,g=s.measured.height;y&&g&&(u=[[c,l],[c+y,l+g]])}else s&&E0(i.extent)&&(u=[[i.extent[0][0]+c,i.extent[0][1]+l],[i.extent[1][0]+c,i.extent[1][1]+l]]);const p=E0(u)?$d(t,u,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(a==null||a("015",Kr.error015())),{position:{x:p.x-c+(i.measured.width??0)*h[0],y:p.y-l+(i.measured.height??0)*h[1]},positionAbsolute:p}}async function vze({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const a=new Set(e.map(p=>p.id)),i=[];for(const p of n){if(p.deletable===!1)continue;const y=a.has(p.id),g=!y&&p.parentId&&i.find(k=>k.id===p.parentId);(y||g)&&i.push(p)}const s=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),h=mze(i,c);for(const p of c)s.has(p.id)&&!h.find(g=>g.id===p.id)&&h.push(p);if(!r)return{edges:h,nodes:i};const u=await r({nodes:i,edges:h});return typeof u=="boolean"?u?{edges:h,nodes:i}:{edges:[],nodes:[]}:u}const I0=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),$d=(e={x:0,y:0},t,n)=>({x:I0(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:I0(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function SQ(e,t,n){const{width:o,height:r}=za(n),{x:a,y:i}=n.internals.positionAbsolute;return $d(e,[[a,i],[a+o,i+r]],t)}const pU=(e,t,n)=>e<t?I0(Math.abs(e-t),1,t)/t:e>n?-I0(Math.abs(e-n),1,t)/t:0,LQ=(e,t,n=15,o=40)=>{const r=pU(e.x,o,t.width-o)*n,a=pU(e.y,o,t.height-o)*n;return[r,a]},tR=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),PH=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),nR=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),A0=(e,t=[0,0])=>{var r,a;const{x:n,y:o}=DF(e)?e.internals.positionAbsolute:Cf(e,t);return{x:n,y:o,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},ZP=(e,t=[0,0])=>{var r,a;const{x:n,y:o}=DF(e)?e.internals.positionAbsolute:Cf(e,t);return{x:n,y:o,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:o+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},NQ=(e,t)=>nR(tR(PH(e),PH(t))),of=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},yU=e=>Yo(e.width)&&Yo(e.height)&&Yo(e.x)&&Yo(e.y),Yo=e=>!isNaN(e)&&isFinite(e),xze=(e,t)=>{},Lf=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Nf=({x:e,y:t},[n,o,r],a=!1,i=[1,1])=>{const s={x:(e-n)/r,y:(t-o)/r};return a?Lf(s,i):s},YP=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function Mu(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function wze(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=Mu(e,n),r=Mu(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=Mu(e.top??e.y??0,n),r=Mu(e.bottom??e.y??0,n),a=Mu(e.left??e.x??0,t),i=Mu(e.right??e.x??0,t);return{top:o,right:i,bottom:r,left:a,x:a+i,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Mze(e,t,n,o,r,a){const{x:i,y:s}=YP(e,[t,n,o]),{x:c,y:l}=YP({x:e.x+e.width,y:e.y+e.height},[t,n,o]),h=r-c,u=a-l;return{left:Math.floor(i),top:Math.floor(s),right:Math.floor(h),bottom:Math.floor(u)}}const OF=(e,t,n,o,r,a)=>{const i=wze(a,t,n),s=(t-i.x)/e.width,c=(n-i.y)/e.height,l=Math.min(s,c),h=I0(l,o,r),u=e.x+e.width/2,p=e.y+e.height/2,y=t/2-u*h,g=n/2-p*h,k=Mze(e,y,g,h,t,n),x={left:Math.min(k.left-i.left,0),top:Math.min(k.top-i.top,0),right:Math.min(k.right-i.right,0),bottom:Math.min(k.bottom-i.bottom,0)};return{x:y-x.left+x.right,y:g-x.top+x.bottom,zoom:h}},rf=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function E0(e){return e!=null&&e!=="parent"}function za(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function IQ(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function AQ(e,t={width:0,height:0},n,o,r){const a={...e},i=o.get(n);if(i){const s=i.origin||r;a.x+=i.internals.positionAbsolute.x-(t.width??0)*s[0],a.y+=i.internals.positionAbsolute.y-(t.height??0)*s[1]}return a}function mU(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function bze(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function _ze(e){return{...wQ,...e||{}}}function Lh(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:a,y:i}=Qo(e),s=Nf({x:a-((r==null?void 0:r.left)??0),y:i-((r==null?void 0:r.top)??0)},o),{x:c,y:l}=n?Lf(s,t):s;return{xSnapped:c,ySnapped:l,...s}}const FF=e=>({width:e.offsetWidth,height:e.offsetHeight}),EQ=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Cze=["INPUT","SELECT","TEXTAREA"];function jQ(e){var o,r;const t=((r=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:r[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:Cze.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const $Q=e=>"clientX"in e,Qo=(e,t)=>{var a,i;const n=$Q(e),o=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,r=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:o-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},gU=(e,t,n,o,r)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(i=>{const s=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:r,position:i.getAttribute("data-handlepos"),x:(s.left-n.left)/o,y:(s.top-n.top)/o,...FF(i)}})};function PQ({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:a,targetControlX:i,targetControlY:s}){const c=e*.125+r*.375+i*.375+n*.125,l=t*.125+a*.375+s*.375+o*.125,h=Math.abs(c-e),u=Math.abs(l-t);return[c,l,h,u]}function bp(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function kU({pos:e,x1:t,y1:n,x2:o,y2:r,c:a}){switch(e){case fe.Left:return[t-bp(t-o,a),n];case fe.Right:return[t+bp(o-t,a),n];case fe.Top:return[t,n-bp(n-r,a)];case fe.Bottom:return[t,n+bp(r-n,a)]}}function oR({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top,curvature:i=.25}){const[s,c]=kU({pos:n,x1:e,y1:t,x2:o,y2:r,c:i}),[l,h]=kU({pos:a,x1:o,y1:r,x2:e,y2:t,c:i}),[u,p,y,g]=PQ({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:h});return[`M${e},${t} C${s},${c} ${l},${h} ${o},${r}`,u,p,y,g]}function zQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,a=n<e?n+r:n-r,i=Math.abs(o-t)/2,s=o<t?o+i:o-i;return[a,s,r,i]}function Sze({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:a="basic"}){if(a==="manual")return o;const i=r&&n?o+1e3:o,s=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return i+s}function Lze({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const a=tR(ZP(e),ZP(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const i={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return of(i,nR(a))>0}const Nze=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,Ize=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Aze=(e,t,n={})=>{if(!e.source||!e.target)return t;const o=n.getEdgeId||Nze;let r;return _Q(e)?r={...e}:r={...e,id:o(e)},Ize(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function RQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,a,i,s]=zQ({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,a,i,s]}const vU={[fe.Left]:{x:-1,y:0},[fe.Right]:{x:1,y:0},[fe.Top]:{x:0,y:-1},[fe.Bottom]:{x:0,y:1}},Eze=({source:e,sourcePosition:t=fe.Bottom,target:n})=>t===fe.Left||t===fe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},xU=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function jze({source:e,sourcePosition:t=fe.Bottom,target:n,targetPosition:o=fe.Top,center:r,offset:a,stepPosition:i}){const s=vU[t],c=vU[o],l={x:e.x+s.x*a,y:e.y+s.y*a},h={x:n.x+c.x*a,y:n.y+c.y*a},u=Eze({source:l,sourcePosition:t,target:h}),p=u.x!==0?"x":"y",y=u[p];let g=[],k,x;const v={x:0,y:0},M={x:0,y:0},[,,w,b]=zQ({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[p]*c[p]===-1){p==="x"?(k=r.x??l.x+(h.x-l.x)*i,x=r.y??(l.y+h.y)/2):(k=r.x??(l.x+h.x)/2,x=r.y??l.y+(h.y-l.y)*i);const E=[{x:k,y:l.y},{x:k,y:h.y}],P=[{x:l.x,y:x},{x:h.x,y:x}];s[p]===y?g=p==="x"?E:P:g=p==="x"?P:E}else{const E=[{x:l.x,y:h.y}],P=[{x:h.x,y:l.y}];if(p==="x"?g=s.x===y?P:E:g=s.y===y?E:P,t===o){const A=Math.abs(e[p]-n[p]);if(A<=a){const T=Math.min(a-1,a-A);s[p]===y?v[p]=(l[p]>e[p]?-1:1)*T:M[p]=(h[p]>n[p]?-1:1)*T}}if(t!==o){const A=p==="x"?"y":"x",T=s[p]===c[A],D=l[A]>h[A],O=l[A]<h[A];(s[p]===1&&(!T&&D||T&&O)||s[p]!==1&&(!T&&O||T&&D))&&(g=p==="x"?E:P)}const N={x:l.x+v.x,y:l.y+v.y},j={x:h.x+M.x,y:h.y+M.y},z=Math.max(Math.abs(N.x-g[0].x),Math.abs(j.x-g[0].x)),U=Math.max(Math.abs(N.y-g[0].y),Math.abs(j.y-g[0].y));z>=U?(k=(N.x+j.x)/2,x=g[0].y):(k=g[0].x,x=(N.y+j.y)/2)}const C={x:l.x+v.x,y:l.y+v.y},_={x:h.x+M.x,y:h.y+M.y};return[[e,...C.x!==g[0].x||C.y!==g[0].y?[C]:[],...g,..._.x!==g[g.length-1].x||_.y!==g[g.length-1].y?[_]:[],n],k,x,w,b]}function $ze(e,t,n,o){const r=Math.min(xU(e,t)/2,xU(t,n)/2,o),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i){const l=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${a+r*l},${i}Q ${a},${i} ${a},${i+r*h}`}const s=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${a},${i+r*c}Q ${a},${i} ${a+r*s},${i}`}function af({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top,borderRadius:i=5,centerX:s,centerY:c,offset:l=20,stepPosition:h=.5}){const[u,p,y,g,k]=jze({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:h});let x=`M${u[0].x} ${u[0].y}`;for(let v=1;v<u.length-1;v++)x+=$ze(u[v-1],u[v],u[v+1],i);return x+=`L${u[u.length-1].x} ${u[u.length-1].y}`,[x,p,y,g,k]}function wU(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Pze(e){var u;const{sourceNode:t,targetNode:n}=e;if(!wU(t)||!wU(n))return null;const o=t.internals.handleBounds||MU(t.handles),r=n.internals.handleBounds||MU(n.handles),a=bU((o==null?void 0:o.source)??[],e.sourceHandle),i=bU(e.connectionMode===L0.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),e.targetHandle);if(!a||!i)return(u=e.onError)==null||u.call(e,"008",Kr.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const s=(a==null?void 0:a.position)||fe.Bottom,c=(i==null?void 0:i.position)||fe.Top,l=Pd(t,a,s),h=Pd(n,i,c);return{sourceX:l.x,sourceY:l.y,targetX:h.x,targetY:h.y,sourcePosition:s,targetPosition:c}}function MU(e){if(!e)return null;const t=[],n=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Pd(e,t,n=fe.Left,o=!1){const r=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:s}=t??za(e);if(o)return{x:r+i/2,y:a+s/2};switch((t==null?void 0:t.position)??n){case fe.Top:return{x:r+i/2,y:a};case fe.Right:return{x:r+i,y:a+s/2};case fe.Bottom:return{x:r+i/2,y:a+s};case fe.Left:return{x:r,y:a+s/2}}}function bU(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function zH(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function zze(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const a=new Set;return e.reduce((i,s)=>([s.markerStart||o,s.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const l=zH(c,t);a.has(l)||(i.push({id:l,color:c.color||n,...c}),a.add(l))}}),i),[]).sort((i,s)=>i.id.localeCompare(s.id))}const TQ=1e3,Rze=10,qF={nodeOrigin:[0,0],nodeExtent:tf,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Tze={...qF,checkEquality:!0};function VF(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function Dze(e,t,n){const o=VF(qF,n);for(const r of e.values())if(r.parentId)UF(r,e,t,o);else{const a=Cf(r,o.nodeOrigin),i=E0(r.extent)?r.extent:o.nodeExtent,s=$d(a,i,za(r));r.internals.positionAbsolute=s}}function Hze(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],o=[];for(const r of e.handles){const a={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(a):r.type==="target"&&o.push(a)}return{source:n,target:o}}function BF(e){return e==="manual"}function RH(e,t,n,o={}){var h,u;const r=VF(Tze,o),a={i:0},i=new Map(t),s=r!=null&&r.elevateNodesOnSelect&&!BF(r.zIndexMode)?TQ:0;let c=e.length>0,l=!1;t.clear(),n.clear();for(const p of e){let y=i.get(p.id);if(r.checkEquality&&p===(y==null?void 0:y.internals.userNode))t.set(p.id,y);else{const g=Cf(p,r.nodeOrigin),k=E0(p.extent)?p.extent:r.nodeExtent,x=$d(g,k,za(p));y={...r.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(u=p.measured)==null?void 0:u.height},internals:{positionAbsolute:x,handleBounds:Hze(p,y),z:DQ(p,s,r.zIndexMode),userNode:p}},t.set(p.id,y)}(y.measured===void 0||y.measured.width===void 0||y.measured.height===void 0)&&!y.hidden&&(c=!1),p.parentId&&UF(y,t,n,o,a),l||(l=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:l}}function Oze(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function UF(e,t,n,o,r){const{elevateNodesOnSelect:a,nodeOrigin:i,nodeExtent:s,zIndexMode:c}=VF(qF,o),l=e.parentId,h=t.get(l);if(!h){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Oze(e,n),r&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++r.i,h.internals.z=h.internals.z+r.i*Rze),r&&h.internals.rootParentIndex!==void 0&&(r.i=h.internals.rootParentIndex);const u=a&&!BF(c)?TQ:0,{x:p,y,z:g}=Fze(e,h,i,s,u,c),{positionAbsolute:k}=e.internals,x=p!==k.x||y!==k.y;(x||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:p,y}:k,z:g}})}function DQ(e,t,n){const o=Yo(e.zIndex)?e.zIndex:0;return BF(n)?o:o+(e.selected?t:0)}function Fze(e,t,n,o,r,a){const{x:i,y:s}=t.internals.positionAbsolute,c=za(e),l=Cf(e,n),h=E0(e.extent)?$d(l,e.extent,c):l;let u=$d({x:i+h.x,y:s+h.y},o,c);e.extent==="parent"&&(u=SQ(u,c,t));const p=DQ(e,r,a),y=t.internals.z??0;return{x:u.x,y:u.y,z:y>=p?y+1:p}}function WF(e,t,n,o=[0,0]){var i;const r=[],a=new Map;for(const s of e){const c=t.get(s.parentId);if(!c)continue;const l=((i=a.get(s.parentId))==null?void 0:i.expandedRect)??A0(c),h=NQ(l,s.rect);a.set(s.parentId,{expandedRect:h,parent:c})}return a.size>0&&a.forEach(({expandedRect:s,parent:c},l)=>{var w;const h=c.internals.positionAbsolute,u=za(c),p=c.origin??o,y=s.x<h.x?Math.round(Math.abs(h.x-s.x)):0,g=s.y<h.y?Math.round(Math.abs(h.y-s.y)):0,k=Math.max(u.width,Math.round(s.width)),x=Math.max(u.height,Math.round(s.height)),v=(k-u.width)*p[0],M=(x-u.height)*p[1];(y>0||g>0||v||M)&&(r.push({id:l,type:"position",position:{x:c.position.x-y+v,y:c.position.y-g+M}}),(w=n.get(l))==null||w.forEach(b=>{e.some(C=>C.id===b.id)||r.push({id:b.id,type:"position",position:{x:b.position.x+y,y:b.position.y+g}})})),(u.width<s.width||u.height<s.height||y||g)&&r.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:k+(y?p[0]*y-v:0),height:x+(g?p[1]*g-M:0)}})}),r}function qze(e,t,n,o,r,a,i){const s=o==null?void 0:o.querySelector(".xyflow__viewport");let c=!1;if(!s)return{changes:[],updatedInternals:c};const l=[],h=window.getComputedStyle(s),{m22:u}=new window.DOMMatrixReadOnly(h.transform),p=[];for(const y of e.values()){const g=t.get(y.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const k=FF(y.nodeElement),x=g.measured.width!==k.width||g.measured.height!==k.height;if(!!(k.width&&k.height&&(x||!g.internals.handleBounds||y.force))){const M=y.nodeElement.getBoundingClientRect(),w=E0(g.extent)?g.extent:a;let{positionAbsolute:b}=g.internals;g.parentId&&g.extent==="parent"?b=SQ(b,k,t.get(g.parentId)):w&&(b=$d(b,w,k));const C={...g,measured:k,internals:{...g.internals,positionAbsolute:b,handleBounds:{source:gU("source",y.nodeElement,M,u,g.id),target:gU("target",y.nodeElement,M,u,g.id)}}};t.set(g.id,C),g.parentId&&UF(C,t,n,{nodeOrigin:r,zIndexMode:i}),c=!0,x&&(l.push({id:g.id,type:"dimensions",dimensions:k}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:A0(C,r)}))}}if(p.length>0){const y=WF(p,t,n,r);l.push(...y)}return{changes:l,updatedInternals:c}}async function Vze({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,a]],o),s=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(s)}function _U(e,t,n,o,r,a){let i=r;const s=o.get(i)||new Map;o.set(i,s.set(n,t)),i=`${r}-${e}`;const c=o.get(i)||new Map;if(o.set(i,c.set(n,t)),a){i=`${r}-${e}-${a}`;const l=o.get(i)||new Map;o.set(i,l.set(n,t))}}function HQ(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:a,sourceHandle:i=null,targetHandle:s=null}=o,c={edgeId:o.id,source:r,target:a,sourceHandle:i,targetHandle:s},l=`${r}-${i}--${a}-${s}`,h=`${a}-${s}--${r}-${i}`;_U("source",c,h,e,r,i),_U("target",c,l,e,a,s),t.set(o.id,o)}}function OQ(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:OQ(n,t):!1}function CU(e,t,n){var r;let o=e;do{if((r=o==null?void 0:o.matches)!=null&&r.call(o,t))return!0;if(o===n)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function Bze(e,t,n,o){const r=new Map;for(const[a,i]of e)if((i.selected||i.id===o)&&(!i.parentId||!OQ(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const s=e.get(a);s&&r.set(a,{id:a,position:s.position||{x:0,y:0},distance:{x:n.x-s.internals.positionAbsolute.x,y:n.y-s.internals.positionAbsolute.y},extent:s.extent,parentId:s.parentId,origin:s.origin,expandParent:s.expandParent,internals:{positionAbsolute:s.internals.positionAbsolute||{x:0,y:0}},measured:{width:s.measured.width??0,height:s.measured.height??0}})}return r}function jT({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){var i,s,c;const r=[];for(const[l,h]of t){const u=(i=n.get(l))==null?void 0:i.internals.userNode;u&&r.push({...u,position:h.position,dragging:o})}if(!e)return[r[0],r];const a=(s=n.get(e))==null?void 0:s.internals.userNode;return[a?{...a,position:((c=t.get(e))==null?void 0:c.position)||a.position,dragging:o}:r[0],r]}function Uze({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const a={x:n-r.distance.x,y:o-r.distance.y},i=Lf(a,t);return{x:i.x-a.x,y:i.y-a.y}}function Wze({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let a={x:null,y:null},i=0,s=new Map,c=!1,l={x:0,y:0},h=null,u=!1,p=null,y=!1,g=!1,k=null;function x({noDragClassName:M,handleSelector:w,domNode:b,isSelectable:C,nodeId:_,nodeClickDistance:S=0}){p=ro(b);function E({x:z,y:U}){const{nodeLookup:A,nodeExtent:T,snapGrid:D,snapToGrid:O,nodeOrigin:I,onNodeDrag:R,onSelectionDrag:L,onError:q,updateNodePositions:H}=t();a={x:z,y:U};let $=!1;const X=s.size>1,G=X&&T?PH(Sf(s)):null,Q=X&&O?Uze({dragItems:s,snapGrid:D,x:z,y:U}):null;for(const[oe,re]of s){if(!A.has(oe))continue;let te={x:z-re.distance.x,y:U-re.distance.y};O&&(te=Q?{x:Math.round(te.x+Q.x),y:Math.round(te.y+Q.y)}:Lf(te,D));let ce=null;if(X&&T&&!re.extent&&G){const{positionAbsolute:xe}=re.internals,He=xe.x-G.x+T[0][0],Ze=xe.x+re.measured.width-G.x2+T[1][0],ue=xe.y-G.y+T[0][1],Ie=xe.y+re.measured.height-G.y2+T[1][1];ce=[[He,ue],[Ze,Ie]]}const{position:ke,positionAbsolute:ve}=CQ({nodeId:oe,nextPosition:te,nodeLookup:A,nodeExtent:ce||T,nodeOrigin:I,onError:q});$=$||re.position.x!==ke.x||re.position.y!==ke.y,re.position=ke,re.internals.positionAbsolute=ve}if(g=g||$,!!$&&(H(s,!0),k&&(o||R||!_&&L))){const[oe,re]=jT({nodeId:_,dragItems:s,nodeLookup:A});o==null||o(k,s,oe,re),R==null||R(k,oe,re),_||L==null||L(k,re)}}async function P(){if(!h)return;const{transform:z,panBy:U,autoPanSpeed:A,autoPanOnNodeDrag:T}=t();if(!T){c=!1,cancelAnimationFrame(i);return}const[D,O]=LQ(l,h,A);(D!==0||O!==0)&&(a.x=(a.x??0)-D/z[2],a.y=(a.y??0)-O/z[2],await U({x:D,y:O})&&E(a)),i=requestAnimationFrame(P)}function N(z){var X;const{nodeLookup:U,multiSelectionActive:A,nodesDraggable:T,transform:D,snapGrid:O,snapToGrid:I,selectNodesOnDrag:R,onNodeDragStart:L,onSelectionDragStart:q,unselectNodesAndEdges:H}=t();u=!0,(!R||!C)&&!A&&_&&((X=U.get(_))!=null&&X.selected||H()),C&&R&&_&&(e==null||e(_));const $=Lh(z.sourceEvent,{transform:D,snapGrid:O,snapToGrid:I,containerBounds:h});if(a=$,s=Bze(U,T,$,_),s.size>0&&(n||L||!_&&q)){const[G,Q]=jT({nodeId:_,dragItems:s,nodeLookup:U});n==null||n(z.sourceEvent,s,G,Q),L==null||L(z.sourceEvent,G,Q),_||q==null||q(z.sourceEvent,Q)}}const j=oQ().clickDistance(S).on("start",z=>{const{domNode:U,nodeDragThreshold:A,transform:T,snapGrid:D,snapToGrid:O}=t();h=(U==null?void 0:U.getBoundingClientRect())||null,y=!1,g=!1,k=z.sourceEvent,A===0&&N(z),a=Lh(z.sourceEvent,{transform:T,snapGrid:D,snapToGrid:O,containerBounds:h}),l=Qo(z.sourceEvent,h)}).on("drag",z=>{const{autoPanOnNodeDrag:U,transform:A,snapGrid:T,snapToGrid:D,nodeDragThreshold:O,nodeLookup:I}=t(),R=Lh(z.sourceEvent,{transform:A,snapGrid:T,snapToGrid:D,containerBounds:h});if(k=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!I.has(_))&&(y=!0),!y){if(!c&&U&&u&&(c=!0,P()),!u){const L=Qo(z.sourceEvent,h),q=L.x-l.x,H=L.y-l.y;Math.sqrt(q*q+H*H)>O&&N(z)}(a.x!==R.xSnapped||a.y!==R.ySnapped)&&s&&u&&(l=Qo(z.sourceEvent,h),E(R))}}).on("end",z=>{if(!(!u||y)&&(c=!1,u=!1,cancelAnimationFrame(i),s.size>0)){const{nodeLookup:U,updateNodePositions:A,onNodeDragStop:T,onSelectionDragStop:D}=t();if(g&&(A(s,!1),g=!1),r||T||!_&&D){const[O,I]=jT({nodeId:_,dragItems:s,nodeLookup:U,dragging:!1});r==null||r(z.sourceEvent,s,O,I),T==null||T(z.sourceEvent,O,I),_||D==null||D(z.sourceEvent,I)}}}).filter(z=>{const U=z.target;return!z.button&&(!M||!CU(U,`.${M}`,b))&&(!w||CU(U,w,b))});p.call(j)}function v(){p==null||p.on(".drag",null)}return{update:x,destroy:v}}function Gze(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())of(r,A0(a))>0&&o.push(a);return o}const Kze=250;function Xze(e,t,n,o){var s,c;let r=[],a=1/0;const i=Gze(e,n,t+Kze);for(const l of i){const h=[...((s=l.internals.handleBounds)==null?void 0:s.source)??[],...((c=l.internals.handleBounds)==null?void 0:c.target)??[]];for(const u of h){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:p,y}=Pd(l,u,u.position,!0),g=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(y-e.y,2));g>t||(g<a?(r=[{...u,x:p,y}],a=g):g===a&&r.push({...u,x:p,y}))}}if(!r.length)return null;if(r.length>1){const l=o.type==="source"?"target":"source";return r.find(h=>h.type===l)??r[0]}return r[0]}function FQ(e,t,n,o,r,a=!1){var l,h,u;const i=o.get(e);if(!i)return null;const s=r==="strict"?(l=i.internals.handleBounds)==null?void 0:l[t]:[...((h=i.internals.handleBounds)==null?void 0:h.source)??[],...((u=i.internals.handleBounds)==null?void 0:u.target)??[]],c=(n?s==null?void 0:s.find(p=>p.id===n):s==null?void 0:s[0])??null;return c&&a?{...c,...Pd(i,c,c.position,!0)}:c}function qQ(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Zze(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const VQ=()=>!0;function Yze(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:a,isTarget:i,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:h,flowId:u,panBy:p,cancelConnection:y,onConnectStart:g,onConnect:k,onConnectEnd:x,isValidConnection:v=VQ,onReconnectEnd:M,updateConnection:w,getTransform:b,getFromHandle:C,autoPanSpeed:_,dragThreshold:S=1,handleDomNode:E}){const P=EQ(e.target);let N=0,j;const{x:z,y:U}=Qo(e),A=qQ(a,E),T=s==null?void 0:s.getBoundingClientRect();let D=!1;if(!T||!A)return;const O=FQ(r,A,o,c,t);if(!O)return;let I=Qo(e,T),R=!1,L=null,q=!1,H=null;function $(){if(!h||!T)return;const[ke,ve]=LQ(I,T,_);p({x:ke,y:ve}),N=requestAnimationFrame($)}const X={...O,nodeId:r,type:A,position:O.position},G=c.get(r);let oe={inProgress:!0,isValid:null,from:Pd(G,X,fe.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:G,to:I,toHandle:null,toPosition:fU[X.position],toNode:null,pointer:I};function re(){D=!0,w(oe),g==null||g(e,{nodeId:r,handleId:o,handleType:A})}S===0&&re();function te(ke){if(!D){const{x:Ie,y:zt}=Qo(ke),pt=Ie-z,tn=zt-U;if(!(pt*pt+tn*tn>S*S))return;re()}if(!C()||!X){ce(ke);return}const ve=b();I=Qo(ke,T),j=Xze(Nf(I,ve,!1,[1,1]),n,c,X),R||($(),R=!0);const xe=BQ(ke,{handle:j,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:i?"target":"source",isValidConnection:v,doc:P,lib:l,flowId:u,nodeLookup:c});H=xe.handleDomNode,L=xe.connection,q=Zze(!!j,xe.isValid);const He=c.get(r),Ze=He?Pd(He,X,fe.Left,!0):oe.from,ue={...oe,from:Ze,isValid:q,to:xe.toHandle&&q?YP({x:xe.toHandle.x,y:xe.toHandle.y},ve):I,toHandle:xe.toHandle,toPosition:q&&xe.toHandle?xe.toHandle.position:fU[X.position],toNode:xe.toHandle?c.get(xe.toHandle.nodeId):null,pointer:I};w(ue),oe=ue}function ce(ke){if(!("touches"in ke&&ke.touches.length>0)){if(D){(j||H)&&L&&q&&(k==null||k(L));const{inProgress:ve,...xe}=oe,He={...xe,toPosition:oe.toHandle?oe.toPosition:null};x==null||x(ke,He),a&&(M==null||M(ke,He))}y(),cancelAnimationFrame(N),R=!1,q=!1,L=null,H=null,P.removeEventListener("mousemove",te),P.removeEventListener("mouseup",ce),P.removeEventListener("touchmove",te),P.removeEventListener("touchend",ce)}}P.addEventListener("mousemove",te),P.addEventListener("mouseup",ce),P.addEventListener("touchmove",te),P.addEventListener("touchend",ce)}function BQ(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:a,doc:i,lib:s,flowId:c,isValidConnection:l=VQ,nodeLookup:h}){const u=a==="target",p=t?i.querySelector(`.${s}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:y,y:g}=Qo(e),k=i.elementFromPoint(y,g),x=k!=null&&k.classList.contains(`${s}-flow__handle`)?k:p,v={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const M=qQ(void 0,x),w=x.getAttribute("data-nodeid"),b=x.getAttribute("data-handleid"),C=x.classList.contains("connectable"),_=x.classList.contains("connectableend");if(!w||!M)return v;const S={source:u?w:o,sourceHandle:u?b:r,target:u?o:w,targetHandle:u?r:b};v.connection=S;const P=C&&_&&(n===L0.Strict?u&&M==="source"||!u&&M==="target":w!==o||b!==r);v.isValid=P&&l(S),v.toHandle=FQ(w,M,b,h,n,!0)}return v}const TH={onPointerDown:Yze,isValid:BQ};function Qze({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=ro(e);function a({translateExtent:s,width:c,height:l,zoomStep:h=1,pannable:u=!0,zoomable:p=!0,inversePan:y=!1}){const g=w=>{if(w.sourceEvent.type!=="wheel"||!t)return;const b=n(),C=w.sourceEvent.ctrlKey&&rf()?10:1,_=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*h,S=b[2]*Math.pow(2,_*C);t.scaleTo(S)};let k=[0,0];const x=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(k=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},v=w=>{const b=n();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!t)return;const C=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],_=[C[0]-k[0],C[1]-k[1]];k=C;const S=o()*Math.max(b[2],Math.log(b[2]))*(y?-1:1),E={x:b[0]-_[0]*S,y:b[1]-_[1]*S},P=[[0,0],[c,l]];t.setViewportConstrained({x:E.x,y:E.y,zoom:b[2]},P,s)},M=vQ().on("start",x).on("zoom",u?v:null).on("zoom.wheel",p?g:null);r.call(M,{})}function i(){r.on("zoom",null)}return{update:a,destroy:i,pointer:Go}}const rR=e=>({x:e.x,y:e.y,zoom:e.k}),$T=({x:e,y:t,zoom:n})=>eR.translate(e,t).scale(n),Xu=(e,t)=>e.target.closest(`.${t}`),UQ=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Jze=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,PT=(e,t=0,n=Jze,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},WQ=e=>{const t=e.ctrlKey&&rf()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function eRe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:a,zoomOnPinch:i,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return h=>{if(Xu(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const u=n.property("__zoom").k||1;if(h.ctrlKey&&i){const x=Go(h),v=WQ(h),M=u*Math.pow(2,v);o.scaleTo(n,M,x,h);return}const p=h.deltaMode===1?20:1;let y=r===Cd.Vertical?0:h.deltaX*p,g=r===Cd.Horizontal?0:h.deltaY*p;!rf()&&h.shiftKey&&r!==Cd.Vertical&&(y=h.deltaY*p,g=0),o.translateBy(n,-(y/u)*a,-(g/u)*a,{internal:!0});const k=rR(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{l==null||l(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s==null||s(h,k))}}function tRe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const a=o.type==="wheel",i=!t&&a&&!o.ctrlKey,s=Xu(o,e);if(o.ctrlKey&&a&&s&&o.preventDefault(),i||s)return null;o.preventDefault(),n.call(this,o,r)}}function nRe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{var a,i,s;if((a=o.sourceEvent)!=null&&a.internal)return;const r=rR(o.transform);e.mouseButton=((i=o.sourceEvent)==null?void 0:i.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=r,((s=o.sourceEvent)==null?void 0:s.type)==="mousedown"&&t(!0),n&&(n==null||n(o.sourceEvent,r))}}function oRe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return a=>{var i,s;e.usedRightMouseButton=!!(n&&UQ(t,e.mouseButton??0)),(i=a.sourceEvent)!=null&&i.sync||o([a.transform.x,a.transform.y,a.transform.k]),r&&!((s=a.sourceEvent)!=null&&s.internal)&&(r==null||r(a.sourceEvent,rR(a.transform)))}}function rRe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:a}){return i=>{var s;if(!((s=i.sourceEvent)!=null&&s.internal)&&(e.isZoomingOrPanning=!1,a&&UQ(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&a(i.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const c=rR(i.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(i.sourceEvent,c)},n?150:0)}}}function aRe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:a,userSelectionActive:i,noWheelClassName:s,noPanClassName:c,lib:l,connectionInProgress:h}){return u=>{var x;const p=e||t,y=n&&u.ctrlKey,g=u.type==="wheel";if(u.button===1&&u.type==="mousedown"&&(Xu(u,`${l}-flow__node`)||Xu(u,`${l}-flow__edge`)))return!0;if(!o&&!p&&!r&&!a&&!n||i||h&&!g||Xu(u,s)&&g||Xu(u,c)&&(!g||r&&g&&!e)||!n&&u.ctrlKey&&g)return!1;if(!n&&u.type==="touchstart"&&((x=u.touches)==null?void 0:x.length)>1)return u.preventDefault(),!1;if(!p&&!r&&!y&&g||!o&&(u.type==="mousedown"||u.type==="touchstart")||Array.isArray(o)&&!o.includes(u.button)&&u.type==="mousedown")return!1;const k=Array.isArray(o)&&o.includes(u.button)||!u.button||u.button<=1;return(!u.ctrlKey||g)&&k}}function iRe({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:a,onPanZoomStart:i,onPanZoomEnd:s,onDraggingChange:c}){const l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),u=vQ().scaleExtent([t,n]).translateExtent(o),p=ro(e).call(u);M({x:r.x,y:r.y,zoom:I0(r.zoom,t,n)},[[0,0],[h.width,h.height]],o);const y=p.on("wheel.zoom"),g=p.on("dblclick.zoom");u.wheelDelta(WQ);function k(j,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Sh:rP).transform(PT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),j)}):Promise.resolve(!1)}function x({noWheelClassName:j,noPanClassName:z,onPaneContextMenu:U,userSelectionActive:A,panOnScroll:T,panOnDrag:D,panOnScrollMode:O,panOnScrollSpeed:I,preventScrolling:R,zoomOnPinch:L,zoomOnScroll:q,zoomOnDoubleClick:H,zoomActivationKeyPressed:$,lib:X,onTransformChange:G,connectionInProgress:Q,paneClickDistance:oe,selectionOnDrag:re}){A&&!l.isZoomingOrPanning&&v();const te=T&&!$&&!A;u.clickDistance(re?1/0:!Yo(oe)||oe<0?0:oe);const ce=te?eRe({zoomPanValues:l,noWheelClassName:j,d3Selection:p,d3Zoom:u,panOnScrollMode:O,panOnScrollSpeed:I,zoomOnPinch:L,onPanZoomStart:i,onPanZoom:a,onPanZoomEnd:s}):tRe({noWheelClassName:j,preventScrolling:R,d3ZoomHandler:y});if(p.on("wheel.zoom",ce,{passive:!1}),!A){const ve=nRe({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:i});u.on("start",ve);const xe=oRe({zoomPanValues:l,panOnDrag:D,onPaneContextMenu:!!U,onPanZoom:a,onTransformChange:G});u.on("zoom",xe);const He=rRe({zoomPanValues:l,panOnDrag:D,panOnScroll:T,onPaneContextMenu:U,onPanZoomEnd:s,onDraggingChange:c});u.on("end",He)}const ke=aRe({zoomActivationKeyPressed:$,panOnDrag:D,zoomOnScroll:q,panOnScroll:T,zoomOnDoubleClick:H,zoomOnPinch:L,userSelectionActive:A,noPanClassName:z,noWheelClassName:j,lib:X,connectionInProgress:Q});u.filter(ke),H?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)}function v(){u.on("zoom",null)}async function M(j,z,U){const A=$T(j),T=u==null?void 0:u.constrain()(A,z,U);return T&&await k(T),new Promise(D=>D(T))}async function w(j,z){const U=$T(j);return await k(U,z),new Promise(A=>A(U))}function b(j){if(p){const z=$T(j),U=p.property("__zoom");(U.k!==j.zoom||U.x!==j.x||U.y!==j.y)&&(u==null||u.transform(p,z,null,{sync:!0}))}}function C(){const j=p?kQ(p.node()):{x:0,y:0,k:1};return{x:j.x,y:j.y,zoom:j.k}}function _(j,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Sh:rP).scaleTo(PT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),j)}):Promise.resolve(!1)}function S(j,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Sh:rP).scaleBy(PT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),j)}):Promise.resolve(!1)}function E(j){u==null||u.scaleExtent(j)}function P(j){u==null||u.translateExtent(j)}function N(j){const z=!Yo(j)||j<0?0:j;u==null||u.clickDistance(z)}return{update:x,destroy:v,setViewport:w,setViewportConstrained:M,getViewport:C,scaleTo:_,scaleBy:S,setScaleExtent:E,setTranslateExtent:P,syncViewport:b,setClickDistance:N}}var Ti;(function(e){e.Line="line",e.Handle="handle"})(Ti||(Ti={}));function sRe({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:a}){const i=e-t,s=n-o,c=[i>0?1:i<0?-1:0,s>0?1:s<0?-1:0];return i&&r&&(c[0]=c[0]*-1),s&&a&&(c[1]=c[1]*-1),c}function SU(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function ti(e,t){return Math.max(0,t-e)}function ni(e,t){return Math.max(0,e-t)}function _p(e,t,n){return Math.max(0,t-e,e-n)}function LU(e,t){return e?!t:t}function cRe(e,t,n,o,r,a,i,s){let{affectsX:c,affectsY:l}=t;const{isHorizontal:h,isVertical:u}=t,p=h&&u,{xSnapped:y,ySnapped:g}=n,{minWidth:k,maxWidth:x,minHeight:v,maxHeight:M}=o,{x:w,y:b,width:C,height:_,aspectRatio:S}=e;let E=Math.floor(h?y-e.pointerX:0),P=Math.floor(u?g-e.pointerY:0);const N=C+(c?-E:E),j=_+(l?-P:P),z=-a[0]*C,U=-a[1]*_;let A=_p(N,k,x),T=_p(j,v,M);if(i){let I=0,R=0;c&&E<0?I=ti(w+E+z,i[0][0]):!c&&E>0&&(I=ni(w+N+z,i[1][0])),l&&P<0?R=ti(b+P+U,i[0][1]):!l&&P>0&&(R=ni(b+j+U,i[1][1])),A=Math.max(A,I),T=Math.max(T,R)}if(s){let I=0,R=0;c&&E>0?I=ni(w+E,s[0][0]):!c&&E<0&&(I=ti(w+N,s[1][0])),l&&P>0?R=ni(b+P,s[0][1]):!l&&P<0&&(R=ti(b+j,s[1][1])),A=Math.max(A,I),T=Math.max(T,R)}if(r){if(h){const I=_p(N/S,v,M)*S;if(A=Math.max(A,I),i){let R=0;!c&&!l||c&&!l&&p?R=ni(b+U+N/S,i[1][1])*S:R=ti(b+U+(c?E:-E)/S,i[0][1])*S,A=Math.max(A,R)}if(s){let R=0;!c&&!l||c&&!l&&p?R=ti(b+N/S,s[1][1])*S:R=ni(b+(c?E:-E)/S,s[0][1])*S,A=Math.max(A,R)}}if(u){const I=_p(j*S,k,x)/S;if(T=Math.max(T,I),i){let R=0;!c&&!l||l&&!c&&p?R=ni(w+j*S+z,i[1][0])/S:R=ti(w+(l?P:-P)*S+z,i[0][0])/S,T=Math.max(T,R)}if(s){let R=0;!c&&!l||l&&!c&&p?R=ti(w+j*S,s[1][0])/S:R=ni(w+(l?P:-P)*S,s[0][0])/S,T=Math.max(T,R)}}}P=P+(P<0?T:-T),E=E+(E<0?A:-A),r&&(p?N>j*S?P=(LU(c,l)?-E:E)/S:E=(LU(c,l)?-P:P)*S:h?(P=E/S,l=c):(E=P*S,c=l));const D=c?w+E:w,O=l?b+P:b;return{width:C+(c?-E:E),height:_+(l?-P:P),x:a[0]*E*(c?-1:1)+D,y:a[1]*P*(l?-1:1)+O}}const GQ={width:0,height:0,x:0,y:0},lRe={...GQ,pointerX:0,pointerY:0,aspectRatio:1};function dRe(e){return[[0,0],[e.measured.width,e.measured.height]]}function uRe(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,a=e.measured.width??0,i=e.measured.height??0,s=n[0]*a,c=n[1]*i;return[[o-s,r-c],[o+a-s,r+i-c]]}function hRe({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const a=ro(e);let i={controlDirection:SU("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:l,boundaries:h,keepAspectRatio:u,resizeDirection:p,onResizeStart:y,onResize:g,onResizeEnd:k,shouldResize:x}){let v={...GQ},M={...lRe};i={boundaries:h,resizeDirection:p,keepAspectRatio:u,controlDirection:SU(l)};let w,b=null,C=[],_,S,E,P=!1;const N=oQ().on("start",j=>{const{nodeLookup:z,transform:U,snapGrid:A,snapToGrid:T,nodeOrigin:D,paneDomNode:O}=n();if(w=z.get(t),!w)return;b=(O==null?void 0:O.getBoundingClientRect())??null;const{xSnapped:I,ySnapped:R}=Lh(j.sourceEvent,{transform:U,snapGrid:A,snapToGrid:T,containerBounds:b});v={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},M={...v,pointerX:I,pointerY:R,aspectRatio:v.width/v.height},_=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(_=z.get(w.parentId),S=_&&w.extent==="parent"?dRe(_):void 0),C=[],E=void 0;for(const[L,q]of z)if(q.parentId===t&&(C.push({id:L,position:{...q.position},extent:q.extent}),q.extent==="parent"||q.expandParent)){const H=uRe(q,w,q.origin??D);E?E=[[Math.min(H[0][0],E[0][0]),Math.min(H[0][1],E[0][1])],[Math.max(H[1][0],E[1][0]),Math.max(H[1][1],E[1][1])]]:E=H}y==null||y(j,{...v})}).on("drag",j=>{const{transform:z,snapGrid:U,snapToGrid:A,nodeOrigin:T}=n(),D=Lh(j.sourceEvent,{transform:z,snapGrid:U,snapToGrid:A,containerBounds:b}),O=[];if(!w)return;const{x:I,y:R,width:L,height:q}=v,H={},$=w.origin??T,{width:X,height:G,x:Q,y:oe}=cRe(M,i.controlDirection,D,i.boundaries,i.keepAspectRatio,$,S,E),re=X!==L,te=G!==q,ce=Q!==I&&re,ke=oe!==R&&te;if(!ce&&!ke&&!re&&!te)return;if((ce||ke||$[0]===1||$[1]===1)&&(H.x=ce?Q:v.x,H.y=ke?oe:v.y,v.x=H.x,v.y=H.y,C.length>0)){const Ze=Q-I,ue=oe-R;for(const Ie of C)Ie.position={x:Ie.position.x-Ze+$[0]*(X-L),y:Ie.position.y-ue+$[1]*(G-q)},O.push(Ie)}if((re||te)&&(H.width=re&&(!i.resizeDirection||i.resizeDirection==="horizontal")?X:v.width,H.height=te&&(!i.resizeDirection||i.resizeDirection==="vertical")?G:v.height,v.width=H.width,v.height=H.height),_&&w.expandParent){const Ze=$[0]*(H.width??0);H.x&&H.x<Ze&&(v.x=Ze,M.x=M.x-(H.x-Ze));const ue=$[1]*(H.height??0);H.y&&H.y<ue&&(v.y=ue,M.y=M.y-(H.y-ue))}const ve=sRe({width:v.width,prevWidth:L,height:v.height,prevHeight:q,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),xe={...v,direction:ve};(x==null?void 0:x(j,xe))!==!1&&(P=!0,g==null||g(j,xe),o(H,O))}).on("end",j=>{P&&(k==null||k(j,{...v}),r==null||r({...v}),P=!1)});a.call(N)}function c(){a.on(".drag",null)}return{update:s,destroy:c}}var KQ={exports:{}},XQ={},ZQ={exports:{}},YQ={};/**
8446
+ */const SAe=Object.freeze(Object.defineProperty({__proto__:null,AArrowDown:dy,AArrowDownIcon:dy,AArrowUp:uy,AArrowUpIcon:uy,ALargeSmall:hy,ALargeSmallIcon:hy,Accessibility:fy,AccessibilityIcon:fy,Activity:py,ActivityIcon:py,ActivitySquare:Zl,ActivitySquareIcon:Zl,AirVent:yy,AirVentIcon:yy,Airplay:my,AirplayIcon:my,AlarmCheck:ys,AlarmCheckIcon:ys,AlarmClock:ky,AlarmClockCheck:ys,AlarmClockCheckIcon:ys,AlarmClockIcon:ky,AlarmClockMinus:ms,AlarmClockMinusIcon:ms,AlarmClockOff:gy,AlarmClockOffIcon:gy,AlarmClockPlus:gs,AlarmClockPlusIcon:gs,AlarmMinus:ms,AlarmMinusIcon:ms,AlarmPlus:gs,AlarmPlusIcon:gs,AlarmSmoke:vy,AlarmSmokeIcon:vy,Album:xy,AlbumIcon:xy,AlertCircle:ci,AlertCircleIcon:ci,AlertOctagon:Cl,AlertOctagonIcon:Cl,AlertTriangle:Pr,AlertTriangleIcon:Pr,AlignCenter:ui,AlignCenterHorizontal:My,AlignCenterHorizontalIcon:My,AlignCenterIcon:ui,AlignCenterVertical:wy,AlignCenterVerticalIcon:wy,AlignEndHorizontal:by,AlignEndHorizontalIcon:by,AlignEndVertical:_y,AlignEndVerticalIcon:_y,AlignHorizontalDistributeCenter:Cy,AlignHorizontalDistributeCenterIcon:Cy,AlignHorizontalDistributeEnd:Sy,AlignHorizontalDistributeEndIcon:Sy,AlignHorizontalDistributeStart:Ly,AlignHorizontalDistributeStartIcon:Ly,AlignHorizontalJustifyCenter:Ny,AlignHorizontalJustifyCenterIcon:Ny,AlignHorizontalJustifyEnd:Ay,AlignHorizontalJustifyEndIcon:Ay,AlignHorizontalJustifyStart:Iy,AlignHorizontalJustifyStartIcon:Iy,AlignHorizontalSpaceAround:Ey,AlignHorizontalSpaceAroundIcon:Ey,AlignHorizontalSpaceBetween:jy,AlignHorizontalSpaceBetweenIcon:jy,AlignJustify:X1,AlignJustifyIcon:X1,AlignLeft:Vo,AlignLeftIcon:Vo,AlignRight:hi,AlignRightIcon:hi,AlignStartHorizontal:$y,AlignStartHorizontalIcon:$y,AlignStartVertical:Py,AlignStartVerticalIcon:Py,AlignVerticalDistributeCenter:zy,AlignVerticalDistributeCenterIcon:zy,AlignVerticalDistributeEnd:Ry,AlignVerticalDistributeEndIcon:Ry,AlignVerticalDistributeStart:Ty,AlignVerticalDistributeStartIcon:Ty,AlignVerticalJustifyCenter:Dy,AlignVerticalJustifyCenterIcon:Dy,AlignVerticalJustifyEnd:Hy,AlignVerticalJustifyEndIcon:Hy,AlignVerticalJustifyStart:Oy,AlignVerticalJustifyStartIcon:Oy,AlignVerticalSpaceAround:Fy,AlignVerticalSpaceAroundIcon:Fy,AlignVerticalSpaceBetween:qy,AlignVerticalSpaceBetweenIcon:qy,Ambulance:Vy,AmbulanceIcon:Vy,Ampersand:By,AmpersandIcon:By,Ampersands:Uy,AmpersandsIcon:Uy,Amphora:Wy,AmphoraIcon:Wy,Anchor:Gy,AnchorIcon:Gy,Angry:Ky,AngryIcon:Ky,Annoyed:Xy,AnnoyedIcon:Xy,Antenna:Zy,AntennaIcon:Zy,Anvil:Yy,AnvilIcon:Yy,Aperture:Qy,ApertureIcon:Qy,AppWindow:em,AppWindowIcon:em,AppWindowMac:Jy,AppWindowMacIcon:Jy,Apple:tm,AppleIcon:tm,Archive:rm,ArchiveIcon:rm,ArchiveRestore:nm,ArchiveRestoreIcon:nm,ArchiveX:om,ArchiveXIcon:om,AreaChart:js,AreaChartIcon:js,Armchair:am,ArmchairIcon:am,ArrowBigDown:sm,ArrowBigDownDash:im,ArrowBigDownDashIcon:im,ArrowBigDownIcon:sm,ArrowBigLeft:lm,ArrowBigLeftDash:cm,ArrowBigLeftDashIcon:cm,ArrowBigLeftIcon:lm,ArrowBigRight:um,ArrowBigRightDash:dm,ArrowBigRightDashIcon:dm,ArrowBigRightIcon:um,ArrowBigUp:fm,ArrowBigUpDash:hm,ArrowBigUpDashIcon:hm,ArrowBigUpIcon:fm,ArrowDown:bm,ArrowDown01:pm,ArrowDown01Icon:pm,ArrowDown10:ym,ArrowDown10Icon:ym,ArrowDownAZ:ks,ArrowDownAZIcon:ks,ArrowDownAz:ks,ArrowDownAzIcon:ks,ArrowDownCircle:Ws,ArrowDownCircleIcon:Ws,ArrowDownFromLine:mm,ArrowDownFromLineIcon:mm,ArrowDownIcon:bm,ArrowDownLeft:km,ArrowDownLeftFromCircle:Gs,ArrowDownLeftFromCircleIcon:Gs,ArrowDownLeftFromSquare:t1,ArrowDownLeftFromSquareIcon:t1,ArrowDownLeftIcon:km,ArrowDownLeftSquare:Yl,ArrowDownLeftSquareIcon:Yl,ArrowDownNarrowWide:gm,ArrowDownNarrowWideIcon:gm,ArrowDownRight:xm,ArrowDownRightFromCircle:Xs,ArrowDownRightFromCircleIcon:Xs,ArrowDownRightFromSquare:n1,ArrowDownRightFromSquareIcon:n1,ArrowDownRightIcon:xm,ArrowDownRightSquare:Ql,ArrowDownRightSquareIcon:Ql,ArrowDownSquare:Jl,ArrowDownSquareIcon:Jl,ArrowDownToDot:vm,ArrowDownToDotIcon:vm,ArrowDownToLine:wm,ArrowDownToLineIcon:wm,ArrowDownUp:Mm,ArrowDownUpIcon:Mm,ArrowDownWideNarrow:vs,ArrowDownWideNarrowIcon:vs,ArrowDownZA:xs,ArrowDownZAIcon:xs,ArrowDownZa:xs,ArrowDownZaIcon:xs,ArrowLeft:Sm,ArrowLeftCircle:Ks,ArrowLeftCircleIcon:Ks,ArrowLeftFromLine:_m,ArrowLeftFromLineIcon:_m,ArrowLeftIcon:Sm,ArrowLeftRight:X2,ArrowLeftRightIcon:X2,ArrowLeftSquare:e1,ArrowLeftSquareIcon:e1,ArrowLeftToLine:Cm,ArrowLeftToLineIcon:Cm,ArrowRight:a0,ArrowRightCircle:Qs,ArrowRightCircleIcon:Qs,ArrowRightFromLine:Lm,ArrowRightFromLineIcon:Lm,ArrowRightIcon:a0,ArrowRightLeft:Nm,ArrowRightLeftIcon:Nm,ArrowRightSquare:a1,ArrowRightSquareIcon:a1,ArrowRightToLine:Im,ArrowRightToLineIcon:Im,ArrowUp:Hm,ArrowUp01:Am,ArrowUp01Icon:Am,ArrowUp10:Em,ArrowUp10Icon:Em,ArrowUpAZ:ws,ArrowUpAZIcon:ws,ArrowUpAz:ws,ArrowUpAzIcon:ws,ArrowUpCircle:Js,ArrowUpCircleIcon:Js,ArrowUpDown:jm,ArrowUpDownIcon:jm,ArrowUpFromDot:$m,ArrowUpFromDotIcon:$m,ArrowUpFromLine:Pm,ArrowUpFromLineIcon:Pm,ArrowUpIcon:Hm,ArrowUpLeft:zm,ArrowUpLeftFromCircle:Zs,ArrowUpLeftFromCircleIcon:Zs,ArrowUpLeftFromSquare:o1,ArrowUpLeftFromSquareIcon:o1,ArrowUpLeftIcon:zm,ArrowUpLeftSquare:i1,ArrowUpLeftSquareIcon:i1,ArrowUpNarrowWide:Ms,ArrowUpNarrowWideIcon:Ms,ArrowUpRight:Tm,ArrowUpRightFromCircle:Ys,ArrowUpRightFromCircleIcon:Ys,ArrowUpRightFromSquare:r1,ArrowUpRightFromSquareIcon:r1,ArrowUpRightIcon:Tm,ArrowUpRightSquare:l1,ArrowUpRightSquareIcon:l1,ArrowUpSquare:s1,ArrowUpSquareIcon:s1,ArrowUpToLine:Rm,ArrowUpToLineIcon:Rm,ArrowUpWideNarrow:Dm,ArrowUpWideNarrowIcon:Dm,ArrowUpZA:bs,ArrowUpZAIcon:bs,ArrowUpZa:bs,ArrowUpZaIcon:bs,ArrowsUpFromLine:Om,ArrowsUpFromLineIcon:Om,Asterisk:Fm,AsteriskIcon:Fm,AsteriskSquare:c1,AsteriskSquareIcon:c1,AtSign:qm,AtSignIcon:qm,Atom:Vm,AtomIcon:Vm,AudioLines:Bm,AudioLinesIcon:Bm,AudioWaveform:Wm,AudioWaveformIcon:Wm,Award:Um,AwardIcon:Um,Axe:Gm,AxeIcon:Gm,Axis3D:_s,Axis3DIcon:_s,Axis3d:_s,Axis3dIcon:_s,Baby:Km,BabyIcon:Km,Backpack:Xm,BackpackIcon:Xm,Badge:ug,BadgeAlert:Ym,BadgeAlertIcon:Ym,BadgeCent:Zm,BadgeCentIcon:Zm,BadgeCheck:Cs,BadgeCheckIcon:Cs,BadgeDollarSign:Qm,BadgeDollarSignIcon:Qm,BadgeEuro:eg,BadgeEuroIcon:eg,BadgeHelp:Ss,BadgeHelpIcon:Ss,BadgeIcon:ug,BadgeIndianRupee:Jm,BadgeIndianRupeeIcon:Jm,BadgeInfo:tg,BadgeInfoIcon:tg,BadgeJapaneseYen:ng,BadgeJapaneseYenIcon:ng,BadgeMinus:og,BadgeMinusIcon:og,BadgePercent:rg,BadgePercentIcon:rg,BadgePlus:ag,BadgePlusIcon:ag,BadgePoundSterling:ig,BadgePoundSterlingIcon:ig,BadgeQuestionMark:Ss,BadgeQuestionMarkIcon:Ss,BadgeRussianRuble:sg,BadgeRussianRubleIcon:sg,BadgeSwissFranc:cg,BadgeSwissFrancIcon:cg,BadgeTurkishLira:lg,BadgeTurkishLiraIcon:lg,BadgeX:dg,BadgeXIcon:dg,BaggageClaim:hg,BaggageClaimIcon:hg,Balloon:fg,BalloonIcon:fg,Ban:Z2,BanIcon:Z2,Banana:pg,BananaIcon:pg,Bandage:yg,BandageIcon:yg,Banknote:vg,BanknoteArrowDown:mg,BanknoteArrowDownIcon:mg,BanknoteArrowUp:gg,BanknoteArrowUpIcon:gg,BanknoteIcon:vg,BanknoteX:kg,BanknoteXIcon:kg,BarChart:Os,BarChart2:Fs,BarChart2Icon:Fs,BarChart3:Ds,BarChart3Icon:Ds,BarChart4:Ts,BarChart4Icon:Ts,BarChartBig:Rs,BarChartBigIcon:Rs,BarChartHorizontal:Ps,BarChartHorizontalBig:$s,BarChartHorizontalBigIcon:$s,BarChartHorizontalIcon:Ps,BarChartIcon:Os,Barcode:xg,BarcodeIcon:xg,Barrel:wg,BarrelIcon:wg,Baseline:Mg,BaselineIcon:Mg,Bath:bg,BathIcon:bg,Battery:Ag,BatteryCharging:_g,BatteryChargingIcon:_g,BatteryFull:Cg,BatteryFullIcon:Cg,BatteryIcon:Ag,BatteryLow:Sg,BatteryLowIcon:Sg,BatteryMedium:Lg,BatteryMediumIcon:Lg,BatteryPlus:Ng,BatteryPlusIcon:Ng,BatteryWarning:Ig,BatteryWarningIcon:Ig,Beaker:Eg,BeakerIcon:Eg,Bean:$g,BeanIcon:$g,BeanOff:jg,BeanOffIcon:jg,Bed:Rg,BedDouble:Pg,BedDoubleIcon:Pg,BedIcon:Rg,BedSingle:zg,BedSingleIcon:zg,Beef:Tg,BeefIcon:Tg,Beer:Hg,BeerIcon:Hg,BeerOff:Dg,BeerOffIcon:Dg,Bell:Wg,BellDot:Og,BellDotIcon:Og,BellElectric:Fg,BellElectricIcon:Fg,BellIcon:Wg,BellMinus:qg,BellMinusIcon:qg,BellOff:Vg,BellOffIcon:Vg,BellPlus:Bg,BellPlusIcon:Bg,BellRing:Ug,BellRingIcon:Ug,BetweenHorizonalEnd:Ls,BetweenHorizonalEndIcon:Ls,BetweenHorizonalStart:Ns,BetweenHorizonalStartIcon:Ns,BetweenHorizontalEnd:Ls,BetweenHorizontalEndIcon:Ls,BetweenHorizontalStart:Ns,BetweenHorizontalStartIcon:Ns,BetweenVerticalEnd:Gg,BetweenVerticalEndIcon:Gg,BetweenVerticalStart:Kg,BetweenVerticalStartIcon:Kg,BicepsFlexed:Xg,BicepsFlexedIcon:Xg,Bike:Zg,BikeIcon:Zg,Binary:Yg,BinaryIcon:Yg,Binoculars:Qg,BinocularsIcon:Qg,Biohazard:Jg,BiohazardIcon:Jg,Bird:ek,BirdIcon:ek,Birdhouse:tk,BirdhouseIcon:tk,Bitcoin:nk,BitcoinIcon:nk,Blend:ok,BlendIcon:ok,Blinds:rk,BlindsIcon:rk,Blocks:ak,BlocksIcon:ak,Bluetooth:lk,BluetoothConnected:ik,BluetoothConnectedIcon:ik,BluetoothIcon:lk,BluetoothOff:sk,BluetoothOffIcon:sk,BluetoothSearching:ck,BluetoothSearchingIcon:ck,Bold:dk,BoldIcon:dk,Bolt:uk,BoltIcon:uk,Bomb:hk,BombIcon:hk,Bone:fk,BoneIcon:fk,Book:Dk,BookA:pk,BookAIcon:pk,BookAlert:yk,BookAlertIcon:yk,BookAudio:mk,BookAudioIcon:mk,BookCheck:gk,BookCheckIcon:gk,BookCopy:kk,BookCopyIcon:kk,BookDashed:Is,BookDashedIcon:Is,BookDown:vk,BookDownIcon:vk,BookHeadphones:xk,BookHeadphonesIcon:xk,BookHeart:wk,BookHeartIcon:wk,BookIcon:Dk,BookImage:Mk,BookImageIcon:Mk,BookKey:bk,BookKeyIcon:bk,BookLock:_k,BookLockIcon:_k,BookMarked:Ck,BookMarkedIcon:Ck,BookMinus:Sk,BookMinusIcon:Sk,BookOpen:Ik,BookOpenCheck:Lk,BookOpenCheckIcon:Lk,BookOpenIcon:Ik,BookOpenText:Nk,BookOpenTextIcon:Nk,BookPlus:Ak,BookPlusIcon:Ak,BookSearch:Ek,BookSearchIcon:Ek,BookTemplate:Is,BookTemplateIcon:Is,BookText:jk,BookTextIcon:jk,BookType:$k,BookTypeIcon:$k,BookUp:zk,BookUp2:Pk,BookUp2Icon:Pk,BookUpIcon:zk,BookUser:Rk,BookUserIcon:Rk,BookX:Tk,BookXIcon:Tk,Bookmark:Vk,BookmarkCheck:Hk,BookmarkCheckIcon:Hk,BookmarkIcon:Vk,BookmarkMinus:Ok,BookmarkMinusIcon:Ok,BookmarkPlus:Fk,BookmarkPlusIcon:Fk,BookmarkX:qk,BookmarkXIcon:qk,BoomBox:Bk,BoomBoxIcon:Bk,Bot:Wk,BotIcon:Wk,BotMessageSquare:Uk,BotMessageSquareIcon:Uk,BotOff:Gk,BotOffIcon:Gk,BottleWine:Kk,BottleWineIcon:Kk,BowArrow:Xk,BowArrowIcon:Xk,Box:Zk,BoxIcon:Zk,BoxSelect:x1,BoxSelectIcon:x1,Boxes:Yk,BoxesIcon:Yk,Braces:As,BracesIcon:As,Brackets:Qk,BracketsIcon:Qk,Brain:t4,BrainCircuit:Jk,BrainCircuitIcon:Jk,BrainCog:e4,BrainCogIcon:e4,BrainIcon:t4,BrickWall:r4,BrickWallFire:n4,BrickWallFireIcon:n4,BrickWallIcon:r4,BrickWallShield:o4,BrickWallShieldIcon:o4,Briefcase:c4,BriefcaseBusiness:a4,BriefcaseBusinessIcon:a4,BriefcaseConveyorBelt:i4,BriefcaseConveyorBeltIcon:i4,BriefcaseIcon:c4,BriefcaseMedical:s4,BriefcaseMedicalIcon:s4,BringToFront:l4,BringToFrontIcon:l4,Brush:h4,BrushCleaning:d4,BrushCleaningIcon:d4,BrushIcon:h4,Bubbles:u4,BubblesIcon:u4,Bug:y4,BugIcon:y4,BugOff:f4,BugOffIcon:f4,BugPlay:p4,BugPlayIcon:p4,Building:m4,Building2:g4,Building2Icon:g4,BuildingIcon:m4,Bus:v4,BusFront:k4,BusFrontIcon:k4,BusIcon:v4,Cable:w4,CableCar:x4,CableCarIcon:x4,CableIcon:w4,Cake:b4,CakeIcon:b4,CakeSlice:M4,CakeSliceIcon:M4,Calculator:_4,CalculatorIcon:_4,Calendar:U4,Calendar1:C4,Calendar1Icon:C4,CalendarArrowDown:S4,CalendarArrowDownIcon:S4,CalendarArrowUp:L4,CalendarArrowUpIcon:L4,CalendarCheck:I4,CalendarCheck2:N4,CalendarCheck2Icon:N4,CalendarCheckIcon:I4,CalendarClock:A4,CalendarClockIcon:A4,CalendarCog:E4,CalendarCogIcon:E4,CalendarDays:j4,CalendarDaysIcon:j4,CalendarFold:$4,CalendarFoldIcon:$4,CalendarHeart:P4,CalendarHeartIcon:P4,CalendarIcon:U4,CalendarMinus:R4,CalendarMinus2:z4,CalendarMinus2Icon:z4,CalendarMinusIcon:R4,CalendarOff:T4,CalendarOffIcon:T4,CalendarPlus:O4,CalendarPlus2:D4,CalendarPlus2Icon:D4,CalendarPlusIcon:O4,CalendarRange:H4,CalendarRangeIcon:H4,CalendarSearch:F4,CalendarSearchIcon:F4,CalendarSync:q4,CalendarSyncIcon:q4,CalendarX:B4,CalendarX2:V4,CalendarX2Icon:V4,CalendarXIcon:B4,Calendars:W4,CalendarsIcon:W4,Camera:K4,CameraIcon:K4,CameraOff:G4,CameraOffIcon:G4,CandlestickChart:zs,CandlestickChartIcon:zs,Candy:Y4,CandyCane:X4,CandyCaneIcon:X4,CandyIcon:Y4,CandyOff:Z4,CandyOffIcon:Z4,Cannabis:J4,CannabisIcon:J4,CannabisOff:Q4,CannabisOffIcon:Q4,Captions:Es,CaptionsIcon:Es,CaptionsOff:e5,CaptionsOffIcon:e5,Car:o5,CarFront:t5,CarFrontIcon:t5,CarIcon:o5,CarTaxiFront:n5,CarTaxiFrontIcon:n5,Caravan:r5,CaravanIcon:r5,CardSim:a5,CardSimIcon:a5,Carrot:i5,CarrotIcon:i5,CaseLower:s5,CaseLowerIcon:s5,CaseSensitive:c5,CaseSensitiveIcon:c5,CaseUpper:l5,CaseUpperIcon:l5,CassetteTape:d5,CassetteTapeIcon:d5,Cast:u5,CastIcon:u5,Castle:h5,CastleIcon:h5,Cat:f5,CatIcon:f5,Cctv:p5,CctvIcon:p5,ChartArea:js,ChartAreaIcon:js,ChartBar:Ps,ChartBarBig:$s,ChartBarBigIcon:$s,ChartBarDecreasing:y5,ChartBarDecreasingIcon:y5,ChartBarIcon:Ps,ChartBarIncreasing:m5,ChartBarIncreasingIcon:m5,ChartBarStacked:g5,ChartBarStackedIcon:g5,ChartCandlestick:zs,ChartCandlestickIcon:zs,ChartColumn:Ds,ChartColumnBig:Rs,ChartColumnBigIcon:Rs,ChartColumnDecreasing:k5,ChartColumnDecreasingIcon:k5,ChartColumnIcon:Ds,ChartColumnIncreasing:Ts,ChartColumnIncreasingIcon:Ts,ChartColumnStacked:v5,ChartColumnStackedIcon:v5,ChartGantt:x5,ChartGanttIcon:x5,ChartLine:Hs,ChartLineIcon:Hs,ChartNetwork:w5,ChartNetworkIcon:w5,ChartNoAxesColumn:Fs,ChartNoAxesColumnDecreasing:M5,ChartNoAxesColumnDecreasingIcon:M5,ChartNoAxesColumnIcon:Fs,ChartNoAxesColumnIncreasing:Os,ChartNoAxesColumnIncreasingIcon:Os,ChartNoAxesCombined:b5,ChartNoAxesCombinedIcon:b5,ChartNoAxesGantt:qs,ChartNoAxesGanttIcon:qs,ChartPie:Vs,ChartPieIcon:Vs,ChartScatter:Bs,ChartScatterIcon:Bs,ChartSpline:_5,ChartSplineIcon:_5,Check:Ni,CheckCheck:C5,CheckCheckIcon:C5,CheckCircle:ec,CheckCircle2:li,CheckCircle2Icon:li,CheckCircleIcon:ec,CheckIcon:Ni,CheckLine:S5,CheckLineIcon:S5,CheckSquare:u1,CheckSquare2:h1,CheckSquare2Icon:h1,CheckSquareIcon:u1,ChefHat:L5,ChefHatIcon:L5,Cherry:N5,CherryIcon:N5,ChessBishop:I5,ChessBishopIcon:I5,ChessKing:A5,ChessKingIcon:A5,ChessKnight:E5,ChessKnightIcon:E5,ChessPawn:j5,ChessPawnIcon:j5,ChessQueen:$5,ChessQueenIcon:$5,ChessRook:z5,ChessRookIcon:z5,ChevronDown:P5,ChevronDownCircle:tc,ChevronDownCircleIcon:tc,ChevronDownIcon:P5,ChevronDownSquare:f1,ChevronDownSquareIcon:f1,ChevronFirst:R5,ChevronFirstIcon:R5,ChevronLast:T5,ChevronLastIcon:T5,ChevronLeft:D5,ChevronLeftCircle:nc,ChevronLeftCircleIcon:nc,ChevronLeftIcon:D5,ChevronLeftSquare:p1,ChevronLeftSquareIcon:p1,ChevronRight:H5,ChevronRightCircle:oc,ChevronRightCircleIcon:oc,ChevronRightIcon:H5,ChevronRightSquare:m1,ChevronRightSquareIcon:m1,ChevronUp:O5,ChevronUpCircle:rc,ChevronUpCircleIcon:rc,ChevronUpIcon:O5,ChevronUpSquare:y1,ChevronUpSquareIcon:y1,ChevronsDown:q5,ChevronsDownIcon:q5,ChevronsDownUp:F5,ChevronsDownUpIcon:F5,ChevronsLeft:U5,ChevronsLeftIcon:U5,ChevronsLeftRight:B5,ChevronsLeftRightEllipsis:V5,ChevronsLeftRightEllipsisIcon:V5,ChevronsLeftRightIcon:B5,ChevronsRight:G5,ChevronsRightIcon:G5,ChevronsRightLeft:W5,ChevronsRightLeftIcon:W5,ChevronsUp:X5,ChevronsUpDown:K5,ChevronsUpDownIcon:K5,ChevronsUpIcon:X5,Chrome:Us,ChromeIcon:Us,Chromium:Us,ChromiumIcon:Us,Church:Z5,ChurchIcon:Z5,Cigarette:Q5,CigaretteIcon:Q5,CigaretteOff:Y5,CigaretteOffIcon:Y5,Circle:Y2,CircleAlert:ci,CircleAlertIcon:ci,CircleArrowDown:Ws,CircleArrowDownIcon:Ws,CircleArrowLeft:Ks,CircleArrowLeftIcon:Ks,CircleArrowOutDownLeft:Gs,CircleArrowOutDownLeftIcon:Gs,CircleArrowOutDownRight:Xs,CircleArrowOutDownRightIcon:Xs,CircleArrowOutUpLeft:Zs,CircleArrowOutUpLeftIcon:Zs,CircleArrowOutUpRight:Ys,CircleArrowOutUpRightIcon:Ys,CircleArrowRight:Qs,CircleArrowRightIcon:Qs,CircleArrowUp:Js,CircleArrowUpIcon:Js,CircleCheck:li,CircleCheckBig:ec,CircleCheckBigIcon:ec,CircleCheckIcon:li,CircleChevronDown:tc,CircleChevronDownIcon:tc,CircleChevronLeft:nc,CircleChevronLeftIcon:nc,CircleChevronRight:oc,CircleChevronRightIcon:oc,CircleChevronUp:rc,CircleChevronUpIcon:rc,CircleDashed:J5,CircleDashedIcon:J5,CircleDivide:ac,CircleDivideIcon:ac,CircleDollarSign:ev,CircleDollarSignIcon:ev,CircleDot:nv,CircleDotDashed:tv,CircleDotDashedIcon:tv,CircleDotIcon:nv,CircleEllipsis:ov,CircleEllipsisIcon:ov,CircleEqual:rv,CircleEqualIcon:rv,CircleFadingArrowUp:av,CircleFadingArrowUpIcon:av,CircleFadingPlus:iv,CircleFadingPlusIcon:iv,CircleGauge:ic,CircleGaugeIcon:ic,CircleHelp:qo,CircleHelpIcon:qo,CircleIcon:Y2,CircleMinus:sc,CircleMinusIcon:sc,CircleOff:sv,CircleOffIcon:sv,CircleParking:lc,CircleParkingIcon:lc,CircleParkingOff:cc,CircleParkingOffIcon:cc,CirclePause:dc,CirclePauseIcon:dc,CirclePercent:uc,CirclePercentIcon:uc,CirclePile:cv,CirclePileIcon:cv,CirclePlay:hc,CirclePlayIcon:hc,CirclePlus:fc,CirclePlusIcon:fc,CirclePoundSterling:lv,CirclePoundSterlingIcon:lv,CirclePower:pc,CirclePowerIcon:pc,CircleQuestionMark:qo,CircleQuestionMarkIcon:qo,CircleSlash:dv,CircleSlash2:yc,CircleSlash2Icon:yc,CircleSlashIcon:dv,CircleSlashed:yc,CircleSlashedIcon:yc,CircleSmall:uv,CircleSmallIcon:uv,CircleStar:hv,CircleStarIcon:hv,CircleStop:gc,CircleStopIcon:gc,CircleUser:kc,CircleUserIcon:kc,CircleUserRound:mc,CircleUserRoundIcon:mc,CircleX:vc,CircleXIcon:vc,CircuitBoard:fv,CircuitBoardIcon:fv,Citrus:pv,CitrusIcon:pv,Clapperboard:yv,ClapperboardIcon:yv,Clipboard:Cv,ClipboardCheck:mv,ClipboardCheckIcon:mv,ClipboardClock:gv,ClipboardClockIcon:gv,ClipboardCopy:kv,ClipboardCopyIcon:kv,ClipboardEdit:wc,ClipboardEditIcon:wc,ClipboardIcon:Cv,ClipboardList:vv,ClipboardListIcon:vv,ClipboardMinus:xv,ClipboardMinusIcon:xv,ClipboardPaste:wv,ClipboardPasteIcon:wv,ClipboardPen:wc,ClipboardPenIcon:wc,ClipboardPenLine:xc,ClipboardPenLineIcon:xc,ClipboardPlus:Mv,ClipboardPlusIcon:Mv,ClipboardSignature:xc,ClipboardSignatureIcon:xc,ClipboardType:bv,ClipboardTypeIcon:bv,ClipboardX:_v,ClipboardXIcon:_v,Clock:Bv,Clock1:Sv,Clock10:Lv,Clock10Icon:Lv,Clock11:Nv,Clock11Icon:Nv,Clock12:Iv,Clock12Icon:Iv,Clock1Icon:Sv,Clock2:Av,Clock2Icon:Av,Clock3:Ev,Clock3Icon:Ev,Clock4:jv,Clock4Icon:jv,Clock5:$v,Clock5Icon:$v,Clock6:Pv,Clock6Icon:Pv,Clock7:zv,Clock7Icon:zv,Clock8:Rv,Clock8Icon:Rv,Clock9:Tv,Clock9Icon:Tv,ClockAlert:Dv,ClockAlertIcon:Dv,ClockArrowDown:Hv,ClockArrowDownIcon:Hv,ClockArrowUp:qv,ClockArrowUpIcon:qv,ClockCheck:Ov,ClockCheckIcon:Ov,ClockFading:Fv,ClockFadingIcon:Fv,ClockIcon:Bv,ClockPlus:Vv,ClockPlusIcon:Vv,ClosedCaption:Uv,ClosedCaptionIcon:Uv,Cloud:Q2,CloudAlert:Wv,CloudAlertIcon:Wv,CloudBackup:Gv,CloudBackupIcon:Gv,CloudCheck:Kv,CloudCheckIcon:Kv,CloudCog:Xv,CloudCogIcon:Xv,CloudDownload:Mc,CloudDownloadIcon:Mc,CloudDrizzle:Zv,CloudDrizzleIcon:Zv,CloudFog:Yv,CloudFogIcon:Yv,CloudHail:Qv,CloudHailIcon:Qv,CloudIcon:Q2,CloudLightning:Jv,CloudLightningIcon:Jv,CloudMoon:tx,CloudMoonIcon:tx,CloudMoonRain:ex,CloudMoonRainIcon:ex,CloudOff:nx,CloudOffIcon:nx,CloudRain:rx,CloudRainIcon:rx,CloudRainWind:ox,CloudRainWindIcon:ox,CloudSnow:ax,CloudSnowIcon:ax,CloudSun:sx,CloudSunIcon:sx,CloudSunRain:ix,CloudSunRainIcon:ix,CloudSync:cx,CloudSyncIcon:cx,CloudUpload:bc,CloudUploadIcon:bc,Cloudy:lx,CloudyIcon:lx,Clover:dx,CloverIcon:dx,Club:ux,ClubIcon:ux,Code:hx,Code2:_c,Code2Icon:_c,CodeIcon:hx,CodeSquare:g1,CodeSquareIcon:g1,CodeXml:_c,CodeXmlIcon:_c,Codepen:fx,CodepenIcon:fx,Codesandbox:px,CodesandboxIcon:px,Coffee:yx,CoffeeIcon:yx,Cog:mx,CogIcon:mx,Coins:gx,CoinsIcon:gx,Columns:Cc,Columns2:Cc,Columns2Icon:Cc,Columns3:di,Columns3Cog:_r,Columns3CogIcon:_r,Columns3Icon:di,Columns4:kx,Columns4Icon:kx,ColumnsIcon:Cc,ColumnsSettings:_r,ColumnsSettingsIcon:_r,Combine:vx,CombineIcon:vx,Command:xx,CommandIcon:xx,Compass:wx,CompassIcon:wx,Component:Mx,ComponentIcon:Mx,Computer:bx,ComputerIcon:bx,ConciergeBell:_x,ConciergeBellIcon:_x,Cone:Cx,ConeIcon:Cx,Construction:Sx,ConstructionIcon:Sx,Contact:Lx,Contact2:Sc,Contact2Icon:Sc,ContactIcon:Lx,ContactRound:Sc,ContactRoundIcon:Sc,Container:Nx,ContainerIcon:Nx,Contrast:Ix,ContrastIcon:Ix,Cookie:Ax,CookieIcon:Ax,CookingPot:Ex,CookingPotIcon:Ex,Copy:Tx,CopyCheck:jx,CopyCheckIcon:jx,CopyIcon:Tx,CopyMinus:$x,CopyMinusIcon:$x,CopyPlus:Px,CopyPlusIcon:Px,CopySlash:zx,CopySlashIcon:zx,CopyX:Rx,CopyXIcon:Rx,Copyleft:Hx,CopyleftIcon:Hx,Copyright:Dx,CopyrightIcon:Dx,CornerDownLeft:Ox,CornerDownLeftIcon:Ox,CornerDownRight:Fx,CornerDownRightIcon:Fx,CornerLeftDown:qx,CornerLeftDownIcon:qx,CornerLeftUp:Vx,CornerLeftUpIcon:Vx,CornerRightDown:Ux,CornerRightDownIcon:Ux,CornerRightUp:Bx,CornerRightUpIcon:Bx,CornerUpLeft:Gx,CornerUpLeftIcon:Gx,CornerUpRight:Wx,CornerUpRightIcon:Wx,Cpu:Kx,CpuIcon:Kx,CreativeCommons:Xx,CreativeCommonsIcon:Xx,CreditCard:Zx,CreditCardIcon:Zx,Croissant:Yx,CroissantIcon:Yx,Crop:Qx,CropIcon:Qx,Cross:Jx,CrossIcon:Jx,Crosshair:e3,CrosshairIcon:e3,Crown:t3,CrownIcon:t3,Cuboid:n3,CuboidIcon:n3,CupSoda:o3,CupSodaIcon:o3,CurlyBraces:As,CurlyBracesIcon:As,Currency:r3,CurrencyIcon:r3,Cylinder:a3,CylinderIcon:a3,Dam:i3,DamIcon:i3,Database:J2,DatabaseBackup:s3,DatabaseBackupIcon:s3,DatabaseIcon:J2,DatabaseSearch:c3,DatabaseSearchIcon:c3,DatabaseZap:l3,DatabaseZapIcon:l3,DecimalsArrowLeft:d3,DecimalsArrowLeftIcon:d3,DecimalsArrowRight:u3,DecimalsArrowRightIcon:u3,Delete:h3,DeleteIcon:h3,Dessert:f3,DessertIcon:f3,Diameter:p3,DiameterIcon:p3,Diamond:eh,DiamondIcon:eh,DiamondMinus:y3,DiamondMinusIcon:y3,DiamondPercent:Lc,DiamondPercentIcon:Lc,DiamondPlus:m3,DiamondPlusIcon:m3,Dice1:g3,Dice1Icon:g3,Dice2:v3,Dice2Icon:v3,Dice3:k3,Dice3Icon:k3,Dice4:x3,Dice4Icon:x3,Dice5:w3,Dice5Icon:w3,Dice6:M3,Dice6Icon:M3,Dices:b3,DicesIcon:b3,Diff:_3,DiffIcon:_3,Disc:N3,Disc2:C3,Disc2Icon:C3,Disc3:L3,Disc3Icon:L3,DiscAlbum:S3,DiscAlbumIcon:S3,DiscIcon:N3,Divide:I3,DivideCircle:ac,DivideCircleIcon:ac,DivideIcon:I3,DivideSquare:w1,DivideSquareIcon:w1,Dna:E3,DnaIcon:E3,DnaOff:A3,DnaOffIcon:A3,Dock:j3,DockIcon:j3,Dog:$3,DogIcon:$3,DollarSign:P3,DollarSignIcon:P3,Donut:z3,DonutIcon:z3,DoorClosed:T3,DoorClosedIcon:T3,DoorClosedLocked:R3,DoorClosedLockedIcon:R3,DoorOpen:D3,DoorOpenIcon:D3,Dot:H3,DotIcon:H3,DotSquare:M1,DotSquareIcon:M1,Download:i0,DownloadCloud:Mc,DownloadCloudIcon:Mc,DownloadIcon:i0,DraftingCompass:O3,DraftingCompassIcon:O3,Drama:F3,DramaIcon:F3,Dribbble:q3,DribbbleIcon:q3,Drill:V3,DrillIcon:V3,Drone:B3,DroneIcon:B3,Droplet:W3,DropletIcon:W3,DropletOff:U3,DropletOffIcon:U3,Droplets:G3,DropletsIcon:G3,Drum:K3,DrumIcon:K3,Drumstick:X3,DrumstickIcon:X3,Dumbbell:Z3,DumbbellIcon:Z3,Ear:Y3,EarIcon:Y3,EarOff:Q3,EarOffIcon:Q3,Earth:Nc,EarthIcon:Nc,EarthLock:J3,EarthLockIcon:J3,Eclipse:e8,EclipseIcon:e8,Edit:eo,Edit2:Dl,Edit2Icon:Dl,Edit3:Tl,Edit3Icon:Tl,EditIcon:eo,Egg:o8,EggFried:t8,EggFriedIcon:t8,EggIcon:o8,EggOff:n8,EggOffIcon:n8,Ellipsis:Ac,EllipsisIcon:Ac,EllipsisVertical:Ic,EllipsisVerticalIcon:Ic,Equal:i8,EqualApproximately:r8,EqualApproximatelyIcon:r8,EqualIcon:i8,EqualNot:a8,EqualNotIcon:a8,EqualSquare:b1,EqualSquareIcon:b1,Eraser:s8,EraserIcon:s8,EthernetPort:c8,EthernetPortIcon:c8,Euro:l8,EuroIcon:l8,EvCharger:d8,EvChargerIcon:d8,Expand:u8,ExpandIcon:u8,ExternalLink:th,ExternalLinkIcon:th,Eye:p8,EyeClosed:h8,EyeClosedIcon:h8,EyeIcon:p8,EyeOff:f8,EyeOffIcon:f8,Facebook:y8,FacebookIcon:y8,Factory:m8,FactoryIcon:m8,Fan:k8,FanIcon:k8,FastForward:g8,FastForwardIcon:g8,Feather:v8,FeatherIcon:v8,Fence:x8,FenceIcon:x8,FerrisWheel:w8,FerrisWheelIcon:w8,Figma:M8,FigmaIcon:M8,File:Z8,FileArchive:b8,FileArchiveIcon:b8,FileAudio:Cr,FileAudio2:Cr,FileAudio2Icon:Cr,FileAudioIcon:Cr,FileAxis3D:Ec,FileAxis3DIcon:Ec,FileAxis3d:Ec,FileAxis3dIcon:Ec,FileBadge:jc,FileBadge2:jc,FileBadge2Icon:jc,FileBadgeIcon:jc,FileBarChart:zc,FileBarChart2:Rc,FileBarChart2Icon:Rc,FileBarChartIcon:zc,FileBox:_8,FileBoxIcon:_8,FileBraces:Pc,FileBracesCorner:$c,FileBracesCornerIcon:$c,FileBracesIcon:Pc,FileChartColumn:Rc,FileChartColumnIcon:Rc,FileChartColumnIncreasing:zc,FileChartColumnIncreasingIcon:zc,FileChartLine:Tc,FileChartLineIcon:Tc,FileChartPie:Dc,FileChartPieIcon:Dc,FileCheck:C8,FileCheck2:Hc,FileCheck2Icon:Hc,FileCheckCorner:Hc,FileCheckCornerIcon:Hc,FileCheckIcon:C8,FileClock:L8,FileClockIcon:L8,FileCode:S8,FileCode2:Oc,FileCode2Icon:Oc,FileCodeCorner:Oc,FileCodeCornerIcon:Oc,FileCodeIcon:S8,FileCog:Fc,FileCog2:Fc,FileCog2Icon:Fc,FileCogIcon:Fc,FileDiff:N8,FileDiffIcon:N8,FileDigit:I8,FileDigitIcon:I8,FileDown:nh,FileDownIcon:nh,FileEdit:Gc,FileEditIcon:Gc,FileExclamationPoint:qc,FileExclamationPointIcon:qc,FileHeadphone:Cr,FileHeadphoneIcon:Cr,FileHeart:A8,FileHeartIcon:A8,FileIcon:Z8,FileImage:E8,FileImageIcon:E8,FileInput:j8,FileInputIcon:j8,FileJson:Pc,FileJson2:$c,FileJson2Icon:$c,FileJsonIcon:Pc,FileKey:Vc,FileKey2:Vc,FileKey2Icon:Vc,FileKeyIcon:Vc,FileLineChart:Tc,FileLineChartIcon:Tc,FileLock:Bc,FileLock2:Bc,FileLock2Icon:Bc,FileLockIcon:Bc,FileMinus:$8,FileMinus2:Uc,FileMinus2Icon:Uc,FileMinusCorner:Uc,FileMinusCornerIcon:Uc,FileMinusIcon:$8,FileMusic:z8,FileMusicIcon:z8,FileOutput:P8,FileOutputIcon:P8,FilePen:Gc,FilePenIcon:Gc,FilePenLine:Wc,FilePenLineIcon:Wc,FilePieChart:Dc,FilePieChartIcon:Dc,FilePlay:Kc,FilePlayIcon:Kc,FilePlus:R8,FilePlus2:Xc,FilePlus2Icon:Xc,FilePlusCorner:Xc,FilePlusCornerIcon:Xc,FilePlusIcon:R8,FileQuestion:Zc,FileQuestionIcon:Zc,FileQuestionMark:Zc,FileQuestionMarkIcon:Zc,FileScan:T8,FileScanIcon:T8,FileSearch:D8,FileSearch2:Yc,FileSearch2Icon:Yc,FileSearchCorner:Yc,FileSearchCornerIcon:Yc,FileSearchIcon:D8,FileSignal:Qc,FileSignalIcon:Qc,FileSignature:Wc,FileSignatureIcon:Wc,FileSliders:H8,FileSlidersIcon:H8,FileSpreadsheet:O8,FileSpreadsheetIcon:O8,FileStack:F8,FileStackIcon:F8,FileSymlink:q8,FileSymlinkIcon:q8,FileTerminal:V8,FileTerminalIcon:V8,FileText:B8,FileTextIcon:B8,FileType:U8,FileType2:Jc,FileType2Icon:Jc,FileTypeCorner:Jc,FileTypeCornerIcon:Jc,FileTypeIcon:U8,FileUp:W8,FileUpIcon:W8,FileUser:G8,FileUserIcon:G8,FileVideo:Kc,FileVideo2:el,FileVideo2Icon:el,FileVideoCamera:el,FileVideoCameraIcon:el,FileVideoIcon:Kc,FileVolume:K8,FileVolume2:Qc,FileVolume2Icon:Qc,FileVolumeIcon:K8,FileWarning:qc,FileWarningIcon:qc,FileX:X8,FileX2:tl,FileX2Icon:tl,FileXCorner:tl,FileXCornerIcon:tl,FileXIcon:X8,Files:Y8,FilesIcon:Y8,Film:Q8,FilmIcon:Q8,Filter:il,FilterIcon:il,FilterX:al,FilterXIcon:al,Fingerprint:nl,FingerprintIcon:nl,FingerprintPattern:nl,FingerprintPatternIcon:nl,FireExtinguisher:J8,FireExtinguisherIcon:J8,Fish:n6,FishIcon:n6,FishOff:e6,FishOffIcon:e6,FishSymbol:t6,FishSymbolIcon:t6,FishingHook:o6,FishingHookIcon:o6,Flag:s6,FlagIcon:s6,FlagOff:r6,FlagOffIcon:r6,FlagTriangleLeft:a6,FlagTriangleLeftIcon:a6,FlagTriangleRight:i6,FlagTriangleRightIcon:i6,Flame:l6,FlameIcon:l6,FlameKindling:c6,FlameKindlingIcon:c6,Flashlight:u6,FlashlightIcon:u6,FlashlightOff:d6,FlashlightOffIcon:d6,FlaskConical:p6,FlaskConicalIcon:p6,FlaskConicalOff:h6,FlaskConicalOffIcon:h6,FlaskRound:f6,FlaskRoundIcon:f6,FlipHorizontal:m6,FlipHorizontal2:y6,FlipHorizontal2Icon:y6,FlipHorizontalIcon:m6,FlipVertical:k6,FlipVertical2:g6,FlipVertical2Icon:g6,FlipVerticalIcon:k6,Flower:x6,Flower2:v6,Flower2Icon:v6,FlowerIcon:x6,Focus:w6,FocusIcon:w6,FoldHorizontal:M6,FoldHorizontalIcon:M6,FoldVertical:b6,FoldVerticalIcon:b6,Folder:Z6,FolderArchive:_6,FolderArchiveIcon:_6,FolderCheck:C6,FolderCheckIcon:C6,FolderClock:S6,FolderClockIcon:S6,FolderClosed:N6,FolderClosedIcon:N6,FolderCode:L6,FolderCodeIcon:L6,FolderCog:ol,FolderCog2:ol,FolderCog2Icon:ol,FolderCogIcon:ol,FolderDot:I6,FolderDotIcon:I6,FolderDown:A6,FolderDownIcon:A6,FolderEdit:rl,FolderEditIcon:rl,FolderGit:j6,FolderGit2:E6,FolderGit2Icon:E6,FolderGitIcon:j6,FolderHeart:$6,FolderHeartIcon:$6,FolderIcon:Z6,FolderInput:P6,FolderInputIcon:P6,FolderKanban:z6,FolderKanbanIcon:z6,FolderKey:R6,FolderKeyIcon:R6,FolderLock:T6,FolderLockIcon:T6,FolderMinus:D6,FolderMinusIcon:D6,FolderOpen:oh,FolderOpenDot:H6,FolderOpenDotIcon:H6,FolderOpenIcon:oh,FolderOutput:O6,FolderOutputIcon:O6,FolderPen:rl,FolderPenIcon:rl,FolderPlus:F6,FolderPlusIcon:F6,FolderRoot:q6,FolderRootIcon:q6,FolderSearch:B6,FolderSearch2:V6,FolderSearch2Icon:V6,FolderSearchIcon:B6,FolderSymlink:U6,FolderSymlinkIcon:U6,FolderSync:W6,FolderSyncIcon:W6,FolderTree:G6,FolderTreeIcon:G6,FolderUp:K6,FolderUpIcon:K6,FolderX:X6,FolderXIcon:X6,Folders:Y6,FoldersIcon:Y6,Footprints:Q6,FootprintsIcon:Q6,ForkKnife:ud,ForkKnifeCrossed:dd,ForkKnifeCrossedIcon:dd,ForkKnifeIcon:ud,Forklift:tw,ForkliftIcon:tw,Form:J6,FormIcon:J6,FormInput:Ol,FormInputIcon:Ol,Forward:ew,ForwardIcon:ew,Frame:nw,FrameIcon:nw,Framer:aw,FramerIcon:aw,Frown:ow,FrownIcon:ow,Fuel:rw,FuelIcon:rw,Fullscreen:iw,FullscreenIcon:iw,FunctionSquare:_1,FunctionSquareIcon:_1,Funnel:il,FunnelIcon:il,FunnelPlus:sw,FunnelPlusIcon:sw,FunnelX:al,FunnelXIcon:al,GalleryHorizontal:lw,GalleryHorizontalEnd:cw,GalleryHorizontalEndIcon:cw,GalleryHorizontalIcon:lw,GalleryThumbnails:dw,GalleryThumbnailsIcon:dw,GalleryVertical:hw,GalleryVerticalEnd:uw,GalleryVerticalEndIcon:uw,GalleryVerticalIcon:hw,Gamepad:mw,Gamepad2:fw,Gamepad2Icon:fw,GamepadDirectional:pw,GamepadDirectionalIcon:pw,GamepadIcon:mw,GanttChart:qs,GanttChartIcon:qs,GanttChartSquare:Ir,GanttChartSquareIcon:Ir,Gauge:yw,GaugeCircle:ic,GaugeCircleIcon:ic,GaugeIcon:yw,Gavel:gw,GavelIcon:gw,Gem:kw,GemIcon:kw,GeorgianLari:vw,GeorgianLariIcon:vw,Ghost:ww,GhostIcon:ww,Gift:xw,GiftIcon:xw,GitBranch:_w,GitBranchIcon:_w,GitBranchMinus:Mw,GitBranchMinusIcon:Mw,GitBranchPlus:bw,GitBranchPlusIcon:bw,GitCommit:sl,GitCommitHorizontal:sl,GitCommitHorizontalIcon:sl,GitCommitIcon:sl,GitCommitVertical:Cw,GitCommitVerticalIcon:Cw,GitCompare:Lw,GitCompareArrows:Sw,GitCompareArrowsIcon:Sw,GitCompareIcon:Lw,GitFork:Nw,GitForkIcon:Nw,GitGraph:Iw,GitGraphIcon:Iw,GitMerge:Aw,GitMergeIcon:Aw,GitPullRequest:Rw,GitPullRequestArrow:Ew,GitPullRequestArrowIcon:Ew,GitPullRequestClosed:jw,GitPullRequestClosedIcon:jw,GitPullRequestCreate:Pw,GitPullRequestCreateArrow:$w,GitPullRequestCreateArrowIcon:$w,GitPullRequestCreateIcon:Pw,GitPullRequestDraft:zw,GitPullRequestDraftIcon:zw,GitPullRequestIcon:Rw,Github:Tw,GithubIcon:Tw,Gitlab:Dw,GitlabIcon:Dw,GlassWater:Hw,GlassWaterIcon:Hw,Glasses:Ow,GlassesIcon:Ow,Globe:Vw,Globe2:Nc,Globe2Icon:Nc,GlobeIcon:Vw,GlobeLock:Fw,GlobeLockIcon:Fw,GlobeX:qw,GlobeXIcon:qw,Goal:Bw,GoalIcon:Bw,Gpu:Uw,GpuIcon:Uw,Grab:hl,GrabIcon:hl,GraduationCap:Ww,GraduationCapIcon:Ww,Grape:Gw,GrapeIcon:Gw,Grid:Sr,Grid2X2:ul,Grid2X2Check:cl,Grid2X2CheckIcon:cl,Grid2X2Icon:ul,Grid2X2Plus:ll,Grid2X2PlusIcon:ll,Grid2X2X:dl,Grid2X2XIcon:dl,Grid2x2:ul,Grid2x2Check:cl,Grid2x2CheckIcon:cl,Grid2x2Icon:ul,Grid2x2Plus:ll,Grid2x2PlusIcon:ll,Grid2x2X:dl,Grid2x2XIcon:dl,Grid3X3:Sr,Grid3X3Icon:Sr,Grid3x2:Kw,Grid3x2Icon:Kw,Grid3x3:Sr,Grid3x3Icon:Sr,GridIcon:Sr,Grip:Zw,GripHorizontal:Xw,GripHorizontalIcon:Xw,GripIcon:Zw,GripVertical:Yw,GripVerticalIcon:Yw,Group:Qw,GroupIcon:Qw,Guitar:Jw,GuitarIcon:Jw,Ham:e7,HamIcon:e7,Hamburger:t7,HamburgerIcon:t7,Hammer:n7,HammerIcon:n7,Hand:rh,HandCoins:o7,HandCoinsIcon:o7,HandFist:r7,HandFistIcon:r7,HandGrab:hl,HandGrabIcon:hl,HandHeart:a7,HandHeartIcon:a7,HandHelping:fl,HandHelpingIcon:fl,HandIcon:rh,HandMetal:i7,HandMetalIcon:i7,HandPlatter:s7,HandPlatterIcon:s7,Handbag:c7,HandbagIcon:c7,Handshake:l7,HandshakeIcon:l7,HardDrive:h7,HardDriveDownload:d7,HardDriveDownloadIcon:d7,HardDriveIcon:h7,HardDriveUpload:u7,HardDriveUploadIcon:u7,HardHat:f7,HardHatIcon:f7,Hash:p7,HashIcon:p7,HatGlasses:y7,HatGlassesIcon:y7,Haze:m7,HazeIcon:m7,Hd:g7,HdIcon:g7,HdmiPort:k7,HdmiPortIcon:k7,Heading:C7,Heading1:v7,Heading1Icon:v7,Heading2:x7,Heading2Icon:x7,Heading3:w7,Heading3Icon:w7,Heading4:M7,Heading4Icon:M7,Heading5:b7,Heading5Icon:b7,Heading6:_7,Heading6Icon:_7,HeadingIcon:C7,HeadphoneOff:S7,HeadphoneOffIcon:S7,Headphones:L7,HeadphonesIcon:L7,Headset:N7,HeadsetIcon:N7,Heart:z7,HeartCrack:I7,HeartCrackIcon:I7,HeartHandshake:E7,HeartHandshakeIcon:E7,HeartIcon:z7,HeartMinus:A7,HeartMinusIcon:A7,HeartOff:j7,HeartOffIcon:j7,HeartPlus:$7,HeartPlusIcon:$7,HeartPulse:P7,HeartPulseIcon:P7,Heater:R7,HeaterIcon:R7,Helicopter:T7,HelicopterIcon:T7,HelpCircle:qo,HelpCircleIcon:qo,HelpingHand:fl,HelpingHandIcon:fl,Hexagon:ah,HexagonIcon:ah,Highlighter:D7,HighlighterIcon:D7,History:H7,HistoryIcon:H7,Home:pl,HomeIcon:pl,Hop:O7,HopIcon:O7,HopOff:F7,HopOffIcon:F7,Hospital:q7,HospitalIcon:q7,Hotel:V7,HotelIcon:V7,Hourglass:B7,HourglassIcon:B7,House:pl,HouseHeart:U7,HouseHeartIcon:U7,HouseIcon:pl,HousePlug:W7,HousePlugIcon:W7,HousePlus:G7,HousePlusIcon:G7,HouseWifi:K7,HouseWifiIcon:K7,IceCream:ml,IceCream2:yl,IceCream2Icon:yl,IceCreamBowl:yl,IceCreamBowlIcon:yl,IceCreamCone:ml,IceCreamConeIcon:ml,IceCreamIcon:ml,Icon:jY,IdCard:Z7,IdCardIcon:Z7,IdCardLanyard:X7,IdCardLanyardIcon:X7,Image:sh,ImageDown:Y7,ImageDownIcon:Y7,ImageIcon:sh,ImageMinus:J7,ImageMinusIcon:J7,ImageOff:Q7,ImageOffIcon:Q7,ImagePlay:eM,ImagePlayIcon:eM,ImagePlus:ih,ImagePlusIcon:ih,ImageUp:tM,ImageUpIcon:tM,ImageUpscale:nM,ImageUpscaleIcon:nM,Images:oM,ImagesIcon:oM,Import:rM,ImportIcon:rM,Inbox:aM,InboxIcon:aM,Indent:Nr,IndentDecrease:Lr,IndentDecreaseIcon:Lr,IndentIcon:Nr,IndentIncrease:Nr,IndentIncreaseIcon:Nr,IndianRupee:iM,IndianRupeeIcon:iM,Infinity:cM,InfinityIcon:cM,Info:sM,InfoIcon:sM,Inspect:A1,InspectIcon:A1,InspectionPanel:lM,InspectionPanelIcon:lM,Instagram:dM,InstagramIcon:dM,Italic:uM,ItalicIcon:uM,IterationCcw:hM,IterationCcwIcon:hM,IterationCw:fM,IterationCwIcon:fM,JapaneseYen:pM,JapaneseYenIcon:pM,Joystick:yM,JoystickIcon:yM,Kanban:mM,KanbanIcon:mM,KanbanSquare:C1,KanbanSquareDashed:k1,KanbanSquareDashedIcon:k1,KanbanSquareIcon:C1,Kayak:gM,KayakIcon:gM,Key:xM,KeyIcon:xM,KeyRound:kM,KeyRoundIcon:kM,KeySquare:vM,KeySquareIcon:vM,Keyboard:bM,KeyboardIcon:bM,KeyboardMusic:wM,KeyboardMusicIcon:wM,KeyboardOff:MM,KeyboardOffIcon:MM,Lamp:IM,LampCeiling:_M,LampCeilingIcon:_M,LampDesk:CM,LampDeskIcon:CM,LampFloor:SM,LampFloorIcon:SM,LampIcon:IM,LampWallDown:LM,LampWallDownIcon:LM,LampWallUp:NM,LampWallUpIcon:NM,LandPlot:AM,LandPlotIcon:AM,Landmark:EM,LandmarkIcon:EM,Languages:jM,LanguagesIcon:jM,Laptop:zM,Laptop2:gl,Laptop2Icon:gl,LaptopIcon:zM,LaptopMinimal:gl,LaptopMinimalCheck:$M,LaptopMinimalCheckIcon:$M,LaptopMinimalIcon:gl,Lasso:RM,LassoIcon:RM,LassoSelect:PM,LassoSelectIcon:PM,Laugh:TM,LaughIcon:TM,Layers:ka,Layers2:DM,Layers2Icon:DM,Layers3:ka,Layers3Icon:ka,LayersIcon:ka,LayersPlus:HM,LayersPlusIcon:HM,Layout:Rl,LayoutDashboard:ch,LayoutDashboardIcon:ch,LayoutGrid:OM,LayoutGridIcon:OM,LayoutIcon:Rl,LayoutList:FM,LayoutListIcon:FM,LayoutPanelLeft:qM,LayoutPanelLeftIcon:qM,LayoutPanelTop:BM,LayoutPanelTopIcon:BM,LayoutTemplate:VM,LayoutTemplateIcon:VM,Leaf:UM,LeafIcon:UM,LeafyGreen:WM,LeafyGreenIcon:WM,Lectern:GM,LecternIcon:GM,LetterText:Z1,LetterTextIcon:Z1,Library:XM,LibraryBig:KM,LibraryBigIcon:KM,LibraryIcon:XM,LibrarySquare:S1,LibrarySquareIcon:S1,LifeBuoy:ZM,LifeBuoyIcon:ZM,Ligature:YM,LigatureIcon:YM,Lightbulb:JM,LightbulbIcon:JM,LightbulbOff:QM,LightbulbOffIcon:QM,LineChart:Hs,LineChartIcon:Hs,LineSquiggle:eb,LineSquiggleIcon:eb,Link:nb,Link2:Ii,Link2Icon:Ii,Link2Off:tb,Link2OffIcon:tb,LinkIcon:nb,Linkedin:ob,LinkedinIcon:ob,List:Mb,ListCheck:rb,ListCheckIcon:rb,ListChecks:ab,ListChecksIcon:ab,ListChevronsDownUp:ib,ListChevronsDownUpIcon:ib,ListChevronsUpDown:cb,ListChevronsUpDownIcon:cb,ListCollapse:sb,ListCollapseIcon:sb,ListEnd:lb,ListEndIcon:lb,ListFilter:ub,ListFilterIcon:ub,ListFilterPlus:db,ListFilterPlusIcon:db,ListIcon:Mb,ListIndentDecrease:Lr,ListIndentDecreaseIcon:Lr,ListIndentIncrease:Nr,ListIndentIncreaseIcon:Nr,ListMinus:hb,ListMinusIcon:hb,ListMusic:fb,ListMusicIcon:fb,ListOrdered:pb,ListOrderedIcon:pb,ListPlus:yb,ListPlusIcon:yb,ListRestart:mb,ListRestartIcon:mb,ListStart:gb,ListStartIcon:gb,ListTodo:kb,ListTodoIcon:kb,ListTree:vb,ListTreeIcon:vb,ListVideo:xb,ListVideoIcon:xb,ListX:wb,ListXIcon:wb,Loader:_b,Loader2:Vn,Loader2Icon:Vn,LoaderCircle:Vn,LoaderCircleIcon:Vn,LoaderIcon:_b,LoaderPinwheel:bb,LoaderPinwheelIcon:bb,Locate:Lb,LocateFixed:Cb,LocateFixedIcon:Cb,LocateIcon:Lb,LocateOff:Sb,LocateOffIcon:Sb,LocationEdit:wl,LocationEditIcon:wl,Lock:Ib,LockIcon:Ib,LockKeyhole:Nb,LockKeyholeIcon:Nb,LockKeyholeOpen:kl,LockKeyholeOpenIcon:kl,LockOpen:vl,LockOpenIcon:vl,LogIn:Ab,LogInIcon:Ab,LogOut:Eb,LogOutIcon:Eb,Logs:jb,LogsIcon:jb,Lollipop:$b,LollipopIcon:$b,LucideAArrowDown:dy,LucideAArrowUp:uy,LucideALargeSmall:hy,LucideAccessibility:fy,LucideActivity:py,LucideActivitySquare:Zl,LucideAirVent:yy,LucideAirplay:my,LucideAlarmCheck:ys,LucideAlarmClock:ky,LucideAlarmClockCheck:ys,LucideAlarmClockMinus:ms,LucideAlarmClockOff:gy,LucideAlarmClockPlus:gs,LucideAlarmMinus:ms,LucideAlarmPlus:gs,LucideAlarmSmoke:vy,LucideAlbum:xy,LucideAlertCircle:ci,LucideAlertOctagon:Cl,LucideAlertTriangle:Pr,LucideAlignCenter:ui,LucideAlignCenterHorizontal:My,LucideAlignCenterVertical:wy,LucideAlignEndHorizontal:by,LucideAlignEndVertical:_y,LucideAlignHorizontalDistributeCenter:Cy,LucideAlignHorizontalDistributeEnd:Sy,LucideAlignHorizontalDistributeStart:Ly,LucideAlignHorizontalJustifyCenter:Ny,LucideAlignHorizontalJustifyEnd:Ay,LucideAlignHorizontalJustifyStart:Iy,LucideAlignHorizontalSpaceAround:Ey,LucideAlignHorizontalSpaceBetween:jy,LucideAlignJustify:X1,LucideAlignLeft:Vo,LucideAlignRight:hi,LucideAlignStartHorizontal:$y,LucideAlignStartVertical:Py,LucideAlignVerticalDistributeCenter:zy,LucideAlignVerticalDistributeEnd:Ry,LucideAlignVerticalDistributeStart:Ty,LucideAlignVerticalJustifyCenter:Dy,LucideAlignVerticalJustifyEnd:Hy,LucideAlignVerticalJustifyStart:Oy,LucideAlignVerticalSpaceAround:Fy,LucideAlignVerticalSpaceBetween:qy,LucideAmbulance:Vy,LucideAmpersand:By,LucideAmpersands:Uy,LucideAmphora:Wy,LucideAnchor:Gy,LucideAngry:Ky,LucideAnnoyed:Xy,LucideAntenna:Zy,LucideAnvil:Yy,LucideAperture:Qy,LucideAppWindow:em,LucideAppWindowMac:Jy,LucideApple:tm,LucideArchive:rm,LucideArchiveRestore:nm,LucideArchiveX:om,LucideAreaChart:js,LucideArmchair:am,LucideArrowBigDown:sm,LucideArrowBigDownDash:im,LucideArrowBigLeft:lm,LucideArrowBigLeftDash:cm,LucideArrowBigRight:um,LucideArrowBigRightDash:dm,LucideArrowBigUp:fm,LucideArrowBigUpDash:hm,LucideArrowDown:bm,LucideArrowDown01:pm,LucideArrowDown10:ym,LucideArrowDownAZ:ks,LucideArrowDownAz:ks,LucideArrowDownCircle:Ws,LucideArrowDownFromLine:mm,LucideArrowDownLeft:km,LucideArrowDownLeftFromCircle:Gs,LucideArrowDownLeftFromSquare:t1,LucideArrowDownLeftSquare:Yl,LucideArrowDownNarrowWide:gm,LucideArrowDownRight:xm,LucideArrowDownRightFromCircle:Xs,LucideArrowDownRightFromSquare:n1,LucideArrowDownRightSquare:Ql,LucideArrowDownSquare:Jl,LucideArrowDownToDot:vm,LucideArrowDownToLine:wm,LucideArrowDownUp:Mm,LucideArrowDownWideNarrow:vs,LucideArrowDownZA:xs,LucideArrowDownZa:xs,LucideArrowLeft:Sm,LucideArrowLeftCircle:Ks,LucideArrowLeftFromLine:_m,LucideArrowLeftRight:X2,LucideArrowLeftSquare:e1,LucideArrowLeftToLine:Cm,LucideArrowRight:a0,LucideArrowRightCircle:Qs,LucideArrowRightFromLine:Lm,LucideArrowRightLeft:Nm,LucideArrowRightSquare:a1,LucideArrowRightToLine:Im,LucideArrowUp:Hm,LucideArrowUp01:Am,LucideArrowUp10:Em,LucideArrowUpAZ:ws,LucideArrowUpAz:ws,LucideArrowUpCircle:Js,LucideArrowUpDown:jm,LucideArrowUpFromDot:$m,LucideArrowUpFromLine:Pm,LucideArrowUpLeft:zm,LucideArrowUpLeftFromCircle:Zs,LucideArrowUpLeftFromSquare:o1,LucideArrowUpLeftSquare:i1,LucideArrowUpNarrowWide:Ms,LucideArrowUpRight:Tm,LucideArrowUpRightFromCircle:Ys,LucideArrowUpRightFromSquare:r1,LucideArrowUpRightSquare:l1,LucideArrowUpSquare:s1,LucideArrowUpToLine:Rm,LucideArrowUpWideNarrow:Dm,LucideArrowUpZA:bs,LucideArrowUpZa:bs,LucideArrowsUpFromLine:Om,LucideAsterisk:Fm,LucideAsteriskSquare:c1,LucideAtSign:qm,LucideAtom:Vm,LucideAudioLines:Bm,LucideAudioWaveform:Wm,LucideAward:Um,LucideAxe:Gm,LucideAxis3D:_s,LucideAxis3d:_s,LucideBaby:Km,LucideBackpack:Xm,LucideBadge:ug,LucideBadgeAlert:Ym,LucideBadgeCent:Zm,LucideBadgeCheck:Cs,LucideBadgeDollarSign:Qm,LucideBadgeEuro:eg,LucideBadgeHelp:Ss,LucideBadgeIndianRupee:Jm,LucideBadgeInfo:tg,LucideBadgeJapaneseYen:ng,LucideBadgeMinus:og,LucideBadgePercent:rg,LucideBadgePlus:ag,LucideBadgePoundSterling:ig,LucideBadgeQuestionMark:Ss,LucideBadgeRussianRuble:sg,LucideBadgeSwissFranc:cg,LucideBadgeTurkishLira:lg,LucideBadgeX:dg,LucideBaggageClaim:hg,LucideBalloon:fg,LucideBan:Z2,LucideBanana:pg,LucideBandage:yg,LucideBanknote:vg,LucideBanknoteArrowDown:mg,LucideBanknoteArrowUp:gg,LucideBanknoteX:kg,LucideBarChart:Os,LucideBarChart2:Fs,LucideBarChart3:Ds,LucideBarChart4:Ts,LucideBarChartBig:Rs,LucideBarChartHorizontal:Ps,LucideBarChartHorizontalBig:$s,LucideBarcode:xg,LucideBarrel:wg,LucideBaseline:Mg,LucideBath:bg,LucideBattery:Ag,LucideBatteryCharging:_g,LucideBatteryFull:Cg,LucideBatteryLow:Sg,LucideBatteryMedium:Lg,LucideBatteryPlus:Ng,LucideBatteryWarning:Ig,LucideBeaker:Eg,LucideBean:$g,LucideBeanOff:jg,LucideBed:Rg,LucideBedDouble:Pg,LucideBedSingle:zg,LucideBeef:Tg,LucideBeer:Hg,LucideBeerOff:Dg,LucideBell:Wg,LucideBellDot:Og,LucideBellElectric:Fg,LucideBellMinus:qg,LucideBellOff:Vg,LucideBellPlus:Bg,LucideBellRing:Ug,LucideBetweenHorizonalEnd:Ls,LucideBetweenHorizonalStart:Ns,LucideBetweenHorizontalEnd:Ls,LucideBetweenHorizontalStart:Ns,LucideBetweenVerticalEnd:Gg,LucideBetweenVerticalStart:Kg,LucideBicepsFlexed:Xg,LucideBike:Zg,LucideBinary:Yg,LucideBinoculars:Qg,LucideBiohazard:Jg,LucideBird:ek,LucideBirdhouse:tk,LucideBitcoin:nk,LucideBlend:ok,LucideBlinds:rk,LucideBlocks:ak,LucideBluetooth:lk,LucideBluetoothConnected:ik,LucideBluetoothOff:sk,LucideBluetoothSearching:ck,LucideBold:dk,LucideBolt:uk,LucideBomb:hk,LucideBone:fk,LucideBook:Dk,LucideBookA:pk,LucideBookAlert:yk,LucideBookAudio:mk,LucideBookCheck:gk,LucideBookCopy:kk,LucideBookDashed:Is,LucideBookDown:vk,LucideBookHeadphones:xk,LucideBookHeart:wk,LucideBookImage:Mk,LucideBookKey:bk,LucideBookLock:_k,LucideBookMarked:Ck,LucideBookMinus:Sk,LucideBookOpen:Ik,LucideBookOpenCheck:Lk,LucideBookOpenText:Nk,LucideBookPlus:Ak,LucideBookSearch:Ek,LucideBookTemplate:Is,LucideBookText:jk,LucideBookType:$k,LucideBookUp:zk,LucideBookUp2:Pk,LucideBookUser:Rk,LucideBookX:Tk,LucideBookmark:Vk,LucideBookmarkCheck:Hk,LucideBookmarkMinus:Ok,LucideBookmarkPlus:Fk,LucideBookmarkX:qk,LucideBoomBox:Bk,LucideBot:Wk,LucideBotMessageSquare:Uk,LucideBotOff:Gk,LucideBottleWine:Kk,LucideBowArrow:Xk,LucideBox:Zk,LucideBoxSelect:x1,LucideBoxes:Yk,LucideBraces:As,LucideBrackets:Qk,LucideBrain:t4,LucideBrainCircuit:Jk,LucideBrainCog:e4,LucideBrickWall:r4,LucideBrickWallFire:n4,LucideBrickWallShield:o4,LucideBriefcase:c4,LucideBriefcaseBusiness:a4,LucideBriefcaseConveyorBelt:i4,LucideBriefcaseMedical:s4,LucideBringToFront:l4,LucideBrush:h4,LucideBrushCleaning:d4,LucideBubbles:u4,LucideBug:y4,LucideBugOff:f4,LucideBugPlay:p4,LucideBuilding:m4,LucideBuilding2:g4,LucideBus:v4,LucideBusFront:k4,LucideCable:w4,LucideCableCar:x4,LucideCake:b4,LucideCakeSlice:M4,LucideCalculator:_4,LucideCalendar:U4,LucideCalendar1:C4,LucideCalendarArrowDown:S4,LucideCalendarArrowUp:L4,LucideCalendarCheck:I4,LucideCalendarCheck2:N4,LucideCalendarClock:A4,LucideCalendarCog:E4,LucideCalendarDays:j4,LucideCalendarFold:$4,LucideCalendarHeart:P4,LucideCalendarMinus:R4,LucideCalendarMinus2:z4,LucideCalendarOff:T4,LucideCalendarPlus:O4,LucideCalendarPlus2:D4,LucideCalendarRange:H4,LucideCalendarSearch:F4,LucideCalendarSync:q4,LucideCalendarX:B4,LucideCalendarX2:V4,LucideCalendars:W4,LucideCamera:K4,LucideCameraOff:G4,LucideCandlestickChart:zs,LucideCandy:Y4,LucideCandyCane:X4,LucideCandyOff:Z4,LucideCannabis:J4,LucideCannabisOff:Q4,LucideCaptions:Es,LucideCaptionsOff:e5,LucideCar:o5,LucideCarFront:t5,LucideCarTaxiFront:n5,LucideCaravan:r5,LucideCardSim:a5,LucideCarrot:i5,LucideCaseLower:s5,LucideCaseSensitive:c5,LucideCaseUpper:l5,LucideCassetteTape:d5,LucideCast:u5,LucideCastle:h5,LucideCat:f5,LucideCctv:p5,LucideChartArea:js,LucideChartBar:Ps,LucideChartBarBig:$s,LucideChartBarDecreasing:y5,LucideChartBarIncreasing:m5,LucideChartBarStacked:g5,LucideChartCandlestick:zs,LucideChartColumn:Ds,LucideChartColumnBig:Rs,LucideChartColumnDecreasing:k5,LucideChartColumnIncreasing:Ts,LucideChartColumnStacked:v5,LucideChartGantt:x5,LucideChartLine:Hs,LucideChartNetwork:w5,LucideChartNoAxesColumn:Fs,LucideChartNoAxesColumnDecreasing:M5,LucideChartNoAxesColumnIncreasing:Os,LucideChartNoAxesCombined:b5,LucideChartNoAxesGantt:qs,LucideChartPie:Vs,LucideChartScatter:Bs,LucideChartSpline:_5,LucideCheck:Ni,LucideCheckCheck:C5,LucideCheckCircle:ec,LucideCheckCircle2:li,LucideCheckLine:S5,LucideCheckSquare:u1,LucideCheckSquare2:h1,LucideChefHat:L5,LucideCherry:N5,LucideChessBishop:I5,LucideChessKing:A5,LucideChessKnight:E5,LucideChessPawn:j5,LucideChessQueen:$5,LucideChessRook:z5,LucideChevronDown:P5,LucideChevronDownCircle:tc,LucideChevronDownSquare:f1,LucideChevronFirst:R5,LucideChevronLast:T5,LucideChevronLeft:D5,LucideChevronLeftCircle:nc,LucideChevronLeftSquare:p1,LucideChevronRight:H5,LucideChevronRightCircle:oc,LucideChevronRightSquare:m1,LucideChevronUp:O5,LucideChevronUpCircle:rc,LucideChevronUpSquare:y1,LucideChevronsDown:q5,LucideChevronsDownUp:F5,LucideChevronsLeft:U5,LucideChevronsLeftRight:B5,LucideChevronsLeftRightEllipsis:V5,LucideChevronsRight:G5,LucideChevronsRightLeft:W5,LucideChevronsUp:X5,LucideChevronsUpDown:K5,LucideChrome:Us,LucideChromium:Us,LucideChurch:Z5,LucideCigarette:Q5,LucideCigaretteOff:Y5,LucideCircle:Y2,LucideCircleAlert:ci,LucideCircleArrowDown:Ws,LucideCircleArrowLeft:Ks,LucideCircleArrowOutDownLeft:Gs,LucideCircleArrowOutDownRight:Xs,LucideCircleArrowOutUpLeft:Zs,LucideCircleArrowOutUpRight:Ys,LucideCircleArrowRight:Qs,LucideCircleArrowUp:Js,LucideCircleCheck:li,LucideCircleCheckBig:ec,LucideCircleChevronDown:tc,LucideCircleChevronLeft:nc,LucideCircleChevronRight:oc,LucideCircleChevronUp:rc,LucideCircleDashed:J5,LucideCircleDivide:ac,LucideCircleDollarSign:ev,LucideCircleDot:nv,LucideCircleDotDashed:tv,LucideCircleEllipsis:ov,LucideCircleEqual:rv,LucideCircleFadingArrowUp:av,LucideCircleFadingPlus:iv,LucideCircleGauge:ic,LucideCircleHelp:qo,LucideCircleMinus:sc,LucideCircleOff:sv,LucideCircleParking:lc,LucideCircleParkingOff:cc,LucideCirclePause:dc,LucideCirclePercent:uc,LucideCirclePile:cv,LucideCirclePlay:hc,LucideCirclePlus:fc,LucideCirclePoundSterling:lv,LucideCirclePower:pc,LucideCircleQuestionMark:qo,LucideCircleSlash:dv,LucideCircleSlash2:yc,LucideCircleSlashed:yc,LucideCircleSmall:uv,LucideCircleStar:hv,LucideCircleStop:gc,LucideCircleUser:kc,LucideCircleUserRound:mc,LucideCircleX:vc,LucideCircuitBoard:fv,LucideCitrus:pv,LucideClapperboard:yv,LucideClipboard:Cv,LucideClipboardCheck:mv,LucideClipboardClock:gv,LucideClipboardCopy:kv,LucideClipboardEdit:wc,LucideClipboardList:vv,LucideClipboardMinus:xv,LucideClipboardPaste:wv,LucideClipboardPen:wc,LucideClipboardPenLine:xc,LucideClipboardPlus:Mv,LucideClipboardSignature:xc,LucideClipboardType:bv,LucideClipboardX:_v,LucideClock:Bv,LucideClock1:Sv,LucideClock10:Lv,LucideClock11:Nv,LucideClock12:Iv,LucideClock2:Av,LucideClock3:Ev,LucideClock4:jv,LucideClock5:$v,LucideClock6:Pv,LucideClock7:zv,LucideClock8:Rv,LucideClock9:Tv,LucideClockAlert:Dv,LucideClockArrowDown:Hv,LucideClockArrowUp:qv,LucideClockCheck:Ov,LucideClockFading:Fv,LucideClockPlus:Vv,LucideClosedCaption:Uv,LucideCloud:Q2,LucideCloudAlert:Wv,LucideCloudBackup:Gv,LucideCloudCheck:Kv,LucideCloudCog:Xv,LucideCloudDownload:Mc,LucideCloudDrizzle:Zv,LucideCloudFog:Yv,LucideCloudHail:Qv,LucideCloudLightning:Jv,LucideCloudMoon:tx,LucideCloudMoonRain:ex,LucideCloudOff:nx,LucideCloudRain:rx,LucideCloudRainWind:ox,LucideCloudSnow:ax,LucideCloudSun:sx,LucideCloudSunRain:ix,LucideCloudSync:cx,LucideCloudUpload:bc,LucideCloudy:lx,LucideClover:dx,LucideClub:ux,LucideCode:hx,LucideCode2:_c,LucideCodeSquare:g1,LucideCodeXml:_c,LucideCodepen:fx,LucideCodesandbox:px,LucideCoffee:yx,LucideCog:mx,LucideCoins:gx,LucideColumns:Cc,LucideColumns2:Cc,LucideColumns3:di,LucideColumns3Cog:_r,LucideColumns4:kx,LucideColumnsSettings:_r,LucideCombine:vx,LucideCommand:xx,LucideCompass:wx,LucideComponent:Mx,LucideComputer:bx,LucideConciergeBell:_x,LucideCone:Cx,LucideConstruction:Sx,LucideContact:Lx,LucideContact2:Sc,LucideContactRound:Sc,LucideContainer:Nx,LucideContrast:Ix,LucideCookie:Ax,LucideCookingPot:Ex,LucideCopy:Tx,LucideCopyCheck:jx,LucideCopyMinus:$x,LucideCopyPlus:Px,LucideCopySlash:zx,LucideCopyX:Rx,LucideCopyleft:Hx,LucideCopyright:Dx,LucideCornerDownLeft:Ox,LucideCornerDownRight:Fx,LucideCornerLeftDown:qx,LucideCornerLeftUp:Vx,LucideCornerRightDown:Ux,LucideCornerRightUp:Bx,LucideCornerUpLeft:Gx,LucideCornerUpRight:Wx,LucideCpu:Kx,LucideCreativeCommons:Xx,LucideCreditCard:Zx,LucideCroissant:Yx,LucideCrop:Qx,LucideCross:Jx,LucideCrosshair:e3,LucideCrown:t3,LucideCuboid:n3,LucideCupSoda:o3,LucideCurlyBraces:As,LucideCurrency:r3,LucideCylinder:a3,LucideDam:i3,LucideDatabase:J2,LucideDatabaseBackup:s3,LucideDatabaseSearch:c3,LucideDatabaseZap:l3,LucideDecimalsArrowLeft:d3,LucideDecimalsArrowRight:u3,LucideDelete:h3,LucideDessert:f3,LucideDiameter:p3,LucideDiamond:eh,LucideDiamondMinus:y3,LucideDiamondPercent:Lc,LucideDiamondPlus:m3,LucideDice1:g3,LucideDice2:v3,LucideDice3:k3,LucideDice4:x3,LucideDice5:w3,LucideDice6:M3,LucideDices:b3,LucideDiff:_3,LucideDisc:N3,LucideDisc2:C3,LucideDisc3:L3,LucideDiscAlbum:S3,LucideDivide:I3,LucideDivideCircle:ac,LucideDivideSquare:w1,LucideDna:E3,LucideDnaOff:A3,LucideDock:j3,LucideDog:$3,LucideDollarSign:P3,LucideDonut:z3,LucideDoorClosed:T3,LucideDoorClosedLocked:R3,LucideDoorOpen:D3,LucideDot:H3,LucideDotSquare:M1,LucideDownload:i0,LucideDownloadCloud:Mc,LucideDraftingCompass:O3,LucideDrama:F3,LucideDribbble:q3,LucideDrill:V3,LucideDrone:B3,LucideDroplet:W3,LucideDropletOff:U3,LucideDroplets:G3,LucideDrum:K3,LucideDrumstick:X3,LucideDumbbell:Z3,LucideEar:Y3,LucideEarOff:Q3,LucideEarth:Nc,LucideEarthLock:J3,LucideEclipse:e8,LucideEdit:eo,LucideEdit2:Dl,LucideEdit3:Tl,LucideEgg:o8,LucideEggFried:t8,LucideEggOff:n8,LucideEllipsis:Ac,LucideEllipsisVertical:Ic,LucideEqual:i8,LucideEqualApproximately:r8,LucideEqualNot:a8,LucideEqualSquare:b1,LucideEraser:s8,LucideEthernetPort:c8,LucideEuro:l8,LucideEvCharger:d8,LucideExpand:u8,LucideExternalLink:th,LucideEye:p8,LucideEyeClosed:h8,LucideEyeOff:f8,LucideFacebook:y8,LucideFactory:m8,LucideFan:k8,LucideFastForward:g8,LucideFeather:v8,LucideFence:x8,LucideFerrisWheel:w8,LucideFigma:M8,LucideFile:Z8,LucideFileArchive:b8,LucideFileAudio:Cr,LucideFileAudio2:Cr,LucideFileAxis3D:Ec,LucideFileAxis3d:Ec,LucideFileBadge:jc,LucideFileBadge2:jc,LucideFileBarChart:zc,LucideFileBarChart2:Rc,LucideFileBox:_8,LucideFileBraces:Pc,LucideFileBracesCorner:$c,LucideFileChartColumn:Rc,LucideFileChartColumnIncreasing:zc,LucideFileChartLine:Tc,LucideFileChartPie:Dc,LucideFileCheck:C8,LucideFileCheck2:Hc,LucideFileCheckCorner:Hc,LucideFileClock:L8,LucideFileCode:S8,LucideFileCode2:Oc,LucideFileCodeCorner:Oc,LucideFileCog:Fc,LucideFileCog2:Fc,LucideFileDiff:N8,LucideFileDigit:I8,LucideFileDown:nh,LucideFileEdit:Gc,LucideFileExclamationPoint:qc,LucideFileHeadphone:Cr,LucideFileHeart:A8,LucideFileImage:E8,LucideFileInput:j8,LucideFileJson:Pc,LucideFileJson2:$c,LucideFileKey:Vc,LucideFileKey2:Vc,LucideFileLineChart:Tc,LucideFileLock:Bc,LucideFileLock2:Bc,LucideFileMinus:$8,LucideFileMinus2:Uc,LucideFileMinusCorner:Uc,LucideFileMusic:z8,LucideFileOutput:P8,LucideFilePen:Gc,LucideFilePenLine:Wc,LucideFilePieChart:Dc,LucideFilePlay:Kc,LucideFilePlus:R8,LucideFilePlus2:Xc,LucideFilePlusCorner:Xc,LucideFileQuestion:Zc,LucideFileQuestionMark:Zc,LucideFileScan:T8,LucideFileSearch:D8,LucideFileSearch2:Yc,LucideFileSearchCorner:Yc,LucideFileSignal:Qc,LucideFileSignature:Wc,LucideFileSliders:H8,LucideFileSpreadsheet:O8,LucideFileStack:F8,LucideFileSymlink:q8,LucideFileTerminal:V8,LucideFileText:B8,LucideFileType:U8,LucideFileType2:Jc,LucideFileTypeCorner:Jc,LucideFileUp:W8,LucideFileUser:G8,LucideFileVideo:Kc,LucideFileVideo2:el,LucideFileVideoCamera:el,LucideFileVolume:K8,LucideFileVolume2:Qc,LucideFileWarning:qc,LucideFileX:X8,LucideFileX2:tl,LucideFileXCorner:tl,LucideFiles:Y8,LucideFilm:Q8,LucideFilter:il,LucideFilterX:al,LucideFingerprint:nl,LucideFingerprintPattern:nl,LucideFireExtinguisher:J8,LucideFish:n6,LucideFishOff:e6,LucideFishSymbol:t6,LucideFishingHook:o6,LucideFlag:s6,LucideFlagOff:r6,LucideFlagTriangleLeft:a6,LucideFlagTriangleRight:i6,LucideFlame:l6,LucideFlameKindling:c6,LucideFlashlight:u6,LucideFlashlightOff:d6,LucideFlaskConical:p6,LucideFlaskConicalOff:h6,LucideFlaskRound:f6,LucideFlipHorizontal:m6,LucideFlipHorizontal2:y6,LucideFlipVertical:k6,LucideFlipVertical2:g6,LucideFlower:x6,LucideFlower2:v6,LucideFocus:w6,LucideFoldHorizontal:M6,LucideFoldVertical:b6,LucideFolder:Z6,LucideFolderArchive:_6,LucideFolderCheck:C6,LucideFolderClock:S6,LucideFolderClosed:N6,LucideFolderCode:L6,LucideFolderCog:ol,LucideFolderCog2:ol,LucideFolderDot:I6,LucideFolderDown:A6,LucideFolderEdit:rl,LucideFolderGit:j6,LucideFolderGit2:E6,LucideFolderHeart:$6,LucideFolderInput:P6,LucideFolderKanban:z6,LucideFolderKey:R6,LucideFolderLock:T6,LucideFolderMinus:D6,LucideFolderOpen:oh,LucideFolderOpenDot:H6,LucideFolderOutput:O6,LucideFolderPen:rl,LucideFolderPlus:F6,LucideFolderRoot:q6,LucideFolderSearch:B6,LucideFolderSearch2:V6,LucideFolderSymlink:U6,LucideFolderSync:W6,LucideFolderTree:G6,LucideFolderUp:K6,LucideFolderX:X6,LucideFolders:Y6,LucideFootprints:Q6,LucideForkKnife:ud,LucideForkKnifeCrossed:dd,LucideForklift:tw,LucideForm:J6,LucideFormInput:Ol,LucideForward:ew,LucideFrame:nw,LucideFramer:aw,LucideFrown:ow,LucideFuel:rw,LucideFullscreen:iw,LucideFunctionSquare:_1,LucideFunnel:il,LucideFunnelPlus:sw,LucideFunnelX:al,LucideGalleryHorizontal:lw,LucideGalleryHorizontalEnd:cw,LucideGalleryThumbnails:dw,LucideGalleryVertical:hw,LucideGalleryVerticalEnd:uw,LucideGamepad:mw,LucideGamepad2:fw,LucideGamepadDirectional:pw,LucideGanttChart:qs,LucideGanttChartSquare:Ir,LucideGauge:yw,LucideGaugeCircle:ic,LucideGavel:gw,LucideGem:kw,LucideGeorgianLari:vw,LucideGhost:ww,LucideGift:xw,LucideGitBranch:_w,LucideGitBranchMinus:Mw,LucideGitBranchPlus:bw,LucideGitCommit:sl,LucideGitCommitHorizontal:sl,LucideGitCommitVertical:Cw,LucideGitCompare:Lw,LucideGitCompareArrows:Sw,LucideGitFork:Nw,LucideGitGraph:Iw,LucideGitMerge:Aw,LucideGitPullRequest:Rw,LucideGitPullRequestArrow:Ew,LucideGitPullRequestClosed:jw,LucideGitPullRequestCreate:Pw,LucideGitPullRequestCreateArrow:$w,LucideGitPullRequestDraft:zw,LucideGithub:Tw,LucideGitlab:Dw,LucideGlassWater:Hw,LucideGlasses:Ow,LucideGlobe:Vw,LucideGlobe2:Nc,LucideGlobeLock:Fw,LucideGlobeX:qw,LucideGoal:Bw,LucideGpu:Uw,LucideGrab:hl,LucideGraduationCap:Ww,LucideGrape:Gw,LucideGrid:Sr,LucideGrid2X2:ul,LucideGrid2X2Check:cl,LucideGrid2X2Plus:ll,LucideGrid2X2X:dl,LucideGrid2x2:ul,LucideGrid2x2Check:cl,LucideGrid2x2Plus:ll,LucideGrid2x2X:dl,LucideGrid3X3:Sr,LucideGrid3x2:Kw,LucideGrid3x3:Sr,LucideGrip:Zw,LucideGripHorizontal:Xw,LucideGripVertical:Yw,LucideGroup:Qw,LucideGuitar:Jw,LucideHam:e7,LucideHamburger:t7,LucideHammer:n7,LucideHand:rh,LucideHandCoins:o7,LucideHandFist:r7,LucideHandGrab:hl,LucideHandHeart:a7,LucideHandHelping:fl,LucideHandMetal:i7,LucideHandPlatter:s7,LucideHandbag:c7,LucideHandshake:l7,LucideHardDrive:h7,LucideHardDriveDownload:d7,LucideHardDriveUpload:u7,LucideHardHat:f7,LucideHash:p7,LucideHatGlasses:y7,LucideHaze:m7,LucideHd:g7,LucideHdmiPort:k7,LucideHeading:C7,LucideHeading1:v7,LucideHeading2:x7,LucideHeading3:w7,LucideHeading4:M7,LucideHeading5:b7,LucideHeading6:_7,LucideHeadphoneOff:S7,LucideHeadphones:L7,LucideHeadset:N7,LucideHeart:z7,LucideHeartCrack:I7,LucideHeartHandshake:E7,LucideHeartMinus:A7,LucideHeartOff:j7,LucideHeartPlus:$7,LucideHeartPulse:P7,LucideHeater:R7,LucideHelicopter:T7,LucideHelpCircle:qo,LucideHelpingHand:fl,LucideHexagon:ah,LucideHighlighter:D7,LucideHistory:H7,LucideHome:pl,LucideHop:O7,LucideHopOff:F7,LucideHospital:q7,LucideHotel:V7,LucideHourglass:B7,LucideHouse:pl,LucideHouseHeart:U7,LucideHousePlug:W7,LucideHousePlus:G7,LucideHouseWifi:K7,LucideIceCream:ml,LucideIceCream2:yl,LucideIceCreamBowl:yl,LucideIceCreamCone:ml,LucideIdCard:Z7,LucideIdCardLanyard:X7,LucideImage:sh,LucideImageDown:Y7,LucideImageMinus:J7,LucideImageOff:Q7,LucideImagePlay:eM,LucideImagePlus:ih,LucideImageUp:tM,LucideImageUpscale:nM,LucideImages:oM,LucideImport:rM,LucideInbox:aM,LucideIndent:Nr,LucideIndentDecrease:Lr,LucideIndentIncrease:Nr,LucideIndianRupee:iM,LucideInfinity:cM,LucideInfo:sM,LucideInspect:A1,LucideInspectionPanel:lM,LucideInstagram:dM,LucideItalic:uM,LucideIterationCcw:hM,LucideIterationCw:fM,LucideJapaneseYen:pM,LucideJoystick:yM,LucideKanban:mM,LucideKanbanSquare:C1,LucideKanbanSquareDashed:k1,LucideKayak:gM,LucideKey:xM,LucideKeyRound:kM,LucideKeySquare:vM,LucideKeyboard:bM,LucideKeyboardMusic:wM,LucideKeyboardOff:MM,LucideLamp:IM,LucideLampCeiling:_M,LucideLampDesk:CM,LucideLampFloor:SM,LucideLampWallDown:LM,LucideLampWallUp:NM,LucideLandPlot:AM,LucideLandmark:EM,LucideLanguages:jM,LucideLaptop:zM,LucideLaptop2:gl,LucideLaptopMinimal:gl,LucideLaptopMinimalCheck:$M,LucideLasso:RM,LucideLassoSelect:PM,LucideLaugh:TM,LucideLayers:ka,LucideLayers2:DM,LucideLayers3:ka,LucideLayersPlus:HM,LucideLayout:Rl,LucideLayoutDashboard:ch,LucideLayoutGrid:OM,LucideLayoutList:FM,LucideLayoutPanelLeft:qM,LucideLayoutPanelTop:BM,LucideLayoutTemplate:VM,LucideLeaf:UM,LucideLeafyGreen:WM,LucideLectern:GM,LucideLetterText:Z1,LucideLibrary:XM,LucideLibraryBig:KM,LucideLibrarySquare:S1,LucideLifeBuoy:ZM,LucideLigature:YM,LucideLightbulb:JM,LucideLightbulbOff:QM,LucideLineChart:Hs,LucideLineSquiggle:eb,LucideLink:nb,LucideLink2:Ii,LucideLink2Off:tb,LucideLinkedin:ob,LucideList:Mb,LucideListCheck:rb,LucideListChecks:ab,LucideListChevronsDownUp:ib,LucideListChevronsUpDown:cb,LucideListCollapse:sb,LucideListEnd:lb,LucideListFilter:ub,LucideListFilterPlus:db,LucideListIndentDecrease:Lr,LucideListIndentIncrease:Nr,LucideListMinus:hb,LucideListMusic:fb,LucideListOrdered:pb,LucideListPlus:yb,LucideListRestart:mb,LucideListStart:gb,LucideListTodo:kb,LucideListTree:vb,LucideListVideo:xb,LucideListX:wb,LucideLoader:_b,LucideLoader2:Vn,LucideLoaderCircle:Vn,LucideLoaderPinwheel:bb,LucideLocate:Lb,LucideLocateFixed:Cb,LucideLocateOff:Sb,LucideLocationEdit:wl,LucideLock:Ib,LucideLockKeyhole:Nb,LucideLockKeyholeOpen:kl,LucideLockOpen:vl,LucideLogIn:Ab,LucideLogOut:Eb,LucideLogs:jb,LucideLollipop:$b,LucideLuggage:Pb,LucideMSquare:L1,LucideMagnet:zb,LucideMail:Vb,LucideMailCheck:Rb,LucideMailMinus:Tb,LucideMailOpen:Db,LucideMailPlus:Hb,LucideMailQuestion:xl,LucideMailQuestionMark:xl,LucideMailSearch:Ob,LucideMailWarning:Fb,LucideMailX:qb,LucideMailbox:Ub,LucideMails:Bb,LucideMap:i9,LucideMapMinus:Wb,LucideMapPin:o9,LucideMapPinCheck:Kb,LucideMapPinCheckInside:Gb,LucideMapPinHouse:Xb,LucideMapPinMinus:Yb,LucideMapPinMinusInside:Zb,LucideMapPinOff:Qb,LucideMapPinPen:wl,LucideMapPinPlus:e9,LucideMapPinPlusInside:Jb,LucideMapPinX:t9,LucideMapPinXInside:n9,LucideMapPinned:r9,LucideMapPlus:a9,LucideMars:c9,LucideMarsStroke:s9,LucideMartini:l9,LucideMaximize:d9,LucideMaximize2:Md,LucideMedal:u9,LucideMegaphone:f9,LucideMegaphoneOff:h9,LucideMeh:p9,LucideMemoryStick:y9,LucideMenu:g9,LucideMenuSquare:N1,LucideMerge:m9,LucideMessageCircle:L9,LucideMessageCircleCode:k9,LucideMessageCircleDashed:v9,LucideMessageCircleHeart:x9,LucideMessageCircleMore:w9,LucideMessageCircleOff:M9,LucideMessageCirclePlus:b9,LucideMessageCircleQuestion:Ml,LucideMessageCircleQuestionMark:Ml,LucideMessageCircleReply:_9,LucideMessageCircleWarning:C9,LucideMessageCircleX:S9,LucideMessageSquare:V9,LucideMessageSquareCode:N9,LucideMessageSquareDashed:I9,LucideMessageSquareDiff:A9,LucideMessageSquareDot:E9,LucideMessageSquareHeart:j9,LucideMessageSquareLock:$9,LucideMessageSquareMore:P9,LucideMessageSquareOff:z9,LucideMessageSquarePlus:R9,LucideMessageSquareQuote:T9,LucideMessageSquareReply:D9,LucideMessageSquareShare:H9,LucideMessageSquareText:O9,LucideMessageSquareWarning:F9,LucideMessageSquareX:q9,LucideMessagesSquare:B9,LucideMic:W9,LucideMic2:bl,LucideMicOff:U9,LucideMicVocal:bl,LucideMicrochip:G9,LucideMicroscope:K9,LucideMicrowave:X9,LucideMilestone:Z9,LucideMilk:Q9,LucideMilkOff:Y9,LucideMinimize:e_,LucideMinimize2:J9,LucideMinus:lh,LucideMinusCircle:sc,LucideMinusSquare:I1,LucideMonitor:p_,LucideMonitorCheck:t_,LucideMonitorCloud:n_,LucideMonitorCog:o_,LucideMonitorDot:r_,LucideMonitorDown:a_,LucideMonitorOff:i_,LucideMonitorPause:s_,LucideMonitorPlay:c_,LucideMonitorSmartphone:l_,LucideMonitorSpeaker:d_,LucideMonitorStop:u_,LucideMonitorUp:h_,LucideMonitorX:f_,LucideMoon:m_,LucideMoonStar:y_,LucideMoreHorizontal:Ac,LucideMoreVertical:Ic,LucideMotorbike:g_,LucideMountain:v_,LucideMountainSnow:k_,LucideMouse:C_,LucideMouseOff:x_,LucideMousePointer:__,LucideMousePointer2:dh,LucideMousePointer2Off:w_,LucideMousePointerBan:M_,LucideMousePointerClick:b_,LucideMousePointerSquareDashed:v1,LucideMove:T_,LucideMove3D:_l,LucideMove3d:_l,LucideMoveDiagonal:L_,LucideMoveDiagonal2:S_,LucideMoveDown:A_,LucideMoveDownLeft:N_,LucideMoveDownRight:I_,LucideMoveHorizontal:E_,LucideMoveLeft:uh,LucideMoveRight:j_,LucideMoveUp:z_,LucideMoveUpLeft:$_,LucideMoveUpRight:P_,LucideMoveVertical:R_,LucideMusic:F_,LucideMusic2:D_,LucideMusic3:H_,LucideMusic4:O_,LucideNavigation:U_,LucideNavigation2:V_,LucideNavigation2Off:q_,LucideNavigationOff:B_,LucideNetwork:W_,LucideNewspaper:G_,LucideNfc:K_,LucideNonBinary:X_,LucideNotebook:J_,LucideNotebookPen:Z_,LucideNotebookTabs:Y_,LucideNotebookText:Q_,LucideNotepadText:tC,LucideNotepadTextDashed:eC,LucideNut:nC,LucideNutOff:oC,LucideOctagon:aC,LucideOctagonAlert:Cl,LucideOctagonMinus:rC,LucideOctagonPause:Sl,LucideOctagonX:Ll,LucideOmega:iC,LucideOption:cC,LucideOrbit:sC,LucideOrigami:lC,LucideOutdent:Lr,LucidePackage:gC,LucidePackage2:dC,LucidePackageCheck:uC,LucidePackageMinus:hC,LucidePackageOpen:fC,LucidePackagePlus:pC,LucidePackageSearch:yC,LucidePackageX:mC,LucidePaintBucket:kC,LucidePaintRoller:vC,LucidePaintbrush:xC,LucidePaintbrush2:Nl,LucidePaintbrushVertical:Nl,LucidePalette:wC,LucidePalmtree:ed,LucidePanda:MC,LucidePanelBottom:_C,LucidePanelBottomClose:bC,LucidePanelBottomDashed:Il,LucidePanelBottomInactive:Il,LucidePanelBottomOpen:CC,LucidePanelLeft:$l,LucidePanelLeftClose:Al,LucidePanelLeftDashed:El,LucidePanelLeftInactive:El,LucidePanelLeftOpen:jl,LucidePanelLeftRightDashed:SC,LucidePanelRight:LC,LucidePanelRightClose:hh,LucidePanelRightDashed:Pl,LucidePanelRightInactive:Pl,LucidePanelRightOpen:fh,LucidePanelTop:EC,LucidePanelTopBottomDashed:NC,LucidePanelTopClose:IC,LucidePanelTopDashed:zl,LucidePanelTopInactive:zl,LucidePanelTopOpen:AC,LucidePanelsLeftBottom:jC,LucidePanelsLeftRight:di,LucidePanelsRightBottom:$C,LucidePanelsTopBottom:Vl,LucidePanelsTopLeft:Rl,LucidePaperclip:PC,LucideParentheses:RC,LucideParkingCircle:lc,LucideParkingCircleOff:cc,LucideParkingMeter:zC,LucideParkingSquare:j1,LucideParkingSquareOff:E1,LucidePartyPopper:TC,LucidePause:DC,LucidePauseCircle:dc,LucidePauseOctagon:Sl,LucidePawPrint:HC,LucidePcCase:OC,LucidePen:Dl,LucidePenBox:eo,LucidePenLine:Tl,LucidePenOff:FC,LucidePenSquare:eo,LucidePenTool:qC,LucidePencil:yh,LucidePencilLine:ph,LucidePencilOff:VC,LucidePencilRuler:BC,LucidePentagon:UC,LucidePercent:WC,LucidePercentCircle:uc,LucidePercentDiamond:Lc,LucidePercentSquare:$1,LucidePersonStanding:KC,LucidePhilippinePeso:GC,LucidePhone:tS,LucidePhoneCall:XC,LucidePhoneForwarded:ZC,LucidePhoneIncoming:YC,LucidePhoneMissed:QC,LucidePhoneOff:JC,LucidePhoneOutgoing:eS,LucidePi:nS,LucidePiSquare:R1,LucidePiano:oS,LucidePickaxe:rS,LucidePictureInPicture:iS,LucidePictureInPicture2:aS,LucidePieChart:Vs,LucidePiggyBank:sS,LucidePilcrow:dS,LucidePilcrowLeft:cS,LucidePilcrowRight:lS,LucidePilcrowSquare:P1,LucidePill:hS,LucidePillBottle:uS,LucidePin:pS,LucidePinOff:fS,LucidePipette:yS,LucidePizza:mS,LucidePlane:vS,LucidePlaneLanding:gS,LucidePlaneTakeoff:kS,LucidePlay:bd,LucidePlayCircle:hc,LucidePlaySquare:z1,LucidePlug:wS,LucidePlug2:xS,LucidePlugZap:Hl,LucidePlugZap2:Hl,LucidePlus:mh,LucidePlusCircle:fc,LucidePlusSquare:T1,LucidePocket:bS,LucidePocketKnife:MS,LucidePodcast:CS,LucidePointer:SS,LucidePointerOff:_S,LucidePopcorn:LS,LucidePopsicle:NS,LucidePoundSterling:IS,LucidePower:ES,LucidePowerCircle:pc,LucidePowerOff:AS,LucidePowerSquare:D1,LucidePresentation:jS,LucidePrinter:zS,LucidePrinterCheck:$S,LucidePrinterX:PS,LucideProjector:TS,LucideProportions:RS,LucidePuzzle:DS,LucidePyramid:HS,LucideQrCode:OS,LucideQuote:FS,LucideRabbit:qS,LucideRadar:VS,LucideRadiation:BS,LucideRadical:US,LucideRadio:KS,LucideRadioReceiver:WS,LucideRadioTower:GS,LucideRadius:XS,LucideRailSymbol:ZS,LucideRainbow:YS,LucideRat:QS,LucideRatio:JS,LucideReceipt:lL,LucideReceiptCent:eL,LucideReceiptEuro:tL,LucideReceiptIndianRupee:nL,LucideReceiptJapaneseYen:oL,LucideReceiptPoundSterling:rL,LucideReceiptRussianRuble:aL,LucideReceiptSwissFranc:iL,LucideReceiptText:sL,LucideReceiptTurkishLira:cL,LucideRectangleCircle:dL,LucideRectangleEllipsis:Ol,LucideRectangleGoggles:uL,LucideRectangleHorizontal:hL,LucideRectangleVertical:fL,LucideRecycle:pL,LucideRedo:gL,LucideRedo2:yL,LucideRedoDot:mL,LucideRefreshCcw:xL,LucideRefreshCcwDot:kL,LucideRefreshCw:wL,LucideRefreshCwOff:vL,LucideRefrigerator:ML,LucideRegex:bL,LucideRemoveFormatting:_L,LucideRepeat:LL,LucideRepeat1:SL,LucideRepeat2:CL,LucideReplace:IL,LucideReplaceAll:NL,LucideReply:EL,LucideReplyAll:AL,LucideRewind:jL,LucideRibbon:PL,LucideRocket:$L,LucideRockingChair:zL,LucideRollerCoaster:RL,LucideRose:TL,LucideRotate3D:Fl,LucideRotate3d:Fl,LucideRotateCcw:OL,LucideRotateCcwKey:DL,LucideRotateCcwSquare:HL,LucideRotateCw:qL,LucideRotateCwSquare:FL,LucideRoute:BL,LucideRouteOff:VL,LucideRouter:UL,LucideRows:ql,LucideRows2:ql,LucideRows3:Vl,LucideRows4:WL,LucideRss:GL,LucideRuler:XL,LucideRulerDimensionLine:KL,LucideRussianRuble:ZL,LucideSailboat:YL,LucideSalad:QL,LucideSandwich:JL,LucideSatellite:tN,LucideSatelliteDish:eN,LucideSaudiRiyal:nN,LucideSave:aN,LucideSaveAll:oN,LucideSaveOff:rN,LucideScale:iN,LucideScale3D:Bl,LucideScale3d:Bl,LucideScaling:sN,LucideScan:mN,LucideScanBarcode:cN,LucideScanEye:lN,LucideScanFace:dN,LucideScanHeart:uN,LucideScanLine:hN,LucideScanQrCode:fN,LucideScanSearch:pN,LucideScanText:yN,LucideScatterChart:Bs,LucideSchool:gN,LucideSchool2:nd,LucideScissors:xN,LucideScissorsLineDashed:kN,LucideScissorsSquare:H1,LucideScissorsSquareDashedBottom:d1,LucideScooter:vN,LucideScreenShare:MN,LucideScreenShareOff:wN,LucideScroll:_N,LucideScrollText:bN,LucideSearch:gh,LucideSearchAlert:CN,LucideSearchCheck:SN,LucideSearchCode:LN,LucideSearchSlash:NN,LucideSearchX:IN,LucideSection:AN,LucideSend:jN,LucideSendHorizonal:Ul,LucideSendHorizontal:Ul,LucideSendToBack:EN,LucideSeparatorHorizontal:PN,LucideSeparatorVertical:$N,LucideServer:kh,LucideServerCog:zN,LucideServerCrash:RN,LucideServerOff:TN,LucideSettings:HN,LucideSettings2:DN,LucideShapes:vh,LucideShare:ON,LucideShare2:xh,LucideSheet:FN,LucideShell:qN,LucideShield:QN,LucideShieldAlert:VN,LucideShieldBan:BN,LucideShieldCheck:UN,LucideShieldClose:Gl,LucideShieldEllipsis:WN,LucideShieldHalf:GN,LucideShieldMinus:KN,LucideShieldOff:XN,LucideShieldPlus:ZN,LucideShieldQuestion:Wl,LucideShieldQuestionMark:Wl,LucideShieldUser:YN,LucideShieldX:Gl,LucideShip:tI,LucideShipWheel:JN,LucideShirt:eI,LucideShoppingBag:oI,LucideShoppingBasket:nI,LucideShoppingCart:rI,LucideShovel:aI,LucideShowerHead:iI,LucideShredder:sI,LucideShrimp:cI,LucideShrink:lI,LucideShrub:dI,LucideShuffle:uI,LucideSidebar:$l,LucideSidebarClose:Al,LucideSidebarOpen:jl,LucideSigma:hI,LucideSigmaSquare:O1,LucideSignal:gI,LucideSignalHigh:fI,LucideSignalLow:pI,LucideSignalMedium:yI,LucideSignalZero:mI,LucideSignature:kI,LucideSignpost:xI,LucideSignpostBig:vI,LucideSiren:wI,LucideSkipBack:MI,LucideSkipForward:bI,LucideSkull:_I,LucideSlack:CI,LucideSlash:SI,LucideSlashSquare:F1,LucideSlice:LI,LucideSliders:Kl,LucideSlidersHorizontal:NI,LucideSlidersVertical:Kl,LucideSmartphone:EI,LucideSmartphoneCharging:II,LucideSmartphoneNfc:AI,LucideSmile:$I,LucideSmilePlus:jI,LucideSnail:PI,LucideSnowflake:zI,LucideSoapDispenserDroplet:RI,LucideSofa:TI,LucideSolarPanel:DI,LucideSortAsc:Ms,LucideSortDesc:vs,LucideSoup:HI,LucideSpace:OI,LucideSpade:FI,LucideSparkle:qI,LucideSparkles:Xl,LucideSpeaker:VI,LucideSpeech:BI,LucideSpellCheck:WI,LucideSpellCheck2:UI,LucideSpline:GI,LucideSplinePointer:KI,LucideSplit:XI,LucideSplitSquareHorizontal:q1,LucideSplitSquareVertical:V1,LucideSpool:ZI,LucideSpotlight:YI,LucideSprayCan:QI,LucideSprout:JI,LucideSquare:s0,LucideSquareActivity:Zl,LucideSquareArrowDown:Jl,LucideSquareArrowDownLeft:Yl,LucideSquareArrowDownRight:Ql,LucideSquareArrowLeft:e1,LucideSquareArrowOutDownLeft:t1,LucideSquareArrowOutDownRight:n1,LucideSquareArrowOutUpLeft:o1,LucideSquareArrowOutUpRight:r1,LucideSquareArrowRight:a1,LucideSquareArrowUp:s1,LucideSquareArrowUpLeft:i1,LucideSquareArrowUpRight:l1,LucideSquareAsterisk:c1,LucideSquareBottomDashedScissors:d1,LucideSquareChartGantt:Ir,LucideSquareCheck:h1,LucideSquareCheckBig:u1,LucideSquareChevronDown:f1,LucideSquareChevronLeft:p1,LucideSquareChevronRight:m1,LucideSquareChevronUp:y1,LucideSquareCode:g1,LucideSquareDashed:x1,LucideSquareDashedBottom:tA,LucideSquareDashedBottomCode:eA,LucideSquareDashedKanban:k1,LucideSquareDashedMousePointer:v1,LucideSquareDashedTopSolid:nA,LucideSquareDivide:w1,LucideSquareDot:M1,LucideSquareEqual:b1,LucideSquareFunction:_1,LucideSquareGanttChart:Ir,LucideSquareKanban:C1,LucideSquareLibrary:S1,LucideSquareM:L1,LucideSquareMenu:N1,LucideSquareMinus:I1,LucideSquareMousePointer:A1,LucideSquareParking:j1,LucideSquareParkingOff:E1,LucideSquarePause:oA,LucideSquarePen:eo,LucideSquarePercent:$1,LucideSquarePi:R1,LucideSquarePilcrow:P1,LucideSquarePlay:z1,LucideSquarePlus:T1,LucideSquarePower:D1,LucideSquareRadical:rA,LucideSquareRoundCorner:aA,LucideSquareScissors:H1,LucideSquareSigma:O1,LucideSquareSlash:F1,LucideSquareSplitHorizontal:q1,LucideSquareSplitVertical:V1,LucideSquareSquare:sA,LucideSquareStack:iA,LucideSquareStar:lA,LucideSquareStop:cA,LucideSquareTerminal:B1,LucideSquareUser:W1,LucideSquareUserRound:U1,LucideSquareX:G1,LucideSquaresExclude:dA,LucideSquaresIntersect:uA,LucideSquaresSubtract:hA,LucideSquaresUnite:fA,LucideSquircle:c0,LucideSquircleDashed:pA,LucideSquirrel:yA,LucideStamp:mA,LucideStar:vA,LucideStarHalf:gA,LucideStarOff:kA,LucideStars:Xl,LucideStepBack:xA,LucideStepForward:wA,LucideStethoscope:MA,LucideSticker:l0,LucideStickyNote:wh,LucideStone:bA,LucideStopCircle:gc,LucideStore:_A,LucideStretchHorizontal:SA,LucideStretchVertical:CA,LucideStrikethrough:LA,LucideSubscript:NA,LucideSubtitles:Es,LucideSun:$A,LucideSunDim:IA,LucideSunMedium:AA,LucideSunMoon:EA,LucideSunSnow:jA,LucideSunrise:PA,LucideSunset:zA,LucideSuperscript:RA,LucideSwatchBook:TA,LucideSwissFranc:DA,LucideSwitchCamera:HA,LucideSword:OA,LucideSwords:FA,LucideSyringe:qA,LucideTable:ZA,LucideTable2:VA,LucideTableCellsMerge:BA,LucideTableCellsSplit:UA,LucideTableColumnsSplit:WA,LucideTableConfig:_r,LucideTableOfContents:GA,LucideTableProperties:KA,LucideTableRowsSplit:XA,LucideTablet:QA,LucideTabletSmartphone:YA,LucideTablets:JA,LucideTag:eE,LucideTags:tE,LucideTally1:nE,LucideTally2:oE,LucideTally3:rE,LucideTally4:aE,LucideTally5:iE,LucideTangent:sE,LucideTarget:cE,LucideTelescope:lE,LucideTent:uE,LucideTentTree:dE,LucideTerminal:hE,LucideTerminalSquare:B1,LucideTestTube:fE,LucideTestTube2:K1,LucideTestTubeDiagonal:K1,LucideTestTubes:pE,LucideText:Vo,LucideTextAlignCenter:ui,LucideTextAlignEnd:hi,LucideTextAlignJustify:X1,LucideTextAlignStart:Vo,LucideTextCursor:mE,LucideTextCursorInput:yE,LucideTextInitial:Z1,LucideTextQuote:gE,LucideTextSearch:kE,LucideTextSelect:Y1,LucideTextSelection:Y1,LucideTextWrap:Q1,LucideTheater:vE,LucideThermometer:ME,LucideThermometerSnowflake:xE,LucideThermometerSun:wE,LucideThumbsDown:bE,LucideThumbsUp:_E,LucideTicket:EE,LucideTicketCheck:CE,LucideTicketMinus:SE,LucideTicketPercent:LE,LucideTicketPlus:NE,LucideTicketSlash:IE,LucideTicketX:AE,LucideTickets:$E,LucideTicketsPlane:jE,LucideTimer:RE,LucideTimerOff:PE,LucideTimerReset:zE,LucideToggleLeft:TE,LucideToggleRight:DE,LucideToilet:HE,LucideToolCase:FE,LucideToolbox:OE,LucideTornado:qE,LucideTorus:VE,LucideTouchpad:UE,LucideTouchpadOff:BE,LucideTowerControl:WE,LucideToyBrick:GE,LucideTractor:KE,LucideTrafficCone:XE,LucideTrain:J1,LucideTrainFront:YE,LucideTrainFrontTunnel:ZE,LucideTrainTrack:QE,LucideTramFront:J1,LucideTransgender:JE,LucideTrash:ej,LucideTrash2:Mh,LucideTreeDeciduous:tj,LucideTreePalm:ed,LucideTreePine:nj,LucideTrees:oj,LucideTrello:rj,LucideTrendingDown:aj,LucideTrendingUp:sj,LucideTrendingUpDown:ij,LucideTriangle:dj,LucideTriangleAlert:Pr,LucideTriangleDashed:cj,LucideTriangleRight:lj,LucideTrophy:uj,LucideTruck:fj,LucideTruckElectric:hj,LucideTurkishLira:pj,LucideTurntable:yj,LucideTurtle:mj,LucideTv:kj,LucideTv2:td,LucideTvMinimal:td,LucideTvMinimalPlay:gj,LucideTwitch:vj,LucideTwitter:xj,LucideType:d0,LucideTypeOutline:wj,LucideUmbrella:bj,LucideUmbrellaOff:Mj,LucideUnderline:_j,LucideUndo:Lj,LucideUndo2:Cj,LucideUndoDot:Sj,LucideUnfoldHorizontal:Nj,LucideUnfoldVertical:Ij,LucideUngroup:Aj,LucideUniversity:nd,LucideUnlink:jj,LucideUnlink2:Ej,LucideUnlock:vl,LucideUnlockKeyhole:kl,LucideUnplug:$j,LucideUpload:bh,LucideUploadCloud:bc,LucideUsb:Pj,LucideUser:_h,LucideUser2:cd,LucideUserCheck:zj,LucideUserCheck2:od,LucideUserCircle:kc,LucideUserCircle2:mc,LucideUserCog:Rj,LucideUserCog2:rd,LucideUserKey:Tj,LucideUserLock:Dj,LucideUserMinus:Hj,LucideUserMinus2:ad,LucideUserPen:Oj,LucideUserPlus:Fj,LucideUserPlus2:id,LucideUserRound:cd,LucideUserRoundCheck:od,LucideUserRoundCog:rd,LucideUserRoundKey:qj,LucideUserRoundMinus:ad,LucideUserRoundPen:Vj,LucideUserRoundPlus:id,LucideUserRoundSearch:Bj,LucideUserRoundX:sd,LucideUserSearch:Uj,LucideUserSquare:W1,LucideUserSquare2:U1,LucideUserStar:Wj,LucideUserX:Gj,LucideUserX2:sd,LucideUsers:Ch,LucideUsers2:ld,LucideUsersRound:ld,LucideUtensils:ud,LucideUtensilsCrossed:dd,LucideUtilityPole:Kj,LucideVan:Xj,LucideVariable:Zj,LucideVault:Yj,LucideVectorSquare:Qj,LucideVegan:Jj,LucideVenetianMask:e$,LucideVenus:n$,LucideVenusAndMars:t$,LucideVerified:Cs,LucideVibrate:r$,LucideVibrateOff:o$,LucideVideo:i$,LucideVideoOff:a$,LucideVideotape:s$,LucideView:c$,LucideVoicemail:l$,LucideVolleyball:d$,LucideVolume:y$,LucideVolume1:u$,LucideVolume2:h$,LucideVolumeOff:f$,LucideVolumeX:p$,LucideVote:m$,LucideWallet:k$,LucideWallet2:hd,LucideWalletCards:g$,LucideWalletMinimal:hd,LucideWallpaper:v$,LucideWand:x$,LucideWand2:fd,LucideWandSparkles:fd,LucideWarehouse:w$,LucideWashingMachine:M$,LucideWatch:b$,LucideWaves:L$,LucideWavesArrowDown:_$,LucideWavesArrowUp:C$,LucideWavesLadder:S$,LucideWaypoints:N$,LucideWebcam:I$,LucideWebhook:E$,LucideWebhookOff:A$,LucideWeight:$$,LucideWeightTilde:j$,LucideWheat:R$,LucideWheatOff:P$,LucideWholeWord:z$,LucideWifi:B$,LucideWifiCog:T$,LucideWifiHigh:D$,LucideWifiLow:H$,LucideWifiOff:O$,LucideWifiPen:F$,LucideWifiSync:q$,LucideWifiZero:V$,LucideWind:W$,LucideWindArrowDown:U$,LucideWine:K$,LucideWineOff:G$,LucideWorkflow:X$,LucideWorm:Z$,LucideWrapText:Q1,LucideWrench:Y$,LucideX:Ai,LucideXCircle:vc,LucideXOctagon:Ll,LucideXSquare:G1,LucideYoutube:Q$,LucideZap:eP,LucideZapOff:J$,LucideZoomIn:tP,LucideZoomOut:nP,Luggage:Pb,LuggageIcon:Pb,MSquare:L1,MSquareIcon:L1,Magnet:zb,MagnetIcon:zb,Mail:Vb,MailCheck:Rb,MailCheckIcon:Rb,MailIcon:Vb,MailMinus:Tb,MailMinusIcon:Tb,MailOpen:Db,MailOpenIcon:Db,MailPlus:Hb,MailPlusIcon:Hb,MailQuestion:xl,MailQuestionIcon:xl,MailQuestionMark:xl,MailQuestionMarkIcon:xl,MailSearch:Ob,MailSearchIcon:Ob,MailWarning:Fb,MailWarningIcon:Fb,MailX:qb,MailXIcon:qb,Mailbox:Ub,MailboxIcon:Ub,Mails:Bb,MailsIcon:Bb,Map:i9,MapIcon:i9,MapMinus:Wb,MapMinusIcon:Wb,MapPin:o9,MapPinCheck:Kb,MapPinCheckIcon:Kb,MapPinCheckInside:Gb,MapPinCheckInsideIcon:Gb,MapPinHouse:Xb,MapPinHouseIcon:Xb,MapPinIcon:o9,MapPinMinus:Yb,MapPinMinusIcon:Yb,MapPinMinusInside:Zb,MapPinMinusInsideIcon:Zb,MapPinOff:Qb,MapPinOffIcon:Qb,MapPinPen:wl,MapPinPenIcon:wl,MapPinPlus:e9,MapPinPlusIcon:e9,MapPinPlusInside:Jb,MapPinPlusInsideIcon:Jb,MapPinX:t9,MapPinXIcon:t9,MapPinXInside:n9,MapPinXInsideIcon:n9,MapPinned:r9,MapPinnedIcon:r9,MapPlus:a9,MapPlusIcon:a9,Mars:c9,MarsIcon:c9,MarsStroke:s9,MarsStrokeIcon:s9,Martini:l9,MartiniIcon:l9,Maximize:d9,Maximize2:Md,Maximize2Icon:Md,MaximizeIcon:d9,Medal:u9,MedalIcon:u9,Megaphone:f9,MegaphoneIcon:f9,MegaphoneOff:h9,MegaphoneOffIcon:h9,Meh:p9,MehIcon:p9,MemoryStick:y9,MemoryStickIcon:y9,Menu:g9,MenuIcon:g9,MenuSquare:N1,MenuSquareIcon:N1,Merge:m9,MergeIcon:m9,MessageCircle:L9,MessageCircleCode:k9,MessageCircleCodeIcon:k9,MessageCircleDashed:v9,MessageCircleDashedIcon:v9,MessageCircleHeart:x9,MessageCircleHeartIcon:x9,MessageCircleIcon:L9,MessageCircleMore:w9,MessageCircleMoreIcon:w9,MessageCircleOff:M9,MessageCircleOffIcon:M9,MessageCirclePlus:b9,MessageCirclePlusIcon:b9,MessageCircleQuestion:Ml,MessageCircleQuestionIcon:Ml,MessageCircleQuestionMark:Ml,MessageCircleQuestionMarkIcon:Ml,MessageCircleReply:_9,MessageCircleReplyIcon:_9,MessageCircleWarning:C9,MessageCircleWarningIcon:C9,MessageCircleX:S9,MessageCircleXIcon:S9,MessageSquare:V9,MessageSquareCode:N9,MessageSquareCodeIcon:N9,MessageSquareDashed:I9,MessageSquareDashedIcon:I9,MessageSquareDiff:A9,MessageSquareDiffIcon:A9,MessageSquareDot:E9,MessageSquareDotIcon:E9,MessageSquareHeart:j9,MessageSquareHeartIcon:j9,MessageSquareIcon:V9,MessageSquareLock:$9,MessageSquareLockIcon:$9,MessageSquareMore:P9,MessageSquareMoreIcon:P9,MessageSquareOff:z9,MessageSquareOffIcon:z9,MessageSquarePlus:R9,MessageSquarePlusIcon:R9,MessageSquareQuote:T9,MessageSquareQuoteIcon:T9,MessageSquareReply:D9,MessageSquareReplyIcon:D9,MessageSquareShare:H9,MessageSquareShareIcon:H9,MessageSquareText:O9,MessageSquareTextIcon:O9,MessageSquareWarning:F9,MessageSquareWarningIcon:F9,MessageSquareX:q9,MessageSquareXIcon:q9,MessagesSquare:B9,MessagesSquareIcon:B9,Mic:W9,Mic2:bl,Mic2Icon:bl,MicIcon:W9,MicOff:U9,MicOffIcon:U9,MicVocal:bl,MicVocalIcon:bl,Microchip:G9,MicrochipIcon:G9,Microscope:K9,MicroscopeIcon:K9,Microwave:X9,MicrowaveIcon:X9,Milestone:Z9,MilestoneIcon:Z9,Milk:Q9,MilkIcon:Q9,MilkOff:Y9,MilkOffIcon:Y9,Minimize:e_,Minimize2:J9,Minimize2Icon:J9,MinimizeIcon:e_,Minus:lh,MinusCircle:sc,MinusCircleIcon:sc,MinusIcon:lh,MinusSquare:I1,MinusSquareIcon:I1,Monitor:p_,MonitorCheck:t_,MonitorCheckIcon:t_,MonitorCloud:n_,MonitorCloudIcon:n_,MonitorCog:o_,MonitorCogIcon:o_,MonitorDot:r_,MonitorDotIcon:r_,MonitorDown:a_,MonitorDownIcon:a_,MonitorIcon:p_,MonitorOff:i_,MonitorOffIcon:i_,MonitorPause:s_,MonitorPauseIcon:s_,MonitorPlay:c_,MonitorPlayIcon:c_,MonitorSmartphone:l_,MonitorSmartphoneIcon:l_,MonitorSpeaker:d_,MonitorSpeakerIcon:d_,MonitorStop:u_,MonitorStopIcon:u_,MonitorUp:h_,MonitorUpIcon:h_,MonitorX:f_,MonitorXIcon:f_,Moon:m_,MoonIcon:m_,MoonStar:y_,MoonStarIcon:y_,MoreHorizontal:Ac,MoreHorizontalIcon:Ac,MoreVertical:Ic,MoreVerticalIcon:Ic,Motorbike:g_,MotorbikeIcon:g_,Mountain:v_,MountainIcon:v_,MountainSnow:k_,MountainSnowIcon:k_,Mouse:C_,MouseIcon:C_,MouseOff:x_,MouseOffIcon:x_,MousePointer:__,MousePointer2:dh,MousePointer2Icon:dh,MousePointer2Off:w_,MousePointer2OffIcon:w_,MousePointerBan:M_,MousePointerBanIcon:M_,MousePointerClick:b_,MousePointerClickIcon:b_,MousePointerIcon:__,MousePointerSquareDashed:v1,MousePointerSquareDashedIcon:v1,Move:T_,Move3D:_l,Move3DIcon:_l,Move3d:_l,Move3dIcon:_l,MoveDiagonal:L_,MoveDiagonal2:S_,MoveDiagonal2Icon:S_,MoveDiagonalIcon:L_,MoveDown:A_,MoveDownIcon:A_,MoveDownLeft:N_,MoveDownLeftIcon:N_,MoveDownRight:I_,MoveDownRightIcon:I_,MoveHorizontal:E_,MoveHorizontalIcon:E_,MoveIcon:T_,MoveLeft:uh,MoveLeftIcon:uh,MoveRight:j_,MoveRightIcon:j_,MoveUp:z_,MoveUpIcon:z_,MoveUpLeft:$_,MoveUpLeftIcon:$_,MoveUpRight:P_,MoveUpRightIcon:P_,MoveVertical:R_,MoveVerticalIcon:R_,Music:F_,Music2:D_,Music2Icon:D_,Music3:H_,Music3Icon:H_,Music4:O_,Music4Icon:O_,MusicIcon:F_,Navigation:U_,Navigation2:V_,Navigation2Icon:V_,Navigation2Off:q_,Navigation2OffIcon:q_,NavigationIcon:U_,NavigationOff:B_,NavigationOffIcon:B_,Network:W_,NetworkIcon:W_,Newspaper:G_,NewspaperIcon:G_,Nfc:K_,NfcIcon:K_,NonBinary:X_,NonBinaryIcon:X_,Notebook:J_,NotebookIcon:J_,NotebookPen:Z_,NotebookPenIcon:Z_,NotebookTabs:Y_,NotebookTabsIcon:Y_,NotebookText:Q_,NotebookTextIcon:Q_,NotepadText:tC,NotepadTextDashed:eC,NotepadTextDashedIcon:eC,NotepadTextIcon:tC,Nut:nC,NutIcon:nC,NutOff:oC,NutOffIcon:oC,Octagon:aC,OctagonAlert:Cl,OctagonAlertIcon:Cl,OctagonIcon:aC,OctagonMinus:rC,OctagonMinusIcon:rC,OctagonPause:Sl,OctagonPauseIcon:Sl,OctagonX:Ll,OctagonXIcon:Ll,Omega:iC,OmegaIcon:iC,Option:cC,OptionIcon:cC,Orbit:sC,OrbitIcon:sC,Origami:lC,OrigamiIcon:lC,Outdent:Lr,OutdentIcon:Lr,Package:gC,Package2:dC,Package2Icon:dC,PackageCheck:uC,PackageCheckIcon:uC,PackageIcon:gC,PackageMinus:hC,PackageMinusIcon:hC,PackageOpen:fC,PackageOpenIcon:fC,PackagePlus:pC,PackagePlusIcon:pC,PackageSearch:yC,PackageSearchIcon:yC,PackageX:mC,PackageXIcon:mC,PaintBucket:kC,PaintBucketIcon:kC,PaintRoller:vC,PaintRollerIcon:vC,Paintbrush:xC,Paintbrush2:Nl,Paintbrush2Icon:Nl,PaintbrushIcon:xC,PaintbrushVertical:Nl,PaintbrushVerticalIcon:Nl,Palette:wC,PaletteIcon:wC,Palmtree:ed,PalmtreeIcon:ed,Panda:MC,PandaIcon:MC,PanelBottom:_C,PanelBottomClose:bC,PanelBottomCloseIcon:bC,PanelBottomDashed:Il,PanelBottomDashedIcon:Il,PanelBottomIcon:_C,PanelBottomInactive:Il,PanelBottomInactiveIcon:Il,PanelBottomOpen:CC,PanelBottomOpenIcon:CC,PanelLeft:$l,PanelLeftClose:Al,PanelLeftCloseIcon:Al,PanelLeftDashed:El,PanelLeftDashedIcon:El,PanelLeftIcon:$l,PanelLeftInactive:El,PanelLeftInactiveIcon:El,PanelLeftOpen:jl,PanelLeftOpenIcon:jl,PanelLeftRightDashed:SC,PanelLeftRightDashedIcon:SC,PanelRight:LC,PanelRightClose:hh,PanelRightCloseIcon:hh,PanelRightDashed:Pl,PanelRightDashedIcon:Pl,PanelRightIcon:LC,PanelRightInactive:Pl,PanelRightInactiveIcon:Pl,PanelRightOpen:fh,PanelRightOpenIcon:fh,PanelTop:EC,PanelTopBottomDashed:NC,PanelTopBottomDashedIcon:NC,PanelTopClose:IC,PanelTopCloseIcon:IC,PanelTopDashed:zl,PanelTopDashedIcon:zl,PanelTopIcon:EC,PanelTopInactive:zl,PanelTopInactiveIcon:zl,PanelTopOpen:AC,PanelTopOpenIcon:AC,PanelsLeftBottom:jC,PanelsLeftBottomIcon:jC,PanelsLeftRight:di,PanelsLeftRightIcon:di,PanelsRightBottom:$C,PanelsRightBottomIcon:$C,PanelsTopBottom:Vl,PanelsTopBottomIcon:Vl,PanelsTopLeft:Rl,PanelsTopLeftIcon:Rl,Paperclip:PC,PaperclipIcon:PC,Parentheses:RC,ParenthesesIcon:RC,ParkingCircle:lc,ParkingCircleIcon:lc,ParkingCircleOff:cc,ParkingCircleOffIcon:cc,ParkingMeter:zC,ParkingMeterIcon:zC,ParkingSquare:j1,ParkingSquareIcon:j1,ParkingSquareOff:E1,ParkingSquareOffIcon:E1,PartyPopper:TC,PartyPopperIcon:TC,Pause:DC,PauseCircle:dc,PauseCircleIcon:dc,PauseIcon:DC,PauseOctagon:Sl,PauseOctagonIcon:Sl,PawPrint:HC,PawPrintIcon:HC,PcCase:OC,PcCaseIcon:OC,Pen:Dl,PenBox:eo,PenBoxIcon:eo,PenIcon:Dl,PenLine:Tl,PenLineIcon:Tl,PenOff:FC,PenOffIcon:FC,PenSquare:eo,PenSquareIcon:eo,PenTool:qC,PenToolIcon:qC,Pencil:yh,PencilIcon:yh,PencilLine:ph,PencilLineIcon:ph,PencilOff:VC,PencilOffIcon:VC,PencilRuler:BC,PencilRulerIcon:BC,Pentagon:UC,PentagonIcon:UC,Percent:WC,PercentCircle:uc,PercentCircleIcon:uc,PercentDiamond:Lc,PercentDiamondIcon:Lc,PercentIcon:WC,PercentSquare:$1,PercentSquareIcon:$1,PersonStanding:KC,PersonStandingIcon:KC,PhilippinePeso:GC,PhilippinePesoIcon:GC,Phone:tS,PhoneCall:XC,PhoneCallIcon:XC,PhoneForwarded:ZC,PhoneForwardedIcon:ZC,PhoneIcon:tS,PhoneIncoming:YC,PhoneIncomingIcon:YC,PhoneMissed:QC,PhoneMissedIcon:QC,PhoneOff:JC,PhoneOffIcon:JC,PhoneOutgoing:eS,PhoneOutgoingIcon:eS,Pi:nS,PiIcon:nS,PiSquare:R1,PiSquareIcon:R1,Piano:oS,PianoIcon:oS,Pickaxe:rS,PickaxeIcon:rS,PictureInPicture:iS,PictureInPicture2:aS,PictureInPicture2Icon:aS,PictureInPictureIcon:iS,PieChart:Vs,PieChartIcon:Vs,PiggyBank:sS,PiggyBankIcon:sS,Pilcrow:dS,PilcrowIcon:dS,PilcrowLeft:cS,PilcrowLeftIcon:cS,PilcrowRight:lS,PilcrowRightIcon:lS,PilcrowSquare:P1,PilcrowSquareIcon:P1,Pill:hS,PillBottle:uS,PillBottleIcon:uS,PillIcon:hS,Pin:pS,PinIcon:pS,PinOff:fS,PinOffIcon:fS,Pipette:yS,PipetteIcon:yS,Pizza:mS,PizzaIcon:mS,Plane:vS,PlaneIcon:vS,PlaneLanding:gS,PlaneLandingIcon:gS,PlaneTakeoff:kS,PlaneTakeoffIcon:kS,Play:bd,PlayCircle:hc,PlayCircleIcon:hc,PlayIcon:bd,PlaySquare:z1,PlaySquareIcon:z1,Plug:wS,Plug2:xS,Plug2Icon:xS,PlugIcon:wS,PlugZap:Hl,PlugZap2:Hl,PlugZap2Icon:Hl,PlugZapIcon:Hl,Plus:mh,PlusCircle:fc,PlusCircleIcon:fc,PlusIcon:mh,PlusSquare:T1,PlusSquareIcon:T1,Pocket:bS,PocketIcon:bS,PocketKnife:MS,PocketKnifeIcon:MS,Podcast:CS,PodcastIcon:CS,Pointer:SS,PointerIcon:SS,PointerOff:_S,PointerOffIcon:_S,Popcorn:LS,PopcornIcon:LS,Popsicle:NS,PopsicleIcon:NS,PoundSterling:IS,PoundSterlingIcon:IS,Power:ES,PowerCircle:pc,PowerCircleIcon:pc,PowerIcon:ES,PowerOff:AS,PowerOffIcon:AS,PowerSquare:D1,PowerSquareIcon:D1,Presentation:jS,PresentationIcon:jS,Printer:zS,PrinterCheck:$S,PrinterCheckIcon:$S,PrinterIcon:zS,PrinterX:PS,PrinterXIcon:PS,Projector:TS,ProjectorIcon:TS,Proportions:RS,ProportionsIcon:RS,Puzzle:DS,PuzzleIcon:DS,Pyramid:HS,PyramidIcon:HS,QrCode:OS,QrCodeIcon:OS,Quote:FS,QuoteIcon:FS,Rabbit:qS,RabbitIcon:qS,Radar:VS,RadarIcon:VS,Radiation:BS,RadiationIcon:BS,Radical:US,RadicalIcon:US,Radio:KS,RadioIcon:KS,RadioReceiver:WS,RadioReceiverIcon:WS,RadioTower:GS,RadioTowerIcon:GS,Radius:XS,RadiusIcon:XS,RailSymbol:ZS,RailSymbolIcon:ZS,Rainbow:YS,RainbowIcon:YS,Rat:QS,RatIcon:QS,Ratio:JS,RatioIcon:JS,Receipt:lL,ReceiptCent:eL,ReceiptCentIcon:eL,ReceiptEuro:tL,ReceiptEuroIcon:tL,ReceiptIcon:lL,ReceiptIndianRupee:nL,ReceiptIndianRupeeIcon:nL,ReceiptJapaneseYen:oL,ReceiptJapaneseYenIcon:oL,ReceiptPoundSterling:rL,ReceiptPoundSterlingIcon:rL,ReceiptRussianRuble:aL,ReceiptRussianRubleIcon:aL,ReceiptSwissFranc:iL,ReceiptSwissFrancIcon:iL,ReceiptText:sL,ReceiptTextIcon:sL,ReceiptTurkishLira:cL,ReceiptTurkishLiraIcon:cL,RectangleCircle:dL,RectangleCircleIcon:dL,RectangleEllipsis:Ol,RectangleEllipsisIcon:Ol,RectangleGoggles:uL,RectangleGogglesIcon:uL,RectangleHorizontal:hL,RectangleHorizontalIcon:hL,RectangleVertical:fL,RectangleVerticalIcon:fL,Recycle:pL,RecycleIcon:pL,Redo:gL,Redo2:yL,Redo2Icon:yL,RedoDot:mL,RedoDotIcon:mL,RedoIcon:gL,RefreshCcw:xL,RefreshCcwDot:kL,RefreshCcwDotIcon:kL,RefreshCcwIcon:xL,RefreshCw:wL,RefreshCwIcon:wL,RefreshCwOff:vL,RefreshCwOffIcon:vL,Refrigerator:ML,RefrigeratorIcon:ML,Regex:bL,RegexIcon:bL,RemoveFormatting:_L,RemoveFormattingIcon:_L,Repeat:LL,Repeat1:SL,Repeat1Icon:SL,Repeat2:CL,Repeat2Icon:CL,RepeatIcon:LL,Replace:IL,ReplaceAll:NL,ReplaceAllIcon:NL,ReplaceIcon:IL,Reply:EL,ReplyAll:AL,ReplyAllIcon:AL,ReplyIcon:EL,Rewind:jL,RewindIcon:jL,Ribbon:PL,RibbonIcon:PL,Rocket:$L,RocketIcon:$L,RockingChair:zL,RockingChairIcon:zL,RollerCoaster:RL,RollerCoasterIcon:RL,Rose:TL,RoseIcon:TL,Rotate3D:Fl,Rotate3DIcon:Fl,Rotate3d:Fl,Rotate3dIcon:Fl,RotateCcw:OL,RotateCcwIcon:OL,RotateCcwKey:DL,RotateCcwKeyIcon:DL,RotateCcwSquare:HL,RotateCcwSquareIcon:HL,RotateCw:qL,RotateCwIcon:qL,RotateCwSquare:FL,RotateCwSquareIcon:FL,Route:BL,RouteIcon:BL,RouteOff:VL,RouteOffIcon:VL,Router:UL,RouterIcon:UL,Rows:ql,Rows2:ql,Rows2Icon:ql,Rows3:Vl,Rows3Icon:Vl,Rows4:WL,Rows4Icon:WL,RowsIcon:ql,Rss:GL,RssIcon:GL,Ruler:XL,RulerDimensionLine:KL,RulerDimensionLineIcon:KL,RulerIcon:XL,RussianRuble:ZL,RussianRubleIcon:ZL,Sailboat:YL,SailboatIcon:YL,Salad:QL,SaladIcon:QL,Sandwich:JL,SandwichIcon:JL,Satellite:tN,SatelliteDish:eN,SatelliteDishIcon:eN,SatelliteIcon:tN,SaudiRiyal:nN,SaudiRiyalIcon:nN,Save:aN,SaveAll:oN,SaveAllIcon:oN,SaveIcon:aN,SaveOff:rN,SaveOffIcon:rN,Scale:iN,Scale3D:Bl,Scale3DIcon:Bl,Scale3d:Bl,Scale3dIcon:Bl,ScaleIcon:iN,Scaling:sN,ScalingIcon:sN,Scan:mN,ScanBarcode:cN,ScanBarcodeIcon:cN,ScanEye:lN,ScanEyeIcon:lN,ScanFace:dN,ScanFaceIcon:dN,ScanHeart:uN,ScanHeartIcon:uN,ScanIcon:mN,ScanLine:hN,ScanLineIcon:hN,ScanQrCode:fN,ScanQrCodeIcon:fN,ScanSearch:pN,ScanSearchIcon:pN,ScanText:yN,ScanTextIcon:yN,ScatterChart:Bs,ScatterChartIcon:Bs,School:gN,School2:nd,School2Icon:nd,SchoolIcon:gN,Scissors:xN,ScissorsIcon:xN,ScissorsLineDashed:kN,ScissorsLineDashedIcon:kN,ScissorsSquare:H1,ScissorsSquareDashedBottom:d1,ScissorsSquareDashedBottomIcon:d1,ScissorsSquareIcon:H1,Scooter:vN,ScooterIcon:vN,ScreenShare:MN,ScreenShareIcon:MN,ScreenShareOff:wN,ScreenShareOffIcon:wN,Scroll:_N,ScrollIcon:_N,ScrollText:bN,ScrollTextIcon:bN,Search:gh,SearchAlert:CN,SearchAlertIcon:CN,SearchCheck:SN,SearchCheckIcon:SN,SearchCode:LN,SearchCodeIcon:LN,SearchIcon:gh,SearchSlash:NN,SearchSlashIcon:NN,SearchX:IN,SearchXIcon:IN,Section:AN,SectionIcon:AN,Send:jN,SendHorizonal:Ul,SendHorizonalIcon:Ul,SendHorizontal:Ul,SendHorizontalIcon:Ul,SendIcon:jN,SendToBack:EN,SendToBackIcon:EN,SeparatorHorizontal:PN,SeparatorHorizontalIcon:PN,SeparatorVertical:$N,SeparatorVerticalIcon:$N,Server:kh,ServerCog:zN,ServerCogIcon:zN,ServerCrash:RN,ServerCrashIcon:RN,ServerIcon:kh,ServerOff:TN,ServerOffIcon:TN,Settings:HN,Settings2:DN,Settings2Icon:DN,SettingsIcon:HN,Shapes:vh,ShapesIcon:vh,Share:ON,Share2:xh,Share2Icon:xh,ShareIcon:ON,Sheet:FN,SheetIcon:FN,Shell:qN,ShellIcon:qN,Shield:QN,ShieldAlert:VN,ShieldAlertIcon:VN,ShieldBan:BN,ShieldBanIcon:BN,ShieldCheck:UN,ShieldCheckIcon:UN,ShieldClose:Gl,ShieldCloseIcon:Gl,ShieldEllipsis:WN,ShieldEllipsisIcon:WN,ShieldHalf:GN,ShieldHalfIcon:GN,ShieldIcon:QN,ShieldMinus:KN,ShieldMinusIcon:KN,ShieldOff:XN,ShieldOffIcon:XN,ShieldPlus:ZN,ShieldPlusIcon:ZN,ShieldQuestion:Wl,ShieldQuestionIcon:Wl,ShieldQuestionMark:Wl,ShieldQuestionMarkIcon:Wl,ShieldUser:YN,ShieldUserIcon:YN,ShieldX:Gl,ShieldXIcon:Gl,Ship:tI,ShipIcon:tI,ShipWheel:JN,ShipWheelIcon:JN,Shirt:eI,ShirtIcon:eI,ShoppingBag:oI,ShoppingBagIcon:oI,ShoppingBasket:nI,ShoppingBasketIcon:nI,ShoppingCart:rI,ShoppingCartIcon:rI,Shovel:aI,ShovelIcon:aI,ShowerHead:iI,ShowerHeadIcon:iI,Shredder:sI,ShredderIcon:sI,Shrimp:cI,ShrimpIcon:cI,Shrink:lI,ShrinkIcon:lI,Shrub:dI,ShrubIcon:dI,Shuffle:uI,ShuffleIcon:uI,Sidebar:$l,SidebarClose:Al,SidebarCloseIcon:Al,SidebarIcon:$l,SidebarOpen:jl,SidebarOpenIcon:jl,Sigma:hI,SigmaIcon:hI,SigmaSquare:O1,SigmaSquareIcon:O1,Signal:gI,SignalHigh:fI,SignalHighIcon:fI,SignalIcon:gI,SignalLow:pI,SignalLowIcon:pI,SignalMedium:yI,SignalMediumIcon:yI,SignalZero:mI,SignalZeroIcon:mI,Signature:kI,SignatureIcon:kI,Signpost:xI,SignpostBig:vI,SignpostBigIcon:vI,SignpostIcon:xI,Siren:wI,SirenIcon:wI,SkipBack:MI,SkipBackIcon:MI,SkipForward:bI,SkipForwardIcon:bI,Skull:_I,SkullIcon:_I,Slack:CI,SlackIcon:CI,Slash:SI,SlashIcon:SI,SlashSquare:F1,SlashSquareIcon:F1,Slice:LI,SliceIcon:LI,Sliders:Kl,SlidersHorizontal:NI,SlidersHorizontalIcon:NI,SlidersIcon:Kl,SlidersVertical:Kl,SlidersVerticalIcon:Kl,Smartphone:EI,SmartphoneCharging:II,SmartphoneChargingIcon:II,SmartphoneIcon:EI,SmartphoneNfc:AI,SmartphoneNfcIcon:AI,Smile:$I,SmileIcon:$I,SmilePlus:jI,SmilePlusIcon:jI,Snail:PI,SnailIcon:PI,Snowflake:zI,SnowflakeIcon:zI,SoapDispenserDroplet:RI,SoapDispenserDropletIcon:RI,Sofa:TI,SofaIcon:TI,SolarPanel:DI,SolarPanelIcon:DI,SortAsc:Ms,SortAscIcon:Ms,SortDesc:vs,SortDescIcon:vs,Soup:HI,SoupIcon:HI,Space:OI,SpaceIcon:OI,Spade:FI,SpadeIcon:FI,Sparkle:qI,SparkleIcon:qI,Sparkles:Xl,SparklesIcon:Xl,Speaker:VI,SpeakerIcon:VI,Speech:BI,SpeechIcon:BI,SpellCheck:WI,SpellCheck2:UI,SpellCheck2Icon:UI,SpellCheckIcon:WI,Spline:GI,SplineIcon:GI,SplinePointer:KI,SplinePointerIcon:KI,Split:XI,SplitIcon:XI,SplitSquareHorizontal:q1,SplitSquareHorizontalIcon:q1,SplitSquareVertical:V1,SplitSquareVerticalIcon:V1,Spool:ZI,SpoolIcon:ZI,Spotlight:YI,SpotlightIcon:YI,SprayCan:QI,SprayCanIcon:QI,Sprout:JI,SproutIcon:JI,Square:s0,SquareActivity:Zl,SquareActivityIcon:Zl,SquareArrowDown:Jl,SquareArrowDownIcon:Jl,SquareArrowDownLeft:Yl,SquareArrowDownLeftIcon:Yl,SquareArrowDownRight:Ql,SquareArrowDownRightIcon:Ql,SquareArrowLeft:e1,SquareArrowLeftIcon:e1,SquareArrowOutDownLeft:t1,SquareArrowOutDownLeftIcon:t1,SquareArrowOutDownRight:n1,SquareArrowOutDownRightIcon:n1,SquareArrowOutUpLeft:o1,SquareArrowOutUpLeftIcon:o1,SquareArrowOutUpRight:r1,SquareArrowOutUpRightIcon:r1,SquareArrowRight:a1,SquareArrowRightIcon:a1,SquareArrowUp:s1,SquareArrowUpIcon:s1,SquareArrowUpLeft:i1,SquareArrowUpLeftIcon:i1,SquareArrowUpRight:l1,SquareArrowUpRightIcon:l1,SquareAsterisk:c1,SquareAsteriskIcon:c1,SquareBottomDashedScissors:d1,SquareBottomDashedScissorsIcon:d1,SquareChartGantt:Ir,SquareChartGanttIcon:Ir,SquareCheck:h1,SquareCheckBig:u1,SquareCheckBigIcon:u1,SquareCheckIcon:h1,SquareChevronDown:f1,SquareChevronDownIcon:f1,SquareChevronLeft:p1,SquareChevronLeftIcon:p1,SquareChevronRight:m1,SquareChevronRightIcon:m1,SquareChevronUp:y1,SquareChevronUpIcon:y1,SquareCode:g1,SquareCodeIcon:g1,SquareDashed:x1,SquareDashedBottom:tA,SquareDashedBottomCode:eA,SquareDashedBottomCodeIcon:eA,SquareDashedBottomIcon:tA,SquareDashedIcon:x1,SquareDashedKanban:k1,SquareDashedKanbanIcon:k1,SquareDashedMousePointer:v1,SquareDashedMousePointerIcon:v1,SquareDashedTopSolid:nA,SquareDashedTopSolidIcon:nA,SquareDivide:w1,SquareDivideIcon:w1,SquareDot:M1,SquareDotIcon:M1,SquareEqual:b1,SquareEqualIcon:b1,SquareFunction:_1,SquareFunctionIcon:_1,SquareGanttChart:Ir,SquareGanttChartIcon:Ir,SquareIcon:s0,SquareKanban:C1,SquareKanbanIcon:C1,SquareLibrary:S1,SquareLibraryIcon:S1,SquareM:L1,SquareMIcon:L1,SquareMenu:N1,SquareMenuIcon:N1,SquareMinus:I1,SquareMinusIcon:I1,SquareMousePointer:A1,SquareMousePointerIcon:A1,SquareParking:j1,SquareParkingIcon:j1,SquareParkingOff:E1,SquareParkingOffIcon:E1,SquarePause:oA,SquarePauseIcon:oA,SquarePen:eo,SquarePenIcon:eo,SquarePercent:$1,SquarePercentIcon:$1,SquarePi:R1,SquarePiIcon:R1,SquarePilcrow:P1,SquarePilcrowIcon:P1,SquarePlay:z1,SquarePlayIcon:z1,SquarePlus:T1,SquarePlusIcon:T1,SquarePower:D1,SquarePowerIcon:D1,SquareRadical:rA,SquareRadicalIcon:rA,SquareRoundCorner:aA,SquareRoundCornerIcon:aA,SquareScissors:H1,SquareScissorsIcon:H1,SquareSigma:O1,SquareSigmaIcon:O1,SquareSlash:F1,SquareSlashIcon:F1,SquareSplitHorizontal:q1,SquareSplitHorizontalIcon:q1,SquareSplitVertical:V1,SquareSplitVerticalIcon:V1,SquareSquare:sA,SquareSquareIcon:sA,SquareStack:iA,SquareStackIcon:iA,SquareStar:lA,SquareStarIcon:lA,SquareStop:cA,SquareStopIcon:cA,SquareTerminal:B1,SquareTerminalIcon:B1,SquareUser:W1,SquareUserIcon:W1,SquareUserRound:U1,SquareUserRoundIcon:U1,SquareX:G1,SquareXIcon:G1,SquaresExclude:dA,SquaresExcludeIcon:dA,SquaresIntersect:uA,SquaresIntersectIcon:uA,SquaresSubtract:hA,SquaresSubtractIcon:hA,SquaresUnite:fA,SquaresUniteIcon:fA,Squircle:c0,SquircleDashed:pA,SquircleDashedIcon:pA,SquircleIcon:c0,Squirrel:yA,SquirrelIcon:yA,Stamp:mA,StampIcon:mA,Star:vA,StarHalf:gA,StarHalfIcon:gA,StarIcon:vA,StarOff:kA,StarOffIcon:kA,Stars:Xl,StarsIcon:Xl,StepBack:xA,StepBackIcon:xA,StepForward:wA,StepForwardIcon:wA,Stethoscope:MA,StethoscopeIcon:MA,Sticker:l0,StickerIcon:l0,StickyNote:wh,StickyNoteIcon:wh,Stone:bA,StoneIcon:bA,StopCircle:gc,StopCircleIcon:gc,Store:_A,StoreIcon:_A,StretchHorizontal:SA,StretchHorizontalIcon:SA,StretchVertical:CA,StretchVerticalIcon:CA,Strikethrough:LA,StrikethroughIcon:LA,Subscript:NA,SubscriptIcon:NA,Subtitles:Es,SubtitlesIcon:Es,Sun:$A,SunDim:IA,SunDimIcon:IA,SunIcon:$A,SunMedium:AA,SunMediumIcon:AA,SunMoon:EA,SunMoonIcon:EA,SunSnow:jA,SunSnowIcon:jA,Sunrise:PA,SunriseIcon:PA,Sunset:zA,SunsetIcon:zA,Superscript:RA,SuperscriptIcon:RA,SwatchBook:TA,SwatchBookIcon:TA,SwissFranc:DA,SwissFrancIcon:DA,SwitchCamera:HA,SwitchCameraIcon:HA,Sword:OA,SwordIcon:OA,Swords:FA,SwordsIcon:FA,Syringe:qA,SyringeIcon:qA,Table:ZA,Table2:VA,Table2Icon:VA,TableCellsMerge:BA,TableCellsMergeIcon:BA,TableCellsSplit:UA,TableCellsSplitIcon:UA,TableColumnsSplit:WA,TableColumnsSplitIcon:WA,TableConfig:_r,TableConfigIcon:_r,TableIcon:ZA,TableOfContents:GA,TableOfContentsIcon:GA,TableProperties:KA,TablePropertiesIcon:KA,TableRowsSplit:XA,TableRowsSplitIcon:XA,Tablet:QA,TabletIcon:QA,TabletSmartphone:YA,TabletSmartphoneIcon:YA,Tablets:JA,TabletsIcon:JA,Tag:eE,TagIcon:eE,Tags:tE,TagsIcon:tE,Tally1:nE,Tally1Icon:nE,Tally2:oE,Tally2Icon:oE,Tally3:rE,Tally3Icon:rE,Tally4:aE,Tally4Icon:aE,Tally5:iE,Tally5Icon:iE,Tangent:sE,TangentIcon:sE,Target:cE,TargetIcon:cE,Telescope:lE,TelescopeIcon:lE,Tent:uE,TentIcon:uE,TentTree:dE,TentTreeIcon:dE,Terminal:hE,TerminalIcon:hE,TerminalSquare:B1,TerminalSquareIcon:B1,TestTube:fE,TestTube2:K1,TestTube2Icon:K1,TestTubeDiagonal:K1,TestTubeDiagonalIcon:K1,TestTubeIcon:fE,TestTubes:pE,TestTubesIcon:pE,Text:Vo,TextAlignCenter:ui,TextAlignCenterIcon:ui,TextAlignEnd:hi,TextAlignEndIcon:hi,TextAlignJustify:X1,TextAlignJustifyIcon:X1,TextAlignStart:Vo,TextAlignStartIcon:Vo,TextCursor:mE,TextCursorIcon:mE,TextCursorInput:yE,TextCursorInputIcon:yE,TextIcon:Vo,TextInitial:Z1,TextInitialIcon:Z1,TextQuote:gE,TextQuoteIcon:gE,TextSearch:kE,TextSearchIcon:kE,TextSelect:Y1,TextSelectIcon:Y1,TextSelection:Y1,TextSelectionIcon:Y1,TextWrap:Q1,TextWrapIcon:Q1,Theater:vE,TheaterIcon:vE,Thermometer:ME,ThermometerIcon:ME,ThermometerSnowflake:xE,ThermometerSnowflakeIcon:xE,ThermometerSun:wE,ThermometerSunIcon:wE,ThumbsDown:bE,ThumbsDownIcon:bE,ThumbsUp:_E,ThumbsUpIcon:_E,Ticket:EE,TicketCheck:CE,TicketCheckIcon:CE,TicketIcon:EE,TicketMinus:SE,TicketMinusIcon:SE,TicketPercent:LE,TicketPercentIcon:LE,TicketPlus:NE,TicketPlusIcon:NE,TicketSlash:IE,TicketSlashIcon:IE,TicketX:AE,TicketXIcon:AE,Tickets:$E,TicketsIcon:$E,TicketsPlane:jE,TicketsPlaneIcon:jE,Timer:RE,TimerIcon:RE,TimerOff:PE,TimerOffIcon:PE,TimerReset:zE,TimerResetIcon:zE,ToggleLeft:TE,ToggleLeftIcon:TE,ToggleRight:DE,ToggleRightIcon:DE,Toilet:HE,ToiletIcon:HE,ToolCase:FE,ToolCaseIcon:FE,Toolbox:OE,ToolboxIcon:OE,Tornado:qE,TornadoIcon:qE,Torus:VE,TorusIcon:VE,Touchpad:UE,TouchpadIcon:UE,TouchpadOff:BE,TouchpadOffIcon:BE,TowerControl:WE,TowerControlIcon:WE,ToyBrick:GE,ToyBrickIcon:GE,Tractor:KE,TractorIcon:KE,TrafficCone:XE,TrafficConeIcon:XE,Train:J1,TrainFront:YE,TrainFrontIcon:YE,TrainFrontTunnel:ZE,TrainFrontTunnelIcon:ZE,TrainIcon:J1,TrainTrack:QE,TrainTrackIcon:QE,TramFront:J1,TramFrontIcon:J1,Transgender:JE,TransgenderIcon:JE,Trash:ej,Trash2:Mh,Trash2Icon:Mh,TrashIcon:ej,TreeDeciduous:tj,TreeDeciduousIcon:tj,TreePalm:ed,TreePalmIcon:ed,TreePine:nj,TreePineIcon:nj,Trees:oj,TreesIcon:oj,Trello:rj,TrelloIcon:rj,TrendingDown:aj,TrendingDownIcon:aj,TrendingUp:sj,TrendingUpDown:ij,TrendingUpDownIcon:ij,TrendingUpIcon:sj,Triangle:dj,TriangleAlert:Pr,TriangleAlertIcon:Pr,TriangleDashed:cj,TriangleDashedIcon:cj,TriangleIcon:dj,TriangleRight:lj,TriangleRightIcon:lj,Trophy:uj,TrophyIcon:uj,Truck:fj,TruckElectric:hj,TruckElectricIcon:hj,TruckIcon:fj,TurkishLira:pj,TurkishLiraIcon:pj,Turntable:yj,TurntableIcon:yj,Turtle:mj,TurtleIcon:mj,Tv:kj,Tv2:td,Tv2Icon:td,TvIcon:kj,TvMinimal:td,TvMinimalIcon:td,TvMinimalPlay:gj,TvMinimalPlayIcon:gj,Twitch:vj,TwitchIcon:vj,Twitter:xj,TwitterIcon:xj,Type:d0,TypeIcon:d0,TypeOutline:wj,TypeOutlineIcon:wj,Umbrella:bj,UmbrellaIcon:bj,UmbrellaOff:Mj,UmbrellaOffIcon:Mj,Underline:_j,UnderlineIcon:_j,Undo:Lj,Undo2:Cj,Undo2Icon:Cj,UndoDot:Sj,UndoDotIcon:Sj,UndoIcon:Lj,UnfoldHorizontal:Nj,UnfoldHorizontalIcon:Nj,UnfoldVertical:Ij,UnfoldVerticalIcon:Ij,Ungroup:Aj,UngroupIcon:Aj,University:nd,UniversityIcon:nd,Unlink:jj,Unlink2:Ej,Unlink2Icon:Ej,UnlinkIcon:jj,Unlock:vl,UnlockIcon:vl,UnlockKeyhole:kl,UnlockKeyholeIcon:kl,Unplug:$j,UnplugIcon:$j,Upload:bh,UploadCloud:bc,UploadCloudIcon:bc,UploadIcon:bh,Usb:Pj,UsbIcon:Pj,User:_h,User2:cd,User2Icon:cd,UserCheck:zj,UserCheck2:od,UserCheck2Icon:od,UserCheckIcon:zj,UserCircle:kc,UserCircle2:mc,UserCircle2Icon:mc,UserCircleIcon:kc,UserCog:Rj,UserCog2:rd,UserCog2Icon:rd,UserCogIcon:Rj,UserIcon:_h,UserKey:Tj,UserKeyIcon:Tj,UserLock:Dj,UserLockIcon:Dj,UserMinus:Hj,UserMinus2:ad,UserMinus2Icon:ad,UserMinusIcon:Hj,UserPen:Oj,UserPenIcon:Oj,UserPlus:Fj,UserPlus2:id,UserPlus2Icon:id,UserPlusIcon:Fj,UserRound:cd,UserRoundCheck:od,UserRoundCheckIcon:od,UserRoundCog:rd,UserRoundCogIcon:rd,UserRoundIcon:cd,UserRoundKey:qj,UserRoundKeyIcon:qj,UserRoundMinus:ad,UserRoundMinusIcon:ad,UserRoundPen:Vj,UserRoundPenIcon:Vj,UserRoundPlus:id,UserRoundPlusIcon:id,UserRoundSearch:Bj,UserRoundSearchIcon:Bj,UserRoundX:sd,UserRoundXIcon:sd,UserSearch:Uj,UserSearchIcon:Uj,UserSquare:W1,UserSquare2:U1,UserSquare2Icon:U1,UserSquareIcon:W1,UserStar:Wj,UserStarIcon:Wj,UserX:Gj,UserX2:sd,UserX2Icon:sd,UserXIcon:Gj,Users:Ch,Users2:ld,Users2Icon:ld,UsersIcon:Ch,UsersRound:ld,UsersRoundIcon:ld,Utensils:ud,UtensilsCrossed:dd,UtensilsCrossedIcon:dd,UtensilsIcon:ud,UtilityPole:Kj,UtilityPoleIcon:Kj,Van:Xj,VanIcon:Xj,Variable:Zj,VariableIcon:Zj,Vault:Yj,VaultIcon:Yj,VectorSquare:Qj,VectorSquareIcon:Qj,Vegan:Jj,VeganIcon:Jj,VenetianMask:e$,VenetianMaskIcon:e$,Venus:n$,VenusAndMars:t$,VenusAndMarsIcon:t$,VenusIcon:n$,Verified:Cs,VerifiedIcon:Cs,Vibrate:r$,VibrateIcon:r$,VibrateOff:o$,VibrateOffIcon:o$,Video:i$,VideoIcon:i$,VideoOff:a$,VideoOffIcon:a$,Videotape:s$,VideotapeIcon:s$,View:c$,ViewIcon:c$,Voicemail:l$,VoicemailIcon:l$,Volleyball:d$,VolleyballIcon:d$,Volume:y$,Volume1:u$,Volume1Icon:u$,Volume2:h$,Volume2Icon:h$,VolumeIcon:y$,VolumeOff:f$,VolumeOffIcon:f$,VolumeX:p$,VolumeXIcon:p$,Vote:m$,VoteIcon:m$,Wallet:k$,Wallet2:hd,Wallet2Icon:hd,WalletCards:g$,WalletCardsIcon:g$,WalletIcon:k$,WalletMinimal:hd,WalletMinimalIcon:hd,Wallpaper:v$,WallpaperIcon:v$,Wand:x$,Wand2:fd,Wand2Icon:fd,WandIcon:x$,WandSparkles:fd,WandSparklesIcon:fd,Warehouse:w$,WarehouseIcon:w$,WashingMachine:M$,WashingMachineIcon:M$,Watch:b$,WatchIcon:b$,Waves:L$,WavesArrowDown:_$,WavesArrowDownIcon:_$,WavesArrowUp:C$,WavesArrowUpIcon:C$,WavesIcon:L$,WavesLadder:S$,WavesLadderIcon:S$,Waypoints:N$,WaypointsIcon:N$,Webcam:I$,WebcamIcon:I$,Webhook:E$,WebhookIcon:E$,WebhookOff:A$,WebhookOffIcon:A$,Weight:$$,WeightIcon:$$,WeightTilde:j$,WeightTildeIcon:j$,Wheat:R$,WheatIcon:R$,WheatOff:P$,WheatOffIcon:P$,WholeWord:z$,WholeWordIcon:z$,Wifi:B$,WifiCog:T$,WifiCogIcon:T$,WifiHigh:D$,WifiHighIcon:D$,WifiIcon:B$,WifiLow:H$,WifiLowIcon:H$,WifiOff:O$,WifiOffIcon:O$,WifiPen:F$,WifiPenIcon:F$,WifiSync:q$,WifiSyncIcon:q$,WifiZero:V$,WifiZeroIcon:V$,Wind:W$,WindArrowDown:U$,WindArrowDownIcon:U$,WindIcon:W$,Wine:K$,WineIcon:K$,WineOff:G$,WineOffIcon:G$,Workflow:X$,WorkflowIcon:X$,Worm:Z$,WormIcon:Z$,WrapText:Q1,WrapTextIcon:Q1,Wrench:Y$,WrenchIcon:Y$,X:Ai,XCircle:vc,XCircleIcon:vc,XIcon:Ai,XOctagon:Ll,XOctagonIcon:Ll,XSquare:G1,XSquareIcon:G1,Youtube:Q$,YoutubeIcon:Q$,Zap:eP,ZapIcon:eP,ZapOff:J$,ZapOffIcon:J$,ZoomIn:tP,ZoomInIcon:tP,ZoomOut:nP,ZoomOutIcon:nP,createLucideIcon:d,icons:CAe},Symbol.toStringTag,{value:"Module"})),LAe=new Set(["createLucideIcon","Icon","icons","default"]),NAe=Symbol.for("react.forward_ref");function IAe(e){return typeof e=="function"?!0:e!==null&&typeof e=="object"?e.$$typeof===NAe:!1}function AAe(e){return e.replace(/[A-Z]/g,(t,n)=>n===0?t.toLowerCase():`-${t.toLowerCase()}`)}function EAe(){const e={};for(const[t,n]of Object.entries(SAe))LAe.has(t)||IAe(n)&&(e[AAe(t)]=n);return e}const Zh=EAe(),jAe="help-circle",$Ae=Object.keys(Zh).sort(),PAe=["logos:aws","logos:google-cloud","logos:microsoft-azure"],qP={lucide:$Ae,aws:[],gcp:[],azure:[],iconify:[...PAe]};function bH(e){for(const t of e)t.installed?qP[t.vendor]=[...t.iconNames]:qP[t.vendor]=[]}const zAe=["aws","gcp","azure","iconify"];function $Y(e){if(typeof e!="string")return null;const t=e.trim();if(t.length===0)return null;const n=t.indexOf(":");if(n===-1)return{vendor:"lucide",name:t};const o=t.slice(0,n),r=t.slice(n+1);return r.length===0?null:o==="lucide"?{vendor:"lucide",name:r}:zAe.includes(o)?{vendor:o,name:r}:null}function RAe(e){return e.vendor==="lucide"?e.name:`${e.vendor}:${e.name}`}function TAe(e,t){const n=$Y(e);if(!n)return null;if(n.vendor==="lucide"){const o=Zh[n.name];return o?{kind:"lucide",component:o}:null}return n.vendor==="iconify"?{kind:"iconify",identifier:n.name}:{kind:"svg-url",url:`${t.studioBaseUrl}/api/icons/${n.vendor}/${n.name}.svg`}}const DAe="modulepreload",HAe=function(e){return"/"+e},GB={},X0=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),s=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=HAe(c),c in GB)return;GB[c]=!0;const l=c.endsWith(".css"),h=l?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${h}`))return;const u=document.createElement("link");if(u.rel=l?"stylesheet":DAe,l||(u.as="script"),u.crossOrigin="",u.href=c,s&&u.setAttribute("nonce",s),document.head.appendChild(u),l)return new Promise((p,y)=>{u.addEventListener("load",p),u.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return r.then(i=>{for(const s of i||[])s.status==="rejected"&&a(s.reason);return t().catch(a)})};let gp=null;function OAe(){return gp||(gp=X0(()=>import("./iconify-pbuBzLPb.js"),[]).then(e=>e,()=>null),gp)}function PY(e,t){return f.jsx(qo,{className:e,"aria-label":t,"aria-hidden":t===void 0?!0:void 0,"data-testid":"icon-renderer-placeholder"})}function FAe({identifier:e,className:t,ariaLabel:n,color:o}){const[r,a]=m.useState(null);if(m.useEffect(()=>{let s=!0;return OAe().then(c=>{s&&a(c)}),()=>{s=!1}},[]),!r)return PY(t,n);const i=r.Icon;return f.jsx(i,{icon:e,className:t,color:o,"aria-label":n,"aria-hidden":n===void 0?!0:void 0})}function zY({iconId:e,studioBaseUrl:t,className:n,ariaLabel:o,color:r,strokeWidth:a,absoluteStrokeWidth:i}){const s=TAe(e,{studioBaseUrl:t});if(!s)return PY(n,o);if(s.kind==="lucide"){const c=s.component;return f.jsx(c,{className:n,color:r,strokeWidth:a,absoluteStrokeWidth:i,"aria-label":o,"aria-hidden":o===void 0?!0:void 0})}return s.kind==="svg-url"?f.jsx("img",{src:s.url,loading:"lazy",draggable:!1,className:n,alt:o??"","aria-hidden":o===void 0?!0:void 0}):f.jsx(FAe,{identifier:s.identifier,className:n,ariaLabel:o,color:r})}const qAe={studioBaseUrl:""},AF=m.createContext(qAe);function VAe({value:e,children:t}){return f.jsx(AF.Provider,{value:e,children:t})}const BAe=[".png",".jpg",".jpeg",".gif",".webp",".svg"],UAe=400,_H={width:200,height:200},WAe=e=>{const t=e.lastIndexOf(".");return t>=0?e.slice(t).toLowerCase():""},GAe=e=>{if(e.type.startsWith("image/")){const t=e.type.slice(6).toLowerCase();if(t==="png"||t==="jpeg"||t==="jpg"||t==="gif"||t==="webp"||t==="svg+xml")return!0}return BAe.includes(WAe(e.name))},KAe=e=>{if(!e)return[];const t=e.files;if(!t||t.length===0)return[];const n=[];for(let o=0;o<t.length;o++){const r=t.item(o);r&&GAe(r)&&n.push(r)}return n},XAe=(e,t=UAe)=>{if(e.width<=0||e.height<=0)return{..._H};const n=Math.max(e.width,e.height);if(n<=t)return{width:Math.round(e.width),height:Math.round(e.height)};const o=t/n;return{width:Math.round(e.width*o),height:Math.round(e.height*o)}},ZAe=24,YAe=4,QAe=(e,t,n=ZAe,o=YAe)=>{if(e.length===0)return[];const r=Math.min(e.length,Math.max(1,o)),a=Math.ceil(e.length/r),i=new Array(r).fill(0),s=new Array(a).fill(0);e.forEach((g,k)=>{const x=k%r,v=Math.floor(k/r);i[x]=Math.max(i[x],g.width),s[v]=Math.max(s[v],g.height)});const c=new Array(r).fill(0);for(let g=1;g<r;g++)c[g]=c[g-1]+i[g-1]+n;const l=new Array(a).fill(0);for(let g=1;g<a;g++)l[g]=l[g-1]+s[g-1]+n;const h=i.reduce((g,k)=>g+k,0)+n*(r-1),u=s.reduce((g,k)=>g+k,0)+n*(a-1),p=t.x-h/2,y=t.y-u/2;return e.map((g,k)=>{const x=k%r,v=Math.floor(k/r);return{x:p+c[x],y:y+l[v]}})},JAe=async e=>{const t=KAe(e.dataTransfer);if(t.length===0||!e.rfInstance)return!1;const n=e.rfInstance.screenToFlowPosition(e.clientPos),o=await Promise.all(t.map(a=>e.computeDims(a))),r=QAe(o,n);return t.forEach((a,i)=>{e.dispatch({file:a,position:r[i],dims:o[i],originalFilename:a.name})}),!0},eEe=e=>new Promise(t=>{let n=null;const o=a=>{n&&URL.revokeObjectURL(n),t(a)};try{n=URL.createObjectURL(e)}catch{t({..._H});return}const r=new Image;r.onload=()=>{o(XAe({width:r.naturalWidth,height:r.naturalHeight}))},r.onerror=()=>{o({..._H})},r.src=n}),tEe=2048,nEe=e=>{const t=e.type.toLowerCase();return t==="image/png"||t==="image/jpeg"||t==="image/webp"},oEe=async(e,t=tEe)=>{if(!nEe(e))return e;try{const n=await createImageBitmap(e),o=Math.max(n.width,n.height);if(o<=t)return n.close(),e;const r=t/o,a=Math.round(n.width*r),i=Math.round(n.height*r),s=document.createElement("canvas");s.width=a,s.height=i;const c=s.getContext("2d");if(!c)return n.close(),e;c.drawImage(n,0,0,a,i),n.close();const l=await new Promise(h=>{s.toBlob(u=>h(u),e.type)});return l?new File([l],e.name,{type:e.type,lastModified:e.lastModified}):e}catch{return e}};function RY(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=RY(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}function TY(){for(var e,t,n=0,o="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=RY(e))&&(o&&(o+=" "),o+=t);return o}const EF="-",rEe=e=>{const t=iEe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{const s=i.split(EF);return s[0]===""&&s.length!==1&&s.shift(),DY(s,t)||aEe(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&o[i]?[...c,...o[i]]:c}}},DY=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],o=t.nextPart.get(n),r=o?DY(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;const a=e.join(EF);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},KB=/^\[(.+)\]$/,aEe=e=>{if(KB.test(e)){const t=KB.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},iEe=e=>{const{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return cEe(Object.entries(e.classGroups),n).forEach(([a,i])=>{CH(i,o,a,t)}),o},CH=(e,t,n,o)=>{e.forEach(r=>{if(typeof r=="string"){const a=r===""?t:XB(t,r);a.classGroupId=n;return}if(typeof r=="function"){if(sEe(r)){CH(r(o),t,n,o);return}t.validators.push({validator:r,classGroupId:n});return}Object.entries(r).forEach(([a,i])=>{CH(i,XB(t,a),n,o)})})},XB=(e,t)=>{let n=e;return t.split(EF).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o)}),n},sEe=e=>e.isThemeGetter,cEe=(e,t)=>t?e.map(([n,o])=>{const r=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,r]}):e,lEe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map;const r=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,o=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return r(a,i),i},set(a,i){n.has(a)?n.set(a,i):r(a,i)}}},HY="!",dEe=e=>{const{separator:t,experimentalParseClassName:n}=e,o=t.length===1,r=t[0],a=t.length,i=s=>{const c=[];let l=0,h=0,u;for(let x=0;x<s.length;x++){let v=s[x];if(l===0){if(v===r&&(o||s.slice(x,x+a)===t)){c.push(s.slice(h,x)),h=x+a;continue}if(v==="/"){u=x;continue}}v==="["?l++:v==="]"&&l--}const p=c.length===0?s:s.substring(h),y=p.startsWith(HY),g=y?p.substring(1):p,k=u&&u>h?u-h:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:g,maybePostfixModifierPosition:k}};return n?s=>n({className:s,parseClassName:i}):i},uEe=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o)}),t.push(...n.sort()),t},hEe=e=>({cache:lEe(e.cacheSize),parseClassName:dEe(e),...rEe(e)}),fEe=/\s+/,pEe=(e,t)=>{const{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:r}=t,a=[],i=e.trim().split(fEe);let s="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:h,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:y}=n(l);let g=!!y,k=o(g?p.substring(0,y):p);if(!k){if(!g){s=l+(s.length>0?" "+s:s);continue}if(k=o(p),!k){s=l+(s.length>0?" "+s:s);continue}g=!1}const x=uEe(h).join(":"),v=u?x+HY:x,M=v+k;if(a.includes(M))continue;a.push(M);const w=r(k,g);for(let b=0;b<w.length;++b){const C=w[b];a.push(v+C)}s=l+(s.length>0?" "+s:s)}return s};function yEe(){let e=0,t,n,o="";for(;e<arguments.length;)(t=arguments[e++])&&(n=OY(t))&&(o&&(o+=" "),o+=n);return o}const OY=e=>{if(typeof e=="string")return e;let t,n="";for(let o=0;o<e.length;o++)e[o]&&(t=OY(e[o]))&&(n&&(n+=" "),n+=t);return n};function mEe(e,...t){let n,o,r,a=i;function i(c){const l=t.reduce((h,u)=>u(h),e());return n=hEe(l),o=n.cache.get,r=n.cache.set,a=s,s(c)}function s(c){const l=o(c);if(l)return l;const h=pEe(c,n);return r(c,h),h}return function(){return a(yEe.apply(null,arguments))}}const wt=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},FY=/^\[(?:([a-z-]+):)?(.+)\]$/i,gEe=/^\d+\/\d+$/,kEe=new Set(["px","full","screen"]),vEe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,xEe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wEe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,MEe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bEe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ua=e=>u0(e)||kEe.has(e)||gEe.test(e),Ja=e=>Z0(e,"length",EEe),u0=e=>!!e&&!Number.isNaN(Number(e)),LT=e=>Z0(e,"number",u0),b2=e=>!!e&&Number.isInteger(Number(e)),_Ee=e=>e.endsWith("%")&&u0(e.slice(0,-1)),Be=e=>FY.test(e),ei=e=>vEe.test(e),CEe=new Set(["length","size","percentage"]),SEe=e=>Z0(e,CEe,qY),LEe=e=>Z0(e,"position",qY),NEe=new Set(["image","url"]),IEe=e=>Z0(e,NEe,$Ee),AEe=e=>Z0(e,"",jEe),_2=()=>!0,Z0=(e,t,n)=>{const o=FY.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):!1},EEe=e=>xEe.test(e)&&!wEe.test(e),qY=()=>!1,jEe=e=>MEe.test(e),$Ee=e=>bEe.test(e),PEe=()=>{const e=wt("colors"),t=wt("spacing"),n=wt("blur"),o=wt("brightness"),r=wt("borderColor"),a=wt("borderRadius"),i=wt("borderSpacing"),s=wt("borderWidth"),c=wt("contrast"),l=wt("grayscale"),h=wt("hueRotate"),u=wt("invert"),p=wt("gap"),y=wt("gradientColorStops"),g=wt("gradientColorStopPositions"),k=wt("inset"),x=wt("margin"),v=wt("opacity"),M=wt("padding"),w=wt("saturate"),b=wt("scale"),C=wt("sepia"),_=wt("skew"),S=wt("space"),E=wt("translate"),P=()=>["auto","contain","none"],N=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",Be,t],z=()=>[Be,t],U=()=>["",ua,Ja],A=()=>["auto",u0,Be],T=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],R=()=>["","0",Be],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[u0,Be];return{cacheSize:500,separator:":",theme:{colors:[_2],spacing:[ua,Ja],blur:["none","",ei,Be],brightness:q(),borderColor:[e],borderRadius:["none","","full",ei,Be],borderSpacing:z(),borderWidth:U(),contrast:q(),grayscale:R(),hueRotate:q(),invert:R(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[_Ee,Ja],inset:j(),margin:j(),opacity:q(),padding:z(),saturate:q(),scale:q(),sepia:R(),skew:q(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Be]}],container:["container"],columns:[{columns:[ei]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...T(),Be]}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",b2,Be]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Be]}],grow:[{grow:R()}],shrink:[{shrink:R()}],order:[{order:["first","last","none",b2,Be]}],"grid-cols":[{"grid-cols":[_2]}],"col-start-end":[{col:["auto",{span:["full",b2,Be]},Be]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[_2]}],"row-start-end":[{row:["auto",{span:[b2,Be]},Be]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Be]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[M]}],px:[{px:[M]}],py:[{py:[M]}],ps:[{ps:[M]}],pe:[{pe:[M]}],pt:[{pt:[M]}],pr:[{pr:[M]}],pb:[{pb:[M]}],pl:[{pl:[M]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Be,t]}],"min-w":[{"min-w":[Be,t,"min","max","fit"]}],"max-w":[{"max-w":[Be,t,"none","full","min","max","fit","prose",{screen:[ei]},ei]}],h:[{h:[Be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ei,Ja]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",LT]}],"font-family":[{font:[_2]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Be]}],"line-clamp":[{"line-clamp":["none",u0,LT]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ua,Be]}],"list-image":[{"list-image":["none",Be]}],"list-style-type":[{list:["none","disc","decimal",Be]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ua,Ja]}],"underline-offset":[{"underline-offset":["auto",ua,Be]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...T(),LEe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",SEe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},IEe]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:D()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[ua,Be]}],"outline-w":[{outline:[ua,Ja]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ua,Ja]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ei,AEe]}],"shadow-color":[{shadow:[_2]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ei,Be]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[u]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Be]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Be]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[b2,Be]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Be]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ua,Ja,LT]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},zEe=mEe(PEe);function ne(...e){return zEe(TY(e))}function Xt(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,o;n<e.length;n++)(o=Xt(e[n]))!==""&&(t+=(t&&" ")+o);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var REe={value:()=>{}};function Xz(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new oP(n)}function oP(e){this._=e}function TEe(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}oP.prototype=Xz.prototype={constructor:oP,on:function(e,t){var n=this._,o=TEe(e+"",n),r,a=-1,i=o.length;if(arguments.length<2){for(;++a<i;)if((r=(e=o[a]).type)&&(r=DEe(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<i;)if(r=(e=o[a]).type)n[r]=ZB(n[r],e.name,t);else if(t==null)for(r in n)n[r]=ZB(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new oP(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,a;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],o=0,r=a.length;o<r;++o)a[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,a=o.length;r<a;++r)o[r].value.apply(t,n)}};function DEe(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function ZB(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=REe,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var SH="http://www.w3.org/1999/xhtml";const YB={svg:"http://www.w3.org/2000/svg",xhtml:SH,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Zz(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),YB.hasOwnProperty(t)?{space:YB[t],local:e}:e}function HEe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===SH&&t.documentElement.namespaceURI===SH?t.createElement(e):t.createElementNS(n,e)}}function OEe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function VY(e){var t=Zz(e);return(t.local?OEe:HEe)(t)}function FEe(){}function jF(e){return e==null?FEe:function(){return this.querySelector(e)}}function qEe(e){typeof e!="function"&&(e=jF(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=new Array(i),c,l,h=0;h<i;++h)(c=a[h])&&(l=e.call(c,c.__data__,h,a))&&("__data__"in c&&(l.__data__=c.__data__),s[h]=l);return new ho(o,this._parents)}function VEe(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function BEe(){return[]}function BY(e){return e==null?BEe:function(){return this.querySelectorAll(e)}}function UEe(e){return function(){return VEe(e.apply(this,arguments))}}function WEe(e){typeof e=="function"?e=UEe(e):e=BY(e);for(var t=this._groups,n=t.length,o=[],r=[],a=0;a<n;++a)for(var i=t[a],s=i.length,c,l=0;l<s;++l)(c=i[l])&&(o.push(e.call(c,c.__data__,l,i)),r.push(c));return new ho(o,r)}function UY(e){return function(){return this.matches(e)}}function WY(e){return function(t){return t.matches(e)}}var GEe=Array.prototype.find;function KEe(e){return function(){return GEe.call(this.children,e)}}function XEe(){return this.firstElementChild}function ZEe(e){return this.select(e==null?XEe:KEe(typeof e=="function"?e:WY(e)))}var YEe=Array.prototype.filter;function QEe(){return Array.from(this.children)}function JEe(e){return function(){return YEe.call(this.children,e)}}function eje(e){return this.selectAll(e==null?QEe:JEe(typeof e=="function"?e:WY(e)))}function tje(e){typeof e!="function"&&(e=UY(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=[],c,l=0;l<i;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new ho(o,this._parents)}function GY(e){return new Array(e.length)}function nje(){return new ho(this._enter||this._groups.map(GY),this._parents)}function VP(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}VP.prototype={constructor:VP,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function oje(e){return function(){return e}}function rje(e,t,n,o,r,a){for(var i=0,s,c=t.length,l=a.length;i<l;++i)(s=t[i])?(s.__data__=a[i],o[i]=s):n[i]=new VP(e,a[i]);for(;i<c;++i)(s=t[i])&&(r[i]=s)}function aje(e,t,n,o,r,a,i){var s,c,l=new Map,h=t.length,u=a.length,p=new Array(h),y;for(s=0;s<h;++s)(c=t[s])&&(p[s]=y=i.call(c,c.__data__,s,t)+"",l.has(y)?r[s]=c:l.set(y,c));for(s=0;s<u;++s)y=i.call(e,a[s],s,a)+"",(c=l.get(y))?(o[s]=c,c.__data__=a[s],l.delete(y)):n[s]=new VP(e,a[s]);for(s=0;s<h;++s)(c=t[s])&&l.get(p[s])===c&&(r[s]=c)}function ije(e){return e.__data__}function sje(e,t){if(!arguments.length)return Array.from(this,ije);var n=t?aje:rje,o=this._parents,r=this._groups;typeof e!="function"&&(e=oje(e));for(var a=r.length,i=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var h=o[l],u=r[l],p=u.length,y=cje(e.call(h,h&&h.__data__,l,o)),g=y.length,k=s[l]=new Array(g),x=i[l]=new Array(g),v=c[l]=new Array(p);n(h,u,k,x,v,y,t);for(var M=0,w=0,b,C;M<g;++M)if(b=k[M]){for(M>=w&&(w=M+1);!(C=x[w])&&++w<g;);b._next=C||null}}return i=new ho(i,o),i._enter=s,i._exit=c,i}function cje(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function lje(){return new ho(this._exit||this._groups.map(GY),this._parents)}function dje(e,t,n){var o=this.enter(),r=this,a=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?a.remove():n(a),o&&r?o.merge(r).order():r}function uje(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,a=o.length,i=Math.min(r,a),s=new Array(r),c=0;c<i;++c)for(var l=n[c],h=o[c],u=l.length,p=s[c]=new Array(u),y,g=0;g<u;++g)(y=l[g]||h[g])&&(p[g]=y);for(;c<r;++c)s[c]=n[c];return new ho(s,this._parents)}function hje(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,a=o[r],i;--r>=0;)(i=o[r])&&(a&&i.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(i,a),a=i);return this}function fje(e){e||(e=pje);function t(u,p){return u&&p?e(u.__data__,p.__data__):!u-!p}for(var n=this._groups,o=n.length,r=new Array(o),a=0;a<o;++a){for(var i=n[a],s=i.length,c=r[a]=new Array(s),l,h=0;h<s;++h)(l=i[h])&&(c[h]=l);c.sort(t)}return new ho(r,this._parents).order()}function pje(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function yje(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function mje(){return Array.from(this)}function gje(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,a=o.length;r<a;++r){var i=o[r];if(i)return i}return null}function kje(){let e=0;for(const t of this)++e;return e}function vje(){return!this.node()}function xje(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],a=0,i=r.length,s;a<i;++a)(s=r[a])&&e.call(s,s.__data__,a,r);return this}function wje(e){return function(){this.removeAttribute(e)}}function Mje(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bje(e,t){return function(){this.setAttribute(e,t)}}function _je(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Cje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Sje(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Lje(e,t){var n=Zz(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Mje:wje:typeof t=="function"?n.local?Sje:Cje:n.local?_je:bje)(n,t))}function KY(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Nje(e){return function(){this.style.removeProperty(e)}}function Ije(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Aje(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function Eje(e,t,n){return arguments.length>1?this.each((t==null?Nje:typeof t=="function"?Aje:Ije)(e,t,n??"")):C0(this.node(),e)}function C0(e,t){return e.style.getPropertyValue(t)||KY(e).getComputedStyle(e,null).getPropertyValue(t)}function jje(e){return function(){delete this[e]}}function $je(e,t){return function(){this[e]=t}}function Pje(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function zje(e,t){return arguments.length>1?this.each((t==null?jje:typeof t=="function"?Pje:$je)(e,t)):this.node()[e]}function XY(e){return e.trim().split(/^|\s+/)}function $F(e){return e.classList||new ZY(e)}function ZY(e){this._node=e,this._names=XY(e.getAttribute("class")||"")}ZY.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function YY(e,t){for(var n=$F(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function QY(e,t){for(var n=$F(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function Rje(e){return function(){YY(this,e)}}function Tje(e){return function(){QY(this,e)}}function Dje(e,t){return function(){(t.apply(this,arguments)?YY:QY)(this,e)}}function Hje(e,t){var n=XY(e+"");if(arguments.length<2){for(var o=$F(this.node()),r=-1,a=n.length;++r<a;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?Dje:t?Rje:Tje)(n,t))}function Oje(){this.textContent=""}function Fje(e){return function(){this.textContent=e}}function qje(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Vje(e){return arguments.length?this.each(e==null?Oje:(typeof e=="function"?qje:Fje)(e)):this.node().textContent}function Bje(){this.innerHTML=""}function Uje(e){return function(){this.innerHTML=e}}function Wje(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Gje(e){return arguments.length?this.each(e==null?Bje:(typeof e=="function"?Wje:Uje)(e)):this.node().innerHTML}function Kje(){this.nextSibling&&this.parentNode.appendChild(this)}function Xje(){return this.each(Kje)}function Zje(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Yje(){return this.each(Zje)}function Qje(e){var t=typeof e=="function"?e:VY(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Jje(){return null}function e$e(e,t){var n=typeof e=="function"?e:VY(e),o=t==null?Jje:typeof t=="function"?t:jF(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function t$e(){var e=this.parentNode;e&&e.removeChild(this)}function n$e(){return this.each(t$e)}function o$e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function r$e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function a$e(e){return this.select(e?r$e:o$e)}function i$e(e){return arguments.length?this.property("__data__",e):this.node().__data__}function s$e(e){return function(t){e.call(this,t,this.__data__)}}function c$e(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function l$e(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,a;n<r;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++o]=a;++o?t.length=o:delete this.__on}}}function d$e(e,t,n){return function(){var o=this.__on,r,a=s$e(t);if(o){for(var i=0,s=o.length;i<s;++i)if((r=o[i]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),r.value=t;return}}this.addEventListener(e.type,a,n),r={type:e.type,name:e.name,value:t,listener:a,options:n},o?o.push(r):this.__on=[r]}}function u$e(e,t,n){var o=c$e(e+""),r,a=o.length,i;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,h;c<l;++c)for(r=0,h=s[c];r<a;++r)if((i=o[r]).type===h.type&&i.name===h.name)return h.value}return}for(s=t?d$e:l$e,r=0;r<a;++r)this.each(s(o[r],t,n));return this}function JY(e,t,n){var o=KY(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function h$e(e,t){return function(){return JY(this,e,t)}}function f$e(e,t){return function(){return JY(this,e,t.apply(this,arguments))}}function p$e(e,t){return this.each((typeof t=="function"?f$e:h$e)(e,t))}function*y$e(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,a=o.length,i;r<a;++r)(i=o[r])&&(yield i)}var eQ=[null];function ho(e,t){this._groups=e,this._parents=t}function bf(){return new ho([[document.documentElement]],eQ)}function m$e(){return this}ho.prototype=bf.prototype={constructor:ho,select:qEe,selectAll:WEe,selectChild:ZEe,selectChildren:eje,filter:tje,data:sje,enter:nje,exit:lje,join:dje,merge:uje,selection:m$e,order:hje,sort:fje,call:yje,nodes:mje,node:gje,size:kje,empty:vje,each:xje,attr:Lje,style:Eje,property:zje,classed:Hje,text:Vje,html:Gje,raise:Xje,lower:Yje,append:Qje,insert:e$e,remove:n$e,clone:a$e,datum:i$e,on:u$e,dispatch:p$e,[Symbol.iterator]:y$e};function ro(e){return typeof e=="string"?new ho([[document.querySelector(e)]],[document.documentElement]):new ho([[e]],eQ)}function g$e(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Go(e,t){if(e=g$e(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const k$e={passive:!1},Yh={capture:!0,passive:!1};function NT(e){e.stopImmediatePropagation()}function h0(e){e.preventDefault(),e.stopImmediatePropagation()}function tQ(e){var t=e.document.documentElement,n=ro(e).on("dragstart.drag",h0,Yh);"onselectstart"in t?n.on("selectstart.drag",h0,Yh):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function nQ(e,t){var n=e.document.documentElement,o=ro(e).on("dragstart.drag",null);t&&(o.on("click.drag",h0,Yh),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const kp=e=>()=>e;function LH(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:a,x:i,y:s,dx:c,dy:l,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:h}})}LH.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function v$e(e){return!e.ctrlKey&&!e.button}function x$e(){return this.parentNode}function w$e(e,t){return t??{x:e.x,y:e.y}}function M$e(){return navigator.maxTouchPoints||"ontouchstart"in this}function oQ(){var e=v$e,t=x$e,n=w$e,o=M$e,r={},a=Xz("start","drag","end"),i=0,s,c,l,h,u=0;function p(b){b.on("mousedown.drag",y).filter(o).on("touchstart.drag",x).on("touchmove.drag",v,k$e).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(b,C){if(!(h||!e.call(this,b,C))){var _=w(this,t.call(this,b,C),b,C,"mouse");_&&(ro(b.view).on("mousemove.drag",g,Yh).on("mouseup.drag",k,Yh),tQ(b.view),NT(b),l=!1,s=b.clientX,c=b.clientY,_("start",b))}}function g(b){if(h0(b),!l){var C=b.clientX-s,_=b.clientY-c;l=C*C+_*_>u}r.mouse("drag",b)}function k(b){ro(b.view).on("mousemove.drag mouseup.drag",null),nQ(b.view,l),h0(b),r.mouse("end",b)}function x(b,C){if(e.call(this,b,C)){var _=b.changedTouches,S=t.call(this,b,C),E=_.length,P,N;for(P=0;P<E;++P)(N=w(this,S,b,C,_[P].identifier,_[P]))&&(NT(b),N("start",b,_[P]))}}function v(b){var C=b.changedTouches,_=C.length,S,E;for(S=0;S<_;++S)(E=r[C[S].identifier])&&(h0(b),E("drag",b,C[S]))}function M(b){var C=b.changedTouches,_=C.length,S,E;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),S=0;S<_;++S)(E=r[C[S].identifier])&&(NT(b),E("end",b,C[S]))}function w(b,C,_,S,E,P){var N=a.copy(),j=Go(P||_,C),z,U,A;if((A=n.call(b,new LH("beforestart",{sourceEvent:_,target:p,identifier:E,active:i,x:j[0],y:j[1],dx:0,dy:0,dispatch:N}),S))!=null)return z=A.x-j[0]||0,U=A.y-j[1]||0,function T(D,O,I){var R=j,L;switch(D){case"start":r[E]=T,L=i++;break;case"end":delete r[E],--i;case"drag":j=Go(I||O,C),L=i;break}N.call(D,b,new LH(D,{sourceEvent:O,subject:A,target:p,identifier:E,active:L,x:j[0]+z,y:j[1]+U,dx:j[0]-R[0],dy:j[1]-R[1],dispatch:N}),S)}}return p.filter=function(b){return arguments.length?(e=typeof b=="function"?b:kp(!!b),p):e},p.container=function(b){return arguments.length?(t=typeof b=="function"?b:kp(b),p):t},p.subject=function(b){return arguments.length?(n=typeof b=="function"?b:kp(b),p):n},p.touchable=function(b){return arguments.length?(o=typeof b=="function"?b:kp(!!b),p):o},p.on=function(){var b=a.on.apply(a,arguments);return b===a?p:b},p.clickDistance=function(b){return arguments.length?(u=(b=+b)*b,p):Math.sqrt(u)},p}function PF(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function rQ(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function _f(){}var Qh=.7,BP=1/Qh,f0="\\s*([+-]?\\d+)\\s*",Jh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Br="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b$e=/^#([0-9a-f]{3,8})$/,_$e=new RegExp(`^rgb\\(${f0},${f0},${f0}\\)$`),C$e=new RegExp(`^rgb\\(${Br},${Br},${Br}\\)$`),S$e=new RegExp(`^rgba\\(${f0},${f0},${f0},${Jh}\\)$`),L$e=new RegExp(`^rgba\\(${Br},${Br},${Br},${Jh}\\)$`),N$e=new RegExp(`^hsl\\(${Jh},${Br},${Br}\\)$`),I$e=new RegExp(`^hsla\\(${Jh},${Br},${Br},${Jh}\\)$`),QB={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};PF(_f,Ed,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:JB,formatHex:JB,formatHex8:A$e,formatHsl:E$e,formatRgb:eU,toString:eU});function JB(){return this.rgb().formatHex()}function A$e(){return this.rgb().formatHex8()}function E$e(){return aQ(this).formatHsl()}function eU(){return this.rgb().formatRgb()}function Ed(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=b$e.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?tU(t):n===3?new Un(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?vp(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?vp(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=_$e.exec(e))?new Un(t[1],t[2],t[3],1):(t=C$e.exec(e))?new Un(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=S$e.exec(e))?vp(t[1],t[2],t[3],t[4]):(t=L$e.exec(e))?vp(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=N$e.exec(e))?rU(t[1],t[2]/100,t[3]/100,1):(t=I$e.exec(e))?rU(t[1],t[2]/100,t[3]/100,t[4]):QB.hasOwnProperty(e)?tU(QB[e]):e==="transparent"?new Un(NaN,NaN,NaN,0):null}function tU(e){return new Un(e>>16&255,e>>8&255,e&255,1)}function vp(e,t,n,o){return o<=0&&(e=t=n=NaN),new Un(e,t,n,o)}function j$e(e){return e instanceof _f||(e=Ed(e)),e?(e=e.rgb(),new Un(e.r,e.g,e.b,e.opacity)):new Un}function NH(e,t,n,o){return arguments.length===1?j$e(e):new Un(e,t,n,o??1)}function Un(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}PF(Un,NH,rQ(_f,{brighter(e){return e=e==null?BP:Math.pow(BP,e),new Un(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Qh:Math.pow(Qh,e),new Un(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Un(_d(this.r),_d(this.g),_d(this.b),UP(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:nU,formatHex:nU,formatHex8:$$e,formatRgb:oU,toString:oU}));function nU(){return`#${vd(this.r)}${vd(this.g)}${vd(this.b)}`}function $$e(){return`#${vd(this.r)}${vd(this.g)}${vd(this.b)}${vd((isNaN(this.opacity)?1:this.opacity)*255)}`}function oU(){const e=UP(this.opacity);return`${e===1?"rgb(":"rgba("}${_d(this.r)}, ${_d(this.g)}, ${_d(this.b)}${e===1?")":`, ${e})`}`}function UP(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _d(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vd(e){return e=_d(e),(e<16?"0":"")+e.toString(16)}function rU(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Zo(e,t,n,o)}function aQ(e){if(e instanceof Zo)return new Zo(e.h,e.s,e.l,e.opacity);if(e instanceof _f||(e=Ed(e)),!e)return new Zo;if(e instanceof Zo)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),a=Math.max(t,n,o),i=NaN,s=a-r,c=(a+r)/2;return s?(t===a?i=(n-o)/s+(n<o)*6:n===a?i=(o-t)/s+2:i=(t-n)/s+4,s/=c<.5?a+r:2-a-r,i*=60):s=c>0&&c<1?0:i,new Zo(i,s,c,e.opacity)}function P$e(e,t,n,o){return arguments.length===1?aQ(e):new Zo(e,t,n,o??1)}function Zo(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}PF(Zo,P$e,rQ(_f,{brighter(e){return e=e==null?BP:Math.pow(BP,e),new Zo(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Qh:Math.pow(Qh,e),new Zo(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new Un(IT(e>=240?e-240:e+120,r,o),IT(e,r,o),IT(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Zo(aU(this.h),xp(this.s),xp(this.l),UP(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=UP(this.opacity);return`${e===1?"hsl(":"hsla("}${aU(this.h)}, ${xp(this.s)*100}%, ${xp(this.l)*100}%${e===1?")":`, ${e})`}`}}));function aU(e){return e=(e||0)%360,e<0?e+360:e}function xp(e){return Math.max(0,Math.min(1,e||0))}function IT(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Yz=e=>()=>e;function iQ(e,t){return function(n){return e+n*t}}function z$e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Pit(e,t){var n=t-e;return n?iQ(e,n>180||n<-180?n-360*Math.round(n/360):n):Yz(isNaN(e)?t:e)}function R$e(e){return(e=+e)==1?sQ:function(t,n){return n-t?z$e(t,n,e):Yz(isNaN(t)?n:t)}}function sQ(e,t){var n=t-e;return n?iQ(e,n):Yz(isNaN(e)?t:e)}const WP=function e(t){var n=R$e(t);function o(r,a){var i=n((r=NH(r)).r,(a=NH(a)).r),s=n(r.g,a.g),c=n(r.b,a.b),l=sQ(r.opacity,a.opacity);return function(h){return r.r=i(h),r.g=s(h),r.b=c(h),r.opacity=l(h),r+""}}return o.gamma=e,o}(1);function T$e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(a){for(r=0;r<n;++r)o[r]=e[r]*(1-a)+t[r]*a;return o}}function D$e(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function H$e(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),a=new Array(n),i;for(i=0;i<o;++i)r[i]=Sh(e[i],t[i]);for(;i<n;++i)a[i]=t[i];return function(s){for(i=0;i<o;++i)a[i]=r[i](s);return a}}function O$e(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function zr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function F$e(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Sh(e[r],t[r]):o[r]=t[r];return function(a){for(r in n)o[r]=n[r](a);return o}}var IH=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,AT=new RegExp(IH.source,"g");function q$e(e){return function(){return e}}function V$e(e){return function(t){return e(t)+""}}function cQ(e,t){var n=IH.lastIndex=AT.lastIndex=0,o,r,a,i=-1,s=[],c=[];for(e=e+"",t=t+"";(o=IH.exec(e))&&(r=AT.exec(t));)(a=r.index)>n&&(a=t.slice(n,a),s[i]?s[i]+=a:s[++i]=a),(o=o[0])===(r=r[0])?s[i]?s[i]+=r:s[++i]=r:(s[++i]=null,c.push({i,x:zr(o,r)})),n=AT.lastIndex;return n<t.length&&(a=t.slice(n),s[i]?s[i]+=a:s[++i]=a),s.length<2?c[0]?V$e(c[0].x):q$e(t):(t=c.length,function(l){for(var h=0,u;h<t;++h)s[(u=c[h]).i]=u.x(l);return s.join("")})}function Sh(e,t){var n=typeof t,o;return t==null||n==="boolean"?Yz(t):(n==="number"?zr:n==="string"?(o=Ed(t))?(t=o,WP):cQ:t instanceof Ed?WP:t instanceof Date?O$e:D$e(t)?T$e:Array.isArray(t)?H$e:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?F$e:zr)(e,t)}var iU=180/Math.PI,AH={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function lQ(e,t,n,o,r,a){var i,s,c;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(c=e*n+t*o)&&(n-=e*c,o-=t*c),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,c/=s),e*o<t*n&&(e=-e,t=-t,c=-c,i=-i),{translateX:r,translateY:a,rotate:Math.atan2(t,e)*iU,skewX:Math.atan(c)*iU,scaleX:i,scaleY:s}}var wp;function B$e(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?AH:lQ(t.a,t.b,t.c,t.d,t.e,t.f)}function U$e(e){return e==null||(wp||(wp=document.createElementNS("http://www.w3.org/2000/svg","g")),wp.setAttribute("transform",e),!(e=wp.transform.baseVal.consolidate()))?AH:(e=e.matrix,lQ(e.a,e.b,e.c,e.d,e.e,e.f))}function dQ(e,t,n,o){function r(l){return l.length?l.pop()+" ":""}function a(l,h,u,p,y,g){if(l!==u||h!==p){var k=y.push("translate(",null,t,null,n);g.push({i:k-4,x:zr(l,u)},{i:k-2,x:zr(h,p)})}else(u||p)&&y.push("translate("+u+t+p+n)}function i(l,h,u,p){l!==h?(l-h>180?h+=360:h-l>180&&(l+=360),p.push({i:u.push(r(u)+"rotate(",null,o)-2,x:zr(l,h)})):h&&u.push(r(u)+"rotate("+h+o)}function s(l,h,u,p){l!==h?p.push({i:u.push(r(u)+"skewX(",null,o)-2,x:zr(l,h)}):h&&u.push(r(u)+"skewX("+h+o)}function c(l,h,u,p,y,g){if(l!==u||h!==p){var k=y.push(r(y)+"scale(",null,",",null,")");g.push({i:k-4,x:zr(l,u)},{i:k-2,x:zr(h,p)})}else(u!==1||p!==1)&&y.push(r(y)+"scale("+u+","+p+")")}return function(l,h){var u=[],p=[];return l=e(l),h=e(h),a(l.translateX,l.translateY,h.translateX,h.translateY,u,p),i(l.rotate,h.rotate,u,p),s(l.skewX,h.skewX,u,p),c(l.scaleX,l.scaleY,h.scaleX,h.scaleY,u,p),l=h=null,function(y){for(var g=-1,k=p.length,x;++g<k;)u[(x=p[g]).i]=x.x(y);return u.join("")}}}var W$e=dQ(B$e,"px, ","px)","deg)"),G$e=dQ(U$e,", ",")",")"),K$e=1e-12;function sU(e){return((e=Math.exp(e))+1/e)/2}function X$e(e){return((e=Math.exp(e))-1/e)/2}function Z$e(e){return((e=Math.exp(2*e))-1)/(e+1)}const rP=function e(t,n,o){function r(a,i){var s=a[0],c=a[1],l=a[2],h=i[0],u=i[1],p=i[2],y=h-s,g=u-c,k=y*y+g*g,x,v;if(k<K$e)v=Math.log(p/l)/t,x=function(S){return[s+S*y,c+S*g,l*Math.exp(t*S*v)]};else{var M=Math.sqrt(k),w=(p*p-l*l+o*k)/(2*l*n*M),b=(p*p-l*l-o*k)/(2*p*n*M),C=Math.log(Math.sqrt(w*w+1)-w),_=Math.log(Math.sqrt(b*b+1)-b);v=(_-C)/t,x=function(S){var E=S*v,P=sU(C),N=l/(n*M)*(P*Z$e(t*E+C)-X$e(C));return[s+N*y,c+N*g,l*P/sU(t*E+C)]}}return x.duration=v*1e3*t/Math.SQRT2,x}return r.rho=function(a){var i=Math.max(.001,+a),s=i*i,c=s*s;return e(i,s,c)},r}(Math.SQRT2,2,4);var S0=0,z2=0,C2=0,uQ=1e3,GP,R2,KP=0,jd=0,Qz=0,ef=typeof performance=="object"&&performance.now?performance:Date,hQ=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function zF(){return jd||(hQ(Y$e),jd=ef.now()+Qz)}function Y$e(){jd=0}function XP(){this._call=this._time=this._next=null}XP.prototype=fQ.prototype={constructor:XP,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?zF():+n)+(t==null?0:+t),!this._next&&R2!==this&&(R2?R2._next=this:GP=this,R2=this),this._call=e,this._time=n,EH()},stop:function(){this._call&&(this._call=null,this._time=1/0,EH())}};function fQ(e,t,n){var o=new XP;return o.restart(e,t,n),o}function Q$e(){zF(),++S0;for(var e=GP,t;e;)(t=jd-e._time)>=0&&e._call.call(void 0,t),e=e._next;--S0}function cU(){jd=(KP=ef.now())+Qz,S0=z2=0;try{Q$e()}finally{S0=0,ePe(),jd=0}}function J$e(){var e=ef.now(),t=e-KP;t>uQ&&(Qz-=t,KP=e)}function ePe(){for(var e,t=GP,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:GP=n);R2=e,EH(o)}function EH(e){if(!S0){z2&&(z2=clearTimeout(z2));var t=e-jd;t>24?(e<1/0&&(z2=setTimeout(cU,e-ef.now()-Qz)),C2&&(C2=clearInterval(C2))):(C2||(KP=ef.now(),C2=setInterval(J$e,uQ)),S0=1,hQ(cU))}}function lU(e,t,n){var o=new XP;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var tPe=Xz("start","end","cancel","interrupt"),nPe=[],pQ=0,dU=1,jH=2,aP=3,uU=4,$H=5,iP=6;function Jz(e,t,n,o,r,a){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;oPe(e,n,{name:t,index:o,group:r,on:tPe,tween:nPe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:pQ})}function RF(e,t){var n=ir(e,t);if(n.state>pQ)throw new Error("too late; already scheduled");return n}function Qr(e,t){var n=ir(e,t);if(n.state>aP)throw new Error("too late; already running");return n}function ir(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function oPe(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=fQ(a,0,n.time);function a(l){n.state=dU,n.timer.restart(i,n.delay,n.time),n.delay<=l&&i(l-n.delay)}function i(l){var h,u,p,y;if(n.state!==dU)return c();for(h in o)if(y=o[h],y.name===n.name){if(y.state===aP)return lU(i);y.state===uU?(y.state=iP,y.timer.stop(),y.on.call("interrupt",e,e.__data__,y.index,y.group),delete o[h]):+h<t&&(y.state=iP,y.timer.stop(),y.on.call("cancel",e,e.__data__,y.index,y.group),delete o[h])}if(lU(function(){n.state===aP&&(n.state=uU,n.timer.restart(s,n.delay,n.time),s(l))}),n.state=jH,n.on.call("start",e,e.__data__,n.index,n.group),n.state===jH){for(n.state=aP,r=new Array(p=n.tween.length),h=0,u=-1;h<p;++h)(y=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=y);r.length=u+1}}function s(l){for(var h=l<n.duration?n.ease.call(null,l/n.duration):(n.timer.restart(c),n.state=$H,1),u=-1,p=r.length;++u<p;)r[u].call(e,h);n.state===$H&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=iP,n.timer.stop(),delete o[t];for(var l in o)return;delete e.__transition}}function sP(e,t){var n=e.__transition,o,r,a=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((o=n[i]).name!==t){a=!1;continue}r=o.state>jH&&o.state<$H,o.state=iP,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[i]}a&&delete e.__transition}}function rPe(e){return this.each(function(){sP(this,e)})}function aPe(e,t){var n,o;return function(){var r=Qr(this,e),a=r.tween;if(a!==n){o=n=a;for(var i=0,s=o.length;i<s;++i)if(o[i].name===t){o=o.slice(),o.splice(i,1);break}}r.tween=o}}function iPe(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var a=Qr(this,e),i=a.tween;if(i!==o){r=(o=i).slice();for(var s={name:t,value:n},c=0,l=r.length;c<l;++c)if(r[c].name===t){r[c]=s;break}c===l&&r.push(s)}a.tween=r}}function sPe(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=ir(this.node(),n).tween,r=0,a=o.length,i;r<a;++r)if((i=o[r]).name===e)return i.value;return null}return this.each((t==null?aPe:iPe)(n,e,t))}function TF(e,t,n){var o=e._id;return e.each(function(){var r=Qr(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return ir(r,o).value[t]}}function yQ(e,t){var n;return(typeof t=="number"?zr:t instanceof Ed?WP:(n=Ed(t))?(t=n,WP):cQ)(e,t)}function cPe(e){return function(){this.removeAttribute(e)}}function lPe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dPe(e,t,n){var o,r=n+"",a;return function(){var i=this.getAttribute(e);return i===r?null:i===o?a:a=t(o=i,n)}}function uPe(e,t,n){var o,r=n+"",a;return function(){var i=this.getAttributeNS(e.space,e.local);return i===r?null:i===o?a:a=t(o=i,n)}}function hPe(e,t,n){var o,r,a;return function(){var i,s=n(this),c;return s==null?void this.removeAttribute(e):(i=this.getAttribute(e),c=s+"",i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s)))}}function fPe(e,t,n){var o,r,a;return function(){var i,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),c=s+"",i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s)))}}function pPe(e,t){var n=Zz(e),o=n==="transform"?G$e:yQ;return this.attrTween(e,typeof t=="function"?(n.local?fPe:hPe)(n,o,TF(this,"attr."+e,t)):t==null?(n.local?lPe:cPe)(n):(n.local?uPe:dPe)(n,o,t))}function yPe(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function mPe(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function gPe(e,t){var n,o;function r(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&mPe(e,a)),n}return r._value=t,r}function kPe(e,t){var n,o;function r(){var a=t.apply(this,arguments);return a!==o&&(n=(o=a)&&yPe(e,a)),n}return r._value=t,r}function vPe(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=Zz(e);return this.tween(n,(o.local?gPe:kPe)(o,t))}function xPe(e,t){return function(){RF(this,e).delay=+t.apply(this,arguments)}}function wPe(e,t){return t=+t,function(){RF(this,e).delay=t}}function MPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xPe:wPe)(t,e)):ir(this.node(),t).delay}function bPe(e,t){return function(){Qr(this,e).duration=+t.apply(this,arguments)}}function _Pe(e,t){return t=+t,function(){Qr(this,e).duration=t}}function CPe(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?bPe:_Pe)(t,e)):ir(this.node(),t).duration}function SPe(e,t){if(typeof t!="function")throw new Error;return function(){Qr(this,e).ease=t}}function LPe(e){var t=this._id;return arguments.length?this.each(SPe(t,e)):ir(this.node(),t).ease}function NPe(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Qr(this,e).ease=n}}function IPe(e){if(typeof e!="function")throw new Error;return this.each(NPe(this._id,e))}function APe(e){typeof e!="function"&&(e=UY(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var a=t[r],i=a.length,s=o[r]=[],c,l=0;l<i;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Aa(o,this._parents,this._name,this._id)}function EPe(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,a=Math.min(o,r),i=new Array(o),s=0;s<a;++s)for(var c=t[s],l=n[s],h=c.length,u=i[s]=new Array(h),p,y=0;y<h;++y)(p=c[y]||l[y])&&(u[y]=p);for(;s<o;++s)i[s]=t[s];return new Aa(i,this._parents,this._name,this._id)}function jPe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function $Pe(e,t,n){var o,r,a=jPe(t)?RF:Qr;return function(){var i=a(this,e),s=i.on;s!==o&&(r=(o=s).copy()).on(t,n),i.on=r}}function PPe(e,t){var n=this._id;return arguments.length<2?ir(this.node(),n).on.on(e):this.each($Pe(n,e,t))}function zPe(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function RPe(){return this.on("end.remove",zPe(this._id))}function TPe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=jF(e));for(var o=this._groups,r=o.length,a=new Array(r),i=0;i<r;++i)for(var s=o[i],c=s.length,l=a[i]=new Array(c),h,u,p=0;p<c;++p)(h=s[p])&&(u=e.call(h,h.__data__,p,s))&&("__data__"in h&&(u.__data__=h.__data__),l[p]=u,Jz(l[p],t,n,p,l,ir(h,n)));return new Aa(a,this._parents,t,n)}function DPe(e){var t=this._name,n=this._id;typeof e!="function"&&(e=BY(e));for(var o=this._groups,r=o.length,a=[],i=[],s=0;s<r;++s)for(var c=o[s],l=c.length,h,u=0;u<l;++u)if(h=c[u]){for(var p=e.call(h,h.__data__,u,c),y,g=ir(h,n),k=0,x=p.length;k<x;++k)(y=p[k])&&Jz(y,t,n,k,p,g);a.push(p),i.push(h)}return new Aa(a,i,t,n)}var HPe=bf.prototype.constructor;function OPe(){return new HPe(this._groups,this._parents)}function FPe(e,t){var n,o,r;return function(){var a=C0(this,e),i=(this.style.removeProperty(e),C0(this,e));return a===i?null:a===n&&i===o?r:r=t(n=a,o=i)}}function mQ(e){return function(){this.style.removeProperty(e)}}function qPe(e,t,n){var o,r=n+"",a;return function(){var i=C0(this,e);return i===r?null:i===o?a:a=t(o=i,n)}}function VPe(e,t,n){var o,r,a;return function(){var i=C0(this,e),s=n(this),c=s+"";return s==null&&(c=s=(this.style.removeProperty(e),C0(this,e))),i===c?null:i===o&&c===r?a:(r=c,a=t(o=i,s))}}function BPe(e,t){var n,o,r,a="style."+t,i="end."+a,s;return function(){var c=Qr(this,e),l=c.on,h=c.value[a]==null?s||(s=mQ(t)):void 0;(l!==n||r!==h)&&(o=(n=l).copy()).on(i,r=h),c.on=o}}function UPe(e,t,n){var o=(e+="")=="transform"?W$e:yQ;return t==null?this.styleTween(e,FPe(e,o)).on("end.style."+e,mQ(e)):typeof t=="function"?this.styleTween(e,VPe(e,o,TF(this,"style."+e,t))).each(BPe(this._id,e)):this.styleTween(e,qPe(e,o,t),n).on("end.style."+e,null)}function WPe(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function GPe(e,t,n){var o,r;function a(){var i=t.apply(this,arguments);return i!==r&&(o=(r=i)&&WPe(e,i,n)),o}return a._value=t,a}function KPe(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,GPe(e,t,n??""))}function XPe(e){return function(){this.textContent=e}}function ZPe(e){return function(){var t=e(this);this.textContent=t??""}}function YPe(e){return this.tween("text",typeof e=="function"?ZPe(TF(this,"text",e)):XPe(e==null?"":e+""))}function QPe(e){return function(t){this.textContent=e.call(this,t)}}function JPe(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&QPe(r)),t}return o._value=e,o}function eze(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,JPe(e))}function tze(){for(var e=this._name,t=this._id,n=gQ(),o=this._groups,r=o.length,a=0;a<r;++a)for(var i=o[a],s=i.length,c,l=0;l<s;++l)if(c=i[l]){var h=ir(c,t);Jz(c,e,n,l,i,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Aa(o,this._parents,e,n)}function nze(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(a,i){var s={value:i},c={value:function(){--r===0&&a()}};n.each(function(){var l=Qr(this,o),h=l.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),l.on=t}),r===0&&a()})}var oze=0;function Aa(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function gQ(){return++oze}var ha=bf.prototype;Aa.prototype={constructor:Aa,select:TPe,selectAll:DPe,selectChild:ha.selectChild,selectChildren:ha.selectChildren,filter:APe,merge:EPe,selection:OPe,transition:tze,call:ha.call,nodes:ha.nodes,node:ha.node,size:ha.size,empty:ha.empty,each:ha.each,on:PPe,attr:pPe,attrTween:vPe,style:UPe,styleTween:KPe,text:YPe,textTween:eze,remove:RPe,tween:sPe,delay:MPe,duration:CPe,ease:LPe,easeVarying:IPe,end:nze,[Symbol.iterator]:ha[Symbol.iterator]};function rze(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var aze={time:null,delay:0,duration:250,ease:rze};function ize(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function sze(e){var t,n;e instanceof Aa?(t=e._id,e=e._name):(t=gQ(),(n=aze).time=zF(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,a=0;a<r;++a)for(var i=o[a],s=i.length,c,l=0;l<s;++l)(c=i[l])&&Jz(c,e,t,l,i,n||ize(c,t));return new Aa(o,this._parents,e,t)}bf.prototype.interrupt=rPe;bf.prototype.transition=sze;const Mp=e=>()=>e;function cze(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function wa(e,t,n){this.k=e,this.x=t,this.y=n}wa.prototype={constructor:wa,scale:function(e){return e===1?this:new wa(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new wa(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var eR=new wa(1,0,0);kQ.prototype=wa.prototype;function kQ(e){for(;!e.__zoom;)if(!(e=e.parentNode))return eR;return e.__zoom}function ET(e){e.stopImmediatePropagation()}function S2(e){e.preventDefault(),e.stopImmediatePropagation()}function lze(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function dze(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function hU(){return this.__zoom||eR}function uze(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function hze(){return navigator.maxTouchPoints||"ontouchstart"in this}function fze(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function vQ(){var e=lze,t=dze,n=fze,o=uze,r=hze,a=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],s=250,c=rP,l=Xz("start","zoom","end"),h,u,p,y=500,g=150,k=0,x=10;function v(A){A.property("__zoom",hU).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",N).filter(r).on("touchstart.zoom",j).on("touchmove.zoom",z).on("touchend.zoom touchcancel.zoom",U).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(A,T,D,O){var I=A.selection?A.selection():A;I.property("__zoom",hU),A!==I?C(A,T,D,O):I.interrupt().each(function(){_(this,arguments).event(O).start().zoom(null,typeof T=="function"?T.apply(this,arguments):T).end()})},v.scaleBy=function(A,T,D,O){v.scaleTo(A,function(){var I=this.__zoom.k,R=typeof T=="function"?T.apply(this,arguments):T;return I*R},D,O)},v.scaleTo=function(A,T,D,O){v.transform(A,function(){var I=t.apply(this,arguments),R=this.__zoom,L=D==null?b(I):typeof D=="function"?D.apply(this,arguments):D,q=R.invert(L),H=typeof T=="function"?T.apply(this,arguments):T;return n(w(M(R,H),L,q),I,i)},D,O)},v.translateBy=function(A,T,D,O){v.transform(A,function(){return n(this.__zoom.translate(typeof T=="function"?T.apply(this,arguments):T,typeof D=="function"?D.apply(this,arguments):D),t.apply(this,arguments),i)},null,O)},v.translateTo=function(A,T,D,O,I){v.transform(A,function(){var R=t.apply(this,arguments),L=this.__zoom,q=O==null?b(R):typeof O=="function"?O.apply(this,arguments):O;return n(eR.translate(q[0],q[1]).scale(L.k).translate(typeof T=="function"?-T.apply(this,arguments):-T,typeof D=="function"?-D.apply(this,arguments):-D),R,i)},O,I)};function M(A,T){return T=Math.max(a[0],Math.min(a[1],T)),T===A.k?A:new wa(T,A.x,A.y)}function w(A,T,D){var O=T[0]-D[0]*A.k,I=T[1]-D[1]*A.k;return O===A.x&&I===A.y?A:new wa(A.k,O,I)}function b(A){return[(+A[0][0]+ +A[1][0])/2,(+A[0][1]+ +A[1][1])/2]}function C(A,T,D,O){A.on("start.zoom",function(){_(this,arguments).event(O).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(O).end()}).tween("zoom",function(){var I=this,R=arguments,L=_(I,R).event(O),q=t.apply(I,R),H=D==null?b(q):typeof D=="function"?D.apply(I,R):D,$=Math.max(q[1][0]-q[0][0],q[1][1]-q[0][1]),X=I.__zoom,G=typeof T=="function"?T.apply(I,R):T,Q=c(X.invert(H).concat($/X.k),G.invert(H).concat($/G.k));return function(oe){if(oe===1)oe=G;else{var re=Q(oe),te=$/re[2];oe=new wa(te,H[0]-re[0]*te,H[1]-re[1]*te)}L.zoom(null,oe)}})}function _(A,T,D){return!D&&A.__zooming||new S(A,T)}function S(A,T){this.that=A,this.args=T,this.active=0,this.sourceEvent=null,this.extent=t.apply(A,T),this.taps=0}S.prototype={event:function(A){return A&&(this.sourceEvent=A),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(A,T){return this.mouse&&A!=="mouse"&&(this.mouse[1]=T.invert(this.mouse[0])),this.touch0&&A!=="touch"&&(this.touch0[1]=T.invert(this.touch0[0])),this.touch1&&A!=="touch"&&(this.touch1[1]=T.invert(this.touch1[0])),this.that.__zoom=T,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(A){var T=ro(this.that).datum();l.call(A,this.that,new cze(A,{sourceEvent:this.sourceEvent,target:v,transform:this.that.__zoom,dispatch:l}),T)}};function E(A,...T){if(!e.apply(this,arguments))return;var D=_(this,T).event(A),O=this.__zoom,I=Math.max(a[0],Math.min(a[1],O.k*Math.pow(2,o.apply(this,arguments)))),R=Go(A);if(D.wheel)(D.mouse[0][0]!==R[0]||D.mouse[0][1]!==R[1])&&(D.mouse[1]=O.invert(D.mouse[0]=R)),clearTimeout(D.wheel);else{if(O.k===I)return;D.mouse=[R,O.invert(R)],sP(this),D.start()}S2(A),D.wheel=setTimeout(L,g),D.zoom("mouse",n(w(M(O,I),D.mouse[0],D.mouse[1]),D.extent,i));function L(){D.wheel=null,D.end()}}function P(A,...T){if(p||!e.apply(this,arguments))return;var D=A.currentTarget,O=_(this,T,!0).event(A),I=ro(A.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",$,!0),R=Go(A,D),L=A.clientX,q=A.clientY;tQ(A.view),ET(A),O.mouse=[R,this.__zoom.invert(R)],sP(this),O.start();function H(X){if(S2(X),!O.moved){var G=X.clientX-L,Q=X.clientY-q;O.moved=G*G+Q*Q>k}O.event(X).zoom("mouse",n(w(O.that.__zoom,O.mouse[0]=Go(X,D),O.mouse[1]),O.extent,i))}function $(X){I.on("mousemove.zoom mouseup.zoom",null),nQ(X.view,O.moved),S2(X),O.event(X).end()}}function N(A,...T){if(e.apply(this,arguments)){var D=this.__zoom,O=Go(A.changedTouches?A.changedTouches[0]:A,this),I=D.invert(O),R=D.k*(A.shiftKey?.5:2),L=n(w(M(D,R),O,I),t.apply(this,T),i);S2(A),s>0?ro(this).transition().duration(s).call(C,L,O,A):ro(this).call(v.transform,L,O,A)}}function j(A,...T){if(e.apply(this,arguments)){var D=A.touches,O=D.length,I=_(this,T,A.changedTouches.length===O).event(A),R,L,q,H;for(ET(A),L=0;L<O;++L)q=D[L],H=Go(q,this),H=[H,this.__zoom.invert(H),q.identifier],I.touch0?!I.touch1&&I.touch0[2]!==H[2]&&(I.touch1=H,I.taps=0):(I.touch0=H,R=!0,I.taps=1+!!h);h&&(h=clearTimeout(h)),R&&(I.taps<2&&(u=H[0],h=setTimeout(function(){h=null},y)),sP(this),I.start())}}function z(A,...T){if(this.__zooming){var D=_(this,T).event(A),O=A.changedTouches,I=O.length,R,L,q,H;for(S2(A),R=0;R<I;++R)L=O[R],q=Go(L,this),D.touch0&&D.touch0[2]===L.identifier?D.touch0[0]=q:D.touch1&&D.touch1[2]===L.identifier&&(D.touch1[0]=q);if(L=D.that.__zoom,D.touch1){var $=D.touch0[0],X=D.touch0[1],G=D.touch1[0],Q=D.touch1[1],oe=(oe=G[0]-$[0])*oe+(oe=G[1]-$[1])*oe,re=(re=Q[0]-X[0])*re+(re=Q[1]-X[1])*re;L=M(L,Math.sqrt(oe/re)),q=[($[0]+G[0])/2,($[1]+G[1])/2],H=[(X[0]+Q[0])/2,(X[1]+Q[1])/2]}else if(D.touch0)q=D.touch0[0],H=D.touch0[1];else return;D.zoom("touch",n(w(L,q,H),D.extent,i))}}function U(A,...T){if(this.__zooming){var D=_(this,T).event(A),O=A.changedTouches,I=O.length,R,L;for(ET(A),p&&clearTimeout(p),p=setTimeout(function(){p=null},y),R=0;R<I;++R)L=O[R],D.touch0&&D.touch0[2]===L.identifier?delete D.touch0:D.touch1&&D.touch1[2]===L.identifier&&delete D.touch1;if(D.touch1&&!D.touch0&&(D.touch0=D.touch1,delete D.touch1),D.touch0)D.touch0[1]=this.__zoom.invert(D.touch0[0]);else if(D.end(),D.taps===2&&(L=Go(L,this),Math.hypot(u[0]-L[0],u[1]-L[1])<x)){var q=ro(this).on("dblclick.zoom");q&&q.apply(this,arguments)}}}return v.wheelDelta=function(A){return arguments.length?(o=typeof A=="function"?A:Mp(+A),v):o},v.filter=function(A){return arguments.length?(e=typeof A=="function"?A:Mp(!!A),v):e},v.touchable=function(A){return arguments.length?(r=typeof A=="function"?A:Mp(!!A),v):r},v.extent=function(A){return arguments.length?(t=typeof A=="function"?A:Mp([[+A[0][0],+A[0][1]],[+A[1][0],+A[1][1]]]),v):t},v.scaleExtent=function(A){return arguments.length?(a[0]=+A[0],a[1]=+A[1],v):[a[0],a[1]]},v.translateExtent=function(A){return arguments.length?(i[0][0]=+A[0][0],i[1][0]=+A[1][0],i[0][1]=+A[0][1],i[1][1]=+A[1][1],v):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},v.constrain=function(A){return arguments.length?(n=A,v):n},v.duration=function(A){return arguments.length?(s=+A,v):s},v.interpolate=function(A){return arguments.length?(c=A,v):c},v.on=function(){var A=l.on.apply(l,arguments);return A===l?v:A},v.clickDistance=function(A){return arguments.length?(k=(A=+A)*A,v):Math.sqrt(k)},v.tapDistance=function(A){return arguments.length?(x=+A,v):x},v}const Kr={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:o})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:o}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},tf=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],xQ=["Enter"," ","Escape"],wQ={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var L0;(function(e){e.Strict="strict",e.Loose="loose"})(L0||(L0={}));var Cd;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Cd||(Cd={}));var N0;(function(e){e.Partial="partial",e.Full="full"})(N0||(N0={}));const MQ={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var mi;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(mi||(mi={}));var nf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(nf||(nf={}));var fe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(fe||(fe={}));const fU={[fe.Left]:fe.Right,[fe.Right]:fe.Left,[fe.Top]:fe.Bottom,[fe.Bottom]:fe.Top};function bQ(e){return e===null?null:e?"valid":"invalid"}const _Q=e=>"id"in e&&"source"in e&&"target"in e,pze=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),DF=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Cf=(e,t=[0,0])=>{const{width:n,height:o}=za(e),r=e.origin??t,a=n*r[0],i=o*r[1];return{x:e.position.x-a,y:e.position.y-i}},yze=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((o,r)=>{const a=typeof r=="string";let i=!t.nodeLookup&&!a?r:void 0;t.nodeLookup&&(i=a?t.nodeLookup.get(r):DF(r)?r:t.nodeLookup.get(r.id));const s=i?ZP(i,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return tR(o,s)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return nR(n)},Sf=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return e.forEach(r=>{(t.filter===void 0||t.filter(r))&&(n=tR(n,ZP(r)),o=!0)}),o?nR(n):{x:0,y:0,width:0,height:0}},HF=(e,t,[n,o,r]=[0,0,1],a=!1,i=!1)=>{const s={...Nf(t,[n,o,r]),width:t.width/r,height:t.height/r},c=[];for(const l of e.values()){const{measured:h,selectable:u=!0,hidden:p=!1}=l;if(i&&!u||p)continue;const y=h.width??l.width??l.initialWidth??null,g=h.height??l.height??l.initialHeight??null,k=of(s,A0(l)),x=(y??0)*(g??0),v=a&&k>0;(!l.internals.handleBounds||v||k>=x||l.dragging)&&c.push(l)}return c},mze=(e,t)=>{const n=new Set;return e.forEach(o=>{n.add(o.id)}),t.filter(o=>n.has(o.source)||n.has(o.target))};function gze(e,t){const n=new Map,o=t!=null&&t.nodes?new Set(t.nodes.map(r=>r.id)):null;return e.forEach(r=>{r.measured.width&&r.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!r.hidden)&&(!o||o.has(r.id))&&n.set(r.id,r)}),n}async function kze({nodes:e,width:t,height:n,panZoom:o,minZoom:r,maxZoom:a},i){if(e.size===0)return Promise.resolve(!0);const s=gze(e,i),c=Sf(s),l=OF(c,t,n,(i==null?void 0:i.minZoom)??r,(i==null?void 0:i.maxZoom)??a,(i==null?void 0:i.padding)??.1);return await o.setViewport(l,{duration:i==null?void 0:i.duration,ease:i==null?void 0:i.ease,interpolate:i==null?void 0:i.interpolate}),Promise.resolve(!0)}function CQ({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:o=[0,0],nodeExtent:r,onError:a}){const i=n.get(e),s=i.parentId?n.get(i.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},h=i.origin??o;let u=i.extent||r;if(i.extent==="parent"&&!i.expandParent)if(!s)a==null||a("005",Kr.error005());else{const y=s.measured.width,g=s.measured.height;y&&g&&(u=[[c,l],[c+y,l+g]])}else s&&E0(i.extent)&&(u=[[i.extent[0][0]+c,i.extent[0][1]+l],[i.extent[1][0]+c,i.extent[1][1]+l]]);const p=E0(u)?$d(t,u,i.measured):t;return(i.measured.width===void 0||i.measured.height===void 0)&&(a==null||a("015",Kr.error015())),{position:{x:p.x-c+(i.measured.width??0)*h[0],y:p.y-l+(i.measured.height??0)*h[1]},positionAbsolute:p}}async function vze({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:o,onBeforeDelete:r}){const a=new Set(e.map(p=>p.id)),i=[];for(const p of n){if(p.deletable===!1)continue;const y=a.has(p.id),g=!y&&p.parentId&&i.find(k=>k.id===p.parentId);(y||g)&&i.push(p)}const s=new Set(t.map(p=>p.id)),c=o.filter(p=>p.deletable!==!1),h=mze(i,c);for(const p of c)s.has(p.id)&&!h.find(g=>g.id===p.id)&&h.push(p);if(!r)return{edges:h,nodes:i};const u=await r({nodes:i,edges:h});return typeof u=="boolean"?u?{edges:h,nodes:i}:{edges:[],nodes:[]}:u}const I0=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),$d=(e={x:0,y:0},t,n)=>({x:I0(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:I0(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function SQ(e,t,n){const{width:o,height:r}=za(n),{x:a,y:i}=n.internals.positionAbsolute;return $d(e,[[a,i],[a+o,i+r]],t)}const pU=(e,t,n)=>e<t?I0(Math.abs(e-t),1,t)/t:e>n?-I0(Math.abs(e-n),1,t)/t:0,LQ=(e,t,n=15,o=40)=>{const r=pU(e.x,o,t.width-o)*n,a=pU(e.y,o,t.height-o)*n;return[r,a]},tR=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),PH=({x:e,y:t,width:n,height:o})=>({x:e,y:t,x2:e+n,y2:t+o}),nR=({x:e,y:t,x2:n,y2:o})=>({x:e,y:t,width:n-e,height:o-t}),A0=(e,t=[0,0])=>{var r,a;const{x:n,y:o}=DF(e)?e.internals.positionAbsolute:Cf(e,t);return{x:n,y:o,width:((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0,height:((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0}},ZP=(e,t=[0,0])=>{var r,a;const{x:n,y:o}=DF(e)?e.internals.positionAbsolute:Cf(e,t);return{x:n,y:o,x2:n+(((r=e.measured)==null?void 0:r.width)??e.width??e.initialWidth??0),y2:o+(((a=e.measured)==null?void 0:a.height)??e.height??e.initialHeight??0)}},NQ=(e,t)=>nR(tR(PH(e),PH(t))),of=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)},yU=e=>Yo(e.width)&&Yo(e.height)&&Yo(e.x)&&Yo(e.y),Yo=e=>!isNaN(e)&&isFinite(e),xze=(e,t)=>{},Lf=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),Nf=({x:e,y:t},[n,o,r],a=!1,i=[1,1])=>{const s={x:(e-n)/r,y:(t-o)/r};return a?Lf(s,i):s},YP=({x:e,y:t},[n,o,r])=>({x:e*r+n,y:t*r+o});function Mu(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function wze(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=Mu(e,n),r=Mu(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=Mu(e.top??e.y??0,n),r=Mu(e.bottom??e.y??0,n),a=Mu(e.left??e.x??0,t),i=Mu(e.right??e.x??0,t);return{top:o,right:i,bottom:r,left:a,x:a+i,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Mze(e,t,n,o,r,a){const{x:i,y:s}=YP(e,[t,n,o]),{x:c,y:l}=YP({x:e.x+e.width,y:e.y+e.height},[t,n,o]),h=r-c,u=a-l;return{left:Math.floor(i),top:Math.floor(s),right:Math.floor(h),bottom:Math.floor(u)}}const OF=(e,t,n,o,r,a)=>{const i=wze(a,t,n),s=(t-i.x)/e.width,c=(n-i.y)/e.height,l=Math.min(s,c),h=I0(l,o,r),u=e.x+e.width/2,p=e.y+e.height/2,y=t/2-u*h,g=n/2-p*h,k=Mze(e,y,g,h,t,n),x={left:Math.min(k.left-i.left,0),top:Math.min(k.top-i.top,0),right:Math.min(k.right-i.right,0),bottom:Math.min(k.bottom-i.bottom,0)};return{x:y-x.left+x.right,y:g-x.top+x.bottom,zoom:h}},rf=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function E0(e){return e!=null&&e!=="parent"}function za(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function IQ(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function AQ(e,t={width:0,height:0},n,o,r){const a={...e},i=o.get(n);if(i){const s=i.origin||r;a.x+=i.internals.positionAbsolute.x-(t.width??0)*s[0],a.y+=i.internals.positionAbsolute.y-(t.height??0)*s[1]}return a}function mU(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function bze(){let e,t;return{promise:new Promise((o,r)=>{e=o,t=r}),resolve:e,reject:t}}function _ze(e){return{...wQ,...e||{}}}function Lh(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:o,containerBounds:r}){const{x:a,y:i}=Qo(e),s=Nf({x:a-((r==null?void 0:r.left)??0),y:i-((r==null?void 0:r.top)??0)},o),{x:c,y:l}=n?Lf(s,t):s;return{xSnapped:c,ySnapped:l,...s}}const FF=e=>({width:e.offsetWidth,height:e.offsetHeight}),EQ=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Cze=["INPUT","SELECT","TEXTAREA"];function jQ(e){var o,r;const t=((r=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:r[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:Cze.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const $Q=e=>"clientX"in e,Qo=(e,t)=>{var a,i;const n=$Q(e),o=n?e.clientX:(a=e.touches)==null?void 0:a[0].clientX,r=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:o-((t==null?void 0:t.left)??0),y:r-((t==null?void 0:t.top)??0)}},gU=(e,t,n,o,r)=>{const a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(i=>{const s=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:r,position:i.getAttribute("data-handlepos"),x:(s.left-n.left)/o,y:(s.top-n.top)/o,...FF(i)}})};function PQ({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:a,targetControlX:i,targetControlY:s}){const c=e*.125+r*.375+i*.375+n*.125,l=t*.125+a*.375+s*.375+o*.125,h=Math.abs(c-e),u=Math.abs(l-t);return[c,l,h,u]}function bp(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function kU({pos:e,x1:t,y1:n,x2:o,y2:r,c:a}){switch(e){case fe.Left:return[t-bp(t-o,a),n];case fe.Right:return[t+bp(o-t,a),n];case fe.Top:return[t,n-bp(n-r,a)];case fe.Bottom:return[t,n+bp(r-n,a)]}}function oR({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top,curvature:i=.25}){const[s,c]=kU({pos:n,x1:e,y1:t,x2:o,y2:r,c:i}),[l,h]=kU({pos:a,x1:o,y1:r,x2:e,y2:t,c:i}),[u,p,y,g]=PQ({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:h});return[`M${e},${t} C${s},${c} ${l},${h} ${o},${r}`,u,p,y,g]}function zQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,a=n<e?n+r:n-r,i=Math.abs(o-t)/2,s=o<t?o+i:o-i;return[a,s,r,i]}function Sze({sourceNode:e,targetNode:t,selected:n=!1,zIndex:o=0,elevateOnSelect:r=!1,zIndexMode:a="basic"}){if(a==="manual")return o;const i=r&&n?o+1e3:o,s=Math.max(e.parentId||r&&e.selected?e.internals.z:0,t.parentId||r&&t.selected?t.internals.z:0);return i+s}function Lze({sourceNode:e,targetNode:t,width:n,height:o,transform:r}){const a=tR(ZP(e),ZP(t));a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1);const i={x:-r[0]/r[2],y:-r[1]/r[2],width:n/r[2],height:o/r[2]};return of(i,nR(a))>0}const Nze=({source:e,sourceHandle:t,target:n,targetHandle:o})=>`xy-edge__${e}${t||""}-${n}${o||""}`,Ize=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),Aze=(e,t,n={})=>{if(!e.source||!e.target)return t;const o=n.getEdgeId||Nze;let r;return _Q(e)?r={...e}:r={...e,id:o(e)},Ize(r,t)?t:(r.sourceHandle===null&&delete r.sourceHandle,r.targetHandle===null&&delete r.targetHandle,t.concat(r))};function RQ({sourceX:e,sourceY:t,targetX:n,targetY:o}){const[r,a,i,s]=zQ({sourceX:e,sourceY:t,targetX:n,targetY:o});return[`M ${e},${t}L ${n},${o}`,r,a,i,s]}const vU={[fe.Left]:{x:-1,y:0},[fe.Right]:{x:1,y:0},[fe.Top]:{x:0,y:-1},[fe.Bottom]:{x:0,y:1}},Eze=({source:e,sourcePosition:t=fe.Bottom,target:n})=>t===fe.Left||t===fe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},xU=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function jze({source:e,sourcePosition:t=fe.Bottom,target:n,targetPosition:o=fe.Top,center:r,offset:a,stepPosition:i}){const s=vU[t],c=vU[o],l={x:e.x+s.x*a,y:e.y+s.y*a},h={x:n.x+c.x*a,y:n.y+c.y*a},u=Eze({source:l,sourcePosition:t,target:h}),p=u.x!==0?"x":"y",y=u[p];let g=[],k,x;const v={x:0,y:0},M={x:0,y:0},[,,w,b]=zQ({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[p]*c[p]===-1){p==="x"?(k=r.x??l.x+(h.x-l.x)*i,x=r.y??(l.y+h.y)/2):(k=r.x??(l.x+h.x)/2,x=r.y??l.y+(h.y-l.y)*i);const E=[{x:k,y:l.y},{x:k,y:h.y}],P=[{x:l.x,y:x},{x:h.x,y:x}];s[p]===y?g=p==="x"?E:P:g=p==="x"?P:E}else{const E=[{x:l.x,y:h.y}],P=[{x:h.x,y:l.y}];if(p==="x"?g=s.x===y?P:E:g=s.y===y?E:P,t===o){const A=Math.abs(e[p]-n[p]);if(A<=a){const T=Math.min(a-1,a-A);s[p]===y?v[p]=(l[p]>e[p]?-1:1)*T:M[p]=(h[p]>n[p]?-1:1)*T}}if(t!==o){const A=p==="x"?"y":"x",T=s[p]===c[A],D=l[A]>h[A],O=l[A]<h[A];(s[p]===1&&(!T&&D||T&&O)||s[p]!==1&&(!T&&O||T&&D))&&(g=p==="x"?E:P)}const N={x:l.x+v.x,y:l.y+v.y},j={x:h.x+M.x,y:h.y+M.y},z=Math.max(Math.abs(N.x-g[0].x),Math.abs(j.x-g[0].x)),U=Math.max(Math.abs(N.y-g[0].y),Math.abs(j.y-g[0].y));z>=U?(k=(N.x+j.x)/2,x=g[0].y):(k=g[0].x,x=(N.y+j.y)/2)}const C={x:l.x+v.x,y:l.y+v.y},_={x:h.x+M.x,y:h.y+M.y};return[[e,...C.x!==g[0].x||C.y!==g[0].y?[C]:[],...g,..._.x!==g[g.length-1].x||_.y!==g[g.length-1].y?[_]:[],n],k,x,w,b]}function $ze(e,t,n,o){const r=Math.min(xU(e,t)/2,xU(t,n)/2,o),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i){const l=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${a+r*l},${i}Q ${a},${i} ${a},${i+r*h}`}const s=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${a},${i+r*c}Q ${a},${i} ${a+r*s},${i}`}function af({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top,borderRadius:i=5,centerX:s,centerY:c,offset:l=20,stepPosition:h=.5}){const[u,p,y,g,k]=jze({source:{x:e,y:t},sourcePosition:n,target:{x:o,y:r},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:h});let x=`M${u[0].x} ${u[0].y}`;for(let v=1;v<u.length-1;v++)x+=$ze(u[v-1],u[v],u[v+1],i);return x+=`L${u[u.length-1].x} ${u[u.length-1].y}`,[x,p,y,g,k]}function wU(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Pze(e){var u;const{sourceNode:t,targetNode:n}=e;if(!wU(t)||!wU(n))return null;const o=t.internals.handleBounds||MU(t.handles),r=n.internals.handleBounds||MU(n.handles),a=bU((o==null?void 0:o.source)??[],e.sourceHandle),i=bU(e.connectionMode===L0.Strict?(r==null?void 0:r.target)??[]:((r==null?void 0:r.target)??[]).concat((r==null?void 0:r.source)??[]),e.targetHandle);if(!a||!i)return(u=e.onError)==null||u.call(e,"008",Kr.error008(a?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const s=(a==null?void 0:a.position)||fe.Bottom,c=(i==null?void 0:i.position)||fe.Top,l=Pd(t,a,s),h=Pd(n,i,c);return{sourceX:l.x,sourceY:l.y,targetX:h.x,targetY:h.y,sourcePosition:s,targetPosition:c}}function MU(e){if(!e)return null;const t=[],n=[];for(const o of e)o.width=o.width??1,o.height=o.height??1,o.type==="source"?t.push(o):o.type==="target"&&n.push(o);return{source:t,target:n}}function Pd(e,t,n=fe.Left,o=!1){const r=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,a=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:i,height:s}=t??za(e);if(o)return{x:r+i/2,y:a+s/2};switch((t==null?void 0:t.position)??n){case fe.Top:return{x:r+i/2,y:a};case fe.Right:return{x:r+i,y:a+s/2};case fe.Bottom:return{x:r+i/2,y:a+s};case fe.Left:return{x:r,y:a+s/2}}}function bU(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function zH(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`:""}function zze(e,{id:t,defaultColor:n,defaultMarkerStart:o,defaultMarkerEnd:r}){const a=new Set;return e.reduce((i,s)=>([s.markerStart||o,s.markerEnd||r].forEach(c=>{if(c&&typeof c=="object"){const l=zH(c,t);a.has(l)||(i.push({id:l,color:c.color||n,...c}),a.add(l))}}),i),[]).sort((i,s)=>i.id.localeCompare(s.id))}const TQ=1e3,Rze=10,qF={nodeOrigin:[0,0],nodeExtent:tf,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Tze={...qF,checkEquality:!0};function VF(e,t){const n={...e};for(const o in t)t[o]!==void 0&&(n[o]=t[o]);return n}function Dze(e,t,n){const o=VF(qF,n);for(const r of e.values())if(r.parentId)UF(r,e,t,o);else{const a=Cf(r,o.nodeOrigin),i=E0(r.extent)?r.extent:o.nodeExtent,s=$d(a,i,za(r));r.internals.positionAbsolute=s}}function Hze(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],o=[];for(const r of e.handles){const a={id:r.id,width:r.width??1,height:r.height??1,nodeId:e.id,x:r.x,y:r.y,position:r.position,type:r.type};r.type==="source"?n.push(a):r.type==="target"&&o.push(a)}return{source:n,target:o}}function BF(e){return e==="manual"}function RH(e,t,n,o={}){var h,u;const r=VF(Tze,o),a={i:0},i=new Map(t),s=r!=null&&r.elevateNodesOnSelect&&!BF(r.zIndexMode)?TQ:0;let c=e.length>0,l=!1;t.clear(),n.clear();for(const p of e){let y=i.get(p.id);if(r.checkEquality&&p===(y==null?void 0:y.internals.userNode))t.set(p.id,y);else{const g=Cf(p,r.nodeOrigin),k=E0(p.extent)?p.extent:r.nodeExtent,x=$d(g,k,za(p));y={...r.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(u=p.measured)==null?void 0:u.height},internals:{positionAbsolute:x,handleBounds:Hze(p,y),z:DQ(p,s,r.zIndexMode),userNode:p}},t.set(p.id,y)}(y.measured===void 0||y.measured.width===void 0||y.measured.height===void 0)&&!y.hidden&&(c=!1),p.parentId&&UF(y,t,n,o,a),l||(l=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:l}}function Oze(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function UF(e,t,n,o,r){const{elevateNodesOnSelect:a,nodeOrigin:i,nodeExtent:s,zIndexMode:c}=VF(qF,o),l=e.parentId,h=t.get(l);if(!h){console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}Oze(e,n),r&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++r.i,h.internals.z=h.internals.z+r.i*Rze),r&&h.internals.rootParentIndex!==void 0&&(r.i=h.internals.rootParentIndex);const u=a&&!BF(c)?TQ:0,{x:p,y,z:g}=Fze(e,h,i,s,u,c),{positionAbsolute:k}=e.internals,x=p!==k.x||y!==k.y;(x||g!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:p,y}:k,z:g}})}function DQ(e,t,n){const o=Yo(e.zIndex)?e.zIndex:0;return BF(n)?o:o+(e.selected?t:0)}function Fze(e,t,n,o,r,a){const{x:i,y:s}=t.internals.positionAbsolute,c=za(e),l=Cf(e,n),h=E0(e.extent)?$d(l,e.extent,c):l;let u=$d({x:i+h.x,y:s+h.y},o,c);e.extent==="parent"&&(u=SQ(u,c,t));const p=DQ(e,r,a),y=t.internals.z??0;return{x:u.x,y:u.y,z:y>=p?y+1:p}}function WF(e,t,n,o=[0,0]){var i;const r=[],a=new Map;for(const s of e){const c=t.get(s.parentId);if(!c)continue;const l=((i=a.get(s.parentId))==null?void 0:i.expandedRect)??A0(c),h=NQ(l,s.rect);a.set(s.parentId,{expandedRect:h,parent:c})}return a.size>0&&a.forEach(({expandedRect:s,parent:c},l)=>{var w;const h=c.internals.positionAbsolute,u=za(c),p=c.origin??o,y=s.x<h.x?Math.round(Math.abs(h.x-s.x)):0,g=s.y<h.y?Math.round(Math.abs(h.y-s.y)):0,k=Math.max(u.width,Math.round(s.width)),x=Math.max(u.height,Math.round(s.height)),v=(k-u.width)*p[0],M=(x-u.height)*p[1];(y>0||g>0||v||M)&&(r.push({id:l,type:"position",position:{x:c.position.x-y+v,y:c.position.y-g+M}}),(w=n.get(l))==null||w.forEach(b=>{e.some(C=>C.id===b.id)||r.push({id:b.id,type:"position",position:{x:b.position.x+y,y:b.position.y+g}})})),(u.width<s.width||u.height<s.height||y||g)&&r.push({id:l,type:"dimensions",setAttributes:!0,dimensions:{width:k+(y?p[0]*y-v:0),height:x+(g?p[1]*g-M:0)}})}),r}function qze(e,t,n,o,r,a,i){const s=o==null?void 0:o.querySelector(".xyflow__viewport");let c=!1;if(!s)return{changes:[],updatedInternals:c};const l=[],h=window.getComputedStyle(s),{m22:u}=new window.DOMMatrixReadOnly(h.transform),p=[];for(const y of e.values()){const g=t.get(y.id);if(!g)continue;if(g.hidden){t.set(g.id,{...g,internals:{...g.internals,handleBounds:void 0}}),c=!0;continue}const k=FF(y.nodeElement),x=g.measured.width!==k.width||g.measured.height!==k.height;if(!!(k.width&&k.height&&(x||!g.internals.handleBounds||y.force))){const M=y.nodeElement.getBoundingClientRect(),w=E0(g.extent)?g.extent:a;let{positionAbsolute:b}=g.internals;g.parentId&&g.extent==="parent"?b=SQ(b,k,t.get(g.parentId)):w&&(b=$d(b,w,k));const C={...g,measured:k,internals:{...g.internals,positionAbsolute:b,handleBounds:{source:gU("source",y.nodeElement,M,u,g.id),target:gU("target",y.nodeElement,M,u,g.id)}}};t.set(g.id,C),g.parentId&&UF(C,t,n,{nodeOrigin:r,zIndexMode:i}),c=!0,x&&(l.push({id:g.id,type:"dimensions",dimensions:k}),g.expandParent&&g.parentId&&p.push({id:g.id,parentId:g.parentId,rect:A0(C,r)}))}}if(p.length>0){const y=WF(p,t,n,r);l.push(...y)}return{changes:l,updatedInternals:c}}async function Vze({delta:e,panZoom:t,transform:n,translateExtent:o,width:r,height:a}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const i=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[r,a]],o),s=!!i&&(i.x!==n[0]||i.y!==n[1]||i.k!==n[2]);return Promise.resolve(s)}function _U(e,t,n,o,r,a){let i=r;const s=o.get(i)||new Map;o.set(i,s.set(n,t)),i=`${r}-${e}`;const c=o.get(i)||new Map;if(o.set(i,c.set(n,t)),a){i=`${r}-${e}-${a}`;const l=o.get(i)||new Map;o.set(i,l.set(n,t))}}function HQ(e,t,n){e.clear(),t.clear();for(const o of n){const{source:r,target:a,sourceHandle:i=null,targetHandle:s=null}=o,c={edgeId:o.id,source:r,target:a,sourceHandle:i,targetHandle:s},l=`${r}-${i}--${a}-${s}`,h=`${a}-${s}--${r}-${i}`;_U("source",c,h,e,r,i),_U("target",c,l,e,a,s),t.set(o.id,o)}}function OQ(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:OQ(n,t):!1}function CU(e,t,n){var r;let o=e;do{if((r=o==null?void 0:o.matches)!=null&&r.call(o,t))return!0;if(o===n)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function Bze(e,t,n,o){const r=new Map;for(const[a,i]of e)if((i.selected||i.id===o)&&(!i.parentId||!OQ(i,e))&&(i.draggable||t&&typeof i.draggable>"u")){const s=e.get(a);s&&r.set(a,{id:a,position:s.position||{x:0,y:0},distance:{x:n.x-s.internals.positionAbsolute.x,y:n.y-s.internals.positionAbsolute.y},extent:s.extent,parentId:s.parentId,origin:s.origin,expandParent:s.expandParent,internals:{positionAbsolute:s.internals.positionAbsolute||{x:0,y:0}},measured:{width:s.measured.width??0,height:s.measured.height??0}})}return r}function jT({nodeId:e,dragItems:t,nodeLookup:n,dragging:o=!0}){var i,s,c;const r=[];for(const[l,h]of t){const u=(i=n.get(l))==null?void 0:i.internals.userNode;u&&r.push({...u,position:h.position,dragging:o})}if(!e)return[r[0],r];const a=(s=n.get(e))==null?void 0:s.internals.userNode;return[a?{...a,position:((c=t.get(e))==null?void 0:c.position)||a.position,dragging:o}:r[0],r]}function Uze({dragItems:e,snapGrid:t,x:n,y:o}){const r=e.values().next().value;if(!r)return null;const a={x:n-r.distance.x,y:o-r.distance.y},i=Lf(a,t);return{x:i.x-a.x,y:i.y-a.y}}function Wze({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:o,onDragStop:r}){let a={x:null,y:null},i=0,s=new Map,c=!1,l={x:0,y:0},h=null,u=!1,p=null,y=!1,g=!1,k=null;function x({noDragClassName:M,handleSelector:w,domNode:b,isSelectable:C,nodeId:_,nodeClickDistance:S=0}){p=ro(b);function E({x:z,y:U}){const{nodeLookup:A,nodeExtent:T,snapGrid:D,snapToGrid:O,nodeOrigin:I,onNodeDrag:R,onSelectionDrag:L,onError:q,updateNodePositions:H}=t();a={x:z,y:U};let $=!1;const X=s.size>1,G=X&&T?PH(Sf(s)):null,Q=X&&O?Uze({dragItems:s,snapGrid:D,x:z,y:U}):null;for(const[oe,re]of s){if(!A.has(oe))continue;let te={x:z-re.distance.x,y:U-re.distance.y};O&&(te=Q?{x:Math.round(te.x+Q.x),y:Math.round(te.y+Q.y)}:Lf(te,D));let ce=null;if(X&&T&&!re.extent&&G){const{positionAbsolute:xe}=re.internals,He=xe.x-G.x+T[0][0],Ze=xe.x+re.measured.width-G.x2+T[1][0],ue=xe.y-G.y+T[0][1],Ie=xe.y+re.measured.height-G.y2+T[1][1];ce=[[He,ue],[Ze,Ie]]}const{position:ke,positionAbsolute:ve}=CQ({nodeId:oe,nextPosition:te,nodeLookup:A,nodeExtent:ce||T,nodeOrigin:I,onError:q});$=$||re.position.x!==ke.x||re.position.y!==ke.y,re.position=ke,re.internals.positionAbsolute=ve}if(g=g||$,!!$&&(H(s,!0),k&&(o||R||!_&&L))){const[oe,re]=jT({nodeId:_,dragItems:s,nodeLookup:A});o==null||o(k,s,oe,re),R==null||R(k,oe,re),_||L==null||L(k,re)}}async function P(){if(!h)return;const{transform:z,panBy:U,autoPanSpeed:A,autoPanOnNodeDrag:T}=t();if(!T){c=!1,cancelAnimationFrame(i);return}const[D,O]=LQ(l,h,A);(D!==0||O!==0)&&(a.x=(a.x??0)-D/z[2],a.y=(a.y??0)-O/z[2],await U({x:D,y:O})&&E(a)),i=requestAnimationFrame(P)}function N(z){var X;const{nodeLookup:U,multiSelectionActive:A,nodesDraggable:T,transform:D,snapGrid:O,snapToGrid:I,selectNodesOnDrag:R,onNodeDragStart:L,onSelectionDragStart:q,unselectNodesAndEdges:H}=t();u=!0,(!R||!C)&&!A&&_&&((X=U.get(_))!=null&&X.selected||H()),C&&R&&_&&(e==null||e(_));const $=Lh(z.sourceEvent,{transform:D,snapGrid:O,snapToGrid:I,containerBounds:h});if(a=$,s=Bze(U,T,$,_),s.size>0&&(n||L||!_&&q)){const[G,Q]=jT({nodeId:_,dragItems:s,nodeLookup:U});n==null||n(z.sourceEvent,s,G,Q),L==null||L(z.sourceEvent,G,Q),_||q==null||q(z.sourceEvent,Q)}}const j=oQ().clickDistance(S).on("start",z=>{const{domNode:U,nodeDragThreshold:A,transform:T,snapGrid:D,snapToGrid:O}=t();h=(U==null?void 0:U.getBoundingClientRect())||null,y=!1,g=!1,k=z.sourceEvent,A===0&&N(z),a=Lh(z.sourceEvent,{transform:T,snapGrid:D,snapToGrid:O,containerBounds:h}),l=Qo(z.sourceEvent,h)}).on("drag",z=>{const{autoPanOnNodeDrag:U,transform:A,snapGrid:T,snapToGrid:D,nodeDragThreshold:O,nodeLookup:I}=t(),R=Lh(z.sourceEvent,{transform:A,snapGrid:T,snapToGrid:D,containerBounds:h});if(k=z.sourceEvent,(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1||_&&!I.has(_))&&(y=!0),!y){if(!c&&U&&u&&(c=!0,P()),!u){const L=Qo(z.sourceEvent,h),q=L.x-l.x,H=L.y-l.y;Math.sqrt(q*q+H*H)>O&&N(z)}(a.x!==R.xSnapped||a.y!==R.ySnapped)&&s&&u&&(l=Qo(z.sourceEvent,h),E(R))}}).on("end",z=>{if(!(!u||y)&&(c=!1,u=!1,cancelAnimationFrame(i),s.size>0)){const{nodeLookup:U,updateNodePositions:A,onNodeDragStop:T,onSelectionDragStop:D}=t();if(g&&(A(s,!1),g=!1),r||T||!_&&D){const[O,I]=jT({nodeId:_,dragItems:s,nodeLookup:U,dragging:!1});r==null||r(z.sourceEvent,s,O,I),T==null||T(z.sourceEvent,O,I),_||D==null||D(z.sourceEvent,I)}}}).filter(z=>{const U=z.target;return!z.button&&(!M||!CU(U,`.${M}`,b))&&(!w||CU(U,w,b))});p.call(j)}function v(){p==null||p.on(".drag",null)}return{update:x,destroy:v}}function Gze(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())of(r,A0(a))>0&&o.push(a);return o}const Kze=250;function Xze(e,t,n,o){var s,c;let r=[],a=1/0;const i=Gze(e,n,t+Kze);for(const l of i){const h=[...((s=l.internals.handleBounds)==null?void 0:s.source)??[],...((c=l.internals.handleBounds)==null?void 0:c.target)??[]];for(const u of h){if(o.nodeId===u.nodeId&&o.type===u.type&&o.id===u.id)continue;const{x:p,y}=Pd(l,u,u.position,!0),g=Math.sqrt(Math.pow(p-e.x,2)+Math.pow(y-e.y,2));g>t||(g<a?(r=[{...u,x:p,y}],a=g):g===a&&r.push({...u,x:p,y}))}}if(!r.length)return null;if(r.length>1){const l=o.type==="source"?"target":"source";return r.find(h=>h.type===l)??r[0]}return r[0]}function FQ(e,t,n,o,r,a=!1){var l,h,u;const i=o.get(e);if(!i)return null;const s=r==="strict"?(l=i.internals.handleBounds)==null?void 0:l[t]:[...((h=i.internals.handleBounds)==null?void 0:h.source)??[],...((u=i.internals.handleBounds)==null?void 0:u.target)??[]],c=(n?s==null?void 0:s.find(p=>p.id===n):s==null?void 0:s[0])??null;return c&&a?{...c,...Pd(i,c,c.position,!0)}:c}function qQ(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Zze(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const VQ=()=>!0;function Yze(e,{connectionMode:t,connectionRadius:n,handleId:o,nodeId:r,edgeUpdaterType:a,isTarget:i,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:h,flowId:u,panBy:p,cancelConnection:y,onConnectStart:g,onConnect:k,onConnectEnd:x,isValidConnection:v=VQ,onReconnectEnd:M,updateConnection:w,getTransform:b,getFromHandle:C,autoPanSpeed:_,dragThreshold:S=1,handleDomNode:E}){const P=EQ(e.target);let N=0,j;const{x:z,y:U}=Qo(e),A=qQ(a,E),T=s==null?void 0:s.getBoundingClientRect();let D=!1;if(!T||!A)return;const O=FQ(r,A,o,c,t);if(!O)return;let I=Qo(e,T),R=!1,L=null,q=!1,H=null;function $(){if(!h||!T)return;const[ke,ve]=LQ(I,T,_);p({x:ke,y:ve}),N=requestAnimationFrame($)}const X={...O,nodeId:r,type:A,position:O.position},G=c.get(r);let oe={inProgress:!0,isValid:null,from:Pd(G,X,fe.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:G,to:I,toHandle:null,toPosition:fU[X.position],toNode:null,pointer:I};function re(){D=!0,w(oe),g==null||g(e,{nodeId:r,handleId:o,handleType:A})}S===0&&re();function te(ke){if(!D){const{x:Ie,y:zt}=Qo(ke),pt=Ie-z,tn=zt-U;if(!(pt*pt+tn*tn>S*S))return;re()}if(!C()||!X){ce(ke);return}const ve=b();I=Qo(ke,T),j=Xze(Nf(I,ve,!1,[1,1]),n,c,X),R||($(),R=!0);const xe=BQ(ke,{handle:j,connectionMode:t,fromNodeId:r,fromHandleId:o,fromType:i?"target":"source",isValidConnection:v,doc:P,lib:l,flowId:u,nodeLookup:c});H=xe.handleDomNode,L=xe.connection,q=Zze(!!j,xe.isValid);const He=c.get(r),Ze=He?Pd(He,X,fe.Left,!0):oe.from,ue={...oe,from:Ze,isValid:q,to:xe.toHandle&&q?YP({x:xe.toHandle.x,y:xe.toHandle.y},ve):I,toHandle:xe.toHandle,toPosition:q&&xe.toHandle?xe.toHandle.position:fU[X.position],toNode:xe.toHandle?c.get(xe.toHandle.nodeId):null,pointer:I};w(ue),oe=ue}function ce(ke){if(!("touches"in ke&&ke.touches.length>0)){if(D){(j||H)&&L&&q&&(k==null||k(L));const{inProgress:ve,...xe}=oe,He={...xe,toPosition:oe.toHandle?oe.toPosition:null};x==null||x(ke,He),a&&(M==null||M(ke,He))}y(),cancelAnimationFrame(N),R=!1,q=!1,L=null,H=null,P.removeEventListener("mousemove",te),P.removeEventListener("mouseup",ce),P.removeEventListener("touchmove",te),P.removeEventListener("touchend",ce)}}P.addEventListener("mousemove",te),P.addEventListener("mouseup",ce),P.addEventListener("touchmove",te),P.addEventListener("touchend",ce)}function BQ(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:a,doc:i,lib:s,flowId:c,isValidConnection:l=VQ,nodeLookup:h}){const u=a==="target",p=t?i.querySelector(`.${s}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:y,y:g}=Qo(e),k=i.elementFromPoint(y,g),x=k!=null&&k.classList.contains(`${s}-flow__handle`)?k:p,v={handleDomNode:x,isValid:!1,connection:null,toHandle:null};if(x){const M=qQ(void 0,x),w=x.getAttribute("data-nodeid"),b=x.getAttribute("data-handleid"),C=x.classList.contains("connectable"),_=x.classList.contains("connectableend");if(!w||!M)return v;const S={source:u?w:o,sourceHandle:u?b:r,target:u?o:w,targetHandle:u?r:b};v.connection=S;const P=C&&_&&(n===L0.Strict?u&&M==="source"||!u&&M==="target":w!==o||b!==r);v.isValid=P&&l(S),v.toHandle=FQ(w,M,b,h,n,!0)}return v}const TH={onPointerDown:Yze,isValid:BQ};function Qze({domNode:e,panZoom:t,getTransform:n,getViewScale:o}){const r=ro(e);function a({translateExtent:s,width:c,height:l,zoomStep:h=1,pannable:u=!0,zoomable:p=!0,inversePan:y=!1}){const g=w=>{if(w.sourceEvent.type!=="wheel"||!t)return;const b=n(),C=w.sourceEvent.ctrlKey&&rf()?10:1,_=-w.sourceEvent.deltaY*(w.sourceEvent.deltaMode===1?.05:w.sourceEvent.deltaMode?1:.002)*h,S=b[2]*Math.pow(2,_*C);t.scaleTo(S)};let k=[0,0];const x=w=>{(w.sourceEvent.type==="mousedown"||w.sourceEvent.type==="touchstart")&&(k=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY])},v=w=>{const b=n();if(w.sourceEvent.type!=="mousemove"&&w.sourceEvent.type!=="touchmove"||!t)return;const C=[w.sourceEvent.clientX??w.sourceEvent.touches[0].clientX,w.sourceEvent.clientY??w.sourceEvent.touches[0].clientY],_=[C[0]-k[0],C[1]-k[1]];k=C;const S=o()*Math.max(b[2],Math.log(b[2]))*(y?-1:1),E={x:b[0]-_[0]*S,y:b[1]-_[1]*S},P=[[0,0],[c,l]];t.setViewportConstrained({x:E.x,y:E.y,zoom:b[2]},P,s)},M=vQ().on("start",x).on("zoom",u?v:null).on("zoom.wheel",p?g:null);r.call(M,{})}function i(){r.on("zoom",null)}return{update:a,destroy:i,pointer:Go}}const rR=e=>({x:e.x,y:e.y,zoom:e.k}),$T=({x:e,y:t,zoom:n})=>eR.translate(e,t).scale(n),Xu=(e,t)=>e.target.closest(`.${t}`),UQ=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Jze=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,PT=(e,t=0,n=Jze,o=()=>{})=>{const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e},WQ=e=>{const t=e.ctrlKey&&rf()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function eRe({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:o,panOnScrollMode:r,panOnScrollSpeed:a,zoomOnPinch:i,onPanZoomStart:s,onPanZoom:c,onPanZoomEnd:l}){return h=>{if(Xu(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const u=n.property("__zoom").k||1;if(h.ctrlKey&&i){const x=Go(h),v=WQ(h),M=u*Math.pow(2,v);o.scaleTo(n,M,x,h);return}const p=h.deltaMode===1?20:1;let y=r===Cd.Vertical?0:h.deltaX*p,g=r===Cd.Horizontal?0:h.deltaY*p;!rf()&&h.shiftKey&&r!==Cd.Vertical&&(y=h.deltaY*p,g=0),o.translateBy(n,-(y/u)*a,-(g/u)*a,{internal:!0});const k=rR(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{l==null||l(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,s==null||s(h,k))}}function tRe({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(o,r){const a=o.type==="wheel",i=!t&&a&&!o.ctrlKey,s=Xu(o,e);if(o.ctrlKey&&a&&s&&o.preventDefault(),i||s)return null;o.preventDefault(),n.call(this,o,r)}}function nRe({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return o=>{var a,i,s;if((a=o.sourceEvent)!=null&&a.internal)return;const r=rR(o.transform);e.mouseButton=((i=o.sourceEvent)==null?void 0:i.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=r,((s=o.sourceEvent)==null?void 0:s.type)==="mousedown"&&t(!0),n&&(n==null||n(o.sourceEvent,r))}}function oRe({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:o,onPanZoom:r}){return a=>{var i,s;e.usedRightMouseButton=!!(n&&UQ(t,e.mouseButton??0)),(i=a.sourceEvent)!=null&&i.sync||o([a.transform.x,a.transform.y,a.transform.k]),r&&!((s=a.sourceEvent)!=null&&s.internal)&&(r==null||r(a.sourceEvent,rR(a.transform)))}}function rRe({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:o,onPanZoomEnd:r,onPaneContextMenu:a}){return i=>{var s;if(!((s=i.sourceEvent)!=null&&s.internal)&&(e.isZoomingOrPanning=!1,a&&UQ(t,e.mouseButton??0)&&!e.usedRightMouseButton&&i.sourceEvent&&a(i.sourceEvent),e.usedRightMouseButton=!1,o(!1),r)){const c=rR(i.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{r==null||r(i.sourceEvent,c)},n?150:0)}}}function aRe({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:o,panOnScroll:r,zoomOnDoubleClick:a,userSelectionActive:i,noWheelClassName:s,noPanClassName:c,lib:l,connectionInProgress:h}){return u=>{var x;const p=e||t,y=n&&u.ctrlKey,g=u.type==="wheel";if(u.button===1&&u.type==="mousedown"&&(Xu(u,`${l}-flow__node`)||Xu(u,`${l}-flow__edge`)))return!0;if(!o&&!p&&!r&&!a&&!n||i||h&&!g||Xu(u,s)&&g||Xu(u,c)&&(!g||r&&g&&!e)||!n&&u.ctrlKey&&g)return!1;if(!n&&u.type==="touchstart"&&((x=u.touches)==null?void 0:x.length)>1)return u.preventDefault(),!1;if(!p&&!r&&!y&&g||!o&&(u.type==="mousedown"||u.type==="touchstart")||Array.isArray(o)&&!o.includes(u.button)&&u.type==="mousedown")return!1;const k=Array.isArray(o)&&o.includes(u.button)||!u.button||u.button<=1;return(!u.ctrlKey||g)&&k}}function iRe({domNode:e,minZoom:t,maxZoom:n,translateExtent:o,viewport:r,onPanZoom:a,onPanZoomStart:i,onPanZoomEnd:s,onDraggingChange:c}){const l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),u=vQ().scaleExtent([t,n]).translateExtent(o),p=ro(e).call(u);M({x:r.x,y:r.y,zoom:I0(r.zoom,t,n)},[[0,0],[h.width,h.height]],o);const y=p.on("wheel.zoom"),g=p.on("dblclick.zoom");u.wheelDelta(WQ);function k(j,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Sh:rP).transform(PT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),j)}):Promise.resolve(!1)}function x({noWheelClassName:j,noPanClassName:z,onPaneContextMenu:U,userSelectionActive:A,panOnScroll:T,panOnDrag:D,panOnScrollMode:O,panOnScrollSpeed:I,preventScrolling:R,zoomOnPinch:L,zoomOnScroll:q,zoomOnDoubleClick:H,zoomActivationKeyPressed:$,lib:X,onTransformChange:G,connectionInProgress:Q,paneClickDistance:oe,selectionOnDrag:re}){A&&!l.isZoomingOrPanning&&v();const te=T&&!$&&!A;u.clickDistance(re?1/0:!Yo(oe)||oe<0?0:oe);const ce=te?eRe({zoomPanValues:l,noWheelClassName:j,d3Selection:p,d3Zoom:u,panOnScrollMode:O,panOnScrollSpeed:I,zoomOnPinch:L,onPanZoomStart:i,onPanZoom:a,onPanZoomEnd:s}):tRe({noWheelClassName:j,preventScrolling:R,d3ZoomHandler:y});if(p.on("wheel.zoom",ce,{passive:!1}),!A){const ve=nRe({zoomPanValues:l,onDraggingChange:c,onPanZoomStart:i});u.on("start",ve);const xe=oRe({zoomPanValues:l,panOnDrag:D,onPaneContextMenu:!!U,onPanZoom:a,onTransformChange:G});u.on("zoom",xe);const He=rRe({zoomPanValues:l,panOnDrag:D,panOnScroll:T,onPaneContextMenu:U,onPanZoomEnd:s,onDraggingChange:c});u.on("end",He)}const ke=aRe({zoomActivationKeyPressed:$,panOnDrag:D,zoomOnScroll:q,panOnScroll:T,zoomOnDoubleClick:H,zoomOnPinch:L,userSelectionActive:A,noPanClassName:z,noWheelClassName:j,lib:X,connectionInProgress:Q});u.filter(ke),H?p.on("dblclick.zoom",g):p.on("dblclick.zoom",null)}function v(){u.on("zoom",null)}async function M(j,z,U){const A=$T(j),T=u==null?void 0:u.constrain()(A,z,U);return T&&await k(T),new Promise(D=>D(T))}async function w(j,z){const U=$T(j);return await k(U,z),new Promise(A=>A(U))}function b(j){if(p){const z=$T(j),U=p.property("__zoom");(U.k!==j.zoom||U.x!==j.x||U.y!==j.y)&&(u==null||u.transform(p,z,null,{sync:!0}))}}function C(){const j=p?kQ(p.node()):{x:0,y:0,k:1};return{x:j.x,y:j.y,zoom:j.k}}function _(j,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Sh:rP).scaleTo(PT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),j)}):Promise.resolve(!1)}function S(j,z){return p?new Promise(U=>{u==null||u.interpolate((z==null?void 0:z.interpolate)==="linear"?Sh:rP).scaleBy(PT(p,z==null?void 0:z.duration,z==null?void 0:z.ease,()=>U(!0)),j)}):Promise.resolve(!1)}function E(j){u==null||u.scaleExtent(j)}function P(j){u==null||u.translateExtent(j)}function N(j){const z=!Yo(j)||j<0?0:j;u==null||u.clickDistance(z)}return{update:x,destroy:v,setViewport:w,setViewportConstrained:M,getViewport:C,scaleTo:_,scaleBy:S,setScaleExtent:E,setTranslateExtent:P,syncViewport:b,setClickDistance:N}}var Ti;(function(e){e.Line="line",e.Handle="handle"})(Ti||(Ti={}));function sRe({width:e,prevWidth:t,height:n,prevHeight:o,affectsX:r,affectsY:a}){const i=e-t,s=n-o,c=[i>0?1:i<0?-1:0,s>0?1:s<0?-1:0];return i&&r&&(c[0]=c[0]*-1),s&&a&&(c[1]=c[1]*-1),c}function SU(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),o=e.includes("left"),r=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:o,affectsY:r}}function ti(e,t){return Math.max(0,t-e)}function ni(e,t){return Math.max(0,e-t)}function _p(e,t,n){return Math.max(0,t-e,e-n)}function LU(e,t){return e?!t:t}function cRe(e,t,n,o,r,a,i,s){let{affectsX:c,affectsY:l}=t;const{isHorizontal:h,isVertical:u}=t,p=h&&u,{xSnapped:y,ySnapped:g}=n,{minWidth:k,maxWidth:x,minHeight:v,maxHeight:M}=o,{x:w,y:b,width:C,height:_,aspectRatio:S}=e;let E=Math.floor(h?y-e.pointerX:0),P=Math.floor(u?g-e.pointerY:0);const N=C+(c?-E:E),j=_+(l?-P:P),z=-a[0]*C,U=-a[1]*_;let A=_p(N,k,x),T=_p(j,v,M);if(i){let I=0,R=0;c&&E<0?I=ti(w+E+z,i[0][0]):!c&&E>0&&(I=ni(w+N+z,i[1][0])),l&&P<0?R=ti(b+P+U,i[0][1]):!l&&P>0&&(R=ni(b+j+U,i[1][1])),A=Math.max(A,I),T=Math.max(T,R)}if(s){let I=0,R=0;c&&E>0?I=ni(w+E,s[0][0]):!c&&E<0&&(I=ti(w+N,s[1][0])),l&&P>0?R=ni(b+P,s[0][1]):!l&&P<0&&(R=ti(b+j,s[1][1])),A=Math.max(A,I),T=Math.max(T,R)}if(r){if(h){const I=_p(N/S,v,M)*S;if(A=Math.max(A,I),i){let R=0;!c&&!l||c&&!l&&p?R=ni(b+U+N/S,i[1][1])*S:R=ti(b+U+(c?E:-E)/S,i[0][1])*S,A=Math.max(A,R)}if(s){let R=0;!c&&!l||c&&!l&&p?R=ti(b+N/S,s[1][1])*S:R=ni(b+(c?E:-E)/S,s[0][1])*S,A=Math.max(A,R)}}if(u){const I=_p(j*S,k,x)/S;if(T=Math.max(T,I),i){let R=0;!c&&!l||l&&!c&&p?R=ni(w+j*S+z,i[1][0])/S:R=ti(w+(l?P:-P)*S+z,i[0][0])/S,T=Math.max(T,R)}if(s){let R=0;!c&&!l||l&&!c&&p?R=ti(w+j*S,s[1][0])/S:R=ni(w+(l?P:-P)*S,s[0][0])/S,T=Math.max(T,R)}}}P=P+(P<0?T:-T),E=E+(E<0?A:-A),r&&(p?N>j*S?P=(LU(c,l)?-E:E)/S:E=(LU(c,l)?-P:P)*S:h?(P=E/S,l=c):(E=P*S,c=l));const D=c?w+E:w,O=l?b+P:b;return{width:C+(c?-E:E),height:_+(l?-P:P),x:a[0]*E*(c?-1:1)+D,y:a[1]*P*(l?-1:1)+O}}const GQ={width:0,height:0,x:0,y:0},lRe={...GQ,pointerX:0,pointerY:0,aspectRatio:1};function dRe(e){return[[0,0],[e.measured.width,e.measured.height]]}function uRe(e,t,n){const o=t.position.x+e.position.x,r=t.position.y+e.position.y,a=e.measured.width??0,i=e.measured.height??0,s=n[0]*a,c=n[1]*i;return[[o-s,r-c],[o+a-s,r+i-c]]}function hRe({domNode:e,nodeId:t,getStoreItems:n,onChange:o,onEnd:r}){const a=ro(e);let i={controlDirection:SU("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:l,boundaries:h,keepAspectRatio:u,resizeDirection:p,onResizeStart:y,onResize:g,onResizeEnd:k,shouldResize:x}){let v={...GQ},M={...lRe};i={boundaries:h,resizeDirection:p,keepAspectRatio:u,controlDirection:SU(l)};let w,b=null,C=[],_,S,E,P=!1;const N=oQ().on("start",j=>{const{nodeLookup:z,transform:U,snapGrid:A,snapToGrid:T,nodeOrigin:D,paneDomNode:O}=n();if(w=z.get(t),!w)return;b=(O==null?void 0:O.getBoundingClientRect())??null;const{xSnapped:I,ySnapped:R}=Lh(j.sourceEvent,{transform:U,snapGrid:A,snapToGrid:T,containerBounds:b});v={width:w.measured.width??0,height:w.measured.height??0,x:w.position.x??0,y:w.position.y??0},M={...v,pointerX:I,pointerY:R,aspectRatio:v.width/v.height},_=void 0,w.parentId&&(w.extent==="parent"||w.expandParent)&&(_=z.get(w.parentId),S=_&&w.extent==="parent"?dRe(_):void 0),C=[],E=void 0;for(const[L,q]of z)if(q.parentId===t&&(C.push({id:L,position:{...q.position},extent:q.extent}),q.extent==="parent"||q.expandParent)){const H=uRe(q,w,q.origin??D);E?E=[[Math.min(H[0][0],E[0][0]),Math.min(H[0][1],E[0][1])],[Math.max(H[1][0],E[1][0]),Math.max(H[1][1],E[1][1])]]:E=H}y==null||y(j,{...v})}).on("drag",j=>{const{transform:z,snapGrid:U,snapToGrid:A,nodeOrigin:T}=n(),D=Lh(j.sourceEvent,{transform:z,snapGrid:U,snapToGrid:A,containerBounds:b}),O=[];if(!w)return;const{x:I,y:R,width:L,height:q}=v,H={},$=w.origin??T,{width:X,height:G,x:Q,y:oe}=cRe(M,i.controlDirection,D,i.boundaries,i.keepAspectRatio,$,S,E),re=X!==L,te=G!==q,ce=Q!==I&&re,ke=oe!==R&&te;if(!ce&&!ke&&!re&&!te)return;if((ce||ke||$[0]===1||$[1]===1)&&(H.x=ce?Q:v.x,H.y=ke?oe:v.y,v.x=H.x,v.y=H.y,C.length>0)){const Ze=Q-I,ue=oe-R;for(const Ie of C)Ie.position={x:Ie.position.x-Ze+$[0]*(X-L),y:Ie.position.y-ue+$[1]*(G-q)},O.push(Ie)}if((re||te)&&(H.width=re&&(!i.resizeDirection||i.resizeDirection==="horizontal")?X:v.width,H.height=te&&(!i.resizeDirection||i.resizeDirection==="vertical")?G:v.height,v.width=H.width,v.height=H.height),_&&w.expandParent){const Ze=$[0]*(H.width??0);H.x&&H.x<Ze&&(v.x=Ze,M.x=M.x-(H.x-Ze));const ue=$[1]*(H.height??0);H.y&&H.y<ue&&(v.y=ue,M.y=M.y-(H.y-ue))}const ve=sRe({width:v.width,prevWidth:L,height:v.height,prevHeight:q,affectsX:i.controlDirection.affectsX,affectsY:i.controlDirection.affectsY}),xe={...v,direction:ve};(x==null?void 0:x(j,xe))!==!1&&(P=!0,g==null||g(j,xe),o(H,O))}).on("end",j=>{P&&(k==null||k(j,{...v}),r==null||r({...v}),P=!1)});a.call(N)}function c(){a.on(".drag",null)}return{update:s,destroy:c}}var KQ={exports:{}},XQ={},ZQ={exports:{}},YQ={};/**
8447
8447
  * @license React
8448
8448
  * use-sync-external-store-shim.production.js
8449
8449
  *
@@ -8466,7 +8466,7 @@ Error generating stack: `+a.message+`
8466
8466
  +`).split(`
8467
8467
  `)),h=l.reduce((u,p)=>u.concat(...p),[]);return[l,h]}return[[],[]]},[e]);return m.useEffect(()=>{const c=(t==null?void 0:t.target)??PU,l=(t==null?void 0:t.actInsideInputWithModifier)??!0;if(e!==null){const h=y=>{var x,v;if(r.current=y.ctrlKey||y.metaKey||y.shiftKey||y.altKey,(!r.current||r.current&&!l)&&jQ(y))return!1;const k=RU(y.code,s);if(a.current.add(y[k]),zU(i,a.current,!1)){const M=((v=(x=y.composedPath)==null?void 0:x.call(y))==null?void 0:v[0])||y.target,w=(M==null?void 0:M.nodeName)==="BUTTON"||(M==null?void 0:M.nodeName)==="A";t.preventDefault!==!1&&(r.current||!w)&&y.preventDefault(),o(!0)}},u=y=>{const g=RU(y.code,s);zU(i,a.current,!0)?(o(!1),a.current.clear()):a.current.delete(y[g]),y.key==="Meta"&&a.current.clear(),r.current=!1},p=()=>{a.current.clear(),o(!1)};return c==null||c.addEventListener("keydown",h),c==null||c.addEventListener("keyup",u),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",u),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,o]),n}function zU(e,t,n){return e.filter(o=>n||o.length===t.size).some(o=>o.every(r=>t.has(r)))}function RU(e,t){return t.includes(e)?"code":"key"}const oTe=()=>{const e=vt();return m.useMemo(()=>({zoomIn:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1.2,t):Promise.resolve(!1)},zoomOut:t=>{const{panZoom:n}=e.getState();return n?n.scaleBy(1/1.2,t):Promise.resolve(!1)},zoomTo:(t,n)=>{const{panZoom:o}=e.getState();return o?o.scaleTo(t,n):Promise.resolve(!1)},getZoom:()=>e.getState().transform[2],setViewport:async(t,n)=>{const{transform:[o,r,a],panZoom:i}=e.getState();return i?(await i.setViewport({x:t.x??o,y:t.y??r,zoom:t.zoom??a},n),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[t,n,o]=e.getState().transform;return{x:t,y:n,zoom:o}},setCenter:async(t,n,o)=>e.getState().setCenter(t,n,o),fitBounds:async(t,n)=>{const{width:o,height:r,minZoom:a,maxZoom:i,panZoom:s}=e.getState(),c=OF(t,o,r,a,i,(n==null?void 0:n.padding)??.1);return s?(await s.setViewport(c,{duration:n==null?void 0:n.duration,ease:n==null?void 0:n.ease,interpolate:n==null?void 0:n.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(t,n={})=>{const{transform:o,snapGrid:r,snapToGrid:a,domNode:i}=e.getState();if(!i)return t;const{x:s,y:c}=i.getBoundingClientRect(),l={x:t.x-s,y:t.y-c},h=n.snapGrid??r,u=n.snapToGrid??a;return Nf(l,o,u,h)},flowToScreenPosition:t=>{const{transform:n,domNode:o}=e.getState();if(!o)return t;const{x:r,y:a}=o.getBoundingClientRect(),i=YP(t,n);return{x:i.x+r,y:i.y+a}}}),[])};function oJ(e,t){const n=[],o=new Map,r=[];for(const a of e)if(a.type==="add"){r.push(a);continue}else if(a.type==="remove"||a.type==="replace")o.set(a.id,[a]);else{const i=o.get(a.id);i?i.push(a):o.set(a.id,[a])}for(const a of t){const i=o.get(a.id);if(!i){n.push(a);continue}if(i[0].type==="remove")continue;if(i[0].type==="replace"){n.push({...i[0].item});continue}const s={...a};for(const c of i)rTe(c,s);n.push(s)}return r.length&&r.forEach(a=>{a.index!==void 0?n.splice(a.index,0,{...a.item}):n.push({...a.item})}),n}function rTe(e,t){switch(e.type){case"select":{t.selected=e.selected;break}case"position":{typeof e.position<"u"&&(t.position=e.position),typeof e.dragging<"u"&&(t.dragging=e.dragging);break}case"dimensions":{typeof e.dimensions<"u"&&(t.measured={...e.dimensions},e.setAttributes&&((e.setAttributes===!0||e.setAttributes==="width")&&(t.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(t.height=e.dimensions.height))),typeof e.resizing=="boolean"&&(t.resizing=e.resizing);break}}}function rJ(e,t){return oJ(e,t)}function aJ(e,t){return oJ(e,t)}function pd(e,t){return{id:e,type:"select",selected:t}}function Zu(e,t=new Set,n=!1){const o=[];for(const[r,a]of e){const i=t.has(r);!(a.selected===void 0&&!i)&&a.selected!==i&&(n&&(a.selected=i),o.push(pd(a.id,i)))}return o}function TU({items:e=[],lookup:t}){var r;const n=[],o=new Map(e.map(a=>[a.id,a]));for(const[a,i]of e.entries()){const s=t.get(i.id),c=((r=s==null?void 0:s.internals)==null?void 0:r.userNode)??s;c!==void 0&&c!==i&&n.push({id:i.id,item:i,type:"replace"}),c===void 0&&n.push({item:i,type:"add",index:a})}for(const[a]of t)o.get(a)===void 0&&n.push({id:a,type:"remove"});return n}function DU(e){return{id:e.id,type:"remove"}}const HU=e=>pze(e),aTe=e=>_Q(e);function iJ(e){return m.forwardRef(e)}function OU(e){const[t,n]=m.useState(BigInt(0)),[o]=m.useState(()=>iTe(()=>n(r=>r+BigInt(1))));return DH(()=>{const r=o.get();r.length&&(e(r),o.reset())},[t]),o}function iTe(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}const sJ=m.createContext(null);function sTe({children:e}){const t=vt(),n=m.useCallback(s=>{const{nodes:c=[],setNodes:l,hasDefaultNodes:h,onNodesChange:u,nodeLookup:p,fitViewQueued:y,onNodesChangeMiddlewareMap:g}=t.getState();let k=c;for(const v of s)k=typeof v=="function"?v(k):v;let x=TU({items:k,lookup:p});for(const v of g.values())x=v(x);h&&l(k),x.length>0?u==null||u(x):y&&window.requestAnimationFrame(()=>{const{fitViewQueued:v,nodes:M,setNodes:w}=t.getState();v&&w(M)})},[]),o=OU(n),r=m.useCallback(s=>{const{edges:c=[],setEdges:l,hasDefaultEdges:h,onEdgesChange:u,edgeLookup:p}=t.getState();let y=c;for(const g of s)y=typeof g=="function"?g(y):g;h?l(y):u&&u(TU({items:y,lookup:p}))},[]),a=OU(r),i=m.useMemo(()=>({nodeQueue:o,edgeQueue:a}),[]);return f.jsx(sJ.Provider,{value:i,children:e})}function cTe(){const e=m.useContext(sJ);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const lTe=e=>!!e.panZoom;function sR(){const e=oTe(),t=vt(),n=cTe(),o=De(lTe),r=m.useMemo(()=>{const a=u=>t.getState().nodeLookup.get(u),i=u=>{n.nodeQueue.push(u)},s=u=>{n.edgeQueue.push(u)},c=u=>{var v,M;const{nodeLookup:p,nodeOrigin:y}=t.getState(),g=HU(u)?u:p.get(u.id),k=g.parentId?AQ(g.position,g.measured,g.parentId,p,y):g.position,x={...g,position:k,width:((v=g.measured)==null?void 0:v.width)??g.width,height:((M=g.measured)==null?void 0:M.height)??g.height};return A0(x)},l=(u,p,y={replace:!1})=>{i(g=>g.map(k=>{if(k.id===u){const x=typeof p=="function"?p(k):p;return y.replace&&HU(x)?x:{...k,...x}}return k}))},h=(u,p,y={replace:!1})=>{s(g=>g.map(k=>{if(k.id===u){const x=typeof p=="function"?p(k):p;return y.replace&&aTe(x)?x:{...k,...x}}return k}))};return{getNodes:()=>t.getState().nodes.map(u=>({...u})),getNode:u=>{var p;return(p=a(u))==null?void 0:p.internals.userNode},getInternalNode:a,getEdges:()=>{const{edges:u=[]}=t.getState();return u.map(p=>({...p}))},getEdge:u=>t.getState().edgeLookup.get(u),setNodes:i,setEdges:s,addNodes:u=>{const p=Array.isArray(u)?u:[u];n.nodeQueue.push(y=>[...y,...p])},addEdges:u=>{const p=Array.isArray(u)?u:[u];n.edgeQueue.push(y=>[...y,...p])},toObject:()=>{const{nodes:u=[],edges:p=[],transform:y}=t.getState(),[g,k,x]=y;return{nodes:u.map(v=>({...v})),edges:p.map(v=>({...v})),viewport:{x:g,y:k,zoom:x}}},deleteElements:async({nodes:u=[],edges:p=[]})=>{const{nodes:y,edges:g,onNodesDelete:k,onEdgesDelete:x,triggerNodeChanges:v,triggerEdgeChanges:M,onDelete:w,onBeforeDelete:b}=t.getState(),{nodes:C,edges:_}=await vze({nodesToRemove:u,edgesToRemove:p,nodes:y,edges:g,onBeforeDelete:b}),S=_.length>0,E=C.length>0;if(S){const P=_.map(DU);x==null||x(_),M(P)}if(E){const P=C.map(DU);k==null||k(C),v(P)}return(E||S)&&(w==null||w({nodes:C,edges:_})),{deletedNodes:C,deletedEdges:_}},getIntersectingNodes:(u,p=!0,y)=>{const g=yU(u),k=g?u:c(u),x=y!==void 0;return k?(y||t.getState().nodes).filter(v=>{const M=t.getState().nodeLookup.get(v.id);if(M&&!g&&(v.id===u.id||!M.internals.positionAbsolute))return!1;const w=A0(x?v:M),b=of(w,k);return p&&b>0||b>=w.width*w.height||b>=k.width*k.height}):[]},isNodeIntersecting:(u,p,y=!0)=>{const k=yU(u)?u:c(u);if(!k)return!1;const x=of(k,p);return y&&x>0||x>=p.width*p.height||x>=k.width*k.height},updateNode:l,updateNodeData:(u,p,y={replace:!1})=>{l(u,g=>{const k=typeof p=="function"?p(g):p;return y.replace?{...g,data:k}:{...g,data:{...g.data,...k}}},y)},updateEdge:h,updateEdgeData:(u,p,y={replace:!1})=>{h(u,g=>{const k=typeof p=="function"?p(g):p;return y.replace?{...g,data:k}:{...g,data:{...g.data,...k}}},y)},getNodesBounds:u=>{const{nodeLookup:p,nodeOrigin:y}=t.getState();return yze(u,{nodeLookup:p,nodeOrigin:y})},getHandleConnections:({type:u,id:p,nodeId:y})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${y}-${u}${p?`-${p}`:""}`))==null?void 0:g.values())??[])},getNodeConnections:({type:u,handleId:p,nodeId:y})=>{var g;return Array.from(((g=t.getState().connectionLookup.get(`${y}${u?p?`-${u}-${p}`:`-${u}`:""}`))==null?void 0:g.values())??[])},fitView:async u=>{const p=t.getState().fitViewResolver??bze();return t.setState({fitViewQueued:!0,fitViewOptions:u,fitViewResolver:p}),n.nodeQueue.push(y=>[...y]),p.promise}}},[]);return m.useMemo(()=>({...r,...e,viewportInitialized:o}),[o])}const FU=e=>e.selected,dTe=typeof window<"u"?window:void 0;function uTe({deleteKeyCode:e,multiSelectionKeyCode:t}){const n=vt(),{deleteElements:o}=sR(),r=sf(e,{actInsideInputWithModifier:!1}),a=sf(t,{target:dTe});m.useEffect(()=>{if(r){const{edges:i,nodes:s}=n.getState();o({nodes:s.filter(FU),edges:i.filter(FU)}),n.setState({nodesSelectionActive:!1})}},[r]),m.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])}function hTe(e){const t=vt();m.useEffect(()=>{const n=()=>{var r,a,i,s;if(!e.current||!(((a=(r=e.current).checkVisibility)==null?void 0:a.call(r))??!0))return!1;const o=FF(e.current);(o.height===0||o.width===0)&&((s=(i=t.getState()).onError)==null||s.call(i,"004",Kr.error004())),t.setState({width:o.width||500,height:o.height||500})};if(e.current){n(),window.addEventListener("resize",n);const o=new ResizeObserver(()=>n());return o.observe(e.current),()=>{window.removeEventListener("resize",n),o&&e.current&&o.unobserve(e.current)}}},[])}const cR={position:"absolute",width:"100%",height:"100%",top:0,left:0},fTe=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function pTe({onPaneContextMenu:e,zoomOnScroll:t=!0,zoomOnPinch:n=!0,panOnScroll:o=!1,panOnScrollSpeed:r=.5,panOnScrollMode:a=Cd.Free,zoomOnDoubleClick:i=!0,panOnDrag:s=!0,defaultViewport:c,translateExtent:l,minZoom:h,maxZoom:u,zoomActivationKeyCode:p,preventScrolling:y=!0,children:g,noWheelClassName:k,noPanClassName:x,onViewportChange:v,isControlledViewport:M,paneClickDistance:w,selectionOnDrag:b}){const C=vt(),_=m.useRef(null),{userSelectionActive:S,lib:E,connectionInProgress:P}=De(fTe,St),N=sf(p),j=m.useRef();hTe(_);const z=m.useCallback(U=>{v==null||v({x:U[0],y:U[1],zoom:U[2]}),M||C.setState({transform:U})},[v,M]);return m.useEffect(()=>{if(_.current){j.current=iRe({domNode:_.current,minZoom:h,maxZoom:u,translateExtent:l,viewport:c,onDraggingChange:D=>C.setState(O=>O.paneDragging===D?O:{paneDragging:D}),onPanZoomStart:(D,O)=>{const{onViewportChangeStart:I,onMoveStart:R}=C.getState();R==null||R(D,O),I==null||I(O)},onPanZoom:(D,O)=>{const{onViewportChange:I,onMove:R}=C.getState();R==null||R(D,O),I==null||I(O)},onPanZoomEnd:(D,O)=>{const{onViewportChangeEnd:I,onMoveEnd:R}=C.getState();R==null||R(D,O),I==null||I(O)}});const{x:U,y:A,zoom:T}=j.current.getViewport();return C.setState({panZoom:j.current,transform:[U,A,T],domNode:_.current.closest(".react-flow")}),()=>{var D;(D=j.current)==null||D.destroy()}}},[]),m.useEffect(()=>{var U;(U=j.current)==null||U.update({onPaneContextMenu:e,zoomOnScroll:t,zoomOnPinch:n,panOnScroll:o,panOnScrollSpeed:r,panOnScrollMode:a,zoomOnDoubleClick:i,panOnDrag:s,zoomActivationKeyPressed:N,preventScrolling:y,noPanClassName:x,userSelectionActive:S,noWheelClassName:k,lib:E,onTransformChange:z,connectionInProgress:P,selectionOnDrag:b,paneClickDistance:w})},[e,t,n,o,r,a,i,s,N,y,x,S,k,E,z,P,b,w]),f.jsx("div",{className:"react-flow__renderer",ref:_,style:cR,children:g})}const yTe=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function mTe(){const{userSelectionActive:e,userSelectionRect:t}=De(yTe,St);return e&&t?f.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}const RT=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},gTe=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,connectionInProgress:e.connection.inProgress,dragging:e.paneDragging});function kTe({isSelecting:e,selectionKeyPressed:t,selectionMode:n=N0.Full,panOnDrag:o,paneClickDistance:r,selectionOnDrag:a,onSelectionStart:i,onSelectionEnd:s,onPaneClick:c,onPaneContextMenu:l,onPaneScroll:h,onPaneMouseEnter:u,onPaneMouseMove:p,onPaneMouseLeave:y,children:g}){const k=vt(),{userSelectionActive:x,elementsSelectable:v,dragging:M,connectionInProgress:w}=De(gTe,St),b=v&&(e||x),C=m.useRef(null),_=m.useRef(),S=m.useRef(new Set),E=m.useRef(new Set),P=m.useRef(!1),N=I=>{if(P.current||w){P.current=!1;return}c==null||c(I),k.getState().resetSelectedElements(),k.setState({nodesSelectionActive:!1})},j=I=>{if(Array.isArray(o)&&(o!=null&&o.includes(2))){I.preventDefault();return}l==null||l(I)},z=h?I=>h(I):void 0,U=I=>{P.current&&(I.stopPropagation(),P.current=!1)},A=I=>{var G,Q;const{domNode:R}=k.getState();if(_.current=R==null?void 0:R.getBoundingClientRect(),!_.current)return;const L=I.target===C.current;if(!L&&!!I.target.closest(".nokey")||!e||!(a&&L||t)||I.button!==0||!I.isPrimary)return;(Q=(G=I.target)==null?void 0:G.setPointerCapture)==null||Q.call(G,I.pointerId),P.current=!1;const{x:$,y:X}=Qo(I.nativeEvent,_.current);k.setState({userSelectionRect:{width:0,height:0,startX:$,startY:X,x:$,y:X}}),L||(I.stopPropagation(),I.preventDefault())},T=I=>{const{userSelectionRect:R,transform:L,nodeLookup:q,edgeLookup:H,connectionLookup:$,triggerNodeChanges:X,triggerEdgeChanges:G,defaultEdgeOptions:Q,resetSelectedElements:oe}=k.getState();if(!_.current||!R)return;const{x:re,y:te}=Qo(I.nativeEvent,_.current),{startX:ce,startY:ke}=R;if(!P.current){const ue=t?0:r;if(Math.hypot(re-ce,te-ke)<=ue)return;oe(),i==null||i(I)}P.current=!0;const ve={startX:ce,startY:ke,x:re<ce?re:ce,y:te<ke?te:ke,width:Math.abs(re-ce),height:Math.abs(te-ke)},xe=S.current,He=E.current;S.current=new Set(HF(q,ve,L,n===N0.Partial,!0).map(ue=>ue.id)),E.current=new Set;const Ze=(Q==null?void 0:Q.selectable)??!0;for(const ue of S.current){const Ie=$.get(ue);if(Ie)for(const{edgeId:zt}of Ie.values()){const pt=H.get(zt);pt&&(pt.selectable??Ze)&&E.current.add(zt)}}if(!mU(xe,S.current)){const ue=Zu(q,S.current,!0);X(ue)}if(!mU(He,E.current)){const ue=Zu(H,E.current);G(ue)}k.setState({userSelectionRect:ve,userSelectionActive:!0,nodesSelectionActive:!1})},D=I=>{var R,L;I.button===0&&((L=(R=I.target)==null?void 0:R.releasePointerCapture)==null||L.call(R,I.pointerId),!x&&I.target===C.current&&k.getState().userSelectionRect&&(N==null||N(I)),k.setState({userSelectionActive:!1,userSelectionRect:null}),P.current&&(s==null||s(I),k.setState({nodesSelectionActive:S.current.size>0})))},O=o===!0||Array.isArray(o)&&o.includes(0);return f.jsxs("div",{className:Xt(["react-flow__pane",{draggable:O,dragging:M,selection:e}]),onClick:b?void 0:RT(N,C),onContextMenu:RT(j,C),onWheel:RT(z,C),onPointerEnter:b?void 0:u,onPointerMove:b?T:p,onPointerUp:b?D:void 0,onPointerDownCapture:b?A:void 0,onClickCapture:b?U:void 0,onPointerLeave:y,ref:C,style:cR,children:[g,f.jsx(mTe,{})]})}function HH({id:e,store:t,unselect:n=!1,nodeRef:o}){const{addSelectedNodes:r,unselectNodesAndEdges:a,multiSelectionActive:i,nodeLookup:s,onError:c}=t.getState(),l=s.get(e);if(!l){c==null||c("012",Kr.error012(e));return}t.setState({nodesSelectionActive:!1}),l.selected?(n||l.selected&&i)&&(a({nodes:[l],edges:[]}),requestAnimationFrame(()=>{var h;return(h=o==null?void 0:o.current)==null?void 0:h.blur()})):r([e])}function cJ({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:o,nodeId:r,isSelectable:a,nodeClickDistance:i}){const s=vt(),[c,l]=m.useState(!1),h=m.useRef();return m.useEffect(()=>{h.current=Wze({getStoreItems:()=>s.getState(),onNodeMouseDown:u=>{HH({id:u,store:s,nodeRef:e})},onDragStart:()=>{l(!0)},onDragStop:()=>{l(!1)}})},[]),m.useEffect(()=>{if(!(t||!e.current||!h.current))return h.current.update({noDragClassName:n,handleSelector:o,domNode:e.current,isSelectable:a,nodeId:r,nodeClickDistance:i}),()=>{var u;(u=h.current)==null||u.destroy()}},[n,o,t,a,e,r,i]),c}const vTe=e=>t=>t.selected&&(t.draggable||e&&typeof t.draggable>"u");function lJ(){const e=vt();return m.useCallback(n=>{const{nodeExtent:o,snapToGrid:r,snapGrid:a,nodesDraggable:i,onError:s,updateNodePositions:c,nodeLookup:l,nodeOrigin:h}=e.getState(),u=new Map,p=vTe(i),y=r?a[0]:5,g=r?a[1]:5,k=n.direction.x*y*n.factor,x=n.direction.y*g*n.factor;for(const[,v]of l){if(!p(v))continue;let M={x:v.internals.positionAbsolute.x+k,y:v.internals.positionAbsolute.y+x};r&&(M=Lf(M,a));const{position:w,positionAbsolute:b}=CQ({nodeId:v.id,nextPosition:M,nodeLookup:l,nodeExtent:o,nodeOrigin:h,onError:s});v.position=w,v.internals.positionAbsolute=b,u.set(v.id,v)}c(u)},[])}const GF=m.createContext(null),xTe=GF.Provider;GF.Consumer;const dJ=()=>m.useContext(GF),wTe=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),MTe=(e,t,n)=>o=>{const{connectionClickStartHandle:r,connectionMode:a,connection:i}=o,{fromHandle:s,toHandle:c,isValid:l}=i,h=(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===t&&(c==null?void 0:c.type)===n;return{connectingFrom:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===t&&(s==null?void 0:s.type)===n,connectingTo:h,clickConnecting:(r==null?void 0:r.nodeId)===e&&(r==null?void 0:r.id)===t&&(r==null?void 0:r.type)===n,isPossibleEndHandle:a===L0.Strict?(s==null?void 0:s.type)!==n:e!==(s==null?void 0:s.nodeId)||t!==(s==null?void 0:s.id),connectionInProcess:!!s,clickConnectionInProcess:!!r,valid:h&&l}};function bTe({type:e="source",position:t=fe.Top,isValidConnection:n,isConnectable:o=!0,isConnectableStart:r=!0,isConnectableEnd:a=!0,id:i,onConnect:s,children:c,className:l,onMouseDown:h,onTouchStart:u,...p},y){var T,D;const g=i||null,k=e==="target",x=vt(),v=dJ(),{connectOnClick:M,noPanClassName:w,rfId:b}=De(wTe,St),{connectingFrom:C,connectingTo:_,clickConnecting:S,isPossibleEndHandle:E,connectionInProcess:P,clickConnectionInProcess:N,valid:j}=De(MTe(v,g,e),St);v||(D=(T=x.getState()).onError)==null||D.call(T,"010",Kr.error010());const z=O=>{const{defaultEdgeOptions:I,onConnect:R,hasDefaultEdges:L}=x.getState(),q={...I,...O};if(L){const{edges:H,setEdges:$}=x.getState();$(Aze(q,H))}R==null||R(q),s==null||s(q)},U=O=>{if(!v)return;const I=$Q(O.nativeEvent);if(r&&(I&&O.button===0||!I)){const R=x.getState();TH.onPointerDown(O.nativeEvent,{handleDomNode:O.currentTarget,autoPanOnConnect:R.autoPanOnConnect,connectionMode:R.connectionMode,connectionRadius:R.connectionRadius,domNode:R.domNode,nodeLookup:R.nodeLookup,lib:R.lib,isTarget:k,handleId:g,nodeId:v,flowId:R.rfId,panBy:R.panBy,cancelConnection:R.cancelConnection,onConnectStart:R.onConnectStart,onConnectEnd:(...L)=>{var q,H;return(H=(q=x.getState()).onConnectEnd)==null?void 0:H.call(q,...L)},updateConnection:R.updateConnection,onConnect:z,isValidConnection:n||((...L)=>{var q,H;return((H=(q=x.getState()).isValidConnection)==null?void 0:H.call(q,...L))??!0}),getTransform:()=>x.getState().transform,getFromHandle:()=>x.getState().connection.fromHandle,autoPanSpeed:R.autoPanSpeed,dragThreshold:R.connectionDragThreshold})}I?h==null||h(O):u==null||u(O)},A=O=>{const{onClickConnectStart:I,onClickConnectEnd:R,connectionClickStartHandle:L,connectionMode:q,isValidConnection:H,lib:$,rfId:X,nodeLookup:G,connection:Q}=x.getState();if(!v||!L&&!r)return;if(!L){I==null||I(O.nativeEvent,{nodeId:v,handleId:g,handleType:e}),x.setState({connectionClickStartHandle:{nodeId:v,type:e,id:g}});return}const oe=EQ(O.target),re=n||H,{connection:te,isValid:ce}=TH.isValid(O.nativeEvent,{handle:{nodeId:v,id:g,type:e},connectionMode:q,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:re,flowId:X,doc:oe,lib:$,nodeLookup:G});ce&&te&&z(te);const ke=structuredClone(Q);delete ke.inProgress,ke.toPosition=ke.toHandle?ke.toHandle.position:null,R==null||R(O,ke),x.setState({connectionClickStartHandle:null})};return f.jsx("div",{"data-handleid":g,"data-nodeid":v,"data-handlepos":t,"data-id":`${b}-${v}-${g}-${e}`,className:Xt(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,l,{source:!k,target:k,connectable:o,connectablestart:r,connectableend:a,clickconnecting:S,connectingfrom:C,connectingto:_,valid:j,connectionindicator:o&&(!P||E)&&(P||N?a:r)}]),onMouseDown:U,onTouchStart:U,onClick:M?A:void 0,ref:y,...p,children:c})}const st=m.memo(iJ(bTe));function _Te({data:e,isConnectable:t,sourcePosition:n=fe.Bottom}){return f.jsxs(f.Fragment,{children:[e==null?void 0:e.label,f.jsx(st,{type:"source",position:n,isConnectable:t})]})}function CTe({data:e,isConnectable:t,targetPosition:n=fe.Top,sourcePosition:o=fe.Bottom}){return f.jsxs(f.Fragment,{children:[f.jsx(st,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,f.jsx(st,{type:"source",position:o,isConnectable:t})]})}function STe(){return null}function LTe({data:e,isConnectable:t,targetPosition:n=fe.Top}){return f.jsxs(f.Fragment,{children:[f.jsx(st,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label]})}const QP={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},qU={input:_Te,default:CTe,output:LTe,group:STe};function NTe(e){var t,n,o,r;return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??((t=e.style)==null?void 0:t.width),height:e.height??e.initialHeight??((n=e.style)==null?void 0:n.height)}:{width:e.width??((o=e.style)==null?void 0:o.width),height:e.height??((r=e.style)==null?void 0:r.height)}}const ITe=e=>{const{width:t,height:n,x:o,y:r}=Sf(e.nodeLookup,{filter:a=>!!a.selected});return{width:Yo(t)?t:null,height:Yo(n)?n:null,userSelectionActive:e.userSelectionActive,transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]}) translate(${o}px,${r}px)`}};function ATe({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const o=vt(),{width:r,height:a,transformString:i,userSelectionActive:s}=De(ITe,St),c=lJ(),l=m.useRef(null);m.useEffect(()=>{var y;n||(y=l.current)==null||y.focus({preventScroll:!0})},[n]);const h=!s&&r!==null&&a!==null;if(cJ({nodeRef:l,disabled:!h}),!h)return null;const u=e?y=>{const g=o.getState().nodes.filter(k=>k.selected);e(y,g)}:void 0,p=y=>{Object.prototype.hasOwnProperty.call(QP,y.key)&&(y.preventDefault(),c({direction:QP[y.key],factor:y.shiftKey?4:1}))};return f.jsx("div",{className:Xt(["react-flow__nodesselection","react-flow__container",t]),style:{transform:i},children:f.jsx("div",{ref:l,className:"react-flow__nodesselection-rect",onContextMenu:u,tabIndex:n?void 0:-1,onKeyDown:n?void 0:p,style:{width:r,height:a}})})}const VU=typeof window<"u"?window:void 0,ETe=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function uJ({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:a,onPaneScroll:i,paneClickDistance:s,deleteKeyCode:c,selectionKeyCode:l,selectionOnDrag:h,selectionMode:u,onSelectionStart:p,onSelectionEnd:y,multiSelectionKeyCode:g,panActivationKeyCode:k,zoomActivationKeyCode:x,elementsSelectable:v,zoomOnScroll:M,zoomOnPinch:w,panOnScroll:b,panOnScrollSpeed:C,panOnScrollMode:_,zoomOnDoubleClick:S,panOnDrag:E,defaultViewport:P,translateExtent:N,minZoom:j,maxZoom:z,preventScrolling:U,onSelectionContextMenu:A,noWheelClassName:T,noPanClassName:D,disableKeyboardA11y:O,onViewportChange:I,isControlledViewport:R}){const{nodesSelectionActive:L,userSelectionActive:q}=De(ETe,St),H=sf(l,{target:VU}),$=sf(k,{target:VU}),X=$||E,G=$||b,Q=h&&X!==!0,oe=H||q||Q;return uTe({deleteKeyCode:c,multiSelectionKeyCode:g}),f.jsx(pTe,{onPaneContextMenu:a,elementsSelectable:v,zoomOnScroll:M,zoomOnPinch:w,panOnScroll:G,panOnScrollSpeed:C,panOnScrollMode:_,zoomOnDoubleClick:S,panOnDrag:!H&&X,defaultViewport:P,translateExtent:N,minZoom:j,maxZoom:z,zoomActivationKeyCode:x,preventScrolling:U,noWheelClassName:T,noPanClassName:D,onViewportChange:I,isControlledViewport:R,paneClickDistance:s,selectionOnDrag:Q,children:f.jsxs(kTe,{onSelectionStart:p,onSelectionEnd:y,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:o,onPaneMouseLeave:r,onPaneContextMenu:a,onPaneScroll:i,panOnDrag:X,isSelecting:!!oe,selectionMode:u,selectionKeyPressed:H,paneClickDistance:s,selectionOnDrag:Q,children:[e,L&&f.jsx(ATe,{onSelectionContextMenu:A,noPanClassName:D,disableKeyboardA11y:O})]})})}uJ.displayName="FlowRenderer";const jTe=m.memo(uJ),$Te=e=>t=>e?HF(t.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(n=>n.id):Array.from(t.nodeLookup.keys());function PTe(e){return De(m.useCallback($Te(e),[e]),St)}const zTe=e=>e.updateNodeInternals;function RTe(){const e=De(zTe),[t]=m.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(n=>{const o=new Map;n.forEach(r=>{const a=r.target.getAttribute("data-id");o.set(a,{id:a,nodeElement:r.target,force:!0})}),e(o)}));return m.useEffect(()=>()=>{t==null||t.disconnect()},[t]),t}function TTe({node:e,nodeType:t,hasDimensions:n,resizeObserver:o}){const r=vt(),a=m.useRef(null),i=m.useRef(null),s=m.useRef(e.sourcePosition),c=m.useRef(e.targetPosition),l=m.useRef(t),h=n&&!!e.internals.handleBounds;return m.useEffect(()=>{a.current&&!e.hidden&&(!h||i.current!==a.current)&&(i.current&&(o==null||o.unobserve(i.current)),o==null||o.observe(a.current),i.current=a.current)},[h,e.hidden]),m.useEffect(()=>()=>{i.current&&(o==null||o.unobserve(i.current),i.current=null)},[]),m.useEffect(()=>{if(a.current){const u=l.current!==t,p=s.current!==e.sourcePosition,y=c.current!==e.targetPosition;(u||p||y)&&(l.current=t,s.current=e.sourcePosition,c.current=e.targetPosition,r.getState().updateNodeInternals(new Map([[e.id,{id:e.id,nodeElement:a.current,force:!0}]])))}},[e.id,t,e.sourcePosition,e.targetPosition]),a}function DTe({id:e,onClick:t,onMouseEnter:n,onMouseMove:o,onMouseLeave:r,onContextMenu:a,onDoubleClick:i,nodesDraggable:s,elementsSelectable:c,nodesConnectable:l,nodesFocusable:h,resizeObserver:u,noDragClassName:p,noPanClassName:y,disableKeyboardA11y:g,rfId:k,nodeTypes:x,nodeClickDistance:v,onError:M}){const{node:w,internals:b,isParent:C}=De(re=>{const te=re.nodeLookup.get(e),ce=re.parentLookup.has(e);return{node:te,internals:te.internals,isParent:ce}},St);let _=w.type||"default",S=(x==null?void 0:x[_])||qU[_];S===void 0&&(M==null||M("003",Kr.error003(_)),_="default",S=(x==null?void 0:x.default)||qU.default);const E=!!(w.draggable||s&&typeof w.draggable>"u"),P=!!(w.selectable||c&&typeof w.selectable>"u"),N=!!(w.connectable||l&&typeof w.connectable>"u"),j=!!(w.focusable||h&&typeof w.focusable>"u"),z=vt(),U=IQ(w),A=TTe({node:w,nodeType:_,hasDimensions:U,resizeObserver:u}),T=cJ({nodeRef:A,disabled:w.hidden||!E,noDragClassName:p,handleSelector:w.dragHandle,nodeId:e,isSelectable:P,nodeClickDistance:v}),D=lJ();if(w.hidden)return null;const O=za(w),I=NTe(w),R=P||E||t||n||o||r,L=n?re=>n(re,{...b.userNode}):void 0,q=o?re=>o(re,{...b.userNode}):void 0,H=r?re=>r(re,{...b.userNode}):void 0,$=a?re=>a(re,{...b.userNode}):void 0,X=i?re=>i(re,{...b.userNode}):void 0,G=re=>{const{selectNodesOnDrag:te,nodeDragThreshold:ce}=z.getState();P&&(!te||!E||ce>0)&&HH({id:e,store:z,nodeRef:A}),t&&t(re,{...b.userNode})},Q=re=>{if(!(jQ(re.nativeEvent)||g)){if(xQ.includes(re.key)&&P){const te=re.key==="Escape";HH({id:e,store:z,unselect:te,nodeRef:A})}else if(E&&w.selected&&Object.prototype.hasOwnProperty.call(QP,re.key)){re.preventDefault();const{ariaLabelConfig:te}=z.getState();z.setState({ariaLiveMessage:te["node.a11yDescription.ariaLiveMessage"]({direction:re.key.replace("Arrow","").toLowerCase(),x:~~b.positionAbsolute.x,y:~~b.positionAbsolute.y})}),D({direction:QP[re.key],factor:re.shiftKey?4:1})}}},oe=()=>{var He;if(g||!((He=A.current)!=null&&He.matches(":focus-visible")))return;const{transform:re,width:te,height:ce,autoPanOnNodeFocus:ke,setCenter:ve}=z.getState();if(!ke)return;HF(new Map([[e,w]]),{x:0,y:0,width:te,height:ce},re,!0).length>0||ve(w.position.x+O.width/2,w.position.y+O.height/2,{zoom:re[2]})};return f.jsx("div",{className:Xt(["react-flow__node",`react-flow__node-${_}`,{[y]:E},w.className,{selected:w.selected,selectable:P,parent:C,draggable:E,dragging:T}]),ref:A,style:{zIndex:b.z,transform:`translate(${b.positionAbsolute.x}px,${b.positionAbsolute.y}px)`,pointerEvents:R?"all":"none",visibility:U?"visible":"hidden",...w.style,...I},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:q,onMouseLeave:H,onContextMenu:$,onClick:G,onDoubleClick:X,onKeyDown:j?Q:void 0,tabIndex:j?0:void 0,onFocus:j?oe:void 0,role:w.ariaRole??(j?"group":void 0),"aria-roledescription":"node","aria-describedby":g?void 0:`${eJ}-${k}`,"aria-label":w.ariaLabel,...w.domAttributes,children:f.jsx(xTe,{value:e,children:f.jsx(S,{id:e,data:w.data,type:_,positionAbsoluteX:b.positionAbsolute.x,positionAbsoluteY:b.positionAbsolute.y,selected:w.selected??!1,selectable:P,draggable:E,deletable:w.deletable??!0,isConnectable:N,sourcePosition:w.sourcePosition,targetPosition:w.targetPosition,dragging:T,dragHandle:w.dragHandle,zIndex:b.z,parentId:w.parentId,...O})})})}var HTe=m.memo(DTe);const OTe=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function hJ(e){const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,onError:a}=De(OTe,St),i=PTe(e.onlyRenderVisibleElements),s=RTe();return f.jsx("div",{className:"react-flow__nodes",style:cR,children:i.map(c=>f.jsx(HTe,{id:c,nodeTypes:e.nodeTypes,nodeExtent:e.nodeExtent,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,resizeObserver:s,nodesDraggable:t,nodesConnectable:n,nodesFocusable:o,elementsSelectable:r,nodeClickDistance:e.nodeClickDistance,onError:a},c))})}hJ.displayName="NodeRenderer";const FTe=m.memo(hJ);function qTe(e){return De(m.useCallback(n=>{if(!e)return n.edges.map(r=>r.id);const o=[];if(n.width&&n.height)for(const r of n.edges){const a=n.nodeLookup.get(r.source),i=n.nodeLookup.get(r.target);a&&i&&Lze({sourceNode:a,targetNode:i,width:n.width,height:n.height,transform:n.transform})&&o.push(r.id)}return o},[e]),St)}const VTe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e}};return f.jsx("polyline",{className:"arrow",style:n,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},BTe=({color:e="none",strokeWidth:t=1})=>{const n={strokeWidth:t,...e&&{stroke:e,fill:e}};return f.jsx("polyline",{className:"arrowclosed",style:n,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},BU={[nf.Arrow]:VTe,[nf.ArrowClosed]:BTe};function UTe(e){const t=vt();return m.useMemo(()=>{var r,a;return Object.prototype.hasOwnProperty.call(BU,e)?BU[e]:((a=(r=t.getState()).onError)==null||a.call(r,"009",Kr.error009(e)),null)},[e])}const WTe=({id:e,type:t,color:n,width:o=12.5,height:r=12.5,markerUnits:a="strokeWidth",strokeWidth:i,orient:s="auto-start-reverse"})=>{const c=UTe(t);return c?f.jsx("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${r}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:s,refX:"0",refY:"0",children:f.jsx(c,{color:n,strokeWidth:i})}):null},fJ=({defaultColor:e,rfId:t})=>{const n=De(a=>a.edges),o=De(a=>a.defaultEdgeOptions),r=m.useMemo(()=>zze(n,{id:t,defaultColor:e,defaultMarkerStart:o==null?void 0:o.markerStart,defaultMarkerEnd:o==null?void 0:o.markerEnd}),[n,o,t,e]);return r.length?f.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:f.jsx("defs",{children:r.map(a=>f.jsx(WTe,{id:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,strokeWidth:a.strokeWidth,orient:a.orient},a.id))})}):null};fJ.displayName="MarkerDefinitions";var GTe=m.memo(fJ);function pJ({x:e,y:t,label:n,labelStyle:o,labelShowBg:r=!0,labelBgStyle:a,labelBgPadding:i=[2,4],labelBgBorderRadius:s=2,children:c,className:l,...h}){const[u,p]=m.useState({x:1,y:0,width:0,height:0}),y=Xt(["react-flow__edge-textwrapper",l]),g=m.useRef(null);return m.useEffect(()=>{if(g.current){const k=g.current.getBBox();p({x:k.x,y:k.y,width:k.width,height:k.height})}},[n]),n?f.jsxs("g",{transform:`translate(${e-u.width/2} ${t-u.height/2})`,className:y,visibility:u.width?"visible":"hidden",...h,children:[r&&f.jsx("rect",{width:u.width+2*i[0],x:-i[0],y:-i[1],height:u.height+2*i[1],className:"react-flow__edge-textbg",style:a,rx:s,ry:s}),f.jsx("text",{className:"react-flow__edge-text",y:u.height/2,dy:"0.3em",ref:g,style:o,children:n}),c]}):null}pJ.displayName="EdgeText";const KTe=m.memo(pJ);function If({path:e,labelX:t,labelY:n,label:o,labelStyle:r,labelShowBg:a,labelBgStyle:i,labelBgPadding:s,labelBgBorderRadius:c,interactionWidth:l=20,...h}){return f.jsxs(f.Fragment,{children:[f.jsx("path",{...h,d:e,fill:"none",className:Xt(["react-flow__edge-path",h.className])}),l?f.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:l,className:"react-flow__edge-interaction"}):null,o&&Yo(t)&&Yo(n)?f.jsx(KTe,{x:t,y:n,label:o,labelStyle:r,labelShowBg:a,labelBgStyle:i,labelBgPadding:s,labelBgBorderRadius:c}):null]})}function UU({pos:e,x1:t,y1:n,x2:o,y2:r}){return e===fe.Left||e===fe.Right?[.5*(t+o),n]:[t,.5*(n+r)]}function yJ({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:o,targetY:r,targetPosition:a=fe.Top}){const[i,s]=UU({pos:n,x1:e,y1:t,x2:o,y2:r}),[c,l]=UU({pos:a,x1:o,y1:r,x2:e,y2:t}),[h,u,p,y]=PQ({sourceX:e,sourceY:t,targetX:o,targetY:r,sourceControlX:i,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${i},${s} ${c},${l} ${o},${r}`,h,u,p,y]}function mJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,sourcePosition:i,targetPosition:s,label:c,labelStyle:l,labelShowBg:h,labelBgStyle:u,labelBgPadding:p,labelBgBorderRadius:y,style:g,markerEnd:k,markerStart:x,interactionWidth:v})=>{const[M,w,b]=yJ({sourceX:n,sourceY:o,sourcePosition:i,targetX:r,targetY:a,targetPosition:s}),C=e.isInternal?void 0:t;return f.jsx(If,{id:C,path:M,labelX:w,labelY:b,label:c,labelStyle:l,labelShowBg:h,labelBgStyle:u,labelBgPadding:p,labelBgBorderRadius:y,style:g,markerEnd:k,markerStart:x,interactionWidth:v})})}const XTe=mJ({isInternal:!1}),gJ=mJ({isInternal:!0});XTe.displayName="SimpleBezierEdge";gJ.displayName="SimpleBezierEdgeInternal";function kJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,label:i,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,sourcePosition:y=fe.Bottom,targetPosition:g=fe.Top,markerEnd:k,markerStart:x,pathOptions:v,interactionWidth:M})=>{const[w,b,C]=af({sourceX:n,sourceY:o,sourcePosition:y,targetX:r,targetY:a,targetPosition:g,borderRadius:v==null?void 0:v.borderRadius,offset:v==null?void 0:v.offset,stepPosition:v==null?void 0:v.stepPosition}),_=e.isInternal?void 0:t;return f.jsx(If,{id:_,path:w,labelX:b,labelY:C,label:i,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,markerEnd:k,markerStart:x,interactionWidth:M})})}const vJ=kJ({isInternal:!1}),xJ=kJ({isInternal:!0});vJ.displayName="SmoothStepEdge";xJ.displayName="SmoothStepEdgeInternal";function wJ(e){return m.memo(({id:t,...n})=>{var r;const o=e.isInternal?void 0:t;return f.jsx(vJ,{...n,id:o,pathOptions:m.useMemo(()=>{var a;return{borderRadius:0,offset:(a=n.pathOptions)==null?void 0:a.offset}},[(r=n.pathOptions)==null?void 0:r.offset])})})}const ZTe=wJ({isInternal:!1}),MJ=wJ({isInternal:!0});ZTe.displayName="StepEdge";MJ.displayName="StepEdgeInternal";function bJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,label:i,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,markerEnd:y,markerStart:g,interactionWidth:k})=>{const[x,v,M]=RQ({sourceX:n,sourceY:o,targetX:r,targetY:a}),w=e.isInternal?void 0:t;return f.jsx(If,{id:w,path:x,labelX:v,labelY:M,label:i,labelStyle:s,labelShowBg:c,labelBgStyle:l,labelBgPadding:h,labelBgBorderRadius:u,style:p,markerEnd:y,markerStart:g,interactionWidth:k})})}const YTe=bJ({isInternal:!1}),_J=bJ({isInternal:!0});YTe.displayName="StraightEdge";_J.displayName="StraightEdgeInternal";function CJ(e){return m.memo(({id:t,sourceX:n,sourceY:o,targetX:r,targetY:a,sourcePosition:i=fe.Bottom,targetPosition:s=fe.Top,label:c,labelStyle:l,labelShowBg:h,labelBgStyle:u,labelBgPadding:p,labelBgBorderRadius:y,style:g,markerEnd:k,markerStart:x,pathOptions:v,interactionWidth:M})=>{const[w,b,C]=oR({sourceX:n,sourceY:o,sourcePosition:i,targetX:r,targetY:a,targetPosition:s,curvature:v==null?void 0:v.curvature}),_=e.isInternal?void 0:t;return f.jsx(If,{id:_,path:w,labelX:b,labelY:C,label:c,labelStyle:l,labelShowBg:h,labelBgStyle:u,labelBgPadding:p,labelBgBorderRadius:y,style:g,markerEnd:k,markerStart:x,interactionWidth:M})})}const QTe=CJ({isInternal:!1}),SJ=CJ({isInternal:!0});QTe.displayName="BezierEdge";SJ.displayName="BezierEdgeInternal";const WU={default:SJ,straight:_J,step:MJ,smoothstep:xJ,simplebezier:gJ},GU={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},JTe=(e,t,n)=>n===fe.Left?e-t:n===fe.Right?e+t:e,eDe=(e,t,n)=>n===fe.Top?e-t:n===fe.Bottom?e+t:e,KU="react-flow__edgeupdater";function XU({position:e,centerX:t,centerY:n,radius:o=10,onMouseDown:r,onMouseEnter:a,onMouseOut:i,type:s}){return f.jsx("circle",{onMouseDown:r,onMouseEnter:a,onMouseOut:i,className:Xt([KU,`${KU}-${s}`]),cx:JTe(t,o,e),cy:eDe(n,o,e),r:o,stroke:"transparent",fill:"transparent"})}function tDe({isReconnectable:e,reconnectRadius:t,edge:n,sourceX:o,sourceY:r,targetX:a,targetY:i,sourcePosition:s,targetPosition:c,onReconnect:l,onReconnectStart:h,onReconnectEnd:u,setReconnecting:p,setUpdateHover:y}){const g=vt(),k=(b,C)=>{if(b.button!==0)return;const{autoPanOnConnect:_,domNode:S,connectionMode:E,connectionRadius:P,lib:N,onConnectStart:j,cancelConnection:z,nodeLookup:U,rfId:A,panBy:T,updateConnection:D}=g.getState(),O=C.type==="target",I=(q,H)=>{p(!1),u==null||u(q,n,C.type,H)},R=q=>l==null?void 0:l(n,q),L=(q,H)=>{p(!0),h==null||h(b,n,C.type),j==null||j(q,H)};TH.onPointerDown(b.nativeEvent,{autoPanOnConnect:_,connectionMode:E,connectionRadius:P,domNode:S,handleId:C.id,nodeId:C.nodeId,nodeLookup:U,isTarget:O,edgeUpdaterType:C.type,lib:N,flowId:A,cancelConnection:z,panBy:T,isValidConnection:(...q)=>{var H,$;return(($=(H=g.getState()).isValidConnection)==null?void 0:$.call(H,...q))??!0},onConnect:R,onConnectStart:L,onConnectEnd:(...q)=>{var H,$;return($=(H=g.getState()).onConnectEnd)==null?void 0:$.call(H,...q)},onReconnectEnd:I,updateConnection:D,getTransform:()=>g.getState().transform,getFromHandle:()=>g.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:b.currentTarget})},x=b=>k(b,{nodeId:n.target,id:n.targetHandle??null,type:"target"}),v=b=>k(b,{nodeId:n.source,id:n.sourceHandle??null,type:"source"}),M=()=>y(!0),w=()=>y(!1);return f.jsxs(f.Fragment,{children:[(e===!0||e==="source")&&f.jsx(XU,{position:s,centerX:o,centerY:r,radius:t,onMouseDown:x,onMouseEnter:M,onMouseOut:w,type:"source"}),(e===!0||e==="target")&&f.jsx(XU,{position:c,centerX:a,centerY:i,radius:t,onMouseDown:v,onMouseEnter:M,onMouseOut:w,type:"target"})]})}function nDe({id:e,edgesFocusable:t,edgesReconnectable:n,elementsSelectable:o,onClick:r,onDoubleClick:a,onContextMenu:i,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,reconnectRadius:h,onReconnect:u,onReconnectStart:p,onReconnectEnd:y,rfId:g,edgeTypes:k,noPanClassName:x,onError:v,disableKeyboardA11y:M}){let w=De(ve=>ve.edgeLookup.get(e));const b=De(ve=>ve.defaultEdgeOptions);w=b?{...b,...w}:w;let C=w.type||"default",_=(k==null?void 0:k[C])||WU[C];_===void 0&&(v==null||v("011",Kr.error011(C)),C="default",_=(k==null?void 0:k.default)||WU.default);const S=!!(w.focusable||t&&typeof w.focusable>"u"),E=typeof u<"u"&&(w.reconnectable||n&&typeof w.reconnectable>"u"),P=!!(w.selectable||o&&typeof w.selectable>"u"),N=m.useRef(null),[j,z]=m.useState(!1),[U,A]=m.useState(!1),T=vt(),{zIndex:D,sourceX:O,sourceY:I,targetX:R,targetY:L,sourcePosition:q,targetPosition:H}=De(m.useCallback(ve=>{const xe=ve.nodeLookup.get(w.source),He=ve.nodeLookup.get(w.target);if(!xe||!He)return{zIndex:w.zIndex,...GU};const Ze=Pze({id:e,sourceNode:xe,targetNode:He,sourceHandle:w.sourceHandle||null,targetHandle:w.targetHandle||null,connectionMode:ve.connectionMode,onError:v});return{zIndex:Sze({selected:w.selected,zIndex:w.zIndex,sourceNode:xe,targetNode:He,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode}),...Ze||GU}},[w.source,w.target,w.sourceHandle,w.targetHandle,w.selected,w.zIndex]),St),$=m.useMemo(()=>w.markerStart?`url('#${zH(w.markerStart,g)}')`:void 0,[w.markerStart,g]),X=m.useMemo(()=>w.markerEnd?`url('#${zH(w.markerEnd,g)}')`:void 0,[w.markerEnd,g]);if(w.hidden||O===null||I===null||R===null||L===null)return null;const G=ve=>{var ue;const{addSelectedEdges:xe,unselectNodesAndEdges:He,multiSelectionActive:Ze}=T.getState();P&&(T.setState({nodesSelectionActive:!1}),w.selected&&Ze?(He({nodes:[],edges:[w]}),(ue=N.current)==null||ue.blur()):xe([e])),r&&r(ve,w)},Q=a?ve=>{a(ve,{...w})}:void 0,oe=i?ve=>{i(ve,{...w})}:void 0,re=s?ve=>{s(ve,{...w})}:void 0,te=c?ve=>{c(ve,{...w})}:void 0,ce=l?ve=>{l(ve,{...w})}:void 0,ke=ve=>{var xe;if(!M&&xQ.includes(ve.key)&&P){const{unselectNodesAndEdges:He,addSelectedEdges:Ze}=T.getState();ve.key==="Escape"?((xe=N.current)==null||xe.blur(),He({edges:[w]})):Ze([e])}};return f.jsx("svg",{style:{zIndex:D},children:f.jsxs("g",{className:Xt(["react-flow__edge",`react-flow__edge-${C}`,w.className,x,{selected:w.selected,animated:w.animated,inactive:!P&&!r,updating:j,selectable:P}]),onClick:G,onDoubleClick:Q,onContextMenu:oe,onMouseEnter:re,onMouseMove:te,onMouseLeave:ce,onKeyDown:S?ke:void 0,tabIndex:S?0:void 0,role:w.ariaRole??(S?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":w.ariaLabel===null?void 0:w.ariaLabel||`Edge from ${w.source} to ${w.target}`,"aria-describedby":S?`${tJ}-${g}`:void 0,ref:N,...w.domAttributes,children:[!U&&f.jsx(_,{id:e,source:w.source,target:w.target,type:w.type,selected:w.selected,animated:w.animated,selectable:P,deletable:w.deletable??!0,label:w.label,labelStyle:w.labelStyle,labelShowBg:w.labelShowBg,labelBgStyle:w.labelBgStyle,labelBgPadding:w.labelBgPadding,labelBgBorderRadius:w.labelBgBorderRadius,sourceX:O,sourceY:I,targetX:R,targetY:L,sourcePosition:q,targetPosition:H,data:w.data,style:w.style,sourceHandleId:w.sourceHandle,targetHandleId:w.targetHandle,markerStart:$,markerEnd:X,pathOptions:"pathOptions"in w?w.pathOptions:void 0,interactionWidth:w.interactionWidth}),E&&f.jsx(tDe,{edge:w,isReconnectable:E,reconnectRadius:h,onReconnect:u,onReconnectStart:p,onReconnectEnd:y,sourceX:O,sourceY:I,targetX:R,targetY:L,sourcePosition:q,targetPosition:H,setUpdateHover:z,setReconnecting:A})]})})}var oDe=m.memo(nDe);const rDe=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function LJ({defaultMarkerColor:e,onlyRenderVisibleElements:t,rfId:n,edgeTypes:o,noPanClassName:r,onReconnect:a,onEdgeContextMenu:i,onEdgeMouseEnter:s,onEdgeMouseMove:c,onEdgeMouseLeave:l,onEdgeClick:h,reconnectRadius:u,onEdgeDoubleClick:p,onReconnectStart:y,onReconnectEnd:g,disableKeyboardA11y:k}){const{edgesFocusable:x,edgesReconnectable:v,elementsSelectable:M,onError:w}=De(rDe,St),b=qTe(t);return f.jsxs("div",{className:"react-flow__edges",children:[f.jsx(GTe,{defaultColor:e,rfId:n}),b.map(C=>f.jsx(oDe,{id:C,edgesFocusable:x,edgesReconnectable:v,elementsSelectable:M,noPanClassName:r,onReconnect:a,onContextMenu:i,onMouseEnter:s,onMouseMove:c,onMouseLeave:l,onClick:h,reconnectRadius:u,onDoubleClick:p,onReconnectStart:y,onReconnectEnd:g,rfId:n,onError:w,edgeTypes:o,disableKeyboardA11y:k},C))]})}LJ.displayName="EdgeRenderer";const aDe=m.memo(LJ),iDe=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function sDe({children:e}){const t=De(iDe);return f.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:t},children:e})}function cDe(e){const t=sR(),n=m.useRef(!1);m.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const lDe=e=>{var t;return(t=e.panZoom)==null?void 0:t.syncViewport};function dDe(e){const t=De(lDe),n=vt();return m.useEffect(()=>{e&&(t==null||t(e),n.setState({transform:[e.x,e.y,e.zoom]}))},[e,t]),null}function uDe(e){return e.connection.inProgress?{...e.connection,to:Nf(e.connection.to,e.transform)}:{...e.connection}}function hDe(e){return uDe}function fDe(e){const t=hDe();return De(t,St)}const pDe=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function yDe({containerStyle:e,style:t,type:n,component:o}){const{nodesConnectable:r,width:a,height:i,isValid:s,inProgress:c}=De(pDe,St);return!(a&&r&&c)?null:f.jsx("svg",{style:e,width:a,height:i,className:"react-flow__connectionline react-flow__container",children:f.jsx("g",{className:Xt(["react-flow__connection",bQ(s)]),children:f.jsx(NJ,{style:t,type:n,CustomComponent:o,isValid:s})})})}const NJ=({style:e,type:t=mi.Bezier,CustomComponent:n,isValid:o})=>{const{inProgress:r,from:a,fromNode:i,fromHandle:s,fromPosition:c,to:l,toNode:h,toHandle:u,toPosition:p,pointer:y}=fDe();if(!r)return;if(n)return f.jsx(n,{connectionLineType:t,connectionLineStyle:e,fromNode:i,fromHandle:s,fromX:a.x,fromY:a.y,toX:l.x,toY:l.y,fromPosition:c,toPosition:p,connectionStatus:bQ(o),toNode:h,toHandle:u,pointer:y});let g="";const k={sourceX:a.x,sourceY:a.y,sourcePosition:c,targetX:l.x,targetY:l.y,targetPosition:p};switch(t){case mi.Bezier:[g]=oR(k);break;case mi.SimpleBezier:[g]=yJ(k);break;case mi.Step:[g]=af({...k,borderRadius:0});break;case mi.SmoothStep:[g]=af(k);break;default:[g]=RQ(k)}return f.jsx("path",{d:g,fill:"none",className:"react-flow__connection-path",style:e})};NJ.displayName="ConnectionLine";const mDe={};function ZU(e=mDe){m.useRef(e),vt(),m.useEffect(()=>{},[e])}function gDe(){vt(),m.useRef(!1),m.useEffect(()=>{},[])}function IJ({nodeTypes:e,edgeTypes:t,onInit:n,onNodeClick:o,onEdgeClick:r,onNodeDoubleClick:a,onEdgeDoubleClick:i,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:h,onSelectionContextMenu:u,onSelectionStart:p,onSelectionEnd:y,connectionLineType:g,connectionLineStyle:k,connectionLineComponent:x,connectionLineContainerStyle:v,selectionKeyCode:M,selectionOnDrag:w,selectionMode:b,multiSelectionKeyCode:C,panActivationKeyCode:_,zoomActivationKeyCode:S,deleteKeyCode:E,onlyRenderVisibleElements:P,elementsSelectable:N,defaultViewport:j,translateExtent:z,minZoom:U,maxZoom:A,preventScrolling:T,defaultMarkerColor:D,zoomOnScroll:O,zoomOnPinch:I,panOnScroll:R,panOnScrollSpeed:L,panOnScrollMode:q,zoomOnDoubleClick:H,panOnDrag:$,onPaneClick:X,onPaneMouseEnter:G,onPaneMouseMove:Q,onPaneMouseLeave:oe,onPaneScroll:re,onPaneContextMenu:te,paneClickDistance:ce,nodeClickDistance:ke,onEdgeContextMenu:ve,onEdgeMouseEnter:xe,onEdgeMouseMove:He,onEdgeMouseLeave:Ze,reconnectRadius:ue,onReconnect:Ie,onReconnectStart:zt,onReconnectEnd:pt,noDragClassName:tn,noWheelClassName:se,noPanClassName:J,disableKeyboardA11y:Rt,nodeExtent:fn,rfId:ae,viewport:Y,onViewportChange:he}){return ZU(e),ZU(t),gDe(),cDe(n),dDe(Y),f.jsx(jTe,{onPaneClick:X,onPaneMouseEnter:G,onPaneMouseMove:Q,onPaneMouseLeave:oe,onPaneContextMenu:te,onPaneScroll:re,paneClickDistance:ce,deleteKeyCode:E,selectionKeyCode:M,selectionOnDrag:w,selectionMode:b,onSelectionStart:p,onSelectionEnd:y,multiSelectionKeyCode:C,panActivationKeyCode:_,zoomActivationKeyCode:S,elementsSelectable:N,zoomOnScroll:O,zoomOnPinch:I,zoomOnDoubleClick:H,panOnScroll:R,panOnScrollSpeed:L,panOnScrollMode:q,panOnDrag:$,defaultViewport:j,translateExtent:z,minZoom:U,maxZoom:A,onSelectionContextMenu:u,preventScrolling:T,noDragClassName:tn,noWheelClassName:se,noPanClassName:J,disableKeyboardA11y:Rt,onViewportChange:he,isControlledViewport:!!Y,children:f.jsxs(sDe,{children:[f.jsx(aDe,{edgeTypes:t,onEdgeClick:r,onEdgeDoubleClick:i,onReconnect:Ie,onReconnectStart:zt,onReconnectEnd:pt,onlyRenderVisibleElements:P,onEdgeContextMenu:ve,onEdgeMouseEnter:xe,onEdgeMouseMove:He,onEdgeMouseLeave:Ze,reconnectRadius:ue,defaultMarkerColor:D,noPanClassName:J,disableKeyboardA11y:Rt,rfId:ae}),f.jsx(yDe,{style:k,type:g,component:x,containerStyle:v}),f.jsx("div",{className:"react-flow__edgelabel-renderer"}),f.jsx(FTe,{nodeTypes:e,onNodeClick:o,onNodeDoubleClick:a,onNodeMouseEnter:s,onNodeMouseMove:c,onNodeMouseLeave:l,onNodeContextMenu:h,nodeClickDistance:ke,onlyRenderVisibleElements:P,noPanClassName:J,noDragClassName:tn,disableKeyboardA11y:Rt,nodeExtent:fn,rfId:ae}),f.jsx("div",{className:"react-flow__viewport-portal"})]})})}IJ.displayName="GraphView";const kDe=m.memo(IJ),YU=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:a,fitView:i,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:h,nodeExtent:u,zIndexMode:p="basic"}={})=>{const y=new Map,g=new Map,k=new Map,x=new Map,v=o??t??[],M=n??e??[],w=h??[0,0],b=u??tf;HQ(k,x,v);const{nodesInitialized:C}=RH(M,y,g,{nodeOrigin:w,nodeExtent:b,zIndexMode:p});let _=[0,0,1];if(i&&r&&a){const S=Sf(y,{filter:j=>!!((j.width||j.initialWidth)&&(j.height||j.initialHeight))}),{x:E,y:P,zoom:N}=OF(S,r,a,c,l,(s==null?void 0:s.padding)??.1);_=[E,P,N]}return{rfId:"1",width:r??0,height:a??0,transform:_,nodes:M,nodesInitialized:C,nodeLookup:y,parentLookup:g,edges:v,edgeLookup:x,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:tf,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:L0.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:w,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:i??!1,fitViewOptions:s,fitViewResolver:null,connection:{...MQ},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:xze,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:wQ,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},vDe=({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:a,fitView:i,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:h,nodeExtent:u,zIndexMode:p})=>DRe((y,g)=>{async function k(){const{nodeLookup:x,panZoom:v,fitViewOptions:M,fitViewResolver:w,width:b,height:C,minZoom:_,maxZoom:S}=g();v&&(await kze({nodes:x,width:b,height:C,panZoom:v,minZoom:_,maxZoom:S},M),w==null||w.resolve(!0),y({fitViewResolver:null}))}return{...YU({nodes:e,edges:t,width:r,height:a,fitView:i,fitViewOptions:s,minZoom:c,maxZoom:l,nodeOrigin:h,nodeExtent:u,defaultNodes:n,defaultEdges:o,zIndexMode:p}),setNodes:x=>{const{nodeLookup:v,parentLookup:M,nodeOrigin:w,elevateNodesOnSelect:b,fitViewQueued:C,zIndexMode:_,nodesSelectionActive:S}=g(),{nodesInitialized:E,hasSelectedNodes:P}=RH(x,v,M,{nodeOrigin:w,nodeExtent:u,elevateNodesOnSelect:b,checkEquality:!0,zIndexMode:_}),N=S&&P;C&&E?(k(),y({nodes:x,nodesInitialized:E,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:N})):y({nodes:x,nodesInitialized:E,nodesSelectionActive:N})},setEdges:x=>{const{connectionLookup:v,edgeLookup:M}=g();HQ(v,M,x),y({edges:x})},setDefaultNodesAndEdges:(x,v)=>{if(x){const{setNodes:M}=g();M(x),y({hasDefaultNodes:!0})}if(v){const{setEdges:M}=g();M(v),y({hasDefaultEdges:!0})}},updateNodeInternals:x=>{const{triggerNodeChanges:v,nodeLookup:M,parentLookup:w,domNode:b,nodeOrigin:C,nodeExtent:_,debug:S,fitViewQueued:E,zIndexMode:P}=g(),{changes:N,updatedInternals:j}=qze(x,M,w,b,C,_,P);j&&(Dze(M,w,{nodeOrigin:C,nodeExtent:_,zIndexMode:P}),E?(k(),y({fitViewQueued:!1,fitViewOptions:void 0})):y({}),(N==null?void 0:N.length)>0&&(S&&console.log("React Flow: trigger node changes",N),v==null||v(N)))},updateNodePositions:(x,v=!1)=>{const M=[];let w=[];const{nodeLookup:b,triggerNodeChanges:C,connection:_,updateConnection:S,onNodesChangeMiddlewareMap:E}=g();for(const[P,N]of x){const j=b.get(P),z=!!(j!=null&&j.expandParent&&(j!=null&&j.parentId)&&(N!=null&&N.position)),U={id:P,type:"position",position:z?{x:Math.max(0,N.position.x),y:Math.max(0,N.position.y)}:N.position,dragging:v};if(j&&_.inProgress&&_.fromNode.id===j.id){const A=Pd(j,_.fromHandle,fe.Left,!0);S({..._,from:A})}z&&j.parentId&&M.push({id:P,parentId:j.parentId,rect:{...N.internals.positionAbsolute,width:N.measured.width??0,height:N.measured.height??0}}),w.push(U)}if(M.length>0){const{parentLookup:P,nodeOrigin:N}=g(),j=WF(M,b,P,N);w.push(...j)}for(const P of E.values())w=P(w);C(w)},triggerNodeChanges:x=>{const{onNodesChange:v,setNodes:M,nodes:w,hasDefaultNodes:b,debug:C}=g();if(x!=null&&x.length){if(b){const _=rJ(x,w);M(_)}C&&console.log("React Flow: trigger node changes",x),v==null||v(x)}},triggerEdgeChanges:x=>{const{onEdgesChange:v,setEdges:M,edges:w,hasDefaultEdges:b,debug:C}=g();if(x!=null&&x.length){if(b){const _=aJ(x,w);M(_)}C&&console.log("React Flow: trigger edge changes",x),v==null||v(x)}},addSelectedNodes:x=>{const{multiSelectionActive:v,edgeLookup:M,nodeLookup:w,triggerNodeChanges:b,triggerEdgeChanges:C}=g();if(v){const _=x.map(S=>pd(S,!0));b(_);return}b(Zu(w,new Set([...x]),!0)),C(Zu(M))},addSelectedEdges:x=>{const{multiSelectionActive:v,edgeLookup:M,nodeLookup:w,triggerNodeChanges:b,triggerEdgeChanges:C}=g();if(v){const _=x.map(S=>pd(S,!0));C(_);return}C(Zu(M,new Set([...x]))),b(Zu(w,new Set,!0))},unselectNodesAndEdges:({nodes:x,edges:v}={})=>{const{edges:M,nodes:w,nodeLookup:b,triggerNodeChanges:C,triggerEdgeChanges:_}=g(),S=x||w,E=v||M,P=[];for(const j of S){if(!j.selected)continue;const z=b.get(j.id);z&&(z.selected=!1),P.push(pd(j.id,!1))}const N=[];for(const j of E)j.selected&&N.push(pd(j.id,!1));C(P),_(N)},setMinZoom:x=>{const{panZoom:v,maxZoom:M}=g();v==null||v.setScaleExtent([x,M]),y({minZoom:x})},setMaxZoom:x=>{const{panZoom:v,minZoom:M}=g();v==null||v.setScaleExtent([M,x]),y({maxZoom:x})},setTranslateExtent:x=>{var v;(v=g().panZoom)==null||v.setTranslateExtent(x),y({translateExtent:x})},resetSelectedElements:()=>{const{edges:x,nodes:v,triggerNodeChanges:M,triggerEdgeChanges:w,elementsSelectable:b}=g();if(!b)return;const C=v.reduce((S,E)=>E.selected?[...S,pd(E.id,!1)]:S,[]),_=x.reduce((S,E)=>E.selected?[...S,pd(E.id,!1)]:S,[]);M(C),w(_)},setNodeExtent:x=>{const{nodes:v,nodeLookup:M,parentLookup:w,nodeOrigin:b,elevateNodesOnSelect:C,nodeExtent:_,zIndexMode:S}=g();x[0][0]===_[0][0]&&x[0][1]===_[0][1]&&x[1][0]===_[1][0]&&x[1][1]===_[1][1]||(RH(v,M,w,{nodeOrigin:b,nodeExtent:x,elevateNodesOnSelect:C,checkEquality:!1,zIndexMode:S}),y({nodeExtent:x}))},panBy:x=>{const{transform:v,width:M,height:w,panZoom:b,translateExtent:C}=g();return Vze({delta:x,panZoom:b,transform:v,translateExtent:C,width:M,height:w})},setCenter:async(x,v,M)=>{const{width:w,height:b,maxZoom:C,panZoom:_}=g();if(!_)return Promise.resolve(!1);const S=typeof(M==null?void 0:M.zoom)<"u"?M.zoom:C;return await _.setViewport({x:w/2-x*S,y:b/2-v*S,zoom:S},{duration:M==null?void 0:M.duration,ease:M==null?void 0:M.ease,interpolate:M==null?void 0:M.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{y({connection:{...MQ}})},updateConnection:x=>{y({connection:x})},reset:()=>y({...YU()})}},Object.is);function xDe({initialNodes:e,initialEdges:t,defaultNodes:n,defaultEdges:o,initialWidth:r,initialHeight:a,initialMinZoom:i,initialMaxZoom:s,initialFitViewOptions:c,fitView:l,nodeOrigin:h,nodeExtent:u,zIndexMode:p,children:y}){const[g]=m.useState(()=>vDe({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,width:r,height:a,fitView:l,minZoom:i,maxZoom:s,fitViewOptions:c,nodeOrigin:h,nodeExtent:u,zIndexMode:p}));return f.jsx(HRe,{value:g,children:f.jsx(sTe,{children:y})})}function wDe({children:e,nodes:t,edges:n,defaultNodes:o,defaultEdges:r,width:a,height:i,fitView:s,fitViewOptions:c,minZoom:l,maxZoom:h,nodeOrigin:u,nodeExtent:p,zIndexMode:y}){return m.useContext(iR)?f.jsx(f.Fragment,{children:e}):f.jsx(xDe,{initialNodes:t,initialEdges:n,defaultNodes:o,defaultEdges:r,initialWidth:a,initialHeight:i,fitView:s,initialFitViewOptions:c,initialMinZoom:l,initialMaxZoom:h,nodeOrigin:u,nodeExtent:p,zIndexMode:y,children:e})}const MDe={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function bDe({nodes:e,edges:t,defaultNodes:n,defaultEdges:o,className:r,nodeTypes:a,edgeTypes:i,onNodeClick:s,onEdgeClick:c,onInit:l,onMove:h,onMoveStart:u,onMoveEnd:p,onConnect:y,onConnectStart:g,onConnectEnd:k,onClickConnectStart:x,onClickConnectEnd:v,onNodeMouseEnter:M,onNodeMouseMove:w,onNodeMouseLeave:b,onNodeContextMenu:C,onNodeDoubleClick:_,onNodeDragStart:S,onNodeDrag:E,onNodeDragStop:P,onNodesDelete:N,onEdgesDelete:j,onDelete:z,onSelectionChange:U,onSelectionDragStart:A,onSelectionDrag:T,onSelectionDragStop:D,onSelectionContextMenu:O,onSelectionStart:I,onSelectionEnd:R,onBeforeDelete:L,connectionMode:q,connectionLineType:H=mi.Bezier,connectionLineStyle:$,connectionLineComponent:X,connectionLineContainerStyle:G,deleteKeyCode:Q="Backspace",selectionKeyCode:oe="Shift",selectionOnDrag:re=!1,selectionMode:te=N0.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:ke=rf()?"Meta":"Control",zoomActivationKeyCode:ve=rf()?"Meta":"Control",snapToGrid:xe,snapGrid:He,onlyRenderVisibleElements:Ze=!1,selectNodesOnDrag:ue,nodesDraggable:Ie,autoPanOnNodeFocus:zt,nodesConnectable:pt,nodesFocusable:tn,nodeOrigin:se=nJ,edgesFocusable:J,edgesReconnectable:Rt,elementsSelectable:fn=!0,defaultViewport:ae=QRe,minZoom:Y=.5,maxZoom:he=2,translateExtent:Ae=tf,preventScrolling:Re=!0,nodeExtent:We,defaultMarkerColor:Vt="#b1b1b7",zoomOnScroll:pn=!0,zoomOnPinch:nn=!0,panOnScroll:ge=!1,panOnScrollSpeed:Le=.5,panOnScrollMode:At=Cd.Free,zoomOnDoubleClick:Tn=!0,panOnDrag:cn=!0,onPaneClick:eu,onPaneMouseEnter:i2,onPaneMouseMove:Qn,onPaneMouseLeave:go,onPaneScroll:xt,onPaneContextMenu:rt,paneClickDistance:tu=1,nodeClickDistance:Xi=0,children:nu,onReconnect:ou,onReconnectStart:ru,onReconnectEnd:au,onEdgeContextMenu:Zi,onEdgeDoubleClick:Yi,onEdgeMouseEnter:Qi,onEdgeMouseMove:Ji,onEdgeMouseLeave:ta,reconnectRadius:na=10,onNodesChange:iu,onEdgesChange:su,noDragClassName:Ro="nodrag",noWheelClassName:es="nowheel",noPanClassName:Da="nopan",fitView:ts,fitViewOptions:ns,connectOnClick:qe,attributionPosition:oa,proOptions:Tt,defaultEdgeOptions:Ha,elevateNodesOnSelect:cu=!0,elevateEdgesOnSelect:ko=!1,disableKeyboardA11y:vo=!1,autoPanOnConnect:ra,autoPanOnNodeDrag:_n,autoPanSpeed:lr,connectionRadius:Cn,isValidConnection:Lt,onError:aa,style:dr,id:ia,nodeDragThreshold:lu,connectionDragThreshold:du,viewport:Nt,onViewportChange:ur,width:Oa,height:uu,colorMode:xo="light",debug:hr,onScroll:fr,ariaLabelConfig:Fa,zIndexMode:qa="basic",...Dn},Bt){const yn=ia||"1",os=nTe(xo),rs=m.useCallback(sa=>{sa.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),fr==null||fr(sa)},[fr]);return f.jsx("div",{"data-testid":"rf__wrapper",...Dn,onScroll:rs,style:{...dr,...MDe},ref:Bt,className:Xt(["react-flow",r,os]),id:ia,role:"application",children:f.jsxs(wDe,{nodes:e,edges:t,width:Oa,height:uu,fitView:ts,fitViewOptions:ns,minZoom:Y,maxZoom:he,nodeOrigin:se,nodeExtent:We,zIndexMode:qa,children:[f.jsx(tTe,{nodes:e,edges:t,defaultNodes:n,defaultEdges:o,onConnect:y,onConnectStart:g,onConnectEnd:k,onClickConnectStart:x,onClickConnectEnd:v,nodesDraggable:Ie,autoPanOnNodeFocus:zt,nodesConnectable:pt,nodesFocusable:tn,edgesFocusable:J,edgesReconnectable:Rt,elementsSelectable:fn,elevateNodesOnSelect:cu,elevateEdgesOnSelect:ko,minZoom:Y,maxZoom:he,nodeExtent:We,onNodesChange:iu,onEdgesChange:su,snapToGrid:xe,snapGrid:He,connectionMode:q,translateExtent:Ae,connectOnClick:qe,defaultEdgeOptions:Ha,fitView:ts,fitViewOptions:ns,onNodesDelete:N,onEdgesDelete:j,onDelete:z,onNodeDragStart:S,onNodeDrag:E,onNodeDragStop:P,onSelectionDrag:T,onSelectionDragStart:A,onSelectionDragStop:D,onMove:h,onMoveStart:u,onMoveEnd:p,noPanClassName:Da,nodeOrigin:se,rfId:yn,autoPanOnConnect:ra,autoPanOnNodeDrag:_n,autoPanSpeed:lr,onError:aa,connectionRadius:Cn,isValidConnection:Lt,selectNodesOnDrag:ue,nodeDragThreshold:lu,connectionDragThreshold:du,onBeforeDelete:L,debug:hr,ariaLabelConfig:Fa,zIndexMode:qa}),f.jsx(kDe,{onInit:l,onNodeClick:s,onEdgeClick:c,onNodeMouseEnter:M,onNodeMouseMove:w,onNodeMouseLeave:b,onNodeContextMenu:C,onNodeDoubleClick:_,nodeTypes:a,edgeTypes:i,connectionLineType:H,connectionLineStyle:$,connectionLineComponent:X,connectionLineContainerStyle:G,selectionKeyCode:oe,selectionOnDrag:re,selectionMode:te,deleteKeyCode:Q,multiSelectionKeyCode:ke,panActivationKeyCode:ce,zoomActivationKeyCode:ve,onlyRenderVisibleElements:Ze,defaultViewport:ae,translateExtent:Ae,minZoom:Y,maxZoom:he,preventScrolling:Re,zoomOnScroll:pn,zoomOnPinch:nn,zoomOnDoubleClick:Tn,panOnScroll:ge,panOnScrollSpeed:Le,panOnScrollMode:At,panOnDrag:cn,onPaneClick:eu,onPaneMouseEnter:i2,onPaneMouseMove:Qn,onPaneMouseLeave:go,onPaneScroll:xt,onPaneContextMenu:rt,paneClickDistance:tu,nodeClickDistance:Xi,onSelectionContextMenu:O,onSelectionStart:I,onSelectionEnd:R,onReconnect:ou,onReconnectStart:ru,onReconnectEnd:au,onEdgeContextMenu:Zi,onEdgeDoubleClick:Yi,onEdgeMouseEnter:Qi,onEdgeMouseMove:Ji,onEdgeMouseLeave:ta,reconnectRadius:na,defaultMarkerColor:Vt,noDragClassName:Ro,noWheelClassName:es,noPanClassName:Da,rfId:yn,disableKeyboardA11y:vo,nodeExtent:We,viewport:Nt,onViewportChange:ur}),f.jsx(YRe,{onSelectionChange:U}),nu,f.jsx(WRe,{proOptions:Tt,position:oa}),f.jsx(URe,{rfId:yn,disableKeyboardA11y:vo})]})})}var _De=iJ(bDe);const CDe=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function SDe({children:e}){const t=De(CDe);return t?qd.createPortal(e,t):null}const LDe=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__viewport-portal")};function AJ({children:e}){const t=De(LDe);return t?qd.createPortal(e,t):null}function EJ(){const e=vt();return m.useCallback(t=>{const{domNode:n,updateNodeInternals:o}=e.getState(),r=Array.isArray(t)?t:[t],a=new Map;r.forEach(i=>{const s=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${i}"]`);s&&a.set(i,{id:i,nodeElement:s,force:!0})}),requestAnimationFrame(()=>o(a,{triggerFitView:!1}))},[])}function QU(e){return De(m.useCallback(n=>n.nodeLookup.get(e),[e]),St)}function NDe({dimensions:e,lineWidth:t,variant:n,className:o}){return f.jsx("path",{strokeWidth:t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`,className:Xt(["react-flow__background-pattern",n,o])})}function IDe({radius:e,className:t}){return f.jsx("circle",{cx:e,cy:e,r:e,className:Xt(["react-flow__background-pattern","dots",t])})}var Ei;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Ei||(Ei={}));const ADe={[Ei.Dots]:1,[Ei.Lines]:1,[Ei.Cross]:6},EDe=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function jJ({id:e,variant:t=Ei.Dots,gap:n=20,size:o,lineWidth:r=1,offset:a=0,color:i,bgColor:s,style:c,className:l,patternClassName:h}){const u=m.useRef(null),{transform:p,patternId:y}=De(EDe,St),g=o||ADe[t],k=t===Ei.Dots,x=t===Ei.Cross,v=Array.isArray(n)?n:[n,n],M=[v[0]*p[2]||1,v[1]*p[2]||1],w=g*p[2],b=Array.isArray(a)?a:[a,a],C=x?[w,w]:M,_=[b[0]*p[2]||1+C[0]/2,b[1]*p[2]||1+C[1]/2],S=`${y}${e||""}`;return f.jsxs("svg",{className:Xt(["react-flow__background",l]),style:{...c,...cR,"--xy-background-color-props":s,"--xy-background-pattern-color-props":i},ref:u,"data-testid":"rf__background",children:[f.jsx("pattern",{id:S,x:p[0]%M[0],y:p[1]%M[1],width:M[0],height:M[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${_[0]},-${_[1]})`,children:k?f.jsx(IDe,{radius:w/2,className:h}):f.jsx(NDe,{dimensions:C,lineWidth:r,variant:t,className:h})}),f.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${S})`})]})}jJ.displayName="Background";const jDe=m.memo(jJ);function $De(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:f.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function PDe(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:f.jsx("path",{d:"M0 0h32v4.2H0z"})})}function zDe(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:f.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function RDe(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function TDe(){return f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:f.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function Yu({children:e,className:t,...n}){return f.jsx("button",{type:"button",className:Xt(["react-flow__controls-button",t]),...n,children:e})}const DDe=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function $J({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:o=!0,fitViewOptions:r,onZoomIn:a,onZoomOut:i,onFitView:s,onInteractiveChange:c,className:l,children:h,position:u="bottom-left",orientation:p="vertical","aria-label":y}){const g=vt(),{isInteractive:k,minZoomReached:x,maxZoomReached:v,ariaLabelConfig:M}=De(DDe,St),{zoomIn:w,zoomOut:b,fitView:C}=sR(),_=()=>{w(),a==null||a()},S=()=>{b(),i==null||i()},E=()=>{C(r),s==null||s()},P=()=>{g.setState({nodesDraggable:!k,nodesConnectable:!k,elementsSelectable:!k}),c==null||c(!k)},N=p==="horizontal"?"horizontal":"vertical";return f.jsxs($0,{className:Xt(["react-flow__controls",N,l]),position:u,style:e,"data-testid":"rf__controls","aria-label":y??M["controls.ariaLabel"],children:[t&&f.jsxs(f.Fragment,{children:[f.jsx(Yu,{onClick:_,className:"react-flow__controls-zoomin",title:M["controls.zoomIn.ariaLabel"],"aria-label":M["controls.zoomIn.ariaLabel"],disabled:v,children:f.jsx($De,{})}),f.jsx(Yu,{onClick:S,className:"react-flow__controls-zoomout",title:M["controls.zoomOut.ariaLabel"],"aria-label":M["controls.zoomOut.ariaLabel"],disabled:x,children:f.jsx(PDe,{})})]}),n&&f.jsx(Yu,{className:"react-flow__controls-fitview",onClick:E,title:M["controls.fitView.ariaLabel"],"aria-label":M["controls.fitView.ariaLabel"],children:f.jsx(zDe,{})}),o&&f.jsx(Yu,{className:"react-flow__controls-interactive",onClick:P,title:M["controls.interactive.ariaLabel"],"aria-label":M["controls.interactive.ariaLabel"],children:k?f.jsx(TDe,{}):f.jsx(RDe,{})}),h]})}$J.displayName="Controls";const HDe=m.memo($J);function ODe({id:e,x:t,y:n,width:o,height:r,style:a,color:i,strokeColor:s,strokeWidth:c,className:l,borderRadius:h,shapeRendering:u,selected:p,onClick:y}){const{background:g,backgroundColor:k}=a||{},x=i||g||k;return f.jsx("rect",{className:Xt(["react-flow__minimap-node",{selected:p},l]),x:t,y:n,rx:h,ry:h,width:o,height:r,style:{fill:x,stroke:s,strokeWidth:c},shapeRendering:u,onClick:y?v=>y(v,e):void 0})}const FDe=m.memo(ODe),qDe=e=>e.nodes.map(t=>t.id),TT=e=>e instanceof Function?e:()=>e;function VDe({nodeStrokeColor:e,nodeColor:t,nodeClassName:n="",nodeBorderRadius:o=5,nodeStrokeWidth:r,nodeComponent:a=FDe,onClick:i}){const s=De(qDe,St),c=TT(t),l=TT(e),h=TT(n),u=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return f.jsx(f.Fragment,{children:s.map(p=>f.jsx(UDe,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:l,nodeClassNameFunc:h,nodeBorderRadius:o,nodeStrokeWidth:r,NodeComponent:a,onClick:i,shapeRendering:u},p))})}function BDe({id:e,nodeColorFunc:t,nodeStrokeColorFunc:n,nodeClassNameFunc:o,nodeBorderRadius:r,nodeStrokeWidth:a,shapeRendering:i,NodeComponent:s,onClick:c}){const{node:l,x:h,y:u,width:p,height:y}=De(g=>{const k=g.nodeLookup.get(e);if(!k)return{node:void 0,x:0,y:0,width:0,height:0};const x=k.internals.userNode,{x:v,y:M}=k.internals.positionAbsolute,{width:w,height:b}=za(x);return{node:x,x:v,y:M,width:w,height:b}},St);return!l||l.hidden||!IQ(l)?null:f.jsx(s,{x:h,y:u,width:p,height:y,style:l.style,selected:!!l.selected,className:o(l),color:t(l),borderRadius:r,strokeColor:n(l),strokeWidth:a,shapeRendering:i,onClick:c,id:l.id})}const UDe=m.memo(BDe);var WDe=m.memo(VDe);const GDe=200,KDe=150,XDe=e=>!e.hidden,ZDe=e=>{const t={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:t,boundingRect:e.nodeLookup.size>0?NQ(Sf(e.nodeLookup,{filter:XDe}),t):t,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},YDe="react-flow__minimap-desc";function PJ({style:e,className:t,nodeStrokeColor:n,nodeColor:o,nodeClassName:r="",nodeBorderRadius:a=5,nodeStrokeWidth:i,nodeComponent:s,bgColor:c,maskColor:l,maskStrokeColor:h,maskStrokeWidth:u,position:p="bottom-right",onClick:y,onNodeClick:g,pannable:k=!1,zoomable:x=!1,ariaLabel:v,inversePan:M,zoomStep:w=1,offsetScale:b=5}){const C=vt(),_=m.useRef(null),{boundingRect:S,viewBB:E,rfId:P,panZoom:N,translateExtent:j,flowWidth:z,flowHeight:U,ariaLabelConfig:A}=De(ZDe,St),T=(e==null?void 0:e.width)??GDe,D=(e==null?void 0:e.height)??KDe,O=S.width/T,I=S.height/D,R=Math.max(O,I),L=R*T,q=R*D,H=b*R,$=S.x-(L-S.width)/2-H,X=S.y-(q-S.height)/2-H,G=L+H*2,Q=q+H*2,oe=`${YDe}-${P}`,re=m.useRef(0),te=m.useRef();re.current=R,m.useEffect(()=>{if(_.current&&N)return te.current=Qze({domNode:_.current,panZoom:N,getTransform:()=>C.getState().transform,getViewScale:()=>re.current}),()=>{var xe;(xe=te.current)==null||xe.destroy()}},[N]),m.useEffect(()=>{var xe;(xe=te.current)==null||xe.update({translateExtent:j,width:z,height:U,inversePan:M,pannable:k,zoomStep:w,zoomable:x})},[k,x,M,w,j,z,U]);const ce=y?xe=>{var ue;const[He,Ze]=((ue=te.current)==null?void 0:ue.pointer(xe))||[0,0];y(xe,{x:He,y:Ze})}:void 0,ke=g?m.useCallback((xe,He)=>{const Ze=C.getState().nodeLookup.get(He).internals.userNode;g(xe,Ze)},[]):void 0,ve=v??A["minimap.ariaLabel"];return f.jsx($0,{position:p,style:{...e,"--xy-minimap-background-color-props":typeof c=="string"?c:void 0,"--xy-minimap-mask-background-color-props":typeof l=="string"?l:void 0,"--xy-minimap-mask-stroke-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-stroke-width-props":typeof u=="number"?u*R:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof n=="string"?n:void 0,"--xy-minimap-node-stroke-width-props":typeof i=="number"?i:void 0},className:Xt(["react-flow__minimap",t]),"data-testid":"rf__minimap",children:f.jsxs("svg",{width:T,height:D,viewBox:`${$} ${X} ${G} ${Q}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":oe,ref:_,onClick:ce,children:[ve&&f.jsx("title",{id:oe,children:ve}),f.jsx(WDe,{onClick:ke,nodeColor:o,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:r,nodeStrokeWidth:i,nodeComponent:s}),f.jsx("path",{className:"react-flow__minimap-mask",d:`M${$-H},${X-H}h${G+H*2}v${Q+H*2}h${-G-H*2}z
8468
8468
  M${E.x},${E.y}h${E.width}v${E.height}h${-E.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}PJ.displayName="MiniMap";const QDe=m.memo(PJ),JDe=e=>t=>e?`${Math.max(1/t.transform[2],1)}`:void 0,eHe={[Ti.Line]:"right",[Ti.Handle]:"bottom-right"};function tHe({nodeId:e,position:t,variant:n=Ti.Handle,className:o,style:r=void 0,children:a,color:i,minWidth:s=10,minHeight:c=10,maxWidth:l=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:u=!1,resizeDirection:p,autoScale:y=!0,shouldResize:g,onResizeStart:k,onResize:x,onResizeEnd:v}){const M=dJ(),w=typeof e=="string"?e:M,b=vt(),C=m.useRef(null),_=n===Ti.Handle,S=De(m.useCallback(JDe(_&&y),[_,y]),St),E=m.useRef(null),P=t??eHe[n];m.useEffect(()=>{if(!(!C.current||!w))return E.current||(E.current=hRe({domNode:C.current,nodeId:w,getStoreItems:()=>{const{nodeLookup:j,transform:z,snapGrid:U,snapToGrid:A,nodeOrigin:T,domNode:D}=b.getState();return{nodeLookup:j,transform:z,snapGrid:U,snapToGrid:A,nodeOrigin:T,paneDomNode:D}},onChange:(j,z)=>{const{triggerNodeChanges:U,nodeLookup:A,parentLookup:T,nodeOrigin:D}=b.getState(),O=[],I={x:j.x,y:j.y},R=A.get(w);if(R&&R.expandParent&&R.parentId){const L=R.origin??D,q=j.width??R.measured.width??0,H=j.height??R.measured.height??0,$={id:R.id,parentId:R.parentId,rect:{width:q,height:H,...AQ({x:j.x??R.position.x,y:j.y??R.position.y},{width:q,height:H},R.parentId,A,L)}},X=WF([$],A,T,D);O.push(...X),I.x=j.x?Math.max(L[0]*q,j.x):void 0,I.y=j.y?Math.max(L[1]*H,j.y):void 0}if(I.x!==void 0&&I.y!==void 0){const L={id:w,type:"position",position:{...I}};O.push(L)}if(j.width!==void 0&&j.height!==void 0){const q={id:w,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:j.width,height:j.height}};O.push(q)}for(const L of z){const q={...L,type:"position"};O.push(q)}U(O)},onEnd:({width:j,height:z})=>{const U={id:w,type:"dimensions",resizing:!1,dimensions:{width:j,height:z}};b.getState().triggerNodeChanges([U])}})),E.current.update({controlPosition:P,boundaries:{minWidth:s,minHeight:c,maxWidth:l,maxHeight:h},keepAspectRatio:u,resizeDirection:p,onResizeStart:k,onResize:x,onResizeEnd:v,shouldResize:g}),()=>{var j;(j=E.current)==null||j.destroy()}},[P,s,c,l,h,u,k,x,v,g]);const N=P.split("-");return f.jsx("div",{className:Xt(["react-flow__resize-control","nodrag",...N,n,o]),ref:C,style:{...r,scale:S,...i&&{[_?"backgroundColor":"borderColor"]:i}},children:a})}const JU=m.memo(tHe),nHe=24,oHe=e=>({type:nf.ArrowClosed,width:18,height:18,...e?{color:e}:{}}),rHe={solid:{},dashed:{strokeDasharray:"6 4"},dotted:{strokeDasharray:"2 4"}},aHe=3,eW=new WeakMap,iHe=(e,t,n=!1)=>{const o=eW.get(e);if(o&&o.isAdjacentToRunning===t&&o.selected===n)return o.edge;const r=e.style?rHe[e.style]:{},a=Ct(e.color,"edge"),i=e.borderSize??2,s=n?Math.max(aHe,i):i,l={...r,...a,...n?{strokeWidth:s,opacity:1}:{strokeWidth:s}},h=e.direction??"forward",u=a.stroke,p=oHe(u),y=h==="backward"||h==="both"?p:void 0,g=h==="forward"||h==="both"?p:void 0,k={id:e.id,source:e.source,target:e.target,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle,type:"editableEdge",label:e.label,animated:t,data:{path:e.path,sourceHandleAutoPicked:e.sourceHandleAutoPicked,targetHandleAutoPicked:e.targetHandleAutoPicked,sourcePin:e.sourcePin,targetPin:e.targetPin,fontSize:e.fontSize},style:l,markerStart:y,markerEnd:g,interactionWidth:nHe};return eW.set(e,{isAdjacentToRunning:t,selected:n,edge:k}),k},sHe=(e,t={})=>{const n=t.setTimer??((l,h)=>globalThis.setTimeout(l,h)),o=t.clearTimer??(l=>{globalThis.clearTimeout(l)});let r=null,a=null;return{schedule:l=>{r!==null&&o(r),a=l,r=n(()=>{r=null;const h=a;a=null,h&&h()},e)},flush:()=>{r!==null&&(o(r),r=null);const l=a;a=null,l&&l()},cancel:()=>{r!==null&&(o(r),r=null),a=null},get pending(){return r!==null}}},zJ="seeflow:detail-panel-width",Eu=380,OH=320,FH=800;function qH(e){return Number.isFinite(e)?e<OH?OH:e>FH?FH:e:Eu}function cHe(){if(typeof window>"u")return Eu;try{const e=window.localStorage.getItem(zJ);if(e===null)return Eu;const t=Number(e);return!Number.isFinite(t)||t<OH||t>FH?Eu:t}catch{return Eu}}function lHe(e){if(!(typeof window>"u"))try{const t=qH(e);window.localStorage.setItem(zJ,String(t))}catch{}}function dHe(e,t,n,o){const r=typeof window>"u"?null:window;if(!r)return;let a=qH(e);const i=c=>{a=qH(e+(t-c.clientX)),n.onWidth(a)},s=()=>{r.removeEventListener("pointermove",i),r.removeEventListener("pointerup",s),r.removeEventListener("pointercancel",s),n.onCommit(a)};r.addEventListener("pointermove",i),r.addEventListener("pointerup",s),r.addEventListener("pointercancel",s)}function uHe(e,t,n){return`${n!==void 0?n.replace(/\/+$/,""):"/api/projects"}/${encodeURIComponent(e)}/files/${encodeURI(t)}`}const hHe={moveNode:"moved",patchNode:"updated",addNode:"added",deleteNode:"deleted",addConnector:"connected",patchConnector:"updated",deleteConnector:"disconnected",addBulk:"created",reorderNode:"reordered"};function Sp(e,t){for(const n of t){const o=e[n];if(typeof o=="string"&&o.trim().length>0)return o}}function fHe(e,t){if(e!==null&&typeof e=="object"){const n=e,o=Sp(n,["name","label","text","title"]);if(o)return o;if(n.patch&&typeof n.patch=="object"){const a=Sp(n.patch,["name","label","text","title"]);if(a)return a}if(n.node&&typeof n.node=="object"){const a=Sp(n.node,["name","label","text","title"]);if(a)return a}const r=Sp(n,["nodeId","connectorId","id"]);if(r)return r}return"Node"}function pHe(e,t,n){return{verb:hHe[e]??e,nodeLabel:fHe(t)}}const JP=(e,t)=>{const n=e.w/2,o=e.h/2,r=e.x+n,a=e.y+o,i=t.x-r,s=t.y-a;if(i===0&&s===0)return{x:r,y:a,side:"right"};const c=Math.abs(i),l=Math.abs(s),h=c===0?Number.POSITIVE_INFINITY:n/c,u=l===0?Number.POSITIVE_INFINITY:o/l,p=Math.min(h,u),y=r+i*p,g=a+s*p,k=c*o>=l*n?i>=0?"right":"left":s>=0?"bottom":"top";return{x:y,y:g,side:k}},VH=(e,t)=>{const n=Math.max(0,Math.min(e.w,t.x-e.x)),o=Math.max(0,Math.min(e.h,t.y-e.y)),r=n,a=e.w-n,i=o,s=e.h-o,c=Math.min(r,a,i,s),l=e.h===0?0:o/e.h,h=e.w===0?0:n/e.w;return c===r?{side:"left",t:l}:c===a?{side:"right",t:l}:c===i?{side:"top",t:h}:{side:"bottom",t:h}},ez=(e,t)=>{const n=Math.min(1,Math.max(0,t.t));let o,r;switch(t.side){case"top":o=e.x+n*e.w,r=e.y;break;case"bottom":o=e.x+n*e.w,r=e.y+e.h;break;case"left":o=e.x,r=e.y+n*e.h;break;case"right":o=e.x+e.w,r=e.y+n*e.h;break}return{x:o,y:r,side:t.side}},yHe=(e,t)=>{const n=o=>Math.min(1,Math.max(0,o));switch(t.side){case"top":case"bottom":return{side:t.side,t:e.w===0?0:n((t.x-e.x)/e.w)};case"left":case"right":return{side:t.side,t:e.h===0?0:n((t.y-e.y)/e.h)}}},mHe=(e,t)=>{const n=(e==null?void 0:e.fallback)??{x:0,y:0,side:"right"},o=(t==null?void 0:t.fallback)??{x:0,y:0,side:"left"};if(!e||!t)return{source:n,target:o};const r={x:e.box.x+e.box.w/2,y:e.box.y+e.box.h/2},a={x:t.box.x+t.box.w/2,y:t.box.y+t.box.h/2},i=e.pin?ez(e.box,e.pin):e.autoPicked===!1?e.fallback:JP(e.box,a),s=t.pin?ez(t.box,t.pin):t.autoPicked===!1?t.fallback:JP(t.box,r);return{source:i,target:s}};function vi({initialValue:e,onCommit:t,onExit:n,multiline:o=!1,commitMode:r="enter-commits",required:a=!1,field:i,className:s,style:c,placeholder:l}){const h=o||r==="blur-only",u=m.useRef(null),[p,y]=m.useState(!1),[g,k]=m.useState(e.length===0),x=m.useRef(sHe(400)),v=m.useRef(e),M=m.useRef(!1);m.useEffect(()=>{const j=u.current;if(!j)return;j.textContent=e,j.focus();const z=window.getSelection();if(z){const A=document.createRange();A.selectNodeContents(j),z.removeAllRanges(),z.addRange(A)}const U=x.current;return()=>{U.flush()}},[]);const w=()=>{const j=u.current;return j?h?j.innerText:j.textContent??"":""},b=j=>{x.current.cancel(),j!==v.current&&(v.current=j,t(j))},C=()=>{const j=w();if(k(j.length===0),a&&j.trim().length===0){x.current.cancel();return}x.current.schedule(()=>b(j))},_=()=>{x.current.cancel();const j=w();if(a&&j.trim().length===0){const z=u.current;z&&(z.textContent=e),y(!0),setTimeout(()=>y(!1),320),n();return}b(j),n()},S=()=>{x.current.cancel();const j=u.current;j&&(j.textContent=e),n()},E=j=>{if(j.stopPropagation(),j.nativeEvent.stopPropagation(),j.key==="Enter"){if(r==="blur-only"||o&&j.shiftKey){j.preventDefault(),document.execCommand("insertText",!1,`
8469
- `);return}j.preventDefault(),M.current=!0,_();return}j.key==="Escape"&&(j.preventDefault(),M.current=!0,S())},P=j=>{j.preventDefault();const z=j.clipboardData.getData("text/plain");document.execCommand("insertText",!1,z)},N=()=>{if(M.current){M.current=!1;return}_()};return f.jsx("div",{ref:u,"data-testid":"inline-edit-input","data-field":i,"data-placeholder":l,role:"textbox",tabIndex:0,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,onInput:C,onKeyDown:E,onPaste:P,onBlur:N,onMouseDown:j=>j.stopPropagation(),onClick:j=>j.stopPropagation(),onDoubleClick:j=>j.stopPropagation(),style:c,className:ne("nodrag nopan nowheel sf:block sf:w-full sf:bg-transparent sf:p-0 sf:text-inherit sf:outline-none","sf:whitespace-pre-wrap sf:wrap-break-word",g&&l?"inline-edit-empty":"",p?"inline-edit-shake":"",s)})}const RJ=8,tW=12,nW={height:`${RJ}px`,borderColor:"transparent"},oW={width:`${RJ}px`,borderColor:"transparent"},gHe={width:`${tW}px`,height:`${tW}px`,background:"transparent",border:"none"},kHe={width:"calc(10px / var(--rf-zoom, 1))",height:"calc(10px / var(--rf-zoom, 1))",background:"hsl(var(--background))",border:"calc(1px / var(--rf-zoom, 1)) solid hsl(var(--primary) / 0.6)",borderRadius:"calc(2px / var(--rf-zoom, 1))",zIndex:1},vHe=[{position:"top",style:nW},{position:"bottom",style:nW},{position:"left",style:oW},{position:"right",style:oW}],xHe=["top-left","top-right","bottom-left","bottom-right"],rW={pointerEvents:"none",cursor:"default"};function Vd({visible:e,minWidth:t=80,minHeight:n=40,onResizeStart:o,onResize:r,onResizeEnd:a,cornerVariant:i="invisible"}){const s=i==="visible"?kHe:gHe,c=h=>e?h:{...h,...rW},l=e?s:{...s,opacity:0,...rW};return f.jsxs(f.Fragment,{children:[vHe.map(({position:h,style:u})=>f.jsx(JU,{position:h,variant:Ti.Line,minWidth:t,minHeight:n,style:c(u),onResizeStart:o,onResize:r,onResizeEnd:a,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h)),xHe.map(h=>f.jsx(JU,{position:h,variant:Ti.Handle,minWidth:t,minHeight:n,style:l,autoScale:!1,onResizeStart:o,onResize:r,onResizeEnd:a,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h))]})}function Bd(e){const{onResize:t,onResizeEnd:n,onResizeFinal:o,setResizing:r}=e,[a,i]=m.useState(!1),s=m.useRef(null),c=m.useRef(t),l=m.useRef(n),h=m.useRef(o),u=m.useRef(r);m.useEffect(()=>{c.current=t},[t]),m.useEffect(()=>{l.current=n},[n]),m.useEffect(()=>{h.current=o},[o]),m.useEffect(()=>{u.current=r},[r]);const p=m.useCallback((k,x)=>{var v;i(!0),(v=u.current)==null||v.call(u,!0),s.current=x?{x:x.x,y:x.y,width:x.width,height:x.height}:null},[]),y=m.useCallback((k,x)=>{var v;(v=c.current)==null||v.call(c,{x:x.x,y:x.y,width:x.width,height:x.height})},[]),g=m.useCallback((k,x)=>{var M,w,b,C;i(!1),(M=u.current)==null||M.call(u,!1);const v=s.current;s.current=null,!(v&&v.width===x.width&&v.height===x.height)&&((w=c.current)==null||w.call(c,{x:x.x,y:x.y,width:x.width,height:x.height}),(b=l.current)==null||b.call(l,{x:x.x,y:x.y,width:x.width,height:x.height}),v&&((C=h.current)==null||C.call(h,{x:x.x,y:x.y,width:x.width,height:x.height},v)))},[]);return{isResizing:a,onResizeStart:p,onResizeEvent:y,onResizeEnd:g}}const P0={width:48,height:48},wHe=24,MHe=24,Lp="sf:opacity-0 sf:transition-opacity";function bHe(e){return Ct(e,"text").color??"currentColor"}function _He({id:e,data:t,selected:n,isConnectable:o}){const{onResizeStart:r,onResizeEvent:a,onResizeEnd:i}=Bd({onResize:x=>{var v;return(v=t.onResize)==null?void 0:v.call(t,e,x)},onResizeEnd:x=>{var v;return(v=t.onResizeEnd)==null?void 0:v.call(t,e,x)},setResizing:t.setResizing}),s=t.width!==void 0||t.height!==void 0,c=!!t.onNameChange,[l,h]=m.useState(!1),{studioBaseUrl:u}=m.useContext(AF),p=bHe(t.color),y=t.strokeWidth??2,g={...s?{}:{width:P0.width,height:P0.height}},k=x=>{!c||l||(x.stopPropagation(),h(!0))};return f.jsxs("div",{className:ne("sf:group sf:relative",s?"sf:h-full sf:w-full":""),style:g,"data-testid":"icon-node","data-node-type":"icon",onDoubleClick:k,children:[f.jsx(Vd,{visible:!!n&&!!t.onResize&&!l,cornerVariant:"visible",minWidth:wHe,minHeight:MHe,onResizeStart:r,onResize:a,onResizeEnd:i}),f.jsx(st,{type:"target",position:fe.Top,id:"t",isConnectable:o,className:ne(Lp,n&&"sf:opacity-100!")}),f.jsx(st,{type:"target",position:fe.Left,id:"l",isConnectable:o,className:ne(Lp,n&&"sf:opacity-100!")}),f.jsx(zY,{iconId:t.icon,studioBaseUrl:u,color:p,strokeWidth:y,absoluteStrokeWidth:!0,ariaLabel:t.alt,className:"sf:block sf:h-full sf:w-full sf:pointer-events-none sf:select-none"}),l&&c?f.jsx("div",{className:"sf:absolute sf:left-0 sf:right-0 sf:top-full sf:mt-1 sf:text-center sf:text-xs sf:text-muted-foreground",children:f.jsx(vi,{initialValue:t.name??"",field:"icon-node-label",onCommit:x=>{var v;return(v=t.onNameChange)==null?void 0:v.call(t,e,x)},onExit:()=>h(!1),placeholder:"Label"})}):t.name?f.jsx("span",{"data-testid":"icon-node-label",className:"sf:pointer-events-none sf:absolute sf:left-0 sf:right-0 sf:top-full sf:mt-1 sf:truncate sf:text-center sf:text-xs sf:text-muted-foreground sf:select-none",children:t.name}):null,f.jsx(st,{type:"source",position:fe.Right,id:"r",isConnectable:o,className:ne(Lp,n&&"sf:opacity-100!")}),f.jsx(st,{type:"source",position:fe.Bottom,id:"b",isConnectable:o,className:ne(Lp,n&&"sf:opacity-100!")})]})}function CHe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const SHe=m.memo(_He,CHe);function LHe(e,t){const n=e.screenToFlowPosition({x:t.width/2,y:t.height/2});return{x:n.x-P0.width/2,y:n.y-P0.height/2}}const TJ="seeflow:icon-recents",NHe=16;function DJ(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(TJ);if(e===null)return[];const t=JSON.parse(e);return Array.isArray(t)?t.every(n=>typeof n=="string")?t:[]:[]}catch{return[]}}function IHe(e){if(!(typeof window>"u"))try{const n=DJ().filter(r=>r!==e),o=[e,...n].slice(0,NHe);window.localStorage.setItem(TJ,JSON.stringify(o))}catch{}}const AHe=typeof navigator<"u"&&typeof navigator.platform=="string"&&navigator.platform.toLowerCase().includes("mac"),EHe=e=>e.length===1?e.toUpperCase():e==="Escape"?"Esc":e,Dt=(e,t=AHe)=>{const n=EHe(e.key);if(t){let r="";return e.meta&&(r+="⌘"),e.alt&&(r+="⌥"),e.shift&&(r+="⇧"),`${r}${n}`}const o=[];return e.meta&&o.push("Ctrl"),e.shift&&o.push("Shift"),e.alt&&o.push("Alt"),o.push(n),o.join("+")},KF=[{id:"tool.select",label:"Select tool",description:"Switch to the selection tool",category:"Tools",shortcut:Dt({key:"V"})},{id:"tool.hand",label:"Hand tool",description:"Pan the canvas; node interaction is suspended while armed",category:"Tools",shortcut:Dt({key:"H"})},{id:"tool.rectangle",label:"Rectangle",description:"Draw rectangle nodes",category:"Tools",shortcut:Dt({key:"R"})},{id:"tool.ellipse",label:"Ellipse",description:"Draw ellipse nodes",category:"Tools",shortcut:Dt({key:"O"})},{id:"tool.text",label:"Text",description:"Add a text node",category:"Tools",shortcut:Dt({key:"T"})},{id:"tool.sticky",label:"Sticky note",description:"Add a sticky note",category:"Tools",shortcut:Dt({key:"S"})},{id:"tool.database",label:"Database",description:"Add a database node",category:"Tools",shortcut:Dt({key:"D"})},{id:"tool.server",label:"Server",description:"Add a server node",category:"Tools"},{id:"tool.user",label:"User",description:"Add a user node",category:"Tools"},{id:"tool.queue",label:"Queue",description:"Add a queue node",category:"Tools"},{id:"tool.cloud",label:"Cloud",description:"Add a cloud node",category:"Tools"},{id:"tool.diamond",label:"Diamond",description:"Add a diamond node (decision / gateway)",category:"Tools"},{id:"tool.hexagon",label:"Hexagon",description:"Add a hexagon node (microservice)",category:"Tools"},{id:"tool.linkflow",label:"Link node",description:"Add a link node and pick a target flow",category:"Tools"},{id:"edit.undo",label:"Undo",category:"Edit",shortcut:Dt({meta:!0,key:"Z"}),enabled:e=>e.canUndo},{id:"edit.redo",label:"Redo",category:"Edit",shortcut:Dt({meta:!0,shift:!0,key:"Z"}),enabled:e=>e.canRedo},{id:"edit.copy",label:"Copy",category:"Edit",shortcut:Dt({meta:!0,key:"C"}),enabled:e=>e.hasSelection},{id:"edit.paste",label:"Paste",category:"Edit",shortcut:Dt({meta:!0,key:"V"}),enabled:e=>e.hasClipboard},{id:"edit.duplicate",label:"Duplicate",category:"Edit",shortcut:Dt({meta:!0,key:"D"}),enabled:e=>e.hasSelection},{id:"edit.delete",label:"Delete",category:"Edit",shortcut:Dt({key:"Delete"}),enabled:e=>e.hasSelection},{id:"edit.selectAll",label:"Select all",category:"Edit",shortcut:Dt({meta:!0,key:"A"})},{id:"view.fit",label:"Fit view",description:"Fit everything in the viewport",category:"View",shortcut:Dt({meta:!0,key:"0"})},{id:"view.zoomIn",label:"Zoom in",category:"View",shortcut:Dt({meta:!0,key:"="})},{id:"view.zoomOut",label:"Zoom out",category:"View",shortcut:Dt({meta:!0,key:"-"})},{id:"view.zoom100",label:"Zoom to 100%",category:"View",shortcut:Dt({key:"1"})},{id:"view.zoomToSelection",label:"Zoom to selection",category:"View",shortcut:Dt({key:"F"}),enabled:e=>e.hasSelection},{id:"layout.tidy",label:"Tidy layout",description:"Auto-layout the canvas or current selection",category:"Layout",shortcut:Dt({meta:!0,shift:!0,key:"L"})},{id:"selection.deselect",label:"Deselect",description:"Clear selection and exit draw mode",category:"Selection",shortcut:Dt({key:"Escape"})},{id:"help.commandPalette",label:"Open command palette",category:"Help",shortcut:Dt({meta:!0,key:"P"})},{id:"export.pdf",label:"Export to PDF",description:"Download the current canvas as a PDF",category:"File",enabled:e=>e.canExportDemo},{id:"export.png",label:"Export as image",description:"Download the current canvas as a PNG",category:"File",enabled:e=>e.canExportDemo}],DT=e=>{const t=KF.find(n=>n.id===e);return t?t.shortcut?`${t.label} (${t.shortcut})`:t.label:""},jHe=1,$He=10,PHe=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return null;const t=e.shiftKey?$He:jHe;switch(e.key){case"ArrowLeft":return{dx:-t,dy:0};case"ArrowRight":return{dx:t,dy:0};case"ArrowUp":return{dx:0,dy:-t};case"ArrowDown":return{dx:0,dy:t};default:return null}},zHe=e=>{if(!(e.metaKey||e.ctrlKey)||e.altKey)return null;switch(e.key){case"0":return"fit";case"=":case"+":return"in";case"-":case"_":return"out";default:return null}},RHe=(e,t,n)=>{if(t.length===0)return[];const o=new Map(n.map(a=>[a.id,a])),r=[];for(const a of t){const i=o.get(a);i&&r.push({id:a,position:{x:i.position.x+e.dx,y:i.position.y+e.dy}})}return r},THe=({event:e,isEditableActive:t,hasNodes:n,hasConnectors:o,selectedIds:r,hasClipboard:a})=>{if(!(e.metaKey||e.ctrlKey))return{type:"noop"};if(e.shiftKey||e.altKey)return{type:"noop"};const i=e.key.toLowerCase();return i!=="a"&&i!=="c"&&i!=="v"&&i!=="d"?{type:"noop"}:t?{type:"noop"}:i==="a"?!n&&!o?{type:"noop"}:{type:"selectAll"}:i==="c"?r.length===0?{type:"noop"}:{type:"copy",ids:r}:i==="d"?r.length===0?{type:"noop"}:{type:"duplicate",ids:r}:a?{type:"paste"}:{type:"noop"}},DHe=(e,t)=>{if(t.isEditableActive||!(e.metaKey||e.ctrlKey)||e.altKey)return null;const n=e.key.toLowerCase();return n==="z"?e.shiftKey?"redo":"undo":n==="y"&&!e.shiftKey?"redo":null},HHe=e=>{if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return null;switch(e.key.toLowerCase()){case"v":return"select";case"h":return"hand";case"r":return"rectangle";case"o":return"ellipse";case"t":return"text";case"s":return"sticky";case"d":return"database";default:return null}},ri="seeflow",HJ=e=>`${e}:last-used-style:v1`,HT=()=>({node:{},connector:{}}),OT=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),XF=e=>{var t;try{const n=(t=globalThis.localStorage)==null?void 0:t.getItem(HJ(e));if(!n)return HT();const o=JSON.parse(n);if(!OT(o))return HT();const r=OT(o.node)?o.node:{},a=OT(o.connector)?o.connector:{};return{node:r,connector:a}}catch{return HT()}},OJ=(e,t)=>{var n;try{(n=globalThis.localStorage)==null||n.setItem(HJ(e),JSON.stringify(t))}catch{}},T2=e=>XF(e),aW=(e,t)=>{const{alt:n,...o}=t,r={...o};r.borderSize!==void 0&&r.borderWidth===void 0?r.borderWidth=r.borderSize:r.borderWidth!==void 0&&r.borderSize===void 0&&(r.borderSize=r.borderWidth);const a=XF(e);OJ(e,{...a,node:{...a.node,...r}})},OHe=(e,t)=>{const n=XF(e);OJ(e,{...n,connector:{...n.connector,...t}})},ZF=1,iW=17,BH=(e,t)=>{if(!e)return{};const n={};for(const o of t)e[o]!==void 0&&(n[o]=e[o]);return n},FHe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","cornerRadius","shadow"],qHe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","shadow"],VHe=["fontSize"],BHe=["borderColor","borderWidth","borderStyle","shadow"];function sW(e,t,n){if(e==="text")return{width:t.width,height:t.height,fontSize:iW,...BH(n,VHe)};const o=e==="ellipse"?qHe:FHe;return{width:t.width,height:t.height,borderSize:ZF,fontSize:iW,...BH(n,o)}}function UHe(e,t,n){return{path:e,width:t.width,height:t.height,borderWidth:ZF,...BH(n,BHe)}}const kn=async(e,t,n,o,r)=>{const a={method:t},i={...o??{}};r!==void 0&&(i["content-type"]="application/json",a.body=JSON.stringify(r)),Object.keys(i).length>0&&(a.headers=i);const s=await e(n,a);if(!s.ok){let c=null;try{c=await s.json()}catch{}throw new Error((c==null?void 0:c.error)??`${t} ${n} → ${s.status}`)}return await s.json()},WHe=e=>{const{baseUrl:t,project:n,flow:o}=e,r=e.fetch??globalThis.fetch.bind(globalThis),a=e.EventSource??globalThis.EventSource,i=e.headers,s=`${t}/api/projects/${encodeURIComponent(n)}`,c=`${s}/flows/${encodeURIComponent(o)}`,l=`${t}/api/icons`;return{async createNode(u){const p=await kn(r,"POST",`${c}/nodes`,i,u);return{id:p.id,node:p.node}},async updateNode(u,p){await kn(r,"PATCH",`${c}/nodes/${u}`,i,p)},async updateNodePosition(u,p){return await kn(r,"PATCH",`${c}/nodes/${u}/position`,i,p)},async deleteNode(u){await kn(r,"DELETE",`${c}/nodes/${u}`,i)},async reorderNode(u,p){await kn(r,"PATCH",`${c}/nodes/${u}/order`,i,p)},async createConnector(u){return{id:(await kn(r,"POST",`${c}/connectors`,i,u)).id}},async updateConnector(u,p){await kn(r,"PATCH",`${c}/connectors/${u}`,i,p)},async deleteConnector(u){await kn(r,"DELETE",`${c}/connectors/${u}`,i)},async uploadImage(u,p,y){const g=new FormData;g.append("file",p),g.append("filename",y);const k=`${c}/nodes/${encodeURIComponent(u)}/files/upload`,x={method:"POST",body:g};i&&(x.headers={...i});const v=await r(k,x);if(!v.ok){let M=null;try{M=await v.json()}catch{}throw new Error((M==null?void 0:M.error)??`POST ${k} → ${v.status}`)}return await v.json()},async playAction(u){return await kn(r,"POST",`${c}/play/${u}`,i,{})},async openFile(u){await kn(r,"POST",`${s}/files/open`,i,{path:u})},async revealFile(u){await kn(r,"POST",`${s}/files/reveal`,i,{path:u})},async computeLayout(u,p){const y=await kn(r,"POST",`${t}/api/layout`,i,{nodes:u,edges:p});return{nodes:y.nodes,connectors:y.connectors}},icons:{async listPacks(){return(await kn(r,"GET",`${l}/packs`,i)).packs},async install(u,p){return{jobId:(await kn(r,"POST",`${l}/install`,i,{vendor:u,acceptTerms:p.acceptTerms??!1})).jobId}},subscribeJob(u,p){const y=`${l}/jobs/${encodeURIComponent(u)}/events`,g=new a(y);return g.onmessage=k=>{try{p(JSON.parse(k.data))}catch(x){console.error("icons.subscribeJob: failed to parse SSE payload",x)}},()=>g.close()},async remove(u){await kn(r,"DELETE",`${l}/packs/${encodeURIComponent(u)}`,i)},async getLicense(u){const p=await kn(r,"GET",`${l}/licenses/${encodeURIComponent(u)}`,i);return{summary:p.summary,url:p.url,requiresAcceptance:p.requiresAcceptance}}}}},GHe=500,KHe=500,XHe=2e3,ZHe=(e,t)=>{if(!e&&!t)return;if(!e)return{...t};if(!t)return{...e};const n={...t};for(const[o,r]of Object.entries(e))n[o]=r;return n},cW=(e,t,n)=>{const o=Date.now(),r=GHe,a=KHe,{stack:i,cursor:s}=e;if(t.coalesceKey&&s>0){const h=i[s-1];if(h&&h.coalesceKey===t.coalesceKey&&o-h.capturedAt<=a){const u=i.slice(0,s);return u[s-1]={...h,do:t.do,capturedAt:o,beforeFields:ZHe(h.beforeFields,t.beforeFields)},{stack:u,cursor:s}}}const c=i.slice(0,s);c.push({...t,capturedAt:o});let l=s+1;for(;c.length>r;)c.shift(),l-=1;return l<0&&(l=0),{stack:c,cursor:l}},YHe=e=>e.cursor===0?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor-1},entry:e.stack[e.cursor-1]},QHe=e=>e.cursor===e.stack.length?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor+1},entry:e.stack[e.cursor]},FJ=()=>({stack:[],cursor:0}),lW=e=>e.cursor===e.stack.length?e:{stack:e.stack.slice(0,e.cursor),cursor:e.cursor},JHe=(e,t,n=Date.now(),o=XHe)=>n-t>o?FJ():e,eOe=new Set(["borderColor","backgroundColor","borderSize","borderWidth","borderStyle","fontSize","textAlign","cornerRadius","shadow","color","strokeWidth","target"]);function tOe(e,t){let n={stack:[],cursor:0},o=0;const r=new Set;let a=null;const i=()=>({canUndo:n.cursor>0,canRedo:n.cursor<n.stack.length}),s=()=>{const k=i();for(const x of r)x(k)},c=()=>{if(a){o=Date.now();return}const k=lW(n);o=Date.now(),k!==n&&(n=k,s())},l=k=>{if(a){a.ops.push({redo:k.do,undo:k.undo});return}n=cW(n,{...k,capturedAt:Date.now()}),s()},h={createNode:async k=>{c();const x=await e.createNode(k);return l({do:async()=>{await e.createNode({...k,id:x.id})},undo:async()=>{await e.deleteNode(x.id)}}),x},updateNode:async(k,x)=>{c();const{nodes:v}=t(),M=v.find(_=>_.id===k);if(!M){await e.updateNode(k,x);return}const w={},b=M.data??{};for(const _ of Object.keys(x))if(_==="position")w[_]=M.position;else if(_==="type")w[_]=M.type;else{const S=b[_];w[_]=S===void 0&&eOe.has(_)?null:S}await e.updateNode(k,x);const C=Object.keys(x).sort().join(",");l({do:async()=>{await e.updateNode(k,x)},undo:async()=>{await e.updateNode(k,w)},coalesceKey:`update:${k}:${C}`,beforeFields:w})},updateNodePosition:async(k,x)=>{c();const{nodes:v}=t(),M=v.find(C=>C.id===k),w=M==null?void 0:M.position,b=await e.updateNodePosition(k,x);return w&&l({do:async()=>{await e.updateNodePosition(k,x)},undo:async()=>{await e.updateNodePosition(k,w)},coalesceKey:`pos:${k}`}),b},deleteNode:async k=>{c();const{nodes:x,connectors:v}=t(),M=x.find(b=>b.id===k);if(!M){await e.deleteNode(k);return}const w=v.filter(b=>b.source===k||b.target===k);await e.deleteNode(k),l({do:async()=>{await e.deleteNode(k)},undo:async()=>{await e.createNode({id:M.id,type:M.type,position:M.position,data:M.data??{}});for(const b of w)try{await e.createConnector({id:b.id,source:b.source,target:b.target,sourceHandle:b.sourceHandle,targetHandle:b.targetHandle,sourceHandleAutoPicked:b.sourceHandleAutoPicked,targetHandleAutoPicked:b.targetHandleAutoPicked,sourcePin:b.sourcePin,targetPin:b.targetPin,label:b.label,style:b.style,color:b.color,direction:b.direction,eventName:b.eventName,queueName:b.queueName,method:b.method,url:b.url})}catch(C){console.warn(`[seeflow/canvas] failed to restore connector ${b.id} during deleteNode undo:`,C)}}})},reorderNode:async(k,x)=>{c();const{nodes:v}=t(),M=v.findIndex(w=>w.id===k);if(M<0){await e.reorderNode(k,x);return}await e.reorderNode(k,x),l({do:async()=>{await e.reorderNode(k,x)},undo:async()=>{await e.reorderNode(k,{op:"toIndex",index:M})}})},createConnector:async k=>{c();const x=await e.createConnector(k);return l({do:async()=>{await e.createConnector({...k,id:x.id})},undo:async()=>{await e.deleteConnector(x.id)}}),x},updateConnector:async(k,x)=>{c();const{connectors:v}=t(),M=v.find(_=>_.id===k);if(!M){await e.updateConnector(k,x);return}const w={},b=M;for(const _ of Object.keys(x))w[_]=b[_];await e.updateConnector(k,x);const C=Object.keys(x).sort().join(",");l({do:async()=>{await e.updateConnector(k,x)},undo:async()=>{await e.updateConnector(k,w)},coalesceKey:`update:conn:${k}:${C}`,beforeFields:w})},deleteConnector:async k=>{c();const{connectors:x}=t(),v=x.find(M=>M.id===k);if(!v){await e.deleteConnector(k);return}await e.deleteConnector(k),l({do:async()=>{await e.deleteConnector(k)},undo:async()=>{await e.createConnector({id:v.id,source:v.source,target:v.target,sourceHandle:v.sourceHandle,targetHandle:v.targetHandle,sourceHandleAutoPicked:v.sourceHandleAutoPicked,targetHandleAutoPicked:v.targetHandleAutoPicked,sourcePin:v.sourcePin,targetPin:v.targetPin,label:v.label,style:v.style,color:v.color,direction:v.direction,eventName:v.eventName,queueName:v.queueName,method:v.method,url:v.url})}})},uploadImage:(k,x,v)=>e.uploadImage(k,x,v),...e.playAction?{playAction:k=>e.playAction(k)}:{},...e.openFile?{openFile:k=>e.openFile(k)}:{},...e.revealFile?{revealFile:k=>e.revealFile(k)}:{},...e.computeLayout?{computeLayout:(k,x)=>e.computeLayout(k,x)}:{},...e.icons?{icons:e.icons}:{}};let u=Promise.resolve();const p=async()=>{const k=YHe(n);k.entry&&(n=k.state,s(),await k.entry.undo())},y=async()=>{const k=QHe(n);k.entry&&(n=k.state,s(),await k.entry.do())};return{adapter:h,history:{get canUndo(){return n.cursor>0},get canRedo(){return n.cursor<n.stack.length},undo:()=>{o=Date.now();const k=u.then(p);return u=k.then(()=>{},()=>{}),k},redo:()=>{o=Date.now();const k=u.then(y);return u=k.then(()=>{},()=>{}),k},clear:()=>{n=FJ(),s()},markExternalChange:()=>{const k=JHe(n,o);k!==n&&(n=k,s())},batch:async(k,x,v)=>{if(a)return x();const M=lW(n);o=Date.now(),M!==n&&(n=M,s());const w={name:k,ops:[]};a=w;try{const b=await x();if(a=null,w.ops.length>0){const C=w.ops.slice();n=cW(n,{do:async()=>{for(const _ of C)await _.redo()},undo:async()=>{for(let _=C.length-1;_>=0;_--)await C[_].undo()},coalesceKey:v==null?void 0:v.coalesceKey,capturedAt:Date.now()}),s()}return b}catch(b){a=null;for(let C=w.ops.length-1;C>=0;C--)try{await w.ops[C].undo()}catch(_){console.warn(`[seeflow/canvas] batch '${k}' rollback inverse rejected:`,_)}throw b}},subscribe:k=>(r.add(k),k(i()),()=>{r.delete(k)})}}}function qJ(e,t,n){let o=null,r=!1;const a=new ResizeObserver(()=>{r||(o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,!r&&n()},t))});return a.observe(e),()=>{r||(r=!0,o!==null&&(clearTimeout(o),o=null),a.disconnect())}}var it;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{const a={};for(const i of r)a[i]=i;return a},e.getValidEnumValues=r=>{const a=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),i={};for(const s of a)i[s]=r[s];return e.objectValues(i)},e.objectValues=r=>e.objectKeys(r).map(function(a){return r[a]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const a=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&a.push(i);return a},e.find=(r,a)=>{for(const i of r)if(a(i))return i},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function o(r,a=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}e.joinValues=o,e.jsonStringifyReplacer=(r,a)=>typeof a=="bigint"?a.toString():a})(it||(it={}));var dW;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(dW||(dW={}));const Ce=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fi=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},me=it.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ea extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},o={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)o._errors.push(n(i));else{let s=o,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(i))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(this),o}static assert(t){if(!(t instanceof Ea))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},o=[];for(const r of this.issues)if(r.path.length>0){const a=r.path[0];n[a]=n[a]||[],n[a].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ea.create=e=>new Ea(e);const UH=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,it.assertNever(e)}return{message:n}};let nOe=UH;function oOe(){return nOe}const rOe=e=>{const{data:t,path:n,errorMaps:o,issueData:r}=e,a=[...n,...r.path||[]],i={...r,path:a};if(r.message!==void 0)return{...r,path:a,message:r.message};let s="";const c=o.filter(l=>!!l).slice().reverse();for(const l of c)s=l(i,{data:t,defaultError:s}).message;return{...r,path:a,message:s}};function Me(e,t){const n=oOe(),o=rOe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===UH?void 0:UH].filter(r=>!!r)});e.common.issues.push(o)}class jn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const o=[];for(const r of n){if(r.status==="aborted")return Fe;r.status==="dirty"&&t.dirty(),o.push(r.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,n){const o=[];for(const r of n){const a=await r.key,i=await r.value;o.push({key:a,value:i})}return jn.mergeObjectSync(t,o)}static mergeObjectSync(t,n){const o={};for(const r of n){const{key:a,value:i}=r;if(a.status==="aborted"||i.status==="aborted")return Fe;a.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(o[a.value]=i.value)}return{status:t.value,value:o}}}const Fe=Object.freeze({status:"aborted"}),D2=e=>({status:"dirty",value:e}),zo=e=>({status:"valid",value:e}),uW=e=>e.status==="aborted",hW=e=>e.status==="dirty",z0=e=>e.status==="valid",tz=e=>typeof Promise<"u"&&e instanceof Promise;var Ne;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ne||(Ne={}));class Xr{constructor(t,n,o,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=o,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const fW=(e,t)=>{if(z0(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ea(e.common.issues);return this._error=n,this._error}}};function Xe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:o,description:r}=e;if(t&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(i,s)=>{const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}class et{get description(){return this._def.description}_getType(t){return fi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new jn,ctx:{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tz(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const o=this.safeParse(t,n);if(o.success)return o.data;throw o.error}safeParse(t,n){const o={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)},r=this._parseSync({data:t,path:o.path,parent:o});return fW(o,r)}"~validate"(t){var o,r;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return z0(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(r=(o=a==null?void 0:a.message)==null?void 0:o.toLowerCase())!=null&&r.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>z0(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const o=await this.safeParseAsync(t,n);if(o.success)return o.data;throw o.error}async safeParseAsync(t,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)},r=this._parse({data:t,path:o.path,parent:o}),a=await(tz(r)?r:Promise.resolve(r));return fW(o,a)}refine(t,n){const o=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,a)=>{const i=t(r),s=()=>a.addIssue({code:me.custom,...o(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(s(),!1)):i?!0:(s(),!1)})}refinement(t,n){return this._refinement((o,r)=>t(o)?!0:(r.addIssue(typeof n=="function"?n(o,r):n),!1))}_refinement(t){return new D0({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ji.create(this,this._def)}nullable(){return H0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ur.create(this)}promise(){return iz.create(this,this._def)}or(t){return oz.create([this,t],this._def)}and(t){return rz.create(this,t,this._def)}transform(t){return new D0({...Xe(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ZH({...Xe(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new LOe({typeName:Oe.ZodBranded,type:this,...Xe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new YH({...Xe(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return YF.create(this,t)}readonly(){return QH.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const aOe=/^c[^\s-]{8,}$/i,iOe=/^[0-9a-z]+$/,sOe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cOe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lOe=/^[a-z0-9_-]{21}$/i,dOe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,uOe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,hOe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fOe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let FT;const pOe=/^(?:(?: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])$/,yOe=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,mOe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,gOe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kOe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vOe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,VJ="((\\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])))",xOe=new RegExp(`^${VJ}$`);function BJ(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function wOe(e){return new RegExp(`^${BJ(e)}$`)}function MOe(e){let t=`${VJ}T${BJ(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function bOe(e,t){return!!((t==="v4"||!t)&&pOe.test(e)||(t==="v6"||!t)&&mOe.test(e))}function _Oe(e,t){if(!dOe.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const o=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(o));return!(typeof r!="object"||r===null||"typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function COe(e,t){return!!((t==="v4"||!t)&&yOe.test(e)||(t==="v6"||!t)&&gOe.test(e))}class Ma extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.string,received:a.parsedType}),Fe}const o=new jn;let r;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty());else if(a.kind==="max")t.data.length>a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty());else if(a.kind==="length"){const i=t.data.length>a.value,s=t.data.length<a.value;(i||s)&&(r=this._getOrReturnCtx(t,r),i?Me(r,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&Me(r,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),o.dirty())}else if(a.kind==="email")hOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"email",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="emoji")FT||(FT=new RegExp(fOe,"u")),FT.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"emoji",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="uuid")cOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"uuid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="nanoid")lOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"nanoid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="cuid")aOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="cuid2")iOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid2",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="ulid")sOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ulid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),Me(r,{validation:"url",code:me.invalid_string,message:a.message}),o.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"regex",code:me.invalid_string,message:a.message}),o.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),o.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{startsWith:a.value},message:a.message}),o.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{endsWith:a.value},message:a.message}),o.dirty()):a.kind==="datetime"?MOe(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"datetime",message:a.message}),o.dirty()):a.kind==="date"?xOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"date",message:a.message}),o.dirty()):a.kind==="time"?wOe(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"time",message:a.message}),o.dirty()):a.kind==="duration"?uOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"duration",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="ip"?bOe(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ip",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="jwt"?_Oe(t.data,a.alg)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"jwt",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="cidr"?COe(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cidr",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="base64"?kOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="base64url"?vOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64url",code:me.invalid_string,message:a.message}),o.dirty()):it.assertNever(a);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement(r=>t.test(r),{validation:n,code:me.invalid_string,...Ne.errToObj(o)})}_addCheck(t){return new Ma({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ne.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ne.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ne.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ne.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ne.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ne.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ne.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ne.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ne.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ne.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ne.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ne.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ne.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Ne.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ne.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ne.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ne.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ne.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ne.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ne.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ne.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ne.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ne.errToObj(n)})}nonempty(t){return this.min(1,Ne.errToObj(t))}trim(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ma.create=e=>new Ma({checks:[],typeName:Oe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Xe(e)});function SOe(e,t){const n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o,a=Number.parseInt(e.toFixed(r).replace(".","")),i=Number.parseInt(t.toFixed(r).replace(".",""));return a%i/10**r}class R0 extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.number,received:a.parsedType}),Fe}let o;const r=new jn;for(const a of this._def.checks)a.kind==="int"?it.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="multipleOf"?SOe(t.data,a.value)!==0&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_finite,message:a.message}),r.dirty()):it.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ne.toString(n))}setLimit(t,n,o,r){return new R0({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Ne.toString(r)}]})}_addCheck(t){return new R0({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ne.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ne.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ne.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ne.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ne.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(n)&&Number.isFinite(t)}}R0.create=e=>new R0({checks:[],typeName:Oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Xe(e)});class cf extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ce.bigint)return this._getInvalidInput(t);let o;const r=new jn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):it.assertNever(a);return{status:r.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:Ce.bigint,received:n.parsedType}),Fe}gte(t,n){return this.setLimit("min",t,!0,Ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ne.toString(n))}setLimit(t,n,o,r){return new cf({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Ne.toString(r)}]})}_addCheck(t){return new cf({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ne.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}cf.create=e=>new cf({checks:[],typeName:Oe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Xe(e)});class WH extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.boolean,received:o.parsedType}),Fe}return zo(t.data)}}WH.create=e=>new WH({typeName:Oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Xe(e)});class nz extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.date,received:a.parsedType}),Fe}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_date}),Fe}const o=new jn;let r;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),o.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),o.dirty()):it.assertNever(a);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new nz({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ne.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ne.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}nz.create=e=>new nz({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...Xe(e)});class pW extends et{_parse(t){if(this._getType(t)!==Ce.symbol){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.symbol,received:o.parsedType}),Fe}return zo(t.data)}}pW.create=e=>new pW({typeName:Oe.ZodSymbol,...Xe(e)});class yW extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.undefined,received:o.parsedType}),Fe}return zo(t.data)}}yW.create=e=>new yW({typeName:Oe.ZodUndefined,...Xe(e)});class mW extends et{_parse(t){if(this._getType(t)!==Ce.null){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.null,received:o.parsedType}),Fe}return zo(t.data)}}mW.create=e=>new mW({typeName:Oe.ZodNull,...Xe(e)});class gW extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return zo(t.data)}}gW.create=e=>new gW({typeName:Oe.ZodAny,...Xe(e)});class GH extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zo(t.data)}}GH.create=e=>new GH({typeName:Oe.ZodUnknown,...Xe(e)});class Di extends et{_parse(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:Ce.never,received:n.parsedType}),Fe}}Di.create=e=>new Di({typeName:Oe.ZodNever,...Xe(e)});class kW extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.void,received:o.parsedType}),Fe}return zo(t.data)}}kW.create=e=>new kW({typeName:Oe.ZodVoid,...Xe(e)});class Ur extends et{_parse(t){const{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==Ce.array)return Me(n,{code:me.invalid_type,expected:Ce.array,received:n.parsedType}),Fe;if(r.exactLength!==null){const i=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(i||s)&&(Me(n,{code:i?me.too_big:me.too_small,minimum:s?r.exactLength.value:void 0,maximum:i?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),o.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(Me(n,{code:me.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(Me(n,{code:me.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((i,s)=>r.type._parseAsync(new Xr(n,i,n.path,s)))).then(i=>jn.mergeArray(o,i));const a=[...n.data].map((i,s)=>r.type._parseSync(new Xr(n,i,n.path,s)));return jn.mergeArray(o,a)}get element(){return this._def.type}min(t,n){return new Ur({...this._def,minLength:{value:t,message:Ne.toString(n)}})}max(t,n){return new Ur({...this._def,maxLength:{value:t,message:Ne.toString(n)}})}length(t,n){return new Ur({...this._def,exactLength:{value:t,message:Ne.toString(n)}})}nonempty(t){return this.min(1,t)}}Ur.create=(e,t)=>new Ur({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Xe(t)});function ju(e){if(e instanceof Gt){const t={};for(const n in e.shape){const o=e.shape[n];t[n]=ji.create(ju(o))}return new Gt({...e._def,shape:()=>t})}else return e instanceof Ur?new Ur({...e._def,type:ju(e.element)}):e instanceof ji?ji.create(ju(e.unwrap())):e instanceof H0?H0.create(ju(e.unwrap())):e instanceof zd?zd.create(e.items.map(t=>ju(t))):e}class Gt extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=it.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ce.object){const l=this._getOrReturnCtx(t);return Me(l,{code:me.invalid_type,expected:Ce.object,received:l.parsedType}),Fe}const{status:o,ctx:r}=this._processInputParams(t),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof Di&&this._def.unknownKeys==="strip"))for(const l in r.data)i.includes(l)||s.push(l);const c=[];for(const l of i){const h=a[l],u=r.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new Xr(r,u,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Di){const l=this._def.unknownKeys;if(l==="passthrough")for(const h of s)c.push({key:{status:"valid",value:h},value:{status:"valid",value:r.data[h]}});else if(l==="strict")s.length>0&&(Me(r,{code:me.unrecognized_keys,keys:s}),o.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const h of s){const u=r.data[h];c.push({key:{status:"valid",value:h},value:l._parse(new Xr(r,u,r.path,h)),alwaysSet:h in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const l=[];for(const h of c){const u=await h.key,p=await h.value;l.push({key:u,value:p,alwaysSet:h.alwaysSet})}return l}).then(l=>jn.mergeObjectSync(o,l)):jn.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return Ne.errToObj,new Gt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{var a,i;const r=((i=(a=this._def).errorMap)==null?void 0:i.call(a,n,o).message)??o.defaultError;return n.code==="unrecognized_keys"?{message:Ne.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new Gt({...this._def,unknownKeys:"strip"})}passthrough(){return new Gt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Gt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Gt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Gt({...this._def,catchall:t})}pick(t){const n={};for(const o of it.objectKeys(t))t[o]&&this.shape[o]&&(n[o]=this.shape[o]);return new Gt({...this._def,shape:()=>n})}omit(t){const n={};for(const o of it.objectKeys(this.shape))t[o]||(n[o]=this.shape[o]);return new Gt({...this._def,shape:()=>n})}deepPartial(){return ju(this)}partial(t){const n={};for(const o of it.objectKeys(this.shape)){const r=this.shape[o];t&&!t[o]?n[o]=r:n[o]=r.optional()}return new Gt({...this._def,shape:()=>n})}required(t){const n={};for(const o of it.objectKeys(this.shape))if(t&&!t[o])n[o]=this.shape[o];else{let a=this.shape[o];for(;a instanceof ji;)a=a._def.innerType;n[o]=a}return new Gt({...this._def,shape:()=>n})}keyof(){return UJ(it.objectKeys(this.shape))}}Gt.create=(e,t)=>new Gt({shape:()=>e,unknownKeys:"strip",catchall:Di.create(),typeName:Oe.ZodObject,...Xe(t)});Gt.strictCreate=(e,t)=>new Gt({shape:()=>e,unknownKeys:"strict",catchall:Di.create(),typeName:Oe.ZodObject,...Xe(t)});Gt.lazycreate=(e,t)=>new Gt({shape:e,unknownKeys:"strip",catchall:Di.create(),typeName:Oe.ZodObject,...Xe(t)});class oz extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o=this._def.options;function r(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const i=a.map(s=>new Ea(s.ctx.common.issues));return Me(n,{code:me.invalid_union,unionErrors:i}),Fe}if(n.common.async)return Promise.all(o.map(async a=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(r);{let a;const i=[];for(const c of o){const l={...n,common:{...n.common,issues:[]},parent:null},h=c._parseSync({data:n.data,path:n.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(c=>new Ea(c));return Me(n,{code:me.invalid_union,unionErrors:s}),Fe}}get options(){return this._def.options}}oz.create=(e,t)=>new oz({options:e,typeName:Oe.ZodUnion,...Xe(t)});function KH(e,t){const n=fi(e),o=fi(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&o===Ce.object){const r=it.objectKeys(t),a=it.objectKeys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of a){const c=KH(e[s],t[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(n===Ce.array&&o===Ce.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let a=0;a<e.length;a++){const i=e[a],s=t[a],c=KH(i,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===Ce.date&&o===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class rz extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=(a,i)=>{if(uW(a)||uW(i))return Fe;const s=KH(a.value,i.value);return s.valid?((hW(a)||hW(i))&&n.dirty(),{status:n.value,value:s.data}):(Me(o,{code:me.invalid_intersection_types}),Fe)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([a,i])=>r(a,i)):r(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}rz.create=(e,t,n)=>new rz({left:e,right:t,typeName:Oe.ZodIntersection,...Xe(n)});class zd extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.array)return Me(o,{code:me.invalid_type,expected:Ce.array,received:o.parsedType}),Fe;if(o.data.length<this._def.items.length)return Me(o,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Fe;!this._def.rest&&o.data.length>this._def.items.length&&(Me(o,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...o.data].map((i,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Xr(o,i,o.path,s)):null}).filter(i=>!!i);return o.common.async?Promise.all(a).then(i=>jn.mergeArray(n,i)):jn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new zd({...this._def,rest:t})}}zd.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new zd({items:e,typeName:Oe.ZodTuple,rest:null,...Xe(t)})};class az extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.object)return Me(o,{code:me.invalid_type,expected:Ce.object,received:o.parsedType}),Fe;const r=[],a=this._def.keyType,i=this._def.valueType;for(const s in o.data)r.push({key:a._parse(new Xr(o,s,o.path,s)),value:i._parse(new Xr(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?jn.mergeObjectAsync(n,r):jn.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){return n instanceof et?new az({keyType:t,valueType:n,typeName:Oe.ZodRecord,...Xe(o)}):new az({keyType:Ma.create(),valueType:t,typeName:Oe.ZodRecord,...Xe(n)})}}class vW extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.map)return Me(o,{code:me.invalid_type,expected:Ce.map,received:o.parsedType}),Fe;const r=this._def.keyType,a=this._def.valueType,i=[...o.data.entries()].map(([s,c],l)=>({key:r._parse(new Xr(o,s,o.path,[l,"key"])),value:a._parse(new Xr(o,c,o.path,[l,"value"]))}));if(o.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of i){const l=await c.key,h=await c.value;if(l.status==="aborted"||h.status==="aborted")return Fe;(l.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(l.value,h.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of i){const l=c.key,h=c.value;if(l.status==="aborted"||h.status==="aborted")return Fe;(l.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(l.value,h.value)}return{status:n.value,value:s}}}}vW.create=(e,t,n)=>new vW({valueType:t,keyType:e,typeName:Oe.ZodMap,...Xe(n)});class lf extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.set)return Me(o,{code:me.invalid_type,expected:Ce.set,received:o.parsedType}),Fe;const r=this._def;r.minSize!==null&&o.data.size<r.minSize.value&&(Me(o,{code:me.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&o.data.size>r.maxSize.value&&(Me(o,{code:me.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const a=this._def.valueType;function i(c){const l=new Set;for(const h of c){if(h.status==="aborted")return Fe;h.status==="dirty"&&n.dirty(),l.add(h.value)}return{status:n.value,value:l}}const s=[...o.data.values()].map((c,l)=>a._parse(new Xr(o,c,o.path,l)));return o.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(t,n){return new lf({...this._def,minSize:{value:t,message:Ne.toString(n)}})}max(t,n){return new lf({...this._def,maxSize:{value:t,message:Ne.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}lf.create=(e,t)=>new lf({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Xe(t)});class xW extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}xW.create=(e,t)=>new xW({getter:e,typeName:Oe.ZodLazy,...Xe(t)});class XH extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Me(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),Fe}return{status:"valid",value:t.data}}get value(){return this._def.value}}XH.create=(e,t)=>new XH({value:e,typeName:Oe.ZodLiteral,...Xe(t)});function UJ(e,t){return new T0({values:e,typeName:Oe.ZodEnum,...Xe(t)})}class T0 extends et{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),o=this._def.values;return Me(n,{expected:it.joinValues(o),received:n.parsedType,code:me.invalid_type}),Fe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),o=this._def.values;return Me(n,{received:n.data,code:me.invalid_enum_value,options:o}),Fe}return zo(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return T0.create(t,{...this._def,...n})}exclude(t,n=this._def){return T0.create(this.options.filter(o=>!t.includes(o)),{...this._def,...n})}}T0.create=UJ;class wW extends et{_parse(t){const n=it.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==Ce.string&&o.parsedType!==Ce.number){const r=it.objectValues(n);return Me(o,{expected:it.joinValues(r),received:o.parsedType,code:me.invalid_type}),Fe}if(this._cache||(this._cache=new Set(it.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const r=it.objectValues(n);return Me(o,{received:o.data,code:me.invalid_enum_value,options:r}),Fe}return zo(t.data)}get enum(){return this._def.values}}wW.create=(e,t)=>new wW({values:e,typeName:Oe.ZodNativeEnum,...Xe(t)});class iz extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return Me(n,{code:me.invalid_type,expected:Ce.promise,received:n.parsedType}),Fe;const o=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return zo(o.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}iz.create=(e,t)=>new iz({type:e,typeName:Oe.ZodPromise,...Xe(t)});class D0 extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=this._def.effect||null,a={addIssue:i=>{Me(o,i),i.fatal?n.abort():n.dirty()},get path(){return o.path}};if(a.addIssue=a.addIssue.bind(a),r.type==="preprocess"){const i=r.transform(o.data,a);if(o.common.async)return Promise.resolve(i).then(async s=>{if(n.value==="aborted")return Fe;const c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?Fe:c.status==="dirty"||n.value==="dirty"?D2(c.value):c});{if(n.value==="aborted")return Fe;const s=this._def.schema._parseSync({data:i,path:o.path,parent:o});return s.status==="aborted"?Fe:s.status==="dirty"||n.value==="dirty"?D2(s.value):s}}if(r.type==="refinement"){const i=s=>{const c=r.refinement(s,a);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){const s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?Fe:(s.status==="dirty"&&n.dirty(),i(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?Fe:(s.status==="dirty"&&n.dirty(),i(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(o.common.async===!1){const i=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!z0(i))return Fe;const s=r.transform(i.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(i=>z0(i)?Promise.resolve(r.transform(i.value,a)).then(s=>({status:n.value,value:s})):Fe);it.assertNever(r)}}D0.create=(e,t,n)=>new D0({schema:e,typeName:Oe.ZodEffects,effect:t,...Xe(n)});D0.createWithPreprocess=(e,t,n)=>new D0({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...Xe(n)});class ji extends et{_parse(t){return this._getType(t)===Ce.undefined?zo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ji.create=(e,t)=>new ji({innerType:e,typeName:Oe.ZodOptional,...Xe(t)});class H0 extends et{_parse(t){return this._getType(t)===Ce.null?zo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}H0.create=(e,t)=>new H0({innerType:e,typeName:Oe.ZodNullable,...Xe(t)});class ZH extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let o=n.data;return n.parsedType===Ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ZH.create=(e,t)=>new ZH({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Xe(t)});class YH extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return tz(r)?r.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ea(o.common.issues)},input:o.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ea(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}YH.create=(e,t)=>new YH({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Xe(t)});class MW extends et{_parse(t){if(this._getType(t)!==Ce.nan){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.nan,received:o.parsedType}),Fe}return{status:"valid",value:t.data}}}MW.create=e=>new MW({typeName:Oe.ZodNaN,...Xe(e)});class LOe extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class YF extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?Fe:a.status==="dirty"?(n.dirty(),D2(a.value)):this._def.out._parseAsync({data:a.value,path:o.path,parent:o})})();{const r=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return r.status==="aborted"?Fe:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:o.path,parent:o})}}static create(t,n){return new YF({in:t,out:n,typeName:Oe.ZodPipeline})}}class QH extends et{_parse(t){const n=this._def.innerType._parse(t),o=r=>(z0(r)&&(r.value=Object.freeze(r.value)),r);return tz(n)?n.then(r=>o(r)):o(n)}unwrap(){return this._def.innerType}}QH.create=(e,t)=>new QH({innerType:e,typeName:Oe.ZodReadonly,...Xe(t)});var Oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Oe||(Oe={}));const ln=Ma.create,WJ=R0.create,NOe=WH.create,Nh=GH.create;Di.create;const ls=Ur.create,at=Gt.create,JH=oz.create;rz.create;zd.create;const bW=az.create,Np=XH.create,Ip=T0.create;iz.create;ji.create;H0.create;const IOe=at({$state:ln().min(1)}),ya=at({$action:ln().min(1)}),AOe=at({$cond:Nh(),$then:Nh(),$else:Nh().optional()}),Uo=e=>JH([e,IOe,ya,AOe]),Ht=Uo(ln()),fa=Uo(WJ()),Ap=Uo(NOe()),GJ={Card:at({title:Ht.optional()}),Separator:at({orientation:Uo(Ip(["horizontal","vertical"])).optional()}),Tabs:at({value:Ht.optional(),items:ls(at({id:ln(),label:ln()})),onChange:ya.optional()}),Accordion:at({items:ls(at({id:ln(),title:ln(),content:ln()}))}),Badge:at({label:Ht,variant:Uo(Ip(["default","secondary","destructive","outline"])).optional()}),Avatar:at({src:Ht.optional(),alt:Ht.optional(),fallback:Ht.optional()}),Progress:at({value:fa}),Skeleton:at({width:fa.optional(),height:fa.optional()}),Label:at({text:Ht}),Heading:at({level:Uo(JH([Np(1),Np(2),Np(3),Np(4)])).optional(),text:Ht}),Text:at({text:Ht,muted:Ap.optional()}),Icon:at({name:Ht,size:fa.optional()}),Chart:at({kind:Uo(Ip(["bar","line","area","pie"])),data:Uo(ls(bW(ln(),Nh()))),xKey:Ht.optional(),series:ls(at({key:ln(),label:ln().optional()})).optional()}),Table:at({columns:ls(at({key:ln(),label:ln()})),rows:Uo(ls(bW(ln(),Nh())))}),Metric:at({label:Ht,value:Uo(JH([ln(),WJ()]))}),CodeBlock:at({code:Ht,language:Ht.optional()}),Markdown:at({content:Ht}),Button:at({label:Ht,variant:Uo(Ip(["default","destructive","outline","secondary","ghost","link"])).optional(),onClick:ya.optional(),disabled:Ap.optional()}),Input:at({value:Ht.optional(),placeholder:Ht.optional(),onChange:ya.optional()}),Checkbox:at({checked:Ap.optional(),onChange:ya.optional(),label:Ht.optional()}),Switch:at({checked:Ap.optional(),onChange:ya.optional()}),Select:at({value:Ht.optional(),items:ls(at({value:ln(),label:ln()})),onChange:ya.optional()}),Textarea:at({value:Ht.optional(),placeholder:Ht.optional(),rows:fa.optional(),onChange:ya.optional()}),Slider:at({value:fa.optional(),min:fa.optional(),max:fa.optional(),step:fa.optional(),onChange:ya.optional()})},KJ=Object.keys(GJ);Object.fromEntries(KJ.map(e=>[e,{props:GJ[e],description:e}]));function _W(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zr(...e){return t=>{let n=!1;const o=e.map(r=>{const a=_W(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():_W(e[r],null)}}}}function mt(...e){return m.useCallback(Zr(...e),e)}var EOe=Symbol.for("react.lazy"),sz=RO[" use ".trim().toString()];function jOe(e){return typeof e=="object"&&e!==null&&"then"in e}function XJ(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===EOe&&"_payload"in e&&jOe(e._payload)}function $Oe(e){const t=zOe(e),n=m.forwardRef((o,r)=>{let{children:a,...i}=o;XJ(a)&&typeof sz=="function"&&(a=sz(a._payload));const s=m.Children.toArray(a),c=s.find(TOe);if(c){const l=c.props.children,h=s.map(u=>u===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:u);return f.jsx(t,{...i,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}var POe=$Oe("Slot");function zOe(e){const t=m.forwardRef((n,o)=>{let{children:r,...a}=n;if(XJ(r)&&typeof sz=="function"&&(r=sz(r._payload)),m.isValidElement(r)){const i=HOe(r),s=DOe(a,r.props);return r.type!==m.Fragment&&(s.ref=o?Zr(o,i):i),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ROe=Symbol("radix.slottable");function TOe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ROe}function DOe(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{const c=a(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function HOe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const CW=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,SW=TY,ZJ=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return SW(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:a}=t,i=Object.keys(r).map(l=>{const h=n==null?void 0:n[l],u=a==null?void 0:a[l];if(h===null)return null;const p=CW(h)||CW(u);return r[l][p]}),s=n&&Object.entries(n).reduce((l,h)=>{let[u,p]=h;return p===void 0||(l[u]=p),l},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((l,h)=>{let{class:u,className:p,...y}=h;return Object.entries(y).every(g=>{let[k,x]=g;return Array.isArray(x)?x.includes({...a,...s}[k]):{...a,...s}[k]===x})?[...l,u,p]:l},[]);return SW(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},OOe=ZJ("sf:inline-flex sf:items-center sf:justify-center sf:whitespace-nowrap sf:rounded-md sf:text-sm sf:font-medium sf:ring-offset-background sf:transition-colors sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-2 sf:disabled:pointer-events-none sf:disabled:opacity-50",{variants:{variant:{default:"sf:bg-primary sf:text-primary-foreground sf:font-semibold sf:hover:bg-emerald-400",destructive:"sf:bg-destructive sf:text-destructive-foreground sf:hover:bg-destructive/90",outline:"sf:border sf:border-input sf:bg-background sf:hover:bg-secondary sf:hover:text-foreground",secondary:"sf:bg-secondary sf:text-secondary-foreground sf:hover:bg-secondary/80",ghost:"sf:text-muted-foreground sf:hover:bg-muted sf:hover:text-foreground",link:"sf:text-primary sf:underline-offset-4 sf:hover:underline"},size:{default:"sf:h-9 sf:px-4 sf:py-2",sm:"sf:h-8 sf:rounded-md sf:px-3",lg:"sf:h-11 sf:rounded-md sf:px-8",icon:"sf:h-9 sf:w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ke=m.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,...r},a)=>{const i=o?POe:"button";return f.jsx(i,{className:ne(OOe({variant:t,size:n,className:e})),ref:a,...r})});Ke.displayName="Button";function YJ(e,[t,n]){return Math.min(n,Math.max(t,e))}function Se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function FOe(e,t){const n=m.createContext(t),o=a=>{const{children:i,...s}=a,c=m.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:c,children:i})};o.displayName=e+"Provider";function r(a){const i=m.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function sr(e,t=[]){let n=[];function o(a,i){const s=m.createContext(i),c=n.length;n=[...n,i];const l=u=>{var v;const{scope:p,children:y,...g}=u,k=((v=p==null?void 0:p[e])==null?void 0:v[c])||s,x=m.useMemo(()=>g,Object.values(g));return f.jsx(k.Provider,{value:x,children:y})};l.displayName=a+"Provider";function h(u,p){var k;const y=((k=p==null?void 0:p[e])==null?void 0:k[c])||s,g=m.useContext(y);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[l,h]}const r=()=>{const a=n.map(i=>m.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return m.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return r.scopeName=e,[o,qOe(r,...t)]}function qOe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const i=o.reduce((s,{useScope:c,scopeName:l})=>{const u=c(a)[`__scope${l}`];return{...s,...u}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Hi=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},VOe=RO[" useInsertionEffect ".trim().toString()]||Hi;function Ud({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,i]=BOe({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:r;{const h=m.useRef(e!==void 0);m.useEffect(()=>{const u=h.current;u!==s&&console.warn(`${o} is changing from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=s},[s,o])}const l=m.useCallback(h=>{var u;if(s){const p=UOe(h)?h(e):h;p!==e&&((u=i.current)==null||u.call(i,p))}else a(h)},[s,e,a,i]);return[c,l]}function BOe({defaultProp:e,onChange:t}){const[n,o]=m.useState(e),r=m.useRef(n),a=m.useRef(t);return VOe(()=>{a.current=t},[t]),m.useEffect(()=>{var i;r.current!==n&&((i=a.current)==null||i.call(a,n),r.current=n)},[n,r]),[n,o,a]}function UOe(e){return typeof e=="function"}var WOe=m.createContext(void 0);function lR(e){const t=m.useContext(WOe);return e||t||"ltr"}function GOe(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function QJ(e){const[t,n]=m.useState(void 0);return Hi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,s=l.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function O0(e){const t=KOe(e),n=m.forwardRef((o,r)=>{const{children:a,...i}=o,s=m.Children.toArray(a),c=s.find(ZOe);if(c){const l=c.props.children,h=s.map(u=>u===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:u);return f.jsx(t,{...i,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function KOe(e){const t=m.forwardRef((n,o)=>{const{children:r,...a}=n;if(m.isValidElement(r)){const i=QOe(r),s=YOe(a,r.props);return r.type!==m.Fragment&&(s.ref=o?Zr(o,i):i),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JJ=Symbol("radix.slottable");function XOe(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=JJ,t}function ZOe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JJ}function YOe(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{const c=a(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function QOe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var JOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=JOe.reduce((e,t)=>{const n=O0(`Primitive.${t}`),o=m.forwardRef((r,a)=>{const{asChild:i,...s}=r,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function eee(e,t){e&&qd.flushSync(()=>e.dispatchEvent(t))}function QF(e){const t=e+"CollectionProvider",[n,o]=sr(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=k=>{const{scope:x,children:v}=k,M=$r.useRef(null),w=$r.useRef(new Map).current;return f.jsx(r,{scope:x,itemMap:w,collectionRef:M,children:v})};i.displayName=t;const s=e+"CollectionSlot",c=O0(s),l=$r.forwardRef((k,x)=>{const{scope:v,children:M}=k,w=a(s,v),b=mt(x,w.collectionRef);return f.jsx(c,{ref:b,children:M})});l.displayName=s;const h=e+"CollectionItemSlot",u="data-radix-collection-item",p=O0(h),y=$r.forwardRef((k,x)=>{const{scope:v,children:M,...w}=k,b=$r.useRef(null),C=mt(x,b),_=a(h,v);return $r.useEffect(()=>(_.itemMap.set(b,{ref:b,...w}),()=>void _.itemMap.delete(b))),f.jsx(p,{[u]:"",ref:C,children:M})});y.displayName=h;function g(k){const x=a(e+"CollectionConsumer",k);return $r.useCallback(()=>{const M=x.collectionRef.current;if(!M)return[];const w=Array.from(M.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((_,S)=>w.indexOf(_.ref.current)-w.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:y},g,o]}var tee=["PageUp","PageDown"],nee=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oee={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Y0="Slider",[eO,eFe,tFe]=QF(Y0),[ree]=sr(Y0,[tFe]),[nFe,dR]=ree(Y0),aee=m.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:a=1,orientation:i="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[o],value:h,onValueChange:u=()=>{},onValueCommit:p=()=>{},inverted:y=!1,form:g,...k}=e,x=m.useRef(new Set),v=m.useRef(0),w=i==="horizontal"?oFe:rFe,[b=[],C]=Ud({prop:h,defaultProp:l,onChange:j=>{var U;(U=[...x.current][v.current])==null||U.focus(),u(j)}}),_=m.useRef(b);function S(j){const z=lFe(b,j);N(j,z)}function E(j){N(j,v.current)}function P(){const j=_.current[v.current];b[v.current]!==j&&p(b)}function N(j,z,{commit:U}={commit:!1}){const A=fFe(a),T=pFe(Math.round((j-o)/a)*a+o,A),D=YJ(T,[o,r]);C((O=[])=>{const I=sFe(O,D,z);if(hFe(I,c*a)){v.current=I.indexOf(D);const R=String(I)!==String(O);return R&&U&&p(I),R?I:O}else return O})}return f.jsx(nFe,{scope:e.__scopeSlider,name:n,disabled:s,min:o,max:r,valueIndexToChangeRef:v,thumbs:x.current,values:b,orientation:i,form:g,children:f.jsx(eO.Provider,{scope:e.__scopeSlider,children:f.jsx(eO.Slot,{scope:e.__scopeSlider,children:f.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...k,ref:t,onPointerDown:Se(k.onPointerDown,()=>{s||(_.current=b)}),min:o,max:r,inverted:y,onSlideStart:s?void 0:S,onSlideMove:s?void 0:E,onSlideEnd:s?void 0:P,onHomeKeyDown:()=>!s&&N(o,0,{commit:!0}),onEndKeyDown:()=>!s&&N(r,b.length-1,{commit:!0}),onStepKeyDown:({event:j,direction:z})=>{if(!s){const T=tee.includes(j.key)||j.shiftKey&&nee.includes(j.key)?10:1,D=v.current,O=b[D],I=a*T*z;N(O+I,D,{commit:!0})}}})})})})});aee.displayName=Y0;var[iee,see]=ree(Y0,{startEdge:"left",endEdge:"right",size:"width",direction:1}),oFe=m.forwardRef((e,t)=>{const{min:n,max:o,dir:r,inverted:a,onSlideStart:i,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...h}=e,[u,p]=m.useState(null),y=mt(t,w=>p(w)),g=m.useRef(void 0),k=lR(r),x=k==="ltr",v=x&&!a||!x&&a;function M(w){const b=g.current||u.getBoundingClientRect(),C=[0,b.width],S=JF(C,v?[n,o]:[o,n]);return g.current=b,S(w-b.left)}return f.jsx(iee,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:f.jsx(cee,{dir:k,"data-orientation":"horizontal",...h,ref:y,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const b=M(w.clientX);i==null||i(b)},onSlideMove:w=>{const b=M(w.clientX);s==null||s(b)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=oee[v?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:C?-1:1})}})})}),rFe=m.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:a,onSlideMove:i,onSlideEnd:s,onStepKeyDown:c,...l}=e,h=m.useRef(null),u=mt(t,h),p=m.useRef(void 0),y=!r;function g(k){const x=p.current||h.current.getBoundingClientRect(),v=[0,x.height],w=JF(v,y?[o,n]:[n,o]);return p.current=x,w(k-x.top)}return f.jsx(iee,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:f.jsx(cee,{"data-orientation":"vertical",...l,ref:u,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:k=>{const x=g(k.clientY);a==null||a(x)},onSlideMove:k=>{const x=g(k.clientY);i==null||i(x)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:k=>{const v=oee[y?"from-bottom":"from-top"].includes(k.key);c==null||c({event:k,direction:v?-1:1})}})})}),cee=m.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:a,onHomeKeyDown:i,onEndKeyDown:s,onStepKeyDown:c,...l}=e,h=dR(Y0,n);return f.jsx(Ve.span,{...l,ref:t,onKeyDown:Se(e.onKeyDown,u=>{u.key==="Home"?(i(u),u.preventDefault()):u.key==="End"?(s(u),u.preventDefault()):tee.concat(nee).includes(u.key)&&(c(u),u.preventDefault())}),onPointerDown:Se(e.onPointerDown,u=>{const p=u.target;p.setPointerCapture(u.pointerId),u.preventDefault(),h.thumbs.has(p)?p.focus():o(u)}),onPointerMove:Se(e.onPointerMove,u=>{u.target.hasPointerCapture(u.pointerId)&&r(u)}),onPointerUp:Se(e.onPointerUp,u=>{const p=u.target;p.hasPointerCapture(u.pointerId)&&(p.releasePointerCapture(u.pointerId),a(u))})})}),lee="SliderTrack",dee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=dR(lee,n);return f.jsx(Ve.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});dee.displayName=lee;var tO="SliderRange",uee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=dR(tO,n),a=see(tO,n),i=m.useRef(null),s=mt(t,i),c=r.values.length,l=r.values.map(p=>pee(p,r.min,r.max)),h=c>1?Math.min(...l):0,u=100-Math.max(...l);return f.jsx(Ve.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...o,ref:s,style:{...e.style,[a.startEdge]:h+"%",[a.endEdge]:u+"%"}})});uee.displayName=tO;var nO="SliderThumb",hee=m.forwardRef((e,t)=>{const n=eFe(e.__scopeSlider),[o,r]=m.useState(null),a=mt(t,s=>r(s)),i=m.useMemo(()=>o?n().findIndex(s=>s.ref.current===o):-1,[n,o]);return f.jsx(aFe,{...e,ref:a,index:i})}),aFe=m.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...a}=e,i=dR(nO,n),s=see(nO,n),[c,l]=m.useState(null),h=mt(t,M=>l(M)),u=c?i.form||!!c.closest("form"):!0,p=QJ(c),y=i.values[o],g=y===void 0?0:pee(y,i.min,i.max),k=cFe(o,i.values.length),x=p==null?void 0:p[s.size],v=x?dFe(x,g,s.direction):0;return m.useEffect(()=>{if(c)return i.thumbs.add(c),()=>{i.thumbs.delete(c)}},[c,i.thumbs]),f.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${v}px)`},children:[f.jsx(eO.ItemSlot,{scope:e.__scopeSlider,children:f.jsx(Ve.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":i.min,"aria-valuenow":y,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...a,ref:h,style:y===void 0?{display:"none"}:e.style,onFocus:Se(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})}),u&&f.jsx(fee,{name:r??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:y},o)]})});hee.displayName=nO;var iFe="RadioBubbleInput",fee=m.forwardRef(({__scopeSlider:e,value:t,...n},o)=>{const r=m.useRef(null),a=mt(r,o),i=GOe(t);return m.useEffect(()=>{const s=r.current;if(!s)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&h){const u=new Event("input",{bubbles:!0});h.call(s,t),s.dispatchEvent(u)}},[i,t]),f.jsx(Ve.input,{style:{display:"none"},...n,ref:a,defaultValue:t})});fee.displayName=iFe;function sFe(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,a)=>r-a)}function pee(e,t,n){const a=100/(n-t)*(e-t);return YJ(a,[0,100])}function cFe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function lFe(e,t){if(e.length===1)return 0;const n=e.map(r=>Math.abs(r-t)),o=Math.min(...n);return n.indexOf(o)}function dFe(e,t,n){const o=e/2,a=JF([0,50],[0,o]);return(o-a(t)*n)*n}function uFe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function hFe(e,t){if(t>0){const n=uFe(e);return Math.min(...n)>=t}return!0}function JF(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function fFe(e){return(String(e).split(".")[1]||"").length}function pFe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var yee=aee,yFe=dee,mFe=uee,gFe=hee;const eq=m.forwardRef(({className:e,...t},n)=>f.jsxs(yee,{ref:n,className:ne("sf:relative sf:flex sf:w-full sf:touch-none sf:select-none sf:items-center",e),...t,children:[f.jsx(yFe,{className:"sf:relative sf:h-1.5 sf:w-full sf:grow sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx(mFe,{className:"sf:absolute sf:h-full sf:bg-primary"})}),f.jsx(gFe,{className:"sf:block sf:h-4 sf:w-4 sf:rounded-full sf:border sf:border-primary/60 sf:bg-background sf:shadow-sm sf:transition-colors sf:hover:border-primary sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:disabled:pointer-events-none sf:disabled:opacity-50"})]}));eq.displayName=yee.displayName;const kFe={1:"sf:text-2xl sf:font-semibold sf:tracking-tight",2:"sf:text-xl sf:font-semibold sf:tracking-tight",3:"sf:text-lg sf:font-semibold",4:"sf:text-base sf:font-semibold"};function vFe({text:e,level:t=2}){const n=`h${t}`;return f.jsx(n,{className:ne(kFe[t]),children:e})}const mee=m.createContext({custom:{}});function xFe({value:e,children:t}){return f.jsx(mee.Provider,{value:e,children:t})}function wFe(){return m.useContext(mee)}function F0({name:e,as:t,size:n=16,fallback:o=jAe,...r}){const a=wFe(),i=t??(e?a.custom[e]:void 0)??(e?Zh[e]:void 0)??Zh[o];return i?f.jsx(i,{size:n,...r}):null}function MFe({name:e,size:t=16}){return f.jsx(F0,{name:e,size:t,"aria-hidden":!0})}function bFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:typeof e=="object"?JSON.stringify(e):String(e)}function _Fe({label:e,value:t}){return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-1",children:[f.jsx("span",{className:"sf:text-muted-foreground sf:text-xs sf:uppercase sf:tracking-wide",children:e}),f.jsx("span",{className:"sf:font-semibold sf:text-2xl sf:tabular-nums",children:bFe(t)})]})}function CFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):JSON.stringify(e)}function SFe({columns:e=[],rows:t=[]}){return f.jsx("div",{className:"sf:w-full sf:overflow-x-auto",children:f.jsxs("table",{className:"sf:w-full sf:text-left sf:text-sm",children:[f.jsx("thead",{className:"sf:border-b sf:bg-muted/50",children:f.jsx("tr",{children:e.map(n=>f.jsx("th",{scope:"col",className:"sf:px-3 sf:py-2 sf:font-medium sf:text-muted-foreground",children:n.label},n.key))})}),f.jsx("tbody",{children:t.map((n,o)=>f.jsx("tr",{className:"sf:border-b last:sf:border-0",children:e.map(r=>f.jsx("td",{className:"sf:px-3 sf:py-2",children:CFe(n[r.key])},r.key))},o))})]})})}function LFe({text:e,muted:t}){return f.jsx("p",{className:ne("sf:text-sm",t&&"sf:text-muted-foreground"),children:e})}function NFe({title:e,children:t}){return f.jsxs("div",{className:"sf:bg-card sf:p-4 sf:text-card-foreground sf:shadow-sm",children:[e!==void 0?f.jsx("div",{className:"sf:mb-3 sf:font-semibold sf:text-base sf:leading-tight",children:e}):null,f.jsx("div",{className:"sf:flex sf:flex-col sf:gap-3",children:t})]})}function IFe({orientation:e="horizontal"}){return f.jsx("div",{"aria-orientation":e,className:ne("sf:bg-border",e==="horizontal"?"sf:h-px sf:w-full":"sf:h-full sf:w-px")})}function AFe({value:e,items:t,onChange:n,children:o}){const r=t??[];return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-2",children:[f.jsx("div",{className:"sf:inline-flex sf:h-9 sf:items-center sf:justify-start sf:rounded-md sf:bg-muted sf:p-1 sf:text-muted-foreground",children:r.map(a=>f.jsx("button",{type:"button","data-state":e===a.id?"active":"inactive",onClick:()=>n==null?void 0:n({value:a.id}),className:"sf:inline-flex sf:items-center sf:justify-center sf:whitespace-nowrap sf:rounded-sm sf:px-3 sf:py-1 sf:text-xs sf:font-medium sf:transition-all sf:data-[state=active]:bg-background sf:data-[state=active]:text-foreground sf:data-[state=active]:shadow-sm",children:a.label},a.id))}),o]})}function EFe({items:e}){const t=e??[];return f.jsx("div",{className:"sf:flex sf:flex-col sf:divide-y sf:rounded-md sf:border",children:t.map(n=>f.jsxs("details",{className:"sf:group sf:px-3 sf:py-2",children:[f.jsx("summary",{className:"sf:cursor-pointer sf:py-1 sf:font-medium sf:text-sm",children:n.title}),f.jsx("div",{className:"sf:py-2 sf:text-muted-foreground sf:text-sm",children:n.content})]},n.id))})}const LW={default:"sf:bg-primary sf:text-primary-foreground",secondary:"sf:bg-secondary sf:text-secondary-foreground",destructive:"sf:bg-destructive sf:text-destructive-foreground",outline:"sf:border sf:border-border sf:text-foreground"};function jFe({label:e,variant:t="default"}){return f.jsx("span",{className:ne("sf:inline-flex sf:items-center sf:rounded-full sf:px-2.5 sf:py-0.5 sf:font-medium sf:text-xs",LW[t]??LW.default),children:e})}function $Fe({src:e,alt:t,fallback:n}){return e?f.jsx("img",{src:e,alt:t??"",className:"sf:inline-block sf:h-9 sf:w-9 sf:rounded-full sf:object-cover"}):f.jsx("span",{className:"sf:inline-flex sf:h-9 sf:w-9 sf:items-center sf:justify-center sf:rounded-full sf:bg-muted sf:font-medium sf:text-muted-foreground sf:text-sm",children:n??"?"})}function PFe({value:e=0}){const t=Math.max(0,Math.min(100,e));return f.jsx("div",{"aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,className:"sf:relative sf:h-2 sf:w-full sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx("div",{className:"sf:h-full sf:bg-primary sf:transition-all",style:{width:`${t}%`}})})}function zFe({width:e,height:t}){return f.jsx("div",{className:"sf:animate-pulse sf:rounded-md sf:bg-muted",style:{width:e??"100%",height:t??16}})}function RFe({text:e}){return f.jsx("span",{className:"sf:font-medium sf:text-sm sf:leading-none",children:e})}function TFe({label:e,variant:t="default",onClick:n,disabled:o}){return f.jsx(Ke,{variant:t,disabled:o,onClick:()=>n==null?void 0:n(),children:e})}const tq="sf:flex sf:h-9 sf:w-full sf:rounded-md sf:border sf:border-input sf:bg-background sf:px-3 sf:py-1 sf:text-sm sf:shadow-sm sf:transition-colors sf:placeholder:text-muted-foreground sf:focus-visible:outline-hidden sf:focus-visible:ring-1 sf:focus-visible:ring-ring sf:disabled:cursor-not-allowed sf:disabled:opacity-50";function DFe({value:e,placeholder:t,onChange:n}){return f.jsx("input",{type:"text",value:e??"",placeholder:t,onChange:o=>n==null?void 0:n({value:o.target.value}),className:tq})}function HFe({checked:e,onChange:t,label:n}){return f.jsxs("label",{className:"sf:inline-flex sf:items-center sf:gap-2 sf:text-sm",children:[f.jsx("input",{type:"checkbox",checked:e??!1,onChange:o=>t==null?void 0:t({checked:o.target.checked}),className:"sf:h-4 sf:w-4 sf:rounded sf:border sf:border-input sf:accent-primary"}),n]})}function OFe({checked:e,onChange:t}){return f.jsx("button",{type:"button",role:"switch","aria-checked":e??!1,onClick:()=>t==null?void 0:t({checked:!(e??!1)}),className:ne("sf:relative sf:inline-flex sf:h-5 sf:w-9 sf:shrink-0 sf:cursor-pointer sf:items-center sf:rounded-full sf:border-2 sf:border-transparent sf:transition-colors",e?"sf:bg-primary":"sf:bg-input"),children:f.jsx("span",{className:ne("sf:pointer-events-none sf:block sf:h-4 sf:w-4 sf:rounded-full sf:bg-background sf:shadow-lg sf:ring-0 sf:transition-transform",e?"sf:translate-x-4":"sf:translate-x-0")})})}function FFe({value:e,items:t,onChange:n}){return f.jsx("select",{value:e??"",onChange:o=>n==null?void 0:n({value:o.target.value}),className:tq,children:(t??[]).map(o=>f.jsx("option",{value:o.value,children:o.label},o.value))})}function qFe({value:e,placeholder:t,rows:n,onChange:o}){return f.jsx("textarea",{value:e??"",placeholder:t,rows:n,onChange:r=>o==null?void 0:o({value:r.target.value}),className:ne(tq,"sf:min-h-16 sf:py-2")})}function VFe({value:e,min:t=0,max:n=100,step:o=1,onChange:r}){return f.jsx(eq,{value:e===void 0?void 0:[e],min:t,max:n,step:o,onValueChange:a=>{const[i]=a;typeof i=="number"&&(r==null||r({value:i}))}})}const BFe=m.lazy(()=>X0(()=>import("./chart-BxTNHoKY.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])));function UFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(BFe,{...e})})}const WFe=m.lazy(()=>X0(()=>import("./markdown-D9XDrg2s.js"),[]));function GFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(WFe,{...e})})}const KFe=m.lazy(()=>X0(()=>import("./code-block-DwqzBBWk.js"),[]));function XFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(KFe,{...e})})}const gee={Card:NFe,Separator:IFe,Tabs:AFe,Accordion:EFe,Badge:jFe,Avatar:$Fe,Progress:PFe,Skeleton:zFe,Label:RFe,Heading:vFe,Text:LFe,Icon:MFe,Chart:UFe,Table:SFe,Metric:_Fe,CodeBlock:XFe,Markdown:GFe,Button:TFe,Input:DFe,Checkbox:HFe,Switch:OFe,Select:FFe,Textarea:qFe,Slider:VFe},NW=KJ.filter(e=>gee[e]===void 0);if(NW.length>0)throw new Error(`componentRegistry is missing impls for: ${NW.join(", ")}. Every catalog entry in COMPONENT_NAMES must have a matching component impl.`);const ZFe={components:gee};function YFe(e,t){return t.kind==="set"?{...e,[t.path]:t.value}:{...e,...t.partial}}function kee(e){return e===null||typeof e!="object"?!1:"$state"in e||"$action"in e||"$param"in e||"$cond"in e}function cP(e,t,n,o){if(!kee(e))return e;if(typeof e.$state=="string")return t[e.$state];if(typeof e.$action=="string"){const r=e.$action;return o.has(r)?a=>n(r,a):void 0}if("$cond"in e){const r=cP(e.$cond,t,n,o);return cP(r?e.$then:e.$else,t,n,o)}return e}function QFe(e,t,n,o){if(!e)return{};const r={};for(const[a,i]of Object.entries(e))r[a]=cP(i,t,n,o);return r}function IW({spec:e,nodeId:t,apiBaseUrl:n="/api",projectSlug:o,flowSlug:r}){const[a,i]=m.useReducer(YFe,e.state??{}),s=new Set(Object.keys(e.actions??{})),c=m.useCallback(async(l,h)=>{var y;const u=(y=e.actions)==null?void 0:y[l];if(!u)return;if(u.kind==="set"){const g=JFe(u.value,h,a);i({kind:"set",path:u.path,value:g});return}if(!o||!r)return;const p=`${n}/projects/${encodeURIComponent(o)}/flows/${encodeURIComponent(r)}/nodes/${encodeURIComponent(t)}/actions/${encodeURIComponent(l)}`;try{const g=await fetch(p,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h??{})});if(!g.ok){const x=await g.text();i({kind:"set",path:`/__errors/${l}`,value:x});return}const k=await g.json();k!==null&&typeof k=="object"&&i({kind:"merge",partial:k})}catch(g){i({kind:"set",path:`/__errors/${l}`,value:g instanceof Error?g.message:String(g)})}},[e.actions,o,r,n,t,a]);return vee(e.root,e,a,c,s)}function JFe(e,t,n){return kee(e)?typeof e.$param=="string"?t!==null&&typeof t=="object"?t[e.$param]:void 0:typeof e.$state=="string"?n[e.$state]:e:e}function vee(e,t,n,o,r){const a=t.elements[e];if(!a)return null;const i=ZFe.components[a.type];if(!i)return null;const s=QFe(a.props,n,o,r),l=(a.children??[]).map(h=>f.jsx(eqe,{children:vee(h,t,n,o,r)},h));return f.jsx(i,{...s,children:l.length>0?l:void 0})}function eqe({children:e}){return e}function Yr(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function tqe(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e);m.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var nqe="DismissableLayer",oO="dismissableLayer.update",oqe="dismissableLayer.pointerDownOutside",rqe="dismissableLayer.focusOutside",AW,xee=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Af=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,l=m.useContext(xee),[h,u]=m.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=m.useState({}),g=mt(t,S=>u(S)),k=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=k.indexOf(x),M=h?k.indexOf(h):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,b=M>=v,C=sqe(S=>{const E=S.target,P=[...l.branches].some(N=>N.contains(E));!b||P||(r==null||r(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),_=cqe(S=>{const E=S.target;[...l.branches].some(N=>N.contains(E))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return tqe(S=>{M===l.layers.size-1&&(o==null||o(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),m.useEffect(()=>{if(h)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(AW=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(h)),l.layers.add(h),EW(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=AW)}},[h,p,n,l]),m.useEffect(()=>()=>{h&&(l.layers.delete(h),l.layersWithOutsidePointerEventsDisabled.delete(h),EW())},[h,l]),m.useEffect(()=>{const S=()=>y({});return document.addEventListener(oO,S),()=>document.removeEventListener(oO,S)},[]),f.jsx(Ve.div,{...c,ref:g,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,C.onPointerDownCapture)})});Af.displayName=nqe;var aqe="DismissableLayerBranch",iqe=m.forwardRef((e,t)=>{const n=m.useContext(xee),o=m.useRef(null),r=mt(t,o);return m.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(Ve.div,{...e,ref:r})});iqe.displayName=aqe;function sqe(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const a=s=>{if(s.target&&!o.current){let c=function(){wee(oqe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function cqe(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e),o=m.useRef(!1);return m.useEffect(()=>{const r=a=>{a.target&&!o.current&&wee(rqe,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function EW(){const e=new CustomEvent(oO);document.dispatchEvent(e)}function wee(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?eee(r,a):r.dispatchEvent(a)}var qT=0;function nq(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jW()),document.body.insertAdjacentElement("beforeend",e[1]??jW()),qT++,()=>{qT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qT--}},[])}function jW(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var VT="focusScope.autoFocusOnMount",BT="focusScope.autoFocusOnUnmount",$W={bubbles:!1,cancelable:!0},lqe="FocusScope",uR=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[s,c]=m.useState(null),l=Yr(r),h=Yr(a),u=m.useRef(null),p=mt(t,k=>c(k)),y=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(o){let k=function(w){if(y.paused||!s)return;const b=w.target;s.contains(b)?u.current=b:ai(u.current,{select:!0})},x=function(w){if(y.paused||!s)return;const b=w.relatedTarget;b!==null&&(s.contains(b)||ai(u.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&ai(s)};document.addEventListener("focusin",k),document.addEventListener("focusout",x);const M=new MutationObserver(v);return s&&M.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",x),M.disconnect()}}},[o,s,y.paused]),m.useEffect(()=>{if(s){zW.add(y);const k=document.activeElement;if(!s.contains(k)){const v=new CustomEvent(VT,$W);s.addEventListener(VT,l),s.dispatchEvent(v),v.defaultPrevented||(dqe(yqe(Mee(s)),{select:!0}),document.activeElement===k&&ai(s))}return()=>{s.removeEventListener(VT,l),setTimeout(()=>{const v=new CustomEvent(BT,$W);s.addEventListener(BT,h),s.dispatchEvent(v),v.defaultPrevented||ai(k??document.body,{select:!0}),s.removeEventListener(BT,h),zW.remove(y)},0)}}},[s,l,h,y]);const g=m.useCallback(k=>{if(!n&&!o||y.paused)return;const x=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,v=document.activeElement;if(x&&v){const M=k.currentTarget,[w,b]=uqe(M);w&&b?!k.shiftKey&&v===b?(k.preventDefault(),n&&ai(w,{select:!0})):k.shiftKey&&v===w&&(k.preventDefault(),n&&ai(b,{select:!0})):v===M&&k.preventDefault()}},[n,o,y.paused]);return f.jsx(Ve.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});uR.displayName=lqe;function dqe(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(ai(o,{select:t}),document.activeElement!==n)return}function uqe(e){const t=Mee(e),n=PW(t,e),o=PW(t.reverse(),e);return[n,o]}function Mee(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function PW(e,t){for(const n of e)if(!hqe(n,{upTo:t}))return n}function hqe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fqe(e){return e instanceof HTMLInputElement&&"select"in e}function ai(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fqe(e)&&t&&e.select()}}var zW=pqe();function pqe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=RW(e,t),e.unshift(t)},remove(t){var n;e=RW(e,t),(n=e[0])==null||n.resume()}}}function RW(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function yqe(e){return e.filter(t=>t.tagName!=="A")}var mqe=RO[" useId ".trim().toString()]||(()=>{}),gqe=0;function En(e){const[t,n]=m.useState(mqe());return Hi(()=>{n(o=>o??String(gqe++))},[e]),e||(t?`radix-${t}`:"")}const kqe=["top","right","bottom","left"],Oi=Math.min,oo=Math.max,cz=Math.round,Ep=Math.floor,Wr=e=>({x:e,y:e}),vqe={left:"right",right:"left",bottom:"top",top:"bottom"};function rO(e,t,n){return oo(e,Oi(t,n))}function ja(e,t){return typeof e=="function"?e(t):e}function $a(e){return e.split("-")[0]}function Q0(e){return e.split("-")[1]}function oq(e){return e==="x"?"y":"x"}function rq(e){return e==="y"?"height":"width"}function Or(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function aq(e){return oq(Or(e))}function xqe(e,t,n){n===void 0&&(n=!1);const o=Q0(e),r=aq(e),a=rq(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=lz(i)),[i,lz(i)]}function wqe(e){const t=lz(e);return[aO(e),t,aO(t)]}function aO(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const TW=["left","right"],DW=["right","left"],Mqe=["top","bottom"],bqe=["bottom","top"];function _qe(e,t,n){switch(e){case"top":case"bottom":return n?t?DW:TW:t?TW:DW;case"left":case"right":return t?Mqe:bqe;default:return[]}}function Cqe(e,t,n,o){const r=Q0(e);let a=_qe($a(e),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),t&&(a=a.concat(a.map(aO)))),a}function lz(e){const t=$a(e);return vqe[t]+e.slice(t.length)}function Sqe(e){return{top:0,right:0,bottom:0,left:0,...e}}function bee(e){return typeof e!="number"?Sqe(e):{top:e,right:e,bottom:e,left:e}}function dz(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function HW(e,t,n){let{reference:o,floating:r}=e;const a=Or(t),i=aq(t),s=rq(i),c=$a(t),l=a==="y",h=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let y;switch(c){case"top":y={x:h,y:o.y-r.height};break;case"bottom":y={x:h,y:o.y+o.height};break;case"right":y={x:o.x+o.width,y:u};break;case"left":y={x:o.x-r.width,y:u};break;default:y={x:o.x,y:o.y}}switch(Q0(t)){case"start":y[i]-=p*(n&&l?-1:1);break;case"end":y[i]+=p*(n&&l?-1:1);break}return y}async function Lqe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:y=0}=ja(t,e),g=bee(y),x=s[p?u==="floating"?"reference":"floating":u],v=dz(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:h,strategy:c})),M=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),b=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=dz(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:M,offsetParent:w,strategy:c}):M);return{top:(v.top-C.top+g.top)/b.y,bottom:(C.bottom-v.bottom+g.bottom)/b.y,left:(v.left-C.left+g.left)/b.x,right:(C.right-v.right+g.right)/b.x}}const Nqe=50,Iqe=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:Lqe},c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:u}=HW(l,o,c),p=o,y=0;const g={};for(let k=0;k<a.length;k++){const x=a[k];if(!x)continue;const{name:v,fn:M}=x,{x:w,y:b,data:C,reset:_}=await M({x:h,y:u,initialPlacement:o,placement:p,strategy:r,middlewareData:g,rects:l,platform:s,elements:{reference:e,floating:t}});h=w??h,u=b??u,g[v]={...g[v],...C},_&&y<Nqe&&(y++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(l=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:h,y:u}=HW(l,p,c)),k=-1)}return{x:h,y:u,placement:p,strategy:r,middlewareData:g}},Aqe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:h=0}=ja(e,t)||{};if(l==null)return{};const u=bee(h),p={x:n,y:o},y=aq(r),g=rq(y),k=await i.getDimensions(l),x=y==="y",v=x?"top":"left",M=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=a.reference[g]+a.reference[y]-p[y]-a.floating[g],C=p[y]-a.reference[y],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let S=_?_[w]:0;(!S||!await(i.isElement==null?void 0:i.isElement(_)))&&(S=s.floating[w]||a.floating[g]);const E=b/2-C/2,P=S/2-k[g]/2-1,N=Oi(u[v],P),j=Oi(u[M],P),z=N,U=S-k[g]-j,A=S/2-k[g]/2+E,T=rO(z,A,U),D=!c.arrow&&Q0(r)!=null&&A!==T&&a.reference[g]/2-(A<z?N:j)-k[g]/2<0,O=D?A<z?A-z:A-U:0;return{[y]:p[y]+O,data:{[y]:T,centerOffset:A-T-O,...D&&{alignmentOffset:O}},reset:D}}}),Eqe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:k=!0,...x}=ja(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=$a(r),M=Or(s),w=$a(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),C=p||(w||!k?[lz(s)]:wqe(s)),_=g!=="none";!p&&_&&C.push(...Cqe(s,k,g,b));const S=[s,...C],E=await c.detectOverflow(t,x),P=[];let N=((o=a.flip)==null?void 0:o.overflows)||[];if(h&&P.push(E[v]),u){const A=xqe(r,i,b);P.push(E[A[0]],E[A[1]])}if(N=[...N,{placement:r,overflows:P}],!P.every(A=>A<=0)){var j,z;const A=(((j=a.flip)==null?void 0:j.index)||0)+1,T=S[A];if(T&&(!(u==="alignment"?M!==Or(T):!1)||N.every(I=>Or(I.placement)===M?I.overflows[0]>0:!0)))return{data:{index:A,overflows:N},reset:{placement:T}};let D=(z=N.filter(O=>O.overflows[0]<=0).sort((O,I)=>O.overflows[1]-I.overflows[1])[0])==null?void 0:z.placement;if(!D)switch(y){case"bestFit":{var U;const O=(U=N.filter(I=>{if(_){const R=Or(I.placement);return R===M||R==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(R=>R>0).reduce((R,L)=>R+L,0)]).sort((I,R)=>I[1]-R[1])[0])==null?void 0:U[0];O&&(D=O);break}case"initialPlacement":D=s;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function OW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FW(e){return kqe.some(t=>e[t]>=0)}const jqe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...a}=ja(e,t);switch(r){case"referenceHidden":{const i=await o.detectOverflow(t,{...a,elementContext:"reference"}),s=OW(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:FW(s)}}}case"escaped":{const i=await o.detectOverflow(t,{...a,altBoundary:!0}),s=OW(i,n.floating);return{data:{escapedOffsets:s,escaped:FW(s)}}}default:return{}}}}},_ee=new Set(["left","top"]);async function $qe(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=$a(n),s=Q0(n),c=Or(n)==="y",l=_ee.has(i)?-1:1,h=a&&c?-1:1,u=ja(t,e);let{mainAxis:p,crossAxis:y,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof g=="number"&&(y=s==="end"?g*-1:g),c?{x:y*h,y:p*l}:{x:p*l,y:y*h}}const Pqe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:i,middlewareData:s}=t,c=await $qe(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:a+c.y,data:{...c,placement:i}}}}},zqe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:v=>{let{x:M,y:w}=v;return{x:M,y:w}}},...l}=ja(e,t),h={x:n,y:o},u=await a.detectOverflow(t,l),p=Or($a(r)),y=oq(p);let g=h[y],k=h[p];if(i){const v=y==="y"?"top":"left",M=y==="y"?"bottom":"right",w=g+u[v],b=g-u[M];g=rO(w,g,b)}if(s){const v=p==="y"?"top":"left",M=p==="y"?"bottom":"right",w=k+u[v],b=k-u[M];k=rO(w,k,b)}const x=c.fn({...t,[y]:g,[p]:k});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[y]:i,[p]:s}}}}}},Rqe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ja(e,t),h={x:n,y:o},u=Or(r),p=oq(u);let y=h[p],g=h[u];const k=ja(s,t),x=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(c){const w=p==="y"?"height":"width",b=a.reference[p]-a.floating[w]+x.mainAxis,C=a.reference[p]+a.reference[w]-x.mainAxis;y<b?y=b:y>C&&(y=C)}if(l){var v,M;const w=p==="y"?"width":"height",b=_ee.has($a(r)),C=a.reference[u]-a.floating[w]+(b&&((v=i.offset)==null?void 0:v[u])||0)+(b?0:x.crossAxis),_=a.reference[u]+a.reference[w]+(b?0:((M=i.offset)==null?void 0:M[u])||0)-(b?x.crossAxis:0);g<C?g=C:g>_&&(g=_)}return{[p]:y,[u]:g}}}},Tqe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...l}=ja(e,t),h=await i.detectOverflow(t,l),u=$a(r),p=Q0(r),y=Or(r)==="y",{width:g,height:k}=a.floating;let x,v;u==="top"||u==="bottom"?(x=u,v=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,x=p==="end"?"top":"bottom");const M=k-h.top-h.bottom,w=g-h.left-h.right,b=Oi(k-h[x],M),C=Oi(g-h[v],w),_=!t.middlewareData.shift;let S=b,E=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=M),_&&!p){const N=oo(h.left,0),j=oo(h.right,0),z=oo(h.top,0),U=oo(h.bottom,0);y?E=g-2*(N!==0||j!==0?N+j:oo(h.left,h.right)):S=k-2*(z!==0||U!==0?z+U:oo(h.top,h.bottom))}await c({...t,availableWidth:E,availableHeight:S});const P=await i.getDimensions(s.floating);return g!==P.width||k!==P.height?{reset:{rects:!0}}:{}}}};function hR(){return typeof window<"u"}function J0(e){return Cee(e)?(e.nodeName||"").toLowerCase():"#document"}function co(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jr(e){var t;return(t=(Cee(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Cee(e){return hR()?e instanceof Node||e instanceof co(e).Node:!1}function or(e){return hR()?e instanceof Element||e instanceof co(e).Element:!1}function Ra(e){return hR()?e instanceof HTMLElement||e instanceof co(e).HTMLElement:!1}function qW(e){return!hR()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof co(e).ShadowRoot}function Ef(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Dqe(e){return/^(table|td|th)$/.test(J0(e))}function fR(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Hqe=/transform|translate|scale|rotate|perspective|filter/,Oqe=/paint|layout|strict|content/,ds=e=>!!e&&e!=="none";let UT;function iq(e){const t=or(e)?rr(e):e;return ds(t.transform)||ds(t.translate)||ds(t.scale)||ds(t.rotate)||ds(t.perspective)||!sq()&&(ds(t.backdropFilter)||ds(t.filter))||Hqe.test(t.willChange||"")||Oqe.test(t.contain||"")}function Fqe(e){let t=Fi(e);for(;Ra(t)&&!q0(t);){if(iq(t))return t;if(fR(t))return null;t=Fi(t)}return null}function sq(){return UT==null&&(UT=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),UT}function q0(e){return/^(html|body|#document)$/.test(J0(e))}function rr(e){return co(e).getComputedStyle(e)}function pR(e){return or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(J0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qW(e)&&e.host||Jr(e);return qW(t)?t.host:t}function See(e){const t=Fi(e);return q0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ra(t)&&Ef(t)?t:See(t)}function df(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=See(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),i=co(r);if(a){const s=iO(i);return t.concat(i,i.visualViewport||[],Ef(r)?r:[],s&&n?df(s):[])}else return t.concat(r,df(r,[],n))}function iO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lee(e){const t=rr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ra(e),a=r?e.offsetWidth:n,i=r?e.offsetHeight:o,s=cz(n)!==a||cz(o)!==i;return s&&(n=a,o=i),{width:n,height:o,$:s}}function cq(e){return or(e)?e:e.contextElement}function p0(e){const t=cq(e);if(!Ra(t))return Wr(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=Lee(t);let i=(a?cz(n.width):n.width)/o,s=(a?cz(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const qqe=Wr(0);function Nee(e){const t=co(e);return!sq()||!t.visualViewport?qqe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vqe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==co(e)?!1:t}function Rd(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=cq(e);let i=Wr(1);t&&(o?or(o)&&(i=p0(o)):i=p0(e));const s=Vqe(a,n,o)?Nee(a):Wr(0);let c=(r.left+s.x)/i.x,l=(r.top+s.y)/i.y,h=r.width/i.x,u=r.height/i.y;if(a){const p=co(a),y=o&&or(o)?co(o):o;let g=p,k=iO(g);for(;k&&o&&y!==g;){const x=p0(k),v=k.getBoundingClientRect(),M=rr(k),w=v.left+(k.clientLeft+parseFloat(M.paddingLeft))*x.x,b=v.top+(k.clientTop+parseFloat(M.paddingTop))*x.y;c*=x.x,l*=x.y,h*=x.x,u*=x.y,c+=w,l+=b,g=co(k),k=iO(g)}}return dz({width:h,height:u,x:c,y:l})}function yR(e,t){const n=pR(e).scrollLeft;return t?t.left+n:Rd(Jr(e)).left+n}function Iee(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-yR(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Bqe(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",i=Jr(o),s=t?fR(t.floating):!1;if(o===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Wr(1);const h=Wr(0),u=Ra(o);if((u||!u&&!a)&&((J0(o)!=="body"||Ef(i))&&(c=pR(o)),u)){const y=Rd(o);l=p0(o),h.x=y.x+o.clientLeft,h.y=y.y+o.clientTop}const p=i&&!u&&!a?Iee(i,c):Wr(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+h.x+p.x,y:n.y*l.y-c.scrollTop*l.y+h.y+p.y}}function Uqe(e){return Array.from(e.getClientRects())}function Wqe(e){const t=Jr(e),n=pR(e),o=e.ownerDocument.body,r=oo(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=oo(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+yR(e);const s=-n.scrollTop;return rr(o).direction==="rtl"&&(i+=oo(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:s}}const VW=25;function Gqe(e,t){const n=co(e),o=Jr(e),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){a=r.width,i=r.height;const h=sq();(!h||h&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}const l=yR(o);if(l<=0){const h=o.ownerDocument,u=h.body,p=getComputedStyle(u),y=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-y);g<=VW&&(a-=g)}else l<=VW&&(a+=l);return{width:a,height:i,x:s,y:c}}function Kqe(e,t){const n=Rd(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=Ra(e)?p0(e):Wr(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=r*a.x,l=o*a.y;return{width:i,height:s,x:c,y:l}}function BW(e,t,n){let o;if(t==="viewport")o=Gqe(e,n);else if(t==="document")o=Wqe(Jr(e));else if(or(t))o=Kqe(t,n);else{const r=Nee(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return dz(o)}function Aee(e,t){const n=Fi(e);return n===t||!or(n)||q0(n)?!1:rr(n).position==="fixed"||Aee(n,t)}function Xqe(e,t){const n=t.get(e);if(n)return n;let o=df(e,[],!1).filter(s=>or(s)&&J0(s)!=="body"),r=null;const a=rr(e).position==="fixed";let i=a?Fi(e):e;for(;or(i)&&!q0(i);){const s=rr(i),c=iq(i);!c&&s.position==="fixed"&&(r=null),(a?!c&&!r:!c&&s.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Ef(i)&&!c&&Aee(e,i))?o=o.filter(h=>h!==i):r=s,i=Fi(i)}return t.set(e,o),o}function Zqe(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?fR(t)?[]:Xqe(t,this._c):[].concat(n),o],s=BW(t,i[0],r);let c=s.top,l=s.right,h=s.bottom,u=s.left;for(let p=1;p<i.length;p++){const y=BW(t,i[p],r);c=oo(y.top,c),l=Oi(y.right,l),h=Oi(y.bottom,h),u=oo(y.left,u)}return{width:l-u,height:h-c,x:u,y:c}}function Yqe(e){const{width:t,height:n}=Lee(e);return{width:t,height:n}}function Qqe(e,t,n){const o=Ra(t),r=Jr(t),a=n==="fixed",i=Rd(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Wr(0);function l(){c.x=yR(r)}if(o||!o&&!a)if((J0(t)!=="body"||Ef(r))&&(s=pR(t)),o){const y=Rd(t,!0,a,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else r&&l();a&&!o&&r&&l();const h=r&&!o&&!a?Iee(r,s):Wr(0),u=i.left+s.scrollLeft-c.x-h.x,p=i.top+s.scrollTop-c.y-h.y;return{x:u,y:p,width:i.width,height:i.height}}function WT(e){return rr(e).position==="static"}function UW(e,t){if(!Ra(e)||rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jr(e)===n&&(n=n.ownerDocument.body),n}function Eee(e,t){const n=co(e);if(fR(e))return n;if(!Ra(e)){let r=Fi(e);for(;r&&!q0(r);){if(or(r)&&!WT(r))return r;r=Fi(r)}return n}let o=UW(e,t);for(;o&&Dqe(o)&&WT(o);)o=UW(o,t);return o&&q0(o)&&WT(o)&&!iq(o)?n:o||Fqe(e)||n}const Jqe=async function(e){const t=this.getOffsetParent||Eee,n=this.getDimensions,o=await n(e.floating);return{reference:Qqe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function eVe(e){return rr(e).direction==="rtl"}const tVe={convertOffsetParentRelativeRectToViewportRelativeRect:Bqe,getDocumentElement:Jr,getClippingRect:Zqe,getOffsetParent:Eee,getElementRects:Jqe,getClientRects:Uqe,getDimensions:Yqe,getScale:p0,isElement:or,isRTL:eVe};function jee(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nVe(e,t){let n=null,o;const r=Jr(e);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const l=e.getBoundingClientRect(),{left:h,top:u,width:p,height:y}=l;if(s||t(),!p||!y)return;const g=Ep(u),k=Ep(r.clientWidth-(h+p)),x=Ep(r.clientHeight-(u+y)),v=Ep(h),w={rootMargin:-g+"px "+-k+"px "+-x+"px "+-v+"px",threshold:oo(0,Oi(1,c))||1};let b=!0;function C(_){const S=_[0].intersectionRatio;if(S!==c){if(!b)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!jee(l,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(C,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),a}function oVe(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=cq(e),h=r||a?[...l?df(l):[],...t?df(t):[]]:[];h.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const u=l&&s?nVe(l,n):null;let p=-1,y=null;i&&(y=new ResizeObserver(v=>{let[M]=v;M&&M.target===l&&y&&t&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(t)})),n()}),l&&!c&&y.observe(l),t&&y.observe(t));let g,k=c?Rd(e):null;c&&x();function x(){const v=Rd(e);k&&!jee(k,v)&&n(),k=v,g=requestAnimationFrame(x)}return n(),()=>{var v;h.forEach(M=>{r&&M.removeEventListener("scroll",n),a&&M.removeEventListener("resize",n)}),u==null||u(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const rVe=Pqe,aVe=zqe,iVe=Eqe,sVe=Tqe,cVe=jqe,WW=Aqe,lVe=Rqe,dVe=(e,t,n)=>{const o=new Map,r={platform:tVe,...n},a={...r.platform,_c:o};return Iqe(e,t,{...r,platform:a})};var uVe=typeof document<"u",hVe=function(){},lP=uVe?m.useLayoutEffect:hVe;function uz(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!uz(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!uz(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function $ee(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function GW(e,t){const n=$ee(e);return Math.round(t*n)/n}function GT(e){const t=m.useRef(e);return lP(()=>{t.current=e}),t}function fVe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[h,u]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,y]=m.useState(o);uz(p,o)||y(o);const[g,k]=m.useState(null),[x,v]=m.useState(null),M=m.useCallback(I=>{I!==_.current&&(_.current=I,k(I))},[]),w=m.useCallback(I=>{I!==S.current&&(S.current=I,v(I))},[]),b=a||g,C=i||x,_=m.useRef(null),S=m.useRef(null),E=m.useRef(h),P=c!=null,N=GT(c),j=GT(r),z=GT(l),U=m.useCallback(()=>{if(!_.current||!S.current)return;const I={placement:t,strategy:n,middleware:p};j.current&&(I.platform=j.current),dVe(_.current,S.current,I).then(R=>{const L={...R,isPositioned:z.current!==!1};A.current&&!uz(E.current,L)&&(E.current=L,qd.flushSync(()=>{u(L)}))})},[p,t,n,j,z]);lP(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,u(I=>({...I,isPositioned:!1})))},[l]);const A=m.useRef(!1);lP(()=>(A.current=!0,()=>{A.current=!1}),[]),lP(()=>{if(b&&(_.current=b),C&&(S.current=C),b&&C){if(N.current)return N.current(b,C,U);U()}},[b,C,U,N,P]);const T=m.useMemo(()=>({reference:_,floating:S,setReference:M,setFloating:w}),[M,w]),D=m.useMemo(()=>({reference:b,floating:C}),[b,C]),O=m.useMemo(()=>{const I={position:n,left:0,top:0};if(!D.floating)return I;const R=GW(D.floating,h.x),L=GW(D.floating,h.y);return s?{...I,transform:"translate("+R+"px, "+L+"px)",...$ee(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:L}},[n,s,D.floating,h.x,h.y]);return m.useMemo(()=>({...h,update:U,refs:T,elements:D,floatingStyles:O}),[h,U,T,D,O])}const pVe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?WW({element:o.current,padding:r}).fn(n):{}:o?WW({element:o,padding:r}).fn(n):{}}}},yVe=(e,t)=>{const n=rVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},mVe=(e,t)=>{const n=aVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},gVe=(e,t)=>({fn:lVe(e).fn,options:[e,t]}),kVe=(e,t)=>{const n=iVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},vVe=(e,t)=>{const n=sVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},xVe=(e,t)=>{const n=cVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},wVe=(e,t)=>{const n=pVe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var MVe="Arrow",Pee=m.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return f.jsx(Ve.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pee.displayName=MVe;var bVe=Pee,lq="Popper",[zee,e2]=sr(lq),[_Ve,Ree]=zee(lq),Tee=e=>{const{__scopePopper:t,children:n}=e,[o,r]=m.useState(null);return f.jsx(_Ve,{scope:t,anchor:o,onAnchorChange:r,children:n})};Tee.displayName=lq;var Dee="PopperAnchor",Hee=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Ree(Dee,n),i=m.useRef(null),s=mt(t,i),c=m.useRef(null);return m.useEffect(()=>{const l=c.current;c.current=(o==null?void 0:o.current)||i.current,l!==c.current&&a.onAnchorChange(c.current)}),o?null:f.jsx(Ve.div,{...r,ref:s})});Hee.displayName=Dee;var dq="PopperContent",[CVe,SVe]=zee(dq),Oee=m.forwardRef((e,t)=>{var oe,re,te,ce,ke,ve;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:h=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:y="optimized",onPlaced:g,...k}=e,x=Ree(dq,n),[v,M]=m.useState(null),w=mt(t,xe=>M(xe)),[b,C]=m.useState(null),_=QJ(b),S=(_==null?void 0:_.width)??0,E=(_==null?void 0:_.height)??0,P=o+(a!=="center"?"-"+a:""),N=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},j=Array.isArray(l)?l:[l],z=j.length>0,U={padding:N,boundary:j.filter(NVe),altBoundary:z},{refs:A,floatingStyles:T,placement:D,isPositioned:O,middlewareData:I}=fVe({strategy:"fixed",placement:P,whileElementsMounted:(...xe)=>oVe(...xe,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[yVe({mainAxis:r+E,alignmentAxis:i}),c&&mVe({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?gVe():void 0,...U}),c&&kVe({...U}),vVe({...U,apply:({elements:xe,rects:He,availableWidth:Ze,availableHeight:ue})=>{const{width:Ie,height:zt}=He.reference,pt=xe.floating.style;pt.setProperty("--radix-popper-available-width",`${Ze}px`),pt.setProperty("--radix-popper-available-height",`${ue}px`),pt.setProperty("--radix-popper-anchor-width",`${Ie}px`),pt.setProperty("--radix-popper-anchor-height",`${zt}px`)}}),b&&wVe({element:b,padding:s}),IVe({arrowWidth:S,arrowHeight:E}),p&&xVe({strategy:"referenceHidden",...U})]}),[R,L]=Vee(D),q=Yr(g);Hi(()=>{O&&(q==null||q())},[O,q]);const H=(oe=I.arrow)==null?void 0:oe.x,$=(re=I.arrow)==null?void 0:re.y,X=((te=I.arrow)==null?void 0:te.centerOffset)!==0,[G,Q]=m.useState();return Hi(()=>{v&&Q(window.getComputedStyle(v).zIndex)},[v]),f.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:O?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(ce=I.transformOrigin)==null?void 0:ce.x,(ke=I.transformOrigin)==null?void 0:ke.y].join(" "),...((ve=I.hide)==null?void 0:ve.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(CVe,{scope:n,placedSide:R,onArrowChange:C,arrowX:H,arrowY:$,shouldHideArrow:X,children:f.jsx(Ve.div,{"data-side":R,"data-align":L,...k,ref:w,style:{...k.style,animation:O?void 0:"none"}})})})});Oee.displayName=dq;var Fee="PopperArrow",LVe={top:"bottom",right:"left",bottom:"top",left:"right"},qee=m.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=SVe(Fee,o),i=LVe[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(bVe,{...r,ref:n,style:{...r.style,display:"block"}})})});qee.displayName=Fee;function NVe(e){return e!==null}var IVe=e=>({name:"transformOrigin",options:e,fn(t){var x,v,M;const{placement:n,rects:o,middlewareData:r}=t,i=((x=r.arrow)==null?void 0:x.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,h]=Vee(n),u={start:"0%",center:"50%",end:"100%"}[h],p=(((v=r.arrow)==null?void 0:v.x)??0)+s/2,y=(((M=r.arrow)==null?void 0:M.y)??0)+c/2;let g="",k="";return l==="bottom"?(g=i?u:`${p}px`,k=`${-c}px`):l==="top"?(g=i?u:`${p}px`,k=`${o.floating.height+c}px`):l==="right"?(g=`${-c}px`,k=i?u:`${y}px`):l==="left"&&(g=`${o.floating.width+c}px`,k=i?u:`${y}px`),{data:{x:g,y:k}}}});function Vee(e){const[t,n="center"]=e.split("-");return[t,n]}var uq=Tee,mR=Hee,hq=Oee,fq=qee,AVe="Portal",jf=m.forwardRef((e,t)=>{var s;const{container:n,...o}=e,[r,a]=m.useState(!1);Hi(()=>a(!0),[]);const i=n||r&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?zce.createPortal(f.jsx(Ve.div,{...o,ref:t}),i):null});jf.displayName=AVe;function EVe(e,t){return m.useReducer((n,o)=>t[n][o]??n,e)}var mo=e=>{const{present:t,children:n}=e,o=jVe(t),r=typeof n=="function"?n({present:o.isPresent}):m.Children.only(n),a=mt(o.ref,$Ve(r));return typeof n=="function"||o.isPresent?m.cloneElement(r,{ref:a}):null};mo.displayName="Presence";function jVe(e){const[t,n]=m.useState(),o=m.useRef(null),r=m.useRef(e),a=m.useRef("none"),i=e?"mounted":"unmounted",[s,c]=EVe(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const l=jp(o.current);a.current=s==="mounted"?l:"none"},[s]),Hi(()=>{const l=o.current,h=r.current;if(h!==e){const p=a.current,y=jp(l);e?c("MOUNT"):y==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(h&&p!==y?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),Hi(()=>{if(t){let l;const h=t.ownerDocument.defaultView??window,u=y=>{const k=jp(o.current).includes(CSS.escape(y.animationName));if(y.target===t&&k&&(c("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=y=>{y.target===t&&(a.current=jp(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{h.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:m.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function jp(e){return(e==null?void 0:e.animationName)||"none"}function $Ve(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var PVe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bu=new WeakMap,$p=new WeakMap,Pp={},KT=0,Bee=function(e){return e&&(e.host||Bee(e.parentNode))},zVe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Bee(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},RVe=function(e,t,n,o){var r=zVe(t,Array.isArray(e)?e:[e]);Pp[n]||(Pp[n]=new WeakMap);var a=Pp[n],i=[],s=new Set,c=new Set(r),l=function(u){!u||s.has(u)||(s.add(u),l(u.parentNode))};r.forEach(l);var h=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))h(p);else try{var y=p.getAttribute(o),g=y!==null&&y!=="false",k=(bu.get(p)||0)+1,x=(a.get(p)||0)+1;bu.set(p,k),a.set(p,x),i.push(p),k===1&&g&&$p.set(p,!0),x===1&&p.setAttribute(n,"true"),g||p.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return h(t),s.clear(),KT++,function(){i.forEach(function(u){var p=bu.get(u)-1,y=a.get(u)-1;bu.set(u,p),a.set(u,y),p||($p.has(u)||u.removeAttribute(o),$p.delete(u)),y||u.removeAttribute(n)}),KT--,KT||(bu=new WeakMap,bu=new WeakMap,$p=new WeakMap,Pp={})}},pq=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=PVe(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),RVe(o,r,n,"aria-hidden")):function(){return null}},Dr=function(){return Dr=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Dr.apply(this,arguments)};function Uee(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function TVe(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var dP="right-scroll-bar-position",uP="width-before-scroll-bar",DVe="with-scroll-bars-hidden",HVe="--removed-body-scroll-bar-size";function XT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function OVe(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var FVe=typeof window<"u"?m.useLayoutEffect:m.useEffect,KW=new WeakMap;function qVe(e,t){var n=OVe(null,function(o){return e.forEach(function(r){return XT(r,o)})});return FVe(function(){var o=KW.get(n);if(o){var r=new Set(o),a=new Set(e),i=n.current;r.forEach(function(s){a.has(s)||XT(s,null)}),a.forEach(function(s){r.has(s)||XT(s,i)})}KW.set(n,e)},[e]),n}function VVe(e){return e}function BVe(e,t){t===void 0&&(t=VVe);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,o);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){o=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var c=function(){var h=i;i=[],h.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(h){i.push(h),l()},filter:function(h){return i=i.filter(h),n}}}};return r}function UVe(e){e===void 0&&(e={});var t=BVe(null);return t.options=Dr({async:!0,ssr:!1},e),t}var Wee=function(e){var t=e.sideCar,n=Uee(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return m.createElement(o,Dr({},n))};Wee.isSideCarExport=!0;function WVe(e,t){return e.useMedium(t),Wee}var Gee=UVe(),ZT=function(){},gR=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:ZT,onWheelCapture:ZT,onTouchMoveCapture:ZT}),r=o[0],a=o[1],i=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,h=e.enabled,u=e.shards,p=e.sideCar,y=e.noRelative,g=e.noIsolation,k=e.inert,x=e.allowPinchZoom,v=e.as,M=v===void 0?"div":v,w=e.gapMode,b=Uee(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,_=qVe([n,t]),S=Dr(Dr({},b),r);return m.createElement(m.Fragment,null,h&&m.createElement(C,{sideCar:Gee,removeScrollBar:l,shards:u,noRelative:y,noIsolation:g,inert:k,setCallbacks:a,allowPinchZoom:!!x,lockRef:n,gapMode:w}),i?m.cloneElement(m.Children.only(s),Dr(Dr({},S),{ref:_})):m.createElement(M,Dr({},S,{className:c,ref:_}),s))});gR.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gR.classNames={fullWidth:uP,zeroRight:dP};var GVe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KVe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=GVe();return t&&e.setAttribute("nonce",t),e}function XVe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ZVe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var YVe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=KVe())&&(XVe(t,n),ZVe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},QVe=function(){var e=YVe();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Kee=function(){var e=QVe(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},JVe={left:0,top:0,right:0,gap:0},YT=function(e){return parseInt(e||"",10)||0},eBe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[YT(n),YT(o),YT(r)]},tBe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return JVe;var t=eBe(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},nBe=Kee(),y0="data-scroll-locked",oBe=function(e,t,n,o){var r=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
8469
+ `);return}j.preventDefault(),M.current=!0,_();return}j.key==="Escape"&&(j.preventDefault(),M.current=!0,S())},P=j=>{j.preventDefault();const z=j.clipboardData.getData("text/plain");document.execCommand("insertText",!1,z)},N=()=>{if(M.current){M.current=!1;return}_()};return f.jsx("div",{ref:u,"data-testid":"inline-edit-input","data-field":i,"data-placeholder":l,role:"textbox",tabIndex:0,contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,onInput:C,onKeyDown:E,onPaste:P,onBlur:N,onMouseDown:j=>j.stopPropagation(),onClick:j=>j.stopPropagation(),onDoubleClick:j=>j.stopPropagation(),style:c,className:ne("nodrag nopan nowheel sf:block sf:w-full sf:bg-transparent sf:p-0 sf:text-inherit sf:outline-none","sf:whitespace-pre-wrap sf:wrap-break-word",g&&l?"inline-edit-empty":"",p?"inline-edit-shake":"",s)})}const RJ=8,tW=12,nW={height:`${RJ}px`,borderColor:"transparent"},oW={width:`${RJ}px`,borderColor:"transparent"},gHe={width:`${tW}px`,height:`${tW}px`,background:"transparent",border:"none"},kHe={width:"calc(10px / var(--rf-zoom, 1))",height:"calc(10px / var(--rf-zoom, 1))",background:"hsl(var(--background))",border:"calc(1px / var(--rf-zoom, 1)) solid hsl(var(--primary) / 0.6)",borderRadius:"calc(2px / var(--rf-zoom, 1))",zIndex:1},vHe=[{position:"top",style:nW},{position:"bottom",style:nW},{position:"left",style:oW},{position:"right",style:oW}],xHe=["top-left","top-right","bottom-left","bottom-right"],rW={pointerEvents:"none",cursor:"default"};function Vd({visible:e,minWidth:t=80,minHeight:n=40,onResizeStart:o,onResize:r,onResizeEnd:a,cornerVariant:i="invisible"}){const s=i==="visible"?kHe:gHe,c=h=>e?h:{...h,...rW},l=e?s:{...s,opacity:0,...rW};return f.jsxs(f.Fragment,{children:[vHe.map(({position:h,style:u})=>f.jsx(JU,{position:h,variant:Ti.Line,minWidth:t,minHeight:n,style:c(u),onResizeStart:o,onResize:r,onResizeEnd:a,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h)),xHe.map(h=>f.jsx(JU,{position:h,variant:Ti.Handle,minWidth:t,minHeight:n,style:l,autoScale:!1,onResizeStart:o,onResize:r,onResizeEnd:a,children:f.jsx("span",{"data-testid":"resize-control","data-position":h})},h))]})}function Bd(e){const{onResize:t,onResizeEnd:n,onResizeFinal:o,setResizing:r}=e,[a,i]=m.useState(!1),s=m.useRef(null),c=m.useRef(t),l=m.useRef(n),h=m.useRef(o),u=m.useRef(r);m.useEffect(()=>{c.current=t},[t]),m.useEffect(()=>{l.current=n},[n]),m.useEffect(()=>{h.current=o},[o]),m.useEffect(()=>{u.current=r},[r]);const p=m.useCallback((k,x)=>{var v;i(!0),(v=u.current)==null||v.call(u,!0),s.current=x?{x:x.x,y:x.y,width:x.width,height:x.height}:null},[]),y=m.useCallback((k,x)=>{var v;(v=c.current)==null||v.call(c,{x:x.x,y:x.y,width:x.width,height:x.height})},[]),g=m.useCallback((k,x)=>{var M,w,b,C;i(!1),(M=u.current)==null||M.call(u,!1);const v=s.current;s.current=null,!(v&&v.width===x.width&&v.height===x.height)&&((w=c.current)==null||w.call(c,{x:x.x,y:x.y,width:x.width,height:x.height}),(b=l.current)==null||b.call(l,{x:x.x,y:x.y,width:x.width,height:x.height}),v&&((C=h.current)==null||C.call(h,{x:x.x,y:x.y,width:x.width,height:x.height},v)))},[]);return{isResizing:a,onResizeStart:p,onResizeEvent:y,onResizeEnd:g}}const P0={width:48,height:48},wHe=24,MHe=24,Lp="sf:opacity-0 sf:transition-opacity";function bHe(e){return Ct(e,"text").color??"currentColor"}function _He({id:e,data:t,selected:n,isConnectable:o}){const{onResizeStart:r,onResizeEvent:a,onResizeEnd:i}=Bd({onResize:x=>{var v;return(v=t.onResize)==null?void 0:v.call(t,e,x)},onResizeEnd:x=>{var v;return(v=t.onResizeEnd)==null?void 0:v.call(t,e,x)},setResizing:t.setResizing}),s=t.width!==void 0||t.height!==void 0,c=!!t.onNameChange,[l,h]=m.useState(!1),{studioBaseUrl:u}=m.useContext(AF),p=bHe(t.color),y=t.strokeWidth??2,g={...s?{}:{width:P0.width,height:P0.height}},k=x=>{!c||l||(x.stopPropagation(),h(!0))};return f.jsxs("div",{className:ne("sf:group sf:relative",s?"sf:h-full sf:w-full":""),style:g,"data-testid":"icon-node","data-node-type":"icon",onDoubleClick:k,children:[f.jsx(Vd,{visible:!!n&&!!t.onResize&&!l,cornerVariant:"visible",minWidth:wHe,minHeight:MHe,onResizeStart:r,onResize:a,onResizeEnd:i}),f.jsx(st,{type:"target",position:fe.Top,id:"t",isConnectable:o,className:ne(Lp,n&&"sf:opacity-100!")}),f.jsx(st,{type:"target",position:fe.Left,id:"l",isConnectable:o,className:ne(Lp,n&&"sf:opacity-100!")}),f.jsx(zY,{iconId:t.icon,studioBaseUrl:u,color:p,strokeWidth:y,absoluteStrokeWidth:!0,ariaLabel:t.alt,className:"sf:block sf:h-full sf:w-full sf:pointer-events-none sf:select-none"}),l&&c?f.jsx("div",{className:"sf:absolute sf:left-0 sf:right-0 sf:top-full sf:mt-1 sf:text-center sf:text-xs sf:text-muted-foreground",children:f.jsx(vi,{initialValue:t.name??"",field:"icon-node-label",onCommit:x=>{var v;return(v=t.onNameChange)==null?void 0:v.call(t,e,x)},onExit:()=>h(!1),placeholder:"Label"})}):t.name?f.jsx("span",{"data-testid":"icon-node-label",className:"sf:pointer-events-none sf:absolute sf:left-0 sf:right-0 sf:top-full sf:mt-1 sf:truncate sf:text-center sf:text-xs sf:text-muted-foreground sf:select-none",children:t.name}):null,f.jsx(st,{type:"source",position:fe.Right,id:"r",isConnectable:o,className:ne(Lp,n&&"sf:opacity-100!")}),f.jsx(st,{type:"source",position:fe.Bottom,id:"b",isConnectable:o,className:ne(Lp,n&&"sf:opacity-100!")})]})}function CHe(e,t){return e.selected===t.selected&&e.data===t.data&&e.width===t.width&&e.height===t.height}const SHe=m.memo(_He,CHe);function LHe(e,t){const n=e.screenToFlowPosition({x:t.width/2,y:t.height/2});return{x:n.x-P0.width/2,y:n.y-P0.height/2}}const TJ="seeflow:icon-recents",NHe=16;function DJ(){if(typeof window>"u")return[];try{const e=window.localStorage.getItem(TJ);if(e===null)return[];const t=JSON.parse(e);return Array.isArray(t)?t.every(n=>typeof n=="string")?t:[]:[]}catch{return[]}}function IHe(e){if(!(typeof window>"u"))try{const n=DJ().filter(r=>r!==e),o=[e,...n].slice(0,NHe);window.localStorage.setItem(TJ,JSON.stringify(o))}catch{}}const AHe=typeof navigator<"u"&&typeof navigator.platform=="string"&&navigator.platform.toLowerCase().includes("mac"),EHe=e=>e.length===1?e.toUpperCase():e==="Escape"?"Esc":e,Dt=(e,t=AHe)=>{const n=EHe(e.key);if(t){let r="";return e.meta&&(r+="⌘"),e.alt&&(r+="⌥"),e.shift&&(r+="⇧"),`${r}${n}`}const o=[];return e.meta&&o.push("Ctrl"),e.shift&&o.push("Shift"),e.alt&&o.push("Alt"),o.push(n),o.join("+")},KF=[{id:"tool.select",label:"Select tool",description:"Switch to the selection tool",category:"Tools",shortcut:Dt({key:"V"})},{id:"tool.hand",label:"Hand tool",description:"Pan the canvas; node interaction is suspended while armed",category:"Tools",shortcut:Dt({key:"H"})},{id:"tool.rectangle",label:"Rectangle",description:"Draw rectangle nodes",category:"Tools",shortcut:Dt({key:"R"})},{id:"tool.ellipse",label:"Ellipse",description:"Draw ellipse nodes",category:"Tools",shortcut:Dt({key:"O"})},{id:"tool.text",label:"Text",description:"Add a text node",category:"Tools",shortcut:Dt({key:"T"})},{id:"tool.sticky",label:"Sticky note",description:"Add a sticky note",category:"Tools",shortcut:Dt({key:"S"})},{id:"tool.database",label:"Database",description:"Add a database node",category:"Tools",shortcut:Dt({key:"D"})},{id:"tool.server",label:"Server",description:"Add a server node",category:"Tools"},{id:"tool.user",label:"User",description:"Add a user node",category:"Tools"},{id:"tool.queue",label:"Queue",description:"Add a queue node",category:"Tools"},{id:"tool.cloud",label:"Cloud",description:"Add a cloud node",category:"Tools"},{id:"tool.diamond",label:"Diamond",description:"Add a diamond node (decision / gateway)",category:"Tools"},{id:"tool.hexagon",label:"Hexagon",description:"Add a hexagon node (microservice)",category:"Tools"},{id:"tool.linkflow",label:"Link node",description:"Add a link node and pick a target flow",category:"Tools"},{id:"edit.undo",label:"Undo",category:"Edit",shortcut:Dt({meta:!0,key:"Z"}),enabled:e=>e.canUndo},{id:"edit.redo",label:"Redo",category:"Edit",shortcut:Dt({meta:!0,shift:!0,key:"Z"}),enabled:e=>e.canRedo},{id:"edit.copy",label:"Copy",category:"Edit",shortcut:Dt({meta:!0,key:"C"}),enabled:e=>e.hasSelection},{id:"edit.paste",label:"Paste",category:"Edit",shortcut:Dt({meta:!0,key:"V"}),enabled:e=>e.hasClipboard},{id:"edit.duplicate",label:"Duplicate",category:"Edit",shortcut:Dt({meta:!0,key:"D"}),enabled:e=>e.hasSelection},{id:"edit.delete",label:"Delete",category:"Edit",shortcut:Dt({key:"Delete"}),enabled:e=>e.hasSelection},{id:"edit.selectAll",label:"Select all",category:"Edit",shortcut:Dt({meta:!0,key:"A"})},{id:"view.fit",label:"Fit view",description:"Fit everything in the viewport",category:"View",shortcut:Dt({meta:!0,key:"0"})},{id:"view.zoomIn",label:"Zoom in",category:"View",shortcut:Dt({meta:!0,key:"="})},{id:"view.zoomOut",label:"Zoom out",category:"View",shortcut:Dt({meta:!0,key:"-"})},{id:"view.zoom100",label:"Zoom to 100%",category:"View",shortcut:Dt({key:"1"})},{id:"view.zoomToSelection",label:"Zoom to selection",category:"View",shortcut:Dt({key:"F"}),enabled:e=>e.hasSelection},{id:"layout.tidy",label:"Tidy layout",description:"Auto-layout the canvas or current selection",category:"Layout",shortcut:Dt({meta:!0,shift:!0,key:"L"})},{id:"selection.deselect",label:"Deselect",description:"Clear selection and exit draw mode",category:"Selection",shortcut:Dt({key:"Escape"})},{id:"help.commandPalette",label:"Open command palette",category:"Help",shortcut:Dt({meta:!0,key:"P"})},{id:"export.pdf",label:"Export to PDF",description:"Download the current canvas as a PDF",category:"File",enabled:e=>e.canExportDemo},{id:"export.png",label:"Export as image",description:"Download the current canvas as a PNG",category:"File",enabled:e=>e.canExportDemo}],DT=e=>{const t=KF.find(n=>n.id===e);return t?t.shortcut?`${t.label} (${t.shortcut})`:t.label:""},jHe=1,$He=10,PHe=e=>{if(e.metaKey||e.ctrlKey||e.altKey)return null;const t=e.shiftKey?$He:jHe;switch(e.key){case"ArrowLeft":return{dx:-t,dy:0};case"ArrowRight":return{dx:t,dy:0};case"ArrowUp":return{dx:0,dy:-t};case"ArrowDown":return{dx:0,dy:t};default:return null}},zHe=e=>{if(!(e.metaKey||e.ctrlKey)||e.altKey)return null;switch(e.key){case"0":return"fit";case"=":case"+":return"in";case"-":case"_":return"out";default:return null}},RHe=(e,t,n)=>{if(t.length===0)return[];const o=new Map(n.map(a=>[a.id,a])),r=[];for(const a of t){const i=o.get(a);i&&r.push({id:a,position:{x:i.position.x+e.dx,y:i.position.y+e.dy}})}return r},THe=({event:e,isEditableActive:t,hasNodes:n,hasConnectors:o,selectedIds:r,hasClipboard:a})=>{if(!(e.metaKey||e.ctrlKey))return{type:"noop"};if(e.shiftKey||e.altKey)return{type:"noop"};const i=e.key.toLowerCase();return i!=="a"&&i!=="c"&&i!=="v"&&i!=="d"?{type:"noop"}:t?{type:"noop"}:i==="a"?!n&&!o?{type:"noop"}:{type:"selectAll"}:i==="c"?r.length===0?{type:"noop"}:{type:"copy",ids:r}:i==="d"?r.length===0?{type:"noop"}:{type:"duplicate",ids:r}:a?{type:"paste"}:{type:"noop"}},DHe=(e,t)=>{if(t.isEditableActive||!(e.metaKey||e.ctrlKey)||e.altKey)return null;const n=e.key.toLowerCase();return n==="z"?e.shiftKey?"redo":"undo":n==="y"&&!e.shiftKey?"redo":null},HHe=e=>{if(e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return null;switch(e.key.toLowerCase()){case"v":return"select";case"h":return"hand";case"r":return"rectangle";case"o":return"ellipse";case"t":return"text";case"s":return"sticky";case"d":return"database";default:return null}},ri="seeflow",HJ=e=>`${e}:last-used-style:v1`,HT=()=>({node:{},connector:{}}),OT=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),XF=e=>{var t;try{const n=(t=globalThis.localStorage)==null?void 0:t.getItem(HJ(e));if(!n)return HT();const o=JSON.parse(n);if(!OT(o))return HT();const r=OT(o.node)?o.node:{},a=OT(o.connector)?o.connector:{};return{node:r,connector:a}}catch{return HT()}},OJ=(e,t)=>{var n;try{(n=globalThis.localStorage)==null||n.setItem(HJ(e),JSON.stringify(t))}catch{}},T2=e=>XF(e),aW=(e,t)=>{const{alt:n,...o}=t,r={...o};r.borderSize!==void 0&&r.borderWidth===void 0?r.borderWidth=r.borderSize:r.borderWidth!==void 0&&r.borderSize===void 0&&(r.borderSize=r.borderWidth);const a=XF(e);OJ(e,{...a,node:{...a.node,...r}})},OHe=(e,t)=>{const n=XF(e);OJ(e,{...n,connector:{...n.connector,...t}})},ZF=1,iW=17,BH=(e,t)=>{if(!e)return{};const n={};for(const o of t)e[o]!==void 0&&(n[o]=e[o]);return n},FHe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","cornerRadius","shadow"],qHe=["borderColor","backgroundColor","borderSize","borderStyle","fontSize","shadow"],VHe=["fontSize"],BHe=["borderColor","borderWidth","borderStyle","shadow"];function sW(e,t,n){if(e==="text")return{width:t.width,height:t.height,fontSize:iW,...BH(n,VHe)};const o=e==="ellipse"?qHe:FHe;return{width:t.width,height:t.height,borderSize:ZF,fontSize:iW,...BH(n,o)}}function UHe(e,t,n){return{path:e,width:t.width,height:t.height,borderWidth:ZF,...BH(n,BHe)}}const kn=async(e,t,n,o,r)=>{const a={method:t},i={...o??{}};r!==void 0&&(i["content-type"]="application/json",a.body=JSON.stringify(r)),Object.keys(i).length>0&&(a.headers=i);const s=await e(n,a);if(!s.ok){let c=null;try{c=await s.json()}catch{}throw new Error((c==null?void 0:c.error)??`${t} ${n} → ${s.status}`)}return await s.json()},WHe=e=>{const{baseUrl:t,project:n,flow:o}=e,r=e.fetch??globalThis.fetch.bind(globalThis),a=e.EventSource??globalThis.EventSource,i=e.headers,s=`${t}/api/projects/${encodeURIComponent(n)}`,c=`${s}/flows/${encodeURIComponent(o)}`,l=`${t}/api/icons`;return{async createNode(u){const p=await kn(r,"POST",`${c}/nodes`,i,u);return{id:p.id,node:p.node}},async updateNode(u,p){await kn(r,"PATCH",`${c}/nodes/${u}`,i,p)},async updateNodePosition(u,p){return await kn(r,"PATCH",`${c}/nodes/${u}/position`,i,p)},async deleteNode(u){await kn(r,"DELETE",`${c}/nodes/${u}`,i)},async reorderNode(u,p){await kn(r,"PATCH",`${c}/nodes/${u}/order`,i,p)},async createConnector(u){return{id:(await kn(r,"POST",`${c}/connectors`,i,u)).id}},async updateConnector(u,p){await kn(r,"PATCH",`${c}/connectors/${u}`,i,p)},async deleteConnector(u){await kn(r,"DELETE",`${c}/connectors/${u}`,i)},async uploadImage(u,p,y){const g=new FormData;g.append("file",p),g.append("filename",y);const k=`${c}/nodes/${encodeURIComponent(u)}/files/upload`,x={method:"POST",body:g};i&&(x.headers={...i});const v=await r(k,x);if(!v.ok){let M=null;try{M=await v.json()}catch{}throw new Error((M==null?void 0:M.error)??`POST ${k} → ${v.status}`)}return await v.json()},async playAction(u){return await kn(r,"POST",`${c}/play/${u}`,i,{})},async openFile(u){await kn(r,"POST",`${s}/files/open`,i,{path:u})},async revealFile(u){await kn(r,"POST",`${s}/files/reveal`,i,{path:u})},async computeLayout(u,p){const y=await kn(r,"POST",`${t}/api/layout`,i,{nodes:u,edges:p});return{nodes:y.nodes,connectors:y.connectors}},icons:{async listPacks(){return(await kn(r,"GET",`${l}/packs`,i)).packs},async install(u,p){return{jobId:(await kn(r,"POST",`${l}/install`,i,{vendor:u,acceptTerms:p.acceptTerms??!1})).jobId}},subscribeJob(u,p){const y=`${l}/jobs/${encodeURIComponent(u)}/events`,g=new a(y);return g.onmessage=k=>{try{p(JSON.parse(k.data))}catch(x){console.error("icons.subscribeJob: failed to parse SSE payload",x)}},()=>g.close()},async remove(u){await kn(r,"DELETE",`${l}/packs/${encodeURIComponent(u)}`,i)},async getLicense(u){const p=await kn(r,"GET",`${l}/licenses/${encodeURIComponent(u)}`,i);return{summary:p.summary,url:p.url,requiresAcceptance:p.requiresAcceptance}}}}},GHe=500,KHe=500,XHe=2e3,ZHe=(e,t)=>{if(!e&&!t)return;if(!e)return{...t};if(!t)return{...e};const n={...t};for(const[o,r]of Object.entries(e))n[o]=r;return n},cW=(e,t,n)=>{const o=Date.now(),r=GHe,a=KHe,{stack:i,cursor:s}=e;if(t.coalesceKey&&s>0){const h=i[s-1];if(h&&h.coalesceKey===t.coalesceKey&&o-h.capturedAt<=a){const u=i.slice(0,s);return u[s-1]={...h,do:t.do,capturedAt:o,beforeFields:ZHe(h.beforeFields,t.beforeFields)},{stack:u,cursor:s}}}const c=i.slice(0,s);c.push({...t,capturedAt:o});let l=s+1;for(;c.length>r;)c.shift(),l-=1;return l<0&&(l=0),{stack:c,cursor:l}},YHe=e=>e.cursor===0?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor-1},entry:e.stack[e.cursor-1]},QHe=e=>e.cursor===e.stack.length?{state:e,entry:void 0}:{state:{...e,cursor:e.cursor+1},entry:e.stack[e.cursor]},FJ=()=>({stack:[],cursor:0}),lW=e=>e.cursor===e.stack.length?e:{stack:e.stack.slice(0,e.cursor),cursor:e.cursor},JHe=(e,t,n=Date.now(),o=XHe)=>n-t>o?FJ():e,eOe=new Set(["borderColor","backgroundColor","borderSize","borderWidth","borderStyle","fontSize","textAlign","cornerRadius","shadow","color","strokeWidth","target"]);function tOe(e,t){let n={stack:[],cursor:0},o=0;const r=new Set;let a=null;const i=()=>({canUndo:n.cursor>0,canRedo:n.cursor<n.stack.length}),s=()=>{const k=i();for(const x of r)x(k)},c=()=>{if(a){o=Date.now();return}const k=lW(n);o=Date.now(),k!==n&&(n=k,s())},l=k=>{if(a){a.ops.push({redo:k.do,undo:k.undo});return}n=cW(n,{...k,capturedAt:Date.now()}),s()},h={createNode:async k=>{c();const x=await e.createNode(k);return l({do:async()=>{await e.createNode({...k,id:x.id})},undo:async()=>{await e.deleteNode(x.id)}}),x},updateNode:async(k,x)=>{c();const{nodes:v}=t(),M=v.find(_=>_.id===k);if(!M){await e.updateNode(k,x);return}const w={},b=M.data??{};for(const _ of Object.keys(x))if(_==="position")w[_]=M.position;else if(_==="type")w[_]=M.type;else{const S=b[_];w[_]=S===void 0&&eOe.has(_)?null:S}await e.updateNode(k,x);const C=Object.keys(x).sort().join(",");l({do:async()=>{await e.updateNode(k,x)},undo:async()=>{await e.updateNode(k,w)},coalesceKey:`update:${k}:${C}`,beforeFields:w})},updateNodePosition:async(k,x)=>{c();const{nodes:v}=t(),M=v.find(C=>C.id===k),w=M==null?void 0:M.position,b=await e.updateNodePosition(k,x);return w&&l({do:async()=>{await e.updateNodePosition(k,x)},undo:async()=>{await e.updateNodePosition(k,w)},coalesceKey:`pos:${k}`}),b},deleteNode:async k=>{c();const{nodes:x,connectors:v}=t(),M=x.find(b=>b.id===k);if(!M){await e.deleteNode(k);return}const w=v.filter(b=>b.source===k||b.target===k);await e.deleteNode(k),l({do:async()=>{await e.deleteNode(k)},undo:async()=>{await e.createNode({id:M.id,type:M.type,position:M.position,data:M.data??{}});for(const b of w)try{await e.createConnector({id:b.id,source:b.source,target:b.target,sourceHandle:b.sourceHandle,targetHandle:b.targetHandle,sourceHandleAutoPicked:b.sourceHandleAutoPicked,targetHandleAutoPicked:b.targetHandleAutoPicked,sourcePin:b.sourcePin,targetPin:b.targetPin,label:b.label,style:b.style,color:b.color,direction:b.direction,eventName:b.eventName,queueName:b.queueName,method:b.method,url:b.url})}catch(C){console.warn(`[seeflow/canvas] failed to restore connector ${b.id} during deleteNode undo:`,C)}}})},reorderNode:async(k,x)=>{c();const{nodes:v}=t(),M=v.findIndex(w=>w.id===k);if(M<0){await e.reorderNode(k,x);return}await e.reorderNode(k,x),l({do:async()=>{await e.reorderNode(k,x)},undo:async()=>{await e.reorderNode(k,{op:"toIndex",index:M})}})},createConnector:async k=>{c();const x=await e.createConnector(k);return l({do:async()=>{await e.createConnector({...k,id:x.id})},undo:async()=>{await e.deleteConnector(x.id)}}),x},updateConnector:async(k,x)=>{c();const{connectors:v}=t(),M=v.find(_=>_.id===k);if(!M){await e.updateConnector(k,x);return}const w={},b=M;for(const _ of Object.keys(x))w[_]=b[_];await e.updateConnector(k,x);const C=Object.keys(x).sort().join(",");l({do:async()=>{await e.updateConnector(k,x)},undo:async()=>{await e.updateConnector(k,w)},coalesceKey:`update:conn:${k}:${C}`,beforeFields:w})},deleteConnector:async k=>{c();const{connectors:x}=t(),v=x.find(M=>M.id===k);if(!v){await e.deleteConnector(k);return}await e.deleteConnector(k),l({do:async()=>{await e.deleteConnector(k)},undo:async()=>{await e.createConnector({id:v.id,source:v.source,target:v.target,sourceHandle:v.sourceHandle,targetHandle:v.targetHandle,sourceHandleAutoPicked:v.sourceHandleAutoPicked,targetHandleAutoPicked:v.targetHandleAutoPicked,sourcePin:v.sourcePin,targetPin:v.targetPin,label:v.label,style:v.style,color:v.color,direction:v.direction,eventName:v.eventName,queueName:v.queueName,method:v.method,url:v.url})}})},uploadImage:(k,x,v)=>e.uploadImage(k,x,v),...e.playAction?{playAction:k=>e.playAction(k)}:{},...e.openFile?{openFile:k=>e.openFile(k)}:{},...e.revealFile?{revealFile:k=>e.revealFile(k)}:{},...e.computeLayout?{computeLayout:(k,x)=>e.computeLayout(k,x)}:{},...e.icons?{icons:e.icons}:{}};let u=Promise.resolve();const p=async()=>{const k=YHe(n);k.entry&&(n=k.state,s(),await k.entry.undo())},y=async()=>{const k=QHe(n);k.entry&&(n=k.state,s(),await k.entry.do())};return{adapter:h,history:{get canUndo(){return n.cursor>0},get canRedo(){return n.cursor<n.stack.length},undo:()=>{o=Date.now();const k=u.then(p);return u=k.then(()=>{},()=>{}),k},redo:()=>{o=Date.now();const k=u.then(y);return u=k.then(()=>{},()=>{}),k},clear:()=>{n=FJ(),s()},markExternalChange:()=>{const k=JHe(n,o);k!==n&&(n=k,s())},batch:async(k,x,v)=>{if(a)return x();const M=lW(n);o=Date.now(),M!==n&&(n=M,s());const w={name:k,ops:[]};a=w;try{const b=await x();if(a=null,w.ops.length>0){const C=w.ops.slice();n=cW(n,{do:async()=>{for(const _ of C)await _.redo()},undo:async()=>{for(let _=C.length-1;_>=0;_--)await C[_].undo()},coalesceKey:v==null?void 0:v.coalesceKey,capturedAt:Date.now()}),s()}return b}catch(b){a=null;for(let C=w.ops.length-1;C>=0;C--)try{await w.ops[C].undo()}catch(_){console.warn(`[seeflow/canvas] batch '${k}' rollback inverse rejected:`,_)}throw b}},subscribe:k=>(r.add(k),k(i()),()=>{r.delete(k)})}}}function qJ(e,t,n){let o=null,r=!1;const a=new ResizeObserver(()=>{r||(o!==null&&clearTimeout(o),o=setTimeout(()=>{o=null,!r&&n()},t))});return a.observe(e),()=>{r||(r=!0,o!==null&&(clearTimeout(o),o=null),a.disconnect())}}var it;(function(e){e.assertEqual=r=>{};function t(r){}e.assertIs=t;function n(r){throw new Error}e.assertNever=n,e.arrayToEnum=r=>{const a={};for(const i of r)a[i]=i;return a},e.getValidEnumValues=r=>{const a=e.objectKeys(r).filter(s=>typeof r[r[s]]!="number"),i={};for(const s of a)i[s]=r[s];return e.objectValues(i)},e.objectValues=r=>e.objectKeys(r).map(function(a){return r[a]}),e.objectKeys=typeof Object.keys=="function"?r=>Object.keys(r):r=>{const a=[];for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&a.push(i);return a},e.find=(r,a)=>{for(const i of r)if(a(i))return i},e.isInteger=typeof Number.isInteger=="function"?r=>Number.isInteger(r):r=>typeof r=="number"&&Number.isFinite(r)&&Math.floor(r)===r;function o(r,a=" | "){return r.map(i=>typeof i=="string"?`'${i}'`:i).join(a)}e.joinValues=o,e.jsonStringifyReplacer=(r,a)=>typeof a=="bigint"?a.toString():a})(it||(it={}));var dW;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(dW||(dW={}));const Ce=it.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fi=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},me=it.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Ea extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(a){return a.message},o={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union")i.unionErrors.map(r);else if(i.code==="invalid_return_type")r(i.returnTypeError);else if(i.code==="invalid_arguments")r(i.argumentsError);else if(i.path.length===0)o._errors.push(n(i));else{let s=o,c=0;for(;c<i.path.length;){const l=i.path[c];c===i.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(n(i))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return r(this),o}static assert(t){if(!(t instanceof Ea))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,it.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},o=[];for(const r of this.issues)if(r.path.length>0){const a=r.path[0];n[a]=n[a]||[],n[a].push(t(r))}else o.push(t(r));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ea.create=e=>new Ea(e);const UH=(e,t)=>{let n;switch(e.code){case me.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case me.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,it.jsonStringifyReplacer)}`;break;case me.unrecognized_keys:n=`Unrecognized key(s) in object: ${it.joinValues(e.keys,", ")}`;break;case me.invalid_union:n="Invalid input";break;case me.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${it.joinValues(e.options)}`;break;case me.invalid_enum_value:n=`Invalid enum value. Expected ${it.joinValues(e.options)}, received '${e.received}'`;break;case me.invalid_arguments:n="Invalid function arguments";break;case me.invalid_return_type:n="Invalid function return type";break;case me.invalid_date:n="Invalid date";break;case me.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:it.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case me.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case me.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case me.custom:n="Invalid input";break;case me.invalid_intersection_types:n="Intersection results could not be merged";break;case me.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case me.not_finite:n="Number must be finite";break;default:n=t.defaultError,it.assertNever(e)}return{message:n}};let nOe=UH;function oOe(){return nOe}const rOe=e=>{const{data:t,path:n,errorMaps:o,issueData:r}=e,a=[...n,...r.path||[]],i={...r,path:a};if(r.message!==void 0)return{...r,path:a,message:r.message};let s="";const c=o.filter(l=>!!l).slice().reverse();for(const l of c)s=l(i,{data:t,defaultError:s}).message;return{...r,path:a,message:s}};function Me(e,t){const n=oOe(),o=rOe({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===UH?void 0:UH].filter(r=>!!r)});e.common.issues.push(o)}class jn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const o=[];for(const r of n){if(r.status==="aborted")return Fe;r.status==="dirty"&&t.dirty(),o.push(r.value)}return{status:t.value,value:o}}static async mergeObjectAsync(t,n){const o=[];for(const r of n){const a=await r.key,i=await r.value;o.push({key:a,value:i})}return jn.mergeObjectSync(t,o)}static mergeObjectSync(t,n){const o={};for(const r of n){const{key:a,value:i}=r;if(a.status==="aborted"||i.status==="aborted")return Fe;a.status==="dirty"&&t.dirty(),i.status==="dirty"&&t.dirty(),a.value!=="__proto__"&&(typeof i.value<"u"||r.alwaysSet)&&(o[a.value]=i.value)}return{status:t.value,value:o}}}const Fe=Object.freeze({status:"aborted"}),D2=e=>({status:"dirty",value:e}),zo=e=>({status:"valid",value:e}),uW=e=>e.status==="aborted",hW=e=>e.status==="dirty",z0=e=>e.status==="valid",tz=e=>typeof Promise<"u"&&e instanceof Promise;var Ne;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ne||(Ne={}));class Xr{constructor(t,n,o,r){this._cachedPath=[],this.parent=t,this.data=n,this._path=o,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const fW=(e,t)=>{if(z0(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ea(e.common.issues);return this._error=n,this._error}}};function Xe(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:o,description:r}=e;if(t&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:r}:{errorMap:(i,s)=>{const{message:c}=e;return i.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:c??o??s.defaultError}:i.code!=="invalid_type"?{message:s.defaultError}:{message:c??n??s.defaultError}},description:r}}class et{get description(){return this._def.description}_getType(t){return fi(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new jn,ctx:{common:t.parent.common,data:t.data,parsedType:fi(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tz(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const o=this.safeParse(t,n);if(o.success)return o.data;throw o.error}safeParse(t,n){const o={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)},r=this._parseSync({data:t,path:o.path,parent:o});return fW(o,r)}"~validate"(t){var o,r;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)};if(!this["~standard"].async)try{const a=this._parseSync({data:t,path:[],parent:n});return z0(a)?{value:a.value}:{issues:n.common.issues}}catch(a){(r=(o=a==null?void 0:a.message)==null?void 0:o.toLowerCase())!=null&&r.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(a=>z0(a)?{value:a.value}:{issues:n.common.issues})}async parseAsync(t,n){const o=await this.safeParseAsync(t,n);if(o.success)return o.data;throw o.error}async safeParseAsync(t,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fi(t)},r=this._parse({data:t,path:o.path,parent:o}),a=await(tz(r)?r:Promise.resolve(r));return fW(o,a)}refine(t,n){const o=r=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(r):n;return this._refinement((r,a)=>{const i=t(r),s=()=>a.addIssue({code:me.custom,...o(r)});return typeof Promise<"u"&&i instanceof Promise?i.then(c=>c?!0:(s(),!1)):i?!0:(s(),!1)})}refinement(t,n){return this._refinement((o,r)=>t(o)?!0:(r.addIssue(typeof n=="function"?n(o,r):n),!1))}_refinement(t){return new D0({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return ji.create(this,this._def)}nullable(){return H0.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ur.create(this)}promise(){return iz.create(this,this._def)}or(t){return oz.create([this,t],this._def)}and(t){return rz.create(this,t,this._def)}transform(t){return new D0({...Xe(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ZH({...Xe(this._def),innerType:this,defaultValue:n,typeName:Oe.ZodDefault})}brand(){return new LOe({typeName:Oe.ZodBranded,type:this,...Xe(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new YH({...Xe(this._def),innerType:this,catchValue:n,typeName:Oe.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return YF.create(this,t)}readonly(){return QH.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const aOe=/^c[^\s-]{8,}$/i,iOe=/^[0-9a-z]+$/,sOe=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cOe=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,lOe=/^[a-z0-9_-]{21}$/i,dOe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,uOe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,hOe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fOe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let FT;const pOe=/^(?:(?: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])$/,yOe=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,mOe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,gOe=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,kOe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,vOe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,VJ="((\\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])))",xOe=new RegExp(`^${VJ}$`);function BJ(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function wOe(e){return new RegExp(`^${BJ(e)}$`)}function MOe(e){let t=`${VJ}T${BJ(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function bOe(e,t){return!!((t==="v4"||!t)&&pOe.test(e)||(t==="v6"||!t)&&mOe.test(e))}function _Oe(e,t){if(!dOe.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const o=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),r=JSON.parse(atob(o));return!(typeof r!="object"||r===null||"typ"in r&&(r==null?void 0:r.typ)!=="JWT"||!r.alg||t&&r.alg!==t)}catch{return!1}}function COe(e,t){return!!((t==="v4"||!t)&&yOe.test(e)||(t==="v6"||!t)&&gOe.test(e))}class Ma extends et{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.string,received:a.parsedType}),Fe}const o=new jn;let r;for(const a of this._def.checks)if(a.kind==="min")t.data.length<a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty());else if(a.kind==="max")t.data.length>a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),o.dirty());else if(a.kind==="length"){const i=t.data.length>a.value,s=t.data.length<a.value;(i||s)&&(r=this._getOrReturnCtx(t,r),i?Me(r,{code:me.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):s&&Me(r,{code:me.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),o.dirty())}else if(a.kind==="email")hOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"email",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="emoji")FT||(FT=new RegExp(fOe,"u")),FT.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"emoji",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="uuid")cOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"uuid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="nanoid")lOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"nanoid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="cuid")aOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="cuid2")iOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cuid2",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="ulid")sOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ulid",code:me.invalid_string,message:a.message}),o.dirty());else if(a.kind==="url")try{new URL(t.data)}catch{r=this._getOrReturnCtx(t,r),Me(r,{validation:"url",code:me.invalid_string,message:a.message}),o.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"regex",code:me.invalid_string,message:a.message}),o.dirty())):a.kind==="trim"?t.data=t.data.trim():a.kind==="includes"?t.data.includes(a.value,a.position)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),o.dirty()):a.kind==="toLowerCase"?t.data=t.data.toLowerCase():a.kind==="toUpperCase"?t.data=t.data.toUpperCase():a.kind==="startsWith"?t.data.startsWith(a.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{startsWith:a.value},message:a.message}),o.dirty()):a.kind==="endsWith"?t.data.endsWith(a.value)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:{endsWith:a.value},message:a.message}),o.dirty()):a.kind==="datetime"?MOe(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"datetime",message:a.message}),o.dirty()):a.kind==="date"?xOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"date",message:a.message}),o.dirty()):a.kind==="time"?wOe(a).test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{code:me.invalid_string,validation:"time",message:a.message}),o.dirty()):a.kind==="duration"?uOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"duration",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="ip"?bOe(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"ip",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="jwt"?_Oe(t.data,a.alg)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"jwt",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="cidr"?COe(t.data,a.version)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"cidr",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="base64"?kOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64",code:me.invalid_string,message:a.message}),o.dirty()):a.kind==="base64url"?vOe.test(t.data)||(r=this._getOrReturnCtx(t,r),Me(r,{validation:"base64url",code:me.invalid_string,message:a.message}),o.dirty()):it.assertNever(a);return{status:o.value,value:t.data}}_regex(t,n,o){return this.refinement(r=>t.test(r),{validation:n,code:me.invalid_string,...Ne.errToObj(o)})}_addCheck(t){return new Ma({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ne.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ne.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ne.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ne.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Ne.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ne.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ne.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ne.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Ne.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Ne.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Ne.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ne.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Ne.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Ne.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Ne.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Ne.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Ne.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Ne.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Ne.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Ne.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Ne.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Ne.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Ne.errToObj(n)})}nonempty(t){return this.min(1,Ne.errToObj(t))}trim(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ma({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Ma.create=e=>new Ma({checks:[],typeName:Oe.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Xe(e)});function SOe(e,t){const n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,r=n>o?n:o,a=Number.parseInt(e.toFixed(r).replace(".","")),i=Number.parseInt(t.toFixed(r).replace(".",""));return a%i/10**r}class R0 extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.number,received:a.parsedType}),Fe}let o;const r=new jn;for(const a of this._def.checks)a.kind==="int"?it.isInteger(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.invalid_type,expected:"integer",received:"float",message:a.message}),r.dirty()):a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),r.dirty()):a.kind==="multipleOf"?SOe(t.data,a.value)!==0&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):a.kind==="finite"?Number.isFinite(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_finite,message:a.message}),r.dirty()):it.assertNever(a);return{status:r.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ne.toString(n))}setLimit(t,n,o,r){return new R0({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Ne.toString(r)}]})}_addCheck(t){return new R0({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ne.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ne.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Ne.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ne.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ne.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&it.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(t===null||o.value<t)&&(t=o.value)}return Number.isFinite(n)&&Number.isFinite(t)}}R0.create=e=>new R0({checks:[],typeName:Oe.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Xe(e)});class cf extends et{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ce.bigint)return this._getInvalidInput(t);let o;const r=new jn;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?t.data<a.value:t.data<=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="max"?(a.inclusive?t.data>a.value:t.data>=a.value)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),r.dirty()):a.kind==="multipleOf"?t.data%a.value!==BigInt(0)&&(o=this._getOrReturnCtx(t,o),Me(o,{code:me.not_multiple_of,multipleOf:a.value,message:a.message}),r.dirty()):it.assertNever(a);return{status:r.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:Ce.bigint,received:n.parsedType}),Fe}gte(t,n){return this.setLimit("min",t,!0,Ne.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Ne.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Ne.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Ne.toString(n))}setLimit(t,n,o,r){return new cf({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:o,message:Ne.toString(r)}]})}_addCheck(t){return new cf({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ne.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ne.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ne.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ne.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Ne.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}cf.create=e=>new cf({checks:[],typeName:Oe.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Xe(e)});class WH extends et{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.boolean,received:o.parsedType}),Fe}return zo(t.data)}}WH.create=e=>new WH({typeName:Oe.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Xe(e)});class nz extends et{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_type,expected:Ce.date,received:a.parsedType}),Fe}if(Number.isNaN(t.data.getTime())){const a=this._getOrReturnCtx(t);return Me(a,{code:me.invalid_date}),Fe}const o=new jn;let r;for(const a of this._def.checks)a.kind==="min"?t.data.getTime()<a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),o.dirty()):a.kind==="max"?t.data.getTime()>a.value&&(r=this._getOrReturnCtx(t,r),Me(r,{code:me.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),o.dirty()):it.assertNever(a);return{status:o.value,value:new Date(t.data.getTime())}}_addCheck(t){return new nz({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Ne.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Ne.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}nz.create=e=>new nz({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:Oe.ZodDate,...Xe(e)});class pW extends et{_parse(t){if(this._getType(t)!==Ce.symbol){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.symbol,received:o.parsedType}),Fe}return zo(t.data)}}pW.create=e=>new pW({typeName:Oe.ZodSymbol,...Xe(e)});class yW extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.undefined,received:o.parsedType}),Fe}return zo(t.data)}}yW.create=e=>new yW({typeName:Oe.ZodUndefined,...Xe(e)});class mW extends et{_parse(t){if(this._getType(t)!==Ce.null){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.null,received:o.parsedType}),Fe}return zo(t.data)}}mW.create=e=>new mW({typeName:Oe.ZodNull,...Xe(e)});class gW extends et{constructor(){super(...arguments),this._any=!0}_parse(t){return zo(t.data)}}gW.create=e=>new gW({typeName:Oe.ZodAny,...Xe(e)});class GH extends et{constructor(){super(...arguments),this._unknown=!0}_parse(t){return zo(t.data)}}GH.create=e=>new GH({typeName:Oe.ZodUnknown,...Xe(e)});class Di extends et{_parse(t){const n=this._getOrReturnCtx(t);return Me(n,{code:me.invalid_type,expected:Ce.never,received:n.parsedType}),Fe}}Di.create=e=>new Di({typeName:Oe.ZodNever,...Xe(e)});class kW extends et{_parse(t){if(this._getType(t)!==Ce.undefined){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.void,received:o.parsedType}),Fe}return zo(t.data)}}kW.create=e=>new kW({typeName:Oe.ZodVoid,...Xe(e)});class Ur extends et{_parse(t){const{ctx:n,status:o}=this._processInputParams(t),r=this._def;if(n.parsedType!==Ce.array)return Me(n,{code:me.invalid_type,expected:Ce.array,received:n.parsedType}),Fe;if(r.exactLength!==null){const i=n.data.length>r.exactLength.value,s=n.data.length<r.exactLength.value;(i||s)&&(Me(n,{code:i?me.too_big:me.too_small,minimum:s?r.exactLength.value:void 0,maximum:i?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),o.dirty())}if(r.minLength!==null&&n.data.length<r.minLength.value&&(Me(n,{code:me.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()),r.maxLength!==null&&n.data.length>r.maxLength.value&&(Me(n,{code:me.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((i,s)=>r.type._parseAsync(new Xr(n,i,n.path,s)))).then(i=>jn.mergeArray(o,i));const a=[...n.data].map((i,s)=>r.type._parseSync(new Xr(n,i,n.path,s)));return jn.mergeArray(o,a)}get element(){return this._def.type}min(t,n){return new Ur({...this._def,minLength:{value:t,message:Ne.toString(n)}})}max(t,n){return new Ur({...this._def,maxLength:{value:t,message:Ne.toString(n)}})}length(t,n){return new Ur({...this._def,exactLength:{value:t,message:Ne.toString(n)}})}nonempty(t){return this.min(1,t)}}Ur.create=(e,t)=>new Ur({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Xe(t)});function ju(e){if(e instanceof Gt){const t={};for(const n in e.shape){const o=e.shape[n];t[n]=ji.create(ju(o))}return new Gt({...e._def,shape:()=>t})}else return e instanceof Ur?new Ur({...e._def,type:ju(e.element)}):e instanceof ji?ji.create(ju(e.unwrap())):e instanceof H0?H0.create(ju(e.unwrap())):e instanceof zd?zd.create(e.items.map(t=>ju(t))):e}class Gt extends et{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=it.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ce.object){const l=this._getOrReturnCtx(t);return Me(l,{code:me.invalid_type,expected:Ce.object,received:l.parsedType}),Fe}const{status:o,ctx:r}=this._processInputParams(t),{shape:a,keys:i}=this._getCached(),s=[];if(!(this._def.catchall instanceof Di&&this._def.unknownKeys==="strip"))for(const l in r.data)i.includes(l)||s.push(l);const c=[];for(const l of i){const h=a[l],u=r.data[l];c.push({key:{status:"valid",value:l},value:h._parse(new Xr(r,u,r.path,l)),alwaysSet:l in r.data})}if(this._def.catchall instanceof Di){const l=this._def.unknownKeys;if(l==="passthrough")for(const h of s)c.push({key:{status:"valid",value:h},value:{status:"valid",value:r.data[h]}});else if(l==="strict")s.length>0&&(Me(r,{code:me.unrecognized_keys,keys:s}),o.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const h of s){const u=r.data[h];c.push({key:{status:"valid",value:h},value:l._parse(new Xr(r,u,r.path,h)),alwaysSet:h in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const l=[];for(const h of c){const u=await h.key,p=await h.value;l.push({key:u,value:p,alwaysSet:h.alwaysSet})}return l}).then(l=>jn.mergeObjectSync(o,l)):jn.mergeObjectSync(o,c)}get shape(){return this._def.shape()}strict(t){return Ne.errToObj,new Gt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,o)=>{var a,i;const r=((i=(a=this._def).errorMap)==null?void 0:i.call(a,n,o).message)??o.defaultError;return n.code==="unrecognized_keys"?{message:Ne.errToObj(t).message??r}:{message:r}}}:{}})}strip(){return new Gt({...this._def,unknownKeys:"strip"})}passthrough(){return new Gt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Gt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Gt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Oe.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Gt({...this._def,catchall:t})}pick(t){const n={};for(const o of it.objectKeys(t))t[o]&&this.shape[o]&&(n[o]=this.shape[o]);return new Gt({...this._def,shape:()=>n})}omit(t){const n={};for(const o of it.objectKeys(this.shape))t[o]||(n[o]=this.shape[o]);return new Gt({...this._def,shape:()=>n})}deepPartial(){return ju(this)}partial(t){const n={};for(const o of it.objectKeys(this.shape)){const r=this.shape[o];t&&!t[o]?n[o]=r:n[o]=r.optional()}return new Gt({...this._def,shape:()=>n})}required(t){const n={};for(const o of it.objectKeys(this.shape))if(t&&!t[o])n[o]=this.shape[o];else{let a=this.shape[o];for(;a instanceof ji;)a=a._def.innerType;n[o]=a}return new Gt({...this._def,shape:()=>n})}keyof(){return UJ(it.objectKeys(this.shape))}}Gt.create=(e,t)=>new Gt({shape:()=>e,unknownKeys:"strip",catchall:Di.create(),typeName:Oe.ZodObject,...Xe(t)});Gt.strictCreate=(e,t)=>new Gt({shape:()=>e,unknownKeys:"strict",catchall:Di.create(),typeName:Oe.ZodObject,...Xe(t)});Gt.lazycreate=(e,t)=>new Gt({shape:e,unknownKeys:"strip",catchall:Di.create(),typeName:Oe.ZodObject,...Xe(t)});class oz extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o=this._def.options;function r(a){for(const s of a)if(s.result.status==="valid")return s.result;for(const s of a)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const i=a.map(s=>new Ea(s.ctx.common.issues));return Me(n,{code:me.invalid_union,unionErrors:i}),Fe}if(n.common.async)return Promise.all(o.map(async a=>{const i={...n,common:{...n.common,issues:[]},parent:null};return{result:await a._parseAsync({data:n.data,path:n.path,parent:i}),ctx:i}})).then(r);{let a;const i=[];for(const c of o){const l={...n,common:{...n.common,issues:[]},parent:null},h=c._parseSync({data:n.data,path:n.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!a&&(a={result:h,ctx:l}),l.common.issues.length&&i.push(l.common.issues)}if(a)return n.common.issues.push(...a.ctx.common.issues),a.result;const s=i.map(c=>new Ea(c));return Me(n,{code:me.invalid_union,unionErrors:s}),Fe}}get options(){return this._def.options}}oz.create=(e,t)=>new oz({options:e,typeName:Oe.ZodUnion,...Xe(t)});function KH(e,t){const n=fi(e),o=fi(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&o===Ce.object){const r=it.objectKeys(t),a=it.objectKeys(e).filter(s=>r.indexOf(s)!==-1),i={...e,...t};for(const s of a){const c=KH(e[s],t[s]);if(!c.valid)return{valid:!1};i[s]=c.data}return{valid:!0,data:i}}else if(n===Ce.array&&o===Ce.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let a=0;a<e.length;a++){const i=e[a],s=t[a],c=KH(i,s);if(!c.valid)return{valid:!1};r.push(c.data)}return{valid:!0,data:r}}else return n===Ce.date&&o===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class rz extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=(a,i)=>{if(uW(a)||uW(i))return Fe;const s=KH(a.value,i.value);return s.valid?((hW(a)||hW(i))&&n.dirty(),{status:n.value,value:s.data}):(Me(o,{code:me.invalid_intersection_types}),Fe)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([a,i])=>r(a,i)):r(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}rz.create=(e,t,n)=>new rz({left:e,right:t,typeName:Oe.ZodIntersection,...Xe(n)});class zd extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.array)return Me(o,{code:me.invalid_type,expected:Ce.array,received:o.parsedType}),Fe;if(o.data.length<this._def.items.length)return Me(o,{code:me.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Fe;!this._def.rest&&o.data.length>this._def.items.length&&(Me(o,{code:me.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const a=[...o.data].map((i,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new Xr(o,i,o.path,s)):null}).filter(i=>!!i);return o.common.async?Promise.all(a).then(i=>jn.mergeArray(n,i)):jn.mergeArray(n,a)}get items(){return this._def.items}rest(t){return new zd({...this._def,rest:t})}}zd.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new zd({items:e,typeName:Oe.ZodTuple,rest:null,...Xe(t)})};class az extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.object)return Me(o,{code:me.invalid_type,expected:Ce.object,received:o.parsedType}),Fe;const r=[],a=this._def.keyType,i=this._def.valueType;for(const s in o.data)r.push({key:a._parse(new Xr(o,s,o.path,s)),value:i._parse(new Xr(o,o.data[s],o.path,s)),alwaysSet:s in o.data});return o.common.async?jn.mergeObjectAsync(n,r):jn.mergeObjectSync(n,r)}get element(){return this._def.valueType}static create(t,n,o){return n instanceof et?new az({keyType:t,valueType:n,typeName:Oe.ZodRecord,...Xe(o)}):new az({keyType:Ma.create(),valueType:t,typeName:Oe.ZodRecord,...Xe(n)})}}class vW extends et{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.map)return Me(o,{code:me.invalid_type,expected:Ce.map,received:o.parsedType}),Fe;const r=this._def.keyType,a=this._def.valueType,i=[...o.data.entries()].map(([s,c],l)=>({key:r._parse(new Xr(o,s,o.path,[l,"key"])),value:a._parse(new Xr(o,c,o.path,[l,"value"]))}));if(o.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of i){const l=await c.key,h=await c.value;if(l.status==="aborted"||h.status==="aborted")return Fe;(l.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(l.value,h.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const c of i){const l=c.key,h=c.value;if(l.status==="aborted"||h.status==="aborted")return Fe;(l.status==="dirty"||h.status==="dirty")&&n.dirty(),s.set(l.value,h.value)}return{status:n.value,value:s}}}}vW.create=(e,t,n)=>new vW({valueType:t,keyType:e,typeName:Oe.ZodMap,...Xe(n)});class lf extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.parsedType!==Ce.set)return Me(o,{code:me.invalid_type,expected:Ce.set,received:o.parsedType}),Fe;const r=this._def;r.minSize!==null&&o.data.size<r.minSize.value&&(Me(o,{code:me.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),n.dirty()),r.maxSize!==null&&o.data.size>r.maxSize.value&&(Me(o,{code:me.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),n.dirty());const a=this._def.valueType;function i(c){const l=new Set;for(const h of c){if(h.status==="aborted")return Fe;h.status==="dirty"&&n.dirty(),l.add(h.value)}return{status:n.value,value:l}}const s=[...o.data.values()].map((c,l)=>a._parse(new Xr(o,c,o.path,l)));return o.common.async?Promise.all(s).then(c=>i(c)):i(s)}min(t,n){return new lf({...this._def,minSize:{value:t,message:Ne.toString(n)}})}max(t,n){return new lf({...this._def,maxSize:{value:t,message:Ne.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}lf.create=(e,t)=>new lf({valueType:e,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Xe(t)});class xW extends et{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}xW.create=(e,t)=>new xW({getter:e,typeName:Oe.ZodLazy,...Xe(t)});class XH extends et{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Me(n,{received:n.data,code:me.invalid_literal,expected:this._def.value}),Fe}return{status:"valid",value:t.data}}get value(){return this._def.value}}XH.create=(e,t)=>new XH({value:e,typeName:Oe.ZodLiteral,...Xe(t)});function UJ(e,t){return new T0({values:e,typeName:Oe.ZodEnum,...Xe(t)})}class T0 extends et{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),o=this._def.values;return Me(n,{expected:it.joinValues(o),received:n.parsedType,code:me.invalid_type}),Fe}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),o=this._def.values;return Me(n,{received:n.data,code:me.invalid_enum_value,options:o}),Fe}return zo(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return T0.create(t,{...this._def,...n})}exclude(t,n=this._def){return T0.create(this.options.filter(o=>!t.includes(o)),{...this._def,...n})}}T0.create=UJ;class wW extends et{_parse(t){const n=it.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(t);if(o.parsedType!==Ce.string&&o.parsedType!==Ce.number){const r=it.objectValues(n);return Me(o,{expected:it.joinValues(r),received:o.parsedType,code:me.invalid_type}),Fe}if(this._cache||(this._cache=new Set(it.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const r=it.objectValues(n);return Me(o,{received:o.data,code:me.invalid_enum_value,options:r}),Fe}return zo(t.data)}get enum(){return this._def.values}}wW.create=(e,t)=>new wW({values:e,typeName:Oe.ZodNativeEnum,...Xe(t)});class iz extends et{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return Me(n,{code:me.invalid_type,expected:Ce.promise,received:n.parsedType}),Fe;const o=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return zo(o.then(r=>this._def.type.parseAsync(r,{path:n.path,errorMap:n.common.contextualErrorMap})))}}iz.create=(e,t)=>new iz({type:e,typeName:Oe.ZodPromise,...Xe(t)});class D0 extends et{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:o}=this._processInputParams(t),r=this._def.effect||null,a={addIssue:i=>{Me(o,i),i.fatal?n.abort():n.dirty()},get path(){return o.path}};if(a.addIssue=a.addIssue.bind(a),r.type==="preprocess"){const i=r.transform(o.data,a);if(o.common.async)return Promise.resolve(i).then(async s=>{if(n.value==="aborted")return Fe;const c=await this._def.schema._parseAsync({data:s,path:o.path,parent:o});return c.status==="aborted"?Fe:c.status==="dirty"||n.value==="dirty"?D2(c.value):c});{if(n.value==="aborted")return Fe;const s=this._def.schema._parseSync({data:i,path:o.path,parent:o});return s.status==="aborted"?Fe:s.status==="dirty"||n.value==="dirty"?D2(s.value):s}}if(r.type==="refinement"){const i=s=>{const c=r.refinement(s,a);if(o.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(o.common.async===!1){const s=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?Fe:(s.status==="dirty"&&n.dirty(),i(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(s=>s.status==="aborted"?Fe:(s.status==="dirty"&&n.dirty(),i(s.value).then(()=>({status:n.value,value:s.value}))))}if(r.type==="transform")if(o.common.async===!1){const i=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!z0(i))return Fe;const s=r.transform(i.value,a);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(i=>z0(i)?Promise.resolve(r.transform(i.value,a)).then(s=>({status:n.value,value:s})):Fe);it.assertNever(r)}}D0.create=(e,t,n)=>new D0({schema:e,typeName:Oe.ZodEffects,effect:t,...Xe(n)});D0.createWithPreprocess=(e,t,n)=>new D0({schema:t,effect:{type:"preprocess",transform:e},typeName:Oe.ZodEffects,...Xe(n)});class ji extends et{_parse(t){return this._getType(t)===Ce.undefined?zo(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ji.create=(e,t)=>new ji({innerType:e,typeName:Oe.ZodOptional,...Xe(t)});class H0 extends et{_parse(t){return this._getType(t)===Ce.null?zo(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}H0.create=(e,t)=>new H0({innerType:e,typeName:Oe.ZodNullable,...Xe(t)});class ZH extends et{_parse(t){const{ctx:n}=this._processInputParams(t);let o=n.data;return n.parsedType===Ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ZH.create=(e,t)=>new ZH({innerType:e,typeName:Oe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Xe(t)});class YH extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o={...n,common:{...n.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return tz(r)?r.then(a=>({status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Ea(o.common.issues)},input:o.data})})):{status:"valid",value:r.status==="valid"?r.value:this._def.catchValue({get error(){return new Ea(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}YH.create=(e,t)=>new YH({innerType:e,typeName:Oe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Xe(t)});class MW extends et{_parse(t){if(this._getType(t)!==Ce.nan){const o=this._getOrReturnCtx(t);return Me(o,{code:me.invalid_type,expected:Ce.nan,received:o.parsedType}),Fe}return{status:"valid",value:t.data}}}MW.create=e=>new MW({typeName:Oe.ZodNaN,...Xe(e)});class LOe extends et{_parse(t){const{ctx:n}=this._processInputParams(t),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class YF extends et{_parse(t){const{status:n,ctx:o}=this._processInputParams(t);if(o.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?Fe:a.status==="dirty"?(n.dirty(),D2(a.value)):this._def.out._parseAsync({data:a.value,path:o.path,parent:o})})();{const r=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return r.status==="aborted"?Fe:r.status==="dirty"?(n.dirty(),{status:"dirty",value:r.value}):this._def.out._parseSync({data:r.value,path:o.path,parent:o})}}static create(t,n){return new YF({in:t,out:n,typeName:Oe.ZodPipeline})}}class QH extends et{_parse(t){const n=this._def.innerType._parse(t),o=r=>(z0(r)&&(r.value=Object.freeze(r.value)),r);return tz(n)?n.then(r=>o(r)):o(n)}unwrap(){return this._def.innerType}}QH.create=(e,t)=>new QH({innerType:e,typeName:Oe.ZodReadonly,...Xe(t)});var Oe;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Oe||(Oe={}));const ln=Ma.create,WJ=R0.create,NOe=WH.create,Nh=GH.create;Di.create;const ls=Ur.create,at=Gt.create,JH=oz.create;rz.create;zd.create;const bW=az.create,Np=XH.create,Ip=T0.create;iz.create;ji.create;H0.create;const IOe=at({$state:ln().min(1)}),ya=at({$action:ln().min(1)}),AOe=at({$cond:Nh(),$then:Nh(),$else:Nh().optional()}),Uo=e=>JH([e,IOe,ya,AOe]),Ht=Uo(ln()),fa=Uo(WJ()),Ap=Uo(NOe()),GJ={Card:at({title:Ht.optional()}),Separator:at({orientation:Uo(Ip(["horizontal","vertical"])).optional()}),Tabs:at({value:Ht.optional(),items:ls(at({id:ln(),label:ln()})),onChange:ya.optional()}),Accordion:at({items:ls(at({id:ln(),title:ln(),content:ln()}))}),Badge:at({label:Ht,variant:Uo(Ip(["default","secondary","destructive","outline"])).optional()}),Avatar:at({src:Ht.optional(),alt:Ht.optional(),fallback:Ht.optional()}),Progress:at({value:fa}),Skeleton:at({width:fa.optional(),height:fa.optional()}),Label:at({text:Ht}),Heading:at({level:Uo(JH([Np(1),Np(2),Np(3),Np(4)])).optional(),text:Ht}),Text:at({text:Ht,muted:Ap.optional()}),Icon:at({name:Ht,size:fa.optional()}),Chart:at({kind:Uo(Ip(["bar","line","area","pie"])),data:Uo(ls(bW(ln(),Nh()))),xKey:Ht.optional(),series:ls(at({key:ln(),label:ln().optional()})).optional()}),Table:at({columns:ls(at({key:ln(),label:ln()})),rows:Uo(ls(bW(ln(),Nh())))}),Metric:at({label:Ht,value:Uo(JH([ln(),WJ()]))}),CodeBlock:at({code:Ht,language:Ht.optional()}),Markdown:at({content:Ht}),Button:at({label:Ht,variant:Uo(Ip(["default","destructive","outline","secondary","ghost","link"])).optional(),onClick:ya.optional(),disabled:Ap.optional()}),Input:at({value:Ht.optional(),placeholder:Ht.optional(),onChange:ya.optional()}),Checkbox:at({checked:Ap.optional(),onChange:ya.optional(),label:Ht.optional()}),Switch:at({checked:Ap.optional(),onChange:ya.optional()}),Select:at({value:Ht.optional(),items:ls(at({value:ln(),label:ln()})),onChange:ya.optional()}),Textarea:at({value:Ht.optional(),placeholder:Ht.optional(),rows:fa.optional(),onChange:ya.optional()}),Slider:at({value:fa.optional(),min:fa.optional(),max:fa.optional(),step:fa.optional(),onChange:ya.optional()})},KJ=Object.keys(GJ);Object.fromEntries(KJ.map(e=>[e,{props:GJ[e],description:e}]));function _W(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zr(...e){return t=>{let n=!1;const o=e.map(r=>{const a=_W(r,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let r=0;r<o.length;r++){const a=o[r];typeof a=="function"?a():_W(e[r],null)}}}}function mt(...e){return m.useCallback(Zr(...e),e)}var EOe=Symbol.for("react.lazy"),sz=RO[" use ".trim().toString()];function jOe(e){return typeof e=="object"&&e!==null&&"then"in e}function XJ(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===EOe&&"_payload"in e&&jOe(e._payload)}function $Oe(e){const t=zOe(e),n=m.forwardRef((o,r)=>{let{children:a,...i}=o;XJ(a)&&typeof sz=="function"&&(a=sz(a._payload));const s=m.Children.toArray(a),c=s.find(TOe);if(c){const l=c.props.children,h=s.map(u=>u===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:u);return f.jsx(t,{...i,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}var POe=$Oe("Slot");function zOe(e){const t=m.forwardRef((n,o)=>{let{children:r,...a}=n;if(XJ(r)&&typeof sz=="function"&&(r=sz(r._payload)),m.isValidElement(r)){const i=HOe(r),s=DOe(a,r.props);return r.type!==m.Fragment&&(s.ref=o?Zr(o,i):i),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ROe=Symbol("radix.slottable");function TOe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ROe}function DOe(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{const c=a(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function HOe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const CW=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,SW=TY,ZJ=(e,t)=>n=>{var o;if((t==null?void 0:t.variants)==null)return SW(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:a}=t,i=Object.keys(r).map(l=>{const h=n==null?void 0:n[l],u=a==null?void 0:a[l];if(h===null)return null;const p=CW(h)||CW(u);return r[l][p]}),s=n&&Object.entries(n).reduce((l,h)=>{let[u,p]=h;return p===void 0||(l[u]=p),l},{}),c=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((l,h)=>{let{class:u,className:p,...y}=h;return Object.entries(y).every(g=>{let[k,x]=g;return Array.isArray(x)?x.includes({...a,...s}[k]):{...a,...s}[k]===x})?[...l,u,p]:l},[]);return SW(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},OOe=ZJ("sf:inline-flex sf:items-center sf:justify-center sf:whitespace-nowrap sf:rounded-md sf:text-sm sf:font-medium sf:ring-offset-background sf:transition-colors sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-2 sf:disabled:pointer-events-none sf:disabled:opacity-50",{variants:{variant:{default:"sf:bg-primary sf:text-primary-foreground sf:font-semibold sf:hover:bg-emerald-400",destructive:"sf:bg-destructive sf:text-destructive-foreground sf:hover:bg-destructive/90",outline:"sf:border sf:border-input sf:bg-background sf:hover:bg-secondary sf:hover:text-foreground",secondary:"sf:bg-secondary sf:text-secondary-foreground sf:hover:bg-secondary/80",ghost:"sf:text-muted-foreground sf:hover:bg-muted sf:hover:text-foreground",link:"sf:text-primary sf:underline-offset-4 sf:hover:underline"},size:{default:"sf:h-9 sf:px-4 sf:py-2",sm:"sf:h-8 sf:rounded-md sf:px-3",lg:"sf:h-11 sf:rounded-md sf:px-8",icon:"sf:h-9 sf:w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ke=m.forwardRef(({className:e,variant:t,size:n,asChild:o=!1,...r},a)=>{const i=o?POe:"button";return f.jsx(i,{className:ne(OOe({variant:t,size:n,className:e})),ref:a,...r})});Ke.displayName="Button";function YJ(e,[t,n]){return Math.min(n,Math.max(t,e))}function Se(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function FOe(e,t){const n=m.createContext(t),o=a=>{const{children:i,...s}=a,c=m.useMemo(()=>s,Object.values(s));return f.jsx(n.Provider,{value:c,children:i})};o.displayName=e+"Provider";function r(a){const i=m.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,r]}function sr(e,t=[]){let n=[];function o(a,i){const s=m.createContext(i),c=n.length;n=[...n,i];const l=u=>{var v;const{scope:p,children:y,...g}=u,k=((v=p==null?void 0:p[e])==null?void 0:v[c])||s,x=m.useMemo(()=>g,Object.values(g));return f.jsx(k.Provider,{value:x,children:y})};l.displayName=a+"Provider";function h(u,p){var k;const y=((k=p==null?void 0:p[e])==null?void 0:k[c])||s,g=m.useContext(y);if(g)return g;if(i!==void 0)return i;throw new Error(`\`${u}\` must be used within \`${a}\``)}return[l,h]}const r=()=>{const a=n.map(i=>m.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return m.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return r.scopeName=e,[o,qOe(r,...t)]}function qOe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(a){const i=o.reduce((s,{useScope:c,scopeName:l})=>{const u=c(a)[`__scope${l}`];return{...s,...u}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var Hi=globalThis!=null&&globalThis.document?m.useLayoutEffect:()=>{},VOe=RO[" useInsertionEffect ".trim().toString()]||Hi;function Ud({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,a,i]=BOe({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:r;{const h=m.useRef(e!==void 0);m.useEffect(()=>{const u=h.current;u!==s&&console.warn(`${o} is changing from ${u?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=s},[s,o])}const l=m.useCallback(h=>{var u;if(s){const p=UOe(h)?h(e):h;p!==e&&((u=i.current)==null||u.call(i,p))}else a(h)},[s,e,a,i]);return[c,l]}function BOe({defaultProp:e,onChange:t}){const[n,o]=m.useState(e),r=m.useRef(n),a=m.useRef(t);return VOe(()=>{a.current=t},[t]),m.useEffect(()=>{var i;r.current!==n&&((i=a.current)==null||i.call(a,n),r.current=n)},[n,r]),[n,o,a]}function UOe(e){return typeof e=="function"}var WOe=m.createContext(void 0);function lR(e){const t=m.useContext(WOe);return e||t||"ltr"}function GOe(e){const t=m.useRef({value:e,previous:e});return m.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function QJ(e){const[t,n]=m.useState(void 0);return Hi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const a=r[0];let i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,s=l.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}function O0(e){const t=KOe(e),n=m.forwardRef((o,r)=>{const{children:a,...i}=o,s=m.Children.toArray(a),c=s.find(ZOe);if(c){const l=c.props.children,h=s.map(u=>u===c?m.Children.count(l)>1?m.Children.only(null):m.isValidElement(l)?l.props.children:null:u);return f.jsx(t,{...i,ref:r,children:m.isValidElement(l)?m.cloneElement(l,void 0,h):null})}return f.jsx(t,{...i,ref:r,children:a})});return n.displayName=`${e}.Slot`,n}function KOe(e){const t=m.forwardRef((n,o)=>{const{children:r,...a}=n;if(m.isValidElement(r)){const i=QOe(r),s=YOe(a,r.props);return r.type!==m.Fragment&&(s.ref=o?Zr(o,i):i),m.cloneElement(r,s)}return m.Children.count(r)>1?m.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var JJ=Symbol("radix.slottable");function XOe(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=JJ,t}function ZOe(e){return m.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===JJ}function YOe(e,t){const n={...t};for(const o in t){const r=e[o],a=t[o];/^on[A-Z]/.test(o)?r&&a?n[o]=(...s)=>{const c=a(...s);return r(...s),c}:r&&(n[o]=r):o==="style"?n[o]={...r,...a}:o==="className"&&(n[o]=[r,a].filter(Boolean).join(" "))}return{...e,...n}}function QOe(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var JOe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=JOe.reduce((e,t)=>{const n=O0(`Primitive.${t}`),o=m.forwardRef((r,a)=>{const{asChild:i,...s}=r,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(c,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function eee(e,t){e&&qd.flushSync(()=>e.dispatchEvent(t))}function QF(e){const t=e+"CollectionProvider",[n,o]=sr(t),[r,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=k=>{const{scope:x,children:v}=k,M=$r.useRef(null),w=$r.useRef(new Map).current;return f.jsx(r,{scope:x,itemMap:w,collectionRef:M,children:v})};i.displayName=t;const s=e+"CollectionSlot",c=O0(s),l=$r.forwardRef((k,x)=>{const{scope:v,children:M}=k,w=a(s,v),b=mt(x,w.collectionRef);return f.jsx(c,{ref:b,children:M})});l.displayName=s;const h=e+"CollectionItemSlot",u="data-radix-collection-item",p=O0(h),y=$r.forwardRef((k,x)=>{const{scope:v,children:M,...w}=k,b=$r.useRef(null),C=mt(x,b),_=a(h,v);return $r.useEffect(()=>(_.itemMap.set(b,{ref:b,...w}),()=>void _.itemMap.delete(b))),f.jsx(p,{[u]:"",ref:C,children:M})});y.displayName=h;function g(k){const x=a(e+"CollectionConsumer",k);return $r.useCallback(()=>{const M=x.collectionRef.current;if(!M)return[];const w=Array.from(M.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((_,S)=>w.indexOf(_.ref.current)-w.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:l,ItemSlot:y},g,o]}var tee=["PageUp","PageDown"],nee=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oee={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Y0="Slider",[eO,eFe,tFe]=QF(Y0),[ree]=sr(Y0,[tFe]),[nFe,dR]=ree(Y0),aee=m.forwardRef((e,t)=>{const{name:n,min:o=0,max:r=100,step:a=1,orientation:i="horizontal",disabled:s=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[o],value:h,onValueChange:u=()=>{},onValueCommit:p=()=>{},inverted:y=!1,form:g,...k}=e,x=m.useRef(new Set),v=m.useRef(0),w=i==="horizontal"?oFe:rFe,[b=[],C]=Ud({prop:h,defaultProp:l,onChange:j=>{var U;(U=[...x.current][v.current])==null||U.focus(),u(j)}}),_=m.useRef(b);function S(j){const z=lFe(b,j);N(j,z)}function E(j){N(j,v.current)}function P(){const j=_.current[v.current];b[v.current]!==j&&p(b)}function N(j,z,{commit:U}={commit:!1}){const A=fFe(a),T=pFe(Math.round((j-o)/a)*a+o,A),D=YJ(T,[o,r]);C((O=[])=>{const I=sFe(O,D,z);if(hFe(I,c*a)){v.current=I.indexOf(D);const R=String(I)!==String(O);return R&&U&&p(I),R?I:O}else return O})}return f.jsx(nFe,{scope:e.__scopeSlider,name:n,disabled:s,min:o,max:r,valueIndexToChangeRef:v,thumbs:x.current,values:b,orientation:i,form:g,children:f.jsx(eO.Provider,{scope:e.__scopeSlider,children:f.jsx(eO.Slot,{scope:e.__scopeSlider,children:f.jsx(w,{"aria-disabled":s,"data-disabled":s?"":void 0,...k,ref:t,onPointerDown:Se(k.onPointerDown,()=>{s||(_.current=b)}),min:o,max:r,inverted:y,onSlideStart:s?void 0:S,onSlideMove:s?void 0:E,onSlideEnd:s?void 0:P,onHomeKeyDown:()=>!s&&N(o,0,{commit:!0}),onEndKeyDown:()=>!s&&N(r,b.length-1,{commit:!0}),onStepKeyDown:({event:j,direction:z})=>{if(!s){const T=tee.includes(j.key)||j.shiftKey&&nee.includes(j.key)?10:1,D=v.current,O=b[D],I=a*T*z;N(O+I,D,{commit:!0})}}})})})})});aee.displayName=Y0;var[iee,see]=ree(Y0,{startEdge:"left",endEdge:"right",size:"width",direction:1}),oFe=m.forwardRef((e,t)=>{const{min:n,max:o,dir:r,inverted:a,onSlideStart:i,onSlideMove:s,onSlideEnd:c,onStepKeyDown:l,...h}=e,[u,p]=m.useState(null),y=mt(t,w=>p(w)),g=m.useRef(void 0),k=lR(r),x=k==="ltr",v=x&&!a||!x&&a;function M(w){const b=g.current||u.getBoundingClientRect(),C=[0,b.width],S=JF(C,v?[n,o]:[o,n]);return g.current=b,S(w-b.left)}return f.jsx(iee,{scope:e.__scopeSlider,startEdge:v?"left":"right",endEdge:v?"right":"left",direction:v?1:-1,size:"width",children:f.jsx(cee,{dir:k,"data-orientation":"horizontal",...h,ref:y,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const b=M(w.clientX);i==null||i(b)},onSlideMove:w=>{const b=M(w.clientX);s==null||s(b)},onSlideEnd:()=>{g.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=oee[v?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:C?-1:1})}})})}),rFe=m.forwardRef((e,t)=>{const{min:n,max:o,inverted:r,onSlideStart:a,onSlideMove:i,onSlideEnd:s,onStepKeyDown:c,...l}=e,h=m.useRef(null),u=mt(t,h),p=m.useRef(void 0),y=!r;function g(k){const x=p.current||h.current.getBoundingClientRect(),v=[0,x.height],w=JF(v,y?[o,n]:[n,o]);return p.current=x,w(k-x.top)}return f.jsx(iee,{scope:e.__scopeSlider,startEdge:y?"bottom":"top",endEdge:y?"top":"bottom",size:"height",direction:y?1:-1,children:f.jsx(cee,{"data-orientation":"vertical",...l,ref:u,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:k=>{const x=g(k.clientY);a==null||a(x)},onSlideMove:k=>{const x=g(k.clientY);i==null||i(x)},onSlideEnd:()=>{p.current=void 0,s==null||s()},onStepKeyDown:k=>{const v=oee[y?"from-bottom":"from-top"].includes(k.key);c==null||c({event:k,direction:v?-1:1})}})})}),cee=m.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:o,onSlideMove:r,onSlideEnd:a,onHomeKeyDown:i,onEndKeyDown:s,onStepKeyDown:c,...l}=e,h=dR(Y0,n);return f.jsx(Ve.span,{...l,ref:t,onKeyDown:Se(e.onKeyDown,u=>{u.key==="Home"?(i(u),u.preventDefault()):u.key==="End"?(s(u),u.preventDefault()):tee.concat(nee).includes(u.key)&&(c(u),u.preventDefault())}),onPointerDown:Se(e.onPointerDown,u=>{const p=u.target;p.setPointerCapture(u.pointerId),u.preventDefault(),h.thumbs.has(p)?p.focus():o(u)}),onPointerMove:Se(e.onPointerMove,u=>{u.target.hasPointerCapture(u.pointerId)&&r(u)}),onPointerUp:Se(e.onPointerUp,u=>{const p=u.target;p.hasPointerCapture(u.pointerId)&&(p.releasePointerCapture(u.pointerId),a(u))})})}),lee="SliderTrack",dee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=dR(lee,n);return f.jsx(Ve.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...o,ref:t})});dee.displayName=lee;var tO="SliderRange",uee=m.forwardRef((e,t)=>{const{__scopeSlider:n,...o}=e,r=dR(tO,n),a=see(tO,n),i=m.useRef(null),s=mt(t,i),c=r.values.length,l=r.values.map(p=>pee(p,r.min,r.max)),h=c>1?Math.min(...l):0,u=100-Math.max(...l);return f.jsx(Ve.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...o,ref:s,style:{...e.style,[a.startEdge]:h+"%",[a.endEdge]:u+"%"}})});uee.displayName=tO;var nO="SliderThumb",hee=m.forwardRef((e,t)=>{const n=eFe(e.__scopeSlider),[o,r]=m.useState(null),a=mt(t,s=>r(s)),i=m.useMemo(()=>o?n().findIndex(s=>s.ref.current===o):-1,[n,o]);return f.jsx(aFe,{...e,ref:a,index:i})}),aFe=m.forwardRef((e,t)=>{const{__scopeSlider:n,index:o,name:r,...a}=e,i=dR(nO,n),s=see(nO,n),[c,l]=m.useState(null),h=mt(t,M=>l(M)),u=c?i.form||!!c.closest("form"):!0,p=QJ(c),y=i.values[o],g=y===void 0?0:pee(y,i.min,i.max),k=cFe(o,i.values.length),x=p==null?void 0:p[s.size],v=x?dFe(x,g,s.direction):0;return m.useEffect(()=>{if(c)return i.thumbs.add(c),()=>{i.thumbs.delete(c)}},[c,i.thumbs]),f.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[s.startEdge]:`calc(${g}% + ${v}px)`},children:[f.jsx(eO.ItemSlot,{scope:e.__scopeSlider,children:f.jsx(Ve.span,{role:"slider","aria-label":e["aria-label"]||k,"aria-valuemin":i.min,"aria-valuenow":y,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...a,ref:h,style:y===void 0?{display:"none"}:e.style,onFocus:Se(e.onFocus,()=>{i.valueIndexToChangeRef.current=o})})}),u&&f.jsx(fee,{name:r??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:y},o)]})});hee.displayName=nO;var iFe="RadioBubbleInput",fee=m.forwardRef(({__scopeSlider:e,value:t,...n},o)=>{const r=m.useRef(null),a=mt(r,o),i=GOe(t);return m.useEffect(()=>{const s=r.current;if(!s)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&h){const u=new Event("input",{bubbles:!0});h.call(s,t),s.dispatchEvent(u)}},[i,t]),f.jsx(Ve.input,{style:{display:"none"},...n,ref:a,defaultValue:t})});fee.displayName=iFe;function sFe(e=[],t,n){const o=[...e];return o[n]=t,o.sort((r,a)=>r-a)}function pee(e,t,n){const a=100/(n-t)*(e-t);return YJ(a,[0,100])}function cFe(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function lFe(e,t){if(e.length===1)return 0;const n=e.map(r=>Math.abs(r-t)),o=Math.min(...n);return n.indexOf(o)}function dFe(e,t,n){const o=e/2,a=JF([0,50],[0,o]);return(o-a(t)*n)*n}function uFe(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function hFe(e,t){if(t>0){const n=uFe(e);return Math.min(...n)>=t}return!0}function JF(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function fFe(e){return(String(e).split(".")[1]||"").length}function pFe(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var yee=aee,yFe=dee,mFe=uee,gFe=hee;const eq=m.forwardRef(({className:e,...t},n)=>f.jsxs(yee,{ref:n,className:ne("sf:relative sf:flex sf:w-full sf:touch-none sf:select-none sf:items-center",e),...t,children:[f.jsx(yFe,{className:"sf:relative sf:h-1.5 sf:w-full sf:grow sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx(mFe,{className:"sf:absolute sf:h-full sf:bg-primary"})}),f.jsx(gFe,{className:"sf:block sf:h-4 sf:w-4 sf:rounded-full sf:border sf:border-primary/60 sf:bg-background sf:shadow-sm sf:transition-colors sf:hover:border-primary sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:disabled:pointer-events-none sf:disabled:opacity-50"})]}));eq.displayName=yee.displayName;const kFe={1:"sf:text-2xl sf:font-semibold sf:tracking-tight",2:"sf:text-xl sf:font-semibold sf:tracking-tight",3:"sf:text-lg sf:font-semibold",4:"sf:text-base sf:font-semibold"};function vFe({text:e,level:t=2}){const n=`h${t}`;return f.jsx(n,{className:ne(kFe[t]),children:e})}const mee=m.createContext({custom:{}});function xFe({value:e,children:t}){return f.jsx(mee.Provider,{value:e,children:t})}function wFe(){return m.useContext(mee)}function F0({name:e,as:t,size:n=16,fallback:o=jAe,...r}){const a=wFe(),i=t??(e?a.custom[e]:void 0)??(e?Zh[e]:void 0)??Zh[o];return i?f.jsx(i,{size:n,...r}):null}function MFe({name:e,size:t=16}){return f.jsx(F0,{name:e,size:t,"aria-hidden":!0})}function bFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?e:typeof e=="object"?JSON.stringify(e):String(e)}function _Fe({label:e,value:t}){return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-1",children:[f.jsx("span",{className:"sf:text-muted-foreground sf:text-xs sf:uppercase sf:tracking-wide",children:e}),f.jsx("span",{className:"sf:font-semibold sf:text-2xl sf:tabular-nums",children:bFe(t)})]})}function CFe(e){return e==null?"":typeof e=="string"||typeof e=="number"?String(e):JSON.stringify(e)}function SFe({columns:e=[],rows:t=[]}){return f.jsx("div",{className:"sf:w-full sf:overflow-x-auto",children:f.jsxs("table",{className:"sf:w-full sf:text-left sf:text-sm",children:[f.jsx("thead",{className:"sf:border-b sf:bg-muted/50",children:f.jsx("tr",{children:e.map(n=>f.jsx("th",{scope:"col",className:"sf:px-3 sf:py-2 sf:font-medium sf:text-muted-foreground",children:n.label},n.key))})}),f.jsx("tbody",{children:t.map((n,o)=>f.jsx("tr",{className:"sf:border-b last:sf:border-0",children:e.map(r=>f.jsx("td",{className:"sf:px-3 sf:py-2",children:CFe(n[r.key])},r.key))},o))})]})})}function LFe({text:e,muted:t}){return f.jsx("p",{className:ne("sf:text-sm",t&&"sf:text-muted-foreground"),children:e})}function NFe({title:e,children:t}){return f.jsxs("div",{className:"sf:bg-card sf:p-4 sf:text-card-foreground sf:shadow-sm",children:[e!==void 0?f.jsx("div",{className:"sf:mb-3 sf:font-semibold sf:text-base sf:leading-tight",children:e}):null,f.jsx("div",{className:"sf:flex sf:flex-col sf:gap-3",children:t})]})}function IFe({orientation:e="horizontal"}){return f.jsx("div",{"aria-orientation":e,className:ne("sf:bg-border",e==="horizontal"?"sf:h-px sf:w-full":"sf:h-full sf:w-px")})}function AFe({value:e,items:t,onChange:n,children:o}){const r=t??[];return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-2",children:[f.jsx("div",{className:"sf:inline-flex sf:h-9 sf:items-center sf:justify-start sf:rounded-md sf:bg-muted sf:p-1 sf:text-muted-foreground",children:r.map(a=>f.jsx("button",{type:"button","data-state":e===a.id?"active":"inactive",onClick:()=>n==null?void 0:n({value:a.id}),className:"sf:inline-flex sf:items-center sf:justify-center sf:whitespace-nowrap sf:rounded-sm sf:px-3 sf:py-1 sf:text-xs sf:font-medium sf:transition-all sf:data-[state=active]:bg-background sf:data-[state=active]:text-foreground sf:data-[state=active]:shadow-sm",children:a.label},a.id))}),o]})}function EFe({items:e}){const t=e??[];return f.jsx("div",{className:"sf:flex sf:flex-col sf:divide-y sf:rounded-md sf:border",children:t.map(n=>f.jsxs("details",{className:"sf:group sf:px-3 sf:py-2",children:[f.jsx("summary",{className:"sf:cursor-pointer sf:py-1 sf:font-medium sf:text-sm",children:n.title}),f.jsx("div",{className:"sf:py-2 sf:text-muted-foreground sf:text-sm",children:n.content})]},n.id))})}const LW={default:"sf:bg-primary sf:text-primary-foreground",secondary:"sf:bg-secondary sf:text-secondary-foreground",destructive:"sf:bg-destructive sf:text-destructive-foreground",outline:"sf:border sf:border-border sf:text-foreground"};function jFe({label:e,variant:t="default"}){return f.jsx("span",{className:ne("sf:inline-flex sf:items-center sf:rounded-full sf:px-2.5 sf:py-0.5 sf:font-medium sf:text-xs",LW[t]??LW.default),children:e})}function $Fe({src:e,alt:t,fallback:n}){return e?f.jsx("img",{src:e,alt:t??"",className:"sf:inline-block sf:h-9 sf:w-9 sf:rounded-full sf:object-cover"}):f.jsx("span",{className:"sf:inline-flex sf:h-9 sf:w-9 sf:items-center sf:justify-center sf:rounded-full sf:bg-muted sf:font-medium sf:text-muted-foreground sf:text-sm",children:n??"?"})}function PFe({value:e=0}){const t=Math.max(0,Math.min(100,e));return f.jsx("div",{"aria-valuenow":t,"aria-valuemin":0,"aria-valuemax":100,className:"sf:relative sf:h-2 sf:w-full sf:overflow-hidden sf:rounded-full sf:bg-secondary",children:f.jsx("div",{className:"sf:h-full sf:bg-primary sf:transition-all",style:{width:`${t}%`}})})}function zFe({width:e,height:t}){return f.jsx("div",{className:"sf:animate-pulse sf:rounded-md sf:bg-muted",style:{width:e??"100%",height:t??16}})}function RFe({text:e}){return f.jsx("span",{className:"sf:font-medium sf:text-sm sf:leading-none",children:e})}function TFe({label:e,variant:t="default",onClick:n,disabled:o}){return f.jsx(Ke,{variant:t,disabled:o,onClick:()=>n==null?void 0:n(),children:e})}const tq="sf:flex sf:h-9 sf:w-full sf:rounded-md sf:border sf:border-input sf:bg-background sf:px-3 sf:py-1 sf:text-sm sf:shadow-sm sf:transition-colors sf:placeholder:text-muted-foreground sf:focus-visible:outline-hidden sf:focus-visible:ring-1 sf:focus-visible:ring-ring sf:disabled:cursor-not-allowed sf:disabled:opacity-50";function DFe({value:e,placeholder:t,onChange:n}){return f.jsx("input",{type:"text",value:e??"",placeholder:t,onChange:o=>n==null?void 0:n({value:o.target.value}),className:tq})}function HFe({checked:e,onChange:t,label:n}){return f.jsxs("label",{className:"sf:inline-flex sf:items-center sf:gap-2 sf:text-sm",children:[f.jsx("input",{type:"checkbox",checked:e??!1,onChange:o=>t==null?void 0:t({checked:o.target.checked}),className:"sf:h-4 sf:w-4 sf:rounded sf:border sf:border-input sf:accent-primary"}),n]})}function OFe({checked:e,onChange:t}){return f.jsx("button",{type:"button",role:"switch","aria-checked":e??!1,onClick:()=>t==null?void 0:t({checked:!(e??!1)}),className:ne("sf:relative sf:inline-flex sf:h-5 sf:w-9 sf:shrink-0 sf:cursor-pointer sf:items-center sf:rounded-full sf:border-2 sf:border-transparent sf:transition-colors",e?"sf:bg-primary":"sf:bg-input"),children:f.jsx("span",{className:ne("sf:pointer-events-none sf:block sf:h-4 sf:w-4 sf:rounded-full sf:bg-background sf:shadow-lg sf:ring-0 sf:transition-transform",e?"sf:translate-x-4":"sf:translate-x-0")})})}function FFe({value:e,items:t,onChange:n}){return f.jsx("select",{value:e??"",onChange:o=>n==null?void 0:n({value:o.target.value}),className:tq,children:(t??[]).map(o=>f.jsx("option",{value:o.value,children:o.label},o.value))})}function qFe({value:e,placeholder:t,rows:n,onChange:o}){return f.jsx("textarea",{value:e??"",placeholder:t,rows:n,onChange:r=>o==null?void 0:o({value:r.target.value}),className:ne(tq,"sf:min-h-16 sf:py-2")})}function VFe({value:e,min:t=0,max:n=100,step:o=1,onChange:r}){return f.jsx(eq,{value:e===void 0?void 0:[e],min:t,max:n,step:o,onValueChange:a=>{const[i]=a;typeof i=="number"&&(r==null||r({value:i}))}})}const BFe=m.lazy(()=>X0(()=>import("./chart-D2hW0kXw.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])));function UFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(BFe,{...e})})}const WFe=m.lazy(()=>X0(()=>import("./markdown--co0piIh.js"),[]));function GFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(WFe,{...e})})}const KFe=m.lazy(()=>X0(()=>import("./code-block-SZDhhr7T.js"),[]));function XFe(e){return f.jsx(m.Suspense,{fallback:null,children:f.jsx(KFe,{...e})})}const gee={Card:NFe,Separator:IFe,Tabs:AFe,Accordion:EFe,Badge:jFe,Avatar:$Fe,Progress:PFe,Skeleton:zFe,Label:RFe,Heading:vFe,Text:LFe,Icon:MFe,Chart:UFe,Table:SFe,Metric:_Fe,CodeBlock:XFe,Markdown:GFe,Button:TFe,Input:DFe,Checkbox:HFe,Switch:OFe,Select:FFe,Textarea:qFe,Slider:VFe},NW=KJ.filter(e=>gee[e]===void 0);if(NW.length>0)throw new Error(`componentRegistry is missing impls for: ${NW.join(", ")}. Every catalog entry in COMPONENT_NAMES must have a matching component impl.`);const ZFe={components:gee};function YFe(e,t){return t.kind==="set"?{...e,[t.path]:t.value}:{...e,...t.partial}}function kee(e){return e===null||typeof e!="object"?!1:"$state"in e||"$action"in e||"$param"in e||"$cond"in e}function cP(e,t,n,o){if(!kee(e))return e;if(typeof e.$state=="string")return t[e.$state];if(typeof e.$action=="string"){const r=e.$action;return o.has(r)?a=>n(r,a):void 0}if("$cond"in e){const r=cP(e.$cond,t,n,o);return cP(r?e.$then:e.$else,t,n,o)}return e}function QFe(e,t,n,o){if(!e)return{};const r={};for(const[a,i]of Object.entries(e))r[a]=cP(i,t,n,o);return r}function IW({spec:e,nodeId:t,apiBaseUrl:n="/api",projectSlug:o,flowSlug:r}){const[a,i]=m.useReducer(YFe,e.state??{}),s=new Set(Object.keys(e.actions??{})),c=m.useCallback(async(l,h)=>{var y;const u=(y=e.actions)==null?void 0:y[l];if(!u)return;if(u.kind==="set"){const g=JFe(u.value,h,a);i({kind:"set",path:u.path,value:g});return}if(!o||!r)return;const p=`${n}/projects/${encodeURIComponent(o)}/flows/${encodeURIComponent(r)}/nodes/${encodeURIComponent(t)}/actions/${encodeURIComponent(l)}`;try{const g=await fetch(p,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(h??{})});if(!g.ok){const x=await g.text();i({kind:"set",path:`/__errors/${l}`,value:x});return}const k=await g.json();k!==null&&typeof k=="object"&&i({kind:"merge",partial:k})}catch(g){i({kind:"set",path:`/__errors/${l}`,value:g instanceof Error?g.message:String(g)})}},[e.actions,o,r,n,t,a]);return vee(e.root,e,a,c,s)}function JFe(e,t,n){return kee(e)?typeof e.$param=="string"?t!==null&&typeof t=="object"?t[e.$param]:void 0:typeof e.$state=="string"?n[e.$state]:e:e}function vee(e,t,n,o,r){const a=t.elements[e];if(!a)return null;const i=ZFe.components[a.type];if(!i)return null;const s=QFe(a.props,n,o,r),l=(a.children??[]).map(h=>f.jsx(eqe,{children:vee(h,t,n,o,r)},h));return f.jsx(i,{...s,children:l.length>0?l:void 0})}function eqe({children:e}){return e}function Yr(e){const t=m.useRef(e);return m.useEffect(()=>{t.current=e}),m.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function tqe(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e);m.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var nqe="DismissableLayer",oO="dismissableLayer.update",oqe="dismissableLayer.pointerDownOutside",rqe="dismissableLayer.focusOutside",AW,xee=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Af=m.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,l=m.useContext(xee),[h,u]=m.useState(null),p=(h==null?void 0:h.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=m.useState({}),g=mt(t,S=>u(S)),k=Array.from(l.layers),[x]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=k.indexOf(x),M=h?k.indexOf(h):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,b=M>=v,C=sqe(S=>{const E=S.target,P=[...l.branches].some(N=>N.contains(E));!b||P||(r==null||r(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),_=cqe(S=>{const E=S.target;[...l.branches].some(N=>N.contains(E))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return tqe(S=>{M===l.layers.size-1&&(o==null||o(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),m.useEffect(()=>{if(h)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(AW=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(h)),l.layers.add(h),EW(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=AW)}},[h,p,n,l]),m.useEffect(()=>()=>{h&&(l.layers.delete(h),l.layersWithOutsidePointerEventsDisabled.delete(h),EW())},[h,l]),m.useEffect(()=>{const S=()=>y({});return document.addEventListener(oO,S),()=>document.removeEventListener(oO,S)},[]),f.jsx(Ve.div,{...c,ref:g,style:{pointerEvents:w?b?"auto":"none":void 0,...e.style},onFocusCapture:Se(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Se(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Se(e.onPointerDownCapture,C.onPointerDownCapture)})});Af.displayName=nqe;var aqe="DismissableLayerBranch",iqe=m.forwardRef((e,t)=>{const n=m.useContext(xee),o=m.useRef(null),r=mt(t,o);return m.useEffect(()=>{const a=o.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(Ve.div,{...e,ref:r})});iqe.displayName=aqe;function sqe(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e),o=m.useRef(!1),r=m.useRef(()=>{});return m.useEffect(()=>{const a=s=>{if(s.target&&!o.current){let c=function(){wee(oqe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function cqe(e,t=globalThis==null?void 0:globalThis.document){const n=Yr(e),o=m.useRef(!1);return m.useEffect(()=>{const r=a=>{a.target&&!o.current&&wee(rqe,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function EW(){const e=new CustomEvent(oO);document.dispatchEvent(e)}function wee(e,t,n,{discrete:o}){const r=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?eee(r,a):r.dispatchEvent(a)}var qT=0;function nq(){m.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jW()),document.body.insertAdjacentElement("beforeend",e[1]??jW()),qT++,()=>{qT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),qT--}},[])}function jW(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var VT="focusScope.autoFocusOnMount",BT="focusScope.autoFocusOnUnmount",$W={bubbles:!1,cancelable:!0},lqe="FocusScope",uR=m.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...i}=e,[s,c]=m.useState(null),l=Yr(r),h=Yr(a),u=m.useRef(null),p=mt(t,k=>c(k)),y=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(o){let k=function(w){if(y.paused||!s)return;const b=w.target;s.contains(b)?u.current=b:ai(u.current,{select:!0})},x=function(w){if(y.paused||!s)return;const b=w.relatedTarget;b!==null&&(s.contains(b)||ai(u.current,{select:!0}))},v=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&ai(s)};document.addEventListener("focusin",k),document.addEventListener("focusout",x);const M=new MutationObserver(v);return s&&M.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",x),M.disconnect()}}},[o,s,y.paused]),m.useEffect(()=>{if(s){zW.add(y);const k=document.activeElement;if(!s.contains(k)){const v=new CustomEvent(VT,$W);s.addEventListener(VT,l),s.dispatchEvent(v),v.defaultPrevented||(dqe(yqe(Mee(s)),{select:!0}),document.activeElement===k&&ai(s))}return()=>{s.removeEventListener(VT,l),setTimeout(()=>{const v=new CustomEvent(BT,$W);s.addEventListener(BT,h),s.dispatchEvent(v),v.defaultPrevented||ai(k??document.body,{select:!0}),s.removeEventListener(BT,h),zW.remove(y)},0)}}},[s,l,h,y]);const g=m.useCallback(k=>{if(!n&&!o||y.paused)return;const x=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,v=document.activeElement;if(x&&v){const M=k.currentTarget,[w,b]=uqe(M);w&&b?!k.shiftKey&&v===b?(k.preventDefault(),n&&ai(w,{select:!0})):k.shiftKey&&v===w&&(k.preventDefault(),n&&ai(b,{select:!0})):v===M&&k.preventDefault()}},[n,o,y.paused]);return f.jsx(Ve.div,{tabIndex:-1,...i,ref:p,onKeyDown:g})});uR.displayName=lqe;function dqe(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(ai(o,{select:t}),document.activeElement!==n)return}function uqe(e){const t=Mee(e),n=PW(t,e),o=PW(t.reverse(),e);return[n,o]}function Mee(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function PW(e,t){for(const n of e)if(!hqe(n,{upTo:t}))return n}function hqe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fqe(e){return e instanceof HTMLInputElement&&"select"in e}function ai(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fqe(e)&&t&&e.select()}}var zW=pqe();function pqe(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=RW(e,t),e.unshift(t)},remove(t){var n;e=RW(e,t),(n=e[0])==null||n.resume()}}}function RW(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function yqe(e){return e.filter(t=>t.tagName!=="A")}var mqe=RO[" useId ".trim().toString()]||(()=>{}),gqe=0;function En(e){const[t,n]=m.useState(mqe());return Hi(()=>{n(o=>o??String(gqe++))},[e]),e||(t?`radix-${t}`:"")}const kqe=["top","right","bottom","left"],Oi=Math.min,oo=Math.max,cz=Math.round,Ep=Math.floor,Wr=e=>({x:e,y:e}),vqe={left:"right",right:"left",bottom:"top",top:"bottom"};function rO(e,t,n){return oo(e,Oi(t,n))}function ja(e,t){return typeof e=="function"?e(t):e}function $a(e){return e.split("-")[0]}function Q0(e){return e.split("-")[1]}function oq(e){return e==="x"?"y":"x"}function rq(e){return e==="y"?"height":"width"}function Or(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function aq(e){return oq(Or(e))}function xqe(e,t,n){n===void 0&&(n=!1);const o=Q0(e),r=aq(e),a=rq(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=lz(i)),[i,lz(i)]}function wqe(e){const t=lz(e);return[aO(e),t,aO(t)]}function aO(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const TW=["left","right"],DW=["right","left"],Mqe=["top","bottom"],bqe=["bottom","top"];function _qe(e,t,n){switch(e){case"top":case"bottom":return n?t?DW:TW:t?TW:DW;case"left":case"right":return t?Mqe:bqe;default:return[]}}function Cqe(e,t,n,o){const r=Q0(e);let a=_qe($a(e),n==="start",o);return r&&(a=a.map(i=>i+"-"+r),t&&(a=a.concat(a.map(aO)))),a}function lz(e){const t=$a(e);return vqe[t]+e.slice(t.length)}function Sqe(e){return{top:0,right:0,bottom:0,left:0,...e}}function bee(e){return typeof e!="number"?Sqe(e):{top:e,right:e,bottom:e,left:e}}function dz(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function HW(e,t,n){let{reference:o,floating:r}=e;const a=Or(t),i=aq(t),s=rq(i),c=$a(t),l=a==="y",h=o.x+o.width/2-r.width/2,u=o.y+o.height/2-r.height/2,p=o[s]/2-r[s]/2;let y;switch(c){case"top":y={x:h,y:o.y-r.height};break;case"bottom":y={x:h,y:o.y+o.height};break;case"right":y={x:o.x+o.width,y:u};break;case"left":y={x:o.x-r.width,y:u};break;default:y={x:o.x,y:o.y}}switch(Q0(t)){case"start":y[i]-=p*(n&&l?-1:1);break;case"end":y[i]+=p*(n&&l?-1:1);break}return y}async function Lqe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:a,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:h="viewport",elementContext:u="floating",altBoundary:p=!1,padding:y=0}=ja(t,e),g=bee(y),x=s[p?u==="floating"?"reference":"floating":u],v=dz(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:l,rootBoundary:h,strategy:c})),M=u==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),b=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=dz(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:M,offsetParent:w,strategy:c}):M);return{top:(v.top-C.top+g.top)/b.y,bottom:(C.bottom-v.bottom+g.bottom)/b.y,left:(v.left-C.left+g.left)/b.x,right:(C.right-v.right+g.right)/b.x}}const Nqe=50,Iqe=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:a=[],platform:i}=n,s=i.detectOverflow?i:{...i,detectOverflow:Lqe},c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:u}=HW(l,o,c),p=o,y=0;const g={};for(let k=0;k<a.length;k++){const x=a[k];if(!x)continue;const{name:v,fn:M}=x,{x:w,y:b,data:C,reset:_}=await M({x:h,y:u,initialPlacement:o,placement:p,strategy:r,middlewareData:g,rects:l,platform:s,elements:{reference:e,floating:t}});h=w??h,u=b??u,g[v]={...g[v],...C},_&&y<Nqe&&(y++,typeof _=="object"&&(_.placement&&(p=_.placement),_.rects&&(l=_.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):_.rects),{x:h,y:u}=HW(l,p,c)),k=-1)}return{x:h,y:u,placement:p,strategy:r,middlewareData:g}},Aqe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:h=0}=ja(e,t)||{};if(l==null)return{};const u=bee(h),p={x:n,y:o},y=aq(r),g=rq(y),k=await i.getDimensions(l),x=y==="y",v=x?"top":"left",M=x?"bottom":"right",w=x?"clientHeight":"clientWidth",b=a.reference[g]+a.reference[y]-p[y]-a.floating[g],C=p[y]-a.reference[y],_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let S=_?_[w]:0;(!S||!await(i.isElement==null?void 0:i.isElement(_)))&&(S=s.floating[w]||a.floating[g]);const E=b/2-C/2,P=S/2-k[g]/2-1,N=Oi(u[v],P),j=Oi(u[M],P),z=N,U=S-k[g]-j,A=S/2-k[g]/2+E,T=rO(z,A,U),D=!c.arrow&&Q0(r)!=null&&A!==T&&a.reference[g]/2-(A<z?N:j)-k[g]/2<0,O=D?A<z?A-z:A-U:0;return{[y]:p[y]+O,data:{[y]:T,centerOffset:A-T-O,...D&&{alignmentOffset:O}},reset:D}}}),Eqe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:h=!0,crossAxis:u=!0,fallbackPlacements:p,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:k=!0,...x}=ja(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const v=$a(r),M=Or(s),w=$a(s)===s,b=await(c.isRTL==null?void 0:c.isRTL(l.floating)),C=p||(w||!k?[lz(s)]:wqe(s)),_=g!=="none";!p&&_&&C.push(...Cqe(s,k,g,b));const S=[s,...C],E=await c.detectOverflow(t,x),P=[];let N=((o=a.flip)==null?void 0:o.overflows)||[];if(h&&P.push(E[v]),u){const A=xqe(r,i,b);P.push(E[A[0]],E[A[1]])}if(N=[...N,{placement:r,overflows:P}],!P.every(A=>A<=0)){var j,z;const A=(((j=a.flip)==null?void 0:j.index)||0)+1,T=S[A];if(T&&(!(u==="alignment"?M!==Or(T):!1)||N.every(I=>Or(I.placement)===M?I.overflows[0]>0:!0)))return{data:{index:A,overflows:N},reset:{placement:T}};let D=(z=N.filter(O=>O.overflows[0]<=0).sort((O,I)=>O.overflows[1]-I.overflows[1])[0])==null?void 0:z.placement;if(!D)switch(y){case"bestFit":{var U;const O=(U=N.filter(I=>{if(_){const R=Or(I.placement);return R===M||R==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(R=>R>0).reduce((R,L)=>R+L,0)]).sort((I,R)=>I[1]-R[1])[0])==null?void 0:U[0];O&&(D=O);break}case"initialPlacement":D=s;break}if(r!==D)return{reset:{placement:D}}}return{}}}};function OW(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function FW(e){return kqe.some(t=>e[t]>=0)}const jqe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:o}=t,{strategy:r="referenceHidden",...a}=ja(e,t);switch(r){case"referenceHidden":{const i=await o.detectOverflow(t,{...a,elementContext:"reference"}),s=OW(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:FW(s)}}}case"escaped":{const i=await o.detectOverflow(t,{...a,altBoundary:!0}),s=OW(i,n.floating);return{data:{escapedOffsets:s,escaped:FW(s)}}}default:return{}}}}},_ee=new Set(["left","top"]);async function $qe(e,t){const{placement:n,platform:o,elements:r}=e,a=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=$a(n),s=Q0(n),c=Or(n)==="y",l=_ee.has(i)?-1:1,h=a&&c?-1:1,u=ja(t,e);let{mainAxis:p,crossAxis:y,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof g=="number"&&(y=s==="end"?g*-1:g),c?{x:y*h,y:p*l}:{x:p*l,y:y*h}}const Pqe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:a,placement:i,middlewareData:s}=t,c=await $qe(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:r+c.x,y:a+c.y,data:{...c,placement:i}}}}},zqe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r,platform:a}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:c={fn:v=>{let{x:M,y:w}=v;return{x:M,y:w}}},...l}=ja(e,t),h={x:n,y:o},u=await a.detectOverflow(t,l),p=Or($a(r)),y=oq(p);let g=h[y],k=h[p];if(i){const v=y==="y"?"top":"left",M=y==="y"?"bottom":"right",w=g+u[v],b=g-u[M];g=rO(w,g,b)}if(s){const v=p==="y"?"top":"left",M=p==="y"?"bottom":"right",w=k+u[v],b=k-u[M];k=rO(w,k,b)}const x=c.fn({...t,[y]:g,[p]:k});return{...x,data:{x:x.x-n,y:x.y-o,enabled:{[y]:i,[p]:s}}}}}},Rqe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=ja(e,t),h={x:n,y:o},u=Or(r),p=oq(u);let y=h[p],g=h[u];const k=ja(s,t),x=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(c){const w=p==="y"?"height":"width",b=a.reference[p]-a.floating[w]+x.mainAxis,C=a.reference[p]+a.reference[w]-x.mainAxis;y<b?y=b:y>C&&(y=C)}if(l){var v,M;const w=p==="y"?"width":"height",b=_ee.has($a(r)),C=a.reference[u]-a.floating[w]+(b&&((v=i.offset)==null?void 0:v[u])||0)+(b?0:x.crossAxis),_=a.reference[u]+a.reference[w]+(b?0:((M=i.offset)==null?void 0:M[u])||0)-(b?x.crossAxis:0);g<C?g=C:g>_&&(g=_)}return{[p]:y,[u]:g}}}},Tqe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...l}=ja(e,t),h=await i.detectOverflow(t,l),u=$a(r),p=Q0(r),y=Or(r)==="y",{width:g,height:k}=a.floating;let x,v;u==="top"||u==="bottom"?(x=u,v=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=u,x=p==="end"?"top":"bottom");const M=k-h.top-h.bottom,w=g-h.left-h.right,b=Oi(k-h[x],M),C=Oi(g-h[v],w),_=!t.middlewareData.shift;let S=b,E=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=w),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=M),_&&!p){const N=oo(h.left,0),j=oo(h.right,0),z=oo(h.top,0),U=oo(h.bottom,0);y?E=g-2*(N!==0||j!==0?N+j:oo(h.left,h.right)):S=k-2*(z!==0||U!==0?z+U:oo(h.top,h.bottom))}await c({...t,availableWidth:E,availableHeight:S});const P=await i.getDimensions(s.floating);return g!==P.width||k!==P.height?{reset:{rects:!0}}:{}}}};function hR(){return typeof window<"u"}function J0(e){return Cee(e)?(e.nodeName||"").toLowerCase():"#document"}function co(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jr(e){var t;return(t=(Cee(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Cee(e){return hR()?e instanceof Node||e instanceof co(e).Node:!1}function or(e){return hR()?e instanceof Element||e instanceof co(e).Element:!1}function Ra(e){return hR()?e instanceof HTMLElement||e instanceof co(e).HTMLElement:!1}function qW(e){return!hR()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof co(e).ShadowRoot}function Ef(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&r!=="inline"&&r!=="contents"}function Dqe(e){return/^(table|td|th)$/.test(J0(e))}function fR(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Hqe=/transform|translate|scale|rotate|perspective|filter/,Oqe=/paint|layout|strict|content/,ds=e=>!!e&&e!=="none";let UT;function iq(e){const t=or(e)?rr(e):e;return ds(t.transform)||ds(t.translate)||ds(t.scale)||ds(t.rotate)||ds(t.perspective)||!sq()&&(ds(t.backdropFilter)||ds(t.filter))||Hqe.test(t.willChange||"")||Oqe.test(t.contain||"")}function Fqe(e){let t=Fi(e);for(;Ra(t)&&!q0(t);){if(iq(t))return t;if(fR(t))return null;t=Fi(t)}return null}function sq(){return UT==null&&(UT=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),UT}function q0(e){return/^(html|body|#document)$/.test(J0(e))}function rr(e){return co(e).getComputedStyle(e)}function pR(e){return or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(J0(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qW(e)&&e.host||Jr(e);return qW(t)?t.host:t}function See(e){const t=Fi(e);return q0(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ra(t)&&Ef(t)?t:See(t)}function df(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=See(e),a=r===((o=e.ownerDocument)==null?void 0:o.body),i=co(r);if(a){const s=iO(i);return t.concat(i,i.visualViewport||[],Ef(r)?r:[],s&&n?df(s):[])}else return t.concat(r,df(r,[],n))}function iO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Lee(e){const t=rr(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=Ra(e),a=r?e.offsetWidth:n,i=r?e.offsetHeight:o,s=cz(n)!==a||cz(o)!==i;return s&&(n=a,o=i),{width:n,height:o,$:s}}function cq(e){return or(e)?e:e.contextElement}function p0(e){const t=cq(e);if(!Ra(t))return Wr(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:a}=Lee(t);let i=(a?cz(n.width):n.width)/o,s=(a?cz(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const qqe=Wr(0);function Nee(e){const t=co(e);return!sq()||!t.visualViewport?qqe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vqe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==co(e)?!1:t}function Rd(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),a=cq(e);let i=Wr(1);t&&(o?or(o)&&(i=p0(o)):i=p0(e));const s=Vqe(a,n,o)?Nee(a):Wr(0);let c=(r.left+s.x)/i.x,l=(r.top+s.y)/i.y,h=r.width/i.x,u=r.height/i.y;if(a){const p=co(a),y=o&&or(o)?co(o):o;let g=p,k=iO(g);for(;k&&o&&y!==g;){const x=p0(k),v=k.getBoundingClientRect(),M=rr(k),w=v.left+(k.clientLeft+parseFloat(M.paddingLeft))*x.x,b=v.top+(k.clientTop+parseFloat(M.paddingTop))*x.y;c*=x.x,l*=x.y,h*=x.x,u*=x.y,c+=w,l+=b,g=co(k),k=iO(g)}}return dz({width:h,height:u,x:c,y:l})}function yR(e,t){const n=pR(e).scrollLeft;return t?t.left+n:Rd(Jr(e)).left+n}function Iee(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-yR(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Bqe(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const a=r==="fixed",i=Jr(o),s=t?fR(t.floating):!1;if(o===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Wr(1);const h=Wr(0),u=Ra(o);if((u||!u&&!a)&&((J0(o)!=="body"||Ef(i))&&(c=pR(o)),u)){const y=Rd(o);l=p0(o),h.x=y.x+o.clientLeft,h.y=y.y+o.clientTop}const p=i&&!u&&!a?Iee(i,c):Wr(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+h.x+p.x,y:n.y*l.y-c.scrollTop*l.y+h.y+p.y}}function Uqe(e){return Array.from(e.getClientRects())}function Wqe(e){const t=Jr(e),n=pR(e),o=e.ownerDocument.body,r=oo(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=oo(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+yR(e);const s=-n.scrollTop;return rr(o).direction==="rtl"&&(i+=oo(t.clientWidth,o.clientWidth)-r),{width:r,height:a,x:i,y:s}}const VW=25;function Gqe(e,t){const n=co(e),o=Jr(e),r=n.visualViewport;let a=o.clientWidth,i=o.clientHeight,s=0,c=0;if(r){a=r.width,i=r.height;const h=sq();(!h||h&&t==="fixed")&&(s=r.offsetLeft,c=r.offsetTop)}const l=yR(o);if(l<=0){const h=o.ownerDocument,u=h.body,p=getComputedStyle(u),y=h.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-y);g<=VW&&(a-=g)}else l<=VW&&(a+=l);return{width:a,height:i,x:s,y:c}}function Kqe(e,t){const n=Rd(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,a=Ra(e)?p0(e):Wr(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=r*a.x,l=o*a.y;return{width:i,height:s,x:c,y:l}}function BW(e,t,n){let o;if(t==="viewport")o=Gqe(e,n);else if(t==="document")o=Wqe(Jr(e));else if(or(t))o=Kqe(t,n);else{const r=Nee(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return dz(o)}function Aee(e,t){const n=Fi(e);return n===t||!or(n)||q0(n)?!1:rr(n).position==="fixed"||Aee(n,t)}function Xqe(e,t){const n=t.get(e);if(n)return n;let o=df(e,[],!1).filter(s=>or(s)&&J0(s)!=="body"),r=null;const a=rr(e).position==="fixed";let i=a?Fi(e):e;for(;or(i)&&!q0(i);){const s=rr(i),c=iq(i);!c&&s.position==="fixed"&&(r=null),(a?!c&&!r:!c&&s.position==="static"&&!!r&&(r.position==="absolute"||r.position==="fixed")||Ef(i)&&!c&&Aee(e,i))?o=o.filter(h=>h!==i):r=s,i=Fi(i)}return t.set(e,o),o}function Zqe(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?fR(t)?[]:Xqe(t,this._c):[].concat(n),o],s=BW(t,i[0],r);let c=s.top,l=s.right,h=s.bottom,u=s.left;for(let p=1;p<i.length;p++){const y=BW(t,i[p],r);c=oo(y.top,c),l=Oi(y.right,l),h=Oi(y.bottom,h),u=oo(y.left,u)}return{width:l-u,height:h-c,x:u,y:c}}function Yqe(e){const{width:t,height:n}=Lee(e);return{width:t,height:n}}function Qqe(e,t,n){const o=Ra(t),r=Jr(t),a=n==="fixed",i=Rd(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Wr(0);function l(){c.x=yR(r)}if(o||!o&&!a)if((J0(t)!=="body"||Ef(r))&&(s=pR(t)),o){const y=Rd(t,!0,a,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else r&&l();a&&!o&&r&&l();const h=r&&!o&&!a?Iee(r,s):Wr(0),u=i.left+s.scrollLeft-c.x-h.x,p=i.top+s.scrollTop-c.y-h.y;return{x:u,y:p,width:i.width,height:i.height}}function WT(e){return rr(e).position==="static"}function UW(e,t){if(!Ra(e)||rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jr(e)===n&&(n=n.ownerDocument.body),n}function Eee(e,t){const n=co(e);if(fR(e))return n;if(!Ra(e)){let r=Fi(e);for(;r&&!q0(r);){if(or(r)&&!WT(r))return r;r=Fi(r)}return n}let o=UW(e,t);for(;o&&Dqe(o)&&WT(o);)o=UW(o,t);return o&&q0(o)&&WT(o)&&!iq(o)?n:o||Fqe(e)||n}const Jqe=async function(e){const t=this.getOffsetParent||Eee,n=this.getDimensions,o=await n(e.floating);return{reference:Qqe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function eVe(e){return rr(e).direction==="rtl"}const tVe={convertOffsetParentRelativeRectToViewportRelativeRect:Bqe,getDocumentElement:Jr,getClippingRect:Zqe,getOffsetParent:Eee,getElementRects:Jqe,getClientRects:Uqe,getDimensions:Yqe,getScale:p0,isElement:or,isRTL:eVe};function jee(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nVe(e,t){let n=null,o;const r=Jr(e);function a(){var s;clearTimeout(o),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const l=e.getBoundingClientRect(),{left:h,top:u,width:p,height:y}=l;if(s||t(),!p||!y)return;const g=Ep(u),k=Ep(r.clientWidth-(h+p)),x=Ep(r.clientHeight-(u+y)),v=Ep(h),w={rootMargin:-g+"px "+-k+"px "+-x+"px "+-v+"px",threshold:oo(0,Oi(1,c))||1};let b=!0;function C(_){const S=_[0].intersectionRatio;if(S!==c){if(!b)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!jee(l,e.getBoundingClientRect())&&i(),b=!1}try{n=new IntersectionObserver(C,{...w,root:r.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),a}function oVe(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=o,l=cq(e),h=r||a?[...l?df(l):[],...t?df(t):[]]:[];h.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const u=l&&s?nVe(l,n):null;let p=-1,y=null;i&&(y=new ResizeObserver(v=>{let[M]=v;M&&M.target===l&&y&&t&&(y.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=y)==null||w.observe(t)})),n()}),l&&!c&&y.observe(l),t&&y.observe(t));let g,k=c?Rd(e):null;c&&x();function x(){const v=Rd(e);k&&!jee(k,v)&&n(),k=v,g=requestAnimationFrame(x)}return n(),()=>{var v;h.forEach(M=>{r&&M.removeEventListener("scroll",n),a&&M.removeEventListener("resize",n)}),u==null||u(),(v=y)==null||v.disconnect(),y=null,c&&cancelAnimationFrame(g)}}const rVe=Pqe,aVe=zqe,iVe=Eqe,sVe=Tqe,cVe=jqe,WW=Aqe,lVe=Rqe,dVe=(e,t,n)=>{const o=new Map,r={platform:tVe,...n},a={...r.platform,_c:o};return Iqe(e,t,{...r,platform:a})};var uVe=typeof document<"u",hVe=function(){},lP=uVe?m.useLayoutEffect:hVe;function uz(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!uz(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const a=r[o];if(!(a==="_owner"&&e.$$typeof)&&!uz(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function $ee(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function GW(e,t){const n=$ee(e);return Math.round(t*n)/n}function GT(e){const t=m.useRef(e);return lP(()=>{t.current=e}),t}function fVe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[h,u]=m.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,y]=m.useState(o);uz(p,o)||y(o);const[g,k]=m.useState(null),[x,v]=m.useState(null),M=m.useCallback(I=>{I!==_.current&&(_.current=I,k(I))},[]),w=m.useCallback(I=>{I!==S.current&&(S.current=I,v(I))},[]),b=a||g,C=i||x,_=m.useRef(null),S=m.useRef(null),E=m.useRef(h),P=c!=null,N=GT(c),j=GT(r),z=GT(l),U=m.useCallback(()=>{if(!_.current||!S.current)return;const I={placement:t,strategy:n,middleware:p};j.current&&(I.platform=j.current),dVe(_.current,S.current,I).then(R=>{const L={...R,isPositioned:z.current!==!1};A.current&&!uz(E.current,L)&&(E.current=L,qd.flushSync(()=>{u(L)}))})},[p,t,n,j,z]);lP(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,u(I=>({...I,isPositioned:!1})))},[l]);const A=m.useRef(!1);lP(()=>(A.current=!0,()=>{A.current=!1}),[]),lP(()=>{if(b&&(_.current=b),C&&(S.current=C),b&&C){if(N.current)return N.current(b,C,U);U()}},[b,C,U,N,P]);const T=m.useMemo(()=>({reference:_,floating:S,setReference:M,setFloating:w}),[M,w]),D=m.useMemo(()=>({reference:b,floating:C}),[b,C]),O=m.useMemo(()=>{const I={position:n,left:0,top:0};if(!D.floating)return I;const R=GW(D.floating,h.x),L=GW(D.floating,h.y);return s?{...I,transform:"translate("+R+"px, "+L+"px)",...$ee(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:R,top:L}},[n,s,D.floating,h.x,h.y]);return m.useMemo(()=>({...h,update:U,refs:T,elements:D,floatingStyles:O}),[h,U,T,D,O])}const pVe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?WW({element:o.current,padding:r}).fn(n):{}:o?WW({element:o,padding:r}).fn(n):{}}}},yVe=(e,t)=>{const n=rVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},mVe=(e,t)=>{const n=aVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},gVe=(e,t)=>({fn:lVe(e).fn,options:[e,t]}),kVe=(e,t)=>{const n=iVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},vVe=(e,t)=>{const n=sVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},xVe=(e,t)=>{const n=cVe(e);return{name:n.name,fn:n.fn,options:[e,t]}},wVe=(e,t)=>{const n=pVe(e);return{name:n.name,fn:n.fn,options:[e,t]}};var MVe="Arrow",Pee=m.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...a}=e;return f.jsx(Ve.svg,{...a,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Pee.displayName=MVe;var bVe=Pee,lq="Popper",[zee,e2]=sr(lq),[_Ve,Ree]=zee(lq),Tee=e=>{const{__scopePopper:t,children:n}=e,[o,r]=m.useState(null);return f.jsx(_Ve,{scope:t,anchor:o,onAnchorChange:r,children:n})};Tee.displayName=lq;var Dee="PopperAnchor",Hee=m.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,a=Ree(Dee,n),i=m.useRef(null),s=mt(t,i),c=m.useRef(null);return m.useEffect(()=>{const l=c.current;c.current=(o==null?void 0:o.current)||i.current,l!==c.current&&a.onAnchorChange(c.current)}),o?null:f.jsx(Ve.div,{...r,ref:s})});Hee.displayName=Dee;var dq="PopperContent",[CVe,SVe]=zee(dq),Oee=m.forwardRef((e,t)=>{var oe,re,te,ce,ke,ve;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:h=0,sticky:u="partial",hideWhenDetached:p=!1,updatePositionStrategy:y="optimized",onPlaced:g,...k}=e,x=Ree(dq,n),[v,M]=m.useState(null),w=mt(t,xe=>M(xe)),[b,C]=m.useState(null),_=QJ(b),S=(_==null?void 0:_.width)??0,E=(_==null?void 0:_.height)??0,P=o+(a!=="center"?"-"+a:""),N=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},j=Array.isArray(l)?l:[l],z=j.length>0,U={padding:N,boundary:j.filter(NVe),altBoundary:z},{refs:A,floatingStyles:T,placement:D,isPositioned:O,middlewareData:I}=fVe({strategy:"fixed",placement:P,whileElementsMounted:(...xe)=>oVe(...xe,{animationFrame:y==="always"}),elements:{reference:x.anchor},middleware:[yVe({mainAxis:r+E,alignmentAxis:i}),c&&mVe({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?gVe():void 0,...U}),c&&kVe({...U}),vVe({...U,apply:({elements:xe,rects:He,availableWidth:Ze,availableHeight:ue})=>{const{width:Ie,height:zt}=He.reference,pt=xe.floating.style;pt.setProperty("--radix-popper-available-width",`${Ze}px`),pt.setProperty("--radix-popper-available-height",`${ue}px`),pt.setProperty("--radix-popper-anchor-width",`${Ie}px`),pt.setProperty("--radix-popper-anchor-height",`${zt}px`)}}),b&&wVe({element:b,padding:s}),IVe({arrowWidth:S,arrowHeight:E}),p&&xVe({strategy:"referenceHidden",...U})]}),[R,L]=Vee(D),q=Yr(g);Hi(()=>{O&&(q==null||q())},[O,q]);const H=(oe=I.arrow)==null?void 0:oe.x,$=(re=I.arrow)==null?void 0:re.y,X=((te=I.arrow)==null?void 0:te.centerOffset)!==0,[G,Q]=m.useState();return Hi(()=>{v&&Q(window.getComputedStyle(v).zIndex)},[v]),f.jsx("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...T,transform:O?T.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(ce=I.transformOrigin)==null?void 0:ce.x,(ke=I.transformOrigin)==null?void 0:ke.y].join(" "),...((ve=I.hide)==null?void 0:ve.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(CVe,{scope:n,placedSide:R,onArrowChange:C,arrowX:H,arrowY:$,shouldHideArrow:X,children:f.jsx(Ve.div,{"data-side":R,"data-align":L,...k,ref:w,style:{...k.style,animation:O?void 0:"none"}})})})});Oee.displayName=dq;var Fee="PopperArrow",LVe={top:"bottom",right:"left",bottom:"top",left:"right"},qee=m.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,a=SVe(Fee,o),i=LVe[a.placedSide];return f.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:f.jsx(bVe,{...r,ref:n,style:{...r.style,display:"block"}})})});qee.displayName=Fee;function NVe(e){return e!==null}var IVe=e=>({name:"transformOrigin",options:e,fn(t){var x,v,M;const{placement:n,rects:o,middlewareData:r}=t,i=((x=r.arrow)==null?void 0:x.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,h]=Vee(n),u={start:"0%",center:"50%",end:"100%"}[h],p=(((v=r.arrow)==null?void 0:v.x)??0)+s/2,y=(((M=r.arrow)==null?void 0:M.y)??0)+c/2;let g="",k="";return l==="bottom"?(g=i?u:`${p}px`,k=`${-c}px`):l==="top"?(g=i?u:`${p}px`,k=`${o.floating.height+c}px`):l==="right"?(g=`${-c}px`,k=i?u:`${y}px`):l==="left"&&(g=`${o.floating.width+c}px`,k=i?u:`${y}px`),{data:{x:g,y:k}}}});function Vee(e){const[t,n="center"]=e.split("-");return[t,n]}var uq=Tee,mR=Hee,hq=Oee,fq=qee,AVe="Portal",jf=m.forwardRef((e,t)=>{var s;const{container:n,...o}=e,[r,a]=m.useState(!1);Hi(()=>a(!0),[]);const i=n||r&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?zce.createPortal(f.jsx(Ve.div,{...o,ref:t}),i):null});jf.displayName=AVe;function EVe(e,t){return m.useReducer((n,o)=>t[n][o]??n,e)}var mo=e=>{const{present:t,children:n}=e,o=jVe(t),r=typeof n=="function"?n({present:o.isPresent}):m.Children.only(n),a=mt(o.ref,$Ve(r));return typeof n=="function"||o.isPresent?m.cloneElement(r,{ref:a}):null};mo.displayName="Presence";function jVe(e){const[t,n]=m.useState(),o=m.useRef(null),r=m.useRef(e),a=m.useRef("none"),i=e?"mounted":"unmounted",[s,c]=EVe(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{const l=jp(o.current);a.current=s==="mounted"?l:"none"},[s]),Hi(()=>{const l=o.current,h=r.current;if(h!==e){const p=a.current,y=jp(l);e?c("MOUNT"):y==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(h&&p!==y?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),Hi(()=>{if(t){let l;const h=t.ownerDocument.defaultView??window,u=y=>{const k=jp(o.current).includes(CSS.escape(y.animationName));if(y.target===t&&k&&(c("ANIMATION_END"),!r.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",l=h.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},p=y=>{y.target===t&&(a.current=jp(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{h.clearTimeout(l),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:m.useCallback(l=>{o.current=l?getComputedStyle(l):null,n(l)},[])}}function jp(e){return(e==null?void 0:e.animationName)||"none"}function $Ve(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var PVe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bu=new WeakMap,$p=new WeakMap,Pp={},KT=0,Bee=function(e){return e&&(e.host||Bee(e.parentNode))},zVe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Bee(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},RVe=function(e,t,n,o){var r=zVe(t,Array.isArray(e)?e:[e]);Pp[n]||(Pp[n]=new WeakMap);var a=Pp[n],i=[],s=new Set,c=new Set(r),l=function(u){!u||s.has(u)||(s.add(u),l(u.parentNode))};r.forEach(l);var h=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))h(p);else try{var y=p.getAttribute(o),g=y!==null&&y!=="false",k=(bu.get(p)||0)+1,x=(a.get(p)||0)+1;bu.set(p,k),a.set(p,x),i.push(p),k===1&&g&&$p.set(p,!0),x===1&&p.setAttribute(n,"true"),g||p.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",p,v)}})};return h(t),s.clear(),KT++,function(){i.forEach(function(u){var p=bu.get(u)-1,y=a.get(u)-1;bu.set(u,p),a.set(u,y),p||($p.has(u)||u.removeAttribute(o),$p.delete(u)),y||u.removeAttribute(n)}),KT--,KT||(bu=new WeakMap,bu=new WeakMap,$p=new WeakMap,Pp={})}},pq=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=PVe(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),RVe(o,r,n,"aria-hidden")):function(){return null}},Dr=function(){return Dr=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Dr.apply(this,arguments)};function Uee(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function TVe(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,a;o<r;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var dP="right-scroll-bar-position",uP="width-before-scroll-bar",DVe="with-scroll-bars-hidden",HVe="--removed-body-scroll-bar-size";function XT(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function OVe(e,t){var n=m.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var FVe=typeof window<"u"?m.useLayoutEffect:m.useEffect,KW=new WeakMap;function qVe(e,t){var n=OVe(null,function(o){return e.forEach(function(r){return XT(r,o)})});return FVe(function(){var o=KW.get(n);if(o){var r=new Set(o),a=new Set(e),i=n.current;r.forEach(function(s){a.has(s)||XT(s,null)}),a.forEach(function(s){r.has(s)||XT(s,i)})}KW.set(n,e)},[e]),n}function VVe(e){return e}function BVe(e,t){t===void 0&&(t=VVe);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var i=t(a,o);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){o=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var c=function(){var h=i;i=[],h.forEach(a)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(h){i.push(h),l()},filter:function(h){return i=i.filter(h),n}}}};return r}function UVe(e){e===void 0&&(e={});var t=BVe(null);return t.options=Dr({async:!0,ssr:!1},e),t}var Wee=function(e){var t=e.sideCar,n=Uee(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return m.createElement(o,Dr({},n))};Wee.isSideCarExport=!0;function WVe(e,t){return e.useMedium(t),Wee}var Gee=UVe(),ZT=function(){},gR=m.forwardRef(function(e,t){var n=m.useRef(null),o=m.useState({onScrollCapture:ZT,onWheelCapture:ZT,onTouchMoveCapture:ZT}),r=o[0],a=o[1],i=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,h=e.enabled,u=e.shards,p=e.sideCar,y=e.noRelative,g=e.noIsolation,k=e.inert,x=e.allowPinchZoom,v=e.as,M=v===void 0?"div":v,w=e.gapMode,b=Uee(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,_=qVe([n,t]),S=Dr(Dr({},b),r);return m.createElement(m.Fragment,null,h&&m.createElement(C,{sideCar:Gee,removeScrollBar:l,shards:u,noRelative:y,noIsolation:g,inert:k,setCallbacks:a,allowPinchZoom:!!x,lockRef:n,gapMode:w}),i?m.cloneElement(m.Children.only(s),Dr(Dr({},S),{ref:_})):m.createElement(M,Dr({},S,{className:c,ref:_}),s))});gR.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gR.classNames={fullWidth:uP,zeroRight:dP};var GVe=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function KVe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=GVe();return t&&e.setAttribute("nonce",t),e}function XVe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ZVe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var YVe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=KVe())&&(XVe(t,n),ZVe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},QVe=function(){var e=YVe();return function(t,n){m.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Kee=function(){var e=QVe(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},JVe={left:0,top:0,right:0,gap:0},YT=function(e){return parseInt(e||"",10)||0},eBe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[YT(n),YT(o),YT(r)]},tBe=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return JVe;var t=eBe(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},nBe=Kee(),y0="data-scroll-locked",oBe=function(e,t,n,o){var r=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
8470
8470
  .`.concat(DVe,` {
8471
8471
  overflow: hidden `).concat(o,`;
8472
8472
  padding-right: `).concat(s,"px ").concat(o,`;
@@ -8538,10 +8538,10 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
8538
8538
  `))+1))}const i="#".repeat(r),s=n.enter("headingAtx"),c=n.enter("phrasing");a.move(i+" ");let l=n.containerPhrasing(e,{before:"# ",after:`
8539
8539
  `,...a.current()});return/^[\t ]/.test(l)&&(l=yf(l.charCodeAt(0))+l.slice(1)),l=l?i+" "+l:i,n.options.closeAtx&&(l+=" "+i),c(),s(),l}Ere.peek=Het;function Ere(e){return e.value||""}function Het(){return"<"}jre.peek=Oet;function jre(e,t,n,o){const r=nV(n),a=r==='"'?"Quote":"Apostrophe",i=n.enter("image");let s=n.enter("label");const c=n.createTracker(o);let l=c.move("![");return l+=c.move(n.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(n.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(s=n.enter("destinationRaw"),l+=c.move(n.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(" "+r),l+=c.move(n.safe(e.title,{before:l,after:r,...c.current()})),l+=c.move(r),s()),l+=c.move(")"),i(),l}function Oet(){return"!"}$re.peek=Fet;function $re(e,t,n,o){const r=e.referenceType,a=n.enter("imageReference");let i=n.enter("label");const s=n.createTracker(o);let c=s.move("![");const l=n.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),i();const h=n.stack;n.stack=[],i=n.enter("reference");const u=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return i(),n.stack=h,a(),r==="full"||!l||l!==u?c+=s.move(u+"]"):r==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function Fet(){return"!"}Pre.peek=qet;function Pre(e,t,n){let o=e.value||"",r="`",a=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(o);)r+="`";for(/[^ \r\n]/.test(o)&&(/^[ \r\n]/.test(o)&&/[ \r\n]$/.test(o)||/^`|`$/.test(o))&&(o=" "+o+" ");++a<n.unsafe.length;){const i=n.unsafe[a],s=n.compilePattern(i);let c;if(i.atBreak)for(;c=s.exec(o);){let l=c.index;o.charCodeAt(l)===10&&o.charCodeAt(l-1)===13&&l--,o=o.slice(0,l)+" "+o.slice(c.index+1)}}return r+o+r}function qet(){return"`"}function zre(e,t){const n=Gq(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Rre.peek=Vet;function Rre(e,t,n,o){const r=nV(n),a=r==='"'?"Quote":"Apostrophe",i=n.createTracker(o);let s,c;if(zre(e,n)){const h=n.stack;n.stack=[],s=n.enter("autolink");let u=i.move("<");return u+=i.move(n.containerPhrasing(e,{before:u,after:">",...i.current()})),u+=i.move(">"),s(),n.stack=h,u}s=n.enter("link"),c=n.enter("label");let l=i.move("[");return l+=i.move(n.containerPhrasing(e,{before:l,after:"](",...i.current()})),l+=i.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),l+=i.move("<"),l+=i.move(n.safe(e.url,{before:l,after:">",...i.current()})),l+=i.move(">")):(c=n.enter("destinationRaw"),l+=i.move(n.safe(e.url,{before:l,after:e.title?" ":")",...i.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=i.move(" "+r),l+=i.move(n.safe(e.title,{before:l,after:r,...i.current()})),l+=i.move(r),c()),l+=i.move(")"),s(),l}function Vet(e,t,n){return zre(e,n)?"<":"["}Tre.peek=Bet;function Tre(e,t,n,o){const r=e.referenceType,a=n.enter("linkReference");let i=n.enter("label");const s=n.createTracker(o);let c=s.move("[");const l=n.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),i();const h=n.stack;n.stack=[],i=n.enter("reference");const u=n.safe(n.associationId(e),{before:c,after:"]",...s.current()});return i(),n.stack=h,a(),r==="full"||!l||l!==u?c+=s.move(u+"]"):r==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function Bet(){return"["}function oV(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Uet(e){const t=oV(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Wet(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Dre(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Get(e,t,n,o){const r=n.enter("list"),a=n.bulletCurrent;let i=e.ordered?Wet(n):oV(n);const s=e.ordered?i==="."?")":".":Uet(n);let c=t&&n.bulletLastUsed?i===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((i==="*"||i==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),Dre(n)===i&&h){let u=-1;for(;++u<e.children.length;){const p=e.children[u];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(i=s),n.bulletCurrent=i;const l=n.containerFlow(e,o);return n.bulletLastUsed=i,n.bulletCurrent=a,r(),l}function Ket(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Xet(e,t,n,o){const r=Ket(n);let a=n.bulletCurrent||oV(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let i=a.length+1;(r==="tab"||r==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4);const s=n.createTracker(o);s.move(a+" ".repeat(i-a.length)),s.shift(i);const c=n.enter("listItem"),l=n.indentLines(n.containerFlow(e,s.current()),h);return c(),l;function h(u,p,y){return p?(y?"":" ".repeat(i))+u:(y?a:a+" ".repeat(i-a.length))+u}}function Zet(e,t,n,o){const r=n.enter("paragraph"),a=n.enter("phrasing"),i=n.containerPhrasing(e,o);return a(),r(),i}const Yet=TR(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Qet(e,t,n,o){return(e.children.some(function(i){return Yet(i)})?n.containerPhrasing:n.containerFlow).call(n,e,o)}function Jet(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Hre.peek=ett;function Hre(e,t,n,o){const r=Jet(n),a=n.enter("strong"),i=n.createTracker(o),s=i.move(r+r);let c=i.move(n.containerPhrasing(e,{after:r,before:s,...i.current()}));const l=c.charCodeAt(0),h=_z(o.before.charCodeAt(o.before.length-1),l,r);h.inside&&(c=yf(l)+c.slice(1));const u=c.charCodeAt(c.length-1),p=_z(o.after.charCodeAt(0),u,r);p.inside&&(c=c.slice(0,-1)+yf(u));const y=i.move(r+r);return a(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},s+c+y}function ett(e,t,n){return n.options.strong||"*"}function ttt(e,t,n,o){return n.safe(e.value,o)}function ntt(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ott(e,t,n){const o=(Dre(n)+(n.options.ruleSpaces?" ":"")).repeat(ntt(n));return n.options.ruleSpaces?o.slice(0,-1):o}const Ore={blockquote:Cet,break:cK,code:jet,definition:Pet,emphasis:Are,hardBreak:cK,heading:Det,html:Ere,image:jre,imageReference:$re,inlineCode:Pre,link:Rre,linkReference:Tre,list:Get,listItem:Xet,paragraph:Zet,root:Qet,strong:Hre,text:ttt,thematicBreak:ott};function rtt(){return{enter:{table:att,tableData:lK,tableHeader:lK,tableRow:stt},exit:{codeText:ctt,table:itt,tableData:gD,tableHeader:gD,tableRow:gD}}}function att(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function itt(e){this.exit(e),this.data.inTable=void 0}function stt(e){this.enter({type:"tableRow",children:[]},e)}function gD(e){this.exit(e)}function lK(e){this.enter({type:"tableCell",children:[]},e)}function ctt(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ltt));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ltt(e,t){return t==="|"?t:e}function dtt(e){const t=e||{},n=t.tableCellPadding,o=t.tablePipeAlign,r=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
8540
8540
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:i,tableCell:c,tableRow:s}};function i(y,g,k,x){return l(h(y,k,x),y.align)}function s(y,g,k,x){const v=u(y,k,x),M=l([v]);return M.slice(0,M.indexOf(`
8541
- `))}function c(y,g,k,x){const v=k.enter("tableCell"),M=k.enter("phrasing"),w=k.containerPhrasing(y,{...x,before:a,after:a});return M(),v(),w}function l(y,g){return bet(y,{align:g,alignDelimiters:o,padding:n,stringLength:r})}function h(y,g,k){const x=y.children;let v=-1;const M=[],w=g.enter("table");for(;++v<x.length;)M[v]=u(x[v],g,k);return w(),M}function u(y,g,k){const x=y.children;let v=-1;const M=[],w=g.enter("tableRow");for(;++v<x.length;)M[v]=c(x[v],y,g,k);return w(),M}function p(y,g,k){let x=Ore.inlineCode(y,g,k);return k.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function utt(){return{exit:{taskListCheckValueChecked:dK,taskListCheckValueUnchecked:dK,paragraph:ftt}}}function htt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ptt}}}function dK(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ftt(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const o=n.children[0];if(o&&o.type==="text"){const r=t.children;let a=-1,i;for(;++a<r.length;){const s=r[a];if(s.type==="paragraph"){i=s;break}}i===n&&(o.value=o.value.slice(1),o.value.length===0?n.children.shift():n.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,n.position.start=Object.assign({},o.position.start)))}}this.exit(e)}function ptt(e,t,n,o){const r=e.children[0],a=typeof e.checked=="boolean"&&r&&r.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(o);a&&s.move(i);let c=Ore.listItem(e,t,n,{...o,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(h){return h+i}}function ytt(){return[UJe(),fet(),get(),rtt(),utt()]}function mtt(e){return{extensions:[WJe(),pet(e),ket(),dtt(e),htt()]}}const gtt={tokenize:btt,partial:!0},Fre={tokenize:_tt,partial:!0},qre={tokenize:Ctt,partial:!0},Vre={tokenize:Stt,partial:!0},ktt={tokenize:Ltt,partial:!0},Bre={name:"wwwAutolink",tokenize:wtt,previous:Wre},Ure={name:"protocolAutolink",tokenize:Mtt,previous:Gre},Ta={name:"emailAutolink",tokenize:xtt,previous:Kre},ea={};function vtt(){return{text:ea}}let us=48;for(;us<123;)ea[us]=Ta,us++,us===58?us=65:us===91&&(us=97);ea[43]=Ta;ea[45]=Ta;ea[46]=Ta;ea[95]=Ta;ea[72]=[Ta,Ure];ea[104]=[Ta,Ure];ea[87]=[Ta,Bre];ea[119]=[Ta,Bre];function xtt(e,t,n){const o=this;let r,a;return i;function i(u){return!LO(u)||!Kre.call(o,o.previous)||rV(o.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(u))}function s(u){return LO(u)?(e.consume(u),s):u===64?(e.consume(u),c):n(u)}function c(u){return u===46?e.check(ktt,h,l)(u):u===45||u===95||xn(u)?(a=!0,e.consume(u),c):h(u)}function l(u){return e.consume(u),r=!0,c}function h(u){return a&&r&&In(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function wtt(e,t,n){const o=this;return r;function r(i){return i!==87&&i!==119||!Wre.call(o,o.previous)||rV(o.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gtt,e.attempt(Fre,e.attempt(qre,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function Mtt(e,t,n){const o=this;let r="",a=!1;return i;function i(u){return(u===72||u===104)&&Gre.call(o,o.previous)&&!rV(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(u),e.consume(u),s):n(u)}function s(u){if(In(u)&&r.length<5)return r+=String.fromCodePoint(u),e.consume(u),s;if(u===58){const p=r.toLowerCase();if(p==="http"||p==="https")return e.consume(u),c}return n(u)}function c(u){return u===47?(e.consume(u),a?l:(a=!0,c)):n(u)}function l(u){return u===null||wz(u)||yt(u)||Hd(u)||PR(u)?n(u):e.attempt(Fre,e.attempt(qre,h),n)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function btt(e,t,n){let o=0;return r;function r(i){return(i===87||i===119)&&o<3?(o++,e.consume(i),r):i===46&&o===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function _tt(e,t,n){let o,r,a;return i;function i(l){return l===46||l===95?e.check(Vre,c,s)(l):l===null||yt(l)||Hd(l)||l!==45&&PR(l)?c(l):(a=!0,e.consume(l),i)}function s(l){return l===95?o=!0:(r=o,o=void 0),e.consume(l),i}function c(l){return r||o||!a?n(l):t(l)}}function Ctt(e,t){let n=0,o=0;return r;function r(i){return i===40?(n++,e.consume(i),r):i===41&&o<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(Vre,t,a)(i):i===null||yt(i)||Hd(i)?t(i):(e.consume(i),r)}function a(i){return i===41&&o++,e.consume(i),r}}function Stt(e,t,n){return o;function o(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),o):s===38?(e.consume(s),a):s===93?(e.consume(s),r):s===60||s===null||yt(s)||Hd(s)?t(s):n(s)}function r(s){return s===null||s===40||s===91||yt(s)||Hd(s)?t(s):o(s)}function a(s){return In(s)?i(s):n(s)}function i(s){return s===59?(e.consume(s),o):In(s)?(e.consume(s),i):n(s)}}function Ltt(e,t,n){return o;function o(a){return e.consume(a),r}function r(a){return xn(a)?n(a):t(a)}}function Wre(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function Gre(e){return!In(e)}function Kre(e){return!(e===47||LO(e))}function LO(e){return e===43||e===45||e===46||e===95||xn(e)}function rV(e){let t=e.length,n=!1;for(;t--;){const o=e[t][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){n=!0;break}if(o._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ntt={tokenize:Rtt,partial:!0};function Itt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$tt,continuation:{tokenize:Ptt},exit:ztt}},text:{91:{name:"gfmFootnoteCall",tokenize:jtt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Att,resolveTo:Ett}}}}function Att(e,t,n){const o=this;let r=o.events.length;const a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i;for(;r--;){const c=o.events[r][1];if(c.type==="labelImage"){i=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!i||!i._balanced)return n(c);const l=tr(o.sliceSerialize({start:i.end,end:o.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Ett(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",o,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(n,e.length-n+1,...s),e}function jtt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a=0,i;return s;function s(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(u){if(a>999||u===93&&!i||u===null||u===91||yt(u))return n(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(tr(o.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return yt(u)||(i=!0),a++,e.consume(u),u===92?h:l}function h(u){return u===91||u===92||u===93?(e.consume(u),a++,l):l(u)}}function $tt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a,i=0,s;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(i>999||g===93&&!s||g===null||g===91||yt(g))return n(g);if(g===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=tr(o.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return yt(g)||(s=!0),i++,e.consume(g),g===92?u:h}function u(g){return g===91||g===92||g===93?(e.consume(g),i++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),r.includes(a)||r.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(g)}function y(g){return t(g)}}function Ptt(e,t,n){return e.check(qf,t,e.attempt(Ntt,t,n))}function ztt(e){e.exit("gfmFootnoteDefinition")}function Rtt(e,t,n){const o=this;return nt(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const i=o.events[o.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function Ttt(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:a,resolveAll:r};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function r(i,s){let c=-1;for(;++c<i.length;)if(i[c][0]==="enter"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._close){let l=c;for(;l--;)if(i[l][0]==="exit"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._open&&i[c][1].end.offset-i[c][1].start.offset===i[l][1].end.offset-i[l][1].start.offset){i[c][1].type="strikethroughSequence",i[l][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},i[l][1].start),end:Object.assign({},i[c][1].end)},u={type:"strikethroughText",start:Object.assign({},i[l][1].end),end:Object.assign({},i[c][1].start)},p=[["enter",h,s],["enter",i[l][1],s],["exit",i[l][1],s],["enter",u,s]],y=s.parser.constructs.insideSpan.null;y&&lo(p,p.length,0,zR(y,i.slice(l+1,c),s)),lo(p,p.length,0,[["exit",u,s],["enter",i[c][1],s],["exit",i[c][1],s],["exit",h,s]]),lo(i,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<i.length;)i[c][1].type==="strikethroughSequenceTemporary"&&(i[c][1].type="data");return i}function a(i,s,c){const l=this.previous,h=this.events;let u=0;return p;function p(g){return l===126&&h[h.length-1][1].type!=="characterEscape"?c(g):(i.enter("strikethroughSequenceTemporary"),y(g))}function y(g){const k=U0(l);if(g===126)return u>1?c(g):(i.consume(g),u++,y);if(u<2&&!n)return c(g);const x=i.exit("strikethroughSequenceTemporary"),v=U0(g);return x._open=!v||v===2&&!!k,x._close=!k||k===2&&!!v,s(g)}}}class Dtt{constructor(){this.map=[]}add(t,n,o){Htt(this,t,n,o)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[0]}),this.map.length===0)return;let n=this.map.length;const o=[];for(;n>0;)n-=1,o.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];o.push(t.slice()),t.length=0;let r=o.pop();for(;r;){for(const a of r)t.push(a);r=o.pop()}this.map.length=0}}function Htt(e,t,n,o){let r=0;if(!(n===0&&o.length===0)){for(;r<e.map.length;){if(e.map[r][0]===t){e.map[r][1]+=n,e.map[r][2].push(...o);return}r+=1}e.map.push([t,n,o])}}function Ott(e,t){let n=!1;const o=[];for(;t<e.length;){const r=e[t];if(n){if(r[0]==="enter")r[1].type==="tableContent"&&o.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=o.length-1;o[a]=o[a]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return o}function Ftt(){return{flow:{null:{name:"table",tokenize:qtt,resolveAll:Vtt}}}}function qtt(e,t,n){const o=this;let r=0,a=0,i;return s;function s(N){let j=o.events.length-1;for(;j>-1;){const A=o.events[j][1].type;if(A==="lineEnding"||A==="linePrefix")j--;else break}const z=j>-1?o.events[j][1].type:null,U=z==="tableHead"||z==="tableRow"?_:c;return U===_&&o.parser.lazy[o.now().line]?n(N):U(N)}function c(N){return e.enter("tableHead"),e.enter("tableRow"),l(N)}function l(N){return N===124||(i=!0,a+=1),h(N)}function h(N){return N===null?n(N):$e(N)?a>1?(a=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y):n(N):Qe(N)?nt(e,h,"whitespace")(N):(a+=1,i&&(i=!1,r+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),i=!0,h):(e.enter("data"),u(N)))}function u(N){return N===null||N===124||yt(N)?(e.exit("data"),h(N)):(e.consume(N),N===92?p:u)}function p(N){return N===92||N===124?(e.consume(N),u):u(N)}function y(N){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(N):(e.enter("tableDelimiterRow"),i=!1,Qe(N)?nt(e,g,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):g(N))}function g(N){return N===45||N===58?x(N):N===124?(i=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),k):C(N)}function k(N){return Qe(N)?nt(e,x,"whitespace")(N):x(N)}function x(N){return N===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),v):N===45?(a+=1,v(N)):N===null||$e(N)?b(N):C(N)}function v(N){return N===45?(e.enter("tableDelimiterFiller"),M(N)):C(N)}function M(N){return N===45?(e.consume(N),M):N===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(N))}function w(N){return Qe(N)?nt(e,b,"whitespace")(N):b(N)}function b(N){return N===124?g(N):N===null||$e(N)?!i||r!==a?C(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):C(N)}function C(N){return n(N)}function _(N){return e.enter("tableRow"),S(N)}function S(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),S):N===null||$e(N)?(e.exit("tableRow"),t(N)):Qe(N)?nt(e,S,"whitespace")(N):(e.enter("data"),E(N))}function E(N){return N===null||N===124||yt(N)?(e.exit("data"),S(N)):(e.consume(N),N===92?P:E)}function P(N){return N===92||N===124?(e.consume(N),E):E(N)}}function Vtt(e,t){let n=-1,o=!0,r=0,a=[0,0,0,0],i=[0,0,0,0],s=!1,c=0,l,h,u;const p=new Dtt;for(;++n<e.length;){const y=e[n],g=y[1];y[0]==="enter"?g.type==="tableHead"?(s=!1,c!==0&&(uK(p,t,c,l,h),h=void 0,c=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=!0,u=void 0,a=[0,0,0,0],i=[0,n+1,0,0],s&&(s=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",h,t]])),r=g.type==="tableDelimiterRow"?2:h?3:1):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(o=!1,i[2]===0&&(a[1]!==0&&(i[0]=i[1],u=Kp(p,t,a,r,void 0,u),a=[0,0,0,0]),i[2]=n)):g.type==="tableCellDivider"&&(o?o=!1:(a[1]!==0&&(i[0]=i[1],u=Kp(p,t,a,r,void 0,u)),a=i,i=[a[1],n,0,0])):g.type==="tableHead"?(s=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,a[1]!==0?(i[0]=i[1],u=Kp(p,t,a,r,n,u)):i[1]!==0&&(u=Kp(p,t,i,r,n,u)),r=0):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(i[3]=n)}for(c!==0&&uK(p,t,c,l,h),p.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Ott(t.events,n))}return e}function Kp(e,t,n,o,r,a){const i=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Ru(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=Ru(t.events,n[1]);if(a={type:i,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=Ru(t.events,n[2]),h=Ru(t.events,n[3]),u={type:s,start:Object.assign({},l),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",u,t]]),o!==2){const p=t.events[n[2]],y=t.events[n[3]];if(p[1].end=Object.assign({},y[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,k=n[3]-n[2]-1;e.add(g,k,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return r!==void 0&&(a.end=Object.assign({},Ru(t.events,r)),e.add(r,0,[["exit",a,t]]),a=void 0),a}function uK(e,t,n,o,r){const a=[],i=Ru(t.events,n);r&&(r.end=Object.assign({},i),a.push(["exit",r,t])),o.end=Object.assign({},i),a.push(["exit",o,t]),e.add(n+1,0,a)}function Ru(e,t){const n=e[t],o=n[0]==="enter"?"start":"end";return n[1][o]}const Btt={name:"tasklistCheck",tokenize:Wtt};function Utt(){return{text:{91:Btt}}}function Wtt(e,t,n){const o=this;return r;function r(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return yt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),i):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),i):n(c)}function i(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return $e(c)?t(c):Qe(c)?e.check({tokenize:Gtt},t,n)(c):n(c)}}function Gtt(e,t,n){return nt(e,o,"whitespace");function o(r){return r===null?n(r):t(r)}}function Ktt(e){return rre([vtt(),Itt(),Ttt(e),Ftt(),Utt()])}const Xtt={};function Ztt(e){const t=this,n=e||Xtt,o=t.data(),r=o.micromarkExtensions||(o.micromarkExtensions=[]),a=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),i=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);r.push(Ktt(n)),a.push(ytt()),i.push(mtt(n))}let Xp=null,Ytt=0;function Qtt(){return Xp||(Xp=X0(()=>import("./mermaid.core-DujK2Rzn.js").then(e=>e.ak),__vite__mapDeps([8,9,1])).then(e=>{const t=e;return t.default??t}),Xp)}function hK(){var e;return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||(e=document.body)!=null&&e.classList.contains("dark")?!0:!!document.querySelector(".dark")}function fK({code:e,className:t}){const n=m.useRef(null),o=m.useRef(`seeflow-mermaid-${++Ytt}`),[r,a]=m.useState(null),[i,s]=m.useState(()=>hK());return m.useEffect(()=>{if(typeof document>"u")return;const c=()=>s(hK()),l=new MutationObserver(c);return l.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.body&&l.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>l.disconnect()},[]),m.useEffect(()=>{let c=!1;return a(null),Qtt().then(async l=>{l.initialize({startOnLoad:!1,theme:i?"dark":"default",securityLevel:"strict",fontFamily:'"Inter", ui-sans-serif, system-ui, sans-serif'});const h=`${o.current}-${i?"d":"l"}`,u=await l.render(h,e);if(c)return;const p=n.current;p&&(p.innerHTML=u.svg)}).catch(l=>{c||a(l instanceof Error?l.message:String(l))}),()=>{c=!0}},[e,i]),r?f.jsx("pre",{"data-testid":"detail-panel-mermaid-fallback","data-mermaid-error":"true",title:r,className:ne("sf:mb-2 sf:overflow-x-auto sf:rounded sf:bg-muted/60 sf:px-2 sf:py-1 sf:font-mono sf:text-xs sf:text-foreground sf:last:mb-0",t),children:f.jsx("code",{children:e})}):f.jsx("div",{ref:n,"data-testid":"detail-panel-mermaid","data-mermaid-theme":i?"dark":"light",role:"img","aria-label":"Mermaid diagram",className:ne("sf:mb-2 sf:overflow-x-auto sf:rounded sf:bg-muted/30 sf:px-3 sf:py-2 sf:text-foreground sf:last:mb-0",t)})}function Jtt({flowId:e,node:t,connector:n,adapter:o,onNameChange:r,onDescriptionChange:a,onDetailChange:i,onIconChange:s,statusReport:c,open:l=!0,onClose:h}){const u=(t==null?void 0:t.type)==="text",p=(t==null?void 0:t.type)==="ellipse"||(t==null?void 0:t.type)==="sticky",y=u?null:t,g=y&&"name"in y.data?y.data.name??"":"",k=(y==null?void 0:y.data.description)??"",x=(y==null?void 0:y.data.detail)??"",v=y!==null&&!p,M=y!==null&&(y.type==="rectangle"||y.type==="component"),w=M&&typeof s=="function",b=M&&y&&"icon"in y.data?y.data.icon??null:null,[C,_]=m.useState(()=>cHe()),S=N=>{N.preventDefault(),dHe(C,N.clientX,{onWidth:_,onCommit:lHe})};m.useEffect(()=>{const N=j=>{var U;if(j.key!=="Escape")return;const z=document.activeElement;(U=z==null?void 0:z.getAttribute("data-testid"))!=null&&U.endsWith("-editor")||h()};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[h]);const E={width:l?C:0,borderLeftWidth:l?"var(--detail-panel-border-left)":0,transition:"width 220ms ease-out, border-left-width 220ms ease-out"},P={width:C,boxShadow:"var(--detail-panel-shadow)"};return f.jsx("aside",{"aria-label":"Inspector","data-testid":"detail-panel","data-state":l?"open":"closed",style:E,className:"sf:relative sf:flex sf:h-full sf:flex-shrink-0 sf:flex-col sf:overflow-hidden sf:border-border",children:f.jsxs("div",{style:P,className:"sf:relative sf:flex sf:h-full sf:flex-shrink-0 sf:flex-col sf:overflow-y-auto sf:bg-card/94 sf:p-6 sf:backdrop-blur-[14px]",children:[f.jsx("div",{"aria-label":"Resize detail panel",onPointerDown:S,"data-testid":"detail-panel-resize-handle",className:"sf:absolute sf:inset-y-0 sf:left-0 sf:z-10 sf:hidden sf:w-1.5 sf:cursor-col-resize sf:bg-transparent sf:transition-colors sf:hover:bg-border sf:sm:block"}),f.jsxs("button",{type:"button",onClick:h,"aria-label":"Close inspector","data-testid":"detail-panel-close",className:"sf:absolute sf:right-4 sf:top-4 sf:z-10 sf:inline-flex sf:h-7 sf:w-7 sf:items-center sf:justify-center sf:rounded-sm sf:text-foreground/70 sf:opacity-70 sf:transition-opacity sf:hover:opacity-100 sf:focus:outline-hidden sf:focus:ring-2 sf:focus:ring-ring sf:focus:ring-offset-2",children:[f.jsx(Ai,{className:"sf:h-4 sf:w-4"}),f.jsx("span",{className:"sf:sr-only",children:"Close"})]}),y?f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-4",children:[f.jsxs("div",{className:"sf:-mx-6 sf:-mt-6 sf:flex sf:flex-col sf:border-b sf:border-border/60 sf:bg-card/60 sf:px-6 sf:pb-2.5 sf:pt-3 sf:pr-12",children:[v?f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:text-lg sf:font-semibold sf:text-foreground",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-2",children:[w&&s?f.jsx(ent,{nodeId:y.id,icon:b,onChange:s}):M&&b?f.jsx("span",{"data-testid":"detail-panel-icon-readonly","aria-hidden":!0,className:"sf:inline-flex sf:h-7 sf:w-7 sf:shrink-0 sf:items-center sf:justify-center sf:text-foreground/90",children:f.jsx(F0,{name:b,size:16})}):null,f.jsx("div",{className:"sf:min-w-0 sf:flex-1",children:f.jsx(kD,{nodeId:y.id,value:g,placeholder:"Name",multiline:!1,ariaLabel:"Name",testIdBase:"detail-panel-name",onSave:r,textClassName:"sf:text-lg sf:font-semibold sf:tracking-tight sf:text-foreground/95"})})]})}):f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:sr-only",children:y.id}),f.jsxs("p",{className:"sf:sr-only",children:[y.id," · ",y.type]})]}),f.jsxs("div",{className:"sf:mt-0 sf:flex sf:flex-col sf:gap-3",children:[c?f.jsx(rnt,{report:c}):null,f.jsx(kD,{nodeId:y.id,value:k,placeholder:"Short description shown on the node body",multiline:!0,ariaLabel:"Description",testIdBase:"detail-panel-description",onSave:a,textClassName:"sf:text-[13px] sf:leading-relaxed sf:text-muted-foreground sf:dark:text-zinc-400"}),f.jsx(kD,{nodeId:y.id,value:x,placeholder:"Long-form notes, context, anything…",multiline:!0,ariaLabel:"Detail",testIdBase:"detail-panel-detail",onSave:i,markdown:!0,textClassName:"sf:text-sm sf:leading-relaxed sf:text-foreground"}),y.type==="html"&&e?f.jsx(tnt,{adapter:o,nodeId:y.id,htmlPath:"view.html"}):null]})]}):n?f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-4",children:[f.jsxs("div",{className:"sf:-mx-6 sf:-mt-6 sf:flex sf:flex-col sf:border-b sf:border-border/60 sf:bg-card/60 sf:px-6 sf:pb-2.5 sf:pt-3 sf:pr-12",children:[f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:text-lg sf:font-semibold sf:tracking-tight sf:text-foreground/95",children:n.label??"Connector"}),f.jsx("p",{className:"sf:sr-only",children:n.id})]}),f.jsx("div",{className:"sf:mt-0 sf:flex sf:flex-col sf:gap-3",children:f.jsx(int,{connector:n})})]}):f.jsx("div",{"data-testid":"detail-panel-empty",className:"sf:text-muted-foreground sf:text-sm",children:"Select a node to inspect."})]})})}function kD({nodeId:e,value:t,placeholder:n,multiline:o,ariaLabel:r,testIdBase:a,onSave:i,textClassName:s,markdown:c=!1}){const[l,h]=m.useState(!1),u=m.useRef(null),p=m.useRef(!1);m.useEffect(()=>{if(!l)return;const C=u.current;if(!C)return;C.textContent=t,C.focus();const _=window.getSelection();if(_){const S=document.createRange();S.selectNodeContents(C),S.collapse(!1),_.removeAllRanges(),_.addRange(S)}},[l,t]);const y=t==="";if(!i)return f.jsx("div",{"data-testid":a,"aria-label":r,className:ne("sf:w-full sf:rounded-md sf:px-2 sf:py-1.5 sf:text-sm",y?"sf:italic sf:text-muted-foreground/50":"text-foreground",!c&&"sf:whitespace-pre-wrap sf:wrap-break-word",s),children:y?n:c?f.jsx(pK,{value:t}):t});const g=()=>{const C=u.current,_=C?o?C.innerText:C.textContent??"":t;i(e,_),h(!1)},k=()=>{h(!1)},x=C=>{if(C.stopPropagation(),C.nativeEvent.stopPropagation(),C.key==="Escape"){C.preventDefault(),p.current=!0,k();return}if(C.key==="Enter"){if(C.preventDefault(),C.shiftKey||!o){g();return}document.execCommand("insertText",!1,`
8541
+ `))}function c(y,g,k,x){const v=k.enter("tableCell"),M=k.enter("phrasing"),w=k.containerPhrasing(y,{...x,before:a,after:a});return M(),v(),w}function l(y,g){return bet(y,{align:g,alignDelimiters:o,padding:n,stringLength:r})}function h(y,g,k){const x=y.children;let v=-1;const M=[],w=g.enter("table");for(;++v<x.length;)M[v]=u(x[v],g,k);return w(),M}function u(y,g,k){const x=y.children;let v=-1;const M=[],w=g.enter("tableRow");for(;++v<x.length;)M[v]=c(x[v],y,g,k);return w(),M}function p(y,g,k){let x=Ore.inlineCode(y,g,k);return k.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function utt(){return{exit:{taskListCheckValueChecked:dK,taskListCheckValueUnchecked:dK,paragraph:ftt}}}function htt(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:ptt}}}function dK(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ftt(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const o=n.children[0];if(o&&o.type==="text"){const r=t.children;let a=-1,i;for(;++a<r.length;){const s=r[a];if(s.type==="paragraph"){i=s;break}}i===n&&(o.value=o.value.slice(1),o.value.length===0?n.children.shift():n.position&&o.position&&typeof o.position.start.offset=="number"&&(o.position.start.column++,o.position.start.offset++,n.position.start=Object.assign({},o.position.start)))}}this.exit(e)}function ptt(e,t,n,o){const r=e.children[0],a=typeof e.checked=="boolean"&&r&&r.type==="paragraph",i="["+(e.checked?"x":" ")+"] ",s=n.createTracker(o);a&&s.move(i);let c=Ore.listItem(e,t,n,{...o,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(h){return h+i}}function ytt(){return[UJe(),fet(),get(),rtt(),utt()]}function mtt(e){return{extensions:[WJe(),pet(e),ket(),dtt(e),htt()]}}const gtt={tokenize:btt,partial:!0},Fre={tokenize:_tt,partial:!0},qre={tokenize:Ctt,partial:!0},Vre={tokenize:Stt,partial:!0},ktt={tokenize:Ltt,partial:!0},Bre={name:"wwwAutolink",tokenize:wtt,previous:Wre},Ure={name:"protocolAutolink",tokenize:Mtt,previous:Gre},Ta={name:"emailAutolink",tokenize:xtt,previous:Kre},ea={};function vtt(){return{text:ea}}let us=48;for(;us<123;)ea[us]=Ta,us++,us===58?us=65:us===91&&(us=97);ea[43]=Ta;ea[45]=Ta;ea[46]=Ta;ea[95]=Ta;ea[72]=[Ta,Ure];ea[104]=[Ta,Ure];ea[87]=[Ta,Bre];ea[119]=[Ta,Bre];function xtt(e,t,n){const o=this;let r,a;return i;function i(u){return!LO(u)||!Kre.call(o,o.previous)||rV(o.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(u))}function s(u){return LO(u)?(e.consume(u),s):u===64?(e.consume(u),c):n(u)}function c(u){return u===46?e.check(ktt,h,l)(u):u===45||u===95||xn(u)?(a=!0,e.consume(u),c):h(u)}function l(u){return e.consume(u),r=!0,c}function h(u){return a&&r&&In(o.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function wtt(e,t,n){const o=this;return r;function r(i){return i!==87&&i!==119||!Wre.call(o,o.previous)||rV(o.events)?n(i):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(gtt,e.attempt(Fre,e.attempt(qre,a),n),n)(i))}function a(i){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(i)}}function Mtt(e,t,n){const o=this;let r="",a=!1;return i;function i(u){return(u===72||u===104)&&Gre.call(o,o.previous)&&!rV(o.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),r+=String.fromCodePoint(u),e.consume(u),s):n(u)}function s(u){if(In(u)&&r.length<5)return r+=String.fromCodePoint(u),e.consume(u),s;if(u===58){const p=r.toLowerCase();if(p==="http"||p==="https")return e.consume(u),c}return n(u)}function c(u){return u===47?(e.consume(u),a?l:(a=!0,c)):n(u)}function l(u){return u===null||wz(u)||yt(u)||Hd(u)||PR(u)?n(u):e.attempt(Fre,e.attempt(qre,h),n)(u)}function h(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function btt(e,t,n){let o=0;return r;function r(i){return(i===87||i===119)&&o<3?(o++,e.consume(i),r):i===46&&o===3?(e.consume(i),a):n(i)}function a(i){return i===null?n(i):t(i)}}function _tt(e,t,n){let o,r,a;return i;function i(l){return l===46||l===95?e.check(Vre,c,s)(l):l===null||yt(l)||Hd(l)||l!==45&&PR(l)?c(l):(a=!0,e.consume(l),i)}function s(l){return l===95?o=!0:(r=o,o=void 0),e.consume(l),i}function c(l){return r||o||!a?n(l):t(l)}}function Ctt(e,t){let n=0,o=0;return r;function r(i){return i===40?(n++,e.consume(i),r):i===41&&o<n?a(i):i===33||i===34||i===38||i===39||i===41||i===42||i===44||i===46||i===58||i===59||i===60||i===63||i===93||i===95||i===126?e.check(Vre,t,a)(i):i===null||yt(i)||Hd(i)?t(i):(e.consume(i),r)}function a(i){return i===41&&o++,e.consume(i),r}}function Stt(e,t,n){return o;function o(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),o):s===38?(e.consume(s),a):s===93?(e.consume(s),r):s===60||s===null||yt(s)||Hd(s)?t(s):n(s)}function r(s){return s===null||s===40||s===91||yt(s)||Hd(s)?t(s):o(s)}function a(s){return In(s)?i(s):n(s)}function i(s){return s===59?(e.consume(s),o):In(s)?(e.consume(s),i):n(s)}}function Ltt(e,t,n){return o;function o(a){return e.consume(a),r}function r(a){return xn(a)?n(a):t(a)}}function Wre(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||yt(e)}function Gre(e){return!In(e)}function Kre(e){return!(e===47||LO(e))}function LO(e){return e===43||e===45||e===46||e===95||xn(e)}function rV(e){let t=e.length,n=!1;for(;t--;){const o=e[t][1];if((o.type==="labelLink"||o.type==="labelImage")&&!o._balanced){n=!0;break}if(o._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Ntt={tokenize:Rtt,partial:!0};function Itt(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:$tt,continuation:{tokenize:Ptt},exit:ztt}},text:{91:{name:"gfmFootnoteCall",tokenize:jtt},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Att,resolveTo:Ett}}}}function Att(e,t,n){const o=this;let r=o.events.length;const a=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let i;for(;r--;){const c=o.events[r][1];if(c.type==="labelImage"){i=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!i||!i._balanced)return n(c);const l=tr(o.sliceSerialize({start:i.end,end:o.now()}));return l.codePointAt(0)!==94||!a.includes(l.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Ett(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const o={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},e[e.length-1][1].start)},i={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",o,t],e[n+3],e[n+4],["enter",r,t],["exit",r,t],["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",o,t]];return e.splice(n,e.length-n+1,...s),e}function jtt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a=0,i;return s;function s(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(u){if(a>999||u===93&&!i||u===null||u===91||yt(u))return n(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return r.includes(tr(o.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return yt(u)||(i=!0),a++,e.consume(u),u===92?h:l}function h(u){return u===91||u===92||u===93?(e.consume(u),a++,l):l(u)}}function $tt(e,t,n){const o=this,r=o.parser.gfmFootnotes||(o.parser.gfmFootnotes=[]);let a,i=0,s;return c;function c(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(g)}function h(g){if(i>999||g===93&&!s||g===null||g===91||yt(g))return n(g);if(g===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return a=tr(o.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return yt(g)||(s=!0),i++,e.consume(g),g===92?u:h}function u(g){return g===91||g===92||g===93?(e.consume(g),i++,h):h(g)}function p(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),r.includes(a)||r.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(g)}function y(g){return t(g)}}function Ptt(e,t,n){return e.check(qf,t,e.attempt(Ntt,t,n))}function ztt(e){e.exit("gfmFootnoteDefinition")}function Rtt(e,t,n){const o=this;return nt(e,r,"gfmFootnoteDefinitionIndent",5);function r(a){const i=o.events[o.events.length-1];return i&&i[1].type==="gfmFootnoteDefinitionIndent"&&i[2].sliceSerialize(i[1],!0).length===4?t(a):n(a)}}function Ttt(e){let n=(e||{}).singleTilde;const o={name:"strikethrough",tokenize:a,resolveAll:r};return n==null&&(n=!0),{text:{126:o},insideSpan:{null:[o]},attentionMarkers:{null:[126]}};function r(i,s){let c=-1;for(;++c<i.length;)if(i[c][0]==="enter"&&i[c][1].type==="strikethroughSequenceTemporary"&&i[c][1]._close){let l=c;for(;l--;)if(i[l][0]==="exit"&&i[l][1].type==="strikethroughSequenceTemporary"&&i[l][1]._open&&i[c][1].end.offset-i[c][1].start.offset===i[l][1].end.offset-i[l][1].start.offset){i[c][1].type="strikethroughSequence",i[l][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},i[l][1].start),end:Object.assign({},i[c][1].end)},u={type:"strikethroughText",start:Object.assign({},i[l][1].end),end:Object.assign({},i[c][1].start)},p=[["enter",h,s],["enter",i[l][1],s],["exit",i[l][1],s],["enter",u,s]],y=s.parser.constructs.insideSpan.null;y&&lo(p,p.length,0,zR(y,i.slice(l+1,c),s)),lo(p,p.length,0,[["exit",u,s],["enter",i[c][1],s],["exit",i[c][1],s],["exit",h,s]]),lo(i,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<i.length;)i[c][1].type==="strikethroughSequenceTemporary"&&(i[c][1].type="data");return i}function a(i,s,c){const l=this.previous,h=this.events;let u=0;return p;function p(g){return l===126&&h[h.length-1][1].type!=="characterEscape"?c(g):(i.enter("strikethroughSequenceTemporary"),y(g))}function y(g){const k=U0(l);if(g===126)return u>1?c(g):(i.consume(g),u++,y);if(u<2&&!n)return c(g);const x=i.exit("strikethroughSequenceTemporary"),v=U0(g);return x._open=!v||v===2&&!!k,x._close=!k||k===2&&!!v,s(g)}}}class Dtt{constructor(){this.map=[]}add(t,n,o){Htt(this,t,n,o)}consume(t){if(this.map.sort(function(a,i){return a[0]-i[0]}),this.map.length===0)return;let n=this.map.length;const o=[];for(;n>0;)n-=1,o.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];o.push(t.slice()),t.length=0;let r=o.pop();for(;r;){for(const a of r)t.push(a);r=o.pop()}this.map.length=0}}function Htt(e,t,n,o){let r=0;if(!(n===0&&o.length===0)){for(;r<e.map.length;){if(e.map[r][0]===t){e.map[r][1]+=n,e.map[r][2].push(...o);return}r+=1}e.map.push([t,n,o])}}function Ott(e,t){let n=!1;const o=[];for(;t<e.length;){const r=e[t];if(n){if(r[0]==="enter")r[1].type==="tableContent"&&o.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=o.length-1;o[a]=o[a]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return o}function Ftt(){return{flow:{null:{name:"table",tokenize:qtt,resolveAll:Vtt}}}}function qtt(e,t,n){const o=this;let r=0,a=0,i;return s;function s(N){let j=o.events.length-1;for(;j>-1;){const A=o.events[j][1].type;if(A==="lineEnding"||A==="linePrefix")j--;else break}const z=j>-1?o.events[j][1].type:null,U=z==="tableHead"||z==="tableRow"?_:c;return U===_&&o.parser.lazy[o.now().line]?n(N):U(N)}function c(N){return e.enter("tableHead"),e.enter("tableRow"),l(N)}function l(N){return N===124||(i=!0,a+=1),h(N)}function h(N){return N===null?n(N):$e(N)?a>1?(a=0,o.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),y):n(N):Qe(N)?nt(e,h,"whitespace")(N):(a+=1,i&&(i=!1,r+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),i=!0,h):(e.enter("data"),u(N)))}function u(N){return N===null||N===124||yt(N)?(e.exit("data"),h(N)):(e.consume(N),N===92?p:u)}function p(N){return N===92||N===124?(e.consume(N),u):u(N)}function y(N){return o.interrupt=!1,o.parser.lazy[o.now().line]?n(N):(e.enter("tableDelimiterRow"),i=!1,Qe(N)?nt(e,g,"linePrefix",o.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):g(N))}function g(N){return N===45||N===58?x(N):N===124?(i=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),k):C(N)}function k(N){return Qe(N)?nt(e,x,"whitespace")(N):x(N)}function x(N){return N===58?(a+=1,i=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),v):N===45?(a+=1,v(N)):N===null||$e(N)?b(N):C(N)}function v(N){return N===45?(e.enter("tableDelimiterFiller"),M(N)):C(N)}function M(N){return N===45?(e.consume(N),M):N===58?(i=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(N))}function w(N){return Qe(N)?nt(e,b,"whitespace")(N):b(N)}function b(N){return N===124?g(N):N===null||$e(N)?!i||r!==a?C(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):C(N)}function C(N){return n(N)}function _(N){return e.enter("tableRow"),S(N)}function S(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),S):N===null||$e(N)?(e.exit("tableRow"),t(N)):Qe(N)?nt(e,S,"whitespace")(N):(e.enter("data"),E(N))}function E(N){return N===null||N===124||yt(N)?(e.exit("data"),S(N)):(e.consume(N),N===92?P:E)}function P(N){return N===92||N===124?(e.consume(N),E):E(N)}}function Vtt(e,t){let n=-1,o=!0,r=0,a=[0,0,0,0],i=[0,0,0,0],s=!1,c=0,l,h,u;const p=new Dtt;for(;++n<e.length;){const y=e[n],g=y[1];y[0]==="enter"?g.type==="tableHead"?(s=!1,c!==0&&(uK(p,t,c,l,h),h=void 0,c=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",l,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(o=!0,u=void 0,a=[0,0,0,0],i=[0,n+1,0,0],s&&(s=!1,h={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},p.add(n,0,[["enter",h,t]])),r=g.type==="tableDelimiterRow"?2:h?3:1):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(o=!1,i[2]===0&&(a[1]!==0&&(i[0]=i[1],u=Kp(p,t,a,r,void 0,u),a=[0,0,0,0]),i[2]=n)):g.type==="tableCellDivider"&&(o?o=!1:(a[1]!==0&&(i[0]=i[1],u=Kp(p,t,a,r,void 0,u)),a=i,i=[a[1],n,0,0])):g.type==="tableHead"?(s=!0,c=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(c=n,a[1]!==0?(i[0]=i[1],u=Kp(p,t,a,r,n,u)):i[1]!==0&&(u=Kp(p,t,i,r,n,u)),r=0):r&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(i[3]=n)}for(c!==0&&uK(p,t,c,l,h),p.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Ott(t.events,n))}return e}function Kp(e,t,n,o,r,a){const i=o===1?"tableHeader":o===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},Ru(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const c=Ru(t.events,n[1]);if(a={type:i,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const l=Ru(t.events,n[2]),h=Ru(t.events,n[3]),u={type:s,start:Object.assign({},l),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",u,t]]),o!==2){const p=t.events[n[2]],y=t.events[n[3]];if(p[1].end=Object.assign({},y[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,k=n[3]-n[2]-1;e.add(g,k,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return r!==void 0&&(a.end=Object.assign({},Ru(t.events,r)),e.add(r,0,[["exit",a,t]]),a=void 0),a}function uK(e,t,n,o,r){const a=[],i=Ru(t.events,n);r&&(r.end=Object.assign({},i),a.push(["exit",r,t])),o.end=Object.assign({},i),a.push(["exit",o,t]),e.add(n+1,0,a)}function Ru(e,t){const n=e[t],o=n[0]==="enter"?"start":"end";return n[1][o]}const Btt={name:"tasklistCheck",tokenize:Wtt};function Utt(){return{text:{91:Btt}}}function Wtt(e,t,n){const o=this;return r;function r(c){return o.previous!==null||!o._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),a)}function a(c){return yt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),i):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),i):n(c)}function i(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(c)}function s(c){return $e(c)?t(c):Qe(c)?e.check({tokenize:Gtt},t,n)(c):n(c)}}function Gtt(e,t,n){return nt(e,o,"whitespace");function o(r){return r===null?n(r):t(r)}}function Ktt(e){return rre([vtt(),Itt(),Ttt(e),Ftt(),Utt()])}const Xtt={};function Ztt(e){const t=this,n=e||Xtt,o=t.data(),r=o.micromarkExtensions||(o.micromarkExtensions=[]),a=o.fromMarkdownExtensions||(o.fromMarkdownExtensions=[]),i=o.toMarkdownExtensions||(o.toMarkdownExtensions=[]);r.push(Ktt(n)),a.push(ytt()),i.push(mtt(n))}let Xp=null,Ytt=0;function Qtt(){return Xp||(Xp=X0(()=>import("./mermaid.core-BzxthQo1.js").then(e=>e.ak),__vite__mapDeps([8,9,1])).then(e=>{const t=e;return t.default??t}),Xp)}function hK(){var e;return typeof document>"u"?!1:document.documentElement.classList.contains("dark")||(e=document.body)!=null&&e.classList.contains("dark")?!0:!!document.querySelector(".dark")}function fK({code:e,className:t}){const n=m.useRef(null),o=m.useRef(`seeflow-mermaid-${++Ytt}`),[r,a]=m.useState(null),[i,s]=m.useState(()=>hK());return m.useEffect(()=>{if(typeof document>"u")return;const c=()=>s(hK()),l=new MutationObserver(c);return l.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),document.body&&l.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>l.disconnect()},[]),m.useEffect(()=>{let c=!1;return a(null),Qtt().then(async l=>{l.initialize({startOnLoad:!1,theme:i?"dark":"default",securityLevel:"strict",fontFamily:'"Inter", ui-sans-serif, system-ui, sans-serif'});const h=`${o.current}-${i?"d":"l"}`,u=await l.render(h,e);if(c)return;const p=n.current;p&&(p.innerHTML=u.svg)}).catch(l=>{c||a(l instanceof Error?l.message:String(l))}),()=>{c=!0}},[e,i]),r?f.jsx("pre",{"data-testid":"detail-panel-mermaid-fallback","data-mermaid-error":"true",title:r,className:ne("sf:mb-2 sf:overflow-x-auto sf:rounded sf:bg-muted/60 sf:px-2 sf:py-1 sf:font-mono sf:text-xs sf:text-foreground sf:last:mb-0",t),children:f.jsx("code",{children:e})}):f.jsx("div",{ref:n,"data-testid":"detail-panel-mermaid","data-mermaid-theme":i?"dark":"light",role:"img","aria-label":"Mermaid diagram",className:ne("sf:mb-2 sf:overflow-x-auto sf:rounded sf:bg-muted/30 sf:px-3 sf:py-2 sf:text-foreground sf:last:mb-0",t)})}function Jtt({flowId:e,node:t,connector:n,adapter:o,onNameChange:r,onDescriptionChange:a,onDetailChange:i,onIconChange:s,statusReport:c,open:l=!0,onClose:h}){const u=(t==null?void 0:t.type)==="text",p=(t==null?void 0:t.type)==="ellipse"||(t==null?void 0:t.type)==="sticky",y=u?null:t,g=y&&"name"in y.data?y.data.name??"":"",k=(y==null?void 0:y.data.description)??"",x=(y==null?void 0:y.data.detail)??"",v=y!==null&&!p,M=y!==null&&(y.type==="rectangle"||y.type==="component"),w=M&&typeof s=="function",b=M&&y&&"icon"in y.data?y.data.icon??null:null,[C,_]=m.useState(()=>cHe()),S=N=>{N.preventDefault(),dHe(C,N.clientX,{onWidth:_,onCommit:lHe})};m.useEffect(()=>{const N=j=>{var U;if(j.key!=="Escape")return;const z=document.activeElement;(U=z==null?void 0:z.getAttribute("data-testid"))!=null&&U.endsWith("-editor")||h()};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[h]);const E={width:l?C:0,borderLeftWidth:l?"var(--detail-panel-border-left)":0,transition:"width 220ms ease-out, border-left-width 220ms ease-out"},P={width:C,boxShadow:"var(--detail-panel-shadow)"};return f.jsx("aside",{"aria-label":"Inspector","data-testid":"detail-panel","data-state":l?"open":"closed",style:E,className:"sf:relative sf:flex sf:h-full sf:flex-shrink-0 sf:flex-col sf:overflow-hidden sf:border-border",children:f.jsxs("div",{style:P,className:"sf:relative sf:flex sf:h-full sf:flex-shrink-0 sf:flex-col sf:overflow-y-auto sf:bg-card/94 sf:p-6 sf:backdrop-blur-[14px]",children:[f.jsx("div",{"aria-label":"Resize detail panel",onPointerDown:S,"data-testid":"detail-panel-resize-handle",className:"sf:absolute sf:inset-y-0 sf:left-0 sf:z-10 sf:hidden sf:w-1.5 sf:cursor-col-resize sf:bg-transparent sf:transition-colors sf:hover:bg-border sf:sm:block"}),f.jsxs("button",{type:"button",onClick:h,"aria-label":"Close inspector","data-testid":"detail-panel-close",className:"sf:absolute sf:right-4 sf:top-4 sf:z-10 sf:inline-flex sf:h-7 sf:w-7 sf:items-center sf:justify-center sf:rounded-sm sf:text-foreground/70 sf:opacity-70 sf:transition-opacity sf:hover:opacity-100 sf:focus:outline-hidden sf:focus:ring-2 sf:focus:ring-ring sf:focus:ring-offset-2",children:[f.jsx(Ai,{className:"sf:h-4 sf:w-4"}),f.jsx("span",{className:"sf:sr-only",children:"Close"})]}),y?f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-4",children:[f.jsxs("div",{className:"sf:-mx-6 sf:-mt-6 sf:flex sf:flex-col sf:border-b sf:border-border/60 sf:bg-card/60 sf:px-6 sf:pb-2.5 sf:pt-3 sf:pr-12",children:[v?f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:text-lg sf:font-semibold sf:text-foreground",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-2",children:[w&&s?f.jsx(ent,{nodeId:y.id,icon:b,onChange:s}):M&&b?f.jsx("span",{"data-testid":"detail-panel-icon-readonly","aria-hidden":!0,className:"sf:inline-flex sf:h-7 sf:w-7 sf:shrink-0 sf:items-center sf:justify-center sf:text-foreground/90",children:f.jsx(F0,{name:b,size:16})}):null,f.jsx("div",{className:"sf:min-w-0 sf:flex-1",children:f.jsx(kD,{nodeId:y.id,value:g,placeholder:"Name",multiline:!1,ariaLabel:"Name",testIdBase:"detail-panel-name",onSave:r,textClassName:"sf:text-lg sf:font-semibold sf:tracking-tight sf:text-foreground/95"})})]})}):f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:sr-only",children:y.id}),f.jsxs("p",{className:"sf:sr-only",children:[y.id," · ",y.type]})]}),f.jsxs("div",{className:"sf:mt-0 sf:flex sf:flex-col sf:gap-3",children:[c?f.jsx(rnt,{report:c}):null,f.jsx(kD,{nodeId:y.id,value:k,placeholder:"Short description shown on the node body",multiline:!0,ariaLabel:"Description",testIdBase:"detail-panel-description",onSave:a,textClassName:"sf:text-[13px] sf:leading-relaxed sf:text-muted-foreground sf:dark:text-zinc-400"}),f.jsx(kD,{nodeId:y.id,value:x,placeholder:"Long-form notes, context, anything…",multiline:!0,ariaLabel:"Detail",testIdBase:"detail-panel-detail",onSave:i,markdown:!0,textClassName:"sf:text-sm sf:leading-relaxed sf:text-foreground"}),y.type==="html"&&e?f.jsx(tnt,{adapter:o,nodeId:y.id,htmlPath:"view.html"}):null]})]}):n?f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-4",children:[f.jsxs("div",{className:"sf:-mx-6 sf:-mt-6 sf:flex sf:flex-col sf:border-b sf:border-border/60 sf:bg-card/60 sf:px-6 sf:pb-2.5 sf:pt-3 sf:pr-12",children:[f.jsx("h2",{"data-testid":"detail-panel-title",className:"sf:text-lg sf:font-semibold sf:tracking-tight sf:text-foreground/95",children:n.label??"Connector"}),f.jsx("p",{className:"sf:sr-only",children:n.id})]}),f.jsx("div",{className:"sf:mt-0 sf:flex sf:flex-col sf:gap-3",children:f.jsx(int,{connector:n})})]}):f.jsx("div",{"data-testid":"detail-panel-empty",className:"sf:text-muted-foreground sf:text-sm",children:"Select a node to inspect."})]})})}function kD({nodeId:e,value:t,placeholder:n,multiline:o,ariaLabel:r,testIdBase:a,onSave:i,textClassName:s,markdown:c=!1}){const[l,h]=m.useState(!1),u=m.useRef(null),p=m.useRef(!1);m.useEffect(()=>{if(!l)return;const C=u.current;if(!C)return;C.textContent=t,C.focus();const _=window.getSelection();if(_){const S=document.createRange();S.selectNodeContents(C),S.collapse(!1),_.removeAllRanges(),_.addRange(S)}},[l,t]);const y=t==="";if(!i)return f.jsx("div",{"data-testid":a,"aria-label":r,className:ne("sf:w-full sf:rounded-md sf:px-2 sf:py-1.5 sf:text-sm",y?"sf:italic sf:text-muted-foreground/50":"text-foreground",!c&&"sf:whitespace-pre-wrap sf:wrap-break-word",s),children:y?n:c?f.jsx(pK,{value:t}):t});const g=()=>{const C=u.current,_=C?o?C.innerText:C.textContent??"":t;i(e,_),h(!1)},k=()=>{h(!1)},x=C=>{if(C.stopPropagation(),C.nativeEvent.stopPropagation(),C.key==="Escape"){C.preventDefault(),p.current=!0,k();return}if(C.key==="Enter"){if(C.preventDefault(),C.shiftKey||!o){g();return}document.execCommand("insertText",!1,`
8542
8542
  `)}},v=C=>{C.preventDefault();const _=C.clipboardData.getData("text/plain");document.execCommand("insertText",!1,_)},M=C=>{},w=()=>{if(p.current){p.current=!1;return}g()},b=()=>{l||h(!0)};return f.jsx("div",{className:"relative","data-testid":a,"data-editing":l?"true":"false",children:l?f.jsx("div",{ref:u,contentEditable:"plaintext-only",suppressContentEditableWarning:!0,spellCheck:!1,tabIndex:0,onKeyDown:x,onPaste:v,onInput:M,onBlur:w,"data-testid":`${a}-editor`,className:ne("sf:block sf:w-full sf:whitespace-pre-wrap sf:wrap-break-word sf:rounded-md sf:px-2 sf:py-1.5 sf:text-sm sf:outline-hidden",s),role:"textbox","aria-multiline":o?"true":"false","aria-label":r}):f.jsx("button",{type:"button",onClick:b,"aria-label":`Edit ${r.toLowerCase()}`,className:ne("sf:block sf:w-full sf:cursor-text sf:rounded-md sf:px-2 sf:py-1.5 sf:text-left sf:text-sm sf:transition-colors sf:hover:bg-muted/50",y?"sf:italic sf:text-muted-foreground/50":"text-foreground",!c&&"sf:whitespace-pre-wrap sf:wrap-break-word",s),children:y?n:c?f.jsx(pK,{value:t}):t})})}function ent({nodeId:e,icon:t,onChange:n}){const[o,r]=m.useState(!1);return f.jsx(xq,{open:o,onOpenChange:r,onPick:a=>{n(e,a),r(!1)},anchor:f.jsx("button",{type:"button","data-testid":"detail-panel-icon-trigger","aria-label":t?"Change icon":"Add icon","aria-pressed":o,className:ne("sf:inline-flex sf:h-7 sf:w-7 sf:shrink-0 sf:items-center sf:justify-center sf:rounded-md sf:text-foreground sf:transition-colors",t?"sf:hover:bg-muted":"sf:border sf:border-dashed sf:border-muted-foreground/40 sf:text-muted-foreground/60 sf:hover:border-muted-foreground sf:hover:text-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-1"),children:t?f.jsx(F0,{name:t,size:16,"aria-hidden":!0}):f.jsx(ih,{className:"sf:h-4 sf:w-4","aria-hidden":!0})})})}function tnt({adapter:e,nodeId:t,htmlPath:n}){const[o,r]=m.useState({kind:"idle"}),a=typeof(e==null?void 0:e.openFile)=="function",i=typeof(e==null?void 0:e.revealFile)=="function",s=`nodes/${t}/${n}`,c=async l=>{var h,u;r({kind:"pending"});try{l==="open"?await((h=e==null?void 0:e.openFile)==null?void 0:h.call(e,s)):await((u=e==null?void 0:e.revealFile)==null?void 0:u.call(e,s)),r({kind:"idle"})}catch(p){r({kind:"error",message:p instanceof Error?p.message:String(p)})}};return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-2 sf:rounded-md sf:border sf:bg-card sf:px-3 sf:py-2 sf:text-xs","data-testid":"detail-panel-html-node",children:[f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-1",children:[f.jsx("span",{className:"sf:font-mono sf:text-[11px] sf:text-muted-foreground sf:uppercase sf:tracking-widest",children:"Path"}),f.jsx("code",{"data-testid":"detail-panel-html-path",className:"sf:block sf:break-all sf:rounded sf:bg-muted/40 sf:px-2 sf:py-1 sf:font-mono sf:text-[11px]",children:n})]}),a||i?f.jsxs("div",{className:"sf:flex sf:flex-wrap sf:items-center sf:gap-2",children:[a?f.jsxs(Ke,{type:"button",size:"sm",variant:"outline",className:"sf:h-7 sf:gap-1.5 sf:px-2",onClick:()=>{c("open")},disabled:o.kind==="pending","data-testid":"detail-panel-html-open","aria-label":"Open in editor",children:[f.jsx(ph,{className:"sf:h-3.5 sf:w-3.5"}),"Open in editor"]}):null,i?f.jsxs(Ke,{type:"button",size:"sm",variant:"outline",className:"sf:h-7 sf:gap-1.5 sf:px-2",onClick:()=>{c("reveal")},disabled:o.kind==="pending","data-testid":"detail-panel-html-reveal","aria-label":"Reveal in Finder/Explorer",children:[f.jsx(oh,{className:"sf:h-3.5 sf:w-3.5"}),"Reveal"]}):null]}):null,o.kind==="error"?f.jsx("div",{"data-testid":"detail-panel-html-status","data-status":o.kind,className:ne("sf:text-[11px] sf:text-destructive"),children:o.message??""}):null]})}function nnt(e,t){const n=Math.max(0,t-e);if(n<1e3)return"just now";const o=Math.floor(n/1e3);if(o<60)return`${o}s ago`;const r=Math.floor(o/60);if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function ont(e){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function rnt({report:e,now:t=Date.now()}){const n=e.data?Object.entries(e.data):[];return f.jsxs("section",{className:"sf:flex sf:flex-col sf:gap-2 sf:rounded-md sf:border sf:bg-card sf:px-3 sf:py-2 sf:text-xs","data-testid":"detail-panel-status","data-state":e.state,children:[f.jsxs("div",{className:"sf:flex sf:items-center sf:justify-between sf:gap-2",children:[f.jsx(bq,{state:e.state,summary:e.summary,"data-testid":"detail-panel-status-badge"}),f.jsx("span",{className:"sf:shrink-0 sf:text-[10px] sf:text-muted-foreground","data-testid":"detail-panel-status-relative-time",children:`Last updated: ${nnt(e.ts,t)}`})]}),e.detail?f.jsx("div",{"data-testid":"detail-panel-status-detail",className:"sf:whitespace-pre-wrap sf:wrap-break-word sf:rounded sf:bg-muted/40 sf:px-2 sf:py-1 sf:text-[11px] sf:text-foreground",children:e.detail}):null,n.length>0?f.jsx("dl",{"data-testid":"detail-panel-status-data",className:"sf:grid sf:grid-cols-[auto_1fr] sf:gap-x-3 sf:gap-y-1 sf:text-[11px]",children:n.map(([o,r])=>f.jsxs("div",{className:"contents","data-testid":"detail-panel-status-data-row",children:[f.jsx("dt",{className:"sf:truncate sf:font-medium sf:text-muted-foreground",children:o}),f.jsx("dd",{className:"sf:break-all sf:font-mono sf:text-foreground",children:ont(r)})]},o))}):null]})}function Xre(e){return typeof e=="string"?e.replace(/\n$/,""):Array.isArray(e)?e.map(t=>typeof t=="string"?t:"").join("").replace(/\n$/,""):String(e??"").replace(/\n$/,"")}function ant(e){if(!m.isValidElement(e))return null;const t=e.props;return!t||typeof t.className!="string"||!t.className.includes("language-mermaid")?null:Xre(t.children)}function pK({value:e}){return f.jsx(zJe,{remarkPlugins:[Ztt],components:{h1:({children:t})=>f.jsx("h1",{className:"sf:mb-1 sf:text-base sf:font-bold sf:leading-snug",children:t}),h2:({children:t})=>f.jsx("h2",{className:"sf:mb-1 sf:text-sm sf:font-semibold sf:leading-snug",children:t}),h3:({children:t})=>f.jsx("h3",{className:"sf:mb-0.5 sf:text-sm sf:font-medium sf:leading-snug",children:t}),p:({children:t})=>f.jsx("p",{className:"sf:mb-2 sf:last:mb-0 sf:leading-relaxed",children:t}),ul:({children:t})=>f.jsx("ul",{className:"sf:mb-2 sf:list-disc sf:pl-4 sf:last:mb-0",children:t}),ol:({children:t})=>f.jsx("ol",{className:"sf:mb-2 sf:list-decimal sf:pl-4 sf:last:mb-0",children:t}),li:({children:t})=>f.jsx("li",{className:"mb-0.5",children:t}),code:({children:t,className:n})=>typeof n=="string"&&n.includes("language-mermaid")?f.jsx(fK,{code:Xre(t)}):(n==null?void 0:n.includes("language-"))?f.jsx("code",{className:"sf:block sf:overflow-x-auto sf:rounded sf:bg-muted/60 sf:px-2 sf:py-1 sf:font-mono sf:text-xs",children:t}):f.jsx("code",{className:"sf:rounded sf:bg-muted/60 sf:px-1 sf:py-0.5 sf:font-mono sf:text-xs",children:t}),pre:({children:t})=>{const n=ant(t);return n!==null?f.jsx(fK,{code:n}):f.jsx("pre",{className:"sf:mb-2 sf:last:mb-0",children:t})},blockquote:({children:t})=>f.jsx("blockquote",{className:"sf:mb-2 sf:border-l-2 sf:border-muted-foreground/30 sf:pl-3 sf:italic sf:text-muted-foreground sf:last:mb-0",children:t}),a:({href:t,children:n})=>f.jsx("a",{href:t,target:"_blank",rel:"noreferrer",className:"sf:text-primary sf:underline sf:underline-offset-2",children:n}),strong:({children:t})=>f.jsx("strong",{className:"font-semibold",children:t}),em:({children:t})=>f.jsx("em",{className:"italic",children:t}),hr:()=>f.jsx("hr",{className:"sf:my-2 sf:border-border"}),table:({children:t})=>f.jsx("div",{className:"sf:mb-2 sf:overflow-x-auto sf:last:mb-0",children:f.jsx("table",{className:"sf:w-full sf:border-collapse sf:text-xs",children:t})}),th:({children:t})=>f.jsx("th",{className:"sf:border sf:border-border sf:bg-muted/40 sf:px-2 sf:py-1 sf:text-left sf:font-medium",children:t}),td:({children:t})=>f.jsx("td",{className:"sf:border sf:border-border sf:px-2 sf:py-1",children:t})},children:e})}function int({connector:e}){return f.jsx("div",{className:"sf:rounded-md sf:border sf:bg-card sf:px-3 sf:py-2 sf:text-xs",children:f.jsxs("dl",{className:"divide-y",children:[f.jsx(pa,{label:"Source",value:e.source}),f.jsx(pa,{label:"Target",value:e.target}),e.label?f.jsx(pa,{label:"Label",value:e.label}):null,e.style?f.jsx(pa,{label:"Style",value:e.style}):null,e.color?f.jsx(pa,{label:"Color",value:e.color}):null,e.direction?f.jsx(pa,{label:"Direction",value:e.direction}):null,e.url?f.jsx(pa,{label:"URL",value:`${e.method??"GET"} ${e.url}`}):null,e.eventName?f.jsx(pa,{label:"Event",value:e.eventName}):null,e.queueName?f.jsx(pa,{label:"Queue",value:e.queueName}):null]})})}function pa({label:e,value:t}){return f.jsxs("div",{className:"sf:flex sf:items-start sf:gap-3 sf:py-2 sf:first:pt-0 sf:last:pb-0",children:[f.jsx("dt",{className:"sf:w-20 sf:shrink-0 sf:font-medium sf:text-muted-foreground",children:e}),f.jsx("dd",{className:"sf:flex-1 sf:break-all sf:font-mono",children:t})]})}const snt="https://seeflow.dev/embed",cnt=(e,t)=>{const n=`${snt}/${encodeURIComponent(e)}`;return t?`${n}?theme=${t}`:n},lnt=e=>{var t,n;return(n=(t=e==null?void 0:e.documentElement)==null?void 0:t.classList)!=null&&n.contains("dark")?"dark":"light"},dnt=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;"),unt=e=>[`<iframe src="${dnt(e)}"`,' width="100%"',' height="600"',' style="border:0"',' allow="fullscreen"',' loading="lazy"></iframe>'].join(`
8543
8543
  `),hnt="Embed this canvas",fnt="Paste this iframe into any page to embed the canvas.",pnt="Copy snippet",ynt="Copied!",mnt="Press ⌘C to copy",gnt="Close",knt="Theme",vnt=1500,xnt=[{value:"match",label:"Match my theme"},{value:"light",label:"Light"},{value:"dark",label:"Dark"}],wnt=e=>e==="light"?"light":e==="dark"?"dark":lnt(typeof document<"u"?document:null);function Mnt({open:e,onOpenChange:t,projectId:n}){const[o,r]=m.useState("idle"),[a,i]=m.useState("match"),s=m.useRef(null),c=m.useMemo(()=>unt(cnt(n,wnt(a))),[n,a]),l=m.useCallback(async()=>{try{await navigator.clipboard.writeText(c),r("copied"),setTimeout(()=>r("idle"),vnt)}catch{r("fallback");const h=s.current;h&&(h.focus(),h.select())}},[c]);return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{"data-testid":"embed-dialog-content",children:[f.jsxs(jo,{children:[f.jsx($o,{children:hnt}),f.jsx(Po,{children:fnt})]}),f.jsxs("fieldset",{className:"sf:flex sf:flex-col sf:gap-2 sf:border-0 sf:p-0",children:[f.jsx("legend",{id:"embed-dialog-theme-label",className:"sf:mb-2 sf:text-xs sf:font-medium sf:text-foreground",children:knt}),f.jsx("div",{"data-testid":"embed-dialog-theme-group",className:"sf:inline-flex sf:self-start sf:rounded-md sf:border sf:border-input sf:bg-background sf:p-0.5",children:xnt.map(h=>{const u=a===h.value;return f.jsx("button",{type:"button","aria-pressed":u,"aria-label":h.label,"data-testid":`embed-dialog-theme-${h.value}`,"data-active":u,onClick:()=>i(h.value),className:ne("sf:rounded sf:px-3 sf:py-1 sf:text-xs sf:transition-colors sf:focus-visible:outline-hidden sf:focus-visible:ring-1 sf:focus-visible:ring-ring",u?"sf:bg-secondary sf:text-secondary-foreground sf:shadow-sm":"sf:text-muted-foreground sf:hover:bg-accent sf:hover:text-accent-foreground"),children:h.label},h.value)})})]}),f.jsx("textarea",{ref:s,"data-testid":"embed-dialog-snippet",readOnly:!0,rows:7,value:c,spellCheck:!1,onFocus:h=>h.currentTarget.select(),className:"sf:w-full sf:resize-none sf:rounded-md sf:border sf:border-border sf:bg-background sf:p-3 sf:font-mono sf:text-xs sf:leading-relaxed sf:text-foreground sf:focus:outline-hidden sf:focus:ring-2 sf:focus:ring-ring"}),o==="fallback"?f.jsx("p",{"data-testid":"embed-dialog-fallback-hint",className:"sf:text-xs sf:text-muted-foreground",children:mnt}):null,f.jsxs(ar,{children:[f.jsx(Ke,{variant:"outline","data-testid":"embed-dialog-close",onClick:()=>t(!1),children:gnt}),f.jsx(Ke,{"data-testid":"embed-dialog-copy",onClick:l,children:o==="copied"?ynt:pnt})]})]})})}const yK="Share / download",bnt="Download PDF",_nt="Download PNG",Cnt="Embed",Snt="Live Share",Lnt="Export to seeflow.dev";function Zre({mode:e,projectId:t,enableEmbed:n,onDownloadPdf:o,onDownloadPng:r,onExportToCloud:a,onLiveShare:i,embedOpen:s,onEmbedOpenChange:c}){const[l,h]=m.useState(!1),[u,p]=m.useState(!1),[y,g]=m.useState(!1),k=s!==void 0,x=k?s:y,v=m.useCallback(P=>{k||g(P),c==null||c(P)},[k,c]),M=m.useCallback(()=>{!o||l||(h(!0),Promise.resolve(o()).finally(()=>h(!1)))},[o,l]),w=m.useCallback(()=>{!r||u||(p(!0),Promise.resolve(r()).finally(()=>p(!1)))},[r,u]),b=!!o,C=!!r,_=n&&typeof t=="string"&&t.length>0,S=e==="edit"&&!!a,E=e==="edit"&&!!i;return!b&&!C&&!_&&!S&&!E?null:f.jsxs(f.Fragment,{children:[f.jsxs(hoe,{children:[f.jsx(foe,{asChild:!0,children:f.jsx("button",{type:"button","data-testid":"share-menu-trigger","aria-label":yK,title:yK,className:ne("sf:inline-flex sf:h-8 sf:w-8 sf:items-center sf:justify-center sf:rounded-md sf:border sf:border-border sf:bg-background/95 sf:text-muted-foreground sf:shadow-md sf:backdrop-blur-sm sf:transition-colors","sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring"),children:f.jsx(xh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsxs(Rq,{align:"end","data-testid":"share-menu-content",onCloseAutoFocus:P=>{P.preventDefault()},children:[b?f.jsxs(zu,{"data-testid":"share-menu-pdf",disabled:l,onSelect:P=>{P.preventDefault(),M()},children:[l?f.jsx(Vn,{className:"sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):f.jsx(nh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:bnt})]}):null,C?f.jsxs(zu,{"data-testid":"share-menu-png",disabled:u,onSelect:P=>{P.preventDefault(),w()},children:[u?f.jsx(Vn,{className:"sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):f.jsx(sh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:_nt})]}):null,_?f.jsxs(zu,{"data-testid":"share-menu-embed",onSelect:P=>{P.preventDefault(),v(!0)},children:[f.jsx(s0,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:Cnt})]}):null,E?f.jsxs(zu,{"data-testid":"share-menu-live-share",onSelect:()=>{i==null||i()},children:[f.jsx(Ch,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:Snt})]}):null,S?f.jsxs(zu,{"data-testid":"share-menu-export-cloud",onSelect:()=>{a==null||a()},children:[f.jsx(bh,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsx("span",{children:Lnt})]}):null]})]}),_&&t?f.jsx(Mnt,{open:x,onOpenChange:v,projectId:t}):null]})}const Nnt=2500,Int=3,Ant='"JetBrains Mono", ui-monospace, SFMono-Regular, monospace',Ent={position:"fixed",bottom:16,left:16,display:"flex",flexDirection:"column-reverse",gap:8,pointerEvents:"none",zIndex:50},jnt={background:"#18181b",color:"#fafafa",border:"1px solid #27272a",borderRadius:8,padding:"8px 12px 8px 9px",fontFamily:Ant,fontSize:12,lineHeight:1.4,display:"inline-flex",alignItems:"baseline",gap:6,boxShadow:"0 4px 12px -2px rgba(0,0,0,0.5)",pointerEvents:"none",whiteSpace:"nowrap"},$nt={fontWeight:600},Pnt={color:"#a1a1aa"},znt={color:"#fafafa"};function Rnt({items:e,onExpire:t,lifetimeMs:n=Nnt,maxVisible:o=Int,nowFn:r,setTimeoutFn:a,clearTimeoutFn:i}){const s=m.useRef(t);s.current=t,m.useEffect(()=>{const l=r??Date.now,h=a??((y,g)=>setTimeout(y,g)),u=i??(y=>clearTimeout(y)),p=[];for(const y of e){const g=l()-y.createdAt,k=Math.max(0,n-g),x=y.id,v=h(()=>s.current(x),k);p.push(v)}return()=>{for(const y of p)u(y)}},[e,n,r,a,i]);const c=e.slice(-o);return f.jsx("div",{"data-testid":"attribution-toast-stack",style:Ent,children:c.map(l=>f.jsxs("div",{"data-testid":`attribution-toast-${l.id}`,"data-toast-id":l.id,style:{...jnt,borderLeft:`3px solid ${l.color}`},children:[f.jsx("span",{style:{...$nt,color:l.color},children:l.displayName}),f.jsx("span",{style:Pnt,children:l.verb}),f.jsx("span",{style:znt,children:l.nodeLabel})]},l.id))})}const Tnt=8;function Dnt(e){let t=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,r=Number.NEGATIVE_INFINITY,a=!1;for(const i of e){const s=i.data.width,c=i.data.height;s===void 0||c===void 0||(a=!0,i.position.x<t&&(t=i.position.x),i.position.y<n&&(n=i.position.y),i.position.x+s>o&&(o=i.position.x+s),i.position.y+c>r&&(r=i.position.y+c))}return a?{x:t,y:n,width:o-t,height:r-n}:null}function Hnt(e){return e.length>=2}function Ont({selectedNodes:e,onMultiResize:t,paddingPx:n=Tnt}){sR();const[o,r]=m.useState(null),[a,i]=m.useState(null);if(m.useRef(!1),m.useRef(null),!Hnt(e))return null;const s=Dnt(e);if(!s)return null;const c=a??s;return c.x-n,c.y-n,c.width+n*2,c.height+n*2,null}const mK=22,gK=11,kK=3,vK=2,vD=8,xD=1,xK=["none","white","slate","gray","red","orange","amber","yellow","lime","green","teal","cyan","sky","blue","indigo","violet","fuchsia","pink"],Zp=[{value:"solid",icon:xz,label:"Solid",testId:"style-tab-border-style-solid"},{value:"dashed",icon:Soe,label:"Dashed",testId:"style-tab-border-style-dashed"},{value:"dotted",icon:Loe,label:"Dotted",testId:"style-tab-border-style-dotted"}],wK=[{value:"solid",icon:xz,label:"Solid",testId:"style-tab-edge-style-solid"},{value:"dashed",icon:Soe,label:"Dashed",testId:"style-tab-edge-style-dashed"},{value:"dotted",icon:Loe,label:"Dotted",testId:"style-tab-edge-style-dotted"}],MK=[{value:"curve",icon:Noe,label:"Curve",testId:"style-tab-edge-path-curve"},{value:"step",icon:qKe,label:"Zigzag",testId:"style-tab-edge-path-step"}],Fnt="center",qnt=[{value:"left",icon:Vo,label:"Left",testId:"style-tab-text-align-left"},{value:"center",icon:ui,label:"Center",testId:"style-tab-text-align-center"},{value:"right",icon:hi,label:"Right",testId:"style-tab-text-align-right"}],bK=[{value:"none",icon:lh,label:"None",testId:"style-tab-direction-none"},{value:"backward",icon:uh,label:"Backward",testId:"style-tab-direction-backward"},{value:"forward",icon:a0,label:"Forward",testId:"style-tab-direction-forward"},{value:"both",icon:X2,label:"Both",testId:"style-tab-direction-both"}];function Vnt({nodes:e,connectors:t,onStyleNode:n,onStyleNodePreview:o,onStyleNodes:r,onStyleNodesPreview:a,onStyleConnector:i,onStyleConnectorPreview:s,onRequestIconReplace:c}){const l=e.length>0,h=t.length>0;if(!l&&!h)return null;const u=l&&!h,p=!l&&h,y=e[0],g=t[0],k=e.filter(se=>se.type!=="icon"),x=k[0],v=u&&e.every(se=>se.type==="icon"),M=v?e.find(se=>se.type==="icon"):void 0,w=u&&e.every(se=>se.type==="image"),b=u&&(y==null?void 0:y.type)==="text",C=(p?g==null?void 0:g.color:b?x==null?void 0:x.data.borderColor:x==null?void 0:x.data.backgroundColor)??"default",_=(x==null?void 0:x.data.borderStyle)??"solid",S=(g==null?void 0:g.style)??"solid",E=(g==null?void 0:g.direction)??"forward",P=(g==null?void 0:g.path)??"curve",N=se=>{if(e.length>1&&r)r(e.map(J=>J.id),{borderColor:se,backgroundColor:se});else for(const J of e)n(J.id,{borderColor:se,backgroundColor:se});for(const J of t)i(J.id,{color:se})},j=se=>{for(const J of e)n(J.id,{borderStyle:se});for(const J of t)i(J.id,{style:se})},z=se=>{for(const J of e)n(J.id,{borderSize:se});for(const J of t)i(J.id,{borderSize:se})},U=se=>{for(const J of e)o==null||o(J.id,{borderSize:se});for(const J of t)s==null||s(J.id,{borderSize:se})},A=se=>{if(e.length>1&&r)r(e.map(J=>J.id),{fontSize:se});else for(const J of e)n(J.id,{fontSize:se})},T=se=>{if(e.length>1&&a)a(e.map(J=>J.id),{fontSize:se});else for(const J of e)o==null||o(J.id,{fontSize:se})},D=k.length>1&&new Set(k.map(se=>se.data.fontSize??mK)).size>1,O=se=>{if(e.length>1&&r)r(e.map(J=>J.id),{textAlign:se});else for(const J of e)n(J.id,{textAlign:se})},I=(x==null?void 0:x.data.textAlign)??Fnt,R=se=>{for(const J of t)i(J.id,{fontSize:se})},L=se=>{for(const J of t)s==null||s(J.id,{fontSize:se})},q=t.length>1&&new Set(t.map(se=>se.fontSize??gK)).size>1,H=se=>{for(const J of e)n(J.id,{cornerRadius:se})},$=se=>{for(const J of e)o==null||o(J.id,{cornerRadius:se})},X=k.length>1&&new Set(k.map(se=>se.data.cornerRadius??vD)).size>1,G=se=>{for(const J of e)n(J.id,{shadow:se})},Q=se=>{for(const J of e)o==null||o(J.id,{shadow:se})},oe=k.length>1&&new Set(k.map(se=>se.data.shadow??xD)).size>1,re=se=>{for(const J of t)i(J.id,{path:se})},te=se=>{for(const J of t)i(J.id,{direction:se})},ce=se=>{for(const J of e)n(J.id,{color:se})},ke=(M==null?void 0:M.data.color)??"default",ve=p?(g==null?void 0:g.borderSize)??vK:(x==null?void 0:x.data.borderSize)??kK,xe=p?vK:kK,He=p?"edge":"border",Ze=p?"Connector color":"Color",ue=p?"connector color":"color",Ie="style-tab-color-trigger",zt="style-tab-color";if(v){const se=!!c&&e.length===1&&!!M,J=()=>{M&&c&&c(M.id)};return f.jsx(m0,{delayDuration:300,children:f.jsxs("div",{"data-testid":"canvas-style-strip",className:"sf:pointer-events-auto sf:flex sf:flex-col sf:items-center sf:gap-1 sf:rounded-lg sf:border sf:border-border sf:bg-background/95 sf:p-1 sf:shadow-md sf:backdrop-blur",children:[f.jsx(Unt,{testId:"style-strip-icon-color",tooltip:"Icon color",ariaLabel:"icon color",activeToken:ke,previewKind:"edge",tokenTestIdPrefix:"style-tab-icon-color",innerTestId:"style-tab-icon-color-trigger",allowNone:!1,onSelect:ce}),se?f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx("button",{type:"button","data-testid":"style-strip-change-icon","aria-label":"change icon",title:"Change icon",onClick:J,className:ne("sf:inline-flex sf:h-8 sf:w-8 sf:items-center sf:justify-center sf:rounded-md sf:text-muted-foreground sf:transition-colors sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-1"),children:f.jsx(l0,{className:"sf:h-4 sf:w-4"})})}),f.jsx(Gr,{side:"right",className:"sf:px-2 sf:py-1 sf:text-xs",children:"Change icon"})]}):null]})})}if(w){const se=e[0],J=(se==null?void 0:se.data.borderColor)??"default",Rt=(se==null?void 0:se.data.borderStyle)??"solid",fn=(se==null?void 0:se.data.borderWidth)??1,ae=ge=>{for(const Le of e)n(Le.id,{borderColor:ge})},Y=ge=>{for(const Le of e)n(Le.id,{borderStyle:ge})},he=ge=>{for(const Le of e)n(Le.id,{borderWidth:ge})},Ae=ge=>{for(const Le of e)o==null||o(Le.id,{borderWidth:ge})},Re=ge=>{for(const Le of e)n(Le.id,{cornerRadius:ge})},We=ge=>{for(const Le of e)o==null||o(Le.id,{cornerRadius:ge})},Vt=ge=>{for(const Le of e)n(Le.id,{shadow:ge})},pn=ge=>{for(const Le of e)o==null||o(Le.id,{shadow:ge})},nn=()=>{const ge=J==="none";return f.jsx("span",{className:ne("sf:relative sf:h-5 sf:w-5 sf:rounded-full",ge&&"sf:bg-card"),style:ge?void 0:Cz(J),children:ge?f.jsx(Sz,{}):null})};return f.jsx(m0,{delayDuration:300,children:f.jsxs("div",{"data-testid":"canvas-style-strip",className:"sf:pointer-events-auto sf:flex sf:flex-col sf:items-center sf:gap-1 sf:rounded-lg sf:border sf:border-border sf:bg-background/95 sf:p-1 sf:shadow-md sf:backdrop-blur",children:[f.jsx(wo,{testId:"style-strip-image-border-color-button",tooltip:"Border color",ariaLabel:"image border color",renderIcon:nn,children:f.jsx(NO,{testId:"style-strip-image-border-color",activeToken:J,previewKind:"border",tokenTestIdPrefix:"style-tab-image-border-color",innerTestId:"style-tab-image-border-color-trigger",ariaLabel:"image border color",onSelect:ae})}),f.jsx(wo,{testId:"style-strip-image-corner-radius-button",tooltip:"Corners",ariaLabel:"image corners",renderIcon:()=>f.jsx(c0,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-image-corner-radius",children:f.jsx(hs,{value:se==null?void 0:se.data.cornerRadius,defaultValue:vD,min:0,max:32,suffix:"px",onPreview:We,onCommit:Re,testId:"style-tab-image-corner-radius-slider"})})}),f.jsx(wo,{testId:"style-strip-image-shadow-button",tooltip:"Shadow",ariaLabel:"image shadow",renderIcon:()=>f.jsx(ka,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-image-shadow",children:f.jsx(hs,{value:se==null?void 0:se.data.shadow,defaultValue:xD,min:0,max:5,onPreview:pn,onCommit:Vt,testId:"style-tab-image-shadow-slider"})})}),f.jsx(wo,{testId:"style-strip-image-border-style",tooltip:"Border style",ariaLabel:"image border style",renderIcon:()=>{var Le;const ge=((Le=Zp.find(At=>At.value===Rt))==null?void 0:Le.icon)??xz;return f.jsx(ge,{className:"sf:h-4 sf:w-4"})},children:f.jsx(Lu,{ariaLabel:"Border style",value:Rt,onChange:Y,options:Zp})}),f.jsx(wo,{testId:"style-strip-image-border-width",tooltip:"Border width",ariaLabel:"image border width",renderIcon:()=>f.jsx("span",{className:"sf:font-mono sf:text-[10px] sf:tabular-nums",children:fn}),children:f.jsx(hs,{value:se==null?void 0:se.data.borderWidth,defaultValue:1,min:0,max:8,suffix:"px",onPreview:Ae,onCommit:he,testId:"style-tab-image-border-width-slider"})})]})})}const pt=!b,tn=()=>{const se=C==="none";return f.jsx("span",{className:ne("sf:relative sf:h-5 sf:w-5 sf:rounded-full",se&&"sf:bg-card"),style:se?void 0:Cz(C),children:se?f.jsx(Sz,{}):null})};return f.jsx(m0,{delayDuration:300,children:f.jsxs("div",{"data-testid":"canvas-style-strip",className:"sf:pointer-events-auto sf:flex sf:flex-col sf:items-center sf:gap-1 sf:rounded-lg sf:border sf:border-border sf:bg-background/95 sf:p-1 sf:shadow-md sf:backdrop-blur",children:[f.jsx(wo,{testId:"style-strip-color-button",tooltip:Ze,ariaLabel:ue,renderIcon:tn,children:f.jsx(NO,{testId:"style-strip-color",activeToken:C,previewKind:He,tokenTestIdPrefix:zt,innerTestId:Ie,ariaLabel:ue,allowNone:!p,onSelect:N})}),l?f.jsx(wo,{testId:"style-strip-corner-radius-button",tooltip:"Corners",ariaLabel:"corners",renderIcon:()=>f.jsx(c0,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-corner-radius",children:f.jsx(hs,{value:x==null?void 0:x.data.cornerRadius,defaultValue:vD,min:0,max:32,suffix:"px",indeterminate:X,onPreview:$,onCommit:H,testId:"style-tab-corner-radius-slider"})})}):null,l?f.jsx(wo,{testId:"style-strip-shadow-button",tooltip:"Shadow",ariaLabel:"shadow",renderIcon:()=>f.jsx(ka,{className:"sf:h-4 sf:w-4"}),children:f.jsx("div",{"data-testid":"style-strip-shadow",children:f.jsx(hs,{value:x==null?void 0:x.data.shadow,defaultValue:xD,min:0,max:5,indeterminate:oe,onPreview:Q,onCommit:G,testId:"style-tab-shadow-slider"})})}):null,pt?f.jsx(wo,{testId:"style-strip-border",tooltip:p?"Connector":"Border",ariaLabel:p?"connector":"border",renderIcon:()=>{var J,Rt;const se=(p?(J=wK.find(fn=>fn.value===S))==null?void 0:J.icon:(Rt=Zp.find(fn=>fn.value===_))==null?void 0:Rt.icon)??xz;return f.jsx(se,{className:"sf:h-4 sf:w-4"})},children:f.jsxs("div",{className:"sf:flex sf:w-56 sf:flex-col sf:gap-3",children:[f.jsx(Yp,{label:"Style",testId:"style-strip-border-style",children:p?f.jsx(Lu,{ariaLabel:"Connector style",value:S,onChange:se=>j(se),options:wK}):f.jsx(Lu,{ariaLabel:"Border style",value:_,onChange:se=>j(se),options:Zp})}),f.jsx(Yp,{label:"Width",testId:"style-strip-border-size",children:f.jsx(hs,{value:ve,defaultValue:xe,min:0,max:8,suffix:"px",onPreview:U,onCommit:z,testId:p?"style-tab-stroke-width-slider":"style-tab-border-size-slider"})})]})}):null,l||p?f.jsx(wo,{testId:"style-strip-text",tooltip:"Text",ariaLabel:"text",renderIcon:()=>f.jsx(d0,{className:"sf:h-4 sf:w-4"}),children:f.jsxs("div",{className:"sf:flex sf:w-56 sf:flex-col sf:gap-3",children:[f.jsx(Yp,{label:"Size",testId:p?"style-strip-connector-font-size":"style-strip-font-size",children:f.jsx(hs,{value:p?g==null?void 0:g.fontSize:x==null?void 0:x.data.fontSize,defaultValue:p?gK:mK,min:p?8:10,max:32,suffix:"px",indeterminate:p?q:D,onPreview:p?L:T,onCommit:p?R:A,testId:p?"style-tab-connector-font-size-slider":"style-tab-font-size-slider"})}),l?f.jsx(Yp,{label:"Align",testId:"style-strip-text-align",children:f.jsx(Lu,{ariaLabel:"Text alignment",value:I,onChange:O,options:qnt})}):null]})}):null,p?f.jsx(wo,{testId:"style-strip-path",tooltip:"Connector path",ariaLabel:"connector path",renderIcon:()=>{var J;const se=((J=MK.find(Rt=>Rt.value===P))==null?void 0:J.icon)??Noe;return f.jsx(se,{className:"sf:h-4 sf:w-4"})},children:f.jsx(Lu,{ariaLabel:"Connector path",value:P,onChange:re,options:MK})}):null,p?f.jsx(wo,{testId:"style-strip-direction",tooltip:"Direction",ariaLabel:"direction",renderIcon:()=>{var J;const se=((J=bK.find(Rt=>Rt.value===E))==null?void 0:J.icon)??a0;return f.jsx(se,{className:"sf:h-4 sf:w-4"})},children:f.jsx(Lu,{ariaLabel:"Connector direction",value:E,onChange:te,options:bK})}):null]})})}function Cz(e){return e==="default"?{backgroundColor:"hsl(var(--card))"}:{backgroundColor:wle[e].edge}}function Sz(){return f.jsx("span",{"aria-hidden":"true",className:"sf:pointer-events-none sf:absolute sf:inset-0 sf:rounded-full",style:{backgroundImage:"linear-gradient(45deg, transparent 45%, hsl(0, 75%, 55%) 45%, hsl(0, 75%, 55%) 55%, transparent 55%)"}})}function Bnt({token:e,isActive:t,onClick:n,testId:o,ariaLabel:r}){const a=e==="none",i=e==="white";return f.jsxs("button",{type:"button",onClick:n,"data-testid":o,"data-active":t,"aria-label":r,"aria-pressed":t,title:e,className:ne("sf:relative sf:flex sf:h-5 sf:w-5 sf:items-center sf:justify-center sf:rounded-full sf:transition-all",a&&"sf:border sf:border-border sf:bg-card",i&&"sf:border sf:border-border",t?"sf:ring-2 sf:ring-ring sf:ring-offset-1 sf:ring-offset-popover":"sf:hover:scale-110"),style:a?void 0:Cz(e),children:[a?f.jsx(Sz,{}):null,t&&!a?f.jsx(Ni,{className:"sf:h-2.5 sf:w-2.5 sf:drop-shadow-sm",style:{color:i?"hsl(0, 0%, 30%)":"hsl(var(--foreground))"}}):null]})}function Unt({testId:e,tooltip:t,ariaLabel:n,activeToken:o,previewKind:r,tokenTestIdPrefix:a,innerTestId:i,allowNone:s,onSelect:c}){const[l,h]=m.useState(!1),u=o==="none";return f.jsxs(Wd,{open:l,onOpenChange:h,children:[f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx(n2,{asChild:!0,children:f.jsx("button",{type:"button","data-testid":e,"data-active-token":o,"aria-label":`${n}: ${o}`,title:t,className:ne("sf:group sf:relative sf:inline-flex sf:h-8 sf:w-8 sf:items-center sf:justify-center sf:rounded-md sf:text-muted-foreground sf:transition-colors sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-1"),children:f.jsx("span",{"data-testid":i,className:ne("sf:relative sf:h-5 sf:w-5 sf:rounded-full",u&&"sf:bg-card"),style:u?void 0:Cz(o),children:u?f.jsx(Sz,{}):null})})})}),f.jsx(Gr,{side:"right",className:"sf:px-2 sf:py-1 sf:text-xs",children:t})]}),f.jsx(Gi,{side:"right",align:"start",className:"sf:w-auto sf:p-1.5","data-testid":`${i}-popover`,children:f.jsx(NO,{testId:`${a}-grid`,activeToken:o,previewKind:r,tokenTestIdPrefix:a,innerTestId:i,ariaLabel:n,allowNone:s,onSelect:p=>{c(p),h(!1)}})})]})}function NO({testId:e,activeToken:t,previewKind:n,tokenTestIdPrefix:o,innerTestId:r,ariaLabel:a,allowNone:i,onSelect:s}){const c=i===!1?xK.filter(l=>l!=="none"):xK;return f.jsx("div",{"data-testid":e,"data-active-token":t,"data-inner-testid":r,className:"sf:grid sf:grid-cols-6 sf:gap-2 sf:p-1",children:c.map(l=>f.jsx(Bnt,{token:l,isActive:t===l,onClick:()=>s(l),testId:`${o}-${l}`,ariaLabel:`${a} ${l}`},l))})}function Yp({label:e,testId:t,children:n}){return f.jsxs("div",{className:"sf:flex sf:flex-col sf:gap-1.5","data-testid":t,children:[f.jsx("div",{className:"sf:text-[11px] sf:font-medium sf:uppercase sf:tracking-wide sf:text-muted-foreground",children:e}),n]})}function wo({testId:e,tooltip:t,ariaLabel:n,renderIcon:o,children:r}){const[a,i]=m.useState(!1);return f.jsxs(Wd,{open:a,onOpenChange:i,children:[f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx(n2,{asChild:!0,children:f.jsx("button",{type:"button","data-testid":e,"aria-label":n,title:t,className:ne("sf:inline-flex sf:h-8 sf:w-8 sf:items-center sf:justify-center sf:rounded-md sf:text-muted-foreground sf:transition-colors sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus-visible:outline-hidden sf:focus-visible:ring-2 sf:focus-visible:ring-ring sf:focus-visible:ring-offset-1"),children:o()})})}),f.jsx(Gr,{side:"right",className:"sf:px-2 sf:py-1 sf:text-xs",children:t})]}),f.jsx(Gi,{side:"right",align:"start",className:"sf:w-auto sf:p-3",children:r})]})}function hs({value:e,defaultValue:t,min:n,max:o,suffix:r,indeterminate:a,onPreview:i,onCommit:s,testId:c}){const l=e??t,[h,u]=m.useState(l),[p,y]=m.useState(!1);m.useEffect(()=>{u(l),y(!1)},[l]);const g=a&&!p;return f.jsxs("div",{className:"sf:flex sf:w-48 sf:items-center sf:gap-3",children:[f.jsx(eq,{min:n,max:o,step:1,value:[h],onValueChange:([k])=>{const x=k??n;u(x),y(!0),i==null||i(x)},onValueCommit:([k])=>s(k??n),"data-testid":c,"data-indeterminate":g?"true":void 0,className:ne("sf:flex-1",g&&"sf:opacity-60")}),f.jsx("span",{"data-testid":`${c}-value`,className:"sf:w-12 sf:shrink-0 sf:text-right sf:text-xs sf:tabular-nums sf:text-muted-foreground",children:g?"Mixed":f.jsxs(f.Fragment,{children:[h,r]})})]})}function Wnt(e){return{createNode:async t=>{const n=await e.createNode(t);if(!n.ok)throw new Error(n.reason);return n.value},updateNode:async(t,n)=>{const o=await e.updateNode(t,n);if(!o.ok)throw new Error(o.reason)},updateNodePosition:async(t,n)=>{const o=await e.updateNodePosition(t,n);if(!o.ok)throw new Error(o.reason);return o.value},deleteNode:async t=>{const n=await e.deleteNode(t);if(!n.ok)throw new Error(n.reason)},reorderNode:async(t,n)=>{const o=await e.reorderNode(t,n);if(!o.ok)throw new Error(o.reason)},createConnector:async t=>{const n=await e.createConnector(t);if(!n.ok)throw new Error(n.reason);return n.value},updateConnector:async(t,n)=>{const o=await e.updateConnector(t,n);if(!o.ok)throw new Error(o.reason)},deleteConnector:async t=>{const n=await e.deleteConnector(t);if(!n.ok)throw new Error(n.reason)},uploadImage:async(t,n,o)=>{const r=await e.uploadImage(t,n,o);if(!r.ok)throw new Error(r.reason);return r.value}}}function Gnt(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),o=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(o),n.body.appendChild(r),t&&(o.href=t),r.href=e,r.href}const Knt=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function $i(e){const t=[];for(let n=0,o=e.length;n<o;n++)t.push(e[n]);return t}let Iu=null;function Yre(e={}){return Iu||(e.includeStyleProperties?(Iu=e.includeStyleProperties,Iu):(Iu=$i(window.getComputedStyle(document.documentElement)),Iu))}function Lz(e,t){const o=(e.ownerDocument.defaultView||window).getComputedStyle(e).getPropertyValue(t);return o?parseFloat(o.replace("px","")):0}function Xnt(e){const t=Lz(e,"border-left-width"),n=Lz(e,"border-right-width");return e.clientWidth+t+n}function Znt(e){const t=Lz(e,"border-top-width"),n=Lz(e,"border-bottom-width");return e.clientHeight+t+n}function Qre(e,t={}){const n=t.width||Xnt(e),o=t.height||Znt(e);return{width:n,height:o}}function Ynt(){let e,t;try{t=process}catch{}const n=t&&t.env?t.env.devicePixelRatio:null;return n&&(e=parseInt(n,10),Number.isNaN(e)&&(e=1)),e||window.devicePixelRatio||1}const Jn=16384;function Qnt(e){(e.width>Jn||e.height>Jn)&&(e.width>Jn&&e.height>Jn?e.width>e.height?(e.height*=Jn/e.width,e.width=Jn):(e.width*=Jn/e.height,e.height=Jn):e.width>Jn?(e.height*=Jn/e.width,e.width=Jn):(e.width*=Jn/e.height,e.height=Jn))}function Nz(e){return new Promise((t,n)=>{const o=new Image;o.onload=()=>{o.decode().then(()=>{requestAnimationFrame(()=>t(o))})},o.onerror=n,o.crossOrigin="anonymous",o.decoding="async",o.src=e})}async function Jnt(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function eot(e,t,n){const o="http://www.w3.org/2000/svg",r=document.createElementNS(o,"svg"),a=document.createElementNS(o,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${t} ${n}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),r.appendChild(a),a.appendChild(e),Jnt(r)}const Xn=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||Xn(n,t)};function tot(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function not(e,t){return Yre(t).map(n=>{const o=e.getPropertyValue(n),r=e.getPropertyPriority(n);return`${n}: ${o}${r?" !important":""};`}).join(" ")}function oot(e,t,n,o){const r=`.${e}:${t}`,a=n.cssText?tot(n):not(n,o);return document.createTextNode(`${r}{${a}}`)}function _K(e,t,n,o){const r=window.getComputedStyle(e,n),a=r.getPropertyValue("content");if(a===""||a==="none")return;const i=Knt();try{t.className=`${t.className} ${i}`}catch{return}const s=document.createElement("style");s.appendChild(oot(i,n,r,o)),t.appendChild(s)}function rot(e,t,n){_K(e,t,":before",n),_K(e,t,":after",n)}const CK="application/font-woff",SK="image/jpeg",aot={woff:CK,woff2:CK,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:SK,jpeg:SK,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function iot(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function aV(e){const t=iot(e).toLowerCase();return aot[t]||""}function sot(e){return e.split(/,/)[1]}function IO(e){return e.search(/^(data:)/)!==-1}function cot(e,t){return`data:${t};base64,${e}`}async function Jre(e,t,n){const o=await fetch(e,t);if(o.status===404)throw new Error(`Resource "${o.url}" not found`);const r=await o.blob();return new Promise((a,i)=>{const s=new FileReader;s.onerror=i,s.onloadend=()=>{try{a(n({res:o,result:s.result}))}catch(c){i(c)}},s.readAsDataURL(r)})}const wD={};function lot(e,t,n){let o=e.replace(/\?.*/,"");return n&&(o=e),/ttf|otf|eot|woff2?/i.test(o)&&(o=o.replace(/.*\//,"")),t?`[${t}]${o}`:o}async function iV(e,t,n){const o=lot(e,t,n.includeQueryParams);if(wD[o]!=null)return wD[o];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let r;try{const a=await Jre(e,n.fetchRequestInit,({res:i,result:s})=>(t||(t=i.headers.get("Content-Type")||""),sot(s)));r=cot(a,t)}catch(a){r=n.imagePlaceholder||"";let i=`Failed to fetch resource: ${e}`;a&&(i=typeof a=="string"?a:a.message),i&&console.warn(i)}return wD[o]=r,r}async function dot(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):Nz(t)}async function uot(e,t){if(e.currentSrc){const a=document.createElement("canvas"),i=a.getContext("2d");a.width=e.clientWidth,a.height=e.clientHeight,i==null||i.drawImage(e,0,0,a.width,a.height);const s=a.toDataURL();return Nz(s)}const n=e.poster,o=aV(n),r=await iV(n,o,t);return Nz(r)}async function hot(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await HR(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function fot(e,t){return Xn(e,HTMLCanvasElement)?dot(e):Xn(e,HTMLVideoElement)?uot(e,t):Xn(e,HTMLIFrameElement)?hot(e,t):e.cloneNode(eae(e))}const pot=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",eae=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function yot(e,t,n){var o,r;if(eae(t))return t;let a=[];return pot(e)&&e.assignedNodes?a=$i(e.assignedNodes()):Xn(e,HTMLIFrameElement)&&(!((o=e.contentDocument)===null||o===void 0)&&o.body)?a=$i(e.contentDocument.body.childNodes):a=$i(((r=e.shadowRoot)!==null&&r!==void 0?r:e).childNodes),a.length===0||Xn(e,HTMLVideoElement)||await a.reduce((i,s)=>i.then(()=>HR(s,n)).then(c=>{c&&t.appendChild(c)}),Promise.resolve()),t}function mot(e,t,n){const o=t.style;if(!o)return;const r=window.getComputedStyle(e);r.cssText?(o.cssText=r.cssText,o.transformOrigin=r.transformOrigin):Yre(n).forEach(a=>{let i=r.getPropertyValue(a);a==="font-size"&&i.endsWith("px")&&(i=`${Math.floor(parseFloat(i.substring(0,i.length-2)))-.1}px`),Xn(e,HTMLIFrameElement)&&a==="display"&&i==="inline"&&(i="block"),a==="d"&&t.getAttribute("d")&&(i=`path(${t.getAttribute("d")})`),o.setProperty(a,i,r.getPropertyPriority(a))})}function got(e,t){Xn(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),Xn(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function kot(e,t){if(Xn(e,HTMLSelectElement)){const n=t,o=Array.from(n.children).find(r=>e.value===r.getAttribute("value"));o&&o.setAttribute("selected","")}}function vot(e,t,n){return Xn(t,Element)&&(mot(e,t,n),rot(e,t,n),got(e,t),kot(e,t)),t}async function xot(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const o={};for(let a=0;a<n.length;a++){const s=n[a].getAttribute("xlink:href");if(s){const c=e.querySelector(s),l=document.querySelector(s);!c&&l&&!o[s]&&(o[s]=await HR(l,t,!0))}}const r=Object.values(o);if(r.length){const a="http://www.w3.org/1999/xhtml",i=document.createElementNS(a,"svg");i.setAttribute("xmlns",a),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.style.display="none";const s=document.createElementNS(a,"defs");i.appendChild(s);for(let c=0;c<r.length;c++)s.appendChild(r[c]);e.appendChild(i)}return e}async function HR(e,t,n){return!n&&t.filter&&!t.filter(e)?null:Promise.resolve(e).then(o=>fot(o,t)).then(o=>yot(e,o,t)).then(o=>vot(e,o,t)).then(o=>xot(o,t))}const tae=/url\((['"]?)([^'"]+?)\1\)/g,wot=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,Mot=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function bot(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function _ot(e){const t=[];return e.replace(tae,(n,o,r)=>(t.push(r),n)),t.filter(n=>!IO(n))}async function Cot(e,t,n,o,r){try{const a=n?Gnt(t,n):t,i=aV(t);let s;return r||(s=await iV(a,i,o)),e.replace(bot(t),`$1${s}$3`)}catch{}return e}function Sot(e,{preferredFontFormat:t}){return t?e.replace(Mot,n=>{for(;;){const[o,,r]=wot.exec(n)||[];if(!r)return"";if(r===t)return`src: ${o};`}}):e}function nae(e){return e.search(tae)!==-1}async function oae(e,t,n){if(!nae(e))return e;const o=Sot(e,n);return _ot(o).reduce((a,i)=>a.then(s=>Cot(s,i,t,n)),Promise.resolve(o))}async function Au(e,t,n){var o;const r=(o=t.style)===null||o===void 0?void 0:o.getPropertyValue(e);if(r){const a=await oae(r,null,n);return t.style.setProperty(e,a,t.style.getPropertyPriority(e)),!0}return!1}async function Lot(e,t){await Au("background",e,t)||await Au("background-image",e,t),await Au("mask",e,t)||await Au("-webkit-mask",e,t)||await Au("mask-image",e,t)||await Au("-webkit-mask-image",e,t)}async function Not(e,t){const n=Xn(e,HTMLImageElement);if(!(n&&!IO(e.src))&&!(Xn(e,SVGImageElement)&&!IO(e.href.baseVal)))return;const o=n?e.src:e.href.baseVal,r=await iV(o,aV(o),t);await new Promise((a,i)=>{e.onload=a,e.onerror=t.onImageErrorHandler?(...c)=>{try{a(t.onImageErrorHandler(...c))}catch(l){i(l)}}:i;const s=e;s.decode&&(s.decode=a),s.loading==="lazy"&&(s.loading="eager"),n?(e.srcset="",e.src=r):e.href.baseVal=r})}async function Iot(e,t){const o=$i(e.childNodes).map(r=>rae(r,t));await Promise.all(o).then(()=>e)}async function rae(e,t){Xn(e,Element)&&(await Lot(e,t),await Not(e,t),await Iot(e,t))}function Aot(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const o=t.style;return o!=null&&Object.keys(o).forEach(r=>{n[r]=o[r]}),e}const LK={};async function NK(e){let t=LK[e];if(t!=null)return t;const o=await(await fetch(e)).text();return t={url:e,cssText:o},LK[e]=t,t}async function IK(e,t){let n=e.cssText;const o=/url\(["']?([^"')]+)["']?\)/g,a=(n.match(/url\([^)]+\)/g)||[]).map(async i=>{let s=i.replace(o,"$1");return s.startsWith("https://")||(s=new URL(s,e.url).href),Jre(s,t.fetchRequestInit,({result:c})=>(n=n.replace(i,`url(${c})`),[i,c]))});return Promise.all(a).then(()=>n)}function AK(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let o=e.replace(n,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=r.exec(o);if(c===null)break;t.push(c[0])}o=o.replace(r,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,i="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",s=new RegExp(i,"gi");for(;;){let c=a.exec(o);if(c===null){if(c=s.exec(o),c===null)break;a.lastIndex=s.lastIndex}else s.lastIndex=a.lastIndex;t.push(c[0])}return t}async function Eot(e,t){const n=[],o=[];return e.forEach(r=>{if("cssRules"in r)try{$i(r.cssRules||[]).forEach((a,i)=>{if(a.type===CSSRule.IMPORT_RULE){let s=i+1;const c=a.href,l=NK(c).then(h=>IK(h,t)).then(h=>AK(h).forEach(u=>{try{r.insertRule(u,u.startsWith("@import")?s+=1:r.cssRules.length)}catch(p){console.error("Error inserting rule from remote css",{rule:u,error:p})}})).catch(h=>{console.error("Error loading remote css",h.toString())});o.push(l)}})}catch(a){const i=e.find(s=>s.href==null)||document.styleSheets[0];r.href!=null&&o.push(NK(r.href).then(s=>IK(s,t)).then(s=>AK(s).forEach(c=>{i.insertRule(c,i.cssRules.length)})).catch(s=>{console.error("Error loading remote stylesheet",s)})),console.error("Error inlining remote css file",a)}}),Promise.all(o).then(()=>(e.forEach(r=>{if("cssRules"in r)try{$i(r.cssRules||[]).forEach(a=>{n.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${r.href}`,a)}}),n))}function jot(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>nae(t.style.getPropertyValue("src")))}async function $ot(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=$i(e.ownerDocument.styleSheets),o=await Eot(n,t);return jot(o)}function aae(e){return e.trim().replace(/["']/g,"")}function Pot(e){const t=new Set;function n(o){(o.style.fontFamily||getComputedStyle(o).fontFamily).split(",").forEach(a=>{t.add(aae(a))}),Array.from(o.children).forEach(a=>{a instanceof HTMLElement&&n(a)})}return n(e),t}async function zot(e,t){const n=await $ot(e,t),o=Pot(e);return(await Promise.all(n.filter(a=>o.has(aae(a.style.fontFamily))).map(a=>{const i=a.parentStyleSheet?a.parentStyleSheet.href:null;return oae(a.cssText,i,t)}))).join(`
8544
- `)}async function Rot(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await zot(e,t);if(n){const o=document.createElement("style"),r=document.createTextNode(n);o.appendChild(r),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}}async function Tot(e,t={}){const{width:n,height:o}=Qre(e,t),r=await HR(e,t,!0);return await Rot(r,t),await rae(r,t),Aot(r,t),await eot(r,n,o)}async function Dot(e,t={}){const{width:n,height:o}=Qre(e,t),r=await Tot(e,t),a=await Nz(r),i=document.createElement("canvas"),s=i.getContext("2d"),c=t.pixelRatio||Ynt(),l=t.canvasWidth||n,h=t.canvasHeight||o;return i.width=l*c,i.height=h*c,t.skipAutoScale||Qnt(i),i.style.width=`${l}`,i.style.height=`${h}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,i.width,i.height)),s.drawImage(a,0,0,i.width,i.height),i}async function Hot(e,t={}){return(await Dot(e,t)).toDataURL()}const Oot=e=>e instanceof Element?!(e.classList.contains("react-flow__minimap")||e.classList.contains("react-flow__controls")||e.classList.contains("react-flow__panel")):!0,Fot=e=>{var o;let t=e;for(;t&&!t.classList.contains("seeflow-canvas-root");)t=t.parentElement;if(t){const r=getComputedStyle(t).getPropertyValue("--bg-canvas").trim();if(r.length>0)return r}const n=(o=e.ownerDocument)==null?void 0:o.documentElement;return n!=null&&n.classList.contains("dark")?"#0a0a0c":"#fafafa"},qot=async e=>{const t=await Hot(e,{cacheBust:!0,filter:Oot,backgroundColor:Fot(e)}),n=await new Promise((o,r)=>{const a=new Image;a.onload=()=>o({width:a.naturalWidth,height:a.naturalHeight}),a.onerror=()=>r(new Error("Failed to decode captured image")),a.src=t});return{dataUrl:t,...n}},Vot=(e,t)=>{const n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()},Bot=e=>{const t=e.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");return t.length>0?t.slice(0,80):"canvas"},EK=(e,t)=>`${Bot(e??"canvas")}.${t}`,Uot=({projectId:e,getReactFlow:t})=>{const[n,o]=m.useState(null),r=m.useCallback(()=>o(null),[]),a=m.useCallback(async()=>{const l=t();if(!l)return null;const h=document.querySelector(".react-flow__viewport");if(!h)return null;const u=l.getViewport();try{return await l.fitView({duration:0,padding:.1}),await new Promise(p=>requestAnimationFrame(()=>p())),await qot(h)}finally{l.setViewport(u,{duration:0})}},[t]),i=m.useCallback(async()=>{o(null);try{const l=await a();if(!l)return;Vot(l.dataUrl,EK(e,"png"))}catch(l){o(l instanceof Error?l.message:String(l))}},[a,e]),s=m.useCallback(async()=>{o(null);try{const l=await a();if(!l)return;const{jsPDF:h}=await X0(async()=>{const{jsPDF:y}=await import("./jspdf.es.min-ykdbTFYz.js").then(g=>g.j);return{jsPDF:y}},[]),u=l.width>l.height?"landscape":"portrait",p=new h({orientation:u,unit:"px",format:[l.width,l.height],hotfixes:["px_scaling"]});p.addImage(l.dataUrl,"PNG",0,0,l.width,l.height),p.save(EK(e,"pdf"))}catch(l){o(l instanceof Error?l.message:String(l))}},[a,e]),c=m.useCallback(async()=>{const l=await a();return l==null?void 0:l.dataUrl},[a]);return{exportPdf:s,exportPng:i,capturePreview:c,lastError:n,clearError:r}},Wot=12,Got=1200;function Kot(e,t={}){const n=t.idleMs??Got;let o,r=null,a=null;const i=typeof requestAnimationFrame<"u",s=()=>{o!==void 0&&(clearTimeout(o),o=void 0)},c=()=>{a!==null&&typeof cancelAnimationFrame<"u"&&cancelAnimationFrame(a),a=null},l=()=>{if(a=null,!r)return;const{clientX:y,clientY:g}=r;r=null;const k=e.getBoundingClientRect();e.style.setProperty("--mx",`${y-k.left}px`),e.style.setProperty("--my",`${g-k.top}px`),e.dataset.active="true",s(),o=setTimeout(()=>{e.dataset.active="false",o=void 0},n)};return{onMove:y=>{if(r={clientX:y.clientX,clientY:y.clientY},!i){l();return}a===null&&(a=requestAnimationFrame(l))},onLeave:()=>{c(),r=null,s(),e.dataset.active="false"},dispose:()=>{c(),r=null,s()}}}function Xot(){const e=m.useRef(null),t=De(i=>i.transform,(i,s)=>i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]),[n,o,r]=t,a=Wot*r;return m.useEffect(()=>{var u;const i=e.current;if(!i)return;const s=(u=i.parentElement)==null?void 0:u.querySelector(".react-flow__pane");if(!s)return;const{onMove:c,onLeave:l,dispose:h}=Kot(i);return s.addEventListener("mousemove",c,{passive:!0}),s.addEventListener("mouseleave",l,{passive:!0}),()=>{s.removeEventListener("mousemove",c),s.removeEventListener("mouseleave",l),h()}},[]),f.jsx("div",{ref:e,className:"glow-overlay","data-active":"false","data-testid":"canvas-glow-overlay",style:{backgroundPosition:`${n}px ${o}px`,backgroundSize:`${a}px ${a}px`}})}const Zot="Hide inspector",Yot="Open inspector";function Qot({open:e,onToggle:t}){const n=e?hh:fh,o=e?Zot:Yot;return f.jsx(m0,{delayDuration:300,children:f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx(Ke,{type:"button",variant:"ghost",size:"icon","data-testid":"inspector-toggle","aria-pressed":e,"aria-label":o,onClick:t,className:"sf:h-8 sf:w-8",children:f.jsx(n,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsx(Gr,{children:o})]})})}const Jot={showToolbar:!0,showStyleStrip:!0,showDetailPanel:!0,showStatusBadges:!0,showResizeHandles:!0,showControls:!0,showShareMenu:!0,showMiniMap:!0,enableKeyboard:!0,enableContextMenu:!0,enableDragDrop:!0,enableImageDrop:!0,enableZoom:!0,enablePan:!0,enableSelection:!0,enableNodeMove:!0,enableEmbed:!1},ert={showToolbar:!0,showStyleStrip:!1,showDetailPanel:!1,showStatusBadges:!0,showResizeHandles:!1,showControls:!0,showShareMenu:!0,showMiniMap:!0,enableKeyboard:!1,enableContextMenu:!1,enableDragDrop:!1,enableImageDrop:!1,enableZoom:!0,enablePan:!0,enableSelection:!0,enableNodeMove:!0,enableEmbed:!1},trt={showToolbar:!1,showStyleStrip:!1,showDetailPanel:!1,showStatusBadges:!1,showResizeHandles:!1,showControls:!1,showShareMenu:!1,showMiniMap:!1,enableKeyboard:!1,enableContextMenu:!1,enableDragDrop:!1,enableImageDrop:!1,enableZoom:!1,enablePan:!1,enableSelection:!1,enableNodeMove:!1,enableEmbed:!1};function nrt(e){const t=e.mode==="edit"?Jot:e.mode==="mini"?trt:ert;return{showToolbar:e.showToolbar??t.showToolbar,showStyleStrip:e.showStyleStrip??t.showStyleStrip,showDetailPanel:e.showDetailPanel??t.showDetailPanel,showStatusBadges:e.showStatusBadges??t.showStatusBadges,showResizeHandles:e.showResizeHandles??t.showResizeHandles,showControls:e.showControls??t.showControls,showShareMenu:e.showShareMenu??t.showShareMenu,showMiniMap:e.showMiniMap??t.showMiniMap,enableKeyboard:e.enableKeyboard??t.enableKeyboard,enableContextMenu:e.enableContextMenu??t.enableContextMenu,enableDragDrop:e.enableDragDrop??t.enableDragDrop,enableImageDrop:e.enableImageDrop??t.enableImageDrop,enableZoom:e.enableZoom??t.enableZoom,enablePan:e.enablePan??t.enablePan,enableSelection:e.enableSelection??t.enableSelection,enableNodeMove:e.enableNodeMove??t.enableNodeMove,enableEmbed:e.enableEmbed??t.enableEmbed}}const jK=40,$K=4;let PK=!1;const A2={padding:.15,duration:300,includeHiddenNodes:!1};function ort(e){return e===void 0||e===!1?{onMount:!1,onExternalNodeChange:!1}:e===!0?{onMount:!0,onExternalNodeChange:!0}:{onMount:e.onMount??!0,onExternalNodeChange:e.onExternalNodeChange??!0}}const zK=e=>{if("clientX"in e)return{clientX:e.clientX,clientY:e.clientY};const t=e.changedTouches[0]??e.touches[0];return t?{clientX:t.clientX,clientY:t.clientY}:null},rrt=(e,t)=>{var o;const n=document.elementsFromPoint(e,t);for(const r of n){const a=(o=r.closest)==null?void 0:o.call(r,".react-flow__node");if(a)return a}return null},iae=15,MD=(e,t,n)=>{const o=rrt(t,n);if(o)return o;if(!e)return null;let r=null,a=iae;const i=e.querySelectorAll(".react-flow__node");for(const s of i){const c=s.getBoundingClientRect();if(c.width===0||c.height===0)continue;const l=Math.max(c.left-t,0,t-c.right),h=Math.max(c.top-n,0,n-c.bottom),u=Math.hypot(l,h);u<=a&&(r=s,a=u)}return r};function RK(e,t,n,o,r){if(e==="source"?(o==null?void 0:o.targetPin)!==void 0||(o==null?void 0:o.targetHandleAutoPicked)===!1:(o==null?void 0:o.sourcePin)!==void 0||(o==null?void 0:o.sourceHandleAutoPicked)===!1)return;const i=e==="source"?n:t,s=e==="source"?t:n,c=r(i),l=r(s);if(!c||!l)return;const h=c.measured.width??c.width??0,u=c.measured.height??c.height??0,p=l.measured.width??l.width??0,y=l.measured.height??l.height??0;if(h===0||u===0||p===0||y===0)return;const g={x:c.internals.positionAbsolute.x,y:c.internals.positionAbsolute.y,w:h,h:u},k={x:l.internals.positionAbsolute.x+p/2,y:l.internals.positionAbsolute.y+y/2};return yHe(g,JP(g,k))}function art(e,t,n,o){if(o===null)return"no-op";const r=e==="source"?t:n;return o===(e==="source"?n:t)?"self-loop":o===r?"pin-own":"reconnect-and-pin"}const irt=(e,t)=>{if(!t)return e;const n=t.data?{...e.data,...t.data}:e.data;return{...e,...t,data:n}},srt=(e,t)=>t?{...e,...t}:e,crt={rectangle:sWe,ellipse:wr,sticky:wr,text:wr,database:wr,server:wr,user:wr,queue:wr,cloud:wr,diamond:wr,hexagon:wr,image:YUe,icon:SHe,html:WUe,component:pUe,linkflow:tWe},lrt={editableEdge:dWe},drt={zIndex:0},urt={hideAttribution:!0},hrt=8,TK=(e,t)=>e?typeof e=="string"?`url('#${e}')`:`url('#${`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}')`:void 0,frt=e=>function({fromX:n,fromY:o,toX:r,toY:a,fromPosition:i,toPosition:s,connectionLineStyle:c}){const l=De(q=>e.current?q.edges.find(H=>H.reconnectable===!0)??null:null),h=l==null?void 0:l.data,u=De(q=>{var $;const H=q.connection;return(($=H==null?void 0:H.fromHandle)==null?void 0:$.nodeId)??null}),p=De(q=>l!=null&&l.source?q.nodeLookup.get(l.source)??null:null),y=De(q=>l!=null&&l.target?q.nodeLookup.get(l.target)??null:null),g=De(q=>u?q.nodeLookup.get(u)??null:null),k=(l==null?void 0:l.source)===u,x=l?k?p:y:g,v=k?y:p,M=k?h==null?void 0:h.sourcePin:h==null?void 0:h.targetPin,w=k?h==null?void 0:h.sourceHandleAutoPicked:h==null?void 0:h.targetHandleAutoPicked;let b=n,C=o,_=i;if(x){const q=x.measured.width??x.width??0,H=x.measured.height??x.height??0;if(q>0&&H>0){const $={x:x.internals.positionAbsolute.x,y:x.internals.positionAbsolute.y,w:q,h:H};let X=null;if(M)X=ez($,M);else if(w!==!1&&v){const G=v.measured.width??v.width??0,Q=v.measured.height??v.height??0;if(G>0&&Q>0){const oe={x:v.internals.positionAbsolute.x+G/2,y:v.internals.positionAbsolute.y+Q/2};X=JP($,oe)}}X&&(b=X.x,C=X.y,_=DK[X.side])}}const S=De(q=>q.transform[2]),E=De(q=>q.nodeLookup),P=De(q=>{var H;return((H=q.connection.toHandle)==null?void 0:H.nodeId)??null});let N=r,j=a,z=s;if(S>0){const q=iae/S,H=l?k?l.target:l.source:null;let $=null;if(P&&P!==H){const X=E.get(P)??null;X&&($=X)}if(!$){let X=q;for(const G of E.values()){if(H&&G.id===H||x&&G.id===x.id)continue;const Q=G.measured.width??G.width??0,oe=G.measured.height??G.height??0;if(Q===0||oe===0)continue;const re=G.internals.positionAbsolute.x,te=G.internals.positionAbsolute.y,ce=Math.max(re-r,0,r-(re+Q)),ke=Math.max(te-a,0,a-(te+oe)),ve=Math.hypot(ce,ke);ve<=X&&(X=ve,$=G)}}if(!$&&l&&x){const X=x.measured.width??x.width??0,G=x.measured.height??x.height??0;if(X>0&&G>0){const Q=x.internals.positionAbsolute.x,oe=x.internals.positionAbsolute.y,re=Math.max(Q-r,0,r-(Q+X)),te=Math.max(oe-a,0,a-(oe+G));Math.hypot(re,te)<=q&&($=x)}}if($){const X=$.measured.width??$.width??0,G=$.measured.height??$.height??0;if(X>0&&G>0){const Q=VH({x:$.internals.positionAbsolute.x,y:$.internals.positionAbsolute.y,w:X,h:G},{x:r,y:a}),oe=ez({x:$.internals.positionAbsolute.x,y:$.internals.positionAbsolute.y,w:X,h:G},Q);N=oe.x,j=oe.y,z=DK[oe.side]}}}const U=(h==null?void 0:h.path)==="step",[A]=U?af({sourceX:b,sourceY:C,sourcePosition:_,targetX:N,targetY:j,targetPosition:z,borderRadius:hrt}):oR({sourceX:b,sourceY:C,sourcePosition:_,targetX:N,targetY:j,targetPosition:z}),T=(l==null?void 0:l.style)??c??void 0,D=De(q=>q.rfId),O=k?l==null?void 0:l.markerStart:l==null?void 0:l.markerEnd,I=k?l==null?void 0:l.markerEnd:l==null?void 0:l.markerStart,R=TK(O,D),L=TK(I,D);return f.jsx("path",{d:A,fill:"none",className:"react-flow__connection-path",style:T,markerStart:R,markerEnd:L})},DK={top:fe.Top,right:fe.Right,bottom:fe.Bottom,left:fe.Left};function prt({storeApiRef:e}){const t=vt();return m.useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null)}),[t,e]),null}function yrt({wrapperRef:e}){const t=De(o=>o.transform[2]),n=e.current;return n&&n.style.setProperty("--rf-zoom",String(t)),null}const mrt=new Set(["INPUT","TEXTAREA","SELECT"]),AO=e=>e?mrt.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1;function grt(e){const{event:t,selectedNodeIds:n,hasClipboard:o,activeElement:r,onCopySelection:a,onPasteSelection:i}=e;if(!(t.metaKey||t.ctrlKey)||t.shiftKey||t.altKey)return!1;const s=t.key.toLowerCase();return s!=="c"&&s!=="v"||AO(r)?!1:s==="c"?n.length===0||!a?!1:(t.preventDefault(),a([...n]),!0):!o||!i?!1:(t.preventDefault(),i(),!0)}const HK=(e,t)=>{var n;return((n=e==null?void 0:e[t])==null?void 0:n.status)??"idle"},krt=(e,t)=>{var n;return(n=e==null?void 0:e[t])==null?void 0:n.status},vrt=(e,t)=>{var n,o;return((n=e==null?void 0:e[t])==null?void 0:n.status)==="error"?(o=e[t])==null?void 0:o.error:void 0};function xrt(e,t){var NV,IV;const{mode:n,adapter:o,ioAdapter:r,topLeftSlot:a,topRightSlot:i,projectId:s,flowSlug:c,fileBaseUrl:l,apiBaseUrl:h="/api",studioBaseUrl:u="",nodes:p,connectors:y,selectedNodeIds:g,selectedConnectorIds:k,onSelectionChange:x,runtime:v,onPlayNode:M,onNodePositionChange:w,onNodePositionsChange:b,onNodeResize:C,onNodeResizeEnd:_,onHtmlNodeFitToContent:S,onComponentNodeFitToContent:E,onMultiResize:P,onNodeNameChange:N,onNodeDescriptionChange:j,onConnectorLabelChange:z,onCreateShapeNode:U,onCreateLinkflowNode:A,onCreateImageFromFile:T,onRetryImageUpload:D,onCreateHtmlNode:O,onCreateConnector:I,onReconnectConnector:R,onReorderNode:L,onDeleteNode:q,onCopyNode:H,onPasteAt:$,hasClipboard:X,onCopySelection:G,onPasteSelection:Q,selectedNodes:oe,selectedConnectors:re,onStyleNode:te,onStyleNodePreview:ce,onStyleNodes:ke,onStyleNodesPreview:ve,onStyleConnector:xe,onStyleConnectorPreview:He,onRfInit:Ze,onTidy:ue,onNodeClick:Ie,onConnectorClick:zt,onPaneClick:pt,onCreateAndConnectFromPane:tn,pendingEditNodeId:se,iconPickerOpen:J,onOpenIconPicker:Rt,onCloseIconPicker:fn,onPickIcon:ae,onRequestIconReplace:Y,onPinEndpoint:he,onUnpinEndpoint:Ae,canvasMode:Re,onCanvasModeChange:We,disableSidebar:Vt,statusReport:pn,onNameChange:nn,onDescriptionChange:ge,onDetailChange:Le,onIconChange:At,autoFitView:Tn,autoFitViewSignal:cn,customIcons:eu,onExportToCloud:i2,onNodeDragStart:Qn,onNodeDragStop:go,onViewportChange:xt,history:rt,presenceLayer:tu,onCursorMove:Xi,showToolbar:nu,showStyleStrip:ou,showDetailPanel:ru,showStatusBadges:au,showResizeHandles:Zi,showControls:Yi,showShareMenu:Qi,showMiniMap:Ji,enableKeyboard:ta,enableContextMenu:na,enableDragDrop:iu,enableImageDrop:su,enableZoom:Ro,enablePan:es,enableSelection:Da,enableNodeMove:ts,enableEmbed:ns}=e,qe=m.useMemo(()=>nrt({mode:n,showToolbar:nu,showStyleStrip:ou,showDetailPanel:ru,showStatusBadges:au,showResizeHandles:Zi,showControls:Yi,showShareMenu:Qi,showMiniMap:Ji,enableKeyboard:ta,enableContextMenu:na,enableDragDrop:iu,enableImageDrop:su,enableZoom:Ro,enablePan:es,enableSelection:Da,enableNodeMove:ts,enableEmbed:ns}),[n,nu,ou,ru,au,Zi,Yi,Qi,Ji,ta,na,iu,su,Ro,es,Da,ts,ns]),oa=m.useMemo(()=>r?(o&&!PK&&(PK=!0,console.warn("[SeeflowCanvas] Both `adapter` and `ioAdapter` were provided — `ioAdapter` takes precedence; the `adapter` prop is ignored.")),Wnt(r)):o,[r,o]),Tt=n==="edit",Ha=m.useRef(qe);m.useEffect(()=>{Ha.current=qe},[qe]);const cu=Tn??(n==="mini"?!0:void 0),ko=m.useMemo(()=>ort(cu),[cu]),vo=v==null?void 0:v.runs,ra=v==null?void 0:v.statuses,_n=(NV=v==null?void 0:v.pendingOverrides)==null?void 0:NV.nodes,lr=(IV=v==null?void 0:v.pendingOverrides)==null?void 0:IV.connectors,Cn=m.useRef(null),Lt=m.useRef(null),aa=m.useRef(!1),dr=m.useRef(!1),ia=m.useRef(!1),lu=m.useRef(ko);lu.current=ko,m.useEffect(()=>{if(aa.current||!ko.onMount||p.length===0)return;const W=Lt.current;W&&(W.fitView(A2),aa.current=!0)},[p,ko.onMount]);const du=m.useRef(null),Nt=Re.kind==="draw"?Re.shape:null,ur=Re.kind==="hand",Oa=m.useRef(new Map),uu=m.useCallback((W,Z)=>(Oa.current.set(W,Z),()=>{Oa.current.get(W)===Z&&Oa.current.delete(W)}),[]),[xo,hr]=m.useState(!1),fr=m.useRef(!1);m.useEffect(()=>{fr.current=xo},[xo]);const Fa=m.useRef(!1),qa=m.useRef(!1),Dn=m.useRef(!1),[Bt,yn]=m.useState(null),os=m.useRef(null);m.useEffect(()=>{os.current=Bt},[Bt]),m.useCallback(()=>{yn(null)},[]);const rs=m.useMemo(()=>frt(Dn),[]),sa=m.useRef(null),Bf=m.useRef(null),hu=m.useCallback(W=>{const Z=Cn.current;if(!Z){sa.current=W;return}const ie=sa.current;if(ie&&ie!==W){const le=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);le==null||le.removeAttribute("data-connect-source")}if(W){const le=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(W)}"]`);le==null||le.setAttribute("data-connect-source","true")}sa.current=W},[]),lt=m.useCallback(W=>{const Z=Cn.current,ie=Bf.current;if(ie!==W){if(Z&&ie){const le=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);le==null||le.removeAttribute("data-connect-target")}if(Z&&W){const le=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(W)}"]`);le==null||le.setAttribute("data-connect-target","true")}Bf.current=W}},[]),Va=m.useCallback(()=>{hu(null),lt(null)},[hu,lt]);m.useEffect(()=>{if(!xo){lt(null);return}let W=null,Z=null;const ie=()=>{W=null;const de=Z;if(Z=null,!de)return;const je=MD(Cn.current,de.clientX,de.clientY),we=(je==null?void 0:je.getAttribute("data-id"))??null;if(we&&we===sa.current){lt(null);return}lt(we)},le=de=>{Z={clientX:de.clientX,clientY:de.clientY},W===null&&(W=requestAnimationFrame(ie))};return document.addEventListener("pointermove",le,{passive:!0}),()=>{document.removeEventListener("pointermove",le),W!==null&&cancelAnimationFrame(W)}},[xo,lt]);const[pr,To]=m.useState(null),[yr,fu]=m.useState(null),Ba=m.useRef(null),as=m.useRef(null),mr=m.useRef(null),Ua=m.useRef(!1);m.useEffect(()=>{Ba.current=Nt},[Nt]);const is=m.useCallback(()=>{We({kind:"select"}),To(null),fu(null),Ba.current=null,as.current=null,mr.current=null,Ua.current=!1},[We]);m.useEffect(()=>{if(!qe.enableKeyboard)return;const W=Z=>{var de,je;if(Z.key!=="Escape"||AO(document.activeElement))return;if(Ba.current){Z.preventDefault(),is();return}if(fr.current){Z.preventDefault(),Fa.current=!0,qa.current=!0;try{(de=du.current)==null||de.getState().cancelConnection()}catch{}document.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,button:0})),hr(!1);return}if(os.current){Z.preventDefault(),yn(null);return}const ie=Do.current.size>0,le=la.current.size>0;(ie||le)&&(Z.preventDefault(),(je=kr.current)==null||je.call(kr,[],[]))};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[is,qe.enableKeyboard]),m.useEffect(()=>{if(!qe.enableKeyboard)return;const W=Z=>{const ie=DHe(Z,{isEditableActive:AO(document.activeElement)});ie&&rt&&(Z.preventDefault(),Z.stopPropagation(),ie==="undo"?rt.undo():rt.redo())};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[rt,qe.enableKeyboard]),m.useEffect(()=>{if(!qe.enableKeyboard)return;const W=Z=>{grt({event:Z,selectedNodeIds:g,hasClipboard:!!X,activeElement:document.activeElement,onCopySelection:G,onPasteSelection:Q})};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[g,X,G,Q,qe.enableKeyboard]);const OR=m.useCallback(W=>{var le,de;if(!Ba.current)return;const Z=W.target;if(!(Z!=null&&Z.classList.contains("react-flow__pane")))return;const ie={x:W.clientX,y:W.clientY};Ua.current=!0,as.current=ie,mr.current=ie,To(ie),fu(ie);try{(de=(le=W.currentTarget).setPointerCapture)==null||de.call(le,W.pointerId)}catch{}W.preventDefault(),W.stopPropagation()},[]),FR=m.useCallback(W=>{if(Xi){const ie=Lt.current;if(ie){const le=ie.screenToFlowPosition({x:W.clientX,y:W.clientY}),de=ie.getViewport();Xi({x:le.x,y:le.y,flowId:c??null},{x:de.x,y:de.y,zoom:de.zoom})}}if(!Ua.current)return;const Z={x:W.clientX,y:W.clientY};mr.current=Z,fu(Z)},[Xi,c]),uV=m.useCallback(W=>{var vr,h2;if(!Ua.current)return;Ua.current=!1;try{(h2=(vr=W.currentTarget).releasePointerCapture)==null||h2.call(vr,W.pointerId)}catch{}const Z=as.current,ie=mr.current,le=Ba.current,de=Lt.current;if(is(),!Z||!ie||!le||!de)return;const je=Math.min(Z.x,ie.x),we=Math.min(Z.y,ie.y),Ee=Math.max(Z.x,ie.x),tt=Math.max(Z.y,ie.y),ct=Ee-je,ht=tt-we,Pe=de.screenToFlowPosition({x:je,y:we}),On=de.screenToFlowPosition({x:Ee,y:tt}),Ho=On.x-Pe.x,ft=On.y-Pe.y;if(le==="linkflow"){const AV=ct<$K&&ht<$K,sie=AV?pz.width:Math.max(Ho,yz.width),cie=AV?pz.height:Math.max(ft,yz.height);A==null||A(Pe,{width:sie,height:cie});return}const _e=ct<jK||ht<jK,Yt=_e?fz[le].width:Ho,xu=_e?fz[le].height:ft;U==null||U(le,Pe,{width:Yt,height:xu})},[is,U,A]),gr=m.useRef(!1),Wa=m.useRef(!1),s2=m.useRef(new Map),ca=m.useCallback(()=>{var W;dr.current&&(Wa.current||gr.current||(dr.current=!1,(W=Lt.current)==null||W.fitView(A2)))},[]),V=m.useCallback(W=>{Wa.current=W,W||ca()},[ca]);m.useEffect(()=>{var W;if(!ia.current){ia.current=!0;return}if(lu.current.onExternalNodeChange){if(Wa.current||gr.current){dr.current=!0;return}(W=Lt.current)==null||W.fitView(A2)}},[cn]);const F=!!L||!!q||!!H||!!$||!!Ae,[B,K]=m.useState(null),[ee,ze]=m.useState(!1),[dt,Ye]=m.useState(null),[Et,Sn]=m.useState(null),Hn=m.useRef(null),Te=m.useRef(null);m.useEffect(()=>{if(!B)return;const W=Te.current;if(!W)return;const Z=new MouseEvent("contextmenu",{clientX:B.x,clientY:B.y,bubbles:!0,cancelable:!0,button:2,buttons:2});W.dispatchEvent(Z)},[B]);const on=m.useCallback(W=>{const Z=Hn.current;!Z||!L||L(Z,W)},[L]),pu=m.useCallback(()=>{const W=Hn.current;!W||!q||q(W)},[q]),yu=m.useCallback(()=>{const W=Hn.current;!W||!H||H(W)},[H]),mu=m.useCallback(()=>{const W=Hn.current;!W||!Y||Y(W)},[Y]);m.useCallback((W,Z,ie,le,de)=>{Ha.current.enableContextMenu&&(Hn.current=null,ze(!1),Ye(null),Sn({connectorId:W,kind:Z,pinned:ie}),K({x:le,y:de}))},[]);const qR=m.useCallback(()=>{const W=Et;!W||!Ae||Ae(W.connectorId,W.kind)},[Et,Ae]),VR=m.useCallback(()=>{if(!$)return;const W=B,Z=Lt.current;if(!W||!Z)return;const ie=Z.screenToFlowPosition({x:W.x,y:W.y});$(ie)},[B,$]),Ga=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent||""),Ge=Ga?"⌘C":"Ctrl+C",rn=Ga?"⌘V":"Ctrl+V",Ut=m.useMemo(()=>new Set(g),[g]),Zt=m.useMemo(()=>new Set(k),[k]),gu=m.useMemo(()=>{if(g.length<2)return[];const W=_n,Z=[];for(const ie of g){const le=p.find(Ee=>Ee.id===ie);if(!le)continue;const de=W==null?void 0:W[ie],je=(de==null?void 0:de.data)??{},we=le.data;Z.push({id:ie,position:(de==null?void 0:de.position)??le.position,data:{width:je.width??we.width,height:je.height??we.height}})}return Z},[p,_n,g]),c2=oe??[],ku=m.useMemo(()=>{const W=de=>{const je=Tt?void 0:s2.current.get(de.id),we={id:de.id,type:de.type,position:je??de.position,data:{...de.data,projectId:s,fileBaseUrl:l,projectSlug:de.type==="component"?s:void 0,flowSlug:de.type==="component"?c:void 0,apiBaseUrl:de.type==="component"?h:void 0,onRetryUpload:D,status:krt(vo,de.id),errorMessage:vrt(vo,de.id),statusReport:ra==null?void 0:ra[de.id],onPlay:M,onResize:C,onResizeEnd:_,setResizing:V,onFitToContent:de.type==="html"?S:de.type==="component"?E:void 0,onNameChange:(()=>{if(Tt&&de.type!=="ellipse")return N})(),onDescriptionChange:(()=>{if(Tt&&(de.type==="rectangle"||de.type==="ellipse"||de.type==="sticky"))return j})(),onIconChange:(()=>{if(Tt&&!(de.type!=="rectangle"&&de.type!=="component"))return At})(),autoEditOnMount:se===de.id?!0:void 0},selected:Ut.has(de.id)};return(!(de.data.autoSize===!0)||Wa.current)&&(de.data.width!==void 0&&(we.width=de.data.width),de.data.height!==void 0&&(we.height=de.data.height)),Ut.has(de.id)||(we.connectable=!1),we},Z=p.map(de=>W(irt(de,_n==null?void 0:_n[de.id]))),ie=new Set(p.map(de=>de.id)),le=[];if(_n)for(const[de,je]of Object.entries(_n)){if(ie.has(de))continue;const we=je;typeof we.type!="string"||!we.position||!we.data||le.push(W({...we,id:de}))}return[...Z,...le]},[s,c,l,h,p,Ut,vo,ra,M,C,_,S,E,V,_n,N,j,At,D,se,Tt]),[vu,BR]=m.useState(ku);m.useEffect(()=>{gr.current||Wa.current||BR(ku)},[ku]),m.useEffect(()=>{l2.current=vu},[vu]);const Do=m.useRef(Ut);m.useEffect(()=>{Do.current=Ut},[Ut]);const kr=m.useRef(x);m.useEffect(()=>{kr.current=x},[x]);const la=m.useRef(Zt);m.useEffect(()=>{la.current=Zt},[Zt]);const l2=m.useRef(ku),ss=m.useRef(!1),Uf=m.useRef(new Set),Wf=m.useRef(new Set),UR=m.useRef(new Set),WR=m.useRef(new Set),Ka=m.useRef(null),Sae=m.useCallback(W=>{var ft;const Z=ss.current?UR.current:(ft=Ka.current)!=null&&ft.shift?Ka.current.nodeIds:null,ie=Z&&Z.size>0?W.filter(_e=>_e.type!=="select"?!0:!(_e.selected===!1&&Z.has(_e.id))):W,le=new Set;for(const _e of ie)_e.type==="select"&&le.add(_e.id);const de=rJ(ie,l2.current),je=new Set;if(Wa.current)for(const _e of ie)_e.type==="dimensions"&&je.add(_e.id);const we=je.size===0?de:de.map(_e=>!je.has(_e.id)||_e.width===void 0&&_e.height===void 0?_e:{..._e,data:{..._e.data,..._e.width!==void 0?{width:_e.width}:{},..._e.height!==void 0?{height:_e.height}:{}}}),Ee=Do.current,tt=ss.current||Ee.size===0?we:we.map(_e=>Ee.has(_e.id)&&!le.has(_e.id)&&!_e.selected?{..._e,selected:!0}:_e);if(l2.current=tt,BR(tt),le.size===0)return;if(ss.current){for(const _e of ie)_e.type==="select"&&(_e.selected?Uf.current.add(_e.id):Uf.current.delete(_e.id));return}const ct=kr.current;if(!ct)return;const ht=tt.filter(_e=>_e.selected).map(_e=>_e.id),Pe=Do.current;Pe.size===ht.length&&ht.every(_e=>Pe.has(_e))||(Do.current=new Set(ht),ct(ht,[...la.current]))},[]),Gf=m.useRef([]),Lae=m.useCallback(W=>{var ht;const Z=ss.current?WR.current:(ht=Ka.current)!=null&&ht.shift?Ka.current.edgeIds:null,ie=Z&&Z.size>0?W.filter(Pe=>Pe.type!=="select"?!0:!(Pe.selected===!1&&Z.has(Pe.id))):W,le=new Set;for(const Pe of ie)Pe.type==="select"&&le.add(Pe.id);if(le.size===0)return;if(ss.current){for(const Pe of ie)Pe.type==="select"&&(Pe.selected?Wf.current.add(Pe.id):Wf.current.delete(Pe.id));return}const de=kr.current;if(!de)return;const we=aJ(ie,Gf.current).filter(Pe=>Pe.selected).map(Pe=>Pe.id),Ee=la.current;Ee.size===we.length&&we.every(Pe=>Ee.has(Pe))||(la.current=new Set(we),de([...Do.current],we))},[]),Nae=m.useCallback(W=>{ss.current=!0;const Z=Ka.current,ie=(Z==null?void 0:Z.shift)??(W.shiftKey||W.metaKey||W.ctrlKey);UR.current=ie?new Set((Z==null?void 0:Z.nodeIds)??Do.current):new Set,WR.current=ie?new Set((Z==null?void 0:Z.edgeIds)??la.current):new Set,Uf.current=new Set(UR.current),Wf.current=new Set(WR.current)},[]),Iae=m.useCallback(()=>{ss.current=!1,Ka.current=null;const W=kr.current;if(!W)return;const Z=[...Uf.current],ie=new Set(Z),le=new Set(Wf.current);for(const tt of Gf.current)ie.has(tt.source)&&ie.has(tt.target)&&le.add(tt.id);const de=Do.current,je=la.current,we=de.size===ie.size&&Z.every(tt=>de.has(tt)),Ee=je.size===le.size&&[...le].every(tt=>je.has(tt));we&&Ee||(Do.current=new Set(Z),la.current=new Set(le),W(Z,[...le]))},[]),Aae=m.useCallback(W=>{if(Ka.current=null,Ba.current||W.button!==0)return;const Z=W.target;Z!=null&&Z.classList.contains("react-flow__pane")&&(Ka.current={shift:W.shiftKey||W.metaKey||W.ctrlKey,nodeIds:new Set(Do.current),edgeIds:new Set(la.current)})},[]),Eae=m.useCallback(W=>{if(!Ha.current.enableContextMenu||Do.current.size<2)return;const ie=W.target;ie!==Te.current&&(ie!=null&&ie.closest(".seeflow-connector-endpoint-dot")||(W.preventDefault(),W.stopPropagation(),Hn.current=null,ze(!0),Ye(null),Sn(null),K({x:W.clientX,y:W.clientY})))},[]),jae=m.useCallback(W=>{const Z=W.dataTransfer;if(!Z)return;const ie=Z.types?Array.from(Z.types):[],le=ie.includes("Files"),de=ie.includes(pG),je=le&&!!T&&qe.enableImageDrop,we=de&&!!O&&qe.enableDragDrop;if(!(!je&&!we)){W.preventDefault();try{Z.dropEffect="copy"}catch{}}},[T,O,qe.enableImageDrop,qe.enableDragDrop]),$ae=m.useCallback(W=>{const Z=W.dataTransfer;if((Z!=null&&Z.types?Array.from(Z.types):[]).includes(pG)&&O&&qe.enableDragDrop){W.preventDefault();const je=Lt.current;if(!je)return;const we=je.screenToFlowPosition({x:W.clientX,y:W.clientY});O({position:we});return}if(!T||!qe.enableImageDrop)return;const de={x:W.clientX,y:W.clientY};W.preventDefault(),JAe({dataTransfer:Z,clientPos:de,rfInstance:Lt.current,computeDims:eEe,dispatch:T})},[T,O,qe.enableImageDrop,qe.enableDragDrop]),hV=!!R,fV=Zt.size===1?[...Zt][0]:null,GR=m.useMemo(()=>{const W=Ee=>{const tt=HK(vo,Ee.source)==="running"||HK(vo,Ee.target)==="running",ct=Zt.has(Ee.id),ht=iHe(Ee,tt,ct);ct&&(ht.selected=!0);const Pe=hV&&Ee.id===fV,On=Pe?{...ht,reconnectable:!0}:ht;return{...On,data:{...On.data,onLabelChange:Tt?z:void 0,reconnectable:Pe,registerEditHandle:uu}}},Z=new Set(y.map(Ee=>Ee.id)),ie=y.map(Ee=>W(srt(Ee,lr==null?void 0:lr[Ee.id]))),le=[];if(lr)for(const[Ee,tt]of Object.entries(lr)){if(Z.has(Ee))continue;const ct=tt;typeof ct.source!="string"||typeof ct.target!="string"||le.push(W({...ct,id:Ee}))}const de=[...ie,...le],je=[],we=[];for(const Ee of de)Zt.has(Ee.id)?we.push(Ee):je.push(Ee);return[...je,...we]},[y,vo,Zt,fV,lr,z,hV,uu,Tt]);m.useEffect(()=>{Gf.current=GR},[GR]);const d2=oa??null,Pae=m.useMemo(()=>{if(d2!=null&&d2.computeLayout)return async()=>{const W=Lt.current,Z=l2.current;if(Z.length<2)return;const ie=Z.map(ft=>{var h2;const _e=(h2=W==null?void 0:W.getInternalNode(ft.id))==null?void 0:h2.measured,Yt=ft.data,xu=(_e==null?void 0:_e.width)??Yt.width??200,vr=(_e==null?void 0:_e.height)??Yt.height??120;return{id:ft.id,type:ft.type,width:xu,height:vr}}),le=new Map;for(const ft of Z)le.set(ft.id,ft.position);const de=Gf.current.map(ft=>({id:ft.id,source:ft.source,target:ft.target})),je=d2.computeLayout;if(!je)return;const we=await je(ie,de),Ee=new Map;for(const[ft,_e]of Object.entries(we.nodes))Ee.set(ft,_e.position);let tt=Number.POSITIVE_INFINITY,ct=Number.POSITIVE_INFINITY,ht=Number.POSITIVE_INFINITY,Pe=Number.POSITIVE_INFINITY;for(const ft of ie){const _e=le.get(ft.id);if(!_e)continue;_e.x<tt&&(tt=_e.x),_e.y<ct&&(ct=_e.y);const Yt=Ee.get(ft.id);Yt&&(Yt.x<ht&&(ht=Yt.x),Yt.y<Pe&&(Pe=Yt.y))}const On=Number.isFinite(tt)&&Number.isFinite(ht)?tt-ht:0,Ho=Number.isFinite(ct)&&Number.isFinite(Pe)?ct-Pe:0;BR(ft=>ft.map(_e=>{const Yt=Ee.get(_e.id);return Yt?{..._e,position:{x:Yt.x+On,y:Yt.y+Ho}}:_e}))}},[d2]),Kf=ue??(Tt?void 0:Pae),Xf=m.useRef(!1),pV=m.useRef(null),zae=m.useCallback(W=>{var Ee;if(!Tt||!I)return;const{source:Z,target:ie}=W;if(!Z||!ie||Z===ie)return;Xf.current=!0;const le=((Ee=pV.current)==null?void 0:Ee.nodeId)??null,de=le!==null&&le===ie&&le!==Z;I(de?ie:Z,de?Z:ie)},[I,Tt]),KR=m.useCallback(W=>{const Z=ie=>{if(!ie)return!1;const le=l2.current.find(de=>de.id===ie);return le?le.type==="text":!1};return!Z(W.source)&&!Z(W.target)},[]),Rae=m.useCallback((W,Z)=>{var ht;hr(!1),Va();const ie=Xf.current;if(Xf.current=!1,ie||Dn.current)return;if(Fa.current){Fa.current=!1;return}if(!I)return;const le=(ht=Z.fromNode)==null?void 0:ht.id,de=Z.fromHandle;if(!le||!de)return;const je=zK(W);if(!je)return;const we=MD(Cn.current,je.clientX,je.clientY);if(!we)return;const Ee=we.getAttribute("data-id");if(!Ee||Ee===le||!KR({source:le,target:Ee,sourceHandle:null,targetHandle:null}))return;let tt;const ct=Lt.current;if(ct){const Pe=ct.getInternalNode(Ee);if(Pe){const On=Pe.measured.width??Pe.width??0,Ho=Pe.measured.height??Pe.height??0;if(On>0&&Ho>0){const ft=ct.screenToFlowPosition({x:je.clientX,y:je.clientY});tt=VH({x:Pe.internals.positionAbsolute.x,y:Pe.internals.positionAbsolute.y,w:On,h:Ho},ft)}}}I(le,Ee,tt?{targetPin:tt}:void 0)},[I,Va,KR]),Zf=m.useRef(!1),Tae=m.useCallback((W,Z)=>{if(!R)return;const{source:ie,target:le,sourceHandle:de,targetHandle:je}=Z;if(!ie||!le||ie===le)return;const we={};if(ie!==W.source&&(we.source=ie),le!==W.target&&(we.target=le),typeof de=="string"&&de!==W.sourceHandle&&(we.sourceHandle=de),typeof je=="string"&&je!==W.targetHandle&&(we.targetHandle=je),we.source===void 0&&we.target===void 0&&we.sourceHandle===void 0&&we.targetHandle===void 0)return;(we.source!==void 0||we.sourceHandle!==void 0)&&(we.sourceHandleAutoPicked=!1),(we.target!==void 0||we.targetHandle!==void 0)&&(we.targetHandleAutoPicked=!1);const Ee=Lt.current;if(!(we.source===void 0&&we.target===void 0)&&Ee){const ct=we.source!==void 0?"source":"target",ht=RK(ct,W.source,W.target,W.data,Pe=>Ee.getInternalNode(Pe)??null);ht&&(ct==="source"?we.targetPin=ht:we.sourcePin=ht)}Zf.current=!0,R(W.id,we)},[R]),Dae=m.useCallback((W,Z,ie,le)=>{var xu;hr(!1),Va(),Dn.current=!1;const de=Zf.current;if(Zf.current=!1,de)return;if(qa.current){qa.current=!1;return}if(!R)return;const je=zK(W);let we=((xu=le.toNode)==null?void 0:xu.id)??null;if(!we&&je){const vr=MD(Cn.current,je.clientX,je.clientY);we=(vr==null?void 0:vr.getAttribute("data-id"))??null}const Ee=ie==="source"?"target":"source",tt=art(Ee,Z.source,Z.target,we);if(tt==="no-op"||tt==="self-loop"||!je)return;const ct=Lt.current;if(!ct)return;const ht=tt==="pin-own"?Ee==="source"?Z.source:Z.target:we,Pe=ct.getInternalNode(ht);if(!Pe)return;const On=Pe.measured.width??Pe.width??0,Ho=Pe.measured.height??Pe.height??0;if(On===0||Ho===0)return;const ft=ct.screenToFlowPosition({x:je.clientX,y:je.clientY}),_e=VH({x:Pe.internals.positionAbsolute.x,y:Pe.internals.positionAbsolute.y,w:On,h:Ho},ft);if(tt==="pin-own"){if(!he)return;he(Z.id,Ee,_e);return}const Yt=RK(Ee,Z.source,Z.target,Z.data,vr=>ct.getInternalNode(vr)??null);Ee==="source"?R(Z.id,{source:we,sourceHandle:null,sourceHandleAutoPicked:!1,sourcePin:_e,...Yt?{targetPin:Yt}:{}}):R(Z.id,{target:we,targetHandle:null,targetHandleAutoPicked:!1,targetPin:_e,...Yt?{sourcePin:Yt}:{}})},[R,Va,he]),cs=m.useMemo(()=>{var Ee;if(!pr||!yr)return null;const W=(Ee=Cn.current)==null?void 0:Ee.getBoundingClientRect(),Z=(W==null?void 0:W.left)??0,ie=(W==null?void 0:W.top)??0,le=Math.min(pr.x,yr.x),de=Math.min(pr.y,yr.y),je=Math.abs(yr.x-pr.x),we=Math.abs(yr.y-pr.y);return{left:le-Z,top:de-ie,width:je,height:we}},[pr,yr]),Xa=Nt?T2(ri).node:void 0,u2=Nt==="linkflow",Hae=Nt&&!u2?Ete(Nt):"",Oae=Nt&&!u2?jte(Nt,Xa):void 0,Fae=Nt==="text",[yV,mV]=m.useState(!1),[qae,Yf]=m.useState(!1),[Vae,gV]=m.useState(!1),[kV,Bae]=m.useState(()=>({canUndo:(rt==null?void 0:rt.canUndo)??!1,canRedo:(rt==null?void 0:rt.canRedo)??!1}));m.useEffect(()=>rt?rt.subscribe(Bae):void 0,[rt]);const[vV,xV]=m.useState(!1),Uae=rt?kV.canUndo:!1,Wae=rt?kV.canRedo:!1,Za=Uot({projectId:s,getReactFlow:()=>Lt.current});m.useImperativeHandle(t,()=>({exportPdf:Za.exportPdf,exportPng:Za.exportPng,openEmbedDialog:()=>gV(!0),capturePreview:Za.capturePreview}),[Za.exportPdf,Za.exportPng,Za.capturePreview]),m.useEffect(()=>{if(!qe.enableKeyboard)return;const W=le=>{if(!le)return!1;const de=le.tagName;return de==="INPUT"||de==="TEXTAREA"||de==="SELECT"?!0:le instanceof HTMLElement&&le.isContentEditable},Z=le=>{le.code==="Space"&&(W(document.activeElement)||(le.preventDefault(),mV(!0)))},ie=le=>{le.code==="Space"&&(mV(!1),Yf(!1))};return window.addEventListener("keydown",Z),window.addEventListener("keyup",ie),()=>{window.removeEventListener("keydown",Z),window.removeEventListener("keyup",ie)}},[qe.enableKeyboard]);const Qf=m.useCallback(W=>{if(W.length!==0){if(!Tt){const Z=s2.current;for(const ie of W)Z.set(ie.id,{x:ie.position.x,y:ie.position.y});return}if(W.length===1){const Z=W[0];Z&&w&&w(Z.id,{x:Z.position.x,y:Z.position.y});return}if(b){b(W.map(Z=>({id:Z.id,position:{x:Z.position.x,y:Z.position.y}})));return}if(w)for(const Z of W)w(Z.id,{x:Z.position.x,y:Z.position.y})}},[w,b,Tt]),wV=m.useCallback((W,Z,ie)=>{gr.current=!1,Qf(ie),ca()},[Qf,ca]),MV=m.useCallback(()=>{gr.current=!0},[]),bV=m.useCallback((W,Z)=>{gr.current=!1,Qf(Z),ca()},[Qf,ca]),Gae=m.useCallback((W,Z)=>{os.current&&yn(null);const ie=Cn.current;ie&&ie.style.setProperty("--rf-zoom",String(Z.zoom)),xt==null||xt(Z)},[xt]),Kae=m.useCallback(()=>{gr.current=!0,Qn==null||Qn()},[Qn]),Xae=m.useCallback((W,Z,ie)=>{wV(W,Z,ie),go==null||go()},[wV,go]),Zae=m.useCallback(()=>{MV(),Qn==null||Qn()},[MV,Qn]),Yae=m.useCallback((W,Z)=>{bV(W,Z),go==null||go()},[bV,go]),Qae=m.useCallback((W,Z)=>{var ie;(ie=Oa.current.get(Z.id))==null||ie()},[]),Jae=m.useCallback((W,Z)=>{Ie==null||Ie(Z.id)},[Ie]),eie=m.useCallback(W=>{pt==null||pt()},[pt]),tie=m.useCallback((W,Z)=>{zt==null||zt(Z.id)},[zt]),_V=Nt?"crosshair":ur||yV?qae?"grabbing":"grab":void 0,CV=g.length+k.length===1,SV=CV?g[0]:void 0,LV=CV?k[0]:void 0,nie=SV?p.find(W=>W.id===SV)??null:null;LV&&y.find(W=>W.id===LV);const oie=s??null,XR=qe.showDetailPanel&&!Vt,rie=XR,aie=m.useMemo(()=>({custom:eu??{}}),[eu]),iie=m.useMemo(()=>({studioBaseUrl:u}),[u]),Jf=oa==null?void 0:oa.icons;return m.useEffect(()=>{if(!Jf)return;let W=!1;return(async()=>{try{const Z=await Jf.listPacks();if(W)return;bH(Z)}catch{}})(),()=>{W=!0}},[Jf]),f.jsx(xFe,{value:aie,children:f.jsx(VAe,{value:iie,children:f.jsx("div",{"data-testid":"seeflow-canvas","data-mode":n,"data-canvas-mode":Re.kind,"data-can-undo":Uae?"true":"false","data-can-redo":Wae?"true":"false",ref:Cn,className:"seeflow-canvas-root sf:relative sf:flex sf:h-full sf:w-full",style:_V?{cursor:_V}:void 0,onPointerDownCapture:Aae,onPointerDown:W=>{yV&&Yf(!0),OR(W)},onPointerMove:FR,onPointerUp:W=>{Yf(!1),uV(W)},onPointerCancel:()=>{Ua.current=!1,as.current=null,mr.current=null,To(null),fu(null),Yf(!1)},onContextMenuCapture:Eae,onDragOver:jae,onDrop:$ae,children:f.jsxs(jBe,{containerRef:Cn,children:[f.jsxs("div",{className:"sf:relative sf:flex-1 sf:min-w-0 sf:h-full",children:[f.jsxs(_De,{nodes:vu,edges:GR,onNodesChange:Sae,nodeTypes:crt,edgeTypes:lrt,proOptions:urt,fitView:!0,minZoom:n==="mini"?.05:.5,nodesDraggable:(Tt?!!w:!0)&&!Nt&&!ur&&qe.enableNodeMove,nodesConnectable:Tt&&!!I&&!Nt&&!ur,deleteKeyCode:Tt?["Backspace","Delete"]:null,zoomOnScroll:qe.enableZoom,zoomOnPinch:qe.enableZoom,className:xo?"seeflow-connecting":void 0,onConnect:Tt?zae:void 0,isValidConnection:KR,onConnectStart:(W,Z)=>{hr(!0),Xf.current=!1,pV.current={nodeId:Z.nodeId??null,handleType:Z.handleType??null},hu(Z.nodeId??null)},onConnectEnd:Rae,onReconnect:Tt&&R?Tae:void 0,onReconnectStart:(W,Z,ie)=>{hr(!0),Zf.current=!1,Dn.current=!0;const le=ie==="source"?Z.source:Z.target;hu(le)},onReconnectEnd:Dae,connectionLineComponent:rs,connectionLineStyle:{strokeWidth:2},connectionRadius:32,reconnectRadius:10,edgesReconnectable:!1,elevateNodesOnSelect:!1,elementsSelectable:!Nt&&!ur&&qe.enableSelection,selectNodesOnDrag:!1,nodeClickDistance:5,selectionOnDrag:!Nt&&!ur&&qe.enableSelection,panOnDrag:Nt?!1:ur?[0,1,2]:qe.enablePan?[1,2]:!1,selectionMode:N0.Partial,selectionKeyCode:null,multiSelectionKeyCode:Nt?null:["Meta","Shift"],panActivationKeyCode:Nt?null:"Space",onSelectionStart:Nae,onSelectionEnd:Iae,defaultEdgeOptions:drt,zoomOnDoubleClick:!1,onInit:W=>{Lt.current=W;const Z=Cn.current;Z&&Z.style.setProperty("--rf-zoom",String(W.getZoom())),Z&&Z.setAttribute("data-canvas-ready","true"),!aa.current&&ko.onMount&&p.length>0&&(W.fitView(A2),aa.current=!0),Ze==null||Ze(W)},onMove:Gae,onEdgesChange:Lae,onNodeDragStart:Kae,onNodeDragStop:Xae,onSelectionDragStart:Zae,onSelectionDragStop:Yae,onNodeClick:Jae,onEdgeClick:tie,onEdgeDoubleClick:Qae,onPaneClick:eie,onNodeContextMenu:qe.enableContextMenu&&F?(W,Z)=>{W.preventDefault(),Hn.current=Z.id,ze(!0),Ye(Z.type??null),Sn(null),K({x:W.clientX,y:W.clientY})}:void 0,onPaneContextMenu:qe.enableContextMenu&&$?W=>{W.preventDefault(),Hn.current=null,ze(!1),Ye(null),Sn(null),K({x:W.clientX,y:W.clientY})}:void 0,children:[f.jsx(prt,{storeApiRef:du}),f.jsx(yrt,{wrapperRef:Cn}),f.jsx(jDe,{gap:12,size:.6}),tu?f.jsx(AJ,{children:f.jsx("div",{"data-testid":"presence-layer",style:{pointerEvents:"none",position:"absolute",inset:0},children:tu})}):null,n!=="mini"&&f.jsx(Xot,{}),qe.showControls?f.jsxs(HDe,{showInteractive:!1,showFitView:!1,children:[f.jsx(Yu,{"data-testid":"controls-fit-view","aria-label":"Fit view",title:"Fit view",disabled:p.length===0,onClick:()=>{var W;(W=Lt.current)==null||W.fitView(A2)},children:f.jsx(Md,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})}),f.jsx(Yu,{"data-testid":"controls-tidy","aria-label":"Tidy layout (⌘⇧L)",title:"Tidy layout (⌘⇧L)",disabled:!Kf,onClick:()=>Kf==null?void 0:Kf(),children:f.jsx(ch,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})})]}):null,qe.showMiniMap?f.jsx(QDe,{className:"sf-canvas-minimap"}):null,qe.showResizeHandles?f.jsx(Ont,{selectedNodes:gu,onMultiResize:P}):null,a||qe.showToolbar||qe.showStyleStrip&&te&&xe?f.jsx($0,{position:"top-left",children:f.jsxs("div",{className:"sf:flex sf:flex-col sf:items-start sf:gap-2",children:[a,qe.showToolbar?f.jsx(nXe,{mode:Re,onModeChange:We,iconPickerOpen:J??!1,onOpenIconPicker:Rt,onCloseIconPicker:fn,onPickIcon:ae,showShapeTools:Tt&&!!U,iconsAdapter:Jf}):null,qe.showStyleStrip&&te&&xe?f.jsx(Vnt,{nodes:c2,connectors:re??[],onStyleNode:te,onStyleNodePreview:ce,onStyleNodes:ke,onStyleNodesPreview:ve,onStyleConnector:xe,onStyleConnectorPreview:He,onRequestIconReplace:Y}):null]})}):null,qe.showShareMenu||i||XR?f.jsx($0,{position:"top-right",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-1",children:[i,XR?f.jsx(Qot,{open:vV,onToggle:()=>xV(W=>!W)}):null,qe.showShareMenu?f.jsx(Zre,{mode:n==="mini"?"view":n,projectId:s,enableEmbed:qe.enableEmbed,onDownloadPdf:Za.exportPdf,onDownloadPng:Za.exportPng,onExportToCloud:i2,embedOpen:Vae,onEmbedOpenChange:gV}):null]})}):null]}),cs?f.jsxs("div",{"data-testid":"canvas-draw-ghost","data-ghost-shape":Nt??void 0,"aria-hidden":!0,className:ne("sf:pointer-events-none sf:absolute sf:z-10",Hae,Fae?"sf:rounded-sm sf:border sf:border-dashed sf:border-muted-foreground/40":"",u2?"sf:flex sf:items-center sf:justify-center sf:rounded-md sf:border sf:border-dashed sf:border-border sf:bg-muted/40 sf:text-muted-foreground sf:text-sm":""),style:{...Oae,left:cs.left,top:cs.top,width:cs.width,height:cs.height},children:[u2?f.jsxs("span",{className:"sf:inline-flex sf:items-center sf:gap-2",children:[f.jsx(Ii,{size:14,"aria-hidden":!0}),f.jsx("span",{children:"Link to a flow"})]}):null,(()=>{if(u2)return null;const W=Nt?Mq[Nt]:void 0;if(!W)return null;const Z=$te(Xa);return f.jsx(W,{width:cs.width,height:cs.height,borderColor:Z.borderColor,backgroundColor:Z.backgroundColor,borderSize:(Xa==null?void 0:Xa.borderSize)??ZF,borderStyle:Xa==null?void 0:Xa.borderStyle})})()]}):null,qe.enableContextMenu&&F?f.jsxs(UGe,{onOpenChange:W=>{W||(K(null),Hn.current=null,Ye(null),Sn(null))},children:[f.jsx(WGe,{asChild:!0,children:f.jsx("div",{ref:Te,"data-testid":"node-context-menu-trigger","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(B==null?void 0:B.x)??0,top:(B==null?void 0:B.y)??0,width:0,height:0}})}),f.jsxs(Gne,{"data-testid":"node-context-menu",children:[Et!=null&&Et.pinned&&Ae?f.jsx(Ar,{"data-testid":"connector-endpoint-context-menu-unpin",onSelect:qR,children:"Unpin"}):null,ee&&H?f.jsxs(Ar,{"data-testid":"node-context-menu-copy",onSelect:yu,children:["Copy",f.jsx(hO,{children:Ge})]}):null,$?f.jsxs(Ar,{"data-testid":"node-context-menu-paste",disabled:!X,onSelect:VR,children:["Paste",f.jsx(hO,{children:rn})]}):null,ee&&(H||$)&&(dt==="icon"&&Y||L||q)?f.jsx(fP,{}):null,ee&&dt==="icon"&&Y?f.jsx(Ar,{"data-testid":"node-context-menu-change-icon",onSelect:mu,children:"Change icon"}):null,ee&&dt==="icon"&&Y&&(L||q)?f.jsx(fP,{}):null,ee&&L?f.jsxs(f.Fragment,{children:[f.jsx(Ar,{"data-testid":"node-context-menu-to-front",onSelect:()=>on({op:"toFront"}),children:"Bring to front"}),f.jsx(Ar,{"data-testid":"node-context-menu-forward",onSelect:()=>on({op:"forward"}),children:"Bring forward"}),f.jsx(Ar,{"data-testid":"node-context-menu-backward",onSelect:()=>on({op:"backward"}),children:"Send backward"}),f.jsx(Ar,{"data-testid":"node-context-menu-to-back",onSelect:()=>on({op:"toBack"}),children:"Send to back"})]}):null,ee&&L&&q?f.jsx(fP,{}):null,ee&&q?f.jsx(Ar,{"data-testid":"node-context-menu-delete",onSelect:pu,children:"Delete"}):null]})]}):null,tn?f.jsxs(Wd,{open:!!Bt,onOpenChange:W=>{W||yn(null)},children:[f.jsx($Be,{asChild:!0,children:f.jsx("div",{"data-testid":"drop-popover-anchor","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(Bt==null?void 0:Bt.clientX)??0,top:(Bt==null?void 0:Bt.clientY)??0,width:0,height:0}})}),f.jsx(Gi,{"data-testid":"drop-popover",align:"start",side:"bottom",sideOffset:4,className:"sf:w-auto sf:p-1",onOpenAutoFocus:W=>{W.preventDefault()},children:f.jsx("div",{role:"menu","aria-label":"Create connected node",className:"sf:flex sf:flex-col sf:gap-0.5",children:tXe.map(({shape:W,label:Z,Icon:ie})=>W==="linkflow"?null:f.jsxs("button",{type:"button",role:"menuitem","data-testid":`drop-popover-shape-${W}`,onClick:()=>{const le=Bt;le&&(tn({sourceNodeId:le.sourceNodeId,position:{x:le.flowX,y:le.flowY},shape:W}),yn(null))},className:ne("sf:flex sf:items-center sf:gap-2 sf:rounded-sm sf:px-2 sf:py-1.5 sf:text-left sf:text-sm","sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus:bg-accent sf:focus:text-accent-foreground sf:focus:outline-hidden"),children:[f.jsx(ie,{className:"sf:h-4 sf:w-4 sf:text-muted-foreground","aria-hidden":"true"}),f.jsx("span",{children:Z})]},W))})})]}):null]}),rie?f.jsx(Jtt,{flowId:oie,node:nie,connector:null,adapter:oa??null,statusReport:pn,onNameChange:nn,onDescriptionChange:ge,onDetailChange:Le,onIconChange:At,open:vV,onClose:()=>{var W;xV(!1),(W=kr.current)==null||W.call(kr,[],[])}}):null]})})})})}const wrt=m.forwardRef(xrt);/**
8544
+ `)}async function Rot(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await zot(e,t);if(n){const o=document.createElement("style"),r=document.createTextNode(n);o.appendChild(r),e.firstChild?e.insertBefore(o,e.firstChild):e.appendChild(o)}}async function Tot(e,t={}){const{width:n,height:o}=Qre(e,t),r=await HR(e,t,!0);return await Rot(r,t),await rae(r,t),Aot(r,t),await eot(r,n,o)}async function Dot(e,t={}){const{width:n,height:o}=Qre(e,t),r=await Tot(e,t),a=await Nz(r),i=document.createElement("canvas"),s=i.getContext("2d"),c=t.pixelRatio||Ynt(),l=t.canvasWidth||n,h=t.canvasHeight||o;return i.width=l*c,i.height=h*c,t.skipAutoScale||Qnt(i),i.style.width=`${l}`,i.style.height=`${h}`,t.backgroundColor&&(s.fillStyle=t.backgroundColor,s.fillRect(0,0,i.width,i.height)),s.drawImage(a,0,0,i.width,i.height),i}async function Hot(e,t={}){return(await Dot(e,t)).toDataURL()}const Oot=e=>e instanceof Element?!(e.classList.contains("react-flow__minimap")||e.classList.contains("react-flow__controls")||e.classList.contains("react-flow__panel")):!0,Fot=e=>{var o;let t=e;for(;t&&!t.classList.contains("seeflow-canvas-root");)t=t.parentElement;if(t){const r=getComputedStyle(t).getPropertyValue("--bg-canvas").trim();if(r.length>0)return r}const n=(o=e.ownerDocument)==null?void 0:o.documentElement;return n!=null&&n.classList.contains("dark")?"#0a0a0c":"#fafafa"},qot=async e=>{const t=await Hot(e,{cacheBust:!0,filter:Oot,backgroundColor:Fot(e)}),n=await new Promise((o,r)=>{const a=new Image;a.onload=()=>o({width:a.naturalWidth,height:a.naturalHeight}),a.onerror=()=>r(new Error("Failed to decode captured image")),a.src=t});return{dataUrl:t,...n}},Vot=(e,t)=>{const n=document.createElement("a");n.href=e,n.download=t,n.rel="noopener",document.body.appendChild(n),n.click(),n.remove()},Bot=e=>{const t=e.replace(/[^A-Za-z0-9_-]+/g,"-").replace(/^-+|-+$/g,"");return t.length>0?t.slice(0,80):"canvas"},EK=(e,t)=>`${Bot(e??"canvas")}.${t}`,Uot=({projectId:e,getReactFlow:t})=>{const[n,o]=m.useState(null),r=m.useCallback(()=>o(null),[]),a=m.useCallback(async()=>{const l=t();if(!l)return null;const h=document.querySelector(".react-flow__viewport");if(!h)return null;const u=l.getViewport();try{return await l.fitView({duration:0,padding:.1}),await new Promise(p=>requestAnimationFrame(()=>p())),await qot(h)}finally{l.setViewport(u,{duration:0})}},[t]),i=m.useCallback(async()=>{o(null);try{const l=await a();if(!l)return;Vot(l.dataUrl,EK(e,"png"))}catch(l){o(l instanceof Error?l.message:String(l))}},[a,e]),s=m.useCallback(async()=>{o(null);try{const l=await a();if(!l)return;const{jsPDF:h}=await X0(async()=>{const{jsPDF:y}=await import("./jspdf.es.min-DRscdcGG.js").then(g=>g.j);return{jsPDF:y}},[]),u=l.width>l.height?"landscape":"portrait",p=new h({orientation:u,unit:"px",format:[l.width,l.height],hotfixes:["px_scaling"]});p.addImage(l.dataUrl,"PNG",0,0,l.width,l.height),p.save(EK(e,"pdf"))}catch(l){o(l instanceof Error?l.message:String(l))}},[a,e]),c=m.useCallback(async()=>{const l=await a();return l==null?void 0:l.dataUrl},[a]);return{exportPdf:s,exportPng:i,capturePreview:c,lastError:n,clearError:r}},Wot=12,Got=1200;function Kot(e,t={}){const n=t.idleMs??Got;let o,r=null,a=null;const i=typeof requestAnimationFrame<"u",s=()=>{o!==void 0&&(clearTimeout(o),o=void 0)},c=()=>{a!==null&&typeof cancelAnimationFrame<"u"&&cancelAnimationFrame(a),a=null},l=()=>{if(a=null,!r)return;const{clientX:y,clientY:g}=r;r=null;const k=e.getBoundingClientRect();e.style.setProperty("--mx",`${y-k.left}px`),e.style.setProperty("--my",`${g-k.top}px`),e.dataset.active="true",s(),o=setTimeout(()=>{e.dataset.active="false",o=void 0},n)};return{onMove:y=>{if(r={clientX:y.clientX,clientY:y.clientY},!i){l();return}a===null&&(a=requestAnimationFrame(l))},onLeave:()=>{c(),r=null,s(),e.dataset.active="false"},dispose:()=>{c(),r=null,s()}}}function Xot(){const e=m.useRef(null),t=De(i=>i.transform,(i,s)=>i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]),[n,o,r]=t,a=Wot*r;return m.useEffect(()=>{var u;const i=e.current;if(!i)return;const s=(u=i.parentElement)==null?void 0:u.querySelector(".react-flow__pane");if(!s)return;const{onMove:c,onLeave:l,dispose:h}=Kot(i);return s.addEventListener("mousemove",c,{passive:!0}),s.addEventListener("mouseleave",l,{passive:!0}),()=>{s.removeEventListener("mousemove",c),s.removeEventListener("mouseleave",l),h()}},[]),f.jsx("div",{ref:e,className:"glow-overlay","data-active":"false","data-testid":"canvas-glow-overlay",style:{backgroundPosition:`${n}px ${o}px`,backgroundSize:`${a}px ${a}px`}})}const Zot="Hide inspector",Yot="Open inspector";function Qot({open:e,onToggle:t}){const n=e?hh:fh,o=e?Zot:Yot;return f.jsx(m0,{delayDuration:300,children:f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx(Ke,{type:"button",variant:"ghost",size:"icon","data-testid":"inspector-toggle","aria-pressed":e,"aria-label":o,onClick:t,className:"sf:h-8 sf:w-8",children:f.jsx(n,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsx(Gr,{children:o})]})})}const Jot={showToolbar:!0,showStyleStrip:!0,showDetailPanel:!0,showStatusBadges:!0,showResizeHandles:!0,showControls:!0,showShareMenu:!0,showMiniMap:!0,enableKeyboard:!0,enableContextMenu:!0,enableDragDrop:!0,enableImageDrop:!0,enableZoom:!0,enablePan:!0,enableSelection:!0,enableNodeMove:!0,enableEmbed:!1},ert={showToolbar:!0,showStyleStrip:!1,showDetailPanel:!1,showStatusBadges:!0,showResizeHandles:!1,showControls:!0,showShareMenu:!0,showMiniMap:!0,enableKeyboard:!1,enableContextMenu:!1,enableDragDrop:!1,enableImageDrop:!1,enableZoom:!0,enablePan:!0,enableSelection:!0,enableNodeMove:!0,enableEmbed:!1},trt={showToolbar:!1,showStyleStrip:!1,showDetailPanel:!1,showStatusBadges:!1,showResizeHandles:!1,showControls:!1,showShareMenu:!1,showMiniMap:!1,enableKeyboard:!1,enableContextMenu:!1,enableDragDrop:!1,enableImageDrop:!1,enableZoom:!1,enablePan:!1,enableSelection:!1,enableNodeMove:!1,enableEmbed:!1};function nrt(e){const t=e.mode==="edit"?Jot:e.mode==="mini"?trt:ert;return{showToolbar:e.showToolbar??t.showToolbar,showStyleStrip:e.showStyleStrip??t.showStyleStrip,showDetailPanel:e.showDetailPanel??t.showDetailPanel,showStatusBadges:e.showStatusBadges??t.showStatusBadges,showResizeHandles:e.showResizeHandles??t.showResizeHandles,showControls:e.showControls??t.showControls,showShareMenu:e.showShareMenu??t.showShareMenu,showMiniMap:e.showMiniMap??t.showMiniMap,enableKeyboard:e.enableKeyboard??t.enableKeyboard,enableContextMenu:e.enableContextMenu??t.enableContextMenu,enableDragDrop:e.enableDragDrop??t.enableDragDrop,enableImageDrop:e.enableImageDrop??t.enableImageDrop,enableZoom:e.enableZoom??t.enableZoom,enablePan:e.enablePan??t.enablePan,enableSelection:e.enableSelection??t.enableSelection,enableNodeMove:e.enableNodeMove??t.enableNodeMove,enableEmbed:e.enableEmbed??t.enableEmbed}}const jK=40,$K=4;let PK=!1;const A2={padding:.15,duration:300,includeHiddenNodes:!1};function ort(e){return e===void 0||e===!1?{onMount:!1,onExternalNodeChange:!1}:e===!0?{onMount:!0,onExternalNodeChange:!0}:{onMount:e.onMount??!0,onExternalNodeChange:e.onExternalNodeChange??!0}}const zK=e=>{if("clientX"in e)return{clientX:e.clientX,clientY:e.clientY};const t=e.changedTouches[0]??e.touches[0];return t?{clientX:t.clientX,clientY:t.clientY}:null},rrt=(e,t)=>{var o;const n=document.elementsFromPoint(e,t);for(const r of n){const a=(o=r.closest)==null?void 0:o.call(r,".react-flow__node");if(a)return a}return null},iae=15,MD=(e,t,n)=>{const o=rrt(t,n);if(o)return o;if(!e)return null;let r=null,a=iae;const i=e.querySelectorAll(".react-flow__node");for(const s of i){const c=s.getBoundingClientRect();if(c.width===0||c.height===0)continue;const l=Math.max(c.left-t,0,t-c.right),h=Math.max(c.top-n,0,n-c.bottom),u=Math.hypot(l,h);u<=a&&(r=s,a=u)}return r};function RK(e,t,n,o,r){if(e==="source"?(o==null?void 0:o.targetPin)!==void 0||(o==null?void 0:o.targetHandleAutoPicked)===!1:(o==null?void 0:o.sourcePin)!==void 0||(o==null?void 0:o.sourceHandleAutoPicked)===!1)return;const i=e==="source"?n:t,s=e==="source"?t:n,c=r(i),l=r(s);if(!c||!l)return;const h=c.measured.width??c.width??0,u=c.measured.height??c.height??0,p=l.measured.width??l.width??0,y=l.measured.height??l.height??0;if(h===0||u===0||p===0||y===0)return;const g={x:c.internals.positionAbsolute.x,y:c.internals.positionAbsolute.y,w:h,h:u},k={x:l.internals.positionAbsolute.x+p/2,y:l.internals.positionAbsolute.y+y/2};return yHe(g,JP(g,k))}function art(e,t,n,o){if(o===null)return"no-op";const r=e==="source"?t:n;return o===(e==="source"?n:t)?"self-loop":o===r?"pin-own":"reconnect-and-pin"}const irt=(e,t)=>{if(!t)return e;const n=t.data?{...e.data,...t.data}:e.data;return{...e,...t,data:n}},srt=(e,t)=>t?{...e,...t}:e,crt={rectangle:sWe,ellipse:wr,sticky:wr,text:wr,database:wr,server:wr,user:wr,queue:wr,cloud:wr,diamond:wr,hexagon:wr,image:YUe,icon:SHe,html:WUe,component:pUe,linkflow:tWe},lrt={editableEdge:dWe},drt={zIndex:0},urt={hideAttribution:!0},hrt=8,TK=(e,t)=>e?typeof e=="string"?`url('#${e}')`:`url('#${`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}')`:void 0,frt=e=>function({fromX:n,fromY:o,toX:r,toY:a,fromPosition:i,toPosition:s,connectionLineStyle:c}){const l=De(q=>e.current?q.edges.find(H=>H.reconnectable===!0)??null:null),h=l==null?void 0:l.data,u=De(q=>{var $;const H=q.connection;return(($=H==null?void 0:H.fromHandle)==null?void 0:$.nodeId)??null}),p=De(q=>l!=null&&l.source?q.nodeLookup.get(l.source)??null:null),y=De(q=>l!=null&&l.target?q.nodeLookup.get(l.target)??null:null),g=De(q=>u?q.nodeLookup.get(u)??null:null),k=(l==null?void 0:l.source)===u,x=l?k?p:y:g,v=k?y:p,M=k?h==null?void 0:h.sourcePin:h==null?void 0:h.targetPin,w=k?h==null?void 0:h.sourceHandleAutoPicked:h==null?void 0:h.targetHandleAutoPicked;let b=n,C=o,_=i;if(x){const q=x.measured.width??x.width??0,H=x.measured.height??x.height??0;if(q>0&&H>0){const $={x:x.internals.positionAbsolute.x,y:x.internals.positionAbsolute.y,w:q,h:H};let X=null;if(M)X=ez($,M);else if(w!==!1&&v){const G=v.measured.width??v.width??0,Q=v.measured.height??v.height??0;if(G>0&&Q>0){const oe={x:v.internals.positionAbsolute.x+G/2,y:v.internals.positionAbsolute.y+Q/2};X=JP($,oe)}}X&&(b=X.x,C=X.y,_=DK[X.side])}}const S=De(q=>q.transform[2]),E=De(q=>q.nodeLookup),P=De(q=>{var H;return((H=q.connection.toHandle)==null?void 0:H.nodeId)??null});let N=r,j=a,z=s;if(S>0){const q=iae/S,H=l?k?l.target:l.source:null;let $=null;if(P&&P!==H){const X=E.get(P)??null;X&&($=X)}if(!$){let X=q;for(const G of E.values()){if(H&&G.id===H||x&&G.id===x.id)continue;const Q=G.measured.width??G.width??0,oe=G.measured.height??G.height??0;if(Q===0||oe===0)continue;const re=G.internals.positionAbsolute.x,te=G.internals.positionAbsolute.y,ce=Math.max(re-r,0,r-(re+Q)),ke=Math.max(te-a,0,a-(te+oe)),ve=Math.hypot(ce,ke);ve<=X&&(X=ve,$=G)}}if(!$&&l&&x){const X=x.measured.width??x.width??0,G=x.measured.height??x.height??0;if(X>0&&G>0){const Q=x.internals.positionAbsolute.x,oe=x.internals.positionAbsolute.y,re=Math.max(Q-r,0,r-(Q+X)),te=Math.max(oe-a,0,a-(oe+G));Math.hypot(re,te)<=q&&($=x)}}if($){const X=$.measured.width??$.width??0,G=$.measured.height??$.height??0;if(X>0&&G>0){const Q=VH({x:$.internals.positionAbsolute.x,y:$.internals.positionAbsolute.y,w:X,h:G},{x:r,y:a}),oe=ez({x:$.internals.positionAbsolute.x,y:$.internals.positionAbsolute.y,w:X,h:G},Q);N=oe.x,j=oe.y,z=DK[oe.side]}}}const U=(h==null?void 0:h.path)==="step",[A]=U?af({sourceX:b,sourceY:C,sourcePosition:_,targetX:N,targetY:j,targetPosition:z,borderRadius:hrt}):oR({sourceX:b,sourceY:C,sourcePosition:_,targetX:N,targetY:j,targetPosition:z}),T=(l==null?void 0:l.style)??c??void 0,D=De(q=>q.rfId),O=k?l==null?void 0:l.markerStart:l==null?void 0:l.markerEnd,I=k?l==null?void 0:l.markerEnd:l==null?void 0:l.markerStart,R=TK(O,D),L=TK(I,D);return f.jsx("path",{d:A,fill:"none",className:"react-flow__connection-path",style:T,markerStart:R,markerEnd:L})},DK={top:fe.Top,right:fe.Right,bottom:fe.Bottom,left:fe.Left};function prt({storeApiRef:e}){const t=vt();return m.useEffect(()=>(e.current=t,()=>{e.current===t&&(e.current=null)}),[t,e]),null}function yrt({wrapperRef:e}){const t=De(o=>o.transform[2]),n=e.current;return n&&n.style.setProperty("--rf-zoom",String(t)),null}const mrt=new Set(["INPUT","TEXTAREA","SELECT"]),AO=e=>e?mrt.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1;function grt(e){const{event:t,selectedNodeIds:n,hasClipboard:o,activeElement:r,onCopySelection:a,onPasteSelection:i}=e;if(!(t.metaKey||t.ctrlKey)||t.shiftKey||t.altKey)return!1;const s=t.key.toLowerCase();return s!=="c"&&s!=="v"||AO(r)?!1:s==="c"?n.length===0||!a?!1:(t.preventDefault(),a([...n]),!0):!o||!i?!1:(t.preventDefault(),i(),!0)}const HK=(e,t)=>{var n;return((n=e==null?void 0:e[t])==null?void 0:n.status)??"idle"},krt=(e,t)=>{var n;return(n=e==null?void 0:e[t])==null?void 0:n.status},vrt=(e,t)=>{var n,o;return((n=e==null?void 0:e[t])==null?void 0:n.status)==="error"?(o=e[t])==null?void 0:o.error:void 0};function xrt(e,t){var NV,IV;const{mode:n,adapter:o,ioAdapter:r,topLeftSlot:a,topRightSlot:i,projectId:s,flowSlug:c,fileBaseUrl:l,apiBaseUrl:h="/api",studioBaseUrl:u="",nodes:p,connectors:y,selectedNodeIds:g,selectedConnectorIds:k,onSelectionChange:x,runtime:v,onPlayNode:M,onNodePositionChange:w,onNodePositionsChange:b,onNodeResize:C,onNodeResizeEnd:_,onHtmlNodeFitToContent:S,onComponentNodeFitToContent:E,onMultiResize:P,onNodeNameChange:N,onNodeDescriptionChange:j,onConnectorLabelChange:z,onCreateShapeNode:U,onCreateLinkflowNode:A,onCreateImageFromFile:T,onRetryImageUpload:D,onCreateHtmlNode:O,onCreateConnector:I,onReconnectConnector:R,onReorderNode:L,onDeleteNode:q,onCopyNode:H,onPasteAt:$,hasClipboard:X,onCopySelection:G,onPasteSelection:Q,selectedNodes:oe,selectedConnectors:re,onStyleNode:te,onStyleNodePreview:ce,onStyleNodes:ke,onStyleNodesPreview:ve,onStyleConnector:xe,onStyleConnectorPreview:He,onRfInit:Ze,onTidy:ue,onNodeClick:Ie,onConnectorClick:zt,onPaneClick:pt,onCreateAndConnectFromPane:tn,pendingEditNodeId:se,iconPickerOpen:J,onOpenIconPicker:Rt,onCloseIconPicker:fn,onPickIcon:ae,onRequestIconReplace:Y,onPinEndpoint:he,onUnpinEndpoint:Ae,canvasMode:Re,onCanvasModeChange:We,disableSidebar:Vt,statusReport:pn,onNameChange:nn,onDescriptionChange:ge,onDetailChange:Le,onIconChange:At,autoFitView:Tn,autoFitViewSignal:cn,customIcons:eu,onExportToCloud:i2,onNodeDragStart:Qn,onNodeDragStop:go,onViewportChange:xt,history:rt,presenceLayer:tu,onCursorMove:Xi,showToolbar:nu,showStyleStrip:ou,showDetailPanel:ru,showStatusBadges:au,showResizeHandles:Zi,showControls:Yi,showShareMenu:Qi,showMiniMap:Ji,enableKeyboard:ta,enableContextMenu:na,enableDragDrop:iu,enableImageDrop:su,enableZoom:Ro,enablePan:es,enableSelection:Da,enableNodeMove:ts,enableEmbed:ns}=e,qe=m.useMemo(()=>nrt({mode:n,showToolbar:nu,showStyleStrip:ou,showDetailPanel:ru,showStatusBadges:au,showResizeHandles:Zi,showControls:Yi,showShareMenu:Qi,showMiniMap:Ji,enableKeyboard:ta,enableContextMenu:na,enableDragDrop:iu,enableImageDrop:su,enableZoom:Ro,enablePan:es,enableSelection:Da,enableNodeMove:ts,enableEmbed:ns}),[n,nu,ou,ru,au,Zi,Yi,Qi,Ji,ta,na,iu,su,Ro,es,Da,ts,ns]),oa=m.useMemo(()=>r?(o&&!PK&&(PK=!0,console.warn("[SeeflowCanvas] Both `adapter` and `ioAdapter` were provided — `ioAdapter` takes precedence; the `adapter` prop is ignored.")),Wnt(r)):o,[r,o]),Tt=n==="edit",Ha=m.useRef(qe);m.useEffect(()=>{Ha.current=qe},[qe]);const cu=Tn??(n==="mini"?!0:void 0),ko=m.useMemo(()=>ort(cu),[cu]),vo=v==null?void 0:v.runs,ra=v==null?void 0:v.statuses,_n=(NV=v==null?void 0:v.pendingOverrides)==null?void 0:NV.nodes,lr=(IV=v==null?void 0:v.pendingOverrides)==null?void 0:IV.connectors,Cn=m.useRef(null),Lt=m.useRef(null),aa=m.useRef(!1),dr=m.useRef(!1),ia=m.useRef(!1),lu=m.useRef(ko);lu.current=ko,m.useEffect(()=>{if(aa.current||!ko.onMount||p.length===0)return;const W=Lt.current;W&&(W.fitView(A2),aa.current=!0)},[p,ko.onMount]);const du=m.useRef(null),Nt=Re.kind==="draw"?Re.shape:null,ur=Re.kind==="hand",Oa=m.useRef(new Map),uu=m.useCallback((W,Z)=>(Oa.current.set(W,Z),()=>{Oa.current.get(W)===Z&&Oa.current.delete(W)}),[]),[xo,hr]=m.useState(!1),fr=m.useRef(!1);m.useEffect(()=>{fr.current=xo},[xo]);const Fa=m.useRef(!1),qa=m.useRef(!1),Dn=m.useRef(!1),[Bt,yn]=m.useState(null),os=m.useRef(null);m.useEffect(()=>{os.current=Bt},[Bt]),m.useCallback(()=>{yn(null)},[]);const rs=m.useMemo(()=>frt(Dn),[]),sa=m.useRef(null),Bf=m.useRef(null),hu=m.useCallback(W=>{const Z=Cn.current;if(!Z){sa.current=W;return}const ie=sa.current;if(ie&&ie!==W){const le=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);le==null||le.removeAttribute("data-connect-source")}if(W){const le=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(W)}"]`);le==null||le.setAttribute("data-connect-source","true")}sa.current=W},[]),lt=m.useCallback(W=>{const Z=Cn.current,ie=Bf.current;if(ie!==W){if(Z&&ie){const le=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(ie)}"]`);le==null||le.removeAttribute("data-connect-target")}if(Z&&W){const le=Z.querySelector(`.react-flow__node[data-id="${CSS.escape(W)}"]`);le==null||le.setAttribute("data-connect-target","true")}Bf.current=W}},[]),Va=m.useCallback(()=>{hu(null),lt(null)},[hu,lt]);m.useEffect(()=>{if(!xo){lt(null);return}let W=null,Z=null;const ie=()=>{W=null;const de=Z;if(Z=null,!de)return;const je=MD(Cn.current,de.clientX,de.clientY),we=(je==null?void 0:je.getAttribute("data-id"))??null;if(we&&we===sa.current){lt(null);return}lt(we)},le=de=>{Z={clientX:de.clientX,clientY:de.clientY},W===null&&(W=requestAnimationFrame(ie))};return document.addEventListener("pointermove",le,{passive:!0}),()=>{document.removeEventListener("pointermove",le),W!==null&&cancelAnimationFrame(W)}},[xo,lt]);const[pr,To]=m.useState(null),[yr,fu]=m.useState(null),Ba=m.useRef(null),as=m.useRef(null),mr=m.useRef(null),Ua=m.useRef(!1);m.useEffect(()=>{Ba.current=Nt},[Nt]);const is=m.useCallback(()=>{We({kind:"select"}),To(null),fu(null),Ba.current=null,as.current=null,mr.current=null,Ua.current=!1},[We]);m.useEffect(()=>{if(!qe.enableKeyboard)return;const W=Z=>{var de,je;if(Z.key!=="Escape"||AO(document.activeElement))return;if(Ba.current){Z.preventDefault(),is();return}if(fr.current){Z.preventDefault(),Fa.current=!0,qa.current=!0;try{(de=du.current)==null||de.getState().cancelConnection()}catch{}document.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0,cancelable:!0,button:0})),hr(!1);return}if(os.current){Z.preventDefault(),yn(null);return}const ie=Do.current.size>0,le=la.current.size>0;(ie||le)&&(Z.preventDefault(),(je=kr.current)==null||je.call(kr,[],[]))};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[is,qe.enableKeyboard]),m.useEffect(()=>{if(!qe.enableKeyboard)return;const W=Z=>{const ie=DHe(Z,{isEditableActive:AO(document.activeElement)});ie&&rt&&(Z.preventDefault(),Z.stopPropagation(),ie==="undo"?rt.undo():rt.redo())};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[rt,qe.enableKeyboard]),m.useEffect(()=>{if(!qe.enableKeyboard)return;const W=Z=>{grt({event:Z,selectedNodeIds:g,hasClipboard:!!X,activeElement:document.activeElement,onCopySelection:G,onPasteSelection:Q})};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[g,X,G,Q,qe.enableKeyboard]);const OR=m.useCallback(W=>{var le,de;if(!Ba.current)return;const Z=W.target;if(!(Z!=null&&Z.classList.contains("react-flow__pane")))return;const ie={x:W.clientX,y:W.clientY};Ua.current=!0,as.current=ie,mr.current=ie,To(ie),fu(ie);try{(de=(le=W.currentTarget).setPointerCapture)==null||de.call(le,W.pointerId)}catch{}W.preventDefault(),W.stopPropagation()},[]),FR=m.useCallback(W=>{if(Xi){const ie=Lt.current;if(ie){const le=ie.screenToFlowPosition({x:W.clientX,y:W.clientY}),de=ie.getViewport();Xi({x:le.x,y:le.y,flowId:c??null},{x:de.x,y:de.y,zoom:de.zoom})}}if(!Ua.current)return;const Z={x:W.clientX,y:W.clientY};mr.current=Z,fu(Z)},[Xi,c]),uV=m.useCallback(W=>{var vr,h2;if(!Ua.current)return;Ua.current=!1;try{(h2=(vr=W.currentTarget).releasePointerCapture)==null||h2.call(vr,W.pointerId)}catch{}const Z=as.current,ie=mr.current,le=Ba.current,de=Lt.current;if(is(),!Z||!ie||!le||!de)return;const je=Math.min(Z.x,ie.x),we=Math.min(Z.y,ie.y),Ee=Math.max(Z.x,ie.x),tt=Math.max(Z.y,ie.y),ct=Ee-je,ht=tt-we,Pe=de.screenToFlowPosition({x:je,y:we}),On=de.screenToFlowPosition({x:Ee,y:tt}),Ho=On.x-Pe.x,ft=On.y-Pe.y;if(le==="linkflow"){const AV=ct<$K&&ht<$K,sie=AV?pz.width:Math.max(Ho,yz.width),cie=AV?pz.height:Math.max(ft,yz.height);A==null||A(Pe,{width:sie,height:cie});return}const _e=ct<jK||ht<jK,Yt=_e?fz[le].width:Ho,xu=_e?fz[le].height:ft;U==null||U(le,Pe,{width:Yt,height:xu})},[is,U,A]),gr=m.useRef(!1),Wa=m.useRef(!1),s2=m.useRef(new Map),ca=m.useCallback(()=>{var W;dr.current&&(Wa.current||gr.current||(dr.current=!1,(W=Lt.current)==null||W.fitView(A2)))},[]),V=m.useCallback(W=>{Wa.current=W,W||ca()},[ca]);m.useEffect(()=>{var W;if(!ia.current){ia.current=!0;return}if(lu.current.onExternalNodeChange){if(Wa.current||gr.current){dr.current=!0;return}(W=Lt.current)==null||W.fitView(A2)}},[cn]);const F=!!L||!!q||!!H||!!$||!!Ae,[B,K]=m.useState(null),[ee,ze]=m.useState(!1),[dt,Ye]=m.useState(null),[Et,Sn]=m.useState(null),Hn=m.useRef(null),Te=m.useRef(null);m.useEffect(()=>{if(!B)return;const W=Te.current;if(!W)return;const Z=new MouseEvent("contextmenu",{clientX:B.x,clientY:B.y,bubbles:!0,cancelable:!0,button:2,buttons:2});W.dispatchEvent(Z)},[B]);const on=m.useCallback(W=>{const Z=Hn.current;!Z||!L||L(Z,W)},[L]),pu=m.useCallback(()=>{const W=Hn.current;!W||!q||q(W)},[q]),yu=m.useCallback(()=>{const W=Hn.current;!W||!H||H(W)},[H]),mu=m.useCallback(()=>{const W=Hn.current;!W||!Y||Y(W)},[Y]);m.useCallback((W,Z,ie,le,de)=>{Ha.current.enableContextMenu&&(Hn.current=null,ze(!1),Ye(null),Sn({connectorId:W,kind:Z,pinned:ie}),K({x:le,y:de}))},[]);const qR=m.useCallback(()=>{const W=Et;!W||!Ae||Ae(W.connectorId,W.kind)},[Et,Ae]),VR=m.useCallback(()=>{if(!$)return;const W=B,Z=Lt.current;if(!W||!Z)return;const ie=Z.screenToFlowPosition({x:W.x,y:W.y});$(ie)},[B,$]),Ga=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.platform||navigator.userAgent||""),Ge=Ga?"⌘C":"Ctrl+C",rn=Ga?"⌘V":"Ctrl+V",Ut=m.useMemo(()=>new Set(g),[g]),Zt=m.useMemo(()=>new Set(k),[k]),gu=m.useMemo(()=>{if(g.length<2)return[];const W=_n,Z=[];for(const ie of g){const le=p.find(Ee=>Ee.id===ie);if(!le)continue;const de=W==null?void 0:W[ie],je=(de==null?void 0:de.data)??{},we=le.data;Z.push({id:ie,position:(de==null?void 0:de.position)??le.position,data:{width:je.width??we.width,height:je.height??we.height}})}return Z},[p,_n,g]),c2=oe??[],ku=m.useMemo(()=>{const W=de=>{const je=Tt?void 0:s2.current.get(de.id),we={id:de.id,type:de.type,position:je??de.position,data:{...de.data,projectId:s,fileBaseUrl:l,projectSlug:de.type==="component"?s:void 0,flowSlug:de.type==="component"?c:void 0,apiBaseUrl:de.type==="component"?h:void 0,onRetryUpload:D,status:krt(vo,de.id),errorMessage:vrt(vo,de.id),statusReport:ra==null?void 0:ra[de.id],onPlay:M,onResize:C,onResizeEnd:_,setResizing:V,onFitToContent:de.type==="html"?S:de.type==="component"?E:void 0,onNameChange:(()=>{if(Tt&&de.type!=="ellipse")return N})(),onDescriptionChange:(()=>{if(Tt&&(de.type==="rectangle"||de.type==="ellipse"||de.type==="sticky"))return j})(),onIconChange:(()=>{if(Tt&&!(de.type!=="rectangle"&&de.type!=="component"))return At})(),autoEditOnMount:se===de.id?!0:void 0},selected:Ut.has(de.id)};return(!(de.data.autoSize===!0)||Wa.current)&&(de.data.width!==void 0&&(we.width=de.data.width),de.data.height!==void 0&&(we.height=de.data.height)),Ut.has(de.id)||(we.connectable=!1),we},Z=p.map(de=>W(irt(de,_n==null?void 0:_n[de.id]))),ie=new Set(p.map(de=>de.id)),le=[];if(_n)for(const[de,je]of Object.entries(_n)){if(ie.has(de))continue;const we=je;typeof we.type!="string"||!we.position||!we.data||le.push(W({...we,id:de}))}return[...Z,...le]},[s,c,l,h,p,Ut,vo,ra,M,C,_,S,E,V,_n,N,j,At,D,se,Tt]),[vu,BR]=m.useState(ku);m.useEffect(()=>{gr.current||Wa.current||BR(ku)},[ku]),m.useEffect(()=>{l2.current=vu},[vu]);const Do=m.useRef(Ut);m.useEffect(()=>{Do.current=Ut},[Ut]);const kr=m.useRef(x);m.useEffect(()=>{kr.current=x},[x]);const la=m.useRef(Zt);m.useEffect(()=>{la.current=Zt},[Zt]);const l2=m.useRef(ku),ss=m.useRef(!1),Uf=m.useRef(new Set),Wf=m.useRef(new Set),UR=m.useRef(new Set),WR=m.useRef(new Set),Ka=m.useRef(null),Sae=m.useCallback(W=>{var ft;const Z=ss.current?UR.current:(ft=Ka.current)!=null&&ft.shift?Ka.current.nodeIds:null,ie=Z&&Z.size>0?W.filter(_e=>_e.type!=="select"?!0:!(_e.selected===!1&&Z.has(_e.id))):W,le=new Set;for(const _e of ie)_e.type==="select"&&le.add(_e.id);const de=rJ(ie,l2.current),je=new Set;if(Wa.current)for(const _e of ie)_e.type==="dimensions"&&je.add(_e.id);const we=je.size===0?de:de.map(_e=>!je.has(_e.id)||_e.width===void 0&&_e.height===void 0?_e:{..._e,data:{..._e.data,..._e.width!==void 0?{width:_e.width}:{},..._e.height!==void 0?{height:_e.height}:{}}}),Ee=Do.current,tt=ss.current||Ee.size===0?we:we.map(_e=>Ee.has(_e.id)&&!le.has(_e.id)&&!_e.selected?{..._e,selected:!0}:_e);if(l2.current=tt,BR(tt),le.size===0)return;if(ss.current){for(const _e of ie)_e.type==="select"&&(_e.selected?Uf.current.add(_e.id):Uf.current.delete(_e.id));return}const ct=kr.current;if(!ct)return;const ht=tt.filter(_e=>_e.selected).map(_e=>_e.id),Pe=Do.current;Pe.size===ht.length&&ht.every(_e=>Pe.has(_e))||(Do.current=new Set(ht),ct(ht,[...la.current]))},[]),Gf=m.useRef([]),Lae=m.useCallback(W=>{var ht;const Z=ss.current?WR.current:(ht=Ka.current)!=null&&ht.shift?Ka.current.edgeIds:null,ie=Z&&Z.size>0?W.filter(Pe=>Pe.type!=="select"?!0:!(Pe.selected===!1&&Z.has(Pe.id))):W,le=new Set;for(const Pe of ie)Pe.type==="select"&&le.add(Pe.id);if(le.size===0)return;if(ss.current){for(const Pe of ie)Pe.type==="select"&&(Pe.selected?Wf.current.add(Pe.id):Wf.current.delete(Pe.id));return}const de=kr.current;if(!de)return;const we=aJ(ie,Gf.current).filter(Pe=>Pe.selected).map(Pe=>Pe.id),Ee=la.current;Ee.size===we.length&&we.every(Pe=>Ee.has(Pe))||(la.current=new Set(we),de([...Do.current],we))},[]),Nae=m.useCallback(W=>{ss.current=!0;const Z=Ka.current,ie=(Z==null?void 0:Z.shift)??(W.shiftKey||W.metaKey||W.ctrlKey);UR.current=ie?new Set((Z==null?void 0:Z.nodeIds)??Do.current):new Set,WR.current=ie?new Set((Z==null?void 0:Z.edgeIds)??la.current):new Set,Uf.current=new Set(UR.current),Wf.current=new Set(WR.current)},[]),Iae=m.useCallback(()=>{ss.current=!1,Ka.current=null;const W=kr.current;if(!W)return;const Z=[...Uf.current],ie=new Set(Z),le=new Set(Wf.current);for(const tt of Gf.current)ie.has(tt.source)&&ie.has(tt.target)&&le.add(tt.id);const de=Do.current,je=la.current,we=de.size===ie.size&&Z.every(tt=>de.has(tt)),Ee=je.size===le.size&&[...le].every(tt=>je.has(tt));we&&Ee||(Do.current=new Set(Z),la.current=new Set(le),W(Z,[...le]))},[]),Aae=m.useCallback(W=>{if(Ka.current=null,Ba.current||W.button!==0)return;const Z=W.target;Z!=null&&Z.classList.contains("react-flow__pane")&&(Ka.current={shift:W.shiftKey||W.metaKey||W.ctrlKey,nodeIds:new Set(Do.current),edgeIds:new Set(la.current)})},[]),Eae=m.useCallback(W=>{if(!Ha.current.enableContextMenu||Do.current.size<2)return;const ie=W.target;ie!==Te.current&&(ie!=null&&ie.closest(".seeflow-connector-endpoint-dot")||(W.preventDefault(),W.stopPropagation(),Hn.current=null,ze(!0),Ye(null),Sn(null),K({x:W.clientX,y:W.clientY})))},[]),jae=m.useCallback(W=>{const Z=W.dataTransfer;if(!Z)return;const ie=Z.types?Array.from(Z.types):[],le=ie.includes("Files"),de=ie.includes(pG),je=le&&!!T&&qe.enableImageDrop,we=de&&!!O&&qe.enableDragDrop;if(!(!je&&!we)){W.preventDefault();try{Z.dropEffect="copy"}catch{}}},[T,O,qe.enableImageDrop,qe.enableDragDrop]),$ae=m.useCallback(W=>{const Z=W.dataTransfer;if((Z!=null&&Z.types?Array.from(Z.types):[]).includes(pG)&&O&&qe.enableDragDrop){W.preventDefault();const je=Lt.current;if(!je)return;const we=je.screenToFlowPosition({x:W.clientX,y:W.clientY});O({position:we});return}if(!T||!qe.enableImageDrop)return;const de={x:W.clientX,y:W.clientY};W.preventDefault(),JAe({dataTransfer:Z,clientPos:de,rfInstance:Lt.current,computeDims:eEe,dispatch:T})},[T,O,qe.enableImageDrop,qe.enableDragDrop]),hV=!!R,fV=Zt.size===1?[...Zt][0]:null,GR=m.useMemo(()=>{const W=Ee=>{const tt=HK(vo,Ee.source)==="running"||HK(vo,Ee.target)==="running",ct=Zt.has(Ee.id),ht=iHe(Ee,tt,ct);ct&&(ht.selected=!0);const Pe=hV&&Ee.id===fV,On=Pe?{...ht,reconnectable:!0}:ht;return{...On,data:{...On.data,onLabelChange:Tt?z:void 0,reconnectable:Pe,registerEditHandle:uu}}},Z=new Set(y.map(Ee=>Ee.id)),ie=y.map(Ee=>W(srt(Ee,lr==null?void 0:lr[Ee.id]))),le=[];if(lr)for(const[Ee,tt]of Object.entries(lr)){if(Z.has(Ee))continue;const ct=tt;typeof ct.source!="string"||typeof ct.target!="string"||le.push(W({...ct,id:Ee}))}const de=[...ie,...le],je=[],we=[];for(const Ee of de)Zt.has(Ee.id)?we.push(Ee):je.push(Ee);return[...je,...we]},[y,vo,Zt,fV,lr,z,hV,uu,Tt]);m.useEffect(()=>{Gf.current=GR},[GR]);const d2=oa??null,Pae=m.useMemo(()=>{if(d2!=null&&d2.computeLayout)return async()=>{const W=Lt.current,Z=l2.current;if(Z.length<2)return;const ie=Z.map(ft=>{var h2;const _e=(h2=W==null?void 0:W.getInternalNode(ft.id))==null?void 0:h2.measured,Yt=ft.data,xu=(_e==null?void 0:_e.width)??Yt.width??200,vr=(_e==null?void 0:_e.height)??Yt.height??120;return{id:ft.id,type:ft.type,width:xu,height:vr}}),le=new Map;for(const ft of Z)le.set(ft.id,ft.position);const de=Gf.current.map(ft=>({id:ft.id,source:ft.source,target:ft.target})),je=d2.computeLayout;if(!je)return;const we=await je(ie,de),Ee=new Map;for(const[ft,_e]of Object.entries(we.nodes))Ee.set(ft,_e.position);let tt=Number.POSITIVE_INFINITY,ct=Number.POSITIVE_INFINITY,ht=Number.POSITIVE_INFINITY,Pe=Number.POSITIVE_INFINITY;for(const ft of ie){const _e=le.get(ft.id);if(!_e)continue;_e.x<tt&&(tt=_e.x),_e.y<ct&&(ct=_e.y);const Yt=Ee.get(ft.id);Yt&&(Yt.x<ht&&(ht=Yt.x),Yt.y<Pe&&(Pe=Yt.y))}const On=Number.isFinite(tt)&&Number.isFinite(ht)?tt-ht:0,Ho=Number.isFinite(ct)&&Number.isFinite(Pe)?ct-Pe:0;BR(ft=>ft.map(_e=>{const Yt=Ee.get(_e.id);return Yt?{..._e,position:{x:Yt.x+On,y:Yt.y+Ho}}:_e}))}},[d2]),Kf=ue??(Tt?void 0:Pae),Xf=m.useRef(!1),pV=m.useRef(null),zae=m.useCallback(W=>{var Ee;if(!Tt||!I)return;const{source:Z,target:ie}=W;if(!Z||!ie||Z===ie)return;Xf.current=!0;const le=((Ee=pV.current)==null?void 0:Ee.nodeId)??null,de=le!==null&&le===ie&&le!==Z;I(de?ie:Z,de?Z:ie)},[I,Tt]),KR=m.useCallback(W=>{const Z=ie=>{if(!ie)return!1;const le=l2.current.find(de=>de.id===ie);return le?le.type==="text":!1};return!Z(W.source)&&!Z(W.target)},[]),Rae=m.useCallback((W,Z)=>{var ht;hr(!1),Va();const ie=Xf.current;if(Xf.current=!1,ie||Dn.current)return;if(Fa.current){Fa.current=!1;return}if(!I)return;const le=(ht=Z.fromNode)==null?void 0:ht.id,de=Z.fromHandle;if(!le||!de)return;const je=zK(W);if(!je)return;const we=MD(Cn.current,je.clientX,je.clientY);if(!we)return;const Ee=we.getAttribute("data-id");if(!Ee||Ee===le||!KR({source:le,target:Ee,sourceHandle:null,targetHandle:null}))return;let tt;const ct=Lt.current;if(ct){const Pe=ct.getInternalNode(Ee);if(Pe){const On=Pe.measured.width??Pe.width??0,Ho=Pe.measured.height??Pe.height??0;if(On>0&&Ho>0){const ft=ct.screenToFlowPosition({x:je.clientX,y:je.clientY});tt=VH({x:Pe.internals.positionAbsolute.x,y:Pe.internals.positionAbsolute.y,w:On,h:Ho},ft)}}}I(le,Ee,tt?{targetPin:tt}:void 0)},[I,Va,KR]),Zf=m.useRef(!1),Tae=m.useCallback((W,Z)=>{if(!R)return;const{source:ie,target:le,sourceHandle:de,targetHandle:je}=Z;if(!ie||!le||ie===le)return;const we={};if(ie!==W.source&&(we.source=ie),le!==W.target&&(we.target=le),typeof de=="string"&&de!==W.sourceHandle&&(we.sourceHandle=de),typeof je=="string"&&je!==W.targetHandle&&(we.targetHandle=je),we.source===void 0&&we.target===void 0&&we.sourceHandle===void 0&&we.targetHandle===void 0)return;(we.source!==void 0||we.sourceHandle!==void 0)&&(we.sourceHandleAutoPicked=!1),(we.target!==void 0||we.targetHandle!==void 0)&&(we.targetHandleAutoPicked=!1);const Ee=Lt.current;if(!(we.source===void 0&&we.target===void 0)&&Ee){const ct=we.source!==void 0?"source":"target",ht=RK(ct,W.source,W.target,W.data,Pe=>Ee.getInternalNode(Pe)??null);ht&&(ct==="source"?we.targetPin=ht:we.sourcePin=ht)}Zf.current=!0,R(W.id,we)},[R]),Dae=m.useCallback((W,Z,ie,le)=>{var xu;hr(!1),Va(),Dn.current=!1;const de=Zf.current;if(Zf.current=!1,de)return;if(qa.current){qa.current=!1;return}if(!R)return;const je=zK(W);let we=((xu=le.toNode)==null?void 0:xu.id)??null;if(!we&&je){const vr=MD(Cn.current,je.clientX,je.clientY);we=(vr==null?void 0:vr.getAttribute("data-id"))??null}const Ee=ie==="source"?"target":"source",tt=art(Ee,Z.source,Z.target,we);if(tt==="no-op"||tt==="self-loop"||!je)return;const ct=Lt.current;if(!ct)return;const ht=tt==="pin-own"?Ee==="source"?Z.source:Z.target:we,Pe=ct.getInternalNode(ht);if(!Pe)return;const On=Pe.measured.width??Pe.width??0,Ho=Pe.measured.height??Pe.height??0;if(On===0||Ho===0)return;const ft=ct.screenToFlowPosition({x:je.clientX,y:je.clientY}),_e=VH({x:Pe.internals.positionAbsolute.x,y:Pe.internals.positionAbsolute.y,w:On,h:Ho},ft);if(tt==="pin-own"){if(!he)return;he(Z.id,Ee,_e);return}const Yt=RK(Ee,Z.source,Z.target,Z.data,vr=>ct.getInternalNode(vr)??null);Ee==="source"?R(Z.id,{source:we,sourceHandle:null,sourceHandleAutoPicked:!1,sourcePin:_e,...Yt?{targetPin:Yt}:{}}):R(Z.id,{target:we,targetHandle:null,targetHandleAutoPicked:!1,targetPin:_e,...Yt?{sourcePin:Yt}:{}})},[R,Va,he]),cs=m.useMemo(()=>{var Ee;if(!pr||!yr)return null;const W=(Ee=Cn.current)==null?void 0:Ee.getBoundingClientRect(),Z=(W==null?void 0:W.left)??0,ie=(W==null?void 0:W.top)??0,le=Math.min(pr.x,yr.x),de=Math.min(pr.y,yr.y),je=Math.abs(yr.x-pr.x),we=Math.abs(yr.y-pr.y);return{left:le-Z,top:de-ie,width:je,height:we}},[pr,yr]),Xa=Nt?T2(ri).node:void 0,u2=Nt==="linkflow",Hae=Nt&&!u2?Ete(Nt):"",Oae=Nt&&!u2?jte(Nt,Xa):void 0,Fae=Nt==="text",[yV,mV]=m.useState(!1),[qae,Yf]=m.useState(!1),[Vae,gV]=m.useState(!1),[kV,Bae]=m.useState(()=>({canUndo:(rt==null?void 0:rt.canUndo)??!1,canRedo:(rt==null?void 0:rt.canRedo)??!1}));m.useEffect(()=>rt?rt.subscribe(Bae):void 0,[rt]);const[vV,xV]=m.useState(!1),Uae=rt?kV.canUndo:!1,Wae=rt?kV.canRedo:!1,Za=Uot({projectId:s,getReactFlow:()=>Lt.current});m.useImperativeHandle(t,()=>({exportPdf:Za.exportPdf,exportPng:Za.exportPng,openEmbedDialog:()=>gV(!0),capturePreview:Za.capturePreview}),[Za.exportPdf,Za.exportPng,Za.capturePreview]),m.useEffect(()=>{if(!qe.enableKeyboard)return;const W=le=>{if(!le)return!1;const de=le.tagName;return de==="INPUT"||de==="TEXTAREA"||de==="SELECT"?!0:le instanceof HTMLElement&&le.isContentEditable},Z=le=>{le.code==="Space"&&(W(document.activeElement)||(le.preventDefault(),mV(!0)))},ie=le=>{le.code==="Space"&&(mV(!1),Yf(!1))};return window.addEventListener("keydown",Z),window.addEventListener("keyup",ie),()=>{window.removeEventListener("keydown",Z),window.removeEventListener("keyup",ie)}},[qe.enableKeyboard]);const Qf=m.useCallback(W=>{if(W.length!==0){if(!Tt){const Z=s2.current;for(const ie of W)Z.set(ie.id,{x:ie.position.x,y:ie.position.y});return}if(W.length===1){const Z=W[0];Z&&w&&w(Z.id,{x:Z.position.x,y:Z.position.y});return}if(b){b(W.map(Z=>({id:Z.id,position:{x:Z.position.x,y:Z.position.y}})));return}if(w)for(const Z of W)w(Z.id,{x:Z.position.x,y:Z.position.y})}},[w,b,Tt]),wV=m.useCallback((W,Z,ie)=>{gr.current=!1,Qf(ie),ca()},[Qf,ca]),MV=m.useCallback(()=>{gr.current=!0},[]),bV=m.useCallback((W,Z)=>{gr.current=!1,Qf(Z),ca()},[Qf,ca]),Gae=m.useCallback((W,Z)=>{os.current&&yn(null);const ie=Cn.current;ie&&ie.style.setProperty("--rf-zoom",String(Z.zoom)),xt==null||xt(Z)},[xt]),Kae=m.useCallback(()=>{gr.current=!0,Qn==null||Qn()},[Qn]),Xae=m.useCallback((W,Z,ie)=>{wV(W,Z,ie),go==null||go()},[wV,go]),Zae=m.useCallback(()=>{MV(),Qn==null||Qn()},[MV,Qn]),Yae=m.useCallback((W,Z)=>{bV(W,Z),go==null||go()},[bV,go]),Qae=m.useCallback((W,Z)=>{var ie;(ie=Oa.current.get(Z.id))==null||ie()},[]),Jae=m.useCallback((W,Z)=>{Ie==null||Ie(Z.id)},[Ie]),eie=m.useCallback(W=>{pt==null||pt()},[pt]),tie=m.useCallback((W,Z)=>{zt==null||zt(Z.id)},[zt]),_V=Nt?"crosshair":ur||yV?qae?"grabbing":"grab":void 0,CV=g.length+k.length===1,SV=CV?g[0]:void 0,LV=CV?k[0]:void 0,nie=SV?p.find(W=>W.id===SV)??null:null;LV&&y.find(W=>W.id===LV);const oie=s??null,XR=qe.showDetailPanel&&!Vt,rie=XR,aie=m.useMemo(()=>({custom:eu??{}}),[eu]),iie=m.useMemo(()=>({studioBaseUrl:u}),[u]),Jf=oa==null?void 0:oa.icons;return m.useEffect(()=>{if(!Jf)return;let W=!1;return(async()=>{try{const Z=await Jf.listPacks();if(W)return;bH(Z)}catch{}})(),()=>{W=!0}},[Jf]),f.jsx(xFe,{value:aie,children:f.jsx(VAe,{value:iie,children:f.jsx("div",{"data-testid":"seeflow-canvas","data-mode":n,"data-canvas-mode":Re.kind,"data-can-undo":Uae?"true":"false","data-can-redo":Wae?"true":"false",ref:Cn,className:"seeflow-canvas-root sf:relative sf:flex sf:h-full sf:w-full",style:_V?{cursor:_V}:void 0,onPointerDownCapture:Aae,onPointerDown:W=>{yV&&Yf(!0),OR(W)},onPointerMove:FR,onPointerUp:W=>{Yf(!1),uV(W)},onPointerCancel:()=>{Ua.current=!1,as.current=null,mr.current=null,To(null),fu(null),Yf(!1)},onContextMenuCapture:Eae,onDragOver:jae,onDrop:$ae,children:f.jsxs(jBe,{containerRef:Cn,children:[f.jsxs("div",{className:"sf:relative sf:flex-1 sf:min-w-0 sf:h-full",children:[f.jsxs(_De,{nodes:vu,edges:GR,onNodesChange:Sae,nodeTypes:crt,edgeTypes:lrt,proOptions:urt,fitView:!0,minZoom:n==="mini"?.05:.5,nodesDraggable:(Tt?!!w:!0)&&!Nt&&!ur&&qe.enableNodeMove,nodesConnectable:Tt&&!!I&&!Nt&&!ur,deleteKeyCode:Tt?["Backspace","Delete"]:null,zoomOnScroll:qe.enableZoom,zoomOnPinch:qe.enableZoom,className:xo?"seeflow-connecting":void 0,onConnect:Tt?zae:void 0,isValidConnection:KR,onConnectStart:(W,Z)=>{hr(!0),Xf.current=!1,pV.current={nodeId:Z.nodeId??null,handleType:Z.handleType??null},hu(Z.nodeId??null)},onConnectEnd:Rae,onReconnect:Tt&&R?Tae:void 0,onReconnectStart:(W,Z,ie)=>{hr(!0),Zf.current=!1,Dn.current=!0;const le=ie==="source"?Z.source:Z.target;hu(le)},onReconnectEnd:Dae,connectionLineComponent:rs,connectionLineStyle:{strokeWidth:2},connectionRadius:32,reconnectRadius:10,edgesReconnectable:!1,elevateNodesOnSelect:!1,elementsSelectable:!Nt&&!ur&&qe.enableSelection,selectNodesOnDrag:!1,nodeClickDistance:5,selectionOnDrag:!Nt&&!ur&&qe.enableSelection,panOnDrag:Nt?!1:ur?[0,1,2]:qe.enablePan?[1,2]:!1,selectionMode:N0.Partial,selectionKeyCode:null,multiSelectionKeyCode:Nt?null:["Meta","Shift"],panActivationKeyCode:Nt?null:"Space",onSelectionStart:Nae,onSelectionEnd:Iae,defaultEdgeOptions:drt,zoomOnDoubleClick:!1,onInit:W=>{Lt.current=W;const Z=Cn.current;Z&&Z.style.setProperty("--rf-zoom",String(W.getZoom())),Z&&Z.setAttribute("data-canvas-ready","true"),!aa.current&&ko.onMount&&p.length>0&&(W.fitView(A2),aa.current=!0),Ze==null||Ze(W)},onMove:Gae,onEdgesChange:Lae,onNodeDragStart:Kae,onNodeDragStop:Xae,onSelectionDragStart:Zae,onSelectionDragStop:Yae,onNodeClick:Jae,onEdgeClick:tie,onEdgeDoubleClick:Qae,onPaneClick:eie,onNodeContextMenu:qe.enableContextMenu&&F?(W,Z)=>{W.preventDefault(),Hn.current=Z.id,ze(!0),Ye(Z.type??null),Sn(null),K({x:W.clientX,y:W.clientY})}:void 0,onPaneContextMenu:qe.enableContextMenu&&$?W=>{W.preventDefault(),Hn.current=null,ze(!1),Ye(null),Sn(null),K({x:W.clientX,y:W.clientY})}:void 0,children:[f.jsx(prt,{storeApiRef:du}),f.jsx(yrt,{wrapperRef:Cn}),f.jsx(jDe,{gap:12,size:.6}),tu?f.jsx(AJ,{children:f.jsx("div",{"data-testid":"presence-layer",style:{pointerEvents:"none",position:"absolute",inset:0},children:tu})}):null,n!=="mini"&&f.jsx(Xot,{}),qe.showControls?f.jsxs(HDe,{showInteractive:!1,showFitView:!1,children:[f.jsx(Yu,{"data-testid":"controls-fit-view","aria-label":"Fit view",title:"Fit view",disabled:p.length===0,onClick:()=>{var W;(W=Lt.current)==null||W.fitView(A2)},children:f.jsx(Md,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})}),f.jsx(Yu,{"data-testid":"controls-tidy","aria-label":"Tidy layout (⌘⇧L)",title:"Tidy layout (⌘⇧L)",disabled:!Kf,onClick:()=>Kf==null?void 0:Kf(),children:f.jsx(ch,{className:"sf:h-3 sf:w-3","aria-hidden":"true"})})]}):null,qe.showMiniMap?f.jsx(QDe,{className:"sf-canvas-minimap"}):null,qe.showResizeHandles?f.jsx(Ont,{selectedNodes:gu,onMultiResize:P}):null,a||qe.showToolbar||qe.showStyleStrip&&te&&xe?f.jsx($0,{position:"top-left",children:f.jsxs("div",{className:"sf:flex sf:flex-col sf:items-start sf:gap-2",children:[a,qe.showToolbar?f.jsx(nXe,{mode:Re,onModeChange:We,iconPickerOpen:J??!1,onOpenIconPicker:Rt,onCloseIconPicker:fn,onPickIcon:ae,showShapeTools:Tt&&!!U,iconsAdapter:Jf}):null,qe.showStyleStrip&&te&&xe?f.jsx(Vnt,{nodes:c2,connectors:re??[],onStyleNode:te,onStyleNodePreview:ce,onStyleNodes:ke,onStyleNodesPreview:ve,onStyleConnector:xe,onStyleConnectorPreview:He,onRequestIconReplace:Y}):null]})}):null,qe.showShareMenu||i||XR?f.jsx($0,{position:"top-right",children:f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-1",children:[i,XR?f.jsx(Qot,{open:vV,onToggle:()=>xV(W=>!W)}):null,qe.showShareMenu?f.jsx(Zre,{mode:n==="mini"?"view":n,projectId:s,enableEmbed:qe.enableEmbed,onDownloadPdf:Za.exportPdf,onDownloadPng:Za.exportPng,onExportToCloud:i2,embedOpen:Vae,onEmbedOpenChange:gV}):null]})}):null]}),cs?f.jsxs("div",{"data-testid":"canvas-draw-ghost","data-ghost-shape":Nt??void 0,"aria-hidden":!0,className:ne("sf:pointer-events-none sf:absolute sf:z-10",Hae,Fae?"sf:rounded-sm sf:border sf:border-dashed sf:border-muted-foreground/40":"",u2?"sf:flex sf:items-center sf:justify-center sf:rounded-md sf:border sf:border-dashed sf:border-border sf:bg-muted/40 sf:text-muted-foreground sf:text-sm":""),style:{...Oae,left:cs.left,top:cs.top,width:cs.width,height:cs.height},children:[u2?f.jsxs("span",{className:"sf:inline-flex sf:items-center sf:gap-2",children:[f.jsx(Ii,{size:14,"aria-hidden":!0}),f.jsx("span",{children:"Link to a flow"})]}):null,(()=>{if(u2)return null;const W=Nt?Mq[Nt]:void 0;if(!W)return null;const Z=$te(Xa);return f.jsx(W,{width:cs.width,height:cs.height,borderColor:Z.borderColor,backgroundColor:Z.backgroundColor,borderSize:(Xa==null?void 0:Xa.borderSize)??ZF,borderStyle:Xa==null?void 0:Xa.borderStyle})})()]}):null,qe.enableContextMenu&&F?f.jsxs(UGe,{onOpenChange:W=>{W||(K(null),Hn.current=null,Ye(null),Sn(null))},children:[f.jsx(WGe,{asChild:!0,children:f.jsx("div",{ref:Te,"data-testid":"node-context-menu-trigger","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(B==null?void 0:B.x)??0,top:(B==null?void 0:B.y)??0,width:0,height:0}})}),f.jsxs(Gne,{"data-testid":"node-context-menu",children:[Et!=null&&Et.pinned&&Ae?f.jsx(Ar,{"data-testid":"connector-endpoint-context-menu-unpin",onSelect:qR,children:"Unpin"}):null,ee&&H?f.jsxs(Ar,{"data-testid":"node-context-menu-copy",onSelect:yu,children:["Copy",f.jsx(hO,{children:Ge})]}):null,$?f.jsxs(Ar,{"data-testid":"node-context-menu-paste",disabled:!X,onSelect:VR,children:["Paste",f.jsx(hO,{children:rn})]}):null,ee&&(H||$)&&(dt==="icon"&&Y||L||q)?f.jsx(fP,{}):null,ee&&dt==="icon"&&Y?f.jsx(Ar,{"data-testid":"node-context-menu-change-icon",onSelect:mu,children:"Change icon"}):null,ee&&dt==="icon"&&Y&&(L||q)?f.jsx(fP,{}):null,ee&&L?f.jsxs(f.Fragment,{children:[f.jsx(Ar,{"data-testid":"node-context-menu-to-front",onSelect:()=>on({op:"toFront"}),children:"Bring to front"}),f.jsx(Ar,{"data-testid":"node-context-menu-forward",onSelect:()=>on({op:"forward"}),children:"Bring forward"}),f.jsx(Ar,{"data-testid":"node-context-menu-backward",onSelect:()=>on({op:"backward"}),children:"Send backward"}),f.jsx(Ar,{"data-testid":"node-context-menu-to-back",onSelect:()=>on({op:"toBack"}),children:"Send to back"})]}):null,ee&&L&&q?f.jsx(fP,{}):null,ee&&q?f.jsx(Ar,{"data-testid":"node-context-menu-delete",onSelect:pu,children:"Delete"}):null]})]}):null,tn?f.jsxs(Wd,{open:!!Bt,onOpenChange:W=>{W||yn(null)},children:[f.jsx($Be,{asChild:!0,children:f.jsx("div",{"data-testid":"drop-popover-anchor","aria-hidden":!0,className:"sf:pointer-events-none sf:fixed",style:{left:(Bt==null?void 0:Bt.clientX)??0,top:(Bt==null?void 0:Bt.clientY)??0,width:0,height:0}})}),f.jsx(Gi,{"data-testid":"drop-popover",align:"start",side:"bottom",sideOffset:4,className:"sf:w-auto sf:p-1",onOpenAutoFocus:W=>{W.preventDefault()},children:f.jsx("div",{role:"menu","aria-label":"Create connected node",className:"sf:flex sf:flex-col sf:gap-0.5",children:tXe.map(({shape:W,label:Z,Icon:ie})=>W==="linkflow"?null:f.jsxs("button",{type:"button",role:"menuitem","data-testid":`drop-popover-shape-${W}`,onClick:()=>{const le=Bt;le&&(tn({sourceNodeId:le.sourceNodeId,position:{x:le.flowX,y:le.flowY},shape:W}),yn(null))},className:ne("sf:flex sf:items-center sf:gap-2 sf:rounded-sm sf:px-2 sf:py-1.5 sf:text-left sf:text-sm","sf:hover:bg-accent sf:hover:text-accent-foreground","sf:focus:bg-accent sf:focus:text-accent-foreground sf:focus:outline-hidden"),children:[f.jsx(ie,{className:"sf:h-4 sf:w-4 sf:text-muted-foreground","aria-hidden":"true"}),f.jsx("span",{children:Z})]},W))})})]}):null]}),rie?f.jsx(Jtt,{flowId:oie,node:nie,connector:null,adapter:oa??null,statusReport:pn,onNameChange:nn,onDescriptionChange:ge,onDetailChange:Le,onIconChange:At,open:vV,onClose:()=>{var W;xV(!1),(W=kr.current)==null||W.call(kr,[],[])}}):null]})})})})}const wrt=m.forwardRef(xrt);/**
8545
8545
  * @license lucide-react v0.453.0 - ISC
8546
8546
  *
8547
8547
  * This source code is licensed under the ISC license.
@@ -8641,4 +8641,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
8641
8641
  *
8642
8642
  * This source code is licensed under the ISC license.
8643
8643
  * See the LICENSE file in the root directory of this source tree.
8644
- */const Prt=bn("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]),OK="seeflow.export.email",FK="seeflow.export.name",qK="seeflow.export.visibility";function zrt({open:e,onOpenChange:t,project:n,flowName:o,onCapturePreview:r}){const[a,i]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState("public"),[u,p]=m.useState({kind:"idle"}),[y,g]=m.useState(!1),[k,x]=m.useState(new Set),v=lle(n),M=IF(e?n:null),w=M.flows;m.useEffect(()=>{e&&(i(localStorage.getItem(OK)??""),c(o??localStorage.getItem(FK)??""),h(localStorage.getItem(qK)??"public"),p({kind:"idle"}),g(!1))},[e,o]),m.useEffect(()=>{e&&w&&x(new Set(w.map(A=>A.flowSlug)))},[e,w]);const b=m.useCallback(async()=>{p({kind:"loading"});try{const A=await(r==null?void 0:r()),{shareUrl:T}=await v(a.trim(),s.trim(),l,A,Array.from(k));localStorage.setItem(OK,a.trim()),localStorage.setItem(FK,s.trim()),localStorage.setItem(qK,l),p({kind:"done",shareUrl:T})}catch(A){p({kind:"error",message:A instanceof Error?A.message:String(A)})}},[v,a,s,l,r,k]),C=m.useCallback(A=>{x(T=>{const D=new Set(T);return D.has(A)?D.delete(A):D.add(A),D})},[]),_=m.useCallback(()=>{w&&x(A=>A.size===w.length?new Set:new Set(w.map(T=>T.flowSlug)))},[w]),S=m.useCallback(async()=>{if(u.kind==="done")try{await navigator.clipboard.writeText(u.shareUrl),g(!0),setTimeout(()=>g(!1),2e3)}catch(A){console.error("Failed to copy to clipboard:",A)}},[u]),E=u.kind==="loading",P=a.trim().length>0&&s.trim().length>0&&w!==null&&M.error===null&&k.size>0,N=((w==null?void 0:w.length)??0)>=2,j=M.loading,z=M.error!==null,U=w!==null&&k.size===w.length;return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"export-dialog",onOpenAutoFocus:A=>{A.preventDefault();const T=document.querySelector('[data-testid="export-email-input"]');T==null||T.focus()},children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Export project to seeflow.dev"}),f.jsx(Po,{children:"Upload this project to the cloud and get a shareable link."})]}),u.kind!=="done"?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Email"}),f.jsx("input",{type:"email",required:!0,autoComplete:"email",value:a,onChange:A=>i(A.target.value),disabled:E,"data-testid":"export-email-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"We'll use this to let you manage your flows in the future."})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow Name"}),f.jsx("input",{type:"text",required:!0,value:s,onChange:A=>c(A.target.value),disabled:E,"data-testid":"export-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Visibility"}),f.jsxs("select",{value:l,onChange:A=>h(A.target.value),disabled:E,"data-testid":"export-visibility-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[f.jsx("option",{value:"public",children:"Public — anyone can discover it"}),f.jsx("option",{value:"link",children:"Anyone with the link"})]})]}),j?f.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground","data-testid":"export-flows-loading",children:[f.jsx(Qu,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),f.jsx("span",{children:"Loading flows…"})]}):null,z?f.jsxs("div",{role:"alert","data-testid":"export-flows-error",className:"flex items-center justify-between gap-3 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[f.jsx("span",{children:"Couldn't load flows."}),f.jsx("button",{type:"button",onClick:()=>M.refresh(),disabled:E,"data-testid":"export-flows-retry",className:"shrink-0 font-medium underline-offset-2 hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:"Retry"})]}):null,N&&w?f.jsxs("div",{className:"flex flex-col gap-1.5 text-sm","data-testid":"export-flows-section",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-medium",children:"Flows"}),f.jsx("button",{type:"button",onClick:_,disabled:E,"data-testid":"export-flows-toggle-all",className:"text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:U?"Clear":"Select all"})]}),f.jsx("ul",{className:"flex max-h-48 flex-col gap-1 overflow-y-auto rounded-md border bg-background p-2",children:w.map(A=>f.jsx("li",{children:f.jsxs("label",{className:"flex items-center gap-2 rounded px-2 py-1 hover:bg-muted",children:[f.jsx("input",{type:"checkbox",checked:k.has(A.flowSlug),onChange:()=>C(A.flowSlug),disabled:E,"data-testid":`export-flow-checkbox-${A.flowSlug}`}),f.jsx("span",{className:"flex-1 truncate",children:A.name}),A.isDefault?f.jsx(Ert,{className:"h-3.5 w-3.5 text-muted-foreground","aria-label":"default flow","data-testid":`export-flow-default-${A.flowSlug}`}):null]})},A.flowSlug))})]}):null,u.kind==="error"?f.jsx("div",{role:"alert","data-testid":"export-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:u.message}):null]}),f.jsx(ar,{children:u.kind==="error"?f.jsxs(f.Fragment,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"export-cancel",children:"Cancel"}),f.jsx(Ke,{type:"button",onClick:()=>p({kind:"idle"}),"data-testid":"export-retry",children:"Try again"})]}):f.jsxs(f.Fragment,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:E,"data-testid":"export-cancel",children:"Cancel"}),f.jsx(Ke,{type:"button",onClick:b,disabled:E||!P,"data-testid":"export-submit",children:E?f.jsxs(f.Fragment,{children:[f.jsx(Qu,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),f.jsx("span",{children:"Uploading…"})]}):"Export"})]})})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("p",{className:"text-sm text-muted-foreground",children:"Your diagram is live. Share this link:"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",readOnly:!0,value:u.shareUrl,"data-testid":"export-share-url",className:"min-w-0 flex-1 rounded-md border bg-muted px-3 py-2 text-sm outline-hidden"}),f.jsx(Ke,{type:"button",variant:"outline",size:"icon",onClick:S,"aria-label":"Copy link","data-testid":"export-copy",children:y?f.jsx(sV,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(cV,{className:"h-4 w-4","aria-hidden":"true"})}),f.jsx(Ke,{type:"button",variant:"outline",size:"icon",onClick:()=>window.open(u.shareUrl,"_blank"),"aria-label":"View in new tab","data-testid":"export-view",children:f.jsx(Nrt,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsx(ar,{children:f.jsx(Ke,{type:"button",onClick:()=>t(!1),"data-testid":"export-done",children:"Done"})})]})]})})}function Rrt({open:e,onOpenChange:t,onCreated:n}){const[o,r]=m.useState(""),[a,i]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState(null),[u,p]=m.useState(!1);m.useEffect(()=>{e&&(r(""),i(""),c(""),h(null),p(!1))},[e]);const y=o.trim(),g=a.trim(),k=s.trim(),x=g.length>0&&!u,v=async M=>{if(M.preventDefault(),!!x){p(!0),h(null);try{const w=await kle({name:g,...y.length>0?{path:y}:{},...k.length>0?{description:k}:{}});n(w),t(!1)}catch(w){h(w instanceof Error?w.message:String(w)),p(!1)}}};return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"create-project-dialog",onOpenAutoFocus:M=>{M.preventDefault();const w=document.querySelector('[data-testid="create-project-name-input"]');w==null||w.focus()},children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Create new project"}),f.jsx(Po,{children:"Scaffold a new SeeFlow project. It's created in ~/.seeflow/projects/ unless you give a path."})]}),f.jsxs("form",{onSubmit:v,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Project name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:a,onChange:M=>i(M.target.value),"data-testid":"create-project-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsxs("span",{className:"font-medium",children:["Project path ",f.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),f.jsx("input",{type:"text",autoComplete:"off",spellCheck:!1,placeholder:"/absolute/path/to/my-project",value:o,onChange:M=>r(M.target.value),"data-testid":"create-project-path-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Leave blank to create it in ~/.seeflow/projects/"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsxs("span",{className:"font-medium",children:["Description ",f.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),f.jsx("textarea",{rows:3,autoComplete:"off",spellCheck:!1,value:s,onChange:M=>c(M.target.value),"data-testid":"create-project-description-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),l?f.jsx("div",{role:"alert","data-testid":"create-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:l}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:u,children:"Cancel"}),f.jsx(Ke,{type:"submit",disabled:!x,"data-testid":"create-project-submit",children:u?"Creating…":"Create project"})]})]})]})})}const VK="seeflow:navigate",Trt=e=>(window.addEventListener("popstate",e),window.addEventListener(VK,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(VK,e)}),BK=()=>window.location.pathname,Drt=()=>m.useSyncExternalStore(Trt,BK,BK),uae=(e,t)=>`/projects/${encodeURIComponent(e)}/flows/${encodeURIComponent(t)}`,hae=e=>{const t=e.split("/").filter(Boolean);if(t.length!==4||t[0]!=="projects"||t[2]!=="flows")return null;const n=decodeURIComponent(t[1]??""),o=decodeURIComponent(t[3]??"");return!n||!o?null:{project:n,flow:o}},fae=e=>{const t=e.indexOf("/");return t<=0||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},Hrt=e=>{const t=e.split("/").filter(Boolean);if(t.length!==2||t[0]!=="projects")return null;const n=decodeURIComponent(t[1]??"");return n?{project:n}:null},Ort="seeflow:navigate",EO="seeflow:flow-stack",lV=e=>({project:e.project,flow:e.flow,slug:`${e.project}/${e.flow}`}),Frt=e=>{const t=hae(e);return t?[lV(t)]:[]},qrt=(e,t)=>[...e,lV(t)],Vrt=e=>e?[lV(e)]:[],Brt=(e,t,n)=>{if(typeof t=="number"&&t>=0&&t<=e.length){const o=e.slice(0,t),r=o.at(-1);if(n){if(r&&r.project===n.project&&r.flow===n.flow)return o}else if(o.length===0)return o}return null};let Hr=[],UK=!1;const dV=()=>{typeof window>"u"||window.dispatchEvent(new Event(EO))},Urt=e=>(window.addEventListener(EO,e),()=>window.removeEventListener(EO,e)),WK=()=>Hr,pae=()=>m.useSyncExternalStore(Urt,WK,WK),yae=(e,t)=>{window.history.pushState({stackDepth:e},"",t),window.dispatchEvent(new Event(Ort))},Wrt=(e,t)=>{const n=window.history.state??null;window.history.replaceState({...n??{},stackDepth:e},"",t)},Grt=e=>{const t=qrt(Hr,e);yae(t.length,uae(e.project,e.flow)),Hr=t,dV()},Krt=()=>{window.history.back()},So=e=>{const t=Vrt(e),n=e?uae(e.project,e.flow):"/";window.location.pathname===n?Wrt(t.length,n):yae(t.length,n),Hr!==t&&(Hr=t,dV())},Xrt=()=>{if(UK)return;Hr=Frt(window.location.pathname);const e=window.history.state??null;typeof(e==null?void 0:e.stackDepth)!="number"&&window.history.replaceState({...e??{},stackDepth:Hr.length},"",window.location.pathname+window.location.search+window.location.hash),window.addEventListener("popstate",()=>{const t=window.history.state??null,n=hae(window.location.pathname),o=Brt(Hr,t==null?void 0:t.stackDepth,n);if(o!==null){Hr!==o&&(Hr=o,dV());return}So(n)}),UK=!0},Zrt="seeflow:last-flow:",mae=e=>`${Zrt}${e}`,gae=e=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(mae(e))}catch{return null}},Yrt=(e,t)=>{if(!(typeof window>"u"))try{window.localStorage.setItem(mae(e),t)}catch{}},Qrt=(e,t)=>{var o;if(e.length===0)return null;if(t){const r=e.find(a=>a.flowSlug===t);if(r)return r.flowSlug}const n=e.find(r=>r.isDefault);return n?n.flowSlug:((o=e[0])==null?void 0:o.flowSlug)??null};function Jrt({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}){const[r,a]=m.useState(!1),[i,s]=m.useState(!1),[c,l]=m.useState(null),[h,u]=m.useState(!1),[p,y]=m.useState(null),[g,k]=m.useState(!1);m.useEffect(()=>{const S=E=>{E.key==="k"&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),a(P=>!P))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[]);const x=e.find(S=>S.projectSlug===t),v=S=>{const P=gae(S.projectSlug)??S.defaultFlow;So({project:S.projectSlug,flow:P})},M=S=>{n==null||n(S)},w=S=>{l(S),y(null),k(!1)},b=()=>{h||(l(null),y(null),k(!1))},C=async()=>{if(c){u(!0),y(null);try{await(o==null?void 0:o(c.projectSlug,{deleteSource:g})),l(null),k(!1)}catch(S){y(S instanceof Error?S.message:String(S))}finally{u(!1)}}},_=(c==null?void 0:c.flowCount)??0;return f.jsxs(f.Fragment,{children:[f.jsxs(Wd,{open:r,onOpenChange:a,children:[f.jsx(n2,{asChild:!0,children:f.jsxs(Ke,{type:"button",variant:"outline",size:"sm","aria-label":"Switch project","aria-expanded":r,className:"gap-2","data-testid":"project-switcher-trigger",children:[f.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(x==null?void 0:x.name)??"Select project"}),f.jsx(Bte,{children:"⌘K"}),f.jsx(cae,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsxs(Gi,{align:"end",sideOffset:6,className:"relative w-[320px] p-0","data-testid":"project-switcher-popover",children:[f.jsxs(Cq,{children:[f.jsx(qte,{placeholder:"Search projects..."}),f.jsxs(Sq,{className:"pb-12",children:[f.jsx(Lq,{children:"No projects."}),e.length>0?f.jsx(mz,{heading:"Projects",children:e.map(S=>f.jsxs(gz,{value:`${S.name} ${S.projectSlug}`,onSelect:()=>{a(!1),v(S)},"data-testid":`project-switcher-row-${S.projectSlug}`,className:"group flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsx("span",{className:"font-medium",children:S.name}),S.repoPath?f.jsx("span",{className:"w-full truncate text-xs text-muted-foreground",children:S.repoPath}):null]}),f.jsx("button",{type:"button","aria-label":`Unregister ${S.name}`,"data-testid":`project-switcher-unregister-${S.projectSlug}`,className:"shrink-0 rounded p-0.5 opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:E=>{E.stopPropagation(),a(!1),w(S)},children:f.jsx(dae,{className:"h-3.5 w-3.5"})})]},S.projectSlug))}):null]})]}),f.jsx("button",{type:"button","aria-label":"Create new project",title:"Create new project","data-testid":"project-switcher-create",onClick:()=>{a(!1),s(!0)},className:"absolute right-2 bottom-2 inline-flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-md transition-colors hover:bg-emerald-400 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:f.jsx(lae,{className:"h-4 w-4"})})]})]}),f.jsx(Rrt,{open:i,onOpenChange:s,onCreated:M}),f.jsx(fo,{open:c!==null,onOpenChange:S=>{S||b()},children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"unregister-project-dialog",children:[f.jsxs(jo,{children:[f.jsx($o,{children:g?"Delete project?":"Unregister project?"}),f.jsxs(Po,{children:["This removes ",f.jsx("strong",{children:c==null?void 0:c.name})," from SeeFlow."," ",f.jsxs("strong",{children:["All ",_," ",_===1?"flow":"flows"]})," ","under this project will be unregistered."]})]}),c!=null&&c.repoPath?f.jsxs("label",{className:"flex items-start gap-2 rounded-md border border-border px-3 py-2 text-sm",children:[f.jsx("input",{type:"checkbox",checked:g,onChange:S=>k(S.target.checked),disabled:h,"data-testid":"unregister-project-delete-source",className:"mt-0.5 h-4 w-4 cursor-pointer accent-destructive"}),f.jsxs("span",{className:"flex-1",children:[f.jsx("span",{className:"font-medium",children:"Also delete files from disk"}),f.jsxs("span",{className:"mt-1 block text-xs text-muted-foreground",children:["Permanently removes"," ",f.jsx("code",{className:"break-all text-xs",children:c.repoPath})," and everything inside it. This cannot be undone."]})]})]}):null,p?f.jsx("div",{role:"alert","data-testid":"unregister-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:p}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:b,disabled:h,children:"Cancel"}),f.jsx(Ke,{type:"button",variant:"destructive",onClick:C,disabled:h,"data-testid":"unregister-project-confirm",children:h?g?"Deleting…":"Unregistering…":g?"Delete project":"Unregister"})]})]})})]})}const kae="seeflow:theme",GK="(prefers-color-scheme: dark)";function eat(e){return e==="light"||e==="dark"||e==="system"}function tat(e){try{const t=e.getItem(kae);return eat(t)?t:"system"}catch{return"system"}}function nat(e){try{const t=new URLSearchParams(e);if(!t.has("theme"))return null;const n=t.get("theme");return n==="light"||n==="dark"?n:"light"}catch{return null}}function oat(e,t){try{e.setItem(kae,t)}catch{}}function rat(e,t){return e==="system"?t?"dark":"light":e}function aat(e,t){t==="dark"?(e.classList.add("dark"),e.classList.remove("light")):(e.classList.add("light"),e.classList.remove("dark"))}function iat(e,t){var o;const n=r=>t(r.matches);return e.addEventListener?(e.addEventListener("change",n),()=>{var r;return(r=e.removeEventListener)==null?void 0:r.call(e,"change",n)}):((o=e.addListener)==null||o.call(e,n),()=>{var r;return(r=e.removeListener)==null?void 0:r.call(e,n)})}function sat(){const[e,t]=m.useState(()=>{if(typeof window>"u")return"system";const i=nat(window.location.search);return i||tat(window.localStorage)}),[n,o]=m.useState(()=>typeof window>"u"?!1:window.matchMedia(GK).matches);m.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(GK);return iat(i,o)},[]);const r=rat(e,n);m.useEffect(()=>{typeof document>"u"||aat(document.documentElement,r)},[r]);const a=m.useCallback(i=>{typeof window<"u"&&oat(window.localStorage,i),t(i)},[]);return{theme:e,setTheme:a,resolvedTheme:r}}const cat=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];function lat({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o,share:r,onBack:a,previousFlowName:i}){const{theme:s,setTheme:c}=sat(),l=i!==void 0;return f.jsxs("header",{className:"relative flex h-14 shrink-0 items-center justify-between bg-background/85 px-5 backdrop-blur-md shadow-[0_1px_3px_-1px_rgba(15,23,42,0.06),0_2px_8px_-4px_rgba(15,23,42,0.05)] dark:shadow-[0_4px_12px_-6px_rgba(0,0,0,0.6)]",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[l?f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx("button",{type:"button",onClick:a,"aria-label":"Back to previous flow","data-testid":"flow-back-button",className:"flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",children:f.jsx(Crt,{size:16,strokeWidth:2.25})})}),f.jsxs(Gr,{side:"bottom",children:["Back to ",i]})]}):null,f.jsxs("button",{type:"button",onClick:()=>So(null),className:"-ml-1.5 flex items-center gap-2 rounded-md px-1.5 py-1 text-base font-bold tracking-tight transition-colors hover:bg-muted/60",children:[f.jsx(Prt,{size:18,strokeWidth:2.25,className:"text-emerald-400"}),"SeeFlow",f.jsxs("span",{className:"ml-1 text-[10px] font-normal tracking-normal text-muted-foreground/70",children:["v","0.1.104"]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Jrt,{projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}),r?f.jsx(Zre,{mode:"edit",enableEmbed:!1,onDownloadPdf:r.onDownloadPdf,onDownloadPng:r.onDownloadPng,onExportToCloud:r.onExportToCloud,onLiveShare:r.onLiveShare}):null,f.jsxs(hoe,{children:[f.jsx(foe,{asChild:!0,children:f.jsx(Ke,{type:"button",variant:"outline",size:"icon","aria-label":"Settings","data-testid":"settings-trigger",children:f.jsx(Art,{className:"h-4 w-4"})})}),f.jsxs(Rq,{align:"end",sideOffset:6,className:"w-44","data-testid":"settings-menu",children:[f.jsx(poe,{children:"Theme"}),f.jsx(gKe,{value:s,onValueChange:h=>c(h),children:cat.map(h=>f.jsx(yoe,{value:h.value,"data-testid":`theme-${h.value}`,children:h.label},h.value))})]})]})]})]})}const dat=200,uat=5e3;function hat(e){const[t,n]=m.useState([]),[o,r]=m.useState(!1),a=m.useCallback(async()=>{r(!0);try{const i=await fetch(`/api/share/audit?limit=${dat}`);if(!i.ok)return;const s=await i.json();s&&Array.isArray(s.entries)&&n(s.entries)}catch{}finally{r(!1)}},[]);return m.useEffect(()=>{if(!e)return;let i=!1;const s=()=>{i||a()};s();const c=setInterval(s,uat);return()=>{i=!0,clearInterval(c)}},[e,a]),{entries:t,refresh:a,loading:o}}const vae=3e3;async function fat(){const e=await fetch("/api/share/start",{method:"POST"});if(!e.ok)throw new Error(`share/start failed: ${e.status}`)}async function pat(){const e=await fetch("/api/share/stop",{method:"POST"});if(!e.ok&&e.status!==204)throw new Error(`share/stop failed: ${e.status}`)}async function yat(e){const t=await fetch("/api/share/kick",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({peerId:e.peerId})});if(!t.ok&&t.status!==204)throw new Error(`kick failed: ${t.status}`)}async function mat(){const e=await fetch("/api/share/kill-all",{method:"POST"});if(!e.ok)throw new Error(`kill-all failed: ${e.status}`);const t=await e.json();return{revoked:typeof t.revoked=="number"?t.revoked:0,failed:typeof t.failed=="number"?t.failed:0}}function gat(e){const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0");return`${n}:${o}:${r}`}const kat=new Set(["host-start","host-stop","rotate","kill-switch"]);function vat(e){switch(e.kind){case"peer-join":return"joined";case"peer-leave":return"left";case"kick":return"kicked";case"rotate":return"rotated URL";case"kill-switch":return"kill switch";case"host-start":return"host started";case"host-stop":return"host stopped";case"rpc-reject":return`rejected${e.op?` ${e.op}`:""}`;case"rpc-accept":{const t=e.op??"",n=e.details&&typeof e.details.nodeId=="string"?e.details.nodeId:null;return t==="node-move"&&n?`moved Node ${n}`:t==="node-patch"&&n?`edited Node ${n}`:t==="add-node"&&n?`added Node ${n}`:t==="remove-node"&&n?`removed Node ${n}`:t||"updated"}default:return e.kind}}function xat({open:e,onOpenChange:t,peers:n,hostDisplayName:o,recentSessionCount:r=0,status:a="idle",shareUrl:i,onStart:s,onStop:c,auditApi:l,onKick:h,onKillAll:u,onKillAllSuccess:p}){const y=hat(l?!1:e),g=l??y,[k,x]=m.useState(!1),[v,M]=m.useState(null),[w,b]=m.useState([]),[C,_]=m.useState(!1),[S,E]=m.useState(!1),[P,N]=m.useState(null),[j,z]=m.useState(null),[U,A]=m.useState(!1),[T,D]=m.useState(!1),O=m.useCallback(G=>{b(Q=>Q.filter(oe=>oe.id!==G))},[]),I=m.useCallback(async()=>{if(!U){z(null),A(!0);try{await(s??fat)()}catch(G){z(G instanceof Error?G.message:"Failed to start sharing")}finally{A(!1)}}},[s,U]),R=m.useCallback(async()=>{if(!U){A(!0);try{await(c??pat)()}catch(G){z(G instanceof Error?G.message:"Failed to stop sharing")}finally{A(!1)}}},[c,U]),L=m.useCallback(async()=>{if(i)try{await navigator.clipboard.writeText(i),D(!0),setTimeout(()=>D(!1),1500)}catch{}},[i]),q=m.useCallback(async G=>{M(G.peerId);try{await(h??yat)(G);const Q=Date.now();b(oe=>[...oe,{id:Q,displayName:G.displayName}]),setTimeout(()=>O(Q),vae)}catch{}finally{M(null)}},[h,O]),H=m.useCallback(async()=>{E(!0),N(null);try{const G=await(u??mat)();_(!1),t(!1),p==null||p(G.revoked)}catch(G){const Q=G instanceof Error?G.message:"Kill-all failed";N(Q)}finally{E(!1)}},[u,p,t]),$=r===0||S,X=[...g.entries].reverse();return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sf:sm:max-w-lg","data-testid":"live-share-dialog",children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Live share"}),f.jsx(Po,{children:o?`Hosting as ${o}. Peers joined via the share link.`:"Peers joined via the share link."})]}),a==="active"&&i?f.jsxs("div",{"data-testid":"live-share-url-row",className:"sf:flex sf:flex-col sf:gap-2 sf:rounded-md sf:border sf:border-border sf:bg-muted/40 sf:p-3",children:[f.jsx("div",{className:"sf:text-xs sf:font-medium sf:uppercase sf:tracking-[0.18em] sf:text-muted-foreground",children:"Share link"}),f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-2",children:[f.jsx("input",{type:"text",value:i,readOnly:!0,onFocus:G=>G.currentTarget.select(),"data-testid":"live-share-url-input",className:"sf:flex-1 sf:rounded-md sf:border sf:border-border sf:bg-background sf:px-2 sf:py-1.5 sf:font-mono sf:text-xs"}),f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx(Ke,{type:"button",variant:"outline",size:"icon",onClick:L,"aria-label":"Copy share link","data-testid":"live-share-copy-button",children:T?f.jsx(sV,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}):f.jsx(cV,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsx(Gr,{children:T?"Copied!":"Copy link"})]}),f.jsxs(Ke,{type:"button",variant:"outline",size:"sm",disabled:U,onClick:R,"data-testid":"live-share-stop-button",children:[U?f.jsx(Qu,{className:"sf:mr-2 sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):null,"End session"]})]})]}):f.jsxs("div",{"data-testid":"live-share-start-section",className:"sf:flex sf:flex-col sf:gap-3 sf:rounded-md sf:border sf:border-border sf:bg-muted/40 sf:p-4",children:[f.jsx("p",{className:"sf:text-sm sf:text-muted-foreground",children:"Start a live share session to generate a peer-joinable link. Anyone with the link can join, see your canvas in real time, and make edits if you allow it."}),j?f.jsx("div",{"data-testid":"live-share-start-error",className:"sf:rounded-md sf:border sf:border-destructive/40 sf:bg-destructive/10 sf:px-3 sf:py-2 sf:text-sm sf:text-destructive",children:j}):null,f.jsxs(Ke,{type:"button",size:"sm",disabled:U||a==="starting"||a==="stopping",onClick:I,"data-testid":"live-share-start-button",className:"sf:w-fit",children:[U||a==="starting"?f.jsx(Qu,{className:"sf:mr-2 sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):null,a==="stopping"?"Ending session…":"Start sharing"]})]}),f.jsx("div",{"data-testid":"live-share-peer-list",className:"sf:flex sf:flex-col sf:gap-1 sf:py-2",children:n.length===0?f.jsx("div",{className:"sf:py-6 sf:text-center sf:text-sm sf:text-muted-foreground",children:"No peers connected."}):n.map(G=>{const Q=v===G.peerId;return f.jsxs("div",{"data-testid":"live-share-peer-row",className:"sf:flex sf:items-center sf:gap-3 sf:rounded-md sf:px-2 sf:py-1.5 sf:hover:bg-muted",children:[f.jsx("span",{"aria-hidden":"true",className:"sf:inline-block sf:h-2 sf:w-2 sf:rounded-full",style:{backgroundColor:G.color??"#71717a"}}),f.jsx("span",{className:"sf:flex-1 sf:truncate sf:text-sm sf:text-foreground",children:G.displayName}),f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx(Ke,{type:"button",variant:"ghost",size:"icon",disabled:Q,onClick:()=>q(G),"aria-label":`Kick ${G.displayName}`,"data-testid":"live-share-kick-button","data-peer-id":G.peerId,children:Q?f.jsx(Qu,{className:"sf:h-4 sf:w-4 sf:animate-spin","data-testid":"live-share-kick-spinner"}):f.jsx($rt,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsx(Gr,{children:"Remove peer"})]})]},G.peerId)})}),f.jsxs("button",{type:"button",onClick:()=>x(G=>!G),"aria-expanded":k,"data-testid":"live-share-activity-toggle",className:"sf:flex sf:w-full sf:items-center sf:gap-2 sf:rounded-md sf:px-2 sf:py-2 sf:text-left sf:text-sm sf:font-medium sf:text-foreground sf:hover:bg-muted",children:[k?f.jsx(Srt,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}):f.jsx(Lrt,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsxs("span",{children:["Activity (",g.entries.length,")"]})]}),k?f.jsx("div",{"data-testid":"live-share-activity-list",className:"sf:max-h-[240px] sf:overflow-y-auto sf:rounded-md sf:border sf:border-border sf:bg-background",children:X.length===0?f.jsx("div",{className:"sf:px-3 sf:py-4 sf:text-sm sf:text-muted-foreground",children:g.loading?"Loading…":"No activity yet."}):f.jsx("ul",{className:"sf:flex sf:flex-col sf:divide-y sf:divide-border",children:X.map((G,Q)=>{const oe=kat.has(G.kind)||G.peerId===null;return f.jsxs("li",{"data-testid":"live-share-activity-entry","data-entry-kind":G.kind,className:`sf:flex sf:items-center sf:gap-3 sf:px-3 sf:py-1.5 sf:text-sm ${oe?"sf:text-muted-foreground":"sf:text-foreground"}`,children:[f.jsx("time",{dateTime:new Date(G.ts).toISOString(),"data-testid":"live-share-activity-time",className:"sf:font-mono sf:text-xs sf:tabular-nums sf:text-muted-foreground",children:gat(G.ts)}),f.jsx("span",{className:"sf:truncate sf:text-sm",children:G.displayName??"system"}),f.jsx("span",{"data-testid":"live-share-activity-kind",className:"sf:ml-auto sf:font-mono sf:text-[11px] sf:font-medium sf:uppercase sf:tracking-[0.18em] sf:text-muted-foreground",children:vat(G)})]},`${G.ts}-${Q}`)})})}):null,w.length>0?f.jsx("div",{"data-testid":"live-share-toast-stack",className:"sf:pointer-events-none sf:flex sf:flex-col sf:gap-1 sf:pt-2",children:w.map(G=>f.jsx(wat,{item:G,onExpire:O},G.id))}):null,f.jsxs("div",{"data-testid":"live-share-footer",className:"sf:flex sf:flex-col sf:gap-1 sf:border-t sf:border-border sf:pt-3",children:[f.jsx("div",{className:"sf:flex sf:items-start sf:justify-between sf:gap-3",children:f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx("span",{className:"sf:inline-flex",children:f.jsx(Ke,{type:"button",variant:"destructive",size:"sm",disabled:$,onClick:()=>{N(null),_(!0)},"data-testid":"live-share-kill-all-button",children:"End all sessions"})})}),r===0?f.jsx(Gr,{children:"No active sessions to end"}):null]})}),f.jsxs("div",{"data-testid":"live-share-active-sessions-count",className:"sf:text-xs sf:text-muted-foreground",children:["Active sessions: ",r]})]}),f.jsx(fo,{open:C,onOpenChange:G=>{S||(_(G),G||N(null))},children:f.jsxs(Eo,{className:"sf:sm:max-w-md","data-testid":"live-share-kill-all-confirm",children:[f.jsxs(jo,{children:[f.jsx($o,{children:"End all live sessions?"}),f.jsx(Po,{children:"This revokes every share link this studio has issued. Anyone currently connected will be disconnected. This cannot be undone."})]}),P?f.jsx("div",{"data-testid":"live-share-kill-all-error",className:"sf:rounded-md sf:border sf:border-destructive/40 sf:bg-destructive/10 sf:px-3 sf:py-2 sf:text-sm sf:text-destructive",children:P}):null,f.jsxs("div",{className:"sf:flex sf:justify-end sf:gap-2 sf:pt-2",children:[f.jsx(Ke,{type:"button",variant:"ghost",size:"sm",disabled:S,onClick:()=>{_(!1),N(null)},"data-testid":"live-share-kill-all-cancel",children:"Cancel"}),f.jsxs(Ke,{type:"button",variant:"destructive",size:"sm",disabled:S,onClick:H,"data-testid":"live-share-kill-all-confirm-button",children:[S?f.jsx(Qu,{className:"sf:mr-2 sf:h-4 sf:w-4 sf:animate-spin","data-testid":"live-share-kill-all-spinner"}):null,"End all"]})]})]})})]})})}function wat({item:e,onExpire:t}){return m.useEffect(()=>{const n=setTimeout(()=>t(e.id),vae);return()=>clearTimeout(n)},[e.id,t]),f.jsxs("div",{"data-testid":"live-share-toast",className:"sf:rounded-md sf:bg-muted sf:px-3 sf:py-1.5 sf:text-xs sf:text-muted-foreground",children:["Removed ",e.displayName]})}const Mat=200,bat="#71717a";function _at(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.peerId!="string"||t.peerId.length===0||typeof t.displayName!="string"||t.displayName.length===0?null:{peerId:t.peerId,displayName:t.displayName}}function Cat(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.nodeId=="string"&&t.nodeId.length>0?t.nodeId:typeof t.connectorId=="string"&&t.connectorId.length>0?t.connectorId:typeof t.id=="string"&&t.id.length>0?t.id:null}function Sat({active:e,selfPeerId:t,dedupeWindowMs:n=Mat,peerColor:o,fallbackColor:r=bat}){const[a,i]=m.useState([]),s=m.useRef(0),c=m.useRef(new Map),l=m.useRef(o);l.current=o;const h=m.useRef(t);h.current=t;const u=m.useCallback(p=>{i(g=>g.filter(k=>k.id!==p));const y=c.current;for(const[g,k]of y)k.id===p&&y.delete(g)},[]);return m.useEffect(()=>{if(!e){i([]),c.current.clear();return}const p=new EventSource("/api/share/attributions");return p.addEventListener("attribution",y=>{var j;const g=y;let k;try{k=JSON.parse(g.data)}catch{return}const x=_at(k.attributedTo);if(!x||h.current&&x.peerId===h.current)return;const v=typeof k.op=="string"?k.op:"";if(!v)return;const M=Cat(k.diff),w=`${x.peerId}|${M??""}|${v}`,b=Date.now(),C=c.current.get(w),{verb:_,nodeLabel:S}=pHe(v,k.diff);s.current+=1;const E=`tx-${s.current}`,P=((j=l.current)==null?void 0:j.call(l,x.peerId))??r,N={id:E,color:P,displayName:x.displayName,verb:_,nodeLabel:S,createdAt:b};if(c.current.set(w,{id:E,ts:b}),C&&b-C.ts<=n){i(z=>{const U=z.findIndex(T=>T.id===C.id);if(U<0)return[...z,N];const A=z.slice();return A[U]=N,A});return}i(z=>[...z,N])}),()=>{p.close()}},[e,n,r]),{items:a,onExpire:u}}const Lat=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(null),r=m.useCallback(()=>dle().then(a=>{t(a),o(null)}).catch(a=>{console.error("[useDemos] failed",a),t([]),o(String(a))}),[]);return m.useEffect(()=>{r()},[r]),{demos:e,error:n,refresh:r}},Nat=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(!0),[r,a]=m.useState(null),i=m.useCallback(()=>(o(!0),ule().then(c=>{t(c),a(null)}).catch(c=>{console.error("[useProjects] failed",c),t([]),a(String(c))}).finally(()=>o(!1))),[]);m.useEffect(()=>{i()},[i]);const s=m.useCallback(async(c,l)=>{await yle(c,l),await i()},[i]);return{projects:e,loading:n,error:r,refresh:i,unregisterProject:s}},Iat=(e={})=>{const[t,n]=m.useState(!1),{onRegistryReload:o,onHello:r}=e,a=m.useRef(o),i=m.useRef(r);return m.useEffect(()=>{a.current=o,i.current=r},[o,r]),m.useEffect(()=>{const s=new EventSource("/api/registry/events");return s.addEventListener("open",()=>n(!0)),s.addEventListener("error",()=>n(!1)),s.addEventListener("hello",()=>{var c;(c=i.current)==null||c.call(i)}),s.addEventListener("registry:reload",()=>{var c;(c=a.current)==null||c.call(a)}),()=>{s.close()}},[]),{connected:t}},Aat={status:"idle"};function Eat(){const[e,t]=m.useState(Aat);return m.useEffect(()=>{const n=new EventSource("/api/share/state");return n.addEventListener("state",o=>{const r=o;try{const a=JSON.parse(r.data);a&&typeof a=="object"&&typeof a.status=="string"&&t(a)}catch{}}),()=>n.close()},[]),e}const xae="seeflow:last-project",jat=()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(xae)}catch{return null}},KK=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(xae,e)}catch{}},$at=(e,t)=>{if(e.length===0)return null;if(e.length===1)return e[0]??null;if(t){const n=e.find(o=>o.id===t);if(n)return n}return null},Pat=(e,t)=>{const n=e!==null&&t!==null,[o,r]=m.useState(null),[a,i]=m.useState(n),[s,c]=m.useState(null),l=m.useCallback(()=>{!e||!t||(i(!0),fle(e,t).then(u=>{r(u),c(null)}).catch(u=>{console.error("[useDemoData] failed",u),c(String(u))}).finally(()=>i(!1)))},[e,t]),h=m.useCallback(u=>{r(u),c(null)},[]);return m.useEffect(()=>{if(!e||!t){r(null),i(!1);return}l()},[e,t,l]),{detail:o,loading:a,error:s,refresh:l,applyDetail:h}},zat=5,Rat={"node:running":"running","node:done":"done","node:error":"error"},Tat=(e,t)=>{if(t.type==="reset")return{};const n=e[t.nodeId]??[],o=[t.entry,...n].slice(0,zat);return{...e,[t.nodeId]:o}},Dat=e=>{const[t,n]=m.useReducer(Tat,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{const s=Rat[i.type];if(!s)return;const c=typeof i.nodeId=="string"?i.nodeId:null;if(!c)return;const l=typeof i.runId=="string"?i.runId:void 0,h=typeof i.ts=="number"?i.ts:Date.now();o.current({type:"append",nodeId:c,entry:{status:s,ts:h,runId:l}})},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{events:t,apply:r,reset:a}},Hat=(e,t)=>{var n,o;switch(t.type){case"reset":return{};case"running":return{...e,[t.nodeId]:{status:"running",runId:t.runId,ts:t.ts??Date.now()}};case"done":return{...e,[t.nodeId]:{...e[t.nodeId],status:"done",runId:t.runId??((n=e[t.nodeId])==null?void 0:n.runId),responseStatus:t.responseStatus,body:t.body,ts:t.ts??Date.now()}};case"error":return{...e,[t.nodeId]:{...e[t.nodeId],status:"error",runId:t.runId??((o=e[t.nodeId])==null?void 0:o.runId),error:t.message,ts:t.ts??Date.now()}}}},Oat=e=>{const[t,n]=m.useReducer(Hat,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{const s=typeof i.nodeId=="string"?i.nodeId:null;if(!s)return;const c=typeof i.runId=="string"?i.runId:void 0;if(i.type==="node:running"){o.current({type:"running",nodeId:s,runId:c,ts:i.ts});return}if(i.type==="node:done"){const l=typeof i.status=="number"?i.status:void 0;o.current({type:"done",nodeId:s,runId:c,responseStatus:l,body:i.body,ts:i.ts});return}if(i.type==="node:error"){const l=typeof i.message=="string"?i.message:void 0;o.current({type:"error",nodeId:s,runId:c,message:l,ts:i.ts})}},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{runs:t,apply:r,reset:a}},Fat=new Set(["ok","warn","error","pending"]),qat=(e,t)=>{if(t.type!=="node:status")return e;const n=typeof t.nodeId=="string"?t.nodeId:null;if(!n||typeof t.state!="string"||!Fat.has(t.state))return e;const o=typeof t.summary=="string"?t.summary:void 0,r=typeof t.detail=="string"?t.detail:void 0,a=t.data&&typeof t.data=="object"&&!Array.isArray(t.data)?t.data:void 0,i=typeof t.ts=="number"?t.ts:Date.now();return{...e,[n]:{state:t.state,summary:o,detail:r,data:a,ts:i}}},Vat=(e,t)=>{switch(t.type){case"reset":return{};case"event":return qat(e,t.event)}},Bat=e=>{const[t,n]=m.useReducer(Vat,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{o.current({type:"event",event:i})},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{statusByNode:t,apply:r,reset:a}},Uat=(e,t={})=>{const[n,o]=m.useState(!1),{onHello:r,onFlowReload:a,onEvent:i}=t,s=m.useRef(r),c=m.useRef(a),l=m.useRef(i);return m.useEffect(()=>{s.current=r,c.current=a,l.current=i},[r,a,i]),m.useEffect(()=>{if(!e){o(!1);return}const h=`/api/events?flowId=${encodeURIComponent(e)}`,u=new EventSource(h);u.addEventListener("open",()=>o(!0)),u.addEventListener("error",()=>o(!1)),u.addEventListener("hello",()=>{var p;(p=s.current)==null||p.call(s)}),u.addEventListener("flow:reload",p=>{var k,x;const y=XK(p,"flow:reload");(k=l.current)==null||k.call(l,y);const g=Wat(y);g&&((x=c.current)==null||x.call(c,g))});for(const p of["node:running","node:done","node:error","node:status"])u.addEventListener(p,y=>{var g;(g=l.current)==null||g.call(l,XK(y,p))});return()=>{u.close()}},[e]),{connected:n}},XK=(e,t)=>{try{const n=JSON.parse(e.data);return{type:t,ts:Date.now(),...n}}catch{return{type:t,ts:Date.now()}}},Wat=e=>e.valid===!0&&e.flow&&typeof e.flow=="object"?{valid:!0,flow:e.flow}:e.valid===!1&&typeof e.error=="string"?{valid:!1,error:e.error}:null,ZK=["File","Edit","View","Tools","Layout","Selection","Help"],wae="seeflow:command-palette:recent",Mae=5,bae=new Map(KF.map(e=>[e.id,e])),Gat=e=>typeof e=="string"&&bae.has(e),YK=()=>{if(typeof window>"u")return[];try{const e=window.localStorage.getItem(wae);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Gat).slice(0,Mae):[]}catch{return[]}},Kat=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(wae,JSON.stringify(e))}catch{}},QK=(e,t)=>e.enabled?e.enabled(t):!0,Xat=(e,t)=>t.length===0?!0:`${e.label} ${e.description??""}`.toLowerCase().includes(t);function Zat({open:e,onOpenChange:t,runCommand:n,ctx:o}){const[r,a]=m.useState(""),[i,s]=m.useState(0),[c,l]=m.useState(()=>YK()),h=m.useRef(null),u=m.useRef(null);m.useEffect(()=>{e&&(a(""),s(0),l(YK()))},[e]);const{groups:p,flat:y}=m.useMemo(()=>{const b=r.trim().toLowerCase();if(b.length===0){if(c.length===0)return{groups:[],flat:[]};const P=[];for(const j of c){const z=bae.get(j);z&&P.push({cmd:z,enabled:QK(z,o)})}return{groups:[{category:"Recent",rows:P}],flat:P}}const C=new Map;for(const P of KF){if(!Xat(P,b))continue;const N={cmd:P,enabled:QK(P,o)},j=C.get(P.category);j?j.push(N):C.set(P.category,[N])}const S=[...ZK.filter(P=>C.has(P)),...Array.from(C.keys()).filter(P=>!ZK.includes(P))].map(P=>({category:P,rows:C.get(P)??[]})),E=S.flatMap(P=>P.rows);return{groups:S,flat:E}},[r,o,c]);m.useEffect(()=>{if(y.length===0){s(0);return}s(b=>{var _;let C=b;if(C>=y.length&&(C=0),!((_=y[C])!=null&&_.enabled)){const S=y.findIndex(E=>E.enabled);S!==-1&&(C=S)}return C})},[y]);const g=m.useCallback(b=>{y.length!==0&&s(C=>{var S;let _=C;for(let E=0;E<y.length;E++)if(_=(_+b+y.length)%y.length,(S=y[_])!=null&&S.enabled)return _;return C})},[y]),k=m.useCallback(b=>{l(C=>{const _=[b,...C.filter(S=>S!==b)].slice(0,Mae);return Kat(_),_})},[]),x=m.useCallback(b=>{const C=y[b];!C||!C.enabled||(k(C.cmd.id),n(C.cmd.id),t(!1))},[y,t,k,n]),v=m.useCallback(b=>{if(b.key==="ArrowDown"){b.preventDefault(),g(1);return}if(b.key==="ArrowUp"){b.preventDefault(),g(-1);return}b.key==="Enter"&&(b.preventDefault(),x(i))},[x,i,g]);m.useEffect(()=>{if(!e)return;const b=u.current;if(!b)return;const C=b.querySelector(`[data-command-row-index="${i}"]`);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})},[i,e]);const w=r.trim().length>0;return f.jsx(vq,{open:e,onOpenChange:t,children:f.jsx(wR,{children:f.jsxs(o2,{className:ne("fixed left-0 right-0 top-[20%] z-50 mx-auto w-[480px] max-w-[90vw] border border-border bg-card shadow-lg duration-200","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","sm:rounded-lg"),"data-testid":"command-palette",onOpenAutoFocus:b=>{var C;b.preventDefault(),(C=h.current)==null||C.focus()},children:[f.jsx("div",{className:ne("border-b",y.length===0&&!w&&"border-b-0"),children:f.jsx("input",{ref:h,type:"text",value:r,onChange:b=>a(b.target.value),onKeyDown:v,placeholder:"Type a command…","data-testid":"command-palette-input","aria-label":"Search commands",autoComplete:"off",spellCheck:!1,className:"w-full bg-transparent px-4 py-3 text-sm outline-hidden placeholder:text-muted-foreground"})}),f.jsx("div",{ref:u,"data-testid":"command-palette-list","data-empty":y.length===0?"true":"false",className:ne("max-h-[50vh] overflow-y-auto",y.length>0?"py-1":"","seeflow-no-scrollbar"),children:y.length===0?w?f.jsxs("div",{"data-testid":"command-palette-empty",className:"px-4 py-6 text-center text-sm text-muted-foreground",children:['No commands match "',r,'"']}):null:(()=>{let b=-1;return p.map(C=>f.jsxs("div",{className:"py-1",children:[f.jsx("div",{className:"px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:C.category}),C.rows.map(_=>{b+=1;const S=b,E=S===i;return f.jsxs("button",{type:"button","data-testid":`command-palette-row-${_.cmd.id}`,"data-command-row-index":S,"data-highlighted":E?"true":"false","aria-disabled":_.enabled?void 0:!0,disabled:!_.enabled,onMouseEnter:()=>{_.enabled&&s(S)},onClick:()=>x(S),className:ne("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-hidden",_.enabled?"cursor-pointer text-foreground hover:bg-muted":"cursor-not-allowed text-muted-foreground/50",E&&_.enabled?"bg-muted":""),children:[f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.jsx("span",{className:"truncate font-medium",children:_.cmd.label}),_.cmd.description?f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:_.cmd.description}):null]}),_.cmd.shortcut?f.jsx("kbd",{"data-testid":`command-palette-shortcut-${_.cmd.id}`,className:"shrink-0 rounded border bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:_.cmd.shortcut}):null]},_.cmd.id)})]},C.category))})()})]})})})}function Yat(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Qat=/^[a-z0-9][a-z0-9-]*$/,Jat={"--tw-enter-translate-x":"-50%","--tw-enter-translate-y":"-50%","--tw-exit-translate-x":"-50%","--tw-exit-translate-y":"-50%","--tw-enter-scale":"1","--tw-exit-scale":"1"};function eit({open:e,onOpenChange:t,onCreate:n,onCreated:o}){const[r,a]=m.useState(""),[i,s]=m.useState(""),[c,l]=m.useState(!1),[h,u]=m.useState(null),[p,y]=m.useState(!1);m.useEffect(()=>{e&&(a(""),s(""),l(!1),u(null),y(!1))},[e]);const g=C=>{a(C),c||s(Yat(C))},k=C=>{s(C),c||l(!0)},x=i.trim(),v=r.trim(),M=x.length>0&&Qat.test(x),w=M&&v.length>0&&!p,b=async C=>{if(C.preventDefault(),!w){!M&&x.length>0&&u("Flow id must match /^[a-z0-9][a-z0-9-]*$/");return}y(!0),u(null);try{const S=await n({id:x,name:v});o==null||o(S),t(!1)}catch(_){u(_ instanceof Error?_.message:String(_)),y(!1)}};return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md",style:Jat,"data-testid":"flow-create-dialog",onOpenAutoFocus:C=>{C.preventDefault();const _=document.querySelector('[data-testid="flow-create-name-input"]');_==null||_.focus()},children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Create new flow"}),f.jsx(Po,{children:"A new flow folder is scaffolded under flows/<id>/ in your project."})]}),f.jsxs("form",{onSubmit:b,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Display name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:r,onChange:C=>g(C.target.value),"data-testid":"flow-create-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow id"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,placeholder:"my-retry-flow",value:i,onChange:C=>k(C.target.value),"data-testid":"flow-create-id-input",className:"rounded-md border bg-background px-3 py-2 font-mono text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-filled from the display name. Lowercase letters, digits, and dashes; must start with a letter or digit."})]}),h?f.jsx("div",{role:"alert","data-testid":"flow-create-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:h}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:p,children:"Cancel"}),f.jsx(Ke,{type:"submit",disabled:!w,"data-testid":"flow-create-submit",children:p?"Creating…":"Create flow"})]})]})]})})}function tit({open:e,onOpenChange:t,flow:n,flows:o,onDelete:r,onDeleted:a}){var M;const i=m.useMemo(()=>o.filter(w=>w.flowSlug!==(n==null?void 0:n.flowSlug)),[o,n==null?void 0:n.flowSlug]),s=((M=i[0])==null?void 0:M.flowSlug)??"",[c,l]=m.useState(s),[h,u]=m.useState(null),[p,y]=m.useState(!1);if(m.useEffect(()=>{e&&(l(s),u(null),y(!1))},[e,s]),!n)return f.jsx(fo,{open:!1,onOpenChange:t});const g=n.isDefault,k=c.length>0,x=(!g||k)&&!p,v=async w=>{if(w.preventDefault(),!!x){y(!0),u(null);try{const b=g?{newDefault:c}:void 0;await r(n.flowSlug,b),a==null||a(n.flowSlug,b==null?void 0:b.newDefault),t(!1)}catch(b){u(b instanceof Error?b.message:String(b)),y(!1)}}};return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"flow-delete-dialog",children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Delete flow"}),f.jsxs(Po,{children:["This removes flows/",n.flowSlug,"/ from disk and updates seeflow.json. The action cannot be undone."]})]}),f.jsxs("form",{onSubmit:v,className:"flex flex-col gap-4",children:[f.jsxs("p",{className:"text-sm",children:["Delete ",f.jsx("span",{className:"font-medium",children:n.name})," ",f.jsxs("span",{className:"font-mono text-muted-foreground",children:["(",n.flowSlug,")"]}),"?"]}),g?f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"New default flow"}),f.jsx("select",{value:c,onChange:w=>l(w.target.value),"data-testid":"flow-delete-new-default-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:i.map(w=>f.jsxs("option",{value:w.flowSlug,children:[w.name," (",w.flowSlug,")"]},w.flowSlug))}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.name," is the project default — pick a replacement before deleting."]})]}):null,h?f.jsx("div",{role:"alert","data-testid":"flow-delete-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:h}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:p,children:"Cancel"}),f.jsx(Ke,{type:"submit",variant:"destructive",disabled:!x,"data-testid":"flow-delete-submit",children:p?"Deleting…":"Delete"})]})]})]})})}function nit({open:e,onOpenChange:t,flow:n,onRename:o,onRenamed:r}){const[a,i]=m.useState(""),[s,c]=m.useState(null),[l,h]=m.useState(!1);if(m.useEffect(()=>{e&&n&&(i(n.name),c(null),h(!1))},[e,n]),!n)return f.jsx(fo,{open:!1,onOpenChange:t});const u=a.trim(),p=u!==n.name,y=u.length>0&&p&&!l,g=async k=>{if(k.preventDefault(),!!y){h(!0),c(null);try{const x={name:u},v=await o(n.flowSlug,x);r==null||r(v,n.flowSlug),t(!1)}catch(x){c(x instanceof Error?x.message:String(x)),h(!1)}}};return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"flow-rename-dialog",onOpenAutoFocus:k=>{k.preventDefault();const x=document.querySelector('[data-testid="flow-rename-name-input"]');x==null||x.focus(),x==null||x.select()},children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Rename flow"}),f.jsx(Po,{children:"Update the display name. The flow id is fixed once created."})]}),f.jsxs("form",{onSubmit:g,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow id"}),f.jsx("input",{type:"text",readOnly:!0,disabled:!0,autoComplete:"off",spellCheck:!1,value:n.flowSlug,"data-testid":"flow-rename-id-input",className:"cursor-not-allowed rounded-md border bg-muted px-3 py-2 font-mono text-sm text-muted-foreground"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Display name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:a,onChange:k=>i(k.target.value),"data-testid":"flow-rename-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),s?f.jsx("div",{role:"alert","data-testid":"flow-rename-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:s}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:l,children:"Cancel"}),f.jsx(Ke,{type:"submit",disabled:!y,"data-testid":"flow-rename-submit",children:l?"Saving…":"Save"})]})]})]})})}function oit({project:e,activeFlow:t,flows:n,onSelect:o,onCreate:r,onRename:a,onDelete:i}){const[s,c]=m.useState(!1),l=n.find(h=>h.flowSlug===t);return f.jsxs(Wd,{open:s,onOpenChange:c,children:[f.jsx(n2,{asChild:!0,children:f.jsxs(Ke,{type:"button",variant:"outline",size:"sm","aria-label":`Switch flow for ${e}`,"aria-expanded":s,className:"gap-2","data-testid":"flow-switcher-trigger",children:[f.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(l==null?void 0:l.name)??t}),f.jsx(cae,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsx(Gi,{align:"start",sideOffset:6,className:"w-[260px] p-0","data-testid":"flow-switcher-popover",children:f.jsx(Cq,{children:f.jsxs(Sq,{children:[f.jsx(Lq,{children:"No flows."}),n.length>0?f.jsx(mz,{heading:"Flows",children:n.map(h=>{const u=h.flowSlug===t;return f.jsxs(gz,{value:`${h.name} ${h.flowSlug}`,"aria-current":u?"true":void 0,"data-testid":`flow-switcher-row-${h.flowSlug}`,"data-active":u?"true":void 0,onSelect:()=>{c(!1),o==null||o(h.flowSlug)},className:ne("group flex items-center justify-between gap-2",u&&"bg-accent text-accent-foreground"),children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[h.icon?f.jsx("span",{"aria-hidden":"true",className:"text-xs opacity-70",children:h.icon}):null,f.jsx("span",{className:"truncate font-medium",children:h.name}),h.isDefault?f.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:"default"}):null]}),f.jsxs("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:[f.jsx("button",{type:"button","aria-label":`Rename ${h.name}`,"data-testid":`flow-switcher-rename-${h.flowSlug}`,className:"rounded p-0.5 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:p=>{p.stopPropagation(),c(!1),a==null||a(h.flowSlug)},children:f.jsx(Irt,{className:"h-3.5 w-3.5"})}),f.jsx("button",{type:"button","aria-label":`Delete ${h.name}`,"data-testid":`flow-switcher-delete-${h.flowSlug}`,className:"rounded p-0.5 hover:text-destructive focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:p=>{p.stopPropagation(),c(!1),i==null||i(h.flowSlug)},children:f.jsx(dae,{className:"h-3.5 w-3.5"})})]})]},h.flowSlug)})}):null,n.length>0?f.jsx(Vte,{}):null,f.jsx(mz,{children:f.jsxs(gz,{value:"+ new flow","data-testid":"flow-switcher-create",onSelect:()=>{c(!1),r==null||r()},className:"flex items-center gap-2 text-sm",children:[f.jsx(lae,{className:"h-4 w-4 opacity-70"}),f.jsx("span",{className:"font-medium",children:"New flow"})]})})]})})})]})}const rit={"--tw-enter-translate-x":"-50%","--tw-enter-translate-y":"-50%","--tw-exit-translate-x":"-50%","--tw-exit-translate-y":"-50%","--tw-enter-scale":"1","--tw-exit-scale":"1"},JK=e=>e?`${e.project}/${e.flow}`:null,ait=e=>{const t=e.indexOf("/");return t<1||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},eX=e=>`linkflow-picker-row-${e.replace(/\//g,"__")}`;function iit({open:e,onOpenChange:t,mode:n,demos:o,currentSlug:r,initialTarget:a,onCommit:i}){const[s,c]=m.useState(""),[l,h]=m.useState(()=>n==="edit"?JK(a):null);m.useEffect(()=>{e&&(c(""),h(n==="edit"?JK(a):null))},[e,n,a]);const u=m.useMemo(()=>{const w=s.trim().toLowerCase();return w.length===0?o.slice():o.filter(b=>(b.slug.split("/")[0]??"").toLowerCase().includes(w)||b.name.toLowerCase().includes(w))},[o,s]),p=m.useMemo(()=>l?u.findIndex(w=>w.slug===l):-1,[u,l]),y=m.useCallback(w=>{if(u.length===0)return;const b=u.length,C=p<0?w===1?0:b-1:(p+w+b)%b,_=u[C];_&&h(_.slug)},[u,p]),g=m.useCallback(()=>{if(p<0||!l)return;const w=ait(l);w&&(i(w),t(!1))},[l,p,i,t]),k=m.useCallback(w=>{w.key==="ArrowDown"?(w.preventDefault(),y(1)):w.key==="ArrowUp"?(w.preventDefault(),y(-1)):w.key==="Enter"?(w.preventDefault(),g()):w.key==="Escape"&&(w.preventDefault(),t(!1))},[y,g,t]),x=n==="edit"?"Change linked flow":"Link to a flow",v=l&&p>=0?eX(l):void 0,M=p>=0;return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md",style:rit,"data-testid":"linkflow-picker-dialog",onOpenAutoFocus:w=>{w.preventDefault();const b=document.querySelector('[data-testid="linkflow-picker-search"]');b==null||b.focus()},children:[f.jsxs(jo,{children:[f.jsx($o,{"data-testid":"linkflow-picker-title",children:x}),f.jsx(Po,{children:"Pick a flow to navigate to from this node."})]}),f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("input",{type:"text",value:s,onChange:w=>c(w.target.value),onKeyDown:k,placeholder:"Search flows…","data-testid":"linkflow-picker-search","aria-label":"Search flows","aria-activedescendant":v,autoComplete:"off",spellCheck:!1,className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("div",{"aria-label":"Flows","data-testid":"linkflow-picker-list",style:{maxHeight:"304px"},className:"overflow-y-auto rounded-md border seeflow-no-scrollbar",children:u.length===0?f.jsx("div",{"data-testid":"linkflow-picker-empty",className:"px-3 py-6 text-center text-sm text-muted-foreground",children:s.trim().length===0?"No flows registered.":`No flows match "${s}"`}):u.map(w=>{const b=w.slug.split("/")[0]??"",C=w.slug===l,_=w.slug===r;return f.jsxs("button",{type:"button",id:eX(w.slug),"data-testid":`linkflow-picker-row-${w.slug}`,"data-selected":C?"true":"false",onMouseDown:S=>{S.preventDefault()},onClick:()=>h(w.slug),className:ne("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-hidden",C?"bg-muted text-foreground":"text-foreground hover:bg-muted/60"),children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:b}),f.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-muted-foreground/60",children:"·"}),f.jsx("span",{className:"truncate font-medium",children:w.name})]}),_?f.jsx("span",{"data-testid":`linkflow-picker-current-badge-${w.slug}`,className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Currently viewing"}):null]},w.slug)})})]}),f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"linkflow-picker-cancel",children:"Cancel"}),f.jsx(Ke,{type:"button",onClick:g,disabled:!M,"data-testid":"linkflow-picker-commit",children:"Link"})]})]})})}const sit=(e,t)=>{if(e.has(t))return e;const n=new Set(e);return n.add(t),n},cit=(e,t)=>{if(t.length===0)return e;let n=!1;const o=new Set(e);for(const r of t)o.has(r)||(o.add(r),n=!0);return n?o:e},lit=(e,t)=>{if(!e.has(t))return e;const n=new Set(e);return n.delete(t),n},dit=(e,t)=>{if(t.length===0)return e;let n=!1;const o=new Set(e);for(const r of t)o.has(r)&&(o.delete(r),n=!0);return n?o:e},uit=(e,t)=>{if(e.size===0)return e;const n=new Set(t.map(a=>a.id));let o=!1;const r=new Set(e);for(const a of r)n.has(a)||(r.delete(a),o=!0);return o?r:e},tX=()=>{const[e,t]=m.useState(()=>new Set),n=m.useCallback(c=>{t(l=>sit(l,c))},[]),o=m.useCallback(c=>{t(l=>cit(l,c))},[]),r=m.useCallback(c=>{t(l=>lit(l,c))},[]),a=m.useCallback(c=>{t(l=>dit(l,c))},[]),i=m.useCallback(c=>{t(l=>uit(l,c))},[]),s=m.useCallback(()=>t(new Set),[]);return{ids:e,mark:n,markMany:o,unmark:r,unmarkMany:a,pruneAgainst:i,reset:s}},bD=(e,t)=>e===t?!0:e==null||t==null||typeof e!=typeof t||typeof e!="object"?!1:JSON.stringify(e)===JSON.stringify(t),hit=(e,t,n)=>({...e,[t]:{...e[t],...n}}),fit=(e,t)=>{if(!(t in e))return e;const n={...e};return delete n[t],n},nX=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),pit=(e,t)=>{const n=Object.entries(e);if(n.length===0)return e;const o=new Map(t.map(i=>[i.id,i]));let r=!1;const a={...e};for(const[i,s]of n){const c=o.get(i);if(!c)continue;const l={},h=l;let u=!1;for(const p of Object.keys(s)){const y=s[p],g=c[p];if(p==="data"&&nX(y)&&nX(g)){const k={};let x=!1;for(const v of Object.keys(y))bD(y[v],g[v])||(k[v]=y[v],x=!0);x&&(h[p]=k,u=!0)}else bD(y,g)||(h[p]=y,u=!0)}u?bD(l,s)||(a[i]=l,r=!0):(delete a[i],r=!0)}return r?a:e},oX=()=>{const[e,t]=m.useState({}),n=m.useCallback((i,s)=>{t(c=>hit(c,i,s))},[]),o=m.useCallback(i=>{t(s=>fit(s,i))},[]),r=m.useCallback(i=>{t(s=>pit(s,i))},[]),a=m.useCallback(()=>t({}),[]);return{overrides:e,setOverride:n,dropOverride:o,pruneAgainst:r,reset:a}};function yit({nodes:e,connectors:t,flowPos:n,nodeIdGen:o,connectorIdGen:r,defaultOffset:a={x:24,y:24}}){const i=new Map;for(const y of e)i.set(y.id,o(y.id));let s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;for(const y of e)y.position.x<s&&(s=y.position.x),y.position.y<c&&(c=y.position.y);Number.isFinite(s)||(s=0),Number.isFinite(c)||(c=0);const l=n?n.x-s:a.x,h=n?n.y-c:a.y,u=e.map(y=>{const g=i.get(y.id);if(g===void 0)throw new Error(`paste id missing for ${y.id}`);return{...y,id:g,position:{x:y.position.x+l,y:y.position.y+h}}}),p=t.map(y=>{const g=r(y.id);return{...y,id:g,source:i.get(y.source)??y.source,target:i.get(y.target)??y.target}});return{newNodes:u,newConnectors:p,idMap:i}}const mit=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploading:!0}}),git=e=>({type:"image",data:_ae(e)}),kit=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploadError:e.message}}),_ae=e=>({...UHe(e.path,e.dims,e.lastUsed),alt:e.originalFilename}),vit=async(e,t)=>{const{nodeId:n,flowId:o,file:r,originalFilename:a,position:i,dims:s,lastUsed:c}=e;t.rememberRetry(n,{file:r,originalFilename:a,position:i,dims:s}),t.setOverride(n,mit({position:i,dims:s,originalFilename:a}));const l=async()=>{let h;try{h=(await t.upload(o,n,r,a)).path}catch(y){const g=y instanceof Error?y.message:String(y);throw t.setOverride(n,kit({position:i,dims:s,originalFilename:a,message:g})),y}t.setOverride(n,git({path:h,dims:s,originalFilename:a,lastUsed:c}));const u=_ae({path:h,dims:s,originalFilename:a,lastUsed:c}),p={id:n,type:"image",position:i,data:u};await t.createNode(o,p),t.forgetRetry(n)};if(t.history){await t.history.batch("insert-image",l);return}await l()};function xit(e,t){if(!e)return null;const n=`${e.project}/${e.flow}`,o=t.find(r=>r.slug===n);return o?{projectName:e.project,flowName:o.name}:null}const wit="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Mit=248;function Mr(e=10){let t="";const n=new Uint8Array(e*2);for(;t.length<e;){crypto.getRandomValues(n);for(let o=0;o<n.length&&t.length<e;o++){const r=n[o];r<Mit&&(t+=wit[r%62])}}return t}const bit=new Set(["INPUT","TEXTAREA","SELECT"]),br=e=>e?bit.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1,_it=(e,t,n)=>{const o=e.indexOf(t);if(o<0)return null;const r=e.length,a=[...e];switch(n.op){case"forward":{if(o>=r-1)return null;const i=a[o],s=a[o+1];return i===void 0||s===void 0?null:(a[o]=s,a[o+1]=i,a)}case"backward":{if(o<=0)return null;const i=a[o],s=a[o-1];return i===void 0||s===void 0?null:(a[o]=s,a[o-1]=i,a)}case"toFront":{if(o===r-1)return null;const[i]=a.splice(o,1);return i===void 0?null:(a.push(i),a)}case"toBack":{if(o===0)return null;const[i]=a.splice(o,1);return i===void 0?null:(a.unshift(i),a)}case"toIndex":{const i=Math.min(Math.max(n.index,0),r-1);if(i===o)return null;const[s]=a.splice(o,1);return s===void 0?null:(a.splice(i,0,s),a)}}};function Cit({project:e,flow:t,slug:n,demos:o,detail:r,loading:a,runs:i,nodeEvents:s,statusByNode:c,externalReloadSignal:l,onPlayNode:h,refreshFlows:u,canvasRef:p}){var s2,ca;const y=o.find(V=>V.slug===n),{flows:g,createFlow:k,renameFlow:x,deleteFlow:v}=IF(e),[M,w]=m.useState([]),[b,C]=m.useState([]),[_,S]=m.useState(null),E=m.useRef(M),P=m.useRef(b);m.useEffect(()=>{E.current=M},[M]),m.useEffect(()=>{P.current=b},[b]);const N=m.useRef(null),j=oX(),z=oX(),U=tX(),A=tX(),[T,D]=m.useState(null),[O,I]=m.useState(null),[R,L]=m.useState({kind:"select"}),q=m.useRef({kind:"select"});m.useEffect(()=>{q.current=R},[R]);const[H,$]=m.useState(!1),[X,G]=m.useState(null),Q=m.useRef(new Set),oe=`${e}/${t}`,re=!Q.current.has(oe);m.useEffect(()=>{Q.current.add(oe)},[oe]);const te=m.useRef(null),ce=m.useCallback(V=>{te.current=V},[]),{reset:ke}=j,{reset:ve}=z,{reset:xe}=U,{reset:He}=A;m.useEffect(()=>{w([]),C([]),S(null),ke(),ve(),xe(),He(),D(null),I(null),xo.current=null,fr(!1),ko.current.clear()},[r==null?void 0:r.id]);const Ze=m.useCallback((V,F)=>{w(V),C(F)},[]),ue=(s2=r==null?void 0:r.flow)==null?void 0:s2.nodes,Ie=(ca=r==null?void 0:r.flow)==null?void 0:ca.connectors,{pruneAgainst:zt}=j,{pruneAgainst:pt}=z,{pruneAgainst:tn}=U,{pruneAgainst:se}=A;m.useEffect(()=>{if(!(!ue||!T)&&ue.length===T.length){for(let V=0;V<ue.length;V++){const F=ue[V],B=T[V];if(!F||F.id!==B)return}D(null)}},[ue,T]);const J=(r==null?void 0:r.id)??null,Rt=m.useMemo(()=>WHe({baseUrl:"",project:e,flow:t}),[e,t]),fn=m.useRef({nodes:[],connectors:[]});m.useEffect(()=>{fn.current={nodes:ue??[],connectors:Ie??[]}},[ue,Ie]);const{adapter:ae,history:Y}=m.useMemo(()=>tOe(Rt,()=>fn.current),[Rt,J]);m.useEffect(()=>{ue&&(zt(ue),tn(ue))},[ue,zt,tn]),m.useEffect(()=>{Ie&&(pt(Ie),se(Ie))},[Ie,pt,se]);const he=m.useRef(!1);m.useEffect(()=>{if(!he.current){he.current=!0;return}Y.markExternalChange()},[l,Y]);const[Ae,Re]=m.useState(!1),[We,Vt]=m.useState(null),[pn,nn]=m.useState(null),{setOverride:ge,dropOverride:Le}=j,At=m.useRef(j.overrides);m.useEffect(()=>{At.current=j.overrides},[j.overrides]);const Tn=m.useCallback((V,F)=>{!J||!ae||(ge(V,{position:F}),I(null),ae.updateNodePosition(V,F).catch(B=>{Le(V),I(B instanceof Error?B.message:String(B)),console.error("updateNodePosition failed",B)}))},[J,ae,ge,Le]),cn=m.useCallback(V=>{if(!J||!ae||V.length===0)return;const F=V.map(B=>(ue==null?void 0:ue.find(ee=>ee.id===B.id))?{id:B.id,next:B.position}:null).filter(B=>B!==null);if(F.length!==0){for(const B of F)ge(B.id,{position:B.next});I(null),Y.batch("move-nodes",async()=>{for(const B of F)await ae.updateNodePosition(B.id,B.next)}).catch(B=>{for(const K of F)Le(K.id);I(B instanceof Error?B.message:String(B)),console.error("updateNodePosition batch failed",B)})}},[J,ae,Y,ue,ge,Le]),eu=m.useCallback((V,F)=>{ge(V,{position:{x:F.x,y:F.y},data:{width:F.width,height:F.height}})},[ge]),i2=m.useCallback((V,F)=>{if(!J||!ae)return;const B={width:F.width,height:F.height,position:{x:F.x,y:F.y}};ge(V,{position:B.position,data:{width:B.width,height:B.height}}),I(null),ae.updateNode(V,B).catch(K=>{Le(V),I(K instanceof Error?K.message:String(K)),console.error("updateNode resize failed",K)})},[J,ae,ge,Le]),Qn=m.useCallback(V=>{if(!J||!ae)return;const F={autoSize:!0};ge(V,{data:{autoSize:!0,width:void 0,height:void 0}}),I(null),ae.updateNode(V,F).catch(B=>{Le(V),I(B instanceof Error?B.message:String(B)),console.error("updateNode (fit-to-content) failed",B)})},[J,ae,ge,Le]),go=m.useCallback(V=>{if(!J||!ae||V.length===0)return;const F=[];for(const K of V){if(!(ue==null?void 0:ue.find(dt=>dt.id===K.id)))continue;const ze={position:K.position};K.width!==void 0&&(ze.width=K.width),K.height!==void 0&&(ze.height=K.height),F.push({id:K.id,next:ze})}if(F.length===0)return;for(const K of F){const ee={};K.next.width!==void 0&&(ee.width=K.next.width),K.next.height!==void 0&&(ee.height=K.next.height),ge(K.id,{position:K.next.position,...Object.keys(ee).length>0?{data:ee}:{}})}I(null);const B=F.map(K=>K.id).slice().sort().join(",");Y.batch("multi-resize",async()=>{for(const K of F)await ae.updateNode(K.id,K.next)},{coalesceKey:`multi:resize:${B}`}).catch(K=>{for(const ee of F)Le(ee.id);I(K instanceof Error?K.message:String(K)),console.error("updateNode multi-resize batch failed",K)})},[J,ae,Y,ue,ge,Le]),{setOverride:xt,dropOverride:rt}=z,tu=m.useCallback((V,F)=>{ge(V,{data:F})},[ge]),Xi=m.useCallback((V,F)=>{for(const B of V)ge(B,{data:F})},[ge]),nu=m.useCallback((V,F)=>{xt(V,F)},[xt]),ou=m.useCallback((V,F)=>{!J||!ae||(aW(ri,F),ge(V,{data:F}),I(null),ae.updateNode(V,F).catch(B=>{Le(V),I(B instanceof Error?B.message:String(B)),console.error("updateNode style failed",B)}))},[J,ae,ge,Le]),ru=m.useCallback((V,F)=>{if(!J||!ae||V.length===0)return;aW(ri,F);const B=V.filter(K=>ue==null?void 0:ue.some(ee=>ee.id===K));if(B.length!==0){for(const K of B)ge(K,{data:F});I(null),Y.batch("style-nodes",async()=>{for(const K of B)await ae.updateNode(K,F)}).catch(K=>{for(const ee of B)Le(ee);I(K instanceof Error?K.message:String(K)),console.error("updateNode style-nodes batch failed",K)})}},[J,ae,Y,ue,ge,Le]),au=m.useCallback((V,F)=>{!J||!ae||(OHe(ri,F),xt(V,F),I(null),ae.updateConnector(V,F).catch(B=>{rt(V),I(B instanceof Error?B.message:String(B)),console.error("updateConnector failed",B)}))},[J,ae,xt,rt]),{mark:Zi,markMany:Yi,unmark:Qi,unmarkMany:Ji}=U,{markMany:ta,unmarkMany:na}=A,iu=m.useCallback(V=>{if(!J||!ae||!(ue==null?void 0:ue.find(ee=>ee.id===V)))return;const B=(Ie??[]).filter(ee=>ee.source===V||ee.target===V).map(ee=>ee.id),K=new Set(B);I(null),Zi(V),B.length>0&&ta(B),w(ee=>ee.filter(ze=>ze!==V)),C(ee=>ee.filter(ze=>!K.has(ze))),ae.deleteNode(V).catch(ee=>{Qi(V),B.length>0&&na(B),I(ee instanceof Error?ee.message:String(ee)),console.error("deleteNode failed",ee)})},[J,ae,ue,Ie,Zi,ta,Qi,na]),su=m.useCallback((V,F)=>{if(!J||!ae||!ue)return;const B=T??ue.map(ee=>ee.id),K=_it(B,V,F);K&&(D(K),I(null),ae.reorderNode(V,F).catch(ee=>{D(null),I(ee instanceof Error?ee.message:String(ee)),console.error("reorderNode failed",ee)}))},[J,ae,ue,T]),Ro=m.useCallback((V,F)=>{if(!J||!ae||V.length===0&&F.length===0)return;const B=new Set(V),K=V.map(Te=>ue==null?void 0:ue.find(on=>on.id===Te)).filter(Te=>!!Te),ee=(Ie??[]).filter(Te=>B.has(Te.source)||B.has(Te.target)),ze=new Set(ee.map(Te=>Te.id)),dt=F.map(Te=>Ie==null?void 0:Ie.find(on=>on.id===Te)).filter(Te=>!!Te).filter(Te=>!ze.has(Te.id));if(K.length===0&&ee.length===0&&dt.length===0)return;I(null);const Ye=K.map(Te=>Te.id),Et=[...ee.map(Te=>Te.id),...dt.map(Te=>Te.id)];Ye.length>0&&Yi(Ye),Et.length>0&&ta(Et);const Sn=K;w(Te=>Te.filter(on=>!B.has(on)));const Hn=new Set(dt.map(Te=>Te.id));C(Te=>Te.filter(on=>!Hn.has(on)&&!ze.has(on))),Y.batch("delete-selection",async()=>{for(const Te of Sn)await ae.deleteNode(Te.id);await Promise.all(dt.map(Te=>ae.deleteConnector(Te.id)))}).catch(Te=>{Ye.length>0&&Ji(Ye),Et.length>0&&na(Et),I(Te instanceof Error?Te.message:String(Te)),console.error("deleteSelection batch failed",Te)})},[J,ae,Y,ue,Ie,Yi,ta,Ji,na]);m.useEffect(()=>{N.current=Ro},[Ro]),m.useEffect(()=>{const V=F=>{if(F.key!=="Delete"&&F.key!=="Backspace"||br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const B=E.current,K=P.current;B.length===0&&K.length===0||(F.preventDefault(),Ro(B,K))};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[Ro]);const es=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{name:F}}),I(null),ae.updateNode(V,{name:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateNode name failed",B)}))},[J,ae,ge]),Da=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{description:F}}),I(null),ae.updateNode(V,{description:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateNode description failed",B)}))},[J,ae,ge]),ts=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{detail:F}}),I(null),ae.updateNode(V,{detail:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateNode detail failed",B)}))},[J,ae,ge]),ns=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{icon:F??void 0}}),I(null),ae.updateNode(V,{icon:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateNode icon failed",B)}))},[J,ae,ge]),qe=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{target:F}}),I(null),ae.updateNode(V,{target:F}).catch(B=>{Le(V),I(B instanceof Error?B.message:String(B)),console.error("updateNode target failed",B)}))},[J,ae,ge,Le]),oa=m.useCallback((V,F,B)=>{if(!J||!ae)return;I(null);const K=`node-${Mr()}`,ee=sW(V,B,T2(ri).node),ze={id:K,type:V,position:F,data:ee};ge(K,{id:K,type:V,position:F,data:ee}),ae.createNode(ze).catch(Ye=>{Le(K),I(Ye instanceof Error?Ye.message:String(Ye)),console.error("createNode failed",Ye)})},[J,ae,ge,Le]),Tt=m.useCallback((V,F)=>{if(!J||!ae)return;I(null);const B=`node-${Mr()}`,K={width:F.width,height:F.height},ee={id:B,type:"linkflow",position:V,data:K},ze={...K,_autoOpenPickerOnMount:!0};ge(B,{id:B,type:"linkflow",position:V,data:ze}),ae.createNode(ee).catch(Ye=>{Le(B),I(Ye instanceof Error?Ye.message:String(Ye)),console.error("createNode (linkflow) failed",Ye)})},[J,ae,ge,Le]),Ha=m.useCallback((V,F)=>{if(!J||!ae)return;I(null);const B=`node-${Mr()}`,K={icon:V,width:P0.width,height:P0.height},ee={id:B,type:"icon",position:F,data:K};ge(B,{id:B,type:"icon",position:F,data:K}),w([B]),ae.createNode(ee).catch(dt=>{Le(B),I(dt instanceof Error?dt.message:String(dt)),console.error("createNode (icon) failed",dt)})},[J,ae,ge,Le]),cu=m.useCallback(V=>{if(!J||!ae)return;I(null);const F=`node-${Mr()}`,B={id:F,type:"html",position:V.position,data:{}},K={id:F,type:"html",position:V.position,data:{}};ge(F,K),w([F]),ae.createNode(B).catch(ee=>{Le(F),I(ee instanceof Error?ee.message:String(ee)),console.error("createNode (type:'html') failed",ee)})},[J,ae,ge,Le]),ko=m.useRef(new Map),vo=m.useCallback((V,F)=>{ko.current.set(V,F)},[]),ra=m.useCallback(V=>{ko.current.delete(V)},[]),_n=m.useCallback(V=>{!J||!ae||(I(null),vit({...V,flowId:J,lastUsed:T2(ri).node},{upload:async(F,B,K,ee)=>ae.uploadImage(B,await oEe(K),ee),createNode:async(F,B)=>{const{id:K}=await ae.createNode(B);return{id:K}},setOverride:ge,history:Y,rememberRetry:vo,forgetRetry:ra}).catch(F=>{console.error("image-upload-flow failed",F)}))},[J,ae,Y,ge,vo,ra]),lr=m.useCallback(V=>{if(!J||!ae)return;const F=`node-${Mr()}`;_n({nodeId:F,...V})},[J,ae,_n]),Cn=m.useCallback(V=>{const F=ko.current.get(V);F&&_n({nodeId:V,...F})},[_n]),[Lt,aa]=m.useState({open:!1,mode:"insert"}),dr=m.useCallback((V,F)=>{aa({open:!0,mode:V,nodeId:F})},[]),ia=m.useCallback(()=>{aa(V=>({...V,open:!1}))},[]),lu=m.useCallback(()=>{dr("insert")},[dr]),du=m.useCallback(V=>dr("replace",V),[dr]),Nt=m.useCallback(V=>{if(IHe(V),Lt.mode==="replace"&&Lt.nodeId){if(J&&ae){const F=Lt.nodeId;ge(F,{data:{icon:V}}),I(null),ae.updateNode(F,{icon:V}).catch(B=>{Le(F),I(B instanceof Error?B.message:String(B)),console.error("updateNode (icon replace) failed",B)})}}else{const F=te.current;if(F&&J){const B=LHe(F,{width:window.innerWidth,height:window.innerHeight});Ha(V,B)}}ia()},[Lt.mode,Lt.nodeId,J,ae,ge,Le,Ha,ia]),ur=m.useCallback((V,F)=>{!J||!ae||(xt(V,{label:F}),I(null),ae.updateConnector(V,{label:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateConnector label failed",B)}))},[J,ae,xt]),Oa=m.useCallback((V,F,B)=>{if(!J||!ae)return;const K=`conn-${Mr()}`,ee=B==null?void 0:B.targetPin,ze=T2(ri).connector,dt={id:K,source:V,target:F,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...ze},Ye={id:K,source:V,target:F,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...ze};xt(K,dt),I(null),ae.createConnector(Ye).catch(Et=>{rt(K),I(Et instanceof Error?Et.message:String(Et)),console.error("createConnector failed",Et)})},[J,ae,xt,rt]),uu=m.useCallback(({sourceNodeId:V,position:F,shape:B})=>{if(!J||!ae)return;I(null);const K=`node-${Mr()}`,ee=`conn-${Mr()}`,ze=fz[B],dt=T2(ri),Ye=sW(B,ze,dt.node),Et={id:K,type:B,position:F,data:Ye},Sn={id:ee,source:V,target:K,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...dt.connector};ge(K,{id:K,type:B,position:F,data:Ye}),xt(ee,Sn),S(K),Y.batch("create-and-connect",async()=>{await ae.createNode(Et),await ae.createConnector(Sn)}).catch(Te=>{Le(K),rt(ee),I(Te instanceof Error?Te.message:String(Te)),console.error("createAndConnectFromPane failed",Te)})},[J,ae,Y,ge,Le,xt,rt]),xo=m.useRef(null),[hr,fr]=m.useState(!1),[Fa,qa]=m.useState(()=>({canUndo:Y.canUndo,canRedo:Y.canRedo}));m.useEffect(()=>Y.subscribe(qa),[Y]);const Dn=m.useCallback(V=>{if(!ue)return;const F=new Set(V),B=ue.filter(ee=>F.has(ee.id));if(B.length===0)return;const K=(Ie??[]).filter(ee=>F.has(ee.source)&&F.has(ee.target));xo.current=JSON.parse(JSON.stringify({nodes:B,connectors:K})),fr(!0)},[ue,Ie]),Bt=m.useCallback(V=>{if(!J||!ae)return;const F=xo.current;if(!F||F.nodes.length===0)return;const{newNodes:B,newConnectors:K}=yit({nodes:F.nodes,connectors:F.connectors,flowPos:V,nodeIdGen:()=>`node-${Mr()}`,connectorIdGen:()=>`conn-${Mr()}`});for(const ee of B)ge(ee.id,ee);for(const ee of K)xt(ee.id,ee);w(B.map(ee=>ee.id)),C(K.map(ee=>ee.id)),I(null),Y.batch("paste",async()=>{for(const ee of B)await ae.createNode({id:ee.id,type:ee.type,position:ee.position,data:ee.data});for(const ee of K)await ae.createConnector(ee)}).catch(ee=>{for(const ze of B)Le(ze.id);for(const ze of K)rt(ze.id);I(ee instanceof Error?ee.message:String(ee)),console.error("paste failed",ee)})},[J,ae,Y,ge,Le,xt,rt]);m.useEffect(()=>{const V=F=>{const B=THe({event:F,isEditableActive:br(document.activeElement),hasNodes:!!ue&&ue.length>0,hasConnectors:!!Ie&&Ie.length>0,selectedIds:E.current,hasClipboard:!!xo.current});if(B.type!=="noop"&&!(B.type==="copy"||B.type==="paste")){if(F.preventDefault(),B.type==="selectAll"){w((ue??[]).map(K=>K.id)),C((Ie??[]).map(K=>K.id));return}Dn([...B.ids]),Bt(null)}};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[ue,Ie,Dn,Bt]),m.useEffect(()=>{const V=F=>{const B=PHe(F);if(!B||br(document.activeElement))return;const K=E.current;if(K.length===0)return;const ee=j.overrides,ze=(ue??[]).map(Ye=>{var Sn;const Et=((Sn=ee[Ye.id])==null?void 0:Sn.position)??Ye.position;return{id:Ye.id,position:Et}}),dt=RHe(B,K,ze);if(dt.length!==0)if(F.preventDefault(),dt.length===1){const Ye=dt[0];Ye&&Tn(Ye.id,Ye.position)}else cn(dt)};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[ue,j.overrides,Tn,cn]),m.useEffect(()=>{const V=F=>{const B=zHe(F);if(!B||br(document.activeElement))return;F.preventDefault();const K=te.current;K&&(B==="fit"?K.fitView({padding:.2,duration:200}):B==="in"?K.zoomIn({duration:150}):K.zoomOut({duration:150}))};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]);const yn=m.useCallback(async V=>{if(!J||!ae||!ue||!ae.computeLayout)return;const F=j.overrides,B=te.current,K=V==="selection"?new Set(E.current):null,ee=K?ue.filter(Ge=>K.has(Ge.id)):ue;if(ee.length<2)return;const ze=new Set(ee.map(Ge=>Ge.id)),dt=(Ie??[]).filter(Ge=>ze.has(Ge.source)&&ze.has(Ge.target)),Ye=new Map,Et=ee.map(Ge=>{var vu;const rn=((vu=F[Ge.id])==null?void 0:vu.position)??Ge.position;Ye.set(Ge.id,rn);const Ut=B==null?void 0:B.getInternalNode(Ge.id),Zt=Ut==null?void 0:Ut.measured,gu=Ge.data,c2=(Zt==null?void 0:Zt.width)??gu.width??200,ku=(Zt==null?void 0:Zt.height)??gu.height??120;return{id:Ge.id,type:Ge.type,width:c2,height:ku}}),Sn=dt.map(Ge=>({id:Ge.id,source:Ge.source,target:Ge.target})),Hn=await ae.computeLayout(Et,Sn),Te=new Map;for(const[Ge,rn]of Object.entries(Hn.nodes))Te.set(Ge,rn.position);let on=Number.POSITIVE_INFINITY,pu=Number.POSITIVE_INFINITY,yu=Number.POSITIVE_INFINITY,mu=Number.POSITIVE_INFINITY;for(const Ge of Et){const rn=Ye.get(Ge.id);if(!rn)continue;rn.x<on&&(on=rn.x),rn.y<pu&&(pu=rn.y);const Ut=Te.get(Ge.id);Ut&&(Ut.x<yu&&(yu=Ut.x),Ut.y<mu&&(mu=Ut.y))}const qR=Number.isFinite(on)&&Number.isFinite(yu)?on-yu:0,VR=Number.isFinite(pu)&&Number.isFinite(mu)?pu-mu:0,Ga=[];for(const Ge of Et){const rn=Ye.get(Ge.id),Ut=Te.get(Ge.id);if(!rn||!Ut)continue;const Zt={x:Ut.x+qR,y:Ut.y+VR},gu=Zt.x-rn.x,c2=Zt.y-rn.y;Math.abs(gu)<1&&Math.abs(c2)<1||Ga.push({id:Ge.id,prev:rn,next:Zt})}if(Ga.length!==0){I(null);for(const Ge of Ga)ge(Ge.id,{position:Ge.next});Y.batch("tidy",async()=>{for(const Ge of Ga)await ae.updateNodePosition(Ge.id,Ge.next)}).catch(Ge=>{for(const rn of Ga)Le(rn.id);I(Ge instanceof Error?Ge.message:String(Ge)),console.error("Tidy batch failed",Ge)})}},[J,ae,Y,ue,Ie,j.overrides,ge,Le]);m.useEffect(()=>{const V=F=>{if(!(F.metaKey||F.ctrlKey)||!F.shiftKey||F.altKey||F.key.toLowerCase()!=="l"||br(document.activeElement))return;F.preventDefault();const B=E.current.length>0?"selection":"all";yn(B)};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[yn]);const os=m.useCallback(()=>{const V=E.current.length>0?"selection":"all";yn(V)},[yn]);m.useEffect(()=>{const V=F=>{if(br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const B=HHe(F);if(B===null)return;const K=q.current;if(B==="select"){K.kind!=="select"&&L({kind:"select"});return}if(B==="hand"){L(K.kind==="hand"?{kind:"select"}:{kind:"hand"});return}if(K.kind==="draw"&&K.shape===B){L({kind:"select"});return}L({kind:"draw",shape:B})};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]),m.useEffect(()=>{const V=F=>{if(F.key!=="Escape"||br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;if(q.current.kind!=="select"){L({kind:"select"});return}E.current.length>0&&w([]),P.current.length>0&&C([])};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]),m.useEffect(()=>{const V=F=>{if(F.key.toLowerCase()!=="f"||F.metaKey||F.ctrlKey||F.shiftKey||F.altKey||br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const B=E.current;if(B.length===0)return;const K=te.current;K&&K.fitView({nodes:B.map(ee=>({id:ee})),padding:.2,duration:200})};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]),m.useEffect(()=>{const V=F=>{if(F.key!=="1"||F.metaKey||F.ctrlKey||F.shiftKey||F.altKey||br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const B=te.current;if(!B)return;const{x:K,y:ee}=B.getViewport();B.setViewport({x:K,y:ee,zoom:1},{duration:150})};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]);const rs=m.useCallback(V=>{var F,B;switch(V){case"tool.select":L({kind:"select"});return;case"tool.hand":L({kind:"hand"});return;case"tool.rectangle":L({kind:"draw",shape:"rectangle"});return;case"tool.ellipse":L({kind:"draw",shape:"ellipse"});return;case"tool.text":L({kind:"draw",shape:"text"});return;case"tool.sticky":L({kind:"draw",shape:"sticky"});return;case"tool.database":L({kind:"draw",shape:"database"});return;case"edit.undo":{if(!Y.canUndo)return;Y.undo().catch(K=>{I(K instanceof Error?K.message:String(K)),console.error("undo failed",K)});return}case"edit.redo":{if(!Y.canRedo)return;Y.redo().catch(K=>{I(K instanceof Error?K.message:String(K)),console.error("redo failed",K)});return}case"edit.copy":{const K=E.current;if(K.length===0)return;Dn([...K]);return}case"edit.paste":Bt(null);return;case"edit.duplicate":{const K=E.current;if(K.length===0)return;Dn([...K]),Bt(null);return}case"edit.delete":{const K=E.current,ee=P.current;if(K.length===0&&ee.length===0)return;Ro([...K],[...ee]);return}case"edit.selectAll":w((ue??[]).map(K=>K.id)),C((Ie??[]).map(K=>K.id));return;case"view.fit":{const K=te.current;if(!K)return;K.fitView({padding:.2,duration:200});return}case"view.zoomIn":{const K=te.current;if(!K)return;K.zoomIn({duration:150});return}case"view.zoomOut":{const K=te.current;if(!K)return;K.zoomOut({duration:150});return}case"view.zoom100":{const K=te.current;if(!K)return;const{x:ee,y:ze}=K.getViewport();K.setViewport({x:ee,y:ze,zoom:1},{duration:150});return}case"view.zoomToSelection":{const K=E.current;if(K.length===0)return;const ee=te.current;if(!ee)return;ee.fitView({nodes:K.map(ze=>({id:ze})),padding:.2,duration:200});return}case"layout.tidy":{const K=E.current.length>0?"selection":"all";yn(K);return}case"selection.deselect":E.current.length>0&&w([]),P.current.length>0&&C([]),q.current.kind!=="select"&&L({kind:"select"});return;case"help.commandPalette":$(!0);return;case"export.pdf":{(F=p.current)==null||F.exportPdf();return}case"export.png":{(B=p.current)==null||B.exportPng();return}}},[Y,Dn,Bt,Ro,ue,Ie,yn,p]);m.useEffect(()=>{const V=F=>{(F.metaKey||F.ctrlKey)&&(F.shiftKey||F.altKey||F.key.toLowerCase()==="p"&&(F.preventDefault(),!br(document.activeElement)&&rs("help.commandPalette")))};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[rs]);const sa=m.useCallback((V,F)=>{if(!J||!ae)return;const B={...F.source!==void 0?{source:F.source}:{},...F.target!==void 0?{target:F.target}:{},...F.sourceHandle!==void 0?{sourceHandle:F.sourceHandle===null?void 0:F.sourceHandle}:{},...F.targetHandle!==void 0?{targetHandle:F.targetHandle===null?void 0:F.targetHandle}:{},...F.sourceHandleAutoPicked!==void 0?{sourceHandleAutoPicked:F.sourceHandleAutoPicked}:{},...F.targetHandleAutoPicked!==void 0?{targetHandleAutoPicked:F.targetHandleAutoPicked}:{},...F.sourcePin!==void 0?{sourcePin:F.sourcePin===null?void 0:F.sourcePin}:{},...F.targetPin!==void 0?{targetPin:F.targetPin===null?void 0:F.targetPin}:{}};xt(V,B),I(null),ae.updateConnector(V,F).catch(K=>{rt(V),I(K instanceof Error?K.message:String(K)),console.error("updateConnector reconnect failed",K)})},[J,ae,xt,rt]),Bf=m.useCallback((V,F,B)=>{if(!J||!ae)return;const K=F==="source"?"sourcePin":"targetPin";xt(V,{[K]:B}),I(null),ae.updateConnector(V,{[K]:B}).catch(ee=>{rt(V),I(ee instanceof Error?ee.message:String(ee)),console.error("updateConnector pin failed",ee)})},[J,ae,xt,rt]),hu=m.useCallback((V,F)=>{if(!J||!ae)return;const B=Ie==null?void 0:Ie.find(ze=>ze.id===V);if(!(B?F==="source"?B.sourcePin:B.targetPin:void 0))return;const ee=F==="source"?"sourcePin":"targetPin";xt(V,{[ee]:void 0}),I(null),ae.updateConnector(V,{[ee]:null}).catch(ze=>{rt(V),I(ze instanceof Error?ze.message:String(ze)),console.error("updateConnector unpin failed",ze)})},[J,ae,Ie,xt,rt]),lt=r==null?void 0:r.flow,Va=j.overrides,pr=z.overrides,To=U.ids,yr=A.ids,fu=m.useMemo(()=>{if(!lt||M.length===0)return[];const V=new Map(lt.nodes.map(B=>[B.id,B])),F=[];for(const B of M){const K=V.get(B);if(!K)continue;const ee=Va[B];if(!ee){F.push(K);continue}const ze=ee.data?{...K.data,...ee.data}:K.data;F.push({...K,...ee,data:ze})}return F},[lt,M,Va]),Ba=m.useMemo(()=>{if(!lt||b.length===0)return[];const V=new Map(lt.connectors.map(B=>[B.id,B])),F=[];for(const B of b){const K=V.get(B);if(!K)continue;const ee=pr[B];F.push(ee?{...K,...ee}:K)}return F},[lt,b,pr]),as=m.useMemo(()=>{if(!lt)return null;if(!T)return lt.nodes;const V=new Map(lt.nodes.map(K=>[K.id,K])),F=[],B=new Set;for(const K of T){const ee=V.get(K);ee&&(F.push(ee),B.add(K))}for(const K of lt.nodes)B.has(K.id)||F.push(K);return F},[lt,T]),mr=m.useMemo(()=>{const V=as??(lt==null?void 0:lt.nodes)??null;return V?To.size===0?V:V.filter(F=>!To.has(F.id)):null},[as,lt,To]),Ua=m.useMemo(()=>{const V=(lt==null?void 0:lt.connectors)??null;return V?yr.size===0&&To.size===0?V:V.filter(F=>!yr.has(F.id)&&!To.has(F.source)&&!To.has(F.target)):null},[lt,yr,To]),is=m.useCallback((V,F)=>{G({nodeId:V,mode:F})},[]),OR=m.useMemo(()=>{if(!mr)return null;let V=!1;const F=mr.map(B=>{if(B.type!=="linkflow")return B;V=!0;const K=B.data.target,ee=K?()=>Grt({project:K.project,flow:K.flow}):void 0,ze=K?xit(K,o):void 0;return{...B,data:{...B.data,onOpenPicker:is.bind(null,B.id),onFollow:ee,_resolvedTarget:ze}}});return V?F:mr},[mr,is,o]),FR=(g==null?void 0:g.some(V=>V.flowSlug===t))??!1;if(!y&&!FR&&!(g===null))return f.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 bg-background p-6 text-center",children:[f.jsxs("p",{className:"text-sm font-medium",children:["Unknown demo: ",n]}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"The slug may have been removed. Re-register from the project repo to bring it back."})]});if(!y||a&&!r)return f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading demo…"});const gr=M[0],Wa=gr?c[gr]:void 0;return f.jsxs("div",{className:"relative h-full w-full",children:[r&&!r.valid?f.jsxs("div",{"data-testid":"demo-error-banner",className:"absolute inset-x-0 top-0 z-10 border-b border-rose-500/40 bg-rose-50 px-4 py-2 text-xs text-rose-900 shadow-xs dark:bg-rose-950/40 dark:text-rose-100",children:[f.jsx("span",{className:"font-medium uppercase tracking-wide",children:"Invalid demo: "}),f.jsx("span",{className:"font-mono",children:r.error})]}):null,f.jsx(eit,{open:Ae,onOpenChange:Re,onCreate:k,onCreated:async V=>{await u(),Q.current.add(`${e}/${V.flowSlug}`),So({project:e,flow:V.flowSlug})}}),f.jsx(nit,{open:We!==null,onOpenChange:V=>{V||Vt(null)},flow:We,onRename:x,onRenamed:async(V,F)=>{await u(),V.flowSlug!==F&&(Q.current.add(`${e}/${V.flowSlug}`),So({project:e,flow:V.flowSlug}))}}),f.jsx(tit,{open:pn!==null,onOpenChange:V=>{V||nn(null)},flow:pn,flows:g??[],onDelete:v,onDeleted:async(V,F)=>{var K;if(await u(),V!==t)return;const B=F??((K=g==null?void 0:g.find(ee=>ee.isDefault&&ee.flowSlug!==V))==null?void 0:K.flowSlug);B&&So({project:e,flow:B})}}),lt&&ae?f.jsx(wrt,{ref:p,mode:"edit",adapter:ae,history:Y,topRightSlot:f.jsx(oit,{project:e,activeFlow:t,flows:g??[],onSelect:V=>{V!==t&&So({project:e,flow:V})},onCreate:()=>Re(!0),onRename:V=>{const F=g==null?void 0:g.find(B=>B.flowSlug===V);F&&Vt({flowSlug:F.flowSlug,name:F.name,icon:F.icon})},onDelete:V=>{const F=g==null?void 0:g.find(B=>B.flowSlug===V);F&&nn({flowSlug:F.flowSlug,name:F.name,isDefault:F.isDefault})}}),projectId:e,flowSlug:t,enableEmbed:!1,showShareMenu:!1,nodes:OR??lt.nodes,connectors:Ua??lt.connectors,selectedNodeIds:M,selectedConnectorIds:b,onSelectionChange:Ze,runtime:{runs:i,statuses:c,pendingOverrides:{nodes:Va,connectors:pr}},onPlayNode:h,onNodePositionChange:Tn,onNodePositionsChange:cn,onNodeResize:eu,onNodeResizeEnd:i2,onHtmlNodeFitToContent:Qn,onComponentNodeFitToContent:Qn,onMultiResize:go,onNodeNameChange:es,onNodeDescriptionChange:Da,onConnectorLabelChange:ur,onCreateShapeNode:oa,onCreateLinkflowNode:J?Tt:void 0,onCreateImageFromFile:J?lr:void 0,onRetryImageUpload:J?Cn:void 0,onCreateHtmlNode:J?cu:void 0,iconPickerOpen:Lt.open,onOpenIconPicker:J?lu:void 0,onCloseIconPicker:J?ia:void 0,onPickIcon:J?Nt:void 0,onRequestIconReplace:J?du:void 0,onCreateConnector:Oa,onReconnectConnector:sa,onPinEndpoint:J?Bf:void 0,onUnpinEndpoint:J?hu:void 0,onReorderNode:su,onDeleteNode:iu,onCopyNode:V=>Dn([V]),onPasteAt:Bt,onCopySelection:J?Dn:void 0,onPasteSelection:J?()=>Bt(null):void 0,hasClipboard:hr,selectedNodes:fu,selectedConnectors:Ba,onStyleNode:ou,onStyleNodePreview:tu,onStyleNodes:ru,onStyleNodesPreview:Xi,onStyleConnector:au,onStyleConnectorPreview:nu,onRfInit:ce,onTidy:ue?os:void 0,onCreateAndConnectFromPane:uu,pendingEditNodeId:_,canvasMode:R,onCanvasModeChange:L,statusReport:Wa,onNameChange:es,onDescriptionChange:Da,onDetailChange:ts,onIconChange:ns,autoFitView:re},`${e}/${t}`):f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"No demo data yet."}),O?f.jsxs("div",{"data-testid":"edit-error-banner",className:"absolute inset-x-0 bottom-4 z-20 mx-auto w-fit max-w-[80%] rounded-md border border-rose-500/50 bg-rose-50 px-3 py-2 text-xs text-rose-900 shadow-md dark:bg-rose-950/60 dark:text-rose-100",children:[f.jsx("span",{className:"font-medium",children:"Couldn't save change: "}),f.jsx("span",{className:"font-mono",children:O}),f.jsx("button",{type:"button",className:"ml-3 underline underline-offset-2",onClick:()=>I(null),children:"Dismiss"})]}):null,f.jsx(Zat,{open:H,onOpenChange:$,runCommand:rs,ctx:{hasSelection:M.length>0||b.length>0,canUndo:Fa.canUndo,canRedo:Fa.canRedo,hasClipboard:hr,canExportDemo:!!J}}),f.jsx(iit,{open:X!==null,onOpenChange:V=>{V||G(null)},mode:(X==null?void 0:X.mode)??"link",demos:o,currentSlug:n,initialTarget:(X==null?void 0:X.mode)==="edit"?(()=>{const V=ue==null?void 0:ue.find(B=>B.id===X.nodeId);return!V||V.type!=="linkflow"?null:V.data.target??null})():null,onCommit:V=>{X&&qe(X.nodeId,V)}})]})}const Sit=e=>({display:e?"block":"none",height:"100%"});function Lit({stack:e,renderEntry:t}){return f.jsx(f.Fragment,{children:e.map((n,o)=>{const r=o===e.length-1;return f.jsx("div",{"data-flow-stack-entry":n.slug,"data-flow-stack-top":r?"true":"false",style:Sit(r),children:t(n,r)},n.slug)})})}function Nit({demos:e,refreshFlows:t,canvasRef:n}){const o=pae();return f.jsx(Lit,{stack:o,renderEntry:(r,a)=>f.jsx(Iit,{entry:r,demos:e,refreshFlows:t,canvasRef:a?n:void 0})})}function Iit({entry:e,demos:t,refreshFlows:n,canvasRef:o}){const{project:r,flow:a,slug:i}=e,s=t.find(z=>z.slug===i),c=(s==null?void 0:s.id)??null,l=m.useRef(null),h=o??l,{detail:u,loading:p,refresh:y,applyDetail:g}=Pat(r,a),[k,x]=m.useState(0),{runs:v,apply:M}=Oat(c),{events:w,apply:b}=Dat(c),{statusByNode:C,apply:_,reset:S}=Bat(c),E=m.useCallback(()=>{S(),y(),n()},[y,n,S]),P=m.useCallback(z=>{if(!c||!s)return;const U={id:c,slug:s.slug,filePath:""},A=z.valid?{...U,name:z.flow.name??s.name,flow:z.flow,valid:!0,error:null}:{...U,name:s.name,flow:null,valid:!1,error:z.error};g(A),x(T=>T+1)},[c,s,g]),N=m.useCallback(z=>{M(z),b(z),_(z)},[M,b,_]);Uat(c,{onHello:E,onFlowReload:P,onEvent:N});const j=m.useCallback(z=>{vle(r,a,z).catch(U=>{M({type:"node:error",nodeId:z,message:U instanceof Error?U.message:String(U),ts:Date.now()})})},[r,a,M]);return f.jsx(Cit,{project:r,flow:a,slug:i,demos:t,detail:u,loading:p,runs:v,nodeEvents:w,statusByNode:C,externalReloadSignal:k,onPlayNode:j,refreshFlows:n,canvasRef:h})}const rX="npx seeflow register --path .";function Ait(){const[e,t]=m.useState(!1),n=async()=>{try{await navigator.clipboard.writeText(rX),t(!0),setTimeout(()=>t(!1),1200)}catch(o){console.error("[empty-state] copy failed",o)}};return f.jsx("div",{"data-testid":"seeflow-empty-state",className:"flex h-full w-full items-center justify-center bg-background p-6",children:f.jsxs("div",{className:"flex max-w-lg flex-col items-center gap-6 text-center",children:[f.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:f.jsx(jrt,{className:"h-6 w-6 text-muted-foreground"})}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"No demos registered yet"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["Point SeeFlow at any folder containing a"," ",f.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"flow.json"})," file and it'll appear here."]})]}),f.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border border-border bg-card px-3 py-2 font-mono text-sm",children:[f.jsx("span",{className:"text-muted-foreground select-none",children:"$"}),f.jsx("code",{className:"flex-1 truncate text-left",children:rX}),f.jsx(Ke,{type:"button",variant:"ghost",size:"sm",onClick:n,"aria-label":"Copy register command",children:e?f.jsx(sV,{className:"h-4 w-4"}):f.jsx(cV,{className:"h-4 w-4"})})]})]})})}function Eit({demos:e}){return e.length===0?f.jsx(Ait,{}):f.jsx("div",{className:"flex h-full w-full items-start justify-center overflow-y-auto bg-background p-8",children:f.jsxs("div",{"data-testid":"studio-home-picker",className:"flex w-full max-w-2xl flex-col gap-6 pt-8",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Open a demo"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," demos registered — pick one to load its canvas."]})]}),f.jsx("ul",{className:"flex flex-col gap-2",children:e.map(t=>f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>{const n=fae(t.slug);n&&So(n)},"data-testid":`studio-home-demo-${t.slug}`,className:"flex w-full flex-col items-start gap-0.5 rounded-lg border border-border bg-card px-4 py-3 text-left transition-colors hover:border-input",style:{boxShadow:"var(--shadow-card)"},children:[f.jsx("span",{className:"text-sm font-medium",children:t.name}),f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.repoPath})]})},t.id))})]})})}typeof window<"u"&&Xrt();function jit(){var U;const e=Drt(),{demos:t,refresh:n}=Lat(),{projects:o,refresh:r,unregisterProject:a}=Nat(),i=pae(),s=i.at(-1)??null,c=(s==null?void 0:s.project)??null,l=(s==null?void 0:s.slug)??null,h=i.length>1?i.at(-2)??null:null,u=Hrt(e),p=(u==null?void 0:u.project)??null,{flows:y}=IF(p);Iat({onRegistryReload:()=>{n(),r()}});const g=l?(t??[]).find(A=>A.slug===l):void 0;m.useEffect(()=>{l&&t!==null&&(g||n())},[l,t,g,n]);const k=m.useCallback(A=>{KK(A.id),n(),r(),So({project:A.slug,flow:"main"})},[n,r]),x=m.useCallback(async(A,T)=>{await a(A,T),await n(),c===A&&So(null)},[a,n,c]);m.useEffect(()=>{if(e!=="/"||t===null)return;const A=$at(t,jat());if(A){const T=fae(A.slug);T&&So(T)}},[e,t]),m.useEffect(()=>{g&&KK(g.id)},[g]),m.useEffect(()=>{s&&Yrt(s.project,s.flow)},[s]),m.useEffect(()=>{if(!p||!y)return;const A=Qrt(y,gae(p));A&&So({project:p,flow:A})},[p,y]);const v=m.useRef(null),[M,w]=m.useState(!1),[b,C]=m.useState(!1),_=(g==null?void 0:g.id)??null,S=Eat(),E=S.status==="active",{items:P,onExpire:N}=Sat({active:E,selfPeerId:"host"}),j=m.useMemo(()=>{if(_)return{onDownloadPdf:()=>{var A;return(A=v.current)==null?void 0:A.exportPdf()},onDownloadPng:()=>{var A;return(A=v.current)==null?void 0:A.exportPng()},onExportToCloud:()=>w(!0),onLiveShare:()=>C(!0)}},[_]);if(t===null)return f.jsx("div",{className:"flex h-full w-full items-center justify-center bg-background text-sm text-muted-foreground",children:"Loading…"});const z=h?((U=t.find(A=>A.slug===h.slug))==null?void 0:U.name)??h.flow:void 0;return f.jsx(m0,{delayDuration:150,children:f.jsxs("div",{className:"flex h-full w-full flex-col bg-background text-foreground",children:[f.jsx(lat,{projects:o??[],currentProjectSlug:c??void 0,onProjectCreated:k,onUnregisterProject:x,share:j,onBack:z?Krt:void 0,previousFlowName:z}),f.jsx("main",{className:"min-h-0 flex-1",children:i.length>0?f.jsx(Nit,{demos:t,refreshFlows:n,canvasRef:v}):f.jsx(Eit,{demos:t})}),E?f.jsx(Rnt,{items:P,onExpire:N}):null,_&&c?f.jsx(zrt,{open:M,onOpenChange:w,project:c,flowName:g==null?void 0:g.name,onCapturePreview:()=>{var A;return((A=v.current)==null?void 0:A.capturePreview())??Promise.resolve(void 0)}}):null,f.jsx(xat,{open:b,onOpenChange:C,peers:S.status==="active"?S.peers:[],status:S.status==="error"?"error":S.status,...S.status==="active"?{shareUrl:S.url}:{},...S.status==="active"&&S.hostDisplayName?{hostDisplayName:S.hostDisplayName}:{},...S.status==="active"&&S.recentSessionCount!==void 0?{recentSessionCount:S.recentSessionCount}:{}})]})})}const Cae=document.getElementById("root");if(!Cae)throw new Error("Root element #root not found");_D.createRoot(Cae).render(f.jsx($r.StrictMode,{children:f.jsx(jit,{})}));export{_f as C,zJe as M,$r as R,X0 as _,Un as a,TY as b,aK as c,mP as d,PF as e,rQ as f,yXe as g,mf as h,kXe as i,Pit as j,Sh as k,zr as l,f as m,sQ as n,Ztt as o,j$e as p,oXe as q,m as r,ro as s,vXe as t,Fq as u,cXe as w,$it as z};
8644
+ */const Prt=bn("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]),OK="seeflow.export.email",FK="seeflow.export.name",qK="seeflow.export.visibility";function zrt({open:e,onOpenChange:t,project:n,flowName:o,onCapturePreview:r}){const[a,i]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState("public"),[u,p]=m.useState({kind:"idle"}),[y,g]=m.useState(!1),[k,x]=m.useState(new Set),v=lle(n),M=IF(e?n:null),w=M.flows;m.useEffect(()=>{e&&(i(localStorage.getItem(OK)??""),c(o??localStorage.getItem(FK)??""),h(localStorage.getItem(qK)??"public"),p({kind:"idle"}),g(!1))},[e,o]),m.useEffect(()=>{e&&w&&x(new Set(w.map(A=>A.flowSlug)))},[e,w]);const b=m.useCallback(async()=>{p({kind:"loading"});try{const A=await(r==null?void 0:r()),{shareUrl:T}=await v(a.trim(),s.trim(),l,A,Array.from(k));localStorage.setItem(OK,a.trim()),localStorage.setItem(FK,s.trim()),localStorage.setItem(qK,l),p({kind:"done",shareUrl:T})}catch(A){p({kind:"error",message:A instanceof Error?A.message:String(A)})}},[v,a,s,l,r,k]),C=m.useCallback(A=>{x(T=>{const D=new Set(T);return D.has(A)?D.delete(A):D.add(A),D})},[]),_=m.useCallback(()=>{w&&x(A=>A.size===w.length?new Set:new Set(w.map(T=>T.flowSlug)))},[w]),S=m.useCallback(async()=>{if(u.kind==="done")try{await navigator.clipboard.writeText(u.shareUrl),g(!0),setTimeout(()=>g(!1),2e3)}catch(A){console.error("Failed to copy to clipboard:",A)}},[u]),E=u.kind==="loading",P=a.trim().length>0&&s.trim().length>0&&w!==null&&M.error===null&&k.size>0,N=((w==null?void 0:w.length)??0)>=2,j=M.loading,z=M.error!==null,U=w!==null&&k.size===w.length;return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"export-dialog",onOpenAutoFocus:A=>{A.preventDefault();const T=document.querySelector('[data-testid="export-email-input"]');T==null||T.focus()},children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Export project to seeflow.dev"}),f.jsx(Po,{children:"Upload this project to the cloud and get a shareable link."})]}),u.kind!=="done"?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Email"}),f.jsx("input",{type:"email",required:!0,autoComplete:"email",value:a,onChange:A=>i(A.target.value),disabled:E,"data-testid":"export-email-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"We'll use this to let you manage your flows in the future."})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow Name"}),f.jsx("input",{type:"text",required:!0,value:s,onChange:A=>c(A.target.value),disabled:E,"data-testid":"export-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Visibility"}),f.jsxs("select",{value:l,onChange:A=>h(A.target.value),disabled:E,"data-testid":"export-visibility-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[f.jsx("option",{value:"public",children:"Public — anyone can discover it"}),f.jsx("option",{value:"link",children:"Anyone with the link"})]})]}),j?f.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground","data-testid":"export-flows-loading",children:[f.jsx(Qu,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),f.jsx("span",{children:"Loading flows…"})]}):null,z?f.jsxs("div",{role:"alert","data-testid":"export-flows-error",className:"flex items-center justify-between gap-3 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:[f.jsx("span",{children:"Couldn't load flows."}),f.jsx("button",{type:"button",onClick:()=>M.refresh(),disabled:E,"data-testid":"export-flows-retry",className:"shrink-0 font-medium underline-offset-2 hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:"Retry"})]}):null,N&&w?f.jsxs("div",{className:"flex flex-col gap-1.5 text-sm","data-testid":"export-flows-section",children:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("span",{className:"font-medium",children:"Flows"}),f.jsx("button",{type:"button",onClick:_,disabled:E,"data-testid":"export-flows-toggle-all",className:"text-xs text-muted-foreground underline-offset-2 hover:text-foreground hover:underline disabled:cursor-not-allowed disabled:opacity-50",children:U?"Clear":"Select all"})]}),f.jsx("ul",{className:"flex max-h-48 flex-col gap-1 overflow-y-auto rounded-md border bg-background p-2",children:w.map(A=>f.jsx("li",{children:f.jsxs("label",{className:"flex items-center gap-2 rounded px-2 py-1 hover:bg-muted",children:[f.jsx("input",{type:"checkbox",checked:k.has(A.flowSlug),onChange:()=>C(A.flowSlug),disabled:E,"data-testid":`export-flow-checkbox-${A.flowSlug}`}),f.jsx("span",{className:"flex-1 truncate",children:A.name}),A.isDefault?f.jsx(Ert,{className:"h-3.5 w-3.5 text-muted-foreground","aria-label":"default flow","data-testid":`export-flow-default-${A.flowSlug}`}):null]})},A.flowSlug))})]}):null,u.kind==="error"?f.jsx("div",{role:"alert","data-testid":"export-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:u.message}):null]}),f.jsx(ar,{children:u.kind==="error"?f.jsxs(f.Fragment,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"export-cancel",children:"Cancel"}),f.jsx(Ke,{type:"button",onClick:()=>p({kind:"idle"}),"data-testid":"export-retry",children:"Try again"})]}):f.jsxs(f.Fragment,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:E,"data-testid":"export-cancel",children:"Cancel"}),f.jsx(Ke,{type:"button",onClick:b,disabled:E||!P,"data-testid":"export-submit",children:E?f.jsxs(f.Fragment,{children:[f.jsx(Qu,{className:"h-4 w-4 animate-spin","aria-hidden":"true"}),f.jsx("span",{children:"Uploading…"})]}):"Export"})]})})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("p",{className:"text-sm text-muted-foreground",children:"Your diagram is live. Share this link:"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{type:"text",readOnly:!0,value:u.shareUrl,"data-testid":"export-share-url",className:"min-w-0 flex-1 rounded-md border bg-muted px-3 py-2 text-sm outline-hidden"}),f.jsx(Ke,{type:"button",variant:"outline",size:"icon",onClick:S,"aria-label":"Copy link","data-testid":"export-copy",children:y?f.jsx(sV,{className:"h-4 w-4","aria-hidden":"true"}):f.jsx(cV,{className:"h-4 w-4","aria-hidden":"true"})}),f.jsx(Ke,{type:"button",variant:"outline",size:"icon",onClick:()=>window.open(u.shareUrl,"_blank"),"aria-label":"View in new tab","data-testid":"export-view",children:f.jsx(Nrt,{className:"h-4 w-4","aria-hidden":"true"})})]})]}),f.jsx(ar,{children:f.jsx(Ke,{type:"button",onClick:()=>t(!1),"data-testid":"export-done",children:"Done"})})]})]})})}function Rrt({open:e,onOpenChange:t,onCreated:n}){const[o,r]=m.useState(""),[a,i]=m.useState(""),[s,c]=m.useState(""),[l,h]=m.useState(null),[u,p]=m.useState(!1);m.useEffect(()=>{e&&(r(""),i(""),c(""),h(null),p(!1))},[e]);const y=o.trim(),g=a.trim(),k=s.trim(),x=g.length>0&&!u,v=async M=>{if(M.preventDefault(),!!x){p(!0),h(null);try{const w=await kle({name:g,...y.length>0?{path:y}:{},...k.length>0?{description:k}:{}});n(w),t(!1)}catch(w){h(w instanceof Error?w.message:String(w)),p(!1)}}};return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"create-project-dialog",onOpenAutoFocus:M=>{M.preventDefault();const w=document.querySelector('[data-testid="create-project-name-input"]');w==null||w.focus()},children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Create new project"}),f.jsx(Po,{children:"Scaffold a new SeeFlow project. It's created in ~/.seeflow/projects/ unless you give a path."})]}),f.jsxs("form",{onSubmit:v,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Project name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:a,onChange:M=>i(M.target.value),"data-testid":"create-project-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsxs("span",{className:"font-medium",children:["Project path ",f.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),f.jsx("input",{type:"text",autoComplete:"off",spellCheck:!1,placeholder:"/absolute/path/to/my-project",value:o,onChange:M=>r(M.target.value),"data-testid":"create-project-path-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Leave blank to create it in ~/.seeflow/projects/"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsxs("span",{className:"font-medium",children:["Description ",f.jsx("span",{className:"text-muted-foreground",children:"(optional)"})]}),f.jsx("textarea",{rows:3,autoComplete:"off",spellCheck:!1,value:s,onChange:M=>c(M.target.value),"data-testid":"create-project-description-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),l?f.jsx("div",{role:"alert","data-testid":"create-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:l}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:u,children:"Cancel"}),f.jsx(Ke,{type:"submit",disabled:!x,"data-testid":"create-project-submit",children:u?"Creating…":"Create project"})]})]})]})})}const VK="seeflow:navigate",Trt=e=>(window.addEventListener("popstate",e),window.addEventListener(VK,e),()=>{window.removeEventListener("popstate",e),window.removeEventListener(VK,e)}),BK=()=>window.location.pathname,Drt=()=>m.useSyncExternalStore(Trt,BK,BK),uae=(e,t)=>`/projects/${encodeURIComponent(e)}/flows/${encodeURIComponent(t)}`,hae=e=>{const t=e.split("/").filter(Boolean);if(t.length!==4||t[0]!=="projects"||t[2]!=="flows")return null;const n=decodeURIComponent(t[1]??""),o=decodeURIComponent(t[3]??"");return!n||!o?null:{project:n,flow:o}},fae=e=>{const t=e.indexOf("/");return t<=0||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},Hrt=e=>{const t=e.split("/").filter(Boolean);if(t.length!==2||t[0]!=="projects")return null;const n=decodeURIComponent(t[1]??"");return n?{project:n}:null},Ort="seeflow:navigate",EO="seeflow:flow-stack",lV=e=>({project:e.project,flow:e.flow,slug:`${e.project}/${e.flow}`}),Frt=e=>{const t=hae(e);return t?[lV(t)]:[]},qrt=(e,t)=>[...e,lV(t)],Vrt=e=>e?[lV(e)]:[],Brt=(e,t,n)=>{if(typeof t=="number"&&t>=0&&t<=e.length){const o=e.slice(0,t),r=o.at(-1);if(n){if(r&&r.project===n.project&&r.flow===n.flow)return o}else if(o.length===0)return o}return null};let Hr=[],UK=!1;const dV=()=>{typeof window>"u"||window.dispatchEvent(new Event(EO))},Urt=e=>(window.addEventListener(EO,e),()=>window.removeEventListener(EO,e)),WK=()=>Hr,pae=()=>m.useSyncExternalStore(Urt,WK,WK),yae=(e,t)=>{window.history.pushState({stackDepth:e},"",t),window.dispatchEvent(new Event(Ort))},Wrt=(e,t)=>{const n=window.history.state??null;window.history.replaceState({...n??{},stackDepth:e},"",t)},Grt=e=>{const t=qrt(Hr,e);yae(t.length,uae(e.project,e.flow)),Hr=t,dV()},Krt=()=>{window.history.back()},So=e=>{const t=Vrt(e),n=e?uae(e.project,e.flow):"/";window.location.pathname===n?Wrt(t.length,n):yae(t.length,n),Hr!==t&&(Hr=t,dV())},Xrt=()=>{if(UK)return;Hr=Frt(window.location.pathname);const e=window.history.state??null;typeof(e==null?void 0:e.stackDepth)!="number"&&window.history.replaceState({...e??{},stackDepth:Hr.length},"",window.location.pathname+window.location.search+window.location.hash),window.addEventListener("popstate",()=>{const t=window.history.state??null,n=hae(window.location.pathname),o=Brt(Hr,t==null?void 0:t.stackDepth,n);if(o!==null){Hr!==o&&(Hr=o,dV());return}So(n)}),UK=!0},Zrt="seeflow:last-flow:",mae=e=>`${Zrt}${e}`,gae=e=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(mae(e))}catch{return null}},Yrt=(e,t)=>{if(!(typeof window>"u"))try{window.localStorage.setItem(mae(e),t)}catch{}},Qrt=(e,t)=>{var o;if(e.length===0)return null;if(t){const r=e.find(a=>a.flowSlug===t);if(r)return r.flowSlug}const n=e.find(r=>r.isDefault);return n?n.flowSlug:((o=e[0])==null?void 0:o.flowSlug)??null};function Jrt({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}){const[r,a]=m.useState(!1),[i,s]=m.useState(!1),[c,l]=m.useState(null),[h,u]=m.useState(!1),[p,y]=m.useState(null),[g,k]=m.useState(!1);m.useEffect(()=>{const S=E=>{E.key==="k"&&(E.metaKey||E.ctrlKey)&&(E.preventDefault(),a(P=>!P))};return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[]);const x=e.find(S=>S.projectSlug===t),v=S=>{const P=gae(S.projectSlug)??S.defaultFlow;So({project:S.projectSlug,flow:P})},M=S=>{n==null||n(S)},w=S=>{l(S),y(null),k(!1)},b=()=>{h||(l(null),y(null),k(!1))},C=async()=>{if(c){u(!0),y(null);try{await(o==null?void 0:o(c.projectSlug,{deleteSource:g})),l(null),k(!1)}catch(S){y(S instanceof Error?S.message:String(S))}finally{u(!1)}}},_=(c==null?void 0:c.flowCount)??0;return f.jsxs(f.Fragment,{children:[f.jsxs(Wd,{open:r,onOpenChange:a,children:[f.jsx(n2,{asChild:!0,children:f.jsxs(Ke,{type:"button",variant:"outline",size:"sm","aria-label":"Switch project","aria-expanded":r,className:"gap-2","data-testid":"project-switcher-trigger",children:[f.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(x==null?void 0:x.name)??"Select project"}),f.jsx(Bte,{children:"⌘K"}),f.jsx(cae,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsxs(Gi,{align:"end",sideOffset:6,className:"relative w-[320px] p-0","data-testid":"project-switcher-popover",children:[f.jsxs(Cq,{children:[f.jsx(qte,{placeholder:"Search projects..."}),f.jsxs(Sq,{className:"pb-12",children:[f.jsx(Lq,{children:"No projects."}),e.length>0?f.jsx(mz,{heading:"Projects",children:e.map(S=>f.jsxs(gz,{value:`${S.name} ${S.projectSlug}`,onSelect:()=>{a(!1),v(S)},"data-testid":`project-switcher-row-${S.projectSlug}`,className:"group flex items-center justify-between gap-2",children:[f.jsxs("div",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[f.jsx("span",{className:"font-medium",children:S.name}),S.repoPath?f.jsx("span",{className:"w-full truncate text-xs text-muted-foreground",children:S.repoPath}):null]}),f.jsx("button",{type:"button","aria-label":`Unregister ${S.name}`,"data-testid":`project-switcher-unregister-${S.projectSlug}`,className:"shrink-0 rounded p-0.5 opacity-0 transition-opacity hover:text-destructive group-hover:opacity-100 focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:E=>{E.stopPropagation(),a(!1),w(S)},children:f.jsx(dae,{className:"h-3.5 w-3.5"})})]},S.projectSlug))}):null]})]}),f.jsx("button",{type:"button","aria-label":"Create new project",title:"Create new project","data-testid":"project-switcher-create",onClick:()=>{a(!1),s(!0)},className:"absolute right-2 bottom-2 inline-flex h-8 w-8 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-md transition-colors hover:bg-emerald-400 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",children:f.jsx(lae,{className:"h-4 w-4"})})]})]}),f.jsx(Rrt,{open:i,onOpenChange:s,onCreated:M}),f.jsx(fo,{open:c!==null,onOpenChange:S=>{S||b()},children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"unregister-project-dialog",children:[f.jsxs(jo,{children:[f.jsx($o,{children:g?"Delete project?":"Unregister project?"}),f.jsxs(Po,{children:["This removes ",f.jsx("strong",{children:c==null?void 0:c.name})," from SeeFlow."," ",f.jsxs("strong",{children:["All ",_," ",_===1?"flow":"flows"]})," ","under this project will be unregistered."]})]}),c!=null&&c.repoPath?f.jsxs("label",{className:"flex items-start gap-2 rounded-md border border-border px-3 py-2 text-sm",children:[f.jsx("input",{type:"checkbox",checked:g,onChange:S=>k(S.target.checked),disabled:h,"data-testid":"unregister-project-delete-source",className:"mt-0.5 h-4 w-4 cursor-pointer accent-destructive"}),f.jsxs("span",{className:"flex-1",children:[f.jsx("span",{className:"font-medium",children:"Also delete files from disk"}),f.jsxs("span",{className:"mt-1 block text-xs text-muted-foreground",children:["Permanently removes"," ",f.jsx("code",{className:"break-all text-xs",children:c.repoPath})," and everything inside it. This cannot be undone."]})]})]}):null,p?f.jsx("div",{role:"alert","data-testid":"unregister-project-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:p}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:b,disabled:h,children:"Cancel"}),f.jsx(Ke,{type:"button",variant:"destructive",onClick:C,disabled:h,"data-testid":"unregister-project-confirm",children:h?g?"Deleting…":"Unregistering…":g?"Delete project":"Unregister"})]})]})})]})}const kae="seeflow:theme",GK="(prefers-color-scheme: dark)";function eat(e){return e==="light"||e==="dark"||e==="system"}function tat(e){try{const t=e.getItem(kae);return eat(t)?t:"system"}catch{return"system"}}function nat(e){try{const t=new URLSearchParams(e);if(!t.has("theme"))return null;const n=t.get("theme");return n==="light"||n==="dark"?n:"light"}catch{return null}}function oat(e,t){try{e.setItem(kae,t)}catch{}}function rat(e,t){return e==="system"?t?"dark":"light":e}function aat(e,t){t==="dark"?(e.classList.add("dark"),e.classList.remove("light")):(e.classList.add("light"),e.classList.remove("dark"))}function iat(e,t){var o;const n=r=>t(r.matches);return e.addEventListener?(e.addEventListener("change",n),()=>{var r;return(r=e.removeEventListener)==null?void 0:r.call(e,"change",n)}):((o=e.addListener)==null||o.call(e,n),()=>{var r;return(r=e.removeListener)==null?void 0:r.call(e,n)})}function sat(){const[e,t]=m.useState(()=>{if(typeof window>"u")return"system";const i=nat(window.location.search);return i||tat(window.localStorage)}),[n,o]=m.useState(()=>typeof window>"u"?!1:window.matchMedia(GK).matches);m.useEffect(()=>{if(typeof window>"u")return;const i=window.matchMedia(GK);return iat(i,o)},[]);const r=rat(e,n);m.useEffect(()=>{typeof document>"u"||aat(document.documentElement,r)},[r]);const a=m.useCallback(i=>{typeof window<"u"&&oat(window.localStorage,i),t(i)},[]);return{theme:e,setTheme:a,resolvedTheme:r}}const cat=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];function lat({projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o,share:r,onBack:a,previousFlowName:i}){const{theme:s,setTheme:c}=sat(),l=i!==void 0;return f.jsxs("header",{className:"relative flex h-14 shrink-0 items-center justify-between bg-background/85 px-5 backdrop-blur-md shadow-[0_1px_3px_-1px_rgba(15,23,42,0.06),0_2px_8px_-4px_rgba(15,23,42,0.05)] dark:shadow-[0_4px_12px_-6px_rgba(0,0,0,0.6)]",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[l?f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx("button",{type:"button",onClick:a,"aria-label":"Back to previous flow","data-testid":"flow-back-button",className:"flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-muted/60 hover:text-foreground",children:f.jsx(Crt,{size:16,strokeWidth:2.25})})}),f.jsxs(Gr,{side:"bottom",children:["Back to ",i]})]}):null,f.jsxs("button",{type:"button",onClick:()=>So(null),className:"-ml-1.5 flex items-center gap-2 rounded-md px-1.5 py-1 text-base font-bold tracking-tight transition-colors hover:bg-muted/60",children:[f.jsx(Prt,{size:18,strokeWidth:2.25,className:"text-emerald-400"}),"SeeFlow",f.jsxs("span",{className:"ml-1 text-[10px] font-normal tracking-normal text-muted-foreground/70",children:["v","0.1.105"]})]})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx(Jrt,{projects:e,currentProjectSlug:t,onProjectCreated:n,onUnregisterProject:o}),r?f.jsx(Zre,{mode:"edit",enableEmbed:!1,onDownloadPdf:r.onDownloadPdf,onDownloadPng:r.onDownloadPng,onExportToCloud:r.onExportToCloud,onLiveShare:r.onLiveShare}):null,f.jsxs(hoe,{children:[f.jsx(foe,{asChild:!0,children:f.jsx(Ke,{type:"button",variant:"outline",size:"icon","aria-label":"Settings","data-testid":"settings-trigger",children:f.jsx(Art,{className:"h-4 w-4"})})}),f.jsxs(Rq,{align:"end",sideOffset:6,className:"w-44","data-testid":"settings-menu",children:[f.jsx(poe,{children:"Theme"}),f.jsx(gKe,{value:s,onValueChange:h=>c(h),children:cat.map(h=>f.jsx(yoe,{value:h.value,"data-testid":`theme-${h.value}`,children:h.label},h.value))})]})]})]})]})}const dat=200,uat=5e3;function hat(e){const[t,n]=m.useState([]),[o,r]=m.useState(!1),a=m.useCallback(async()=>{r(!0);try{const i=await fetch(`/api/share/audit?limit=${dat}`);if(!i.ok)return;const s=await i.json();s&&Array.isArray(s.entries)&&n(s.entries)}catch{}finally{r(!1)}},[]);return m.useEffect(()=>{if(!e)return;let i=!1;const s=()=>{i||a()};s();const c=setInterval(s,uat);return()=>{i=!0,clearInterval(c)}},[e,a]),{entries:t,refresh:a,loading:o}}const vae=3e3;async function fat(){const e=await fetch("/api/share/start",{method:"POST"});if(!e.ok)throw new Error(`share/start failed: ${e.status}`)}async function pat(){const e=await fetch("/api/share/stop",{method:"POST"});if(!e.ok&&e.status!==204)throw new Error(`share/stop failed: ${e.status}`)}async function yat(e){const t=await fetch("/api/share/kick",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({peerId:e.peerId})});if(!t.ok&&t.status!==204)throw new Error(`kick failed: ${t.status}`)}async function mat(){const e=await fetch("/api/share/kill-all",{method:"POST"});if(!e.ok)throw new Error(`kill-all failed: ${e.status}`);const t=await e.json();return{revoked:typeof t.revoked=="number"?t.revoked:0,failed:typeof t.failed=="number"?t.failed:0}}function gat(e){const t=new Date(e),n=String(t.getHours()).padStart(2,"0"),o=String(t.getMinutes()).padStart(2,"0"),r=String(t.getSeconds()).padStart(2,"0");return`${n}:${o}:${r}`}const kat=new Set(["host-start","host-stop","rotate","kill-switch"]);function vat(e){switch(e.kind){case"peer-join":return"joined";case"peer-leave":return"left";case"kick":return"kicked";case"rotate":return"rotated URL";case"kill-switch":return"kill switch";case"host-start":return"host started";case"host-stop":return"host stopped";case"rpc-reject":return`rejected${e.op?` ${e.op}`:""}`;case"rpc-accept":{const t=e.op??"",n=e.details&&typeof e.details.nodeId=="string"?e.details.nodeId:null;return t==="node-move"&&n?`moved Node ${n}`:t==="node-patch"&&n?`edited Node ${n}`:t==="add-node"&&n?`added Node ${n}`:t==="remove-node"&&n?`removed Node ${n}`:t||"updated"}default:return e.kind}}function xat({open:e,onOpenChange:t,peers:n,hostDisplayName:o,recentSessionCount:r=0,status:a="idle",shareUrl:i,onStart:s,onStop:c,auditApi:l,onKick:h,onKillAll:u,onKillAllSuccess:p}){const y=hat(l?!1:e),g=l??y,[k,x]=m.useState(!1),[v,M]=m.useState(null),[w,b]=m.useState([]),[C,_]=m.useState(!1),[S,E]=m.useState(!1),[P,N]=m.useState(null),[j,z]=m.useState(null),[U,A]=m.useState(!1),[T,D]=m.useState(!1),O=m.useCallback(G=>{b(Q=>Q.filter(oe=>oe.id!==G))},[]),I=m.useCallback(async()=>{if(!U){z(null),A(!0);try{await(s??fat)()}catch(G){z(G instanceof Error?G.message:"Failed to start sharing")}finally{A(!1)}}},[s,U]),R=m.useCallback(async()=>{if(!U){A(!0);try{await(c??pat)()}catch(G){z(G instanceof Error?G.message:"Failed to stop sharing")}finally{A(!1)}}},[c,U]),L=m.useCallback(async()=>{if(i)try{await navigator.clipboard.writeText(i),D(!0),setTimeout(()=>D(!1),1500)}catch{}},[i]),q=m.useCallback(async G=>{M(G.peerId);try{await(h??yat)(G);const Q=Date.now();b(oe=>[...oe,{id:Q,displayName:G.displayName}]),setTimeout(()=>O(Q),vae)}catch{}finally{M(null)}},[h,O]),H=m.useCallback(async()=>{E(!0),N(null);try{const G=await(u??mat)();_(!1),t(!1),p==null||p(G.revoked)}catch(G){const Q=G instanceof Error?G.message:"Kill-all failed";N(Q)}finally{E(!1)}},[u,p,t]),$=r===0||S,X=[...g.entries].reverse();return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sf:sm:max-w-lg","data-testid":"live-share-dialog",children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Live share"}),f.jsx(Po,{children:o?`Hosting as ${o}. Peers joined via the share link.`:"Peers joined via the share link."})]}),a==="active"&&i?f.jsxs("div",{"data-testid":"live-share-url-row",className:"sf:flex sf:flex-col sf:gap-2 sf:rounded-md sf:border sf:border-border sf:bg-muted/40 sf:p-3",children:[f.jsx("div",{className:"sf:text-xs sf:font-medium sf:uppercase sf:tracking-[0.18em] sf:text-muted-foreground",children:"Share link"}),f.jsxs("div",{className:"sf:flex sf:items-center sf:gap-2",children:[f.jsx("input",{type:"text",value:i,readOnly:!0,onFocus:G=>G.currentTarget.select(),"data-testid":"live-share-url-input",className:"sf:flex-1 sf:rounded-md sf:border sf:border-border sf:bg-background sf:px-2 sf:py-1.5 sf:font-mono sf:text-xs"}),f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx(Ke,{type:"button",variant:"outline",size:"icon",onClick:L,"aria-label":"Copy share link","data-testid":"live-share-copy-button",children:T?f.jsx(sV,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}):f.jsx(cV,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsx(Gr,{children:T?"Copied!":"Copy link"})]}),f.jsxs(Ke,{type:"button",variant:"outline",size:"sm",disabled:U,onClick:R,"data-testid":"live-share-stop-button",children:[U?f.jsx(Qu,{className:"sf:mr-2 sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):null,"End session"]})]})]}):f.jsxs("div",{"data-testid":"live-share-start-section",className:"sf:flex sf:flex-col sf:gap-3 sf:rounded-md sf:border sf:border-border sf:bg-muted/40 sf:p-4",children:[f.jsx("p",{className:"sf:text-sm sf:text-muted-foreground",children:"Start a live share session to generate a peer-joinable link. Anyone with the link can join, see your canvas in real time, and make edits if you allow it."}),j?f.jsx("div",{"data-testid":"live-share-start-error",className:"sf:rounded-md sf:border sf:border-destructive/40 sf:bg-destructive/10 sf:px-3 sf:py-2 sf:text-sm sf:text-destructive",children:j}):null,f.jsxs(Ke,{type:"button",size:"sm",disabled:U||a==="starting"||a==="stopping",onClick:I,"data-testid":"live-share-start-button",className:"sf:w-fit",children:[U||a==="starting"?f.jsx(Qu,{className:"sf:mr-2 sf:h-4 sf:w-4 sf:animate-spin","aria-hidden":"true"}):null,a==="stopping"?"Ending session…":"Start sharing"]})]}),f.jsx("div",{"data-testid":"live-share-peer-list",className:"sf:flex sf:flex-col sf:gap-1 sf:py-2",children:n.length===0?f.jsx("div",{className:"sf:py-6 sf:text-center sf:text-sm sf:text-muted-foreground",children:"No peers connected."}):n.map(G=>{const Q=v===G.peerId;return f.jsxs("div",{"data-testid":"live-share-peer-row",className:"sf:flex sf:items-center sf:gap-3 sf:rounded-md sf:px-2 sf:py-1.5 sf:hover:bg-muted",children:[f.jsx("span",{"aria-hidden":"true",className:"sf:inline-block sf:h-2 sf:w-2 sf:rounded-full",style:{backgroundColor:G.color??"#71717a"}}),f.jsx("span",{className:"sf:flex-1 sf:truncate sf:text-sm sf:text-foreground",children:G.displayName}),f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx(Ke,{type:"button",variant:"ghost",size:"icon",disabled:Q,onClick:()=>q(G),"aria-label":`Kick ${G.displayName}`,"data-testid":"live-share-kick-button","data-peer-id":G.peerId,children:Q?f.jsx(Qu,{className:"sf:h-4 sf:w-4 sf:animate-spin","data-testid":"live-share-kick-spinner"}):f.jsx($rt,{className:"sf:h-4 sf:w-4","aria-hidden":"true"})})}),f.jsx(Gr,{children:"Remove peer"})]})]},G.peerId)})}),f.jsxs("button",{type:"button",onClick:()=>x(G=>!G),"aria-expanded":k,"data-testid":"live-share-activity-toggle",className:"sf:flex sf:w-full sf:items-center sf:gap-2 sf:rounded-md sf:px-2 sf:py-2 sf:text-left sf:text-sm sf:font-medium sf:text-foreground sf:hover:bg-muted",children:[k?f.jsx(Srt,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}):f.jsx(Lrt,{className:"sf:h-4 sf:w-4","aria-hidden":"true"}),f.jsxs("span",{children:["Activity (",g.entries.length,")"]})]}),k?f.jsx("div",{"data-testid":"live-share-activity-list",className:"sf:max-h-[240px] sf:overflow-y-auto sf:rounded-md sf:border sf:border-border sf:bg-background",children:X.length===0?f.jsx("div",{className:"sf:px-3 sf:py-4 sf:text-sm sf:text-muted-foreground",children:g.loading?"Loading…":"No activity yet."}):f.jsx("ul",{className:"sf:flex sf:flex-col sf:divide-y sf:divide-border",children:X.map((G,Q)=>{const oe=kat.has(G.kind)||G.peerId===null;return f.jsxs("li",{"data-testid":"live-share-activity-entry","data-entry-kind":G.kind,className:`sf:flex sf:items-center sf:gap-3 sf:px-3 sf:py-1.5 sf:text-sm ${oe?"sf:text-muted-foreground":"sf:text-foreground"}`,children:[f.jsx("time",{dateTime:new Date(G.ts).toISOString(),"data-testid":"live-share-activity-time",className:"sf:font-mono sf:text-xs sf:tabular-nums sf:text-muted-foreground",children:gat(G.ts)}),f.jsx("span",{className:"sf:truncate sf:text-sm",children:G.displayName??"system"}),f.jsx("span",{"data-testid":"live-share-activity-kind",className:"sf:ml-auto sf:font-mono sf:text-[11px] sf:font-medium sf:uppercase sf:tracking-[0.18em] sf:text-muted-foreground",children:vat(G)})]},`${G.ts}-${Q}`)})})}):null,w.length>0?f.jsx("div",{"data-testid":"live-share-toast-stack",className:"sf:pointer-events-none sf:flex sf:flex-col sf:gap-1 sf:pt-2",children:w.map(G=>f.jsx(wat,{item:G,onExpire:O},G.id))}):null,f.jsxs("div",{"data-testid":"live-share-footer",className:"sf:flex sf:flex-col sf:gap-1 sf:border-t sf:border-border sf:pt-3",children:[f.jsx("div",{className:"sf:flex sf:items-start sf:justify-between sf:gap-3",children:f.jsxs(_a,{children:[f.jsx(Ca,{asChild:!0,children:f.jsx("span",{className:"sf:inline-flex",children:f.jsx(Ke,{type:"button",variant:"destructive",size:"sm",disabled:$,onClick:()=>{N(null),_(!0)},"data-testid":"live-share-kill-all-button",children:"End all sessions"})})}),r===0?f.jsx(Gr,{children:"No active sessions to end"}):null]})}),f.jsxs("div",{"data-testid":"live-share-active-sessions-count",className:"sf:text-xs sf:text-muted-foreground",children:["Active sessions: ",r]})]}),f.jsx(fo,{open:C,onOpenChange:G=>{S||(_(G),G||N(null))},children:f.jsxs(Eo,{className:"sf:sm:max-w-md","data-testid":"live-share-kill-all-confirm",children:[f.jsxs(jo,{children:[f.jsx($o,{children:"End all live sessions?"}),f.jsx(Po,{children:"This revokes every share link this studio has issued. Anyone currently connected will be disconnected. This cannot be undone."})]}),P?f.jsx("div",{"data-testid":"live-share-kill-all-error",className:"sf:rounded-md sf:border sf:border-destructive/40 sf:bg-destructive/10 sf:px-3 sf:py-2 sf:text-sm sf:text-destructive",children:P}):null,f.jsxs("div",{className:"sf:flex sf:justify-end sf:gap-2 sf:pt-2",children:[f.jsx(Ke,{type:"button",variant:"ghost",size:"sm",disabled:S,onClick:()=>{_(!1),N(null)},"data-testid":"live-share-kill-all-cancel",children:"Cancel"}),f.jsxs(Ke,{type:"button",variant:"destructive",size:"sm",disabled:S,onClick:H,"data-testid":"live-share-kill-all-confirm-button",children:[S?f.jsx(Qu,{className:"sf:mr-2 sf:h-4 sf:w-4 sf:animate-spin","data-testid":"live-share-kill-all-spinner"}):null,"End all"]})]})]})})]})})}function wat({item:e,onExpire:t}){return m.useEffect(()=>{const n=setTimeout(()=>t(e.id),vae);return()=>clearTimeout(n)},[e.id,t]),f.jsxs("div",{"data-testid":"live-share-toast",className:"sf:rounded-md sf:bg-muted sf:px-3 sf:py-1.5 sf:text-xs sf:text-muted-foreground",children:["Removed ",e.displayName]})}const Mat=200,bat="#71717a";function _at(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.peerId!="string"||t.peerId.length===0||typeof t.displayName!="string"||t.displayName.length===0?null:{peerId:t.peerId,displayName:t.displayName}}function Cat(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.nodeId=="string"&&t.nodeId.length>0?t.nodeId:typeof t.connectorId=="string"&&t.connectorId.length>0?t.connectorId:typeof t.id=="string"&&t.id.length>0?t.id:null}function Sat({active:e,selfPeerId:t,dedupeWindowMs:n=Mat,peerColor:o,fallbackColor:r=bat}){const[a,i]=m.useState([]),s=m.useRef(0),c=m.useRef(new Map),l=m.useRef(o);l.current=o;const h=m.useRef(t);h.current=t;const u=m.useCallback(p=>{i(g=>g.filter(k=>k.id!==p));const y=c.current;for(const[g,k]of y)k.id===p&&y.delete(g)},[]);return m.useEffect(()=>{if(!e){i([]),c.current.clear();return}const p=new EventSource("/api/share/attributions");return p.addEventListener("attribution",y=>{var j;const g=y;let k;try{k=JSON.parse(g.data)}catch{return}const x=_at(k.attributedTo);if(!x||h.current&&x.peerId===h.current)return;const v=typeof k.op=="string"?k.op:"";if(!v)return;const M=Cat(k.diff),w=`${x.peerId}|${M??""}|${v}`,b=Date.now(),C=c.current.get(w),{verb:_,nodeLabel:S}=pHe(v,k.diff);s.current+=1;const E=`tx-${s.current}`,P=((j=l.current)==null?void 0:j.call(l,x.peerId))??r,N={id:E,color:P,displayName:x.displayName,verb:_,nodeLabel:S,createdAt:b};if(c.current.set(w,{id:E,ts:b}),C&&b-C.ts<=n){i(z=>{const U=z.findIndex(T=>T.id===C.id);if(U<0)return[...z,N];const A=z.slice();return A[U]=N,A});return}i(z=>[...z,N])}),()=>{p.close()}},[e,n,r]),{items:a,onExpire:u}}const Lat=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(null),r=m.useCallback(()=>dle().then(a=>{t(a),o(null)}).catch(a=>{console.error("[useDemos] failed",a),t([]),o(String(a))}),[]);return m.useEffect(()=>{r()},[r]),{demos:e,error:n,refresh:r}},Nat=()=>{const[e,t]=m.useState(null),[n,o]=m.useState(!0),[r,a]=m.useState(null),i=m.useCallback(()=>(o(!0),ule().then(c=>{t(c),a(null)}).catch(c=>{console.error("[useProjects] failed",c),t([]),a(String(c))}).finally(()=>o(!1))),[]);m.useEffect(()=>{i()},[i]);const s=m.useCallback(async(c,l)=>{await yle(c,l),await i()},[i]);return{projects:e,loading:n,error:r,refresh:i,unregisterProject:s}},Iat=(e={})=>{const[t,n]=m.useState(!1),{onRegistryReload:o,onHello:r}=e,a=m.useRef(o),i=m.useRef(r);return m.useEffect(()=>{a.current=o,i.current=r},[o,r]),m.useEffect(()=>{const s=new EventSource("/api/registry/events");return s.addEventListener("open",()=>n(!0)),s.addEventListener("error",()=>n(!1)),s.addEventListener("hello",()=>{var c;(c=i.current)==null||c.call(i)}),s.addEventListener("registry:reload",()=>{var c;(c=a.current)==null||c.call(a)}),()=>{s.close()}},[]),{connected:t}},Aat={status:"idle"};function Eat(){const[e,t]=m.useState(Aat);return m.useEffect(()=>{const n=new EventSource("/api/share/state");return n.addEventListener("state",o=>{const r=o;try{const a=JSON.parse(r.data);a&&typeof a=="object"&&typeof a.status=="string"&&t(a)}catch{}}),()=>n.close()},[]),e}const xae="seeflow:last-project",jat=()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem(xae)}catch{return null}},KK=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(xae,e)}catch{}},$at=(e,t)=>{if(e.length===0)return null;if(e.length===1)return e[0]??null;if(t){const n=e.find(o=>o.id===t);if(n)return n}return null},Pat=(e,t)=>{const n=e!==null&&t!==null,[o,r]=m.useState(null),[a,i]=m.useState(n),[s,c]=m.useState(null),l=m.useCallback(()=>{!e||!t||(i(!0),fle(e,t).then(u=>{r(u),c(null)}).catch(u=>{console.error("[useDemoData] failed",u),c(String(u))}).finally(()=>i(!1)))},[e,t]),h=m.useCallback(u=>{r(u),c(null)},[]);return m.useEffect(()=>{if(!e||!t){r(null),i(!1);return}l()},[e,t,l]),{detail:o,loading:a,error:s,refresh:l,applyDetail:h}},zat=5,Rat={"node:running":"running","node:done":"done","node:error":"error"},Tat=(e,t)=>{if(t.type==="reset")return{};const n=e[t.nodeId]??[],o=[t.entry,...n].slice(0,zat);return{...e,[t.nodeId]:o}},Dat=e=>{const[t,n]=m.useReducer(Tat,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{const s=Rat[i.type];if(!s)return;const c=typeof i.nodeId=="string"?i.nodeId:null;if(!c)return;const l=typeof i.runId=="string"?i.runId:void 0,h=typeof i.ts=="number"?i.ts:Date.now();o.current({type:"append",nodeId:c,entry:{status:s,ts:h,runId:l}})},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{events:t,apply:r,reset:a}},Hat=(e,t)=>{var n,o;switch(t.type){case"reset":return{};case"running":return{...e,[t.nodeId]:{status:"running",runId:t.runId,ts:t.ts??Date.now()}};case"done":return{...e,[t.nodeId]:{...e[t.nodeId],status:"done",runId:t.runId??((n=e[t.nodeId])==null?void 0:n.runId),responseStatus:t.responseStatus,body:t.body,ts:t.ts??Date.now()}};case"error":return{...e,[t.nodeId]:{...e[t.nodeId],status:"error",runId:t.runId??((o=e[t.nodeId])==null?void 0:o.runId),error:t.message,ts:t.ts??Date.now()}}}},Oat=e=>{const[t,n]=m.useReducer(Hat,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{const s=typeof i.nodeId=="string"?i.nodeId:null;if(!s)return;const c=typeof i.runId=="string"?i.runId:void 0;if(i.type==="node:running"){o.current({type:"running",nodeId:s,runId:c,ts:i.ts});return}if(i.type==="node:done"){const l=typeof i.status=="number"?i.status:void 0;o.current({type:"done",nodeId:s,runId:c,responseStatus:l,body:i.body,ts:i.ts});return}if(i.type==="node:error"){const l=typeof i.message=="string"?i.message:void 0;o.current({type:"error",nodeId:s,runId:c,message:l,ts:i.ts})}},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{runs:t,apply:r,reset:a}},Fat=new Set(["ok","warn","error","pending"]),qat=(e,t)=>{if(t.type!=="node:status")return e;const n=typeof t.nodeId=="string"?t.nodeId:null;if(!n||typeof t.state!="string"||!Fat.has(t.state))return e;const o=typeof t.summary=="string"?t.summary:void 0,r=typeof t.detail=="string"?t.detail:void 0,a=t.data&&typeof t.data=="object"&&!Array.isArray(t.data)?t.data:void 0,i=typeof t.ts=="number"?t.ts:Date.now();return{...e,[n]:{state:t.state,summary:o,detail:r,data:a,ts:i}}},Vat=(e,t)=>{switch(t.type){case"reset":return{};case"event":return qat(e,t.event)}},Bat=e=>{const[t,n]=m.useReducer(Vat,{}),o=m.useRef(n);o.current=n,m.useEffect(()=>{o.current({type:"reset"})},[e]);const r=m.useCallback(i=>{o.current({type:"event",event:i})},[]),a=m.useCallback(()=>{o.current({type:"reset"})},[]);return{statusByNode:t,apply:r,reset:a}},Uat=(e,t={})=>{const[n,o]=m.useState(!1),{onHello:r,onFlowReload:a,onEvent:i}=t,s=m.useRef(r),c=m.useRef(a),l=m.useRef(i);return m.useEffect(()=>{s.current=r,c.current=a,l.current=i},[r,a,i]),m.useEffect(()=>{if(!e){o(!1);return}const h=`/api/events?flowId=${encodeURIComponent(e)}`,u=new EventSource(h);u.addEventListener("open",()=>o(!0)),u.addEventListener("error",()=>o(!1)),u.addEventListener("hello",()=>{var p;(p=s.current)==null||p.call(s)}),u.addEventListener("flow:reload",p=>{var k,x;const y=XK(p,"flow:reload");(k=l.current)==null||k.call(l,y);const g=Wat(y);g&&((x=c.current)==null||x.call(c,g))});for(const p of["node:running","node:done","node:error","node:status"])u.addEventListener(p,y=>{var g;(g=l.current)==null||g.call(l,XK(y,p))});return()=>{u.close()}},[e]),{connected:n}},XK=(e,t)=>{try{const n=JSON.parse(e.data);return{type:t,ts:Date.now(),...n}}catch{return{type:t,ts:Date.now()}}},Wat=e=>e.valid===!0&&e.flow&&typeof e.flow=="object"?{valid:!0,flow:e.flow}:e.valid===!1&&typeof e.error=="string"?{valid:!1,error:e.error}:null,ZK=["File","Edit","View","Tools","Layout","Selection","Help"],wae="seeflow:command-palette:recent",Mae=5,bae=new Map(KF.map(e=>[e.id,e])),Gat=e=>typeof e=="string"&&bae.has(e),YK=()=>{if(typeof window>"u")return[];try{const e=window.localStorage.getItem(wae);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.filter(Gat).slice(0,Mae):[]}catch{return[]}},Kat=e=>{if(!(typeof window>"u"))try{window.localStorage.setItem(wae,JSON.stringify(e))}catch{}},QK=(e,t)=>e.enabled?e.enabled(t):!0,Xat=(e,t)=>t.length===0?!0:`${e.label} ${e.description??""}`.toLowerCase().includes(t);function Zat({open:e,onOpenChange:t,runCommand:n,ctx:o}){const[r,a]=m.useState(""),[i,s]=m.useState(0),[c,l]=m.useState(()=>YK()),h=m.useRef(null),u=m.useRef(null);m.useEffect(()=>{e&&(a(""),s(0),l(YK()))},[e]);const{groups:p,flat:y}=m.useMemo(()=>{const b=r.trim().toLowerCase();if(b.length===0){if(c.length===0)return{groups:[],flat:[]};const P=[];for(const j of c){const z=bae.get(j);z&&P.push({cmd:z,enabled:QK(z,o)})}return{groups:[{category:"Recent",rows:P}],flat:P}}const C=new Map;for(const P of KF){if(!Xat(P,b))continue;const N={cmd:P,enabled:QK(P,o)},j=C.get(P.category);j?j.push(N):C.set(P.category,[N])}const S=[...ZK.filter(P=>C.has(P)),...Array.from(C.keys()).filter(P=>!ZK.includes(P))].map(P=>({category:P,rows:C.get(P)??[]})),E=S.flatMap(P=>P.rows);return{groups:S,flat:E}},[r,o,c]);m.useEffect(()=>{if(y.length===0){s(0);return}s(b=>{var _;let C=b;if(C>=y.length&&(C=0),!((_=y[C])!=null&&_.enabled)){const S=y.findIndex(E=>E.enabled);S!==-1&&(C=S)}return C})},[y]);const g=m.useCallback(b=>{y.length!==0&&s(C=>{var S;let _=C;for(let E=0;E<y.length;E++)if(_=(_+b+y.length)%y.length,(S=y[_])!=null&&S.enabled)return _;return C})},[y]),k=m.useCallback(b=>{l(C=>{const _=[b,...C.filter(S=>S!==b)].slice(0,Mae);return Kat(_),_})},[]),x=m.useCallback(b=>{const C=y[b];!C||!C.enabled||(k(C.cmd.id),n(C.cmd.id),t(!1))},[y,t,k,n]),v=m.useCallback(b=>{if(b.key==="ArrowDown"){b.preventDefault(),g(1);return}if(b.key==="ArrowUp"){b.preventDefault(),g(-1);return}b.key==="Enter"&&(b.preventDefault(),x(i))},[x,i,g]);m.useEffect(()=>{if(!e)return;const b=u.current;if(!b)return;const C=b.querySelector(`[data-command-row-index="${i}"]`);C&&typeof C.scrollIntoView=="function"&&C.scrollIntoView({block:"nearest"})},[i,e]);const w=r.trim().length>0;return f.jsx(vq,{open:e,onOpenChange:t,children:f.jsx(wR,{children:f.jsxs(o2,{className:ne("fixed left-0 right-0 top-[20%] z-50 mx-auto w-[480px] max-w-[90vw] border border-border bg-card shadow-lg duration-200","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","sm:rounded-lg"),"data-testid":"command-palette",onOpenAutoFocus:b=>{var C;b.preventDefault(),(C=h.current)==null||C.focus()},children:[f.jsx("div",{className:ne("border-b",y.length===0&&!w&&"border-b-0"),children:f.jsx("input",{ref:h,type:"text",value:r,onChange:b=>a(b.target.value),onKeyDown:v,placeholder:"Type a command…","data-testid":"command-palette-input","aria-label":"Search commands",autoComplete:"off",spellCheck:!1,className:"w-full bg-transparent px-4 py-3 text-sm outline-hidden placeholder:text-muted-foreground"})}),f.jsx("div",{ref:u,"data-testid":"command-palette-list","data-empty":y.length===0?"true":"false",className:ne("max-h-[50vh] overflow-y-auto",y.length>0?"py-1":"","seeflow-no-scrollbar"),children:y.length===0?w?f.jsxs("div",{"data-testid":"command-palette-empty",className:"px-4 py-6 text-center text-sm text-muted-foreground",children:['No commands match "',r,'"']}):null:(()=>{let b=-1;return p.map(C=>f.jsxs("div",{className:"py-1",children:[f.jsx("div",{className:"px-3 pb-1 pt-2 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:C.category}),C.rows.map(_=>{b+=1;const S=b,E=S===i;return f.jsxs("button",{type:"button","data-testid":`command-palette-row-${_.cmd.id}`,"data-command-row-index":S,"data-highlighted":E?"true":"false","aria-disabled":_.enabled?void 0:!0,disabled:!_.enabled,onMouseEnter:()=>{_.enabled&&s(S)},onClick:()=>x(S),className:ne("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-hidden",_.enabled?"cursor-pointer text-foreground hover:bg-muted":"cursor-not-allowed text-muted-foreground/50",E&&_.enabled?"bg-muted":""),children:[f.jsxs("div",{className:"flex min-w-0 flex-col",children:[f.jsx("span",{className:"truncate font-medium",children:_.cmd.label}),_.cmd.description?f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:_.cmd.description}):null]}),_.cmd.shortcut?f.jsx("kbd",{"data-testid":`command-palette-shortcut-${_.cmd.id}`,className:"shrink-0 rounded border bg-muted px-1.5 py-0.5 font-mono text-[11px] text-muted-foreground",children:_.cmd.shortcut}):null]},_.cmd.id)})]},C.category))})()})]})})})}function Yat(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Qat=/^[a-z0-9][a-z0-9-]*$/,Jat={"--tw-enter-translate-x":"-50%","--tw-enter-translate-y":"-50%","--tw-exit-translate-x":"-50%","--tw-exit-translate-y":"-50%","--tw-enter-scale":"1","--tw-exit-scale":"1"};function eit({open:e,onOpenChange:t,onCreate:n,onCreated:o}){const[r,a]=m.useState(""),[i,s]=m.useState(""),[c,l]=m.useState(!1),[h,u]=m.useState(null),[p,y]=m.useState(!1);m.useEffect(()=>{e&&(a(""),s(""),l(!1),u(null),y(!1))},[e]);const g=C=>{a(C),c||s(Yat(C))},k=C=>{s(C),c||l(!0)},x=i.trim(),v=r.trim(),M=x.length>0&&Qat.test(x),w=M&&v.length>0&&!p,b=async C=>{if(C.preventDefault(),!w){!M&&x.length>0&&u("Flow id must match /^[a-z0-9][a-z0-9-]*$/");return}y(!0),u(null);try{const S=await n({id:x,name:v});o==null||o(S),t(!1)}catch(_){u(_ instanceof Error?_.message:String(_)),y(!1)}};return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md",style:Jat,"data-testid":"flow-create-dialog",onOpenAutoFocus:C=>{C.preventDefault();const _=document.querySelector('[data-testid="flow-create-name-input"]');_==null||_.focus()},children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Create new flow"}),f.jsx(Po,{children:"A new flow folder is scaffolded under flows/<id>/ in your project."})]}),f.jsxs("form",{onSubmit:b,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Display name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:r,onChange:C=>g(C.target.value),"data-testid":"flow-create-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow id"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,placeholder:"my-retry-flow",value:i,onChange:C=>k(C.target.value),"data-testid":"flow-create-id-input",className:"rounded-md border bg-background px-3 py-2 font-mono text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("span",{className:"text-xs text-muted-foreground",children:"Auto-filled from the display name. Lowercase letters, digits, and dashes; must start with a letter or digit."})]}),h?f.jsx("div",{role:"alert","data-testid":"flow-create-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:h}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:p,children:"Cancel"}),f.jsx(Ke,{type:"submit",disabled:!w,"data-testid":"flow-create-submit",children:p?"Creating…":"Create flow"})]})]})]})})}function tit({open:e,onOpenChange:t,flow:n,flows:o,onDelete:r,onDeleted:a}){var M;const i=m.useMemo(()=>o.filter(w=>w.flowSlug!==(n==null?void 0:n.flowSlug)),[o,n==null?void 0:n.flowSlug]),s=((M=i[0])==null?void 0:M.flowSlug)??"",[c,l]=m.useState(s),[h,u]=m.useState(null),[p,y]=m.useState(!1);if(m.useEffect(()=>{e&&(l(s),u(null),y(!1))},[e,s]),!n)return f.jsx(fo,{open:!1,onOpenChange:t});const g=n.isDefault,k=c.length>0,x=(!g||k)&&!p,v=async w=>{if(w.preventDefault(),!!x){y(!0),u(null);try{const b=g?{newDefault:c}:void 0;await r(n.flowSlug,b),a==null||a(n.flowSlug,b==null?void 0:b.newDefault),t(!1)}catch(b){u(b instanceof Error?b.message:String(b)),y(!1)}}};return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"flow-delete-dialog",children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Delete flow"}),f.jsxs(Po,{children:["This removes flows/",n.flowSlug,"/ from disk and updates seeflow.json. The action cannot be undone."]})]}),f.jsxs("form",{onSubmit:v,className:"flex flex-col gap-4",children:[f.jsxs("p",{className:"text-sm",children:["Delete ",f.jsx("span",{className:"font-medium",children:n.name})," ",f.jsxs("span",{className:"font-mono text-muted-foreground",children:["(",n.flowSlug,")"]}),"?"]}),g?f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"New default flow"}),f.jsx("select",{value:c,onChange:w=>l(w.target.value),"data-testid":"flow-delete-new-default-select",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:i.map(w=>f.jsxs("option",{value:w.flowSlug,children:[w.name," (",w.flowSlug,")"]},w.flowSlug))}),f.jsxs("span",{className:"text-xs text-muted-foreground",children:[n.name," is the project default — pick a replacement before deleting."]})]}):null,h?f.jsx("div",{role:"alert","data-testid":"flow-delete-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:h}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:p,children:"Cancel"}),f.jsx(Ke,{type:"submit",variant:"destructive",disabled:!x,"data-testid":"flow-delete-submit",children:p?"Deleting…":"Delete"})]})]})]})})}function nit({open:e,onOpenChange:t,flow:n,onRename:o,onRenamed:r}){const[a,i]=m.useState(""),[s,c]=m.useState(null),[l,h]=m.useState(!1);if(m.useEffect(()=>{e&&n&&(i(n.name),c(null),h(!1))},[e,n]),!n)return f.jsx(fo,{open:!1,onOpenChange:t});const u=a.trim(),p=u!==n.name,y=u.length>0&&p&&!l,g=async k=>{if(k.preventDefault(),!!y){h(!0),c(null);try{const x={name:u},v=await o(n.flowSlug,x);r==null||r(v,n.flowSlug),t(!1)}catch(x){c(x instanceof Error?x.message:String(x)),h(!1)}}};return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md","data-testid":"flow-rename-dialog",onOpenAutoFocus:k=>{k.preventDefault();const x=document.querySelector('[data-testid="flow-rename-name-input"]');x==null||x.focus(),x==null||x.select()},children:[f.jsxs(jo,{children:[f.jsx($o,{children:"Rename flow"}),f.jsx(Po,{children:"Update the display name. The flow id is fixed once created."})]}),f.jsxs("form",{onSubmit:g,className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Flow id"}),f.jsx("input",{type:"text",readOnly:!0,disabled:!0,autoComplete:"off",spellCheck:!1,value:n.flowSlug,"data-testid":"flow-rename-id-input",className:"cursor-not-allowed rounded-md border bg-muted px-3 py-2 font-mono text-sm text-muted-foreground"})]}),f.jsxs("label",{className:"flex flex-col gap-1.5 text-sm",children:[f.jsx("span",{className:"font-medium",children:"Display name"}),f.jsx("input",{type:"text",required:!0,autoComplete:"off",spellCheck:!1,value:a,onChange:k=>i(k.target.value),"data-testid":"flow-rename-name-input",className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"})]}),s?f.jsx("div",{role:"alert","data-testid":"flow-rename-error",className:"rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive",children:s}):null,f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),disabled:l,children:"Cancel"}),f.jsx(Ke,{type:"submit",disabled:!y,"data-testid":"flow-rename-submit",children:l?"Saving…":"Save"})]})]})]})})}function oit({project:e,activeFlow:t,flows:n,onSelect:o,onCreate:r,onRename:a,onDelete:i}){const[s,c]=m.useState(!1),l=n.find(h=>h.flowSlug===t);return f.jsxs(Wd,{open:s,onOpenChange:c,children:[f.jsx(n2,{asChild:!0,children:f.jsxs(Ke,{type:"button",variant:"outline",size:"sm","aria-label":`Switch flow for ${e}`,"aria-expanded":s,className:"gap-2","data-testid":"flow-switcher-trigger",children:[f.jsx("span",{className:"max-w-[180px] truncate text-sm",children:(l==null?void 0:l.name)??t}),f.jsx(cae,{className:"h-3.5 w-3.5 opacity-60"})]})}),f.jsx(Gi,{align:"start",sideOffset:6,className:"w-[260px] p-0","data-testid":"flow-switcher-popover",children:f.jsx(Cq,{children:f.jsxs(Sq,{children:[f.jsx(Lq,{children:"No flows."}),n.length>0?f.jsx(mz,{heading:"Flows",children:n.map(h=>{const u=h.flowSlug===t;return f.jsxs(gz,{value:`${h.name} ${h.flowSlug}`,"aria-current":u?"true":void 0,"data-testid":`flow-switcher-row-${h.flowSlug}`,"data-active":u?"true":void 0,onSelect:()=>{c(!1),o==null||o(h.flowSlug)},className:ne("group flex items-center justify-between gap-2",u&&"bg-accent text-accent-foreground"),children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[h.icon?f.jsx("span",{"aria-hidden":"true",className:"text-xs opacity-70",children:h.icon}):null,f.jsx("span",{className:"truncate font-medium",children:h.name}),h.isDefault?f.jsx("span",{className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:"default"}):null]}),f.jsxs("div",{className:"flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100",children:[f.jsx("button",{type:"button","aria-label":`Rename ${h.name}`,"data-testid":`flow-switcher-rename-${h.flowSlug}`,className:"rounded p-0.5 hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:p=>{p.stopPropagation(),c(!1),a==null||a(h.flowSlug)},children:f.jsx(Irt,{className:"h-3.5 w-3.5"})}),f.jsx("button",{type:"button","aria-label":`Delete ${h.name}`,"data-testid":`flow-switcher-delete-${h.flowSlug}`,className:"rounded p-0.5 hover:text-destructive focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",onClick:p=>{p.stopPropagation(),c(!1),i==null||i(h.flowSlug)},children:f.jsx(dae,{className:"h-3.5 w-3.5"})})]})]},h.flowSlug)})}):null,n.length>0?f.jsx(Vte,{}):null,f.jsx(mz,{children:f.jsxs(gz,{value:"+ new flow","data-testid":"flow-switcher-create",onSelect:()=>{c(!1),r==null||r()},className:"flex items-center gap-2 text-sm",children:[f.jsx(lae,{className:"h-4 w-4 opacity-70"}),f.jsx("span",{className:"font-medium",children:"New flow"})]})})]})})})]})}const rit={"--tw-enter-translate-x":"-50%","--tw-enter-translate-y":"-50%","--tw-exit-translate-x":"-50%","--tw-exit-translate-y":"-50%","--tw-enter-scale":"1","--tw-exit-scale":"1"},JK=e=>e?`${e.project}/${e.flow}`:null,ait=e=>{const t=e.indexOf("/");return t<1||t===e.length-1?null:{project:e.slice(0,t),flow:e.slice(t+1)}},eX=e=>`linkflow-picker-row-${e.replace(/\//g,"__")}`;function iit({open:e,onOpenChange:t,mode:n,demos:o,currentSlug:r,initialTarget:a,onCommit:i}){const[s,c]=m.useState(""),[l,h]=m.useState(()=>n==="edit"?JK(a):null);m.useEffect(()=>{e&&(c(""),h(n==="edit"?JK(a):null))},[e,n,a]);const u=m.useMemo(()=>{const w=s.trim().toLowerCase();return w.length===0?o.slice():o.filter(b=>(b.slug.split("/")[0]??"").toLowerCase().includes(w)||b.name.toLowerCase().includes(w))},[o,s]),p=m.useMemo(()=>l?u.findIndex(w=>w.slug===l):-1,[u,l]),y=m.useCallback(w=>{if(u.length===0)return;const b=u.length,C=p<0?w===1?0:b-1:(p+w+b)%b,_=u[C];_&&h(_.slug)},[u,p]),g=m.useCallback(()=>{if(p<0||!l)return;const w=ait(l);w&&(i(w),t(!1))},[l,p,i,t]),k=m.useCallback(w=>{w.key==="ArrowDown"?(w.preventDefault(),y(1)):w.key==="ArrowUp"?(w.preventDefault(),y(-1)):w.key==="Enter"?(w.preventDefault(),g()):w.key==="Escape"&&(w.preventDefault(),t(!1))},[y,g,t]),x=n==="edit"?"Change linked flow":"Link to a flow",v=l&&p>=0?eX(l):void 0,M=p>=0;return f.jsx(fo,{open:e,onOpenChange:t,children:f.jsxs(Eo,{className:"sm:max-w-md",style:rit,"data-testid":"linkflow-picker-dialog",onOpenAutoFocus:w=>{w.preventDefault();const b=document.querySelector('[data-testid="linkflow-picker-search"]');b==null||b.focus()},children:[f.jsxs(jo,{children:[f.jsx($o,{"data-testid":"linkflow-picker-title",children:x}),f.jsx(Po,{children:"Pick a flow to navigate to from this node."})]}),f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsx("input",{type:"text",value:s,onChange:w=>c(w.target.value),onKeyDown:k,placeholder:"Search flows…","data-testid":"linkflow-picker-search","aria-label":"Search flows","aria-activedescendant":v,autoComplete:"off",spellCheck:!1,className:"rounded-md border bg-background px-3 py-2 text-sm outline-hidden ring-offset-background focus:border-ring focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"}),f.jsx("div",{"aria-label":"Flows","data-testid":"linkflow-picker-list",style:{maxHeight:"304px"},className:"overflow-y-auto rounded-md border seeflow-no-scrollbar",children:u.length===0?f.jsx("div",{"data-testid":"linkflow-picker-empty",className:"px-3 py-6 text-center text-sm text-muted-foreground",children:s.trim().length===0?"No flows registered.":`No flows match "${s}"`}):u.map(w=>{const b=w.slug.split("/")[0]??"",C=w.slug===l,_=w.slug===r;return f.jsxs("button",{type:"button",id:eX(w.slug),"data-testid":`linkflow-picker-row-${w.slug}`,"data-selected":C?"true":"false",onMouseDown:S=>{S.preventDefault()},onClick:()=>h(w.slug),className:ne("flex w-full items-center justify-between gap-3 px-3 py-2 text-left text-sm outline-hidden",C?"bg-muted text-foreground":"text-foreground hover:bg-muted/60"),children:[f.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:b}),f.jsx("span",{"aria-hidden":"true",className:"shrink-0 text-muted-foreground/60",children:"·"}),f.jsx("span",{className:"truncate font-medium",children:w.name})]}),_?f.jsx("span",{"data-testid":`linkflow-picker-current-badge-${w.slug}`,className:"shrink-0 rounded bg-muted px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-muted-foreground",children:"Currently viewing"}):null]},w.slug)})})]}),f.jsxs(ar,{children:[f.jsx(Ke,{type:"button",variant:"ghost",onClick:()=>t(!1),"data-testid":"linkflow-picker-cancel",children:"Cancel"}),f.jsx(Ke,{type:"button",onClick:g,disabled:!M,"data-testid":"linkflow-picker-commit",children:"Link"})]})]})})}const sit=(e,t)=>{if(e.has(t))return e;const n=new Set(e);return n.add(t),n},cit=(e,t)=>{if(t.length===0)return e;let n=!1;const o=new Set(e);for(const r of t)o.has(r)||(o.add(r),n=!0);return n?o:e},lit=(e,t)=>{if(!e.has(t))return e;const n=new Set(e);return n.delete(t),n},dit=(e,t)=>{if(t.length===0)return e;let n=!1;const o=new Set(e);for(const r of t)o.has(r)&&(o.delete(r),n=!0);return n?o:e},uit=(e,t)=>{if(e.size===0)return e;const n=new Set(t.map(a=>a.id));let o=!1;const r=new Set(e);for(const a of r)n.has(a)||(r.delete(a),o=!0);return o?r:e},tX=()=>{const[e,t]=m.useState(()=>new Set),n=m.useCallback(c=>{t(l=>sit(l,c))},[]),o=m.useCallback(c=>{t(l=>cit(l,c))},[]),r=m.useCallback(c=>{t(l=>lit(l,c))},[]),a=m.useCallback(c=>{t(l=>dit(l,c))},[]),i=m.useCallback(c=>{t(l=>uit(l,c))},[]),s=m.useCallback(()=>t(new Set),[]);return{ids:e,mark:n,markMany:o,unmark:r,unmarkMany:a,pruneAgainst:i,reset:s}},bD=(e,t)=>e===t?!0:e==null||t==null||typeof e!=typeof t||typeof e!="object"?!1:JSON.stringify(e)===JSON.stringify(t),hit=(e,t,n)=>({...e,[t]:{...e[t],...n}}),fit=(e,t)=>{if(!(t in e))return e;const n={...e};return delete n[t],n},nX=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),pit=(e,t)=>{const n=Object.entries(e);if(n.length===0)return e;const o=new Map(t.map(i=>[i.id,i]));let r=!1;const a={...e};for(const[i,s]of n){const c=o.get(i);if(!c)continue;const l={},h=l;let u=!1;for(const p of Object.keys(s)){const y=s[p],g=c[p];if(p==="data"&&nX(y)&&nX(g)){const k={};let x=!1;for(const v of Object.keys(y))bD(y[v],g[v])||(k[v]=y[v],x=!0);x&&(h[p]=k,u=!0)}else bD(y,g)||(h[p]=y,u=!0)}u?bD(l,s)||(a[i]=l,r=!0):(delete a[i],r=!0)}return r?a:e},oX=()=>{const[e,t]=m.useState({}),n=m.useCallback((i,s)=>{t(c=>hit(c,i,s))},[]),o=m.useCallback(i=>{t(s=>fit(s,i))},[]),r=m.useCallback(i=>{t(s=>pit(s,i))},[]),a=m.useCallback(()=>t({}),[]);return{overrides:e,setOverride:n,dropOverride:o,pruneAgainst:r,reset:a}};function yit({nodes:e,connectors:t,flowPos:n,nodeIdGen:o,connectorIdGen:r,defaultOffset:a={x:24,y:24}}){const i=new Map;for(const y of e)i.set(y.id,o(y.id));let s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;for(const y of e)y.position.x<s&&(s=y.position.x),y.position.y<c&&(c=y.position.y);Number.isFinite(s)||(s=0),Number.isFinite(c)||(c=0);const l=n?n.x-s:a.x,h=n?n.y-c:a.y,u=e.map(y=>{const g=i.get(y.id);if(g===void 0)throw new Error(`paste id missing for ${y.id}`);return{...y,id:g,position:{x:y.position.x+l,y:y.position.y+h}}}),p=t.map(y=>{const g=r(y.id);return{...y,id:g,source:i.get(y.source)??y.source,target:i.get(y.target)??y.target}});return{newNodes:u,newConnectors:p,idMap:i}}const mit=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploading:!0}}),git=e=>({type:"image",data:_ae(e)}),kit=e=>({type:"image",position:e.position,data:{path:"",alt:e.originalFilename,width:e.dims.width,height:e.dims.height,_uploadError:e.message}}),_ae=e=>({...UHe(e.path,e.dims,e.lastUsed),alt:e.originalFilename}),vit=async(e,t)=>{const{nodeId:n,flowId:o,file:r,originalFilename:a,position:i,dims:s,lastUsed:c}=e;t.rememberRetry(n,{file:r,originalFilename:a,position:i,dims:s}),t.setOverride(n,mit({position:i,dims:s,originalFilename:a}));const l=async()=>{let h;try{h=(await t.upload(o,n,r,a)).path}catch(y){const g=y instanceof Error?y.message:String(y);throw t.setOverride(n,kit({position:i,dims:s,originalFilename:a,message:g})),y}t.setOverride(n,git({path:h,dims:s,originalFilename:a,lastUsed:c}));const u=_ae({path:h,dims:s,originalFilename:a,lastUsed:c}),p={id:n,type:"image",position:i,data:u};await t.createNode(o,p),t.forgetRetry(n)};if(t.history){await t.history.batch("insert-image",l);return}await l()};function xit(e,t){if(!e)return null;const n=`${e.project}/${e.flow}`,o=t.find(r=>r.slug===n);return o?{projectName:e.project,flowName:o.name}:null}const wit="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Mit=248;function Mr(e=10){let t="";const n=new Uint8Array(e*2);for(;t.length<e;){crypto.getRandomValues(n);for(let o=0;o<n.length&&t.length<e;o++){const r=n[o];r<Mit&&(t+=wit[r%62])}}return t}const bit=new Set(["INPUT","TEXTAREA","SELECT"]),br=e=>e?bit.has(e.tagName)?!0:e instanceof HTMLElement&&e.isContentEditable:!1,_it=(e,t,n)=>{const o=e.indexOf(t);if(o<0)return null;const r=e.length,a=[...e];switch(n.op){case"forward":{if(o>=r-1)return null;const i=a[o],s=a[o+1];return i===void 0||s===void 0?null:(a[o]=s,a[o+1]=i,a)}case"backward":{if(o<=0)return null;const i=a[o],s=a[o-1];return i===void 0||s===void 0?null:(a[o]=s,a[o-1]=i,a)}case"toFront":{if(o===r-1)return null;const[i]=a.splice(o,1);return i===void 0?null:(a.push(i),a)}case"toBack":{if(o===0)return null;const[i]=a.splice(o,1);return i===void 0?null:(a.unshift(i),a)}case"toIndex":{const i=Math.min(Math.max(n.index,0),r-1);if(i===o)return null;const[s]=a.splice(o,1);return s===void 0?null:(a.splice(i,0,s),a)}}};function Cit({project:e,flow:t,slug:n,demos:o,detail:r,loading:a,runs:i,nodeEvents:s,statusByNode:c,externalReloadSignal:l,onPlayNode:h,refreshFlows:u,canvasRef:p}){var s2,ca;const y=o.find(V=>V.slug===n),{flows:g,createFlow:k,renameFlow:x,deleteFlow:v}=IF(e),[M,w]=m.useState([]),[b,C]=m.useState([]),[_,S]=m.useState(null),E=m.useRef(M),P=m.useRef(b);m.useEffect(()=>{E.current=M},[M]),m.useEffect(()=>{P.current=b},[b]);const N=m.useRef(null),j=oX(),z=oX(),U=tX(),A=tX(),[T,D]=m.useState(null),[O,I]=m.useState(null),[R,L]=m.useState({kind:"select"}),q=m.useRef({kind:"select"});m.useEffect(()=>{q.current=R},[R]);const[H,$]=m.useState(!1),[X,G]=m.useState(null),Q=m.useRef(new Set),oe=`${e}/${t}`,re=!Q.current.has(oe);m.useEffect(()=>{Q.current.add(oe)},[oe]);const te=m.useRef(null),ce=m.useCallback(V=>{te.current=V},[]),{reset:ke}=j,{reset:ve}=z,{reset:xe}=U,{reset:He}=A;m.useEffect(()=>{w([]),C([]),S(null),ke(),ve(),xe(),He(),D(null),I(null),xo.current=null,fr(!1),ko.current.clear()},[r==null?void 0:r.id]);const Ze=m.useCallback((V,F)=>{w(V),C(F)},[]),ue=(s2=r==null?void 0:r.flow)==null?void 0:s2.nodes,Ie=(ca=r==null?void 0:r.flow)==null?void 0:ca.connectors,{pruneAgainst:zt}=j,{pruneAgainst:pt}=z,{pruneAgainst:tn}=U,{pruneAgainst:se}=A;m.useEffect(()=>{if(!(!ue||!T)&&ue.length===T.length){for(let V=0;V<ue.length;V++){const F=ue[V],B=T[V];if(!F||F.id!==B)return}D(null)}},[ue,T]);const J=(r==null?void 0:r.id)??null,Rt=m.useMemo(()=>WHe({baseUrl:"",project:e,flow:t}),[e,t]),fn=m.useRef({nodes:[],connectors:[]});m.useEffect(()=>{fn.current={nodes:ue??[],connectors:Ie??[]}},[ue,Ie]);const{adapter:ae,history:Y}=m.useMemo(()=>tOe(Rt,()=>fn.current),[Rt,J]);m.useEffect(()=>{ue&&(zt(ue),tn(ue))},[ue,zt,tn]),m.useEffect(()=>{Ie&&(pt(Ie),se(Ie))},[Ie,pt,se]);const he=m.useRef(!1);m.useEffect(()=>{if(!he.current){he.current=!0;return}Y.markExternalChange()},[l,Y]);const[Ae,Re]=m.useState(!1),[We,Vt]=m.useState(null),[pn,nn]=m.useState(null),{setOverride:ge,dropOverride:Le}=j,At=m.useRef(j.overrides);m.useEffect(()=>{At.current=j.overrides},[j.overrides]);const Tn=m.useCallback((V,F)=>{!J||!ae||(ge(V,{position:F}),I(null),ae.updateNodePosition(V,F).catch(B=>{Le(V),I(B instanceof Error?B.message:String(B)),console.error("updateNodePosition failed",B)}))},[J,ae,ge,Le]),cn=m.useCallback(V=>{if(!J||!ae||V.length===0)return;const F=V.map(B=>(ue==null?void 0:ue.find(ee=>ee.id===B.id))?{id:B.id,next:B.position}:null).filter(B=>B!==null);if(F.length!==0){for(const B of F)ge(B.id,{position:B.next});I(null),Y.batch("move-nodes",async()=>{for(const B of F)await ae.updateNodePosition(B.id,B.next)}).catch(B=>{for(const K of F)Le(K.id);I(B instanceof Error?B.message:String(B)),console.error("updateNodePosition batch failed",B)})}},[J,ae,Y,ue,ge,Le]),eu=m.useCallback((V,F)=>{ge(V,{position:{x:F.x,y:F.y},data:{width:F.width,height:F.height}})},[ge]),i2=m.useCallback((V,F)=>{if(!J||!ae)return;const B={width:F.width,height:F.height,position:{x:F.x,y:F.y}};ge(V,{position:B.position,data:{width:B.width,height:B.height}}),I(null),ae.updateNode(V,B).catch(K=>{Le(V),I(K instanceof Error?K.message:String(K)),console.error("updateNode resize failed",K)})},[J,ae,ge,Le]),Qn=m.useCallback(V=>{if(!J||!ae)return;const F={autoSize:!0};ge(V,{data:{autoSize:!0,width:void 0,height:void 0}}),I(null),ae.updateNode(V,F).catch(B=>{Le(V),I(B instanceof Error?B.message:String(B)),console.error("updateNode (fit-to-content) failed",B)})},[J,ae,ge,Le]),go=m.useCallback(V=>{if(!J||!ae||V.length===0)return;const F=[];for(const K of V){if(!(ue==null?void 0:ue.find(dt=>dt.id===K.id)))continue;const ze={position:K.position};K.width!==void 0&&(ze.width=K.width),K.height!==void 0&&(ze.height=K.height),F.push({id:K.id,next:ze})}if(F.length===0)return;for(const K of F){const ee={};K.next.width!==void 0&&(ee.width=K.next.width),K.next.height!==void 0&&(ee.height=K.next.height),ge(K.id,{position:K.next.position,...Object.keys(ee).length>0?{data:ee}:{}})}I(null);const B=F.map(K=>K.id).slice().sort().join(",");Y.batch("multi-resize",async()=>{for(const K of F)await ae.updateNode(K.id,K.next)},{coalesceKey:`multi:resize:${B}`}).catch(K=>{for(const ee of F)Le(ee.id);I(K instanceof Error?K.message:String(K)),console.error("updateNode multi-resize batch failed",K)})},[J,ae,Y,ue,ge,Le]),{setOverride:xt,dropOverride:rt}=z,tu=m.useCallback((V,F)=>{ge(V,{data:F})},[ge]),Xi=m.useCallback((V,F)=>{for(const B of V)ge(B,{data:F})},[ge]),nu=m.useCallback((V,F)=>{xt(V,F)},[xt]),ou=m.useCallback((V,F)=>{!J||!ae||(aW(ri,F),ge(V,{data:F}),I(null),ae.updateNode(V,F).catch(B=>{Le(V),I(B instanceof Error?B.message:String(B)),console.error("updateNode style failed",B)}))},[J,ae,ge,Le]),ru=m.useCallback((V,F)=>{if(!J||!ae||V.length===0)return;aW(ri,F);const B=V.filter(K=>ue==null?void 0:ue.some(ee=>ee.id===K));if(B.length!==0){for(const K of B)ge(K,{data:F});I(null),Y.batch("style-nodes",async()=>{for(const K of B)await ae.updateNode(K,F)}).catch(K=>{for(const ee of B)Le(ee);I(K instanceof Error?K.message:String(K)),console.error("updateNode style-nodes batch failed",K)})}},[J,ae,Y,ue,ge,Le]),au=m.useCallback((V,F)=>{!J||!ae||(OHe(ri,F),xt(V,F),I(null),ae.updateConnector(V,F).catch(B=>{rt(V),I(B instanceof Error?B.message:String(B)),console.error("updateConnector failed",B)}))},[J,ae,xt,rt]),{mark:Zi,markMany:Yi,unmark:Qi,unmarkMany:Ji}=U,{markMany:ta,unmarkMany:na}=A,iu=m.useCallback(V=>{if(!J||!ae||!(ue==null?void 0:ue.find(ee=>ee.id===V)))return;const B=(Ie??[]).filter(ee=>ee.source===V||ee.target===V).map(ee=>ee.id),K=new Set(B);I(null),Zi(V),B.length>0&&ta(B),w(ee=>ee.filter(ze=>ze!==V)),C(ee=>ee.filter(ze=>!K.has(ze))),ae.deleteNode(V).catch(ee=>{Qi(V),B.length>0&&na(B),I(ee instanceof Error?ee.message:String(ee)),console.error("deleteNode failed",ee)})},[J,ae,ue,Ie,Zi,ta,Qi,na]),su=m.useCallback((V,F)=>{if(!J||!ae||!ue)return;const B=T??ue.map(ee=>ee.id),K=_it(B,V,F);K&&(D(K),I(null),ae.reorderNode(V,F).catch(ee=>{D(null),I(ee instanceof Error?ee.message:String(ee)),console.error("reorderNode failed",ee)}))},[J,ae,ue,T]),Ro=m.useCallback((V,F)=>{if(!J||!ae||V.length===0&&F.length===0)return;const B=new Set(V),K=V.map(Te=>ue==null?void 0:ue.find(on=>on.id===Te)).filter(Te=>!!Te),ee=(Ie??[]).filter(Te=>B.has(Te.source)||B.has(Te.target)),ze=new Set(ee.map(Te=>Te.id)),dt=F.map(Te=>Ie==null?void 0:Ie.find(on=>on.id===Te)).filter(Te=>!!Te).filter(Te=>!ze.has(Te.id));if(K.length===0&&ee.length===0&&dt.length===0)return;I(null);const Ye=K.map(Te=>Te.id),Et=[...ee.map(Te=>Te.id),...dt.map(Te=>Te.id)];Ye.length>0&&Yi(Ye),Et.length>0&&ta(Et);const Sn=K;w(Te=>Te.filter(on=>!B.has(on)));const Hn=new Set(dt.map(Te=>Te.id));C(Te=>Te.filter(on=>!Hn.has(on)&&!ze.has(on))),Y.batch("delete-selection",async()=>{for(const Te of Sn)await ae.deleteNode(Te.id);await Promise.all(dt.map(Te=>ae.deleteConnector(Te.id)))}).catch(Te=>{Ye.length>0&&Ji(Ye),Et.length>0&&na(Et),I(Te instanceof Error?Te.message:String(Te)),console.error("deleteSelection batch failed",Te)})},[J,ae,Y,ue,Ie,Yi,ta,Ji,na]);m.useEffect(()=>{N.current=Ro},[Ro]),m.useEffect(()=>{const V=F=>{if(F.key!=="Delete"&&F.key!=="Backspace"||br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const B=E.current,K=P.current;B.length===0&&K.length===0||(F.preventDefault(),Ro(B,K))};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[Ro]);const es=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{name:F}}),I(null),ae.updateNode(V,{name:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateNode name failed",B)}))},[J,ae,ge]),Da=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{description:F}}),I(null),ae.updateNode(V,{description:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateNode description failed",B)}))},[J,ae,ge]),ts=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{detail:F}}),I(null),ae.updateNode(V,{detail:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateNode detail failed",B)}))},[J,ae,ge]),ns=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{icon:F??void 0}}),I(null),ae.updateNode(V,{icon:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateNode icon failed",B)}))},[J,ae,ge]),qe=m.useCallback((V,F)=>{!J||!ae||(ge(V,{data:{target:F}}),I(null),ae.updateNode(V,{target:F}).catch(B=>{Le(V),I(B instanceof Error?B.message:String(B)),console.error("updateNode target failed",B)}))},[J,ae,ge,Le]),oa=m.useCallback((V,F,B)=>{if(!J||!ae)return;I(null);const K=`node-${Mr()}`,ee=sW(V,B,T2(ri).node),ze={id:K,type:V,position:F,data:ee};ge(K,{id:K,type:V,position:F,data:ee}),ae.createNode(ze).catch(Ye=>{Le(K),I(Ye instanceof Error?Ye.message:String(Ye)),console.error("createNode failed",Ye)})},[J,ae,ge,Le]),Tt=m.useCallback((V,F)=>{if(!J||!ae)return;I(null);const B=`node-${Mr()}`,K={width:F.width,height:F.height},ee={id:B,type:"linkflow",position:V,data:K},ze={...K,_autoOpenPickerOnMount:!0};ge(B,{id:B,type:"linkflow",position:V,data:ze}),ae.createNode(ee).catch(Ye=>{Le(B),I(Ye instanceof Error?Ye.message:String(Ye)),console.error("createNode (linkflow) failed",Ye)})},[J,ae,ge,Le]),Ha=m.useCallback((V,F)=>{if(!J||!ae)return;I(null);const B=`node-${Mr()}`,K={icon:V,width:P0.width,height:P0.height},ee={id:B,type:"icon",position:F,data:K};ge(B,{id:B,type:"icon",position:F,data:K}),w([B]),ae.createNode(ee).catch(dt=>{Le(B),I(dt instanceof Error?dt.message:String(dt)),console.error("createNode (icon) failed",dt)})},[J,ae,ge,Le]),cu=m.useCallback(V=>{if(!J||!ae)return;I(null);const F=`node-${Mr()}`,B={id:F,type:"html",position:V.position,data:{}},K={id:F,type:"html",position:V.position,data:{}};ge(F,K),w([F]),ae.createNode(B).catch(ee=>{Le(F),I(ee instanceof Error?ee.message:String(ee)),console.error("createNode (type:'html') failed",ee)})},[J,ae,ge,Le]),ko=m.useRef(new Map),vo=m.useCallback((V,F)=>{ko.current.set(V,F)},[]),ra=m.useCallback(V=>{ko.current.delete(V)},[]),_n=m.useCallback(V=>{!J||!ae||(I(null),vit({...V,flowId:J,lastUsed:T2(ri).node},{upload:async(F,B,K,ee)=>ae.uploadImage(B,await oEe(K),ee),createNode:async(F,B)=>{const{id:K}=await ae.createNode(B);return{id:K}},setOverride:ge,history:Y,rememberRetry:vo,forgetRetry:ra}).catch(F=>{console.error("image-upload-flow failed",F)}))},[J,ae,Y,ge,vo,ra]),lr=m.useCallback(V=>{if(!J||!ae)return;const F=`node-${Mr()}`;_n({nodeId:F,...V})},[J,ae,_n]),Cn=m.useCallback(V=>{const F=ko.current.get(V);F&&_n({nodeId:V,...F})},[_n]),[Lt,aa]=m.useState({open:!1,mode:"insert"}),dr=m.useCallback((V,F)=>{aa({open:!0,mode:V,nodeId:F})},[]),ia=m.useCallback(()=>{aa(V=>({...V,open:!1}))},[]),lu=m.useCallback(()=>{dr("insert")},[dr]),du=m.useCallback(V=>dr("replace",V),[dr]),Nt=m.useCallback(V=>{if(IHe(V),Lt.mode==="replace"&&Lt.nodeId){if(J&&ae){const F=Lt.nodeId;ge(F,{data:{icon:V}}),I(null),ae.updateNode(F,{icon:V}).catch(B=>{Le(F),I(B instanceof Error?B.message:String(B)),console.error("updateNode (icon replace) failed",B)})}}else{const F=te.current;if(F&&J){const B=LHe(F,{width:window.innerWidth,height:window.innerHeight});Ha(V,B)}}ia()},[Lt.mode,Lt.nodeId,J,ae,ge,Le,Ha,ia]),ur=m.useCallback((V,F)=>{!J||!ae||(xt(V,{label:F}),I(null),ae.updateConnector(V,{label:F}).catch(B=>{I(B instanceof Error?B.message:String(B)),console.error("updateConnector label failed",B)}))},[J,ae,xt]),Oa=m.useCallback((V,F,B)=>{if(!J||!ae)return;const K=`conn-${Mr()}`,ee=B==null?void 0:B.targetPin,ze=T2(ri).connector,dt={id:K,source:V,target:F,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...ze},Ye={id:K,source:V,target:F,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...ee?{targetPin:ee}:{},...ze};xt(K,dt),I(null),ae.createConnector(Ye).catch(Et=>{rt(K),I(Et instanceof Error?Et.message:String(Et)),console.error("createConnector failed",Et)})},[J,ae,xt,rt]),uu=m.useCallback(({sourceNodeId:V,position:F,shape:B})=>{if(!J||!ae)return;I(null);const K=`node-${Mr()}`,ee=`conn-${Mr()}`,ze=fz[B],dt=T2(ri),Ye=sW(B,ze,dt.node),Et={id:K,type:B,position:F,data:Ye},Sn={id:ee,source:V,target:K,sourceHandleAutoPicked:!0,targetHandleAutoPicked:!0,...dt.connector};ge(K,{id:K,type:B,position:F,data:Ye}),xt(ee,Sn),S(K),Y.batch("create-and-connect",async()=>{await ae.createNode(Et),await ae.createConnector(Sn)}).catch(Te=>{Le(K),rt(ee),I(Te instanceof Error?Te.message:String(Te)),console.error("createAndConnectFromPane failed",Te)})},[J,ae,Y,ge,Le,xt,rt]),xo=m.useRef(null),[hr,fr]=m.useState(!1),[Fa,qa]=m.useState(()=>({canUndo:Y.canUndo,canRedo:Y.canRedo}));m.useEffect(()=>Y.subscribe(qa),[Y]);const Dn=m.useCallback(V=>{if(!ue)return;const F=new Set(V),B=ue.filter(ee=>F.has(ee.id));if(B.length===0)return;const K=(Ie??[]).filter(ee=>F.has(ee.source)&&F.has(ee.target));xo.current=JSON.parse(JSON.stringify({nodes:B,connectors:K})),fr(!0)},[ue,Ie]),Bt=m.useCallback(V=>{if(!J||!ae)return;const F=xo.current;if(!F||F.nodes.length===0)return;const{newNodes:B,newConnectors:K}=yit({nodes:F.nodes,connectors:F.connectors,flowPos:V,nodeIdGen:()=>`node-${Mr()}`,connectorIdGen:()=>`conn-${Mr()}`});for(const ee of B)ge(ee.id,ee);for(const ee of K)xt(ee.id,ee);w(B.map(ee=>ee.id)),C(K.map(ee=>ee.id)),I(null),Y.batch("paste",async()=>{for(const ee of B)await ae.createNode({id:ee.id,type:ee.type,position:ee.position,data:ee.data});for(const ee of K)await ae.createConnector(ee)}).catch(ee=>{for(const ze of B)Le(ze.id);for(const ze of K)rt(ze.id);I(ee instanceof Error?ee.message:String(ee)),console.error("paste failed",ee)})},[J,ae,Y,ge,Le,xt,rt]);m.useEffect(()=>{const V=F=>{const B=THe({event:F,isEditableActive:br(document.activeElement),hasNodes:!!ue&&ue.length>0,hasConnectors:!!Ie&&Ie.length>0,selectedIds:E.current,hasClipboard:!!xo.current});if(B.type!=="noop"&&!(B.type==="copy"||B.type==="paste")){if(F.preventDefault(),B.type==="selectAll"){w((ue??[]).map(K=>K.id)),C((Ie??[]).map(K=>K.id));return}Dn([...B.ids]),Bt(null)}};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[ue,Ie,Dn,Bt]),m.useEffect(()=>{const V=F=>{const B=PHe(F);if(!B||br(document.activeElement))return;const K=E.current;if(K.length===0)return;const ee=j.overrides,ze=(ue??[]).map(Ye=>{var Sn;const Et=((Sn=ee[Ye.id])==null?void 0:Sn.position)??Ye.position;return{id:Ye.id,position:Et}}),dt=RHe(B,K,ze);if(dt.length!==0)if(F.preventDefault(),dt.length===1){const Ye=dt[0];Ye&&Tn(Ye.id,Ye.position)}else cn(dt)};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[ue,j.overrides,Tn,cn]),m.useEffect(()=>{const V=F=>{const B=zHe(F);if(!B||br(document.activeElement))return;F.preventDefault();const K=te.current;K&&(B==="fit"?K.fitView({padding:.2,duration:200}):B==="in"?K.zoomIn({duration:150}):K.zoomOut({duration:150}))};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]);const yn=m.useCallback(async V=>{if(!J||!ae||!ue||!ae.computeLayout)return;const F=j.overrides,B=te.current,K=V==="selection"?new Set(E.current):null,ee=K?ue.filter(Ge=>K.has(Ge.id)):ue;if(ee.length<2)return;const ze=new Set(ee.map(Ge=>Ge.id)),dt=(Ie??[]).filter(Ge=>ze.has(Ge.source)&&ze.has(Ge.target)),Ye=new Map,Et=ee.map(Ge=>{var vu;const rn=((vu=F[Ge.id])==null?void 0:vu.position)??Ge.position;Ye.set(Ge.id,rn);const Ut=B==null?void 0:B.getInternalNode(Ge.id),Zt=Ut==null?void 0:Ut.measured,gu=Ge.data,c2=(Zt==null?void 0:Zt.width)??gu.width??200,ku=(Zt==null?void 0:Zt.height)??gu.height??120;return{id:Ge.id,type:Ge.type,width:c2,height:ku}}),Sn=dt.map(Ge=>({id:Ge.id,source:Ge.source,target:Ge.target})),Hn=await ae.computeLayout(Et,Sn),Te=new Map;for(const[Ge,rn]of Object.entries(Hn.nodes))Te.set(Ge,rn.position);let on=Number.POSITIVE_INFINITY,pu=Number.POSITIVE_INFINITY,yu=Number.POSITIVE_INFINITY,mu=Number.POSITIVE_INFINITY;for(const Ge of Et){const rn=Ye.get(Ge.id);if(!rn)continue;rn.x<on&&(on=rn.x),rn.y<pu&&(pu=rn.y);const Ut=Te.get(Ge.id);Ut&&(Ut.x<yu&&(yu=Ut.x),Ut.y<mu&&(mu=Ut.y))}const qR=Number.isFinite(on)&&Number.isFinite(yu)?on-yu:0,VR=Number.isFinite(pu)&&Number.isFinite(mu)?pu-mu:0,Ga=[];for(const Ge of Et){const rn=Ye.get(Ge.id),Ut=Te.get(Ge.id);if(!rn||!Ut)continue;const Zt={x:Ut.x+qR,y:Ut.y+VR},gu=Zt.x-rn.x,c2=Zt.y-rn.y;Math.abs(gu)<1&&Math.abs(c2)<1||Ga.push({id:Ge.id,prev:rn,next:Zt})}if(Ga.length!==0){I(null);for(const Ge of Ga)ge(Ge.id,{position:Ge.next});Y.batch("tidy",async()=>{for(const Ge of Ga)await ae.updateNodePosition(Ge.id,Ge.next)}).catch(Ge=>{for(const rn of Ga)Le(rn.id);I(Ge instanceof Error?Ge.message:String(Ge)),console.error("Tidy batch failed",Ge)})}},[J,ae,Y,ue,Ie,j.overrides,ge,Le]);m.useEffect(()=>{const V=F=>{if(!(F.metaKey||F.ctrlKey)||!F.shiftKey||F.altKey||F.key.toLowerCase()!=="l"||br(document.activeElement))return;F.preventDefault();const B=E.current.length>0?"selection":"all";yn(B)};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[yn]);const os=m.useCallback(()=>{const V=E.current.length>0?"selection":"all";yn(V)},[yn]);m.useEffect(()=>{const V=F=>{if(br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const B=HHe(F);if(B===null)return;const K=q.current;if(B==="select"){K.kind!=="select"&&L({kind:"select"});return}if(B==="hand"){L(K.kind==="hand"?{kind:"select"}:{kind:"hand"});return}if(K.kind==="draw"&&K.shape===B){L({kind:"select"});return}L({kind:"draw",shape:B})};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]),m.useEffect(()=>{const V=F=>{if(F.key!=="Escape"||br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;if(q.current.kind!=="select"){L({kind:"select"});return}E.current.length>0&&w([]),P.current.length>0&&C([])};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]),m.useEffect(()=>{const V=F=>{if(F.key.toLowerCase()!=="f"||F.metaKey||F.ctrlKey||F.shiftKey||F.altKey||br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const B=E.current;if(B.length===0)return;const K=te.current;K&&K.fitView({nodes:B.map(ee=>({id:ee})),padding:.2,duration:200})};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]),m.useEffect(()=>{const V=F=>{if(F.key!=="1"||F.metaKey||F.ctrlKey||F.shiftKey||F.altKey||br(document.activeElement)||document.querySelector('[data-testid="inline-edit-input"]'))return;const B=te.current;if(!B)return;const{x:K,y:ee}=B.getViewport();B.setViewport({x:K,y:ee,zoom:1},{duration:150})};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[]);const rs=m.useCallback(V=>{var F,B;switch(V){case"tool.select":L({kind:"select"});return;case"tool.hand":L({kind:"hand"});return;case"tool.rectangle":L({kind:"draw",shape:"rectangle"});return;case"tool.ellipse":L({kind:"draw",shape:"ellipse"});return;case"tool.text":L({kind:"draw",shape:"text"});return;case"tool.sticky":L({kind:"draw",shape:"sticky"});return;case"tool.database":L({kind:"draw",shape:"database"});return;case"edit.undo":{if(!Y.canUndo)return;Y.undo().catch(K=>{I(K instanceof Error?K.message:String(K)),console.error("undo failed",K)});return}case"edit.redo":{if(!Y.canRedo)return;Y.redo().catch(K=>{I(K instanceof Error?K.message:String(K)),console.error("redo failed",K)});return}case"edit.copy":{const K=E.current;if(K.length===0)return;Dn([...K]);return}case"edit.paste":Bt(null);return;case"edit.duplicate":{const K=E.current;if(K.length===0)return;Dn([...K]),Bt(null);return}case"edit.delete":{const K=E.current,ee=P.current;if(K.length===0&&ee.length===0)return;Ro([...K],[...ee]);return}case"edit.selectAll":w((ue??[]).map(K=>K.id)),C((Ie??[]).map(K=>K.id));return;case"view.fit":{const K=te.current;if(!K)return;K.fitView({padding:.2,duration:200});return}case"view.zoomIn":{const K=te.current;if(!K)return;K.zoomIn({duration:150});return}case"view.zoomOut":{const K=te.current;if(!K)return;K.zoomOut({duration:150});return}case"view.zoom100":{const K=te.current;if(!K)return;const{x:ee,y:ze}=K.getViewport();K.setViewport({x:ee,y:ze,zoom:1},{duration:150});return}case"view.zoomToSelection":{const K=E.current;if(K.length===0)return;const ee=te.current;if(!ee)return;ee.fitView({nodes:K.map(ze=>({id:ze})),padding:.2,duration:200});return}case"layout.tidy":{const K=E.current.length>0?"selection":"all";yn(K);return}case"selection.deselect":E.current.length>0&&w([]),P.current.length>0&&C([]),q.current.kind!=="select"&&L({kind:"select"});return;case"help.commandPalette":$(!0);return;case"export.pdf":{(F=p.current)==null||F.exportPdf();return}case"export.png":{(B=p.current)==null||B.exportPng();return}}},[Y,Dn,Bt,Ro,ue,Ie,yn,p]);m.useEffect(()=>{const V=F=>{(F.metaKey||F.ctrlKey)&&(F.shiftKey||F.altKey||F.key.toLowerCase()==="p"&&(F.preventDefault(),!br(document.activeElement)&&rs("help.commandPalette")))};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[rs]);const sa=m.useCallback((V,F)=>{if(!J||!ae)return;const B={...F.source!==void 0?{source:F.source}:{},...F.target!==void 0?{target:F.target}:{},...F.sourceHandle!==void 0?{sourceHandle:F.sourceHandle===null?void 0:F.sourceHandle}:{},...F.targetHandle!==void 0?{targetHandle:F.targetHandle===null?void 0:F.targetHandle}:{},...F.sourceHandleAutoPicked!==void 0?{sourceHandleAutoPicked:F.sourceHandleAutoPicked}:{},...F.targetHandleAutoPicked!==void 0?{targetHandleAutoPicked:F.targetHandleAutoPicked}:{},...F.sourcePin!==void 0?{sourcePin:F.sourcePin===null?void 0:F.sourcePin}:{},...F.targetPin!==void 0?{targetPin:F.targetPin===null?void 0:F.targetPin}:{}};xt(V,B),I(null),ae.updateConnector(V,F).catch(K=>{rt(V),I(K instanceof Error?K.message:String(K)),console.error("updateConnector reconnect failed",K)})},[J,ae,xt,rt]),Bf=m.useCallback((V,F,B)=>{if(!J||!ae)return;const K=F==="source"?"sourcePin":"targetPin";xt(V,{[K]:B}),I(null),ae.updateConnector(V,{[K]:B}).catch(ee=>{rt(V),I(ee instanceof Error?ee.message:String(ee)),console.error("updateConnector pin failed",ee)})},[J,ae,xt,rt]),hu=m.useCallback((V,F)=>{if(!J||!ae)return;const B=Ie==null?void 0:Ie.find(ze=>ze.id===V);if(!(B?F==="source"?B.sourcePin:B.targetPin:void 0))return;const ee=F==="source"?"sourcePin":"targetPin";xt(V,{[ee]:void 0}),I(null),ae.updateConnector(V,{[ee]:null}).catch(ze=>{rt(V),I(ze instanceof Error?ze.message:String(ze)),console.error("updateConnector unpin failed",ze)})},[J,ae,Ie,xt,rt]),lt=r==null?void 0:r.flow,Va=j.overrides,pr=z.overrides,To=U.ids,yr=A.ids,fu=m.useMemo(()=>{if(!lt||M.length===0)return[];const V=new Map(lt.nodes.map(B=>[B.id,B])),F=[];for(const B of M){const K=V.get(B);if(!K)continue;const ee=Va[B];if(!ee){F.push(K);continue}const ze=ee.data?{...K.data,...ee.data}:K.data;F.push({...K,...ee,data:ze})}return F},[lt,M,Va]),Ba=m.useMemo(()=>{if(!lt||b.length===0)return[];const V=new Map(lt.connectors.map(B=>[B.id,B])),F=[];for(const B of b){const K=V.get(B);if(!K)continue;const ee=pr[B];F.push(ee?{...K,...ee}:K)}return F},[lt,b,pr]),as=m.useMemo(()=>{if(!lt)return null;if(!T)return lt.nodes;const V=new Map(lt.nodes.map(K=>[K.id,K])),F=[],B=new Set;for(const K of T){const ee=V.get(K);ee&&(F.push(ee),B.add(K))}for(const K of lt.nodes)B.has(K.id)||F.push(K);return F},[lt,T]),mr=m.useMemo(()=>{const V=as??(lt==null?void 0:lt.nodes)??null;return V?To.size===0?V:V.filter(F=>!To.has(F.id)):null},[as,lt,To]),Ua=m.useMemo(()=>{const V=(lt==null?void 0:lt.connectors)??null;return V?yr.size===0&&To.size===0?V:V.filter(F=>!yr.has(F.id)&&!To.has(F.source)&&!To.has(F.target)):null},[lt,yr,To]),is=m.useCallback((V,F)=>{G({nodeId:V,mode:F})},[]),OR=m.useMemo(()=>{if(!mr)return null;let V=!1;const F=mr.map(B=>{if(B.type!=="linkflow")return B;V=!0;const K=B.data.target,ee=K?()=>Grt({project:K.project,flow:K.flow}):void 0,ze=K?xit(K,o):void 0;return{...B,data:{...B.data,onOpenPicker:is.bind(null,B.id),onFollow:ee,_resolvedTarget:ze}}});return V?F:mr},[mr,is,o]),FR=(g==null?void 0:g.some(V=>V.flowSlug===t))??!1;if(!y&&!FR&&!(g===null))return f.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2 bg-background p-6 text-center",children:[f.jsxs("p",{className:"text-sm font-medium",children:["Unknown demo: ",n]}),f.jsx("p",{className:"text-xs text-muted-foreground",children:"The slug may have been removed. Re-register from the project repo to bring it back."})]});if(!y||a&&!r)return f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"Loading demo…"});const gr=M[0],Wa=gr?c[gr]:void 0;return f.jsxs("div",{className:"relative h-full w-full",children:[r&&!r.valid?f.jsxs("div",{"data-testid":"demo-error-banner",className:"absolute inset-x-0 top-0 z-10 border-b border-rose-500/40 bg-rose-50 px-4 py-2 text-xs text-rose-900 shadow-xs dark:bg-rose-950/40 dark:text-rose-100",children:[f.jsx("span",{className:"font-medium uppercase tracking-wide",children:"Invalid demo: "}),f.jsx("span",{className:"font-mono",children:r.error})]}):null,f.jsx(eit,{open:Ae,onOpenChange:Re,onCreate:k,onCreated:async V=>{await u(),Q.current.add(`${e}/${V.flowSlug}`),So({project:e,flow:V.flowSlug})}}),f.jsx(nit,{open:We!==null,onOpenChange:V=>{V||Vt(null)},flow:We,onRename:x,onRenamed:async(V,F)=>{await u(),V.flowSlug!==F&&(Q.current.add(`${e}/${V.flowSlug}`),So({project:e,flow:V.flowSlug}))}}),f.jsx(tit,{open:pn!==null,onOpenChange:V=>{V||nn(null)},flow:pn,flows:g??[],onDelete:v,onDeleted:async(V,F)=>{var K;if(await u(),V!==t)return;const B=F??((K=g==null?void 0:g.find(ee=>ee.isDefault&&ee.flowSlug!==V))==null?void 0:K.flowSlug);B&&So({project:e,flow:B})}}),lt&&ae?f.jsx(wrt,{ref:p,mode:"edit",adapter:ae,history:Y,topRightSlot:f.jsx(oit,{project:e,activeFlow:t,flows:g??[],onSelect:V=>{V!==t&&So({project:e,flow:V})},onCreate:()=>Re(!0),onRename:V=>{const F=g==null?void 0:g.find(B=>B.flowSlug===V);F&&Vt({flowSlug:F.flowSlug,name:F.name,icon:F.icon})},onDelete:V=>{const F=g==null?void 0:g.find(B=>B.flowSlug===V);F&&nn({flowSlug:F.flowSlug,name:F.name,isDefault:F.isDefault})}}),projectId:e,flowSlug:t,enableEmbed:!1,showShareMenu:!1,nodes:OR??lt.nodes,connectors:Ua??lt.connectors,selectedNodeIds:M,selectedConnectorIds:b,onSelectionChange:Ze,runtime:{runs:i,statuses:c,pendingOverrides:{nodes:Va,connectors:pr}},onPlayNode:h,onNodePositionChange:Tn,onNodePositionsChange:cn,onNodeResize:eu,onNodeResizeEnd:i2,onHtmlNodeFitToContent:Qn,onComponentNodeFitToContent:Qn,onMultiResize:go,onNodeNameChange:es,onNodeDescriptionChange:Da,onConnectorLabelChange:ur,onCreateShapeNode:oa,onCreateLinkflowNode:J?Tt:void 0,onCreateImageFromFile:J?lr:void 0,onRetryImageUpload:J?Cn:void 0,onCreateHtmlNode:J?cu:void 0,iconPickerOpen:Lt.open,onOpenIconPicker:J?lu:void 0,onCloseIconPicker:J?ia:void 0,onPickIcon:J?Nt:void 0,onRequestIconReplace:J?du:void 0,onCreateConnector:Oa,onReconnectConnector:sa,onPinEndpoint:J?Bf:void 0,onUnpinEndpoint:J?hu:void 0,onReorderNode:su,onDeleteNode:iu,onCopyNode:V=>Dn([V]),onPasteAt:Bt,onCopySelection:J?Dn:void 0,onPasteSelection:J?()=>Bt(null):void 0,hasClipboard:hr,selectedNodes:fu,selectedConnectors:Ba,onStyleNode:ou,onStyleNodePreview:tu,onStyleNodes:ru,onStyleNodesPreview:Xi,onStyleConnector:au,onStyleConnectorPreview:nu,onRfInit:ce,onTidy:ue?os:void 0,onCreateAndConnectFromPane:uu,pendingEditNodeId:_,canvasMode:R,onCanvasModeChange:L,statusReport:Wa,onNameChange:es,onDescriptionChange:Da,onDetailChange:ts,onIconChange:ns,autoFitView:re},`${e}/${t}`):f.jsx("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"No demo data yet."}),O?f.jsxs("div",{"data-testid":"edit-error-banner",className:"absolute inset-x-0 bottom-4 z-20 mx-auto w-fit max-w-[80%] rounded-md border border-rose-500/50 bg-rose-50 px-3 py-2 text-xs text-rose-900 shadow-md dark:bg-rose-950/60 dark:text-rose-100",children:[f.jsx("span",{className:"font-medium",children:"Couldn't save change: "}),f.jsx("span",{className:"font-mono",children:O}),f.jsx("button",{type:"button",className:"ml-3 underline underline-offset-2",onClick:()=>I(null),children:"Dismiss"})]}):null,f.jsx(Zat,{open:H,onOpenChange:$,runCommand:rs,ctx:{hasSelection:M.length>0||b.length>0,canUndo:Fa.canUndo,canRedo:Fa.canRedo,hasClipboard:hr,canExportDemo:!!J}}),f.jsx(iit,{open:X!==null,onOpenChange:V=>{V||G(null)},mode:(X==null?void 0:X.mode)??"link",demos:o,currentSlug:n,initialTarget:(X==null?void 0:X.mode)==="edit"?(()=>{const V=ue==null?void 0:ue.find(B=>B.id===X.nodeId);return!V||V.type!=="linkflow"?null:V.data.target??null})():null,onCommit:V=>{X&&qe(X.nodeId,V)}})]})}const Sit=e=>({display:e?"block":"none",height:"100%"});function Lit({stack:e,renderEntry:t}){return f.jsx(f.Fragment,{children:e.map((n,o)=>{const r=o===e.length-1;return f.jsx("div",{"data-flow-stack-entry":n.slug,"data-flow-stack-top":r?"true":"false",style:Sit(r),children:t(n,r)},n.slug)})})}function Nit({demos:e,refreshFlows:t,canvasRef:n}){const o=pae();return f.jsx(Lit,{stack:o,renderEntry:(r,a)=>f.jsx(Iit,{entry:r,demos:e,refreshFlows:t,canvasRef:a?n:void 0})})}function Iit({entry:e,demos:t,refreshFlows:n,canvasRef:o}){const{project:r,flow:a,slug:i}=e,s=t.find(z=>z.slug===i),c=(s==null?void 0:s.id)??null,l=m.useRef(null),h=o??l,{detail:u,loading:p,refresh:y,applyDetail:g}=Pat(r,a),[k,x]=m.useState(0),{runs:v,apply:M}=Oat(c),{events:w,apply:b}=Dat(c),{statusByNode:C,apply:_,reset:S}=Bat(c),E=m.useCallback(()=>{S(),y(),n()},[y,n,S]),P=m.useCallback(z=>{if(!c||!s)return;const U={id:c,slug:s.slug,filePath:""},A=z.valid?{...U,name:z.flow.name??s.name,flow:z.flow,valid:!0,error:null}:{...U,name:s.name,flow:null,valid:!1,error:z.error};g(A),x(T=>T+1)},[c,s,g]),N=m.useCallback(z=>{M(z),b(z),_(z)},[M,b,_]);Uat(c,{onHello:E,onFlowReload:P,onEvent:N});const j=m.useCallback(z=>{vle(r,a,z).catch(U=>{M({type:"node:error",nodeId:z,message:U instanceof Error?U.message:String(U),ts:Date.now()})})},[r,a,M]);return f.jsx(Cit,{project:r,flow:a,slug:i,demos:t,detail:u,loading:p,runs:v,nodeEvents:w,statusByNode:C,externalReloadSignal:k,onPlayNode:j,refreshFlows:n,canvasRef:h})}const rX="npx seeflow register --path .";function Ait(){const[e,t]=m.useState(!1),n=async()=>{try{await navigator.clipboard.writeText(rX),t(!0),setTimeout(()=>t(!1),1200)}catch(o){console.error("[empty-state] copy failed",o)}};return f.jsx("div",{"data-testid":"seeflow-empty-state",className:"flex h-full w-full items-center justify-center bg-background p-6",children:f.jsxs("div",{className:"flex max-w-lg flex-col items-center gap-6 text-center",children:[f.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:f.jsx(jrt,{className:"h-6 w-6 text-muted-foreground"})}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-foreground",children:"No demos registered yet"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["Point SeeFlow at any folder containing a"," ",f.jsx("code",{className:"rounded bg-muted px-1.5 py-0.5 text-xs",children:"flow.json"})," file and it'll appear here."]})]}),f.jsxs("div",{className:"flex w-full items-center gap-2 rounded-md border border-border bg-card px-3 py-2 font-mono text-sm",children:[f.jsx("span",{className:"text-muted-foreground select-none",children:"$"}),f.jsx("code",{className:"flex-1 truncate text-left",children:rX}),f.jsx(Ke,{type:"button",variant:"ghost",size:"sm",onClick:n,"aria-label":"Copy register command",children:e?f.jsx(sV,{className:"h-4 w-4"}):f.jsx(cV,{className:"h-4 w-4"})})]})]})})}function Eit({demos:e}){return e.length===0?f.jsx(Ait,{}):f.jsx("div",{className:"flex h-full w-full items-start justify-center overflow-y-auto bg-background p-8",children:f.jsxs("div",{"data-testid":"studio-home-picker",className:"flex w-full max-w-2xl flex-col gap-6 pt-8",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"Open a demo"}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.length," demos registered — pick one to load its canvas."]})]}),f.jsx("ul",{className:"flex flex-col gap-2",children:e.map(t=>f.jsx("li",{children:f.jsxs("button",{type:"button",onClick:()=>{const n=fae(t.slug);n&&So(n)},"data-testid":`studio-home-demo-${t.slug}`,className:"flex w-full flex-col items-start gap-0.5 rounded-lg border border-border bg-card px-4 py-3 text-left transition-colors hover:border-input",style:{boxShadow:"var(--shadow-card)"},children:[f.jsx("span",{className:"text-sm font-medium",children:t.name}),f.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.repoPath})]})},t.id))})]})})}typeof window<"u"&&Xrt();function jit(){var U;const e=Drt(),{demos:t,refresh:n}=Lat(),{projects:o,refresh:r,unregisterProject:a}=Nat(),i=pae(),s=i.at(-1)??null,c=(s==null?void 0:s.project)??null,l=(s==null?void 0:s.slug)??null,h=i.length>1?i.at(-2)??null:null,u=Hrt(e),p=(u==null?void 0:u.project)??null,{flows:y}=IF(p);Iat({onRegistryReload:()=>{n(),r()}});const g=l?(t??[]).find(A=>A.slug===l):void 0;m.useEffect(()=>{l&&t!==null&&(g||n())},[l,t,g,n]);const k=m.useCallback(A=>{KK(A.id),n(),r(),So({project:A.slug,flow:"main"})},[n,r]),x=m.useCallback(async(A,T)=>{await a(A,T),await n(),c===A&&So(null)},[a,n,c]);m.useEffect(()=>{if(e!=="/"||t===null)return;const A=$at(t,jat());if(A){const T=fae(A.slug);T&&So(T)}},[e,t]),m.useEffect(()=>{g&&KK(g.id)},[g]),m.useEffect(()=>{s&&Yrt(s.project,s.flow)},[s]),m.useEffect(()=>{if(!p||!y)return;const A=Qrt(y,gae(p));A&&So({project:p,flow:A})},[p,y]);const v=m.useRef(null),[M,w]=m.useState(!1),[b,C]=m.useState(!1),_=(g==null?void 0:g.id)??null,S=Eat(),E=S.status==="active",{items:P,onExpire:N}=Sat({active:E,selfPeerId:"host"}),j=m.useMemo(()=>{if(_)return{onDownloadPdf:()=>{var A;return(A=v.current)==null?void 0:A.exportPdf()},onDownloadPng:()=>{var A;return(A=v.current)==null?void 0:A.exportPng()},onExportToCloud:()=>w(!0),onLiveShare:()=>C(!0)}},[_]);if(t===null)return f.jsx("div",{className:"flex h-full w-full items-center justify-center bg-background text-sm text-muted-foreground",children:"Loading…"});const z=h?((U=t.find(A=>A.slug===h.slug))==null?void 0:U.name)??h.flow:void 0;return f.jsx(m0,{delayDuration:150,children:f.jsxs("div",{className:"flex h-full w-full flex-col bg-background text-foreground",children:[f.jsx(lat,{projects:o??[],currentProjectSlug:c??void 0,onProjectCreated:k,onUnregisterProject:x,share:j,onBack:z?Krt:void 0,previousFlowName:z}),f.jsx("main",{className:"min-h-0 flex-1",children:i.length>0?f.jsx(Nit,{demos:t,refreshFlows:n,canvasRef:v}):f.jsx(Eit,{demos:t})}),E?f.jsx(Rnt,{items:P,onExpire:N}):null,_&&c?f.jsx(zrt,{open:M,onOpenChange:w,project:c,flowName:g==null?void 0:g.name,onCapturePreview:()=>{var A;return((A=v.current)==null?void 0:A.capturePreview())??Promise.resolve(void 0)}}):null,f.jsx(xat,{open:b,onOpenChange:C,peers:S.status==="active"?S.peers:[],status:S.status==="error"?"error":S.status,...S.status==="active"?{shareUrl:S.url}:{},...S.status==="active"&&S.hostDisplayName?{hostDisplayName:S.hostDisplayName}:{},...S.status==="active"&&S.recentSessionCount!==void 0?{recentSessionCount:S.recentSessionCount}:{}})]})})}const Cae=document.getElementById("root");if(!Cae)throw new Error("Root element #root not found");_D.createRoot(Cae).render(f.jsx($r.StrictMode,{children:f.jsx(jit,{})}));export{_f as C,zJe as M,$r as R,X0 as _,Un as a,TY as b,aK as c,mP as d,PF as e,rQ as f,yXe as g,mf as h,kXe as i,Pit as j,Sh as k,zr as l,f as m,sQ as n,Ztt as o,j$e as p,oXe as q,m as r,ro as s,vXe as t,Fq as u,cXe as w,$it as z};