@nodefony/studio 10.0.0-beta.7 → 10.0.0-beta.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/frontend/assets/Accordion-D_8LAjKl.js +1 -0
- package/dist/frontend/assets/{ActionsLiveGraph-D1QeuUQm.js → ActionsLiveGraph-DPG8293v.js} +1 -1
- package/dist/frontend/assets/AgentsPreview-CbuZ1MW3.js +12 -0
- package/dist/frontend/assets/ApiKeys-sejlaGPu.js +2 -0
- package/dist/frontend/assets/{ArchitectureLiveGraph-CMuDgIZB.js → ArchitectureLiveGraph-DdYMg18n.js} +1 -1
- package/dist/frontend/assets/Audit-Df57p0vH.js +1 -0
- package/dist/frontend/assets/{BackplaneLiveGraph-DPaKwgjB.js → BackplaneLiveGraph-ieJyx_Ub.js} +1 -1
- package/dist/frontend/assets/Breadcrumbs-DWWRbD1u.js +1 -0
- package/dist/frontend/assets/BrickStoreChip-BLiTtfPX.js +1 -0
- package/dist/frontend/assets/Chat-DayrInKR.js +1 -0
- package/dist/frontend/assets/Chip-HiZSg-p4.js +1 -0
- package/dist/frontend/assets/Cluster-BxvMBlHV.js +1 -0
- package/dist/frontend/assets/{Collapse-C38QJ_Ri.js → Collapse-ctIxjH-g.js} +1 -1
- package/dist/frontend/assets/ConfigPage-DLwDTF2O.js +1 -0
- package/dist/frontend/assets/ConnectorCard-CjcESZAg.js +11 -0
- package/dist/frontend/assets/Create-6NkV6-cz.js +2 -0
- package/dist/frontend/assets/DashboardSupervision-BTvAD0Iu.js +1 -0
- package/dist/frontend/assets/Database-2r7Ksj1s.js +1 -0
- package/dist/frontend/assets/{DbLogo-CckTvmdO.js → DbLogo-Cz2-EXsq.js} +1 -1
- package/dist/frontend/assets/Documentation-Cw3zFNhR.js +1 -0
- package/dist/frontend/assets/{FanOutLiveGraph-C6KbaYVm.js → FanOutLiveGraph-CTVtTGnG.js} +1 -1
- package/dist/frontend/assets/Firewall-7nfoWXua.js +1 -0
- package/dist/frontend/assets/GatewayPreview-C-bXaPd3.js +1 -0
- package/dist/frontend/assets/{IconAdjustmentsAlt-CPpJMDFd.js → IconAdjustmentsAlt-BYYo82z6.js} +1 -1
- package/dist/frontend/assets/{IconAdjustmentsHorizontal-CzTgez2O.js → IconAdjustmentsHorizontal-BbopjGKW.js} +1 -1
- package/dist/frontend/assets/{IconAffiliate-B-8j6CaO.js → IconAffiliate-CALcdBM0.js} +1 -1
- package/dist/frontend/assets/{IconApi-CBIbi8ns.js → IconApi-9l8MA5iC.js} +1 -1
- package/dist/frontend/assets/{IconAppWindow-BtbyDQML.js → IconAppWindow-D53SJAEH.js} +1 -1
- package/dist/frontend/assets/{IconApps-BfSGoNRn.js → IconApps-C6EUs10H.js} +1 -1
- package/dist/frontend/assets/{IconArchive-DDq3xKRQ.js → IconArchive-BBz0xGgX.js} +1 -1
- package/dist/frontend/assets/{IconArrowDown-CypWBIm8.js → IconArrowDown-BJtqr-61.js} +1 -1
- package/dist/frontend/assets/{IconArrowLeft-D0LQWE0c.js → IconArrowLeft-DeLkgqIP.js} +1 -1
- package/dist/frontend/assets/{IconArrowUp-GGdt393_.js → IconArrowUp-CmWO7XuE.js} +1 -1
- package/dist/frontend/assets/IconArrowsExchange-C_kRqndj.js +1 -0
- package/dist/frontend/assets/{IconArrowsSplit2-BMV-DM2_.js → IconArrowsSplit2-D_oHpLml.js} +1 -1
- package/dist/frontend/assets/IconBan-Ci1EWASP.js +1 -0
- package/dist/frontend/assets/{IconBook-BS-zX7Sh.js → IconBook-B_pBdt3F.js} +1 -1
- package/dist/frontend/assets/{IconBooks-DYJgVlGf.js → IconBooks-nvCidUrl.js} +1 -1
- package/dist/frontend/assets/{IconBox-DT4IcS8e.js → IconBox-t6C2bRKY.js} +1 -1
- package/dist/frontend/assets/{IconBrain-CMyyVykF.js → IconBrain-CQHG8g62.js} +1 -1
- package/dist/frontend/assets/{IconCircleCheck-BkiqnBmy.js → IconCircleCheck-DkVi0NqA.js} +1 -1
- package/dist/frontend/assets/{IconCircleDot-DBpgsPm5.js → IconCircleDot-BDJbMpKL.js} +1 -1
- package/dist/frontend/assets/IconCircuitResistor-BghxljUq.js +1 -0
- package/dist/frontend/assets/{IconCode-CkzeaOMf.js → IconCode-CE3-hQ1q.js} +1 -1
- package/dist/frontend/assets/{IconDeviceDesktop-BhfcZEfk.js → IconDeviceDesktop-OvxYj-tE.js} +1 -1
- package/dist/frontend/assets/{IconDevices-DYaCW1Lf.js → IconDevices-MdfOIWwb.js} +1 -1
- package/dist/frontend/assets/{IconDots-zMMjYLi7.js → IconDots-DppzaKps.js} +1 -1
- package/dist/frontend/assets/{IconDownload-BIf4ZImv.js → IconDownload-D6gc8nI5.js} +1 -1
- package/dist/frontend/assets/{IconEye-DXjnEUL5.js → IconEye-Bzn7AU39.js} +1 -1
- package/dist/frontend/assets/{IconFile-D_AMs1iZ.js → IconFile-BPpLKPwy.js} +1 -1
- package/dist/frontend/assets/{IconFolder-DNvrDX-8.js → IconFolder-Ckv1Xm-N.js} +1 -1
- package/dist/frontend/assets/{IconGitBranch-C9rgpIR2.js → IconGitBranch-CVhYV-zp.js} +1 -1
- package/dist/frontend/assets/{IconHandStop-DQFq7Kla.js → IconHandStop-B68ZZTGv.js} +1 -1
- package/dist/frontend/assets/{IconHeartRateMonitor-DURptc8j.js → IconHeartRateMonitor-Dk3J4q2m.js} +1 -1
- package/dist/frontend/assets/{IconHelpCircle-C6caw8cr.js → IconHelpCircle-TIagVTB7.js} +1 -1
- package/dist/frontend/assets/{IconLayoutGrid-DqIXTdsq.js → IconLayoutGrid-BWw9qEEk.js} +1 -1
- package/dist/frontend/assets/{IconListSearch-Dx8ldAwH.js → IconListSearch-D9MErH_U.js} +1 -1
- package/dist/frontend/assets/{IconPackages-Dswyo8q2.js → IconPackages-BzsI-Li9.js} +1 -1
- package/dist/frontend/assets/{IconPencil-B8AVKzwi.js → IconPencil-B5Aj92dN.js} +1 -1
- package/dist/frontend/assets/{IconPlayerPause-BESNYgPM.js → IconPlayerPause-CKysLAOo.js} +1 -1
- package/dist/frontend/assets/IconPlayerPlay-XEjU8Vve.js +1 -0
- package/dist/frontend/assets/{IconPlayerStop-BEsZkT6N.js → IconPlayerStop-Gw6QwdEs.js} +1 -1
- package/dist/frontend/assets/IconPlus-Coq8xjXa.js +1 -0
- package/dist/frontend/assets/{IconPuzzle-CJhQUtbI.js → IconPuzzle-sBK_hUoV.js} +1 -1
- package/dist/frontend/assets/{IconRecycle-Ba6E065w.js → IconRecycle-D7gEhQcy.js} +1 -1
- package/dist/frontend/assets/{IconSend-YkuVPb0V.js → IconSend-Bc0inf9r.js} +1 -1
- package/dist/frontend/assets/{IconServer2-CQ-VREH3.js → IconServer2-DAA64x6c.js} +1 -1
- package/dist/frontend/assets/{IconShieldOff-BsfIN8zc.js → IconShieldOff--SkVGoxa.js} +1 -1
- package/dist/frontend/assets/{IconSitemap-BVtH3lou.js → IconSitemap-BnDmpiKO.js} +1 -1
- package/dist/frontend/assets/{IconStack2-CCZMRSRP.js → IconStack2-CMC-_hkZ.js} +1 -1
- package/dist/frontend/assets/{IconTerminal2-DTjQG6wa.js → IconTerminal2-Cu7EnrUO.js} +1 -1
- package/dist/frontend/assets/{IconTool-BSCYXvc-.js → IconTool-Dp0ccZSt.js} +1 -1
- package/dist/frontend/assets/{IconUserOff-f9WTCDbr.js → IconUserOff-B5FGETxB.js} +1 -1
- package/dist/frontend/assets/{IconWorld-DSRVZK6z.js → IconWorld-CIpRNsHH.js} +1 -1
- package/dist/frontend/assets/KnowledgePreview-BdKGMh6C.js +1 -0
- package/dist/frontend/assets/List-BtRdrxnk.js +1 -0
- package/dist/frontend/assets/LlmProvidersPreview-BeMe85gQ.js +1 -0
- package/dist/frontend/assets/{LogVisuals-DEasJmu2.js → LogVisuals-CA1F7UzB.js} +1 -1
- package/dist/frontend/assets/Logs-L943vOfP.js +1 -0
- package/dist/frontend/assets/McpPreview-D5SYhTdY.js +1 -0
- package/dist/frontend/assets/MemoryPreview-DmXb-Gh_.js +1 -0
- package/dist/frontend/assets/Migrations-CUbBH2cP.js +3 -0
- package/dist/frontend/assets/ModuleDetail-BMQuwphQ.js +1 -0
- package/dist/frontend/assets/Modules-BUEEsgaF.js +1 -0
- package/dist/frontend/assets/OrmConnector-Bb4x-xfj.js +1 -0
- package/dist/frontend/assets/OrmEntity-fUZhlaqY.js +1 -0
- package/dist/frontend/assets/OrmOverview-DFbEanaA.js +1 -0
- package/dist/frontend/assets/OrmWorker-Bg_aQv9q.js +1 -0
- package/dist/frontend/assets/Playground-DUT2F_nl.js +1 -0
- package/dist/frontend/assets/{ProbesLiveGraph-D94e1c6i.js → ProbesLiveGraph-ClLUCJ9O.js} +1 -1
- package/dist/frontend/assets/Profile-CXDaUmnR.js +2 -0
- package/dist/frontend/assets/{ProfileFields-dt4VO6bY.js → ProfileFields-KZ59Eqrf.js} +1 -1
- package/dist/frontend/assets/Progress-Jl9Xrd62.js +1 -0
- package/dist/frontend/assets/{ProtocoleLiveGraph-UmOlL04Y.js → ProtocoleLiveGraph-Cmbh6-Gx.js} +1 -1
- package/dist/frontend/assets/RealtimeConsole-DLc-QQGy.js +1 -0
- package/dist/frontend/assets/{RingProgress-QfUZ9GPc.js → RingProgress-xUUyRmUq.js} +1 -1
- package/dist/frontend/assets/Roadmap-aBVMLJAM.js +1 -0
- package/dist/frontend/assets/RoleSwitch-B1hL5p-3.js +1 -0
- package/dist/frontend/assets/Roles-C4kmzA_U.js +1 -0
- package/dist/frontend/assets/{RoutesView-CXZ8Aoj_.js → RoutesView-PqukWFCc.js} +1 -1
- package/dist/frontend/assets/Runtime-xIs1NAq2.js +1 -0
- package/dist/frontend/assets/Sessions-taAwHrtE.js +1 -0
- package/dist/frontend/assets/Skeleton-BoQtbCT4.js +1 -0
- package/dist/frontend/assets/{Slider-BbJH89K3.js → Slider-CYJI87Vt.js} +1 -1
- package/dist/frontend/assets/StoresView-BEcp800X.js +1 -0
- package/dist/frontend/assets/System-DEc_-VAA.js +1 -0
- package/dist/frontend/assets/TagsInput-Buuy4DOA.js +1 -0
- package/dist/frontend/assets/{Textarea-nmioafgL.js → Textarea-9yD_OCzE.js} +1 -1
- package/dist/frontend/assets/Timeline-VZPUF9dn.js +1 -0
- package/dist/frontend/assets/TraceView-Rt3ss0Bi.js +1 -0
- package/dist/frontend/assets/Twin-DuE4P1SA.js +1 -0
- package/dist/frontend/assets/TwinMap-CiX43ENP.js +19 -0
- package/dist/frontend/assets/UserProfile-C0FcE-Gd.js +1 -0
- package/dist/frontend/assets/Users-DI9oLxxe.js +1 -0
- package/dist/frontend/assets/VectorStoresPreview-BJq6Wcjl.js +1 -0
- package/dist/frontend/assets/Webhooks-3TsZ9kVA.js +1 -0
- package/dist/frontend/assets/Workspace-0CrIYPNk.js +1 -0
- package/dist/frontend/assets/{aiPreviewParts-Dj8Ljhnn.js → aiPreviewParts-Bwx9e8dx.js} +1 -1
- package/dist/frontend/assets/{apiKeysModel-CJevQpt8.js → apiKeysModel-Dopci2hd.js} +1 -1
- package/dist/frontend/assets/{auditFormat-jZN46_5Z.js → auditFormat-r1_77PDm.js} +1 -1
- package/dist/frontend/assets/{auditModel-Cz-3Rzik.js → auditModel-DUpx7JmY.js} +1 -1
- package/dist/frontend/assets/configEdit-BhbQlj6k.js +1 -0
- package/dist/frontend/assets/{eventFlow-wonKPF8V.js → eventFlow-LpuRUXXg.js} +1 -1
- package/dist/frontend/assets/{health-7sMajsQI.js → health-CyGA2Jii.js} +1 -1
- package/dist/frontend/assets/{hooks-DL-ZhyoD.js → hooks-C5izbcnh.js} +1 -1
- package/dist/frontend/assets/index-Bxrb_NNJ.js +28 -0
- package/dist/frontend/assets/index-x3d2S3sp.css +1 -0
- package/dist/frontend/assets/{logFormat-Bk36BvWi.js → logFormat-DYk42zSe.js} +1 -1
- package/dist/frontend/assets/{ormConnectorInsights-C7902tKC.js → ormConnectorInsights-BHrwQYA6.js} +1 -1
- package/dist/frontend/assets/{profileVisuals-Dz_Mb4iH.js → profileVisuals-hNLkIVoO.js} +1 -1
- package/dist/frontend/assets/stores-CsHxacRb.js +1 -0
- package/dist/frontend/assets/ui-NqIPktVY.js +323 -0
- package/dist/frontend/assets/{ui-DLioOiRN.css → ui-bSyOAvy0.css} +1 -1
- package/dist/frontend/assets/useBlockSource-m6WHsmzP.js +1 -0
- package/dist/frontend/assets/{useSocketLiveData-CmMYezqs.js → useSocketLiveData-BZjzaQMC.js} +1 -1
- package/dist/frontend/assets/{usersFormat-EIUaaMSm.js → usersFormat-aVUkQnOe.js} +1 -1
- package/dist/frontend/index.html +16 -16
- package/package.json +19 -19
- package/dist/frontend/assets/Accordion-CpfkavHk.js +0 -1
- package/dist/frontend/assets/AgentsPreview-3-5OZZ37.js +0 -12
- package/dist/frontend/assets/ApiKeys-CtLUNnl0.js +0 -2
- package/dist/frontend/assets/Audit-B2FUlGqs.js +0 -1
- package/dist/frontend/assets/Breadcrumbs-Ct1K_zqN.js +0 -1
- package/dist/frontend/assets/BrickStoreChip-D1KnkCmc.js +0 -1
- package/dist/frontend/assets/Chat-DvhzrpTt.js +0 -1
- package/dist/frontend/assets/Chip-CzEO4TVP.js +0 -1
- package/dist/frontend/assets/Cluster-4QkYbMbl.js +0 -1
- package/dist/frontend/assets/ConfigPage-DSazrv0h.js +0 -1
- package/dist/frontend/assets/ConnectorCard-GiShQva6.js +0 -11
- package/dist/frontend/assets/Create-C-ZVQRdt.js +0 -2
- package/dist/frontend/assets/DashboardSupervision-deg6L71S.js +0 -1
- package/dist/frontend/assets/Database-BmezwQtb.js +0 -1
- package/dist/frontend/assets/Documentation-CmNFuMcO.js +0 -1
- package/dist/frontend/assets/Firewall-Htuj9USB.js +0 -1
- package/dist/frontend/assets/GatewayPreview-Bl4ilFGn.js +0 -1
- package/dist/frontend/assets/IconArrowsExchange-BP7tLAV_.js +0 -1
- package/dist/frontend/assets/IconBan-DF34c4Ac.js +0 -1
- package/dist/frontend/assets/IconCircuitResistor-BiMeCX9K.js +0 -1
- package/dist/frontend/assets/IconPlayerPlay-DhqKbQEW.js +0 -1
- package/dist/frontend/assets/IconPlus-DPedeEtY.js +0 -1
- package/dist/frontend/assets/KnowledgePreview-DXIniW1c.js +0 -1
- package/dist/frontend/assets/List-B4NvgWxC.js +0 -1
- package/dist/frontend/assets/LlmProvidersPreview-C6K_4T7y.js +0 -1
- package/dist/frontend/assets/Logs-D4Lwm_D0.js +0 -1
- package/dist/frontend/assets/McpPreview-RM10Do9w.js +0 -1
- package/dist/frontend/assets/MemoryPreview-BIQuDHaJ.js +0 -1
- package/dist/frontend/assets/Migrations-Ct1DBgot.js +0 -3
- package/dist/frontend/assets/ModuleDetail-zR6tYvwc.js +0 -1
- package/dist/frontend/assets/Modules-yxw9R2M5.js +0 -1
- package/dist/frontend/assets/OrmConnector-CJZkJeNS.js +0 -1
- package/dist/frontend/assets/OrmEntity-PEj9Ff7K.js +0 -1
- package/dist/frontend/assets/OrmOverview-DETG6IpL.js +0 -1
- package/dist/frontend/assets/OrmWorker-8Etwr4fo.js +0 -1
- package/dist/frontend/assets/Playground-BWA7qAvx.js +0 -1
- package/dist/frontend/assets/Profile-D0U83sV_.js +0 -2
- package/dist/frontend/assets/Progress-COepY2v5.js +0 -1
- package/dist/frontend/assets/RealtimeConsole-CcZUTtHc.js +0 -1
- package/dist/frontend/assets/Roadmap-DrseUgGd.js +0 -1
- package/dist/frontend/assets/RoleSwitch-DZt4YgqK.js +0 -1
- package/dist/frontend/assets/Roles-Dhe0yW0U.js +0 -1
- package/dist/frontend/assets/Runtime-BAWsvDqI.js +0 -1
- package/dist/frontend/assets/Sessions-Dvi9WBmv.js +0 -1
- package/dist/frontend/assets/Skeleton-D4mSLrUF.js +0 -1
- package/dist/frontend/assets/StoresView-m9K9J-zE.js +0 -1
- package/dist/frontend/assets/System-DbcrHR18.js +0 -1
- package/dist/frontend/assets/TagsInput-DLA4PIhC.js +0 -1
- package/dist/frontend/assets/Timeline-ouAOSjY1.js +0 -1
- package/dist/frontend/assets/TraceView-Bvtoz8-Z.js +0 -1
- package/dist/frontend/assets/Twin-gbY-Ir8E.js +0 -1
- package/dist/frontend/assets/TwinMap-DCpZouug.js +0 -19
- package/dist/frontend/assets/UserProfile-BaPNh-G3.js +0 -1
- package/dist/frontend/assets/Users-DoSedUDm.js +0 -1
- package/dist/frontend/assets/VectorStoresPreview-BwYoGKio.js +0 -1
- package/dist/frontend/assets/Webhooks-Ck9n1qLs.js +0 -1
- package/dist/frontend/assets/Workspace-BZRv5E_W.js +0 -1
- package/dist/frontend/assets/configEdit-p1JESVv_.js +0 -1
- package/dist/frontend/assets/index-CA-mibvn.css +0 -1
- package/dist/frontend/assets/index-PhNQVa0x.js +0 -28
- package/dist/frontend/assets/stores-BPQ3jvDo.js +0 -1
- package/dist/frontend/assets/ui-B4vXT8-w.js +0 -323
- package/dist/frontend/assets/useBlockSource-DTNNrdmz.js +0 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ArchitectureLiveGraph-DdYMg18n.js","assets/rolldown-runtime-COiEfhsA.js","assets/index-Bxrb_NNJ.js","assets/stores-CsHxacRb.js","assets/hooks-C5izbcnh.js","assets/Collapse-ctIxjH-g.js","assets/IconAffiliate-CALcdBM0.js","assets/IconApi-9l8MA5iC.js","assets/IconAdjustmentsAlt-BYYo82z6.js","assets/IconBox-t6C2bRKY.js","assets/IconArrowsExchange-C_kRqndj.js","assets/IconBrain-CQHG8g62.js","assets/IconBooks-nvCidUrl.js","assets/IconArchive-BBz0xGgX.js","assets/Slider-CYJI87Vt.js","assets/preload-helper-Zb0SmQx3.js","assets/pageQuery-CeNWND3J.js","assets/index-x3d2S3sp.css","assets/IconCircuitResistor-BghxljUq.js","assets/IconDeviceDesktop-OvxYj-tE.js","assets/IconStack2-CMC-_hkZ.js","assets/useSocketLiveData-BZjzaQMC.js","assets/realtimeHealth-ClmV7IKO.js","assets/ProtocoleLiveGraph-Cmbh6-Gx.js","assets/IconArrowDown-BJtqr-61.js","assets/FanOutLiveGraph-CTVtTGnG.js","assets/IconArrowsSplit2-D_oHpLml.js","assets/ActionsLiveGraph-DPG8293v.js","assets/IconPlayerPlay-XEjU8Vve.js","assets/BackplaneLiveGraph-ieJyx_Ub.js","assets/IconPuzzle-sBK_hUoV.js","assets/IconServer2-DAA64x6c.js","assets/ProbesLiveGraph-ClLUCJ9O.js","assets/mermaid.core-B6xpe3Jr.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-C_gRsKqw.js","assets/chunk-DUW6YSOI-Dgx8z5s3.js","assets/chunk-M57EVK23-Bs-aWYqL.js","assets/chunk-LEVMRMFU-BeKJOfig.js","assets/chunk-AXFCVDMN-CqUINOI2.js","assets/chunk-X4PVCEUW-DBYVvmEP.js","assets/chunk-BG4553SI-BNzrATwc.js","assets/src-CiSWvS1R.js","assets/dayjs.min-C79hm5sx.js","assets/chunk-STOXU5M4-BmVWLvxQ.js","assets/chunk-R3KSYZAL-DFQRbzGi.js","assets/chunk-6MUBBAK2-DAO7STBG.js","assets/dist-CumnGVmJ.js","assets/chunk-J5ZVWO5B-oDCd-gWO.js","assets/rough.esm-Dy-Kn_BL.js","assets/chunk-DQASFODM-DKUUI-Ih.js","assets/line-DT9k40dN.js","assets/array-BifhSqXX.js","assets/path-fybaL0A-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,n as t,r as n,t as r}from"./rolldown-runtime-COiEfhsA.js";import{t as i}from"./preload-helper-Zb0SmQx3.js";import{C as a,S as o,T as s,_ as c,b as l,i as u,n as d,r as f,t as p,v as m,w as h,x as g,y as _}from"./src-C_gRsKqw.js";import{t as v}from"./value-CHmTzbgv.js";var y=r((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var B={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=B,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=z,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),b=r(((e,t)=>{t.exports=y()})),x=r((e=>{var t=b();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),S=r(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=x()})),C=e(b(),1);function w(e){return Object.keys(e)}function T(e){return e&&typeof e==`object`&&!Array.isArray(e)}function E(e,t){let n={...e},r=t;return T(e)&&T(t)&&Object.keys(t).forEach(t=>{T(r[t])&&t in e?n[t]=E(n[t],r[t]):n[t]=r[t]}),n}function D(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var O=e(S(),1);function k(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function A(e){let t=k(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function j(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function M(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?j(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?j(n):n}}return r}return n}var N=M(`rem`,{shouldScale:!0}),P=M(`em`);function F(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function I(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?(?:[0-9]*\.)?[0-9]+(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}function L(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==C.Fragment}function R(e){let t=(0,C.createContext)(null);return[t,()=>{let n=(0,C.use)(t);if(n===null)throw Error(e);return n}]}function z(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function B(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function V(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function H(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].disabled)return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].disabled)return e}return e}function ee(e,t,n){return B(e,n)===B(t,n)}function U({parentSelector:e,siblingSelector:t,onKeyDown:n,loop:r=!0,activateOnFocus:i=!1,dir:a=`rtl`,orientation:o}){return s=>{n?.(s);let c=Array.from(B(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>ee(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=H(l,c,r),d=V(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:{s.stopPropagation(),s.preventDefault();let e=c[H(-1,c,!1)];e?.focus(),i&&e?.getAttribute(`aria-selected`)!==`true`&&e?.click();break}case`End`:{s.stopPropagation(),s.preventDefault();let e=c[V(c.length,c,!1)];e?.focus(),i&&e?.getAttribute(`aria-selected`)!==`true`&&e?.click();break}}}}var W={app:100,modal:200,popover:300,overlay:400,max:9999};function G(e){return W[e]}var te=()=>{};function ne(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||te:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function K(e,t=`size`,n=!0){if(e!==void 0)return I(e)?n?N(e):e:`var(--${t}-${e})`}function re(e){return K(e,`mantine-spacing`)}function q(e){return e===void 0?`var(--mantine-radius-default)`:K(e,`mantine-radius`)}function ie(e){return K(e,`mantine-font-size`)}function ae(e){return K(e,`mantine-line-height`,!1)}function oe(e){if(e)return K(e,`mantine-shadow`,!1)}function J(e,t){return n=>{e?.(n),t?.(n)}}function se(e,t){return e in t?A(t[e]):A(e)}function ce(e,t){let n=e.map(e=>({value:e,px:se(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function le(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function ue(e,t,n){return n?Array.from(B(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}function de(e,t,n){return t===void 0&&n===void 0?e:t!==void 0&&n===void 0?Math.max(e,t):Math.min(t===void 0&&n!==void 0?e:Math.max(e,t),n)}function fe(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function pe(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i<r;i+=1){let r=n[i];if(!(r in t)||e[r]!==t[r]&&!(Number.isNaN(e[r])&&Number.isNaN(t[r])))return!1}return!0}function me(e){let t=(0,C.useRef)(e);return(0,C.useEffect)(()=>{t.current=e}),(0,C.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function he(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=me(e),s=(0,C.useRef)(0),c=(0,C.useRef)(0),l=(0,C.useRef)(null),u=(0,C.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(c.current=0,s.current!==0&&e._hasPendingCallback){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&u()},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,C.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}var ge=[`mousedown`,`touchstart`];function _e(e,t,n,r=!0,i=!1){let a=(0,C.useRef)(null),o=t||ge,s=(0,C.useEffectEvent)(t=>{let{target:r}=t??{};if(!document.body.contains(r)&&r?.tagName!==`HTML`)return;let i=t.composedPath();Array.isArray(n)?n.every(e=>!!e&&!i.includes(e))&&e(t):a.current&&!i.includes(a.current)&&e(t)}),c=o.join(`,`);return(0,C.useEffect)(()=>{if(!r)return;let e=c.split(`,`);return e.forEach(e=>document.addEventListener(e,s,i)),()=>{e.forEach(e=>document.removeEventListener(e,s,i))}},[c,r,i]),a}function ve(e={}){let t=e.timeout??2e3,[n,r]=(0,C.useState)(null),[i,a]=(0,C.useState)(!1),o=(0,C.useRef)(null);(0,C.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>{r(e),a(!1)}):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}function ye(e,t){if(typeof t==`boolean`)return t;if(typeof window<`u`&&`matchMedia`in window)try{return window.matchMedia(e).matches}catch{return!1}return!1}function be(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,C.useState)(n?t:ye(e));return(0,C.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}function xe(e,t){return be(`(prefers-color-scheme: dark)`,e===`dark`,t)?`dark`:`light`}function Se(e,t,n={leading:!1}){let[r,i]=(0,C.useState)(e),a=(0,C.useRef)(!1),o=(0,C.useRef)(null),s=(0,C.useRef)(!1),c=(0,C.useRef)(e);c.current=e;let l=(0,C.useCallback)(()=>{window.clearTimeout(o.current),o.current=null},[]),u=(0,C.useCallback)(()=>{l(),s.current=!1},[]),d=(0,C.useCallback)(()=>{o.current&&(u(),s.current=!1,i(c.current))},[]);return(0,C.useEffect)(()=>{a.current&&(l(),!s.current&&n.leading?(s.current=!0,i(e),o.current=window.setTimeout(()=>{s.current=!1},t)):o.current=window.setTimeout(()=>{s.current=!1,i(e)},t))},[e,n.leading,t]),(0,C.useEffect)(()=>(a.current=!0,u),[]),[r,u,{cancel:u,flush:d}]}var Ce=typeof document<`u`?C.useLayoutEffect:C.useEffect;function we(e,t){return e.length!==t.length||t.some((t,n)=>!Object.is(t,e[n]))}function Te(e,t){let n=(0,C.useRef)(!1),r=(0,C.useRef)(null),i=(0,C.useRef)(void 0),a={};(0,C.useEffect)(()=>{let o=r.current===a,s=i.current;if(r.current=a,i.current=t,!n.current)n.current=!0;else if(!o&&!(t&&s&&!we(s,t)))return e()},t)}function Ee({opened:e,shouldReturnFocus:t=!0}){let n=(0,C.useRef)(null),r=()=>{n.current&&`focus`in n.current&&typeof n.current.focus==`function`&&n.current?.focus({preventScroll:!0})};return Te(()=>{let i=-1,a=e=>{e.key===`Tab`&&window.clearTimeout(i)};if(document.addEventListener(`keydown`,a),e)n.current=document.activeElement;else if(t){let e=document.activeElement;i=window.setTimeout(()=>{let t=document.activeElement;(t===null||t===document.body||t===e)&&r()},10)}return()=>{window.clearTimeout(i),document.removeEventListener(`keydown`,a)}},[e,t]),r}var De=/input|select|textarea|button|object|summary|iframe/,Oe=`a, input, select, textarea, button, object, summary, iframe, audio[controls], video[controls], [contenteditable], [tabindex]`;function ke(e){let t=e.getAttribute(`contenteditable`);return t!==null&&t!==`false`}function Ae(e){let t=e.nodeName.toLowerCase();return(t===`audio`||t===`video`)&&e.hasAttribute(`controls`)}function je(e){return e.style.display===`none`}function Me(e){if(e.getAttribute(`aria-hidden`)||e.getAttribute(`hidden`)||e.getAttribute(`type`)===`hidden`)return!1;let t=e;for(;t&&t!==document.body&&t.nodeType!==11;){if(je(t))return!1;t=t.parentNode}return!0}function Ne(e){let t=e.getAttribute(`tabindex`);return t===null&&(t=void 0),parseInt(t,10)}function Pe(e){let t=e.nodeName.toLowerCase(),n=!Number.isNaN(Ne(e));return(De.test(t)&&!e.disabled||ke(e)||Ae(e)||e instanceof HTMLAnchorElement&&e.href||n)&&Me(e)}function Fe(e){let t=Ne(e);return(Number.isNaN(t)||t>=0)&&Pe(e)}function Ie(e){let t=Array.from(e.querySelectorAll(Oe)).filter(Fe),n=t.filter(e=>Ne(e)>0).sort((e,t)=>Ne(e)-Ne(t)),r=t.filter(e=>!(Ne(e)>0));return[...n,...r]}var Le=[`date`,`time`,`datetime-local`,`month`,`week`],Re=[`audio`,`video`,`iframe`,`object`,`embed`];function ze(e){return!!e&&e.tagName===`INPUT`&&e.type===`radio`}function Be(e,t){return e.name!==``&&e.name===t.name&&e.form===t.form}function Ve(e){let t=e.nodeName.toLowerCase();return t===`input`?Le.includes(e.type):Re.includes(t)}function He(e,t){let n=Ie(e);return n.filter(e=>e===t||!ze(e)?!0:ze(t)&&Be(e,t)?!1:e.checked?!0:!n.some(t=>ze(t)&&t.checked&&Be(t,e)))}function Ue(e,t,n,r){let i=e.indexOf(t);if(i!==-1)return i+1;if(t===n)return 0;let a=r?Node.DOCUMENT_POSITION_PRECEDING:Node.DOCUMENT_POSITION_FOLLOWING,o=e.findIndex(e=>(t.compareDocumentPosition(e)&a)!==0);return o===-1?0:o}function We(e,t,n){let r=He(e,t);n&&r.reverse();let i=Ue(r,t,e,n);return[...r.slice(i),...r.slice(0,i)].filter(e=>e!==t)}function Ge(e,t){for(let n of e)if(n.focus(),t.activeElement===n)return}function Ke(e,t){let n=e.getRootNode(),r=n.activeElement;if(!r||r!==e&&!e.contains(r))return;let i=We(e,r,t.shiftKey);Ve(r)?setTimeout(()=>{let t=n.activeElement;e.isConnected&&t!==r&&t!==i[0]&&Ge([...i,r],n)}):(t.preventDefault(),Ge(i,n))}var qe=new Set;function Je(e,t){let n=t.getRootNode().activeElement;if(!n)return!1;for(let r of qe){let i=r.current;if(r!==e&&i&&i!==t&&t.contains(i)&&i.contains(n))return!0}return!1}function Ye(e=!0){let t=(0,C.useRef)(null),n=e=>{let t=e.querySelector(`[data-autofocus]`);if(!t){let n=Array.from(e.querySelectorAll(Oe));t=n.find(Fe)||n.find(Pe)||null,!t&&Pe(e)&&(t=e)}t?t.focus({preventScroll:!0}):console.warn(`[@mantine/hooks/use-focus-trap] Failed to find focusable element within provided node`,e)},r=(0,C.useCallback)(r=>{e&&(r===null?t.current=null:t.current!==r&&(setTimeout(()=>{r.getRootNode()?n(r):console.warn(`[@mantine/hooks/use-focus-trap] Ref node is not part of the dom`,r)}),t.current=r))},[e]);return(0,C.useEffect)(()=>{if(!e)return;t.current&&setTimeout(()=>{t.current&&n(t.current)});let r=e=>{e.key!==`Tab`||e.defaultPrevented||!t.current||Je(t,t.current)||Ke(t.current,e)};return qe.add(t),document.addEventListener(`keydown`,r),()=>{qe.delete(t),document.removeEventListener(`keydown`,r)}},[e]),r}var Xe=e=>(e+1)%1e6;function Ze(){let[,e]=(0,C.useReducer)(Xe,0);return e}function Qe(e){let t=(0,C.useId)(),[n,r]=(0,C.useState)(`mantine-${t.replace(/:/g,``)}`),i=(0,C.useRef)(!1);return Ce(()=>{i.current||(i.current=!0,r(fe()))},[]),typeof e==`string`?e:n}function $e(e,t,n){let r=(0,C.useEffectEvent)(t),{capture:i=!1,passive:a,once:o=!1,signal:s}=typeof n==`object`?n:{capture:n};(0,C.useEffect)(()=>(window.addEventListener(e,r,{capture:i,passive:a,once:o,signal:s}),()=>window.removeEventListener(e,r,i)),[e,i,a,o,s])}function et(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function tt(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=et(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():et(e,null)}),t.clear()}}}function nt(...e){return(0,C.useCallback)(tt(...e),e)}function rt({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,C.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function it(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var at=`dots`;function ot({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=rt({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,C.useCallback)(e=>{f(e<s?s:e>c?c:e)},[s,c,f]),m=(0,C.useCallback)(()=>p(d+1),[d,p]),h=(0,C.useCallback)(()=>p(d-1),[d,p]),g=(0,C.useCallback)(()=>p(s),[p,s]),_=(0,C.useCallback)(()=>p(c),[c,p]);return{range:(0,C.useMemo)(()=>{if(t*2+3+n*2>=l)return it(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r<c-(n+1);if(!i&&a){let e=t*2+n+2;return[...it(s,s+e-1),at,...it(c-(n-1),c)]}if(i&&!a){let e=n+1+2*t;return[...it(s,s+n-1),at,...it(c-e,c)]}return[...it(s,s+n-1),at,...it(e,r),at,...it(c-n+1,c)]},[l,t,d,s,c,n]),active:d,setPage:p,next:m,previous:h,first:g,last:_}}function st(e,t){return be(`(prefers-reduced-motion: reduce)`,e,t)}function ct(e,t){if(!e||!t)return!1;if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!pe(e[n],t[n]))return!1;return!0}function lt(e){let t=(0,C.useRef)([]),n=(0,C.useRef)(0);return ct(t.current,e)||(t.current=e,n.current+=1),[n.current]}function ut(e,t){(0,C.useEffect)(e,lt(t))}function dt(e,t,n={autoInvoke:!1}){let r=(0,C.useRef)(null),i=me(e),a=(0,C.useCallback)((...e)=>{r.current||=window.setTimeout(()=>{r.current=null,i(...e)},t)},[t]),o=(0,C.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,C.useEffect)(()=>(n.autoInvoke&&a(),o),[o,a]),{start:a,clear:o}}function ft(e){let t=(0,C.useRef)(void 0);return(0,C.useEffect)(()=>{t.current=e},[e]),t.current}function pt(e,t,n){let r=(0,C.useRef)(null);(0,C.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function mt(){let[e,t]=(0,C.useState)(!1);return(0,C.useEffect)(()=>t(!0),[]),e}var ht=[`mouse`,`touch`],gt=10;function _t(e,t={}){let{threshold:n=400,events:r=ht,cancelOnMove:i=!1,onStart:a,onFinish:o,onCancel:s}=t,c=(0,C.useRef)(!1),l=(0,C.useRef)(!1),u=(0,C.useRef)(-1),d=(0,C.useRef)(null);(0,C.useEffect)(()=>()=>window.clearTimeout(u.current),[]);let f=r.join(`,`);return(0,C.useMemo)(()=>{if(typeof e!=`function`)return{};let t=i!==!1,f=i===!0?gt:i===!1?0:i,p=t=>{l.current||!bt(t)&&!yt(t)||(a&&a(t),d.current=vt(t),l.current=!0,u.current=window.setTimeout(()=>{e(t),c.current=!0},n))},m=e=>{(bt(e)||yt(e))&&(c.current?o&&o(e):l.current&&s&&s(e),c.current=!1,l.current=!1,d.current=null,u.current!==-1&&(window.clearTimeout(u.current),u.current=-1))},h=e=>{if(!t||!l.current||c.current)return;let n=vt(e);if(!n||!d.current)return;let r=n.x-d.current.x,i=n.y-d.current.y;Math.sqrt(r*r+i*i)>f&&m(e)},g={};return r.includes(`mouse`)&&(g.onMouseDown=p,g.onMouseUp=m,g.onMouseLeave=m,t&&(g.onMouseMove=h)),r.includes(`touch`)&&(g.onTouchStart=p,g.onTouchEnd=m,g.onTouchCancel=m,t&&(g.onTouchMove=h)),g},[e,n,s,o,a,i,f])}function vt(e){if(yt(e)){let t=e.touches[0]??e.changedTouches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function yt(e){return window.TouchEvent?e.nativeEvent instanceof TouchEvent:`touches`in e.nativeEvent}function bt(e){return e.nativeEvent instanceof MouseEvent}function xt(){return`development`}function St(e){return e?.props?.ref}function Ct(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function wt(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t<r.length;t+=1){let n=r[t];if(n.shadowRoot){let t=wt(e,n.shadowRoot);if(t)return t}}return null}function Tt(e,t=document){let n=[],r=t.querySelectorAll(e);n.push(...Array.from(r));let i=t.querySelectorAll(`*`);for(let t=0;t<i.length;t+=1){let r=i[t];if(r.shadowRoot){let t=Tt(e,r.shadowRoot);n.push(...t)}}return n}function Et(e){if(!e)return document;let t=e.getRootNode(),n=t.nodeType===Node.DOCUMENT_NODE,r=t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in t;return n||r?t:document}function Dt(e){let t=C.Children.toArray(e);return t.length!==1||!L(t[0])?null:t[0]}function Ot(e){return e}function kt(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=kt(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function At(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=kt(e))&&(r&&(r+=` `),r+=t);return r}var jt={};function Mt(e){let t={};return e.forEach(e=>{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=At(t[e],n):t[e]=n})}),t}function Nt({theme:e,classNames:t,props:n,stylesCtx:r}){return Mt((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||jt))}function Pt({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function Ft(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function It(e){return/^#?([0-9A-F]{3,4}|[0-9A-F]{6}|[0-9A-F]{8})$/i.test(e)}function Lt(e){let t=e.replace(`#`,``);if((t.length===3||t.length===4)&&(t=t.split(``).map(e=>e+e).join(``)),t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function Rt(e){let[t,n,r,i]=e.replace(/[^0-9,./\s]/g,``).trim().split(/\s*[/,]\s*|\s+/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function zt(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a===void 0?1:a}}function Bt(e){return It(e)?Lt(e):e.startsWith(`rgb`)?Rt(e):e.startsWith(`hsl`)?zt(e):{r:0,g:0,b:0,a:1}}function Vt(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Ht(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function Ut(e){if(e.startsWith(`oklch(`))return(Ht(e)||0)/100;let{r:t,g:n,b:r}=Bt(e),i=t/255,a=n/255,o=r/255,s=Vt(i),c=Vt(a),l=Vt(o);return .2126*s+.7152*c+.0722*l}function Wt(e,t=.179){return!e.startsWith(`var(`)&&Ut(e)>t}function Gt({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Wt(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Wt(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Wt(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][Ft(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:Wt(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Wt(e,t.luminanceThreshold),shade:a,variable:void 0}}function Kt(e,t){let n=Gt({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function qt(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function Jt(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=Bt(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function Yt(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=Kt(n.from,t),i=Kt(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function Xt(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=Bt(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var Zt=Xt,Qt=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=Gt({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&qt(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${N(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${N(1)} solid transparent`}:{background:e,hover:Jt(e,.1),color:r,border:`${N(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${N(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:Jt(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${N(1)} solid transparent`}}return{background:Xt(e,.1),hover:Xt(e,.12),color:e,border:`${N(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${N(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:Xt(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${N(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:Xt(e,.05),color:e,border:`${N(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${N(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:Xt(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${N(1)} solid transparent`}}return{background:`transparent`,hover:Xt(e,.12),color:e,border:`${N(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${N(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${N(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${N(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:Jt(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${N(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Jt(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${N(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Jt(t.white,.01),color:e,border:`${N(1)} solid transparent`}:n===`gradient`?{background:Yt(r,t),hover:Yt(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${N(1)} solid var(--mantine-color-default-border)`}:{}};function $t({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&Gt({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function en(e,t,n){return $t({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function tn(e,t){let n=e.colors[e.primaryColor];return qt(n)?e.autoContrast?en(n,e,t):`var(--mantine-color-white)`:$t({color:n[Ft(e,t)],theme:e,autoContrast:null})}function nn(e,t){return typeof e==`boolean`?e:t.autoContrast}var rn=(0,C.createContext)(null);function an(){let e=(0,C.use)(rn);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function on(){return an().cssVariablesResolver}function sn(){return an().classNamesPrefix}function cn(){return an().getStyleNonce}function ln(){return an().withStaticClasses}function un(){return an().headless}function dn(){return an().stylesTransform?.sx}function fn(){return an().stylesTransform?.styles}function pn(){return an().env||`default`}function mn(){return an().deduplicateInlineStyles}function hn(e){let t=document.createElement(`style`);return t.setAttribute(`data-mantine-styles`,`inline`),t.innerHTML=`*, *::before, *::after {transition: none !important;}`,t.setAttribute(`data-mantine-disable-transition`,`true`),e&&t.setAttribute(`nonce`,e),document.head.appendChild(t),()=>document.querySelectorAll(`[data-mantine-disable-transition]`).forEach(e=>e.remove())}function gn({keepTransitions:e}={}){let t=(0,C.useRef)(te),n=(0,C.useRef)(-1),r=(0,C.use)(rn),i=cn(),a=(0,C.useRef)(i?.());if(!r)throw Error(`[@mantine/core] MantineProvider was not found in tree`);let o=i=>{r.setColorScheme(i),t.current=e?()=>{}:hn(a.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},s=()=>{r.clearColorScheme(),t.current=e?()=>{}:hn(a.current),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current?.()},10)},c=xe(`light`,{getInitialValueInEffect:!1}),l=r.colorScheme===`auto`?c:r.colorScheme,u=(0,C.useCallback)(()=>o(l===`light`?`dark`:`light`),[o,l]);return(0,C.useEffect)(()=>()=>{t.current?.(),window.clearTimeout(n.current)},[]),{colorScheme:r.colorScheme,setColorScheme:o,clearColorScheme:s,toggleColorScheme:u}}var _n=r((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),vn=r(((e,t)=>{t.exports=_n()})),yn={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},bn=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,xn={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:yn,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:Qt,autoContrast:!1,luminanceThreshold:.3,fontFamily:bn,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:bn,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:N(34),lineHeight:`1.3`},h2:{fontSize:N(26),lineHeight:`1.35`},h3:{fontSize:N(22),lineHeight:`1.4`},h4:{fontSize:N(18),lineHeight:`1.45`},h5:{fontSize:N(16),lineHeight:`1.5`},h6:{fontSize:N(14),lineHeight:`1.5`}}},fontSizes:{xs:N(12),sm:N(14),md:N(16),lg:N(18),xl:N(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:N(2),sm:N(4),md:N(8),lg:N(16),xl:N(32)},spacing:{xs:N(10),sm:N(12),md:N(16),lg:N(20),xl:N(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), 0 ${N(1)} ${N(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${N(10)} ${N(15)} ${N(-5)}, rgba(0, 0, 0, 0.04) 0 ${N(7)} ${N(7)} ${N(-5)}`,md:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${N(20)} ${N(25)} ${N(-5)}, rgba(0, 0, 0, 0.04) 0 ${N(10)} ${N(10)} ${N(-5)}`,lg:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${N(28)} ${N(23)} ${N(-7)}, rgba(0, 0, 0, 0.04) 0 ${N(12)} ${N(12)} ${N(-7)}`,xl:`0 ${N(1)} ${N(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${N(36)} ${N(28)} ${N(-7)}, rgba(0, 0, 0, 0.04) 0 ${N(17)} ${N(17)} ${N(-7)}`},other:{},components:{}},Sn=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,Cn=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function wn(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function Tn(e){if(!(e.primaryColor in e.colors))throw Error(Sn);if(typeof e.primaryShade==`object`&&(!wn(e.primaryShade.dark)||!wn(e.primaryShade.light))||typeof e.primaryShade==`number`&&!wn(e.primaryShade))throw Error(Cn)}function En(e,t){if(!t)return Tn(e),e;let n=E(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),Tn(n),n}var Y=vn(),Dn=(0,C.createContext)(null),On=()=>(0,C.use)(Dn)||xn;function kn(){let e=(0,C.use)(Dn);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function An({theme:e,children:t,inherit:n=!0}){let r=On(),i=(0,C.useMemo)(()=>En(n?r:xn,e),[e,r,n]);return(0,Y.jsx)(Dn,{value:i,children:t})}An.displayName=`@mantine/core/MantineThemeProvider`;function X(e,t,n){let r=kn(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...F(n)}}function jn({classNames:e,styles:t,props:n,stylesCtx:r}){let i=kn();return{resolvedClassNames:e===void 0?void 0:Nt({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:t===void 0?void 0:Pt({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var Mn={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function Nn({theme:e,options:t,unstyled:n}){return At(t?.focusable&&!n&&(e.focusClassName||Mn[e.focusRing]),t?.active&&!n&&e.activeClassName)}function Pn(e,t,n=1){if(Object.is(e,t))return!0;if(n===0||typeof e!=`object`||typeof t!=`object`||e===null||t===null)return!1;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1)if(!Pn(e[r],t[r],n-1))return!1;return!0}let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let i of r)if(!Object.hasOwn(t,i)||!Pn(e[i],t[i],n-1))return!1;return!0}function Fn({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return Nt({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function In({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return Nt({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function Ln({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function Rn({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function zn({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function Bn({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function Vn({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return At(Nn({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),Bn({options:t,classes:s,selector:r,unstyled:c||m}),a[r],In({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),Fn({selector:r,stylesCtx:f,options:t,props:d,theme:e}),Ln({rootSelector:u,selector:r,className:l}),Rn({selector:r,classes:s,unstyled:c||m}),p&&!m&&zn({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function Hn({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...Hn({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function Un({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&Pt({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...Hn({style:n?.style,theme:e})}}function Wn(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...F(t[n])}}),e),{})}function Gn({props:e,stylesCtx:t,themeName:n,theme:r}){let i=fn()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function Kn({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f,stable:p}){let m=kn(),h=sn(),g=ln(),_=un(),v=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:y,getTransformedStyles:b}=Gn({props:n,stylesCtx:r,themeName:v,theme:m}),x=Nt({theme:m,classNames:c,props:n,stylesCtx:r}),S=v.map(e=>Nt({theme:m,classNames:m.components[e]?.classNames,props:n,stylesCtx:r})),C=y?{}:Pt({theme:m,styles:l,props:n,stylesCtx:r}),w={};if(!y)for(let e of v){let t=Pt({theme:m,styles:m.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))w[e]={...w[e],...t[e]}}let T=Wn([_?{}:d?.(m,n,r),...v.map(e=>m.components?.[e]?.vars?.(m,n,r)),u?.(m,n,r)]),E=Hn({style:a,theme:m});return qn((e,a)=>({...f?.[e],className:Vn({theme:m,options:a,themeName:v,selector:e,classNamesPrefix:h,resolvedClassNames:x,resolvedThemeClassNames:S,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:g,headless:_,transformedStyles:b([a?.styles,l])}),style:Un({theme:m,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:y,resolvedStyles:C,resolvedThemeStyles:w,resolvedVars:T,resolvedRootStyle:E})}),!!p,[m,h,g,_,y?n:null,t,s,i,o,f,r,x,S,C,w,T,E])}function qn(e,t,n){let r=(0,C.useRef)(null);return t?(r.current&&Pn(r.current.deps,n,3)||(r.current={deps:n,getStyles:e}),r.current.getStyles):e}function Jn(e){return w(e).reduce((t,n)=>e[n]===void 0?t:`${t}${D(n)}:${e[n]};`,``).trim()}function Yn({selector:e,styles:t,media:n,container:r}){let i=t?Jn(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${Jn(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${Jn(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function Xn(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function Zn({deduplicate:e,...t}){let n=cn(),r=Yn(t);return e?(0,Y.jsx)(`style`,{href:`mantine-${Xn(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,Y.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function Qn(e){let t=5381;for(let n=0;n<e.length;n++)t=(t<<5)+t+e.charCodeAt(n)|0;return(t>>>0).toString(36)}function $n(e,t){return`__mdi__-${Qn(`${e?Jn(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${Jn(e.styles)}`).join(`|`):``}`)}`}function er(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:M,lh:N,fs:P,tt:I,td:L,w:R,miw:z,maw:B,h:V,mih:H,mah:ee,bgsz:U,bgp:W,bgr:G,bga:te,pos:ne,top:K,left:re,bottom:q,right:ie,inset:ae,display:oe,flex:J,hiddenFrom:se,visibleFrom:ce,lightHidden:le,darkHidden:ue,sx:de,...fe}=e;return{styleProps:F({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:M,lh:N,fs:P,tt:I,td:L,w:R,miw:z,maw:B,h:V,mih:H,mah:ee,bgsz:U,bgp:W,bgr:G,bga:te,pos:ne,top:K,left:re,bottom:q,right:ie,inset:ae,display:oe,flex:J,bdrs:w,hiddenFrom:se,visibleFrom:ce,lightHidden:le,darkHidden:ue,sx:de}),rest:fe}}var tr={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function nr(e,t){let n=Gt({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function rr(e,t){let n=Gt({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:nr(e,t)}function ir(e,t){if(typeof e==`number`)return N(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${N(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${nr(i.join(` `),t)}`),a.trim()}return e}var ar={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function or(e){return typeof e==`string`&&e in ar?ar[e]:e}var sr=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function cr(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&sr.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?N(e):e}function lr(e){return e}var ur=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function dr(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&ur.includes(e)?`var(--mantine-${e}-line-height)`:e}function fr(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?N(e):e}function pr(e){return typeof e==`number`?N(e):e}function mr(e,t){if(typeof e==`number`)return N(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return N(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var hr={color:nr,textColor:rr,fontSize:cr,spacing:mr,radius:fr,identity:lr,size:pr,lineHeight:dr,fontFamily:or,border:ir};function gr(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function _r({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(gr(e))-Number(gr(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function vr(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function yr(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function br(e){return typeof e==`object`&&e?w(e).filter(e=>e!==`base`):[]}function xr(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Sr({styleProps:e,data:t,theme:n}){return _r(w(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=yr(e[i]);if(!vr(e[i]))return o.forEach(e=>{r.inlineStyles[e]=hr[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=br(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=hr[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:hr[a.type](xr(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Cr(){return`__m__-${(0,C.useId)().replace(/[:«»]/g,``)}`}function wr(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...wr(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Tr(e){return e}var Er=Tr;function Dr(e){return e}function Z(e){let t=e;return t.extend=Dr,t.withProps=e=>{let n=n=>(0,Y.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Or(e){return Z(e)}function kr(e){let t=e;return t.withProps=e=>{let n=n=>(0,Y.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Dr,t}function Ar(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function jr(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Ar(n)]=e[n]),t},{})}function Mr(e){return e?typeof e==`string`?{[Ar(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...Mr(t)}),{}):jr(e):null}function Nr(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Nr(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Pr({theme:e,style:t,vars:n,styleProps:r}){let i=Nr(t,e),a=Nr(n,e);return{...i,...a,...r}}function Fr({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=kn(),g=e||`div`,{styleProps:_,rest:v}=er(m),y=dn()?.()?.(_.sx),b=Cr(),x=Sr({styleProps:_,theme:h,data:tr}),S=mn(),C=S&&x.hasResponsiveStyles?$n(x.styles,x.media):b,w={ref:p,style:Pr({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:At(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":I(o)?void 0:o||void 0,size:f,...Mr(a),...v};return(0,Y.jsxs)(Y.Fragment,{children:[x.hasResponsiveStyles&&(0,Y.jsx)(Zn,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,Y.jsx)(g,{...w})]})}Fr.displayName=`@mantine/core/Box`;var Q=Er(Fr),Ir=(0,C.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function Lr(){return(0,C.use)(Ir)}var[Rr,zr]=R(`ScrollArea.Root component was not found in tree`);function Br(e,t){let n=(0,C.useEffectEvent)(t);Ce(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function Vr(e){let{style:t,...n}=e,r=zr(),[i,a]=(0,C.useState)(0),[o,s]=(0,C.useState)(0),c=!!(i&&o);return Br(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),Br(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,Y.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function Hr(e){let t=zr(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,Y.jsx)(Vr,{...e}):null}var Ur={scrollHideDelay:1e3,type:`hover`};function Wr(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=X(`ScrollAreaRoot`,Ur,e),[s,c]=(0,C.useState)(null),[l,u]=(0,C.useState)(null),[d,f]=(0,C.useState)(null),[p,m]=(0,C.useState)(null),[h,g]=(0,C.useState)(null),[_,v]=(0,C.useState)(0),[y,b]=(0,C.useState)(0),[x,S]=(0,C.useState)(!1),[w,T]=(0,C.useState)(!1),E=nt(a,c);return(0,Y.jsx)(Rr,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,Y.jsx)(Q,{...o,ref:E,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}Wr.displayName=`@mantine/core/ScrollAreaRoot`;function Gr(e,t){let n=e/t;return Number.isNaN(n)?0:n}function Kr(e){let t=Gr(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function qr(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Jr(e,[t,n]){return Math.min(n,Math.max(t,e))}function Yr(e,t,n=`ltr`){let r=Kr(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Jr(e,n===`ltr`?[0,o]:[o*-1,0]);return qr([0,o],[0,s])(c)}function Xr(e,t,n,r=`ltr`){let i=Kr(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return qr([c,l],d)(e)}function Zr(e,t){return e>0&&e<t}function Qr(e){return e?parseInt(e,10):0}function $r(e,t,{checkForDefaultPrevented:n=!0}={}){return r=>{e?.(r),n!==!1&&r.defaultPrevented||t?.(r)}}var[ei,ti]=R(`ScrollAreaScrollbar was not found in tree`);function ni(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=zr(),[p,m]=(0,C.useState)(null),h=nt(u,m),g=(0,C.useRef)(null),_=(0,C.useRef)(``),v=t.content-t.viewport,y=(0,C.useEffectEvent)(e=>c(e,v)),b=me(o),x=he(l,10),S=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,C.useEffect)(()=>{if(!p)return;let e=e=>y(e);return p.addEventListener(`wheel`,e,{passive:!1}),()=>p.removeEventListener(`wheel`,e)},[p]),(0,C.useEffect)(b,[t,b]),Br(p,x),Br(f.content,x),(0,Y.jsx)(ei,{value:{scrollbar:p,hasThumb:n,onThumbChange:me(r),onThumbPointerUp:me(i),onThumbPositionChange:b,onThumbPointerDown:me(a)},children:(0,Y.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:$r(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,S(e))}),onPointerMove:$r(e.onPointerMove,S),onPointerUp:$r(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var ri=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=zr(),[s,c]=(0,C.useState)(),l=(0,C.useRef)(null),u=nt(i,l,o.onScrollbarXChange);return(0,C.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,Y.jsx)(ni,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${Kr(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Zr(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Qr(s.paddingLeft),paddingEnd:Qr(s.paddingRight)}})}})};ri.displayName=`@mantine/core/ScrollAreaScrollbarX`;function ii(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=zr(),[s,c]=(0,C.useState)(),l=(0,C.useRef)(null),u=nt(i,l,o.onScrollbarYChange);return(0,C.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,Y.jsx)(ni,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${Kr(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Zr(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Qr(s.paddingTop),paddingEnd:Qr(s.paddingBottom)}})}})}ii.displayName=`@mantine/core/ScrollAreaScrollbarY`;function ai(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=Lr(),i=zr(),a=(0,C.useRef)(null),o=(0,C.useRef)(0),[s,c]=(0,C.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Gr(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>Xr(e,o.current,s,t);return t===`horizontal`?(0,Y.jsx)(ri,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=Yr(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,Y.jsx)(ii,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=Yr(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}ai.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function oi(e){let t=zr(),{forceMount:n,...r}=e,[i,a]=(0,C.useState)(!1),o=e.orientation===`horizontal`,s=he(()=>{if(t.viewport){let e=t.viewport.offsetWidth<t.viewport.scrollWidth,n=t.viewport.offsetHeight<t.viewport.scrollHeight;a(o?e:n)}},10);return Br(t.viewport,s),Br(t.content,s),n||i?(0,Y.jsx)(ai,{"data-state":i?`visible`:`hidden`,...r}):null}oi.displayName=`@mantine/core/ScrollAreaScrollbarAuto`;function si(e){let{forceMount:t,...n}=e,r=zr(),[i,a]=(0,C.useState)(!1);return(0,C.useEffect)(()=>{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,Y.jsx)(oi,{"data-state":i?`visible`:`hidden`,...n}):null}si.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function ci(e){let{forceMount:t,...n}=e,r=zr(),i=e.orientation===`horizontal`,[a,o]=(0,C.useState)(`hidden`),s=he(()=>o(`idle`),100);return(0,C.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,C.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,Y.jsx)(ai,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:$r(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:$r(e.onPointerLeave,()=>o(`idle`))}):null}function li(e){let{forceMount:t,...n}=e,r=zr(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,C.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,Y.jsx)(si,{...n,forceMount:t}):r.type===`scroll`?(0,Y.jsx)(ci,{...n,forceMount:t}):r.type===`auto`?(0,Y.jsx)(oi,{...n,forceMount:t}):r.type===`always`?(0,Y.jsx)(ai,{...n}):null}li.displayName=`@mantine/core/ScrollAreaScrollbar`;function ui(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function di(e){let{style:t,ref:n,...r}=e,i=zr(),a=ti(),{onThumbPositionChange:o}=a,s=nt(n,a.onThumbChange),c=(0,C.useRef)(void 0),l=he(()=>{c.current&&=(c.current(),void 0)},100);return(0,C.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=ui(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>{e.removeEventListener(`scroll`,t),c.current?.(),c.current=void 0}}},[i.viewport,l,o]),(0,Y.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:$r(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:$r(e.onPointerUp,a.onThumbPointerUp)})}di.displayName=`@mantine/core/ScrollAreaThumb`;function fi(e){let{forceMount:t,...n}=e,r=ti();return t||r.hasThumb?(0,Y.jsx)(di,{...n}):null}fi.displayName=`@mantine/core/ScrollAreaThumb`;function pi({children:e,style:t,ref:n,onWheel:r,...i}){let a=zr(),o=nt(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,Y.jsx)(Q,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,Y.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}pi.displayName=`@mantine/core/ScrollAreaViewport`;var mi={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function hi(){return typeof window<`u`}function gi(e){return yi(e)?(e.nodeName||``).toLowerCase():`#document`}function _i(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vi(e){return((yi(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function yi(e){return hi()?e instanceof Node||e instanceof _i(e).Node:!1}function bi(e){return hi()?e instanceof Element||e instanceof _i(e).Element:!1}function xi(e){return hi()?e instanceof HTMLElement||e instanceof _i(e).HTMLElement:!1}function Si(e){return!hi()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof _i(e).ShadowRoot}function Ci(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Pi(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function wi(e){return/^(table|td|th)$/.test(gi(e))}function Ti(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ei=/transform|translate|scale|rotate|perspective|filter/,Di=/paint|layout|strict|content/,Oi=e=>!!e&&e!==`none`,ki;function Ai(e){let t=bi(e)?Pi(e):e;return Oi(t.transform)||Oi(t.translate)||Oi(t.scale)||Oi(t.rotate)||Oi(t.perspective)||!Mi()&&(Oi(t.backdropFilter)||Oi(t.filter))||Ei.test(t.willChange||``)||Di.test(t.contain||``)}function ji(e){let t=Ii(e);for(;xi(t)&&!Ni(t);){if(Ai(t))return t;if(Ti(t))return null;t=Ii(t)}return null}function Mi(){return ki??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ki}function Ni(e){return/^(html|body|#document)$/.test(gi(e))}function Pi(e){return _i(e).getComputedStyle(e)}function Fi(e){return bi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ii(e){if(gi(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Si(e)&&e.host||vi(e);return Si(t)?t.host:t}function Li(e){let t=Ii(e);return Ni(t)?(e.ownerDocument||e).body:xi(t)&&Ci(t)?t:Li(t)}function Ri(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Li(e),i=r===e.ownerDocument?.body,a=_i(r);if(i){let e=zi(a);return t.concat(a,a.visualViewport||[],Ci(r)?r:[],e&&n?Ri(e):[])}return t.concat(r,Ri(r,[],n))}function zi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Bi=[`top`,`right`,`bottom`,`left`],Vi=Math.min,Hi=Math.max,Ui=Math.round,Wi=Math.floor,Gi=e=>({x:e,y:e}),Ki={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function qi(e,t,n){return Hi(e,Vi(t,n))}function Ji(e,t){return typeof e==`function`?e(t):e}function Yi(e){return e.split(`-`)[0]}function Xi(e){return e.split(`-`)[1]}function Zi(e){return e===`x`?`y`:`x`}function Qi(e){return e===`y`?`height`:`width`}function $i(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function ea(e){return Zi($i(e))}function ta(e,t,n){n===void 0&&(n=!1);let r=Xi(e),i=ea(e),a=Qi(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ua(o)),[o,ua(o)]}function na(e){let t=ua(e);return[ra(e),t,ra(t)]}function ra(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ia=[`left`,`right`],aa=[`right`,`left`],oa=[`top`,`bottom`],sa=[`bottom`,`top`];function ca(e,t,n){switch(e){case`top`:case`bottom`:return n?t?aa:ia:t?ia:aa;case`left`:case`right`:return t?oa:sa;default:return[]}}function la(e,t,n,r){let i=Xi(e),a=ca(Yi(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ra)))),a}function ua(e){let t=Yi(e);return Ki[t]+e.slice(t.length)}function da(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function fa(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:da(e)}function pa(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function ma(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ha(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function ga(){return/apple/i.test(navigator.vendor)}function _a(){return ma().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function va(){return ha().includes(`jsdom/`)}var ya=`data-floating-ui-focusable`,ba=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function xa(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function Sa(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Si(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Ca(e){return`composedPath`in e?e.composedPath()[0]:e.target}function wa(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Ta(e){return e.matches(`html,body`)}function Ea(e){return e?.ownerDocument||document}function Da(e){return xi(e)&&e.matches(ba)}function Oa(e){if(!e||va())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ka(e){return e?e.hasAttribute(ya)?e:e.querySelector(`[`+ya+`]`)||e:null}function Aa(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Aa(e,t.id,n)])}function ja(e){return`nativeEvent`in e}function Ma(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var Na=typeof document<`u`?C.useLayoutEffect:function(){},Pa={...C};function Fa(e){let t=C.useRef(e);return Na(()=>{t.current=e}),t}var Ia=Pa.useInsertionEffect||(e=>e());function La(e){let t=C.useRef(()=>{});return Ia(()=>{t.current=e}),C.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Ra(e,t,n){let{reference:r,floating:i}=e,a=$i(t),o=ea(t),s=Qi(o),c=Yi(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Xi(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function za(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ji(t,e),p=fa(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=pa(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=pa(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ba=50,Va=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:za},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ra(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ba&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Ra(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Ha=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ji(e,t)||{};if(l==null)return{};let d=fa(u),f={x:n,y:r},p=ea(i),m=Qi(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Vi(d[_],T),D=Vi(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=qi(E,k,O),j=!c.arrow&&Xi(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Ua=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ji(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Yi(r),_=$i(o),v=Yi(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ua(o)]:na(o)),x=p!==`none`;!d&&x&&b.push(...la(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=ta(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===$i(t)||T.every(e=>$i(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=$i(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function Wa(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ga(e){return Bi.some(t=>e[t]>=0)}var Ka=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ji(e,t);switch(i){case`referenceHidden`:{let e=Wa(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ga(e)}}}case`escaped`:{let e=Wa(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ga(e)}}}default:return{}}}}};function qa(e){let t=Vi(...e.map(e=>e.left)),n=Vi(...e.map(e=>e.top)),r=Hi(...e.map(e=>e.right)),i=Hi(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function Ja(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;e<t.length;e++){let i=t[e];!r||i.y-r.y>r.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>pa(qa(e)))}var Ya=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=Ji(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=Ja(u),f=pa(qa(u)),p=fa(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&c<e.right+p.right&&l>e.top-p.top&&l<e.bottom+p.bottom)||f;if(d.length>=2){if($i(n)===`y`){let e=d[0],t=d[d.length-1],r=Yi(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return pa({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=Yi(n)===`left`,t=Hi(...d.map(e=>e.right)),r=Vi(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return pa({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},Xa=new Set([`left`,`top`]);async function Za(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Yi(n),s=Xi(n),c=$i(n)===`y`,l=Xa.has(o)?-1:1,u=a&&c?-1:1,d=Ji(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Qa=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Za(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},$a=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ji(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=$i(i),p=Zi(f),m=u[p],h=u[f],g=(e,t)=>qi(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},eo=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ji(e,t),u={x:n,y:r},d=$i(i),f=Zi(d),p=u[f],m=u[d],h=Ji(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Xa.has(Yi(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},to=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Ji(e,t),c=await i.detectOverflow(t,s),l=Yi(n),u=Xi(n),d=$i(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Vi(p-c[m],g),y=Vi(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Hi(c.left,c.right):S=p-2*Hi(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function no(e){let t=Pi(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=xi(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Ui(n)!==a||Ui(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ro(e){return bi(e)?e:e.contextElement}function io(e){let t=ro(e);if(!xi(t))return Gi(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=no(t),o=(a?Ui(n.width):n.width)/r,s=(a?Ui(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var ao=Gi(0);function oo(e){let t=_i(e);return!Mi()||!t.visualViewport?ao:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function so(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===_i(e)}function co(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ro(e),o=Gi(1);t&&(r?bi(r)&&(o=io(r)):o=io(e));let s=so(a,n,r)?oo(a):Gi(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=_i(a),t=bi(r)?_i(r):r,n=e,i=zi(n);for(;i&&t!==n;){let e=io(i),t=i.getBoundingClientRect(),r=Pi(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=_i(i),i=zi(n)}}return pa({width:u,height:d,x:c,y:l})}function lo(e,t){let n=Fi(e).scrollLeft;return t?t.left+n:co(vi(e)).left+n}function uo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-lo(e,n),y:n.top+t.scrollTop}}function fo(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=vi(r),s=t?Ti(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Gi(1),u=Gi(0),d=xi(r);if((d||!a)&&((gi(r)!==`body`||Ci(o))&&(c=Fi(r)),d)){let e=co(r);l=io(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?uo(o,c):Gi(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function po(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function mo(e){let t=Fi(e),n=e.ownerDocument.body,r=Hi(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Hi(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+lo(e),o=-t.scrollTop;return Pi(n).direction===`rtl`&&(a+=Hi(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var ho=25;function go(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=_i(e),a=vi(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Mi()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(lo(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=ho&&(s-=o)}return{width:s,height:c,x:l,y:u}}function _o(e,t){let n=co(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=io(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function vo(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=go(e,n,t);else if(t===`document`)r=mo(vi(e));else if(bi(t))r=_o(t,n);else{let n=oo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return pa(r)}function yo(e,t){let n=t.get(e);if(n)return n;let r=Ri(e,[],!1).filter(e=>bi(e)&&gi(e)!==`body`),i=null,a=Pi(e).position===`fixed`,o=a?Ii(e):e;for(;bi(o)&&!Ni(o);){let e=Pi(o),t=Ai(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Ii(o)}return t.set(e,r),r}function bo(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Ti(t)?[]:yo(t,this._c):[].concat(n),r],o=vo(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=vo(t,a[e],i);s=Hi(n.top,s),c=Vi(n.right,c),l=Vi(n.bottom,l),u=Hi(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function xo(e){let{width:t,height:n}=no(e);return{width:t,height:n}}function So(e,t,n){let r=xi(t),i=vi(t),a=n===`fixed`,o=co(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Gi(0);if((r||!a)&&((gi(t)!==`body`||Ci(i))&&(s=Fi(t)),r)){let e=co(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=lo(i));let l=i&&!r&&!a?uo(i,s):Gi(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Co(e){return Pi(e).position===`static`}function wo(e,t){if(!xi(e)||Pi(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return vi(e)===n&&(n=n.ownerDocument.body),n}function To(e,t){let n=_i(e);if(Ti(e))return n;if(!xi(e)){let t=Ii(e);for(;t&&!Ni(t);){if(bi(t)&&!Co(t))return t;t=Ii(t)}return n}let r=wo(e,t);for(;r&&wi(r)&&Co(r);)r=wo(r,t);return r&&Ni(r)&&Co(r)&&!Ai(r)?n:r||ji(e)||n}var Eo=async function(e){let t=this.getOffsetParent||To,n=this.getDimensions,r=await n(e.floating);return{reference:So(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Do(e){return Pi(e).direction===`rtl`}var Oo={convertOffsetParentRelativeRectToViewportRelativeRect:fo,getDocumentElement:vi,getClippingRect:bo,getOffsetParent:To,getElementRects:Eo,getClientRects:po,getDimensions:xo,getScale:io,isElement:bi,isRTL:Do};function ko(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ao(e,t,n){let r=null,i,a=vi(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Wi(d),h=Wi(a.clientWidth-(u+f)),g=Wi(a.clientHeight-(d+p)),_=Wi(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Hi(0,Vi(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!ko(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=_i(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function jo(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ro(e),u=i||a?[...l?Ri(l):[],...t?Ri(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ao(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?co(e):null;c&&g();function g(){let t=co(e);h&&!ko(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Mo=Qa,No=$a,Po=Ua,Fo=to,Io=Ka,Lo=Ha,Ro=Ya,zo=eo,Bo=(e,t,n)=>{let r=new Map,i=n??{},a={...Oo,...i.platform,_c:r};return Va(e,t,{...i,platform:a})},Vo=typeof document<`u`?C.useLayoutEffect:function(){};function Ho(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,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ho(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ho(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Uo(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wo(e,t){let n=Uo(e);return Math.round(t*n)/n}function Go(e){let t=C.useRef(e);return Vo(()=>{t.current=e}),t}function Ko(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=C.useState(r);Ho(f,r)||p(r);let[m,h]=C.useState(null),[g,_]=C.useState(null),v=C.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=C.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),b=a||m,x=o||g,S=C.useRef(null),w=C.useRef(null),T=C.useRef(u),E=c!=null,D=Go(c),k=Go(i),A=Go(l),j=C.useCallback(()=>{if(!S.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),Bo(S.current,w.current,e).then(e=>{let t={...e,isPositioned:A.current!==!1};M.current&&!Ho(T.current,t)&&(T.current=t,O.flushSync(()=>{d(t)}))})},[f,t,n,k,A]);Vo(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let M=C.useRef(!1);Vo(()=>(M.current=!0,()=>{M.current=!1}),[]),Vo(()=>{if(b&&(S.current=b),x&&(w.current=x),b&&x){if(D.current)return D.current(b,x,j);j()}},[b,x,j,D,E]);let N=C.useMemo(()=>({reference:S,floating:w,setReference:v,setFloating:y}),[v,y]),P=C.useMemo(()=>({reference:b,floating:x}),[b,x]),F=C.useMemo(()=>{let e={position:n,left:0,top:0};if(!P.floating)return e;let t=Wo(P.floating,u.x),r=Wo(P.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Uo(P.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,P.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:j,refs:N,elements:P,floatingStyles:F}),[u,j,N,P,F])}var qo=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Lo({element:r.current,padding:i}).fn(n):r?Lo({element:r,padding:i}).fn(n):{}}}},Jo=(e,t)=>{let n=Mo(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yo=(e,t)=>{let n=No(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xo=(e,t)=>({fn:zo(e).fn,options:[e,t]}),Zo=(e,t)=>{let n=Po(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qo=(e,t)=>{let n=Fo(e);return{name:n.name,fn:n.fn,options:[e,t]}},$o=(e,t)=>{let n=Io(e);return{name:n.name,fn:n.fn,options:[e,t]}},es=(e,t)=>{let n=Ro(e);return{name:n.name,fn:n.fn,options:[e,t]}},ts=(e,t)=>{let n=qo(e);return{name:n.name,fn:n.fn,options:[e,t]}};function ns(e){let t=C.useRef(void 0),n=C.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return C.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var rs=`data-floating-ui-focusable`,is=`active`,as=`selected`,os=`ArrowLeft`,ss=`ArrowRight`,cs=`ArrowUp`,ls=`ArrowDown`,us=[os,ss],ds=[cs,ls];[...us,...ds];var fs={...C},ps=!1,ms=0,hs=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+ms++;function gs(){let[e,t]=C.useState(()=>ps?hs():void 0);return Na(()=>{e??t(hs())},[]),C.useEffect(()=>{ps=!0},[]),e}var _s=fs.useId||gs;function vs(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var ys=C.createContext(null),bs=C.createContext(null),xs=()=>C.useContext(ys)?.id||null,Ss=()=>C.useContext(bs);function Cs(e){return`data-floating-ui-`+e}function ws(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Ts=Cs(`safe-polygon`);function Es(e,t,n){if(n&&!Ma(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function Ds(e){return typeof e==`function`?e():e}function Os(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=Ss(),m=xs(),h=Fa(l),g=Fa(c),_=Fa(n),v=Fa(d),y=C.useRef(),b=C.useRef(-1),x=C.useRef(),S=C.useRef(-1),w=C.useRef(!0),T=C.useRef(!1),E=C.useRef(()=>{}),D=C.useRef(!1),O=La(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});C.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(ws(b),ws(S),w.current=!0,D.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),C.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){O()&&r(!1,e,`hover`)}let t=Ea(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,O]);let k=C.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Es(g.current,`close`,y.current);i&&!x.current?(ws(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(ws(b),r(!1,e,n))},[g,r]),A=La(()=>{E.current(),x.current=void 0}),j=La(()=>{if(T.current){let e=Ea(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Ts),T.current=!1}}),M=La(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);C.useEffect(()=>{if(!s)return;function e(e){if(ws(b),w.current=!1,u&&!Ma(y.current)||Ds(v.current)>0&&!Es(g.current,`open`))return;let t=Es(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(M()){j();return}E.current();let t=Ea(o.floating);if(ws(S),D.current=!1,h.current&&i.current.floatingContext){n||ws(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),E.current=()=>{t.removeEventListener(`mousemove`,r)}}else y.current===`touch`&&Sa(o.floating,e.relatedTarget)||k(e)}function a(e){M()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){j(),A(),M()||k(e)}})(e))}function c(){ws(b)}function l(e){M()||k(e,!1)}if(bi(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,k,A,j,r,n,_,p,g,h,i,M,v]),Na(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&O()){T.current=!0;let e=o.floating;if(bi(o.domReference)&&e){var t;let n=Ea(o.floating).body;n.setAttribute(Ts,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,O]),Na(()=>{n||(y.current=void 0,D.current=!1,A(),j())},[n,A,j]),C.useEffect(()=>()=>{A(),ws(b),ws(S),j()},[s,o.domReference,A,j]);let N=C.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!w.current&&!_.current&&r(!0,t,`hover`)}u&&!Ma(y.current)||n||Ds(v.current)===0||D.current&&e.movementX**2+e.movementY**2<2||(ws(S),y.current===`touch`?i():(D.current=!0,S.current=window.setTimeout(i,Ds(v.current))))}}},[u,r,n,_,v]);return C.useMemo(()=>s?{reference:N}:{},[s,N])}var ks=()=>{},As=C.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:ks,setState:ks,isInstantPhase:!1}),js=()=>C.useContext(As);function Ms(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=C.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=C.useRef(null),s=C.useCallback(e=>{a({currentId:e})},[]);return Na(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,Y.jsx)(As.Provider,{value:C.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function Ns(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=js(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return Na(()=>{o&&l&&(f({delay:{open:1,close:Es(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),Na(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),Na(()=>{o&&u!==ks&&n&&u(s)},[o,n,u,s]),c}function Ps(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Si(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Fs(e){return`composedPath`in e?e.composedPath()[0]:e.target}var Is={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},Ls={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},Rs=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function zs(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=Ss(),g=La(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=C.useRef(!1),{escapeKey:y,outsidePress:b}=Rs(p),{escapeKey:x,outsidePress:S}=Rs(m),w=C.useRef(!1),T=La(e=>{if(!n||!o||!s||e.key!==`Escape`||w.current)return;let t=a.current.floatingContext?.nodeId,i=h?Aa(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}r(!1,ja(e)?e.nativeEvent:e,`escape-key`)}),E=La(e=>{var t;let n=()=>{var t;T(e),(t=Ca(e))==null||t.removeEventListener(`keydown`,n)};(t=Ca(e))==null||t.addEventListener(`keydown`,n)}),D=La(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=Ca(e),s=`[`+Cs(`inert`)+`]`,c=Ea(i.floating).querySelectorAll(s),u=bi(o)?o:null;for(;u&&!Ni(u);){let e=Ii(u);if(Ni(e)||!bi(e))break;u=e}if(c.length&&bi(o)&&!Ta(o)&&!Sa(o,i.floating)&&Array.from(c).every(e=>!Sa(u,e)))return;if(xi(o)&&A){let t=Ni(o),n=Pi(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&Aa(h.nodesRef.current,d).some(t=>wa(e,t.context?.elements.floating));if(wa(e,i.floating)||wa(e,i.domReference)||f)return;let p=h?Aa(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;(n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}r(!1,e,`outside-press`)}),O=La(e=>{var t;let n=()=>{var t;D(e),(t=Ca(e))==null||t.removeEventListener(l,n)};(t=Ca(e))==null||t.addEventListener(l,n)});C.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),w.current=!0}function u(){e=window.setTimeout(()=>{w.current=!1},Mi()?5:0)}let d=Ea(i.floating);s&&(d.addEventListener(`keydown`,x?E:T,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?O:D,S);let p=[];return f&&(bi(i.domReference)&&(p=Ri(i.domReference)),bi(i.floating)&&(p=p.concat(Ri(i.floating))),!bi(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(Ri(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?E:T,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?O:D,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,T,x,E,D,S,O]),C.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let k=C.useMemo(()=>({onKeyDown:T,...u&&{[Is[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[T,r,u,d]),A=C.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:T,onMouseDown:e,onMouseUp:e,[Ls[l]]:()=>{a.current.insideReactTree=!0}}},[T,l,a]);return C.useMemo(()=>o?{reference:k,floating:A}:{},[o,k,A])}function Bs(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=_s(),a=C.useRef({}),[o]=C.useState(()=>vs()),s=xs()!=null,[c,l]=C.useState(r.reference),u=La((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=C.useMemo(()=>({setPositionReference:l}),[]),f=C.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return C.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Vs(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=Bs({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=C.useState(null),[l,u]=C.useState(null),d=o?.domReference||s,f=C.useRef(null),p=Ss();Na(()=>{d&&(f.current=d)},[d]);let m=Ko({...n,elements:{...o,...l&&{reference:l}}}),h=C.useCallback(e=>{let t=bi(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=C.useCallback(e=>{(bi(e)||e===null)&&(f.current=e,c(e)),(bi(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!bi(e))&&m.refs.setReference(e)},[m.refs]),_=C.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=C.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=C.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return Na(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),C.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function Hs(){return _a()&&ga()}function Us(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=C.useRef(!1),u=C.useRef(-1),d=C.useRef(!0);C.useEffect(()=>{if(!s)return;let e=_i(o.domReference);function t(){!n&&xi(o.domReference)&&o.domReference===xa(Ea(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),Hs()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),Hs()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),C.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),C.useEffect(()=>()=>{ws(u)},[]);let f=C.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=Ca(e.nativeEvent);if(c&&bi(t)){if(Hs()&&!e.relatedTarget){if(!d.current&&!Da(t))return}else if(!Oa(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=bi(t)&&t.hasAttribute(Cs(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=xa(o.domReference?o.domReference.ownerDocument:document);!t&&e===o.domReference||Sa(a.current.floatingContext?.refs.floating.current,e)||Sa(o.domReference,e)||i||r(!1,n,`focus`)})}}),[a,o.domReference,r,c]);return C.useMemo(()=>s?{reference:f}:{},[s,f])}function Ws(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[is]:t,[as]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[rs]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[is,as].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Gs(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=C.useCallback(t=>Ws(t,e,`reference`),t),a=C.useCallback(t=>Ws(t,e,`floating`),n),o=C.useCallback(t=>Ws(t,e,`item`),r);return C.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var Ks=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function qs(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=_s(),c=r.domReference?.id||s,l=C.useMemo(()=>ka(r.floating)?.id||i,[r.floating,i]),u=Ks.get(o)??o,d=xs()!=null,f=C.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=C.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=C.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return C.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function Js(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...Js(e,t.id,n)])}function Ys(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function Xs(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function Zs(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){ws(i),u()}if(ws(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=Fs(e),v=e.type===`mouseleave`,y=Ps(c.floating,_),b=Ps(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=Xs(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&bi(e.relatedTarget)&&Ps(c.floating,e.relatedTarget)||f&&Js(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let N=[];switch(C){case`top`:N=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:N=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:N=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:N=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]]}function P(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!Ys([m,h],N)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}Ys([m,h],P([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var Qs={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},$s=Ot((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":N(t),"--scrollarea-over-scroll-behavior":i,"--scrollarea-offset-size":void 0}}}),ec=Z(e=>{let t=X(`ScrollArea`,Qs,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:w,attributes:T,...E}=t,[D,O]=(0,C.useState)(!1),[k,A]=(0,C.useState)(!1),[j,M]=(0,C.useState)(!1),N=(0,C.useRef)(!0),P=(0,C.useRef)(!1),F=(0,C.useRef)(!0),I=(0,C.useRef)(!1),L=Kn({name:`ScrollArea`,props:t,classes:mi,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:T,vars:c,varsResolver:$s}),R=(0,C.useRef)(null),[z,B]=(0,C.useState)(null),V=ns([f,R,(0,C.useCallback)(e=>{B(t=>t===e?t:e)},[])]);return Br(h===`present`?z:null,()=>{let e=R.current;e&&(A(e.scrollHeight>e.clientHeight),M(e.scrollWidth>e.clientWidth))}),Ce(()=>{S&&R.current&&R.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,Y.jsxs)(Wr,{getStyles:L,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...L(`root`),...E,children:[(0,Y.jsx)(pi,{...d,...L(`viewport`,{style:d?.style}),ref:V,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":w||void 0,"data-horizontal-hidden":h===`present`&&!j?`true`:void 0,"data-vertical-hidden":h===`present`&&!k?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-1,c=t===0;s&&!P.current&&_?.(),c&&!N.current&&v?.(),P.current=s,N.current=c;let l=i-(a-o)>=-1,u=i===0;l&&!I.current&&b?.(),u&&!F.current&&y?.(),I.current=l,F.current=u},children:m}),(g===`xy`||g===`x`)&&(0,Y.jsx)(li,{...L(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":w||void 0,"data-hidden":l===`never`||h===`present`&&!j||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:(0,Y.jsx)(fi,{...L(`thumb`)})}),(g===`xy`||g===`y`)&&(0,Y.jsx)(li,{...L(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":w||void 0,"data-hidden":l===`never`||h===`present`&&!k||void 0,forceMount:!0,onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:(0,Y.jsx)(fi,{...L(`thumb`)})}),(0,Y.jsx)(Hr,{...L(`corner`),"data-vertical-scrollbar-position":w||void 0,"data-hovered":D||void 0,"data-hidden":l===`never`||void 0})]})});ec.displayName=`@mantine/core/ScrollArea`;var tc=Z(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...w}=X(`ScrollAreaAutosize`,Qs,e),T=(0,C.useRef)(null),[E,D]=(0,C.useState)(null),O=ns([u,T,(0,C.useCallback)(e=>{D(t=>t===e?t:e)},[])]),k=(0,C.useRef)(!1),A=(0,C.useRef)(!1),j=(0,C.useEffectEvent)(()=>{let e=T.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==k.current&&(A.current?S(t):(A.current=!0,t&&S(!0)),k.current=t)});return Br(S?E:null,j),(0,Y.jsx)(Q,{...w,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,Y.jsx)(Q,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,Y.jsx)(ec,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:O,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});ec.classes=mi,ec.varsResolver=$s,tc.displayName=`@mantine/core/ScrollAreaAutosize`,tc.classes=mi,ec.Autosize=tc;var nc={root:`m_87cf2631`},rc={__staticSelector:`UnstyledButton`},ic=kr(e=>{let t=X(`UnstyledButton`,rc,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t,d=Kn({name:i,props:t,classes:nc,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l});return(0,Y.jsx)(Q,{...d(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});ic.classes=nc,ic.displayName=`@mantine/core/UnstyledButton`;var ac={root:`m_515a97f8`},oc=Z(e=>{let t=X(`VisuallyHidden`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t,u=Kn({name:`VisuallyHidden`,classes:ac,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c});return(0,Y.jsx)(Q,{component:`span`,...u(`root`),...l})});oc.classes=ac,oc.displayName=`@mantine/core/VisuallyHidden`;var sc={root:`m_1b7284a3`},cc=Ot((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:q(t),"--paper-shadow":oe(n)}})),lc=kr(e=>{let t=X(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=Kn({name:`Paper`,props:t,classes:sc,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:cc});return(0,Y.jsx)(Q,{mod:[{withBorder:s},f],...h(`root`),variant:d,...m})});lc.classes=sc,lc.varsResolver=cc,lc.displayName=`@mantine/core/Paper`;function uc(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function dc(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var fc={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function pc({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function mc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=pc({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[fc[c]]:r},d=-t/2;return c===`left`?{...u,...uc(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...uc(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...dc(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...dc(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function hc({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function gc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=Lr();return a?(0,Y.jsx)(`div`,{role:`presentation`,...l,style:{...c,...mc({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}gc.displayName=`@mantine/core/FloatingArrow`;function _c(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function vc({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,C.useRef)(-1),a=(0,C.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,C.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}var yc={root:`m_9814e45f`},bc={zIndex:G(`modal`)},xc=Ot((e,{gradient:t,color:n,backgroundOpacity:r,blur:i,radius:a,zIndex:o})=>({root:{"--overlay-bg":t||(n!==void 0||r!==void 0)&&Xt(n||`#000`,r??.6)||void 0,"--overlay-filter":i?`blur(${N(i)})`:void 0,"--overlay-radius":a===void 0?void 0:q(a),"--overlay-z-index":o?.toString()}})),Sc=kr(e=>{let t=X(`Overlay`,bc,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,fixed:c,center:l,children:u,radius:d,zIndex:f,gradient:p,blur:m,color:h,backgroundOpacity:g,mod:_,attributes:v,...y}=t,b=Kn({name:`Overlay`,props:t,classes:yc,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:xc});return(0,Y.jsx)(Q,{...b(`root`),mod:[{center:l,fixed:c},_],...y,children:u})});Sc.classes=yc,Sc.varsResolver=xc,Sc.displayName=`@mantine/core/Overlay`;function Cc(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}var wc=null;function Tc({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||Cc(n):e;if(t){if(wc){if(document.body.contains(wc))return wc;wc=null}let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return wc=e,e;let t=Cc(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),wc=t,t}return Cc(n)}var Ec={reuseTargetNode:!0},Dc=Z(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=X(`Portal`,Ec,e),[o,s]=(0,C.useState)(!1),c=(0,C.useRef)(null);return Ce(()=>(s(!0),c.current=Tc({target:n,reuseTargetNode:r,...a}),et(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,O.createPortal)((0,Y.jsx)(Y.Fragment,{children:t}),c.current)});Dc.displayName=`@mantine/core/Portal`;var Oc=Z(({withinPortal:e=!0,children:t,...n})=>pn()===`test`||!e?(0,Y.jsx)(Y.Fragment,{children:t}):(0,Y.jsx)(Dc,{...n,children:t}));Oc.displayName=`@mantine/core/OptionalPortal`;var kc=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),Ac={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...kc(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...kc(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...kc(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...kc(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...kc(`top`),common:{transformOrigin:`top right`}}},jc={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function Mc({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in Ac?{transitionProperty:Ac[e].transitionProperty,...i,...Ac[e].common,...Ac[e][jc[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[jc[t]]}}function Nc({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=kn(),d=st(),f=u.respectReducedMotion?d:!1,[p,m]=(0,C.useState)(f?0:e),[h,g]=(0,C.useState)(r?`entered`:`exited`),_=(0,C.useRef)(-1),v=(0,C.useRef)(-1),y=(0,C.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current),y.current=-1}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;if(m(l),l===0)typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`);else{let e=requestAnimationFrame(()=>{O.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current===e&&(y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)}))});y.current=e}},S=e=>{b(),typeof(e?c:l)==`number`?v.current=window.setTimeout(()=>{x(e)},e?c:l):x(e)};return Te(()=>{S(r)},[r]),(0,C.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function Pc({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=pn(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=Nc({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,Y.jsx)(Y.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,Y.jsx)(Y.Fragment,{children:o({})}):o({display:`none`}):(0,Y.jsx)(C.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,Y.jsx)(Y.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:Mc({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,Y.jsx)(C.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,Y.jsx)(Y.Fragment,{children:o(Mc({transition:n,duration:h,state:g,timingFunction:_}))})}Pc.displayName=`@mantine/core/Transition`;var Fc={duration:100,transition:`fade`};function Ic(e,t){return{...Fc,...t,...e}}var[Lc,Rc]=R(`Popover component was not found in the tree`);function zc({childProps:e,disabled:t,opened:n,longPressDelay:r=500,setReference:i,open:a}){let o=(0,C.useRef)(!1),s=(0,C.useRef)(!1),c=(0,C.useRef)(null),l=(0,C.useRef)(t);l.current=t;let u=(e,t,n)=>{i({getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t,toJSON:()=>void 0}),contextElement:n}),a()},d=J(e.onMouseDown,e=>{t||e.button===2&&e.stopPropagation()}),f=J(e.onContextMenu,e=>{t||e.defaultPrevented||(e.preventDefault(),s.current||(u(e.clientX,e.clientY,e.currentTarget),o.current&&(s.current=!0)))}),p=_t(e=>{if(l.current||s.current)return;let t=e,n=t.touches[0]??t.changedTouches[0];n&&(u(n.clientX,n.clientY,c.current),s.current=!0)},{threshold:r,events:[`touch`],cancelOnMove:!0,onStart:e=>{o.current=!0,s.current=!1,c.current=e.currentTarget},onFinish:e=>{o.current=!1,s.current=!1,l.current||e.preventDefault()},onCancel:()=>{o.current=!1,s.current=!1}});return{onContextMenu:f,onMouseDown:d,onTouchStart:J(e.onTouchStart,p.onTouchStart),onTouchEnd:J(e.onTouchEnd,p.onTouchEnd),onTouchCancel:J(e.onTouchCancel,p.onTouchCancel),onTouchMove:J(e.onTouchMove,p.onTouchMove),style:t?e.style:{...e.style,WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`},"data-expanded":n?!0:void 0}}function Bc(e){let{children:t,disabled:n,longPressDelay:r}=X(`PopoverContextMenu`,null,e),i=Dt(t);if(!i)throw Error(`Popover.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Rc(),o=zc({childProps:i.props,disabled:n||a.disabled,opened:a.opened,longPressDelay:r,setReference:a.reference,open:()=>{a.opened||a.onToggle()}});return(0,C.cloneElement)(i,o)}Bc.displayName=`@mantine/core/PopoverContextMenu`;function Vc({children:e,active:t=!0,refProp:n=`ref`,innerRef:r}){let i=nt(Ye(t),r),a=Dt(e);return a?(0,C.cloneElement)(a,{[n]:i}):e}function Hc(e){return(0,Y.jsx)(oc,{tabIndex:-1,"data-autofocus":!0,...e})}Vc.displayName=`@mantine/core/FocusTrap`,Hc.displayName=`@mantine/core/FocusTrapInitialFocus`,Vc.InitialFocus=Hc;var Uc={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},Wc=Z(e=>{let t=X(`PopoverDropdown`,null,e),{className:n,style:r,vars:i,children:a,onKeyDownCapture:o,variant:s,classNames:c,styles:l,ref:u,...d}=t,f=Rc(),{dir:p}=Lr(),m=f.arrowPosition===`merge`&&f.withArrow?hc({position:f.placement,dir:p}):void 0,h=Ee({opened:f.opened,shouldReturnFocus:f.returnFocus}),g=f.withRoles?{"aria-labelledby":f.getTargetId(),id:f.getDropdownId(),role:`dialog`,tabIndex:-1}:{},_=nt(u,f.floating);return f.disabled?null:(0,Y.jsx)(Oc,{...f.portalProps,withinPortal:f.withinPortal,children:(0,Y.jsx)(Pc,{mounted:f.opened,...f.transitionProps,transition:f.transitionProps?.transition||`fade`,duration:f.transitionProps?.duration??150,keepMounted:f.keepMounted,keepMountedMode:f.keepMountedMode,exitDuration:typeof f.transitionProps?.exitDuration==`number`?f.transitionProps.exitDuration:f.transitionProps?.duration,children:e=>(0,Y.jsx)(Vc,{active:f.trapFocus&&f.opened,innerRef:_,children:(0,Y.jsxs)(Q,{...g,...d,variant:s,onKeyDownCapture:ne(()=>{f.onClose?.(),f.onDismiss?.()},{active:f.closeOnEscape,onTrigger:h,onKeyDown:o}),"data-position":f.placement,"data-fixed":f.floatingStrategy===`fixed`||void 0,...f.getStyles(`dropdown`,{className:n,props:t,classNames:c,styles:l,style:[{...e,...m,zIndex:f.zIndex,top:f.y??0,left:f.x??0,width:f.width===`target`?void 0:N(f.width),...f.referenceHidden?{display:`none`}:null},f.resolvedStyles?.dropdown,l?.dropdown,r]}),children:[a,(0,Y.jsx)(gc,{ref:f.arrowRef,arrowX:f.arrowX,arrowY:f.arrowY,visible:f.withArrow,position:f.placement,arrowSize:f.arrowSize,arrowRadius:f.arrowRadius,arrowOffset:f.arrowOffset,arrowPosition:f.arrowPosition,...f.getStyles(`arrow`,{props:t,classNames:c,styles:l})})]})})})})});Wc.classes=Uc,Wc.displayName=`@mantine/core/PopoverDropdown`;var Gc={refProp:`ref`,popupType:`dialog`},Kc=Z(e=>{let{children:t,refProp:n,popupType:r,ref:i,...a}=X(`PopoverTarget`,Gc,e),o=Dt(t);if(!o)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let s=a,c=Rc(),l=nt(c.reference,St(o),i),u=c.withRoles?{"aria-haspopup":r,"aria-expanded":c.opened,"aria-controls":c.opened?c.getDropdownId():void 0,id:c.getTargetId()}:{},d=o.props;return(0,C.cloneElement)(o,{...s,...u,...c.targetProps,className:At(c.targetProps.className,s.className,d.className),[n]:l,...c.controlled?null:{onClick:e=>{c.onToggle(),d.onClick?.(e)}}})});Kc.displayName=`@mantine/core/PopoverTarget`;function qc(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Jc(e,t,n,r){let i=qc(e.middlewares),a=[Jo(e.offset),$o()];if(i.flip&&!n){let e=typeof i.flip==`boolean`?{}:i.flip,t=r?{fallbackStrategy:`initialPlacement`,...e}:e;a.push(Zo(t))}if(i.shift){let t=typeof i.shift==`boolean`?{}:i.shift;a.push(Yo(n=>{let r=n.placement.startsWith(`top`)||n.placement.startsWith(`bottom`);return{limiter:Xo(),padding:5,...e.width===`target`&&r?{mainAxis:!1}:null,...t}}))}return i.inline&&a.push(typeof i.inline==`boolean`?es():es(i.inline)),a.push(ts({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width===`target`)&&a.push(Qo({...typeof i.size==`boolean`?{}:i.size,apply({rects:n,availableWidth:r,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};i.size&&(typeof i.size==`object`&&i.size.apply?i.size.apply({rects:n,availableWidth:r,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${r}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),a}function Yc(e){let[t,n]=rt({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=(0,C.useRef)(t),i=(0,C.useRef)(!1),[a,o]=(0,C.useState)(null),s=e.preventPositionChangeWhenVisible!==!1,c=(0,C.useRef)(t);t!==c.current&&(c.current=t,t&&a!==null&&o(null));let l=(0,C.useRef)(e.position);e.position!==l.current&&(l.current=e.position,i.current=!1,a!==null&&o(null));let u=(0,C.useCallback)(()=>o(null),[]),d=()=>{t&&!e.disabled&&n(!1)},f=()=>{e.disabled||n(!t)},p=Vs({open:t,strategy:e.strategy,placement:s?a??e.position:e.position,middleware:Jc(e,()=>p,s&&a!==null,s),whileElementsMounted:e.keepMounted?void 0:jo}),m=(0,C.useRef)(p.placement);m.current=p.placement,(0,C.useEffect)(()=>{if(!e.keepMounted)return;let n=p.refs.reference.current,r=p.refs.floating.current;if(t&&n&&r)return jo(n,r,p.update)},[e.keepMounted,t,p.update,p.elements.reference,p.elements.floating]),Ce(()=>{if(!t){i.current=!1;return}if(!s||a!==null)return;let e=p.refs.floating.current;if(e&&e.offsetHeight!==0&&e.offsetWidth!==0){if(!i.current){i.current=!0,p.update();let e=requestAnimationFrame(()=>o(m.current));return()=>cancelAnimationFrame(e)}p.isPositioned&&o(p.placement)}},[s,t,p.isPositioned,p.placement,a,p.update]);let h=(0,C.useRef)(p.placement);return Ce(()=>{h.current!==p.placement&&(h.current=p.placement,e.onPositionChange?.(p.placement))},[p.placement]),Te(()=>{t!==r.current&&(t?e.onOpen?.():e.onClose?.()),r.current=t},[t,e.onClose,e.onOpen]),{floating:p,controlled:typeof e.opened==`boolean`,opened:t,onClose:d,onToggle:f,resetLockedPlacement:u}}var Xc={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,preventPositionChangeWhenVisible:!0,clickOutsideEvents:[`mousedown`,`touchstart`],clickOutsideCapture:!1,zIndex:G(`popover`),__staticSelector:`Popover`,width:`max-content`},Zc=Ot((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:q(t),"--popover-shadow":oe(n)}}));function Qc(e){let t=X(`Popover`,Xc,e),{children:n,position:r,offset:i,onPositionChange:a,opened:o,transitionProps:s,onExitTransitionEnd:c,onEnterTransitionEnd:l,width:u,middlewares:d,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,unstyled:_,classNames:v,styles:y,closeOnClickOutside:b,withinPortal:x,portalProps:S,closeOnEscape:w,clickOutsideEvents:T,clickOutsideCapture:E,trapFocus:D,onClose:O,onDismiss:k,onOpen:A,onChange:j,zIndex:M,radius:N,shadow:P,id:F,defaultOpened:I,__staticSelector:L,withRoles:R,disabled:z,returnFocus:B,variant:V,keepMounted:H,keepMountedMode:ee,vars:U,floatingStrategy:W,withOverlay:G,overlayProps:te,hideDetached:ne,attributes:K,preventPositionChangeWhenVisible:re,...q}=t,ie=Kn({name:L,props:t,classes:Uc,classNames:v,styles:y,unstyled:_,attributes:K,rootSelector:`dropdown`,vars:U,varsResolver:Zc}),{resolvedStyles:ae}=jn({classNames:v,styles:y,props:t}),oe=(0,C.useRef)(null),[J,se]=(0,C.useState)(null),[ce,le]=(0,C.useState)(null),{dir:ue}=Lr(),de=pn(),fe=Qe(F),pe=Yc({middlewares:d,width:u,position:_c(ue,r),offset:typeof i==`number`?i+(f?p/2:0):i,arrowRef:oe,arrowOffset:m,onPositionChange:a,opened:o,defaultOpened:I,onChange:j,onOpen:A,onClose:O,onDismiss:k,strategy:W,disabled:z,preventPositionChangeWhenVisible:re,keepMounted:H});_e(()=>{b&&(pe.onClose(),k?.())},T,[J,ce],!0,E);let me=(0,C.useCallback)(e=>{se(e),pe.floating.refs.setReference(e)},[pe.floating.refs.setReference]),he=(0,C.useCallback)(e=>{le(e),pe.floating.refs.setFloating(e)},[pe.floating.refs.setFloating]),ge=(0,C.useCallback)(()=>{s?.onExited?.(),c?.(),pe.resetLockedPlacement()},[s?.onExited,c,pe.resetLockedPlacement]),ve=(0,C.useCallback)(()=>{s?.onEntered?.(),l?.()},[s?.onEntered,l]);return(0,Y.jsxs)(Lc,{value:{returnFocus:B,disabled:z,controlled:pe.controlled,reference:me,floating:he,x:pe.floating.x,y:pe.floating.y,arrowX:pe.floating?.middlewareData?.arrow?.x,arrowY:pe.floating?.middlewareData?.arrow?.y,opened:pe.opened,arrowRef:oe,transitionProps:{...s,onExited:ge,onEntered:ve},width:u,withArrow:f,arrowSize:p,arrowOffset:m,arrowRadius:h,arrowPosition:g,placement:pe.floating.placement,trapFocus:D,withinPortal:x,portalProps:S,zIndex:M,radius:N,shadow:P,closeOnEscape:w,onDismiss:k,onClose:pe.onClose,onToggle:pe.onToggle,getTargetId:()=>fe,getDropdownId:()=>`${fe}-dropdown`,withRoles:R,targetProps:q,__staticSelector:L,classNames:v,styles:y,unstyled:_,variant:V,keepMounted:H,keepMountedMode:ee,getStyles:ie,resolvedStyles:ae,floatingStrategy:W,referenceHidden:ne&&de!==`test`?pe.floating.middlewareData.hide?.referenceHidden:!1},children:[n,G&&(0,Y.jsx)(Pc,{transition:`fade`,mounted:pe.opened,duration:s?.duration??250,exitDuration:s?.exitDuration??s?.duration??250,children:e=>(0,Y.jsx)(Oc,{withinPortal:x,children:(0,Y.jsx)(Sc,{...te,...ie(`overlay`,{className:te?.className,style:[e,te?.style]})})})})]})}Qc.Target=Kc,Qc.Dropdown=Wc,Qc.ContextMenu=Bc,Qc.varsResolver=Zc,Qc.displayName=`@mantine/core/Popover`,Qc.extend=e=>e,Qc.withProps=e=>{let t=t=>(0,Y.jsx)(Qc,{...e,...t});return t.extend=Qc.extend,t.displayName=`WithProps(${Qc.displayName})`,t};var $c={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},el=({className:e,...t})=>(0,Y.jsxs)(Q,{component:`span`,className:At($c.barsLoader,e),...t,children:[(0,Y.jsx)(`span`,{className:$c.bar}),(0,Y.jsx)(`span`,{className:$c.bar}),(0,Y.jsx)(`span`,{className:$c.bar})]});el.displayName=`@mantine/core/Bars`;var tl=({className:e,...t})=>(0,Y.jsxs)(Q,{component:`span`,className:At($c.dotsLoader,e),...t,children:[(0,Y.jsx)(`span`,{className:$c.dot}),(0,Y.jsx)(`span`,{className:$c.dot}),(0,Y.jsx)(`span`,{className:$c.dot})]});tl.displayName=`@mantine/core/Dots`;var nl=({className:e,...t})=>(0,Y.jsx)(Q,{component:`span`,className:At($c.ovalLoader,e),...t});nl.displayName=`@mantine/core/Oval`;var rl={bars:el,oval:nl,dots:tl},il={loaders:rl,type:`oval`},al=Ot((e,{size:t,color:n})=>({root:{"--loader-size":K(t,`loader-size`),"--loader-color":n?Kt(n,e):void 0}})),ol=Z(e=>{let t=X(`Loader`,il,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=Kn({name:`Loader`,props:t,classes:$c,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:al});return p?(0,Y.jsx)(Q,{...g(`root`),...h,children:p}):(0,Y.jsx)(Q,{...g(`root`),component:d[i],variant:f,size:n,...h})});ol.defaultLoaders=rl,ol.classes=$c,ol.varsResolver=al,ol.displayName=`@mantine/core/Loader`;var sl={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},cl={orientation:`horizontal`},ll=Ot((e,{borderWidth:t})=>({group:{"--ai-border-width":N(t)}})),ul=Z(e=>{let t=X(`ActionIconGroup`,cl,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t,m=Kn({name:`ActionIconGroup`,props:t,classes:sl,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:ll,rootSelector:`group`});return(0,Y.jsx)(Q,{...m(`group`),variant:u,mod:[{orientation:s},d],role:`group`,...p})});ul.classes=sl,ul.varsResolver=ll,ul.displayName=`@mantine/core/ActionIconGroup`;var dl=Ot((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":K(o,`section-height`),"--section-padding-x":K(o,`section-padding-x`),"--section-fz":ie(o),"--section-radius":t===void 0?void 0:q(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),fl=Z(e=>{let t=X(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t,m=Kn({name:`ActionIconGroupSection`,props:t,classes:sl,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:dl,rootSelector:`groupSection`});return(0,Y.jsx)(Q,{...m(`groupSection`),variant:c,...p})});fl.classes=sl,fl.varsResolver=dl,fl.displayName=`@mantine/core/ActionIconGroupSection`;var pl=Ot((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":K(t,`ai-size`),"--ai-radius":n===void 0?void 0:q(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),ml=kr(e=>{let t=X(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=Kn({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:sl,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:pl});return(0,Y.jsxs)(ic,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,Y.jsx)(Pc,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,Y.jsx)(Q,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,Y.jsx)(ol,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,Y.jsx)(Q,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});ml.classes=sl,ml.varsResolver=pl,ml.displayName=`@mantine/core/ActionIcon`,ml.Group=ul,ml.GroupSection=fl;function hl({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,Y.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,Y.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}hl.displayName=`@mantine/core/CloseIcon`;var gl={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},_l={variant:`subtle`},vl=Ot((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":K(t,`cb-size`),"--cb-radius":n===void 0?void 0:q(n),"--cb-icon-size":N(r)}})),yl=kr(e=>{let t=X(`CloseButton`,_l,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=Kn({name:_||`CloseButton`,props:t,className:o,style:c,classes:gl,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:vl});return(0,Y.jsxs)(ic,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,Y.jsx)(hl,{}),r]})});yl.classes=gl,yl.varsResolver=vl,yl.displayName=`@mantine/core/CloseButton`;function bl(e){return C.Children.toArray(e).filter(Boolean)}var xl={root:`m_4081bf90`},Sl={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},Cl=Ot((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":re(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),wl=Z(e=>{let t=X(`Group`,Sl,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=bl(s),x=b.length,S=re(c??`md`),C=Kn({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:xl,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:Cl});return(0,Y.jsx)(Q,{...C(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});wl.classes=xl,wl.varsResolver=Cl,wl.displayName=`@mantine/core/Group`;var[Tl,El]=R(`ModalBase component was not found in tree`);function Dl({opened:e,transitionDuration:t}){let[n,r]=(0,C.useState)(e),i=(0,C.useRef)(-1),a=st()?0:t;return(0,C.useEffect)(()=>(e?(r(!0),window.clearTimeout(i.current)):a===0?r(!1):i.current=window.setTimeout(()=>r(!1),a),()=>window.clearTimeout(i.current)),[e,a]),n}function Ol({id:e,transitionProps:t,opened:n,trapFocus:r,closeOnEscape:i,onClose:a,returnFocus:o,handledEscapeEvents:s}){let c=Qe(e),[l,u]=(0,C.useState)(!1),[d,f]=(0,C.useState)(!1),p=Dl({opened:n,transitionDuration:typeof t?.duration==`number`?t?.duration:200});return $e(`keydown`,e=>{e.key===`Escape`&&i&&!e.isComposing&&n&&!s?.has(e)&&e.target?.getAttribute(`data-mantine-stop-propagation`)!==`true`&&(s?.add(e),a())},{capture:!0}),Ee({opened:n,shouldReturnFocus:r&&o}),{_id:c,titleMounted:l,bodyMounted:d,shouldLockScroll:p,setTitleMounted:u,setBodyMounted:f}}var kl=function(){return kl=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},kl.apply(this,arguments)};function Al(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function jl(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ml=`right-scroll-bar-position`,Nl=`width-before-scroll-bar`,Pl=`with-scroll-bars-hidden`,Fl=`--removed-body-scroll-bar-size`;function Il(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ll(e,t){var n=(0,C.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Rl=typeof window<`u`?C.useLayoutEffect:C.useEffect,zl=new WeakMap;function Bl(e,t){var n=Ll(t||null,function(t){return e.forEach(function(e){return Il(e,t)})});return Rl(function(){var t=zl.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Il(e,null)}),i.forEach(function(e){r.has(e)||Il(e,a)})}zl.set(n,e)},[e]),n}function Vl(e){return e}function Hl(e,t){t===void 0&&(t=Vl);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ul(e){e===void 0&&(e={});var t=Hl(null);return t.options=kl({async:!0,ssr:!1},e),t}var Wl=function(e){var t=e.sideCar,n=Al(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return C.createElement(r,kl({},n))};Wl.isSideCarExport=!0;function Gl(e,t){return e.useMedium(t),Wl}var Kl=Ul(),ql=function(){},Jl=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:ql,onWheelCapture:ql,onTouchMoveCapture:ql}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=Al(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Bl([n,t]),w=kl(kl({},b),i);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:Kl,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?C.cloneElement(C.Children.only(s),kl(kl({},w),{ref:S})):C.createElement(v,kl({},w,{className:c,ref:S}),s))});Jl.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Jl.classNames={fullWidth:Nl,zeroRight:Ml};var Yl=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Xl(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Yl();return t&&e.setAttribute(`nonce`,t),e}function Zl(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ql(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var $l=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Xl())&&(Zl(t,n),Ql(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},eu=function(){var e=$l();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tu=function(){var e=eu();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},nu={left:0,top:0,right:0,gap:0},ru=function(e){return parseInt(e||``,10)||0},iu=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[ru(n),ru(r),ru(i)]},au=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return nu;var t=iu(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},ou=tu(),su=`data-scroll-locked`,cu=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
3
|
+
.${Pl} {
|
|
4
|
+
overflow: hidden ${r};
|
|
5
|
+
padding-right: ${s}px ${r};
|
|
6
|
+
}
|
|
7
|
+
body[${su}] {
|
|
8
|
+
overflow: hidden ${r};
|
|
9
|
+
overscroll-behavior: contain;
|
|
10
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
11
|
+
padding-left: ${i}px;
|
|
12
|
+
padding-top: ${a}px;
|
|
13
|
+
padding-right: ${o}px;
|
|
14
|
+
margin-left:0;
|
|
15
|
+
margin-top:0;
|
|
16
|
+
margin-right: ${s}px ${r};
|
|
17
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.${Ml} {
|
|
21
|
+
right: ${s}px ${r};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.${Nl} {
|
|
25
|
+
margin-right: ${s}px ${r};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.${Ml} .${Ml} {
|
|
29
|
+
right: 0 ${r};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.${Nl} .${Nl} {
|
|
33
|
+
margin-right: 0 ${r};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
body[${su}] {
|
|
37
|
+
${Fl}: ${s}px;
|
|
38
|
+
}
|
|
39
|
+
`},lu=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},uu=function(){C.useEffect(function(){return document.body.setAttribute(su,(lu()+1).toString()),function(){var e=lu()-1;e<=0?document.body.removeAttribute(su):document.body.setAttribute(su,e.toString())}},[])},du=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;uu();var a=C.useMemo(function(){return au(i)},[i]);return C.createElement(ou,{styles:cu(a,!t,i,n?``:`!important`)})},fu=!1;if(typeof window<`u`)try{var pu=Object.defineProperty({},"passive",{get:function(){return fu=!0,!0}});window.addEventListener(`test`,pu,pu),window.removeEventListener(`test`,pu,pu)}catch{fu=!1}var mu=fu?{passive:!1}:!1,hu=function(e){return e.tagName===`TEXTAREA`},gu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!hu(e)&&n[t]===`visible`)},_u=function(e){return gu(e,`overflowY`)},vu=function(e){return gu(e,`overflowX`)},yu=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Su(e,r)){var i=Cu(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},bu=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},xu=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Su=function(e,t){return e===`v`?_u(t):vu(t)},Cu=function(e,t){return e===`v`?bu(t):xu(t)},wu=function(e,t){return e===`h`&&t===`rtl`?-1:1},Tu=function(e,t,n,r,i){var a=wu(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Cu(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Su(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Eu=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Du=function(e){return[e.deltaX,e.deltaY]},Ou=function(e){return e&&`current`in e?e.current:e},ku=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Au=function(e){return`
|
|
40
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
41
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
42
|
+
`},ju=0,Mu=[];function Nu(e){var t=C.useRef([]),n=C.useRef([0,0]),r=C.useRef(),i=C.useState(ju++)[0],a=C.useState(tu)[0],o=C.useRef(e);C.useEffect(function(){o.current=e},[e]),C.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=jl([e.lockRef.current],(e.shards||[]).map(Ou),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=C.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Eu(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=yu(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=yu(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Tu(h,t,e,h===`h`?s:c,!0)},[]),c=C.useCallback(function(e){var n=e;if(Mu.length&&Mu[Mu.length-1]===a){var r=`deltaY`in n?Du(n):Eu(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ku(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(Ou).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=C.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Pu(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=C.useCallback(function(e){n.current=Eu(e),r.current=void 0},[]),d=C.useCallback(function(t){l(t.type,Du(t),t.target,s(t,e.lockRef.current))},[]),f=C.useCallback(function(t){l(t.type,Eu(t),t.target,s(t,e.lockRef.current))},[]);C.useEffect(function(){return Mu.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,mu),document.addEventListener(`touchmove`,c,mu),document.addEventListener(`touchstart`,u,mu),function(){Mu=Mu.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,mu),document.removeEventListener(`touchmove`,c,mu),document.removeEventListener(`touchstart`,u,mu)}},[]);var p=e.removeScrollBar,m=e.inert;return C.createElement(C.Fragment,null,m?C.createElement(a,{styles:Au(i)}):null,p?C.createElement(du,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Pu(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Fu=Gl(Kl,Nu),Iu=C.forwardRef(function(e,t){return C.createElement(Jl,kl({},e,{ref:t,sideCar:Fu}))});Iu.classNames=Jl.classNames;function Lu({keepMounted:e,keepMountedMode:t=`activity`,opened:n,onClose:r,id:i,transitionProps:a,onExitTransitionEnd:o,onEnterTransitionEnd:s,trapFocus:c,closeOnEscape:l,returnFocus:u,closeOnClickOutside:d,withinPortal:f,portalProps:p,lockScroll:m,children:h,zIndex:g,shadow:_,padding:v,__vars:y,unstyled:b,removeScrollProps:x,__handledEscapeEvents:S,...C}){let{_id:w,titleMounted:T,bodyMounted:E,shouldLockScroll:D,setTitleMounted:O,setBodyMounted:k}=Ol({id:i,transitionProps:a,opened:n,trapFocus:c,closeOnEscape:l,onClose:r,returnFocus:u,handledEscapeEvents:S}),{key:A,...j}=x||{};return(0,Y.jsx)(Oc,{...p,withinPortal:f,children:(0,Y.jsx)(Tl,{value:{opened:n,onClose:r,closeOnClickOutside:d,onExitTransitionEnd:o,onEnterTransitionEnd:s,transitionProps:{...a,keepMounted:e,keepMountedMode:t},getTitleId:()=>`${w}-title`,getBodyId:()=>`${w}-body`,titleMounted:T,bodyMounted:E,setTitleMounted:O,setBodyMounted:k,trapFocus:c,closeOnEscape:l,zIndex:g,unstyled:b},children:(0,Y.jsx)(Iu,{enabled:D&&m,...j,children:(0,Y.jsx)(Q,{...C,id:w,__vars:{...y,"--mb-z-index":(g||G(`modal`)).toString(),"--mb-shadow":oe(_),"--mb-padding":re(v)},children:h})},A)})})}Lu.displayName=`@mantine/core/ModalBase`;function Ru(){let e=El();return(0,C.useEffect)(()=>(e.setBodyMounted(!0),()=>e.setBodyMounted(!1)),[]),e.getBodyId()}var zu={title:`m_615af6c9`,header:`m_b5489c3c`,inner:`m_60c222c7`,content:`m_fd1ab0aa`,close:`m_606cb269`,body:`m_5df29311`};function Bu({className:e,...t}){let n=Ru(),r=El();return(0,Y.jsx)(Q,{id:n,className:At({[zu.body]:!r.unstyled},e),...t})}Bu.displayName=`@mantine/core/ModalBaseBody`;function Vu({className:e,onClick:t,...n}){let r=El();return(0,Y.jsx)(yl,{...n,onClick:e=>{r.onClose(),t?.(e)},className:At({[zu.close]:!r.unstyled},e),unstyled:r.unstyled})}Vu.displayName=`@mantine/core/ModalBaseCloseButton`;function Hu({transitionProps:e,className:t,innerProps:n,onKeyDown:r,style:i,ref:a,...o}){let s=El();return(0,Y.jsx)(Pc,{mounted:s.opened,transition:`pop`,...s.transitionProps,onExited:()=>{s.onExitTransitionEnd?.(),s.transitionProps?.onExited?.()},onEntered:()=>{s.onEnterTransitionEnd?.(),s.transitionProps?.onEntered?.()},...e,children:e=>(0,Y.jsx)(`div`,{...n,className:At({[zu.inner]:!s.unstyled},n.className),children:(0,Y.jsx)(Vc,{active:s.opened&&s.trapFocus,innerRef:a,children:(0,Y.jsx)(lc,{...o,component:`section`,role:`dialog`,tabIndex:-1,"aria-modal":!0,"aria-describedby":s.bodyMounted?s.getBodyId():void 0,"aria-labelledby":s.titleMounted?s.getTitleId():void 0,style:[i,e],className:At({[zu.content]:!s.unstyled},t),unstyled:s.unstyled,children:o.children})})})})}Hu.displayName=`@mantine/core/ModalBaseContent`;function Uu({className:e,...t}){let n=El();return(0,Y.jsx)(Q,{component:`header`,className:At({[zu.header]:!n.unstyled},e),...t})}Uu.displayName=`@mantine/core/ModalBaseHeader`;var Wu={duration:200,timingFunction:`ease`,transition:`fade`};function Gu(e){let t=El();return{...Wu,...t.transitionProps,...e}}function Ku({onClick:e,transitionProps:t,style:n,visible:r,...i}){let a=El(),o=Gu(t),s=r===void 0?a.opened:r;return(0,Y.jsx)(Pc,{mounted:s,...o,transition:`fade`,children:t=>(0,Y.jsx)(Sc,{fixed:!0,style:[n,t,s?void 0:{pointerEvents:`none`}],zIndex:a.zIndex,unstyled:a.unstyled,onClick:t=>{e?.(t),a.closeOnClickOutside&&a.onClose()},...i})})}Ku.displayName=`@mantine/core/ModalBaseOverlay`;function qu(){let e=El();return(0,C.useEffect)(()=>(e.setTitleMounted(!0),()=>e.setTitleMounted(!1)),[]),e.getTitleId()}function Ju({className:e,...t}){let n=qu(),r=El();return(0,Y.jsx)(Q,{component:`h2`,className:At({[zu.title]:!r.unstyled},e),id:n,...t})}Ju.displayName=`@mantine/core/ModalBaseTitle`;function Yu({children:e}){return(0,Y.jsx)(Y.Fragment,{children:e})}var Xu=(0,C.createContext)({size:`sm`}),Zu=Z(e=>{let t=X(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,C.use)(Xu),{resolvedClassNames:l,resolvedStyles:u}=jn({classNames:a,styles:o,props:t});return(0,Y.jsx)(yl,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});Zu.displayName=`@mantine/core/InputClearButton`;var Qu={xs:7,sm:8,md:10,lg:12,xl:15};function $u({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,Y.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:Qu[i]},children:[o,n||r]}):n===null?null:n||o||r}var ed=(0,C.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),td={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},nd=Ot((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${ie(t)} - ${N(2)})`}})),rd=Z(e=>{let t=X(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=X(`InputDescription`,null,t),f=(0,C.use)(ed),p=Kn({name:[`InputWrapper`,c],props:t,classes:td,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:nd}),m=l&&f?.getStyles||p;return(0,Y.jsx)(Q,{component:`p`,...m(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});rd.classes=td,rd.varsResolver=nd,rd.displayName=`@mantine/core/InputDescription`;var id=Ot((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${ie(t)} - ${N(2)})`}})),ad=Z(e=>{let t=X(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=Kn({name:[`InputWrapper`,l],props:t,classes:td,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:id}),p=(0,C.use)(ed),m=u&&p?.getStyles||f;return(0,Y.jsx)(Q,{component:`p`,...m(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});ad.classes=td,ad.varsResolver=id,ad.displayName=`@mantine/core/InputError`;var od={labelElement:`label`},sd=Ot((e,{size:t})=>({label:{"--input-label-size":ie(t),"--input-asterisk-color":void 0}})),cd=Z(e=>{let t=X(`InputLabel`,od,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=Kn({name:[`InputWrapper`,p],props:t,classes:td,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:sd}),v=(0,C.use)(ed),y=v?.getStyles||_,b=g.component||c,x=typeof b!=`string`||b===`label`;return(0,Y.jsxs)(Q,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:x?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,Y.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});cd.classes=td,cd.varsResolver=sd,cd.displayName=`@mantine/core/InputLabel`;var ld=Z(e=>{let t=X(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t,p=Kn({name:[`InputPlaceholder`,c],props:t,classes:td,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`});return(0,Y.jsx)(Q,{...p(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});ld.classes=td,ld.displayName=`@mantine/core/InputPlaceholder`;var ud=Ot((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${ie(t)} - ${N(2)})`}})),dd=Z(e=>{let t=X(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=Kn({name:[`InputWrapper`,l],props:t,classes:td,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:ud}),p=(0,C.use)(ed),m=u&&p?.getStyles||f;return(0,Y.jsx)(Q,{component:`p`,...m(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});dd.classes=td,dd.varsResolver=ud,dd.displayName=`@mantine/core/InputSuccess`;function fd(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var pd={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},md=Ot((e,{size:t})=>({label:{"--input-label-size":ie(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${ie(t)} - ${N(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${ie(t)} - ${N(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${ie(t)} - ${N(2)})`}})),hd=Z(e=>{let t=X(`InputWrapper`,pd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:g,labelProps:_,descriptionProps:v,errorProps:y,successProps:b,labelElement:x,children:S,withAsterisk:w,id:T,required:E,__stylesApiProps:D,mod:O,attributes:k,...A}=t,j=Kn({name:[`InputWrapper`,u],props:D||t,classes:td,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:md}),M={size:c,variant:l,__staticSelector:u},N=Qe(T),P=typeof w==`boolean`?w:E,F=y?.id||`${N}-error`,I=b?.id||`${N}-success`,L=v?.id||`${N}-description`,R=N,z=!!m&&typeof m!=`boolean`,B=!!h&&typeof h!=`boolean`&&!m,V=!!g,H=z&&f.includes(`error`),ee=B&&f.includes(`error`),U=V&&f.includes(`description`),W=`${H?F:``} ${ee?I:``} ${U?L:``}`,G=W.trim().length>0?W.trim():void 0,te=_?.id||`${N}-label`,ne=p&&(0,Y.jsx)(cd,{labelElement:x,id:te,htmlFor:R,required:P,...M,..._,children:p},`label`),K=V&&(0,Y.jsx)(rd,{...v,...M,size:v?.size||M.size,id:v?.id||L,children:g},`description`),re=(0,Y.jsx)(C.Fragment,{children:d(S)},`input`),q=z&&(0,C.createElement)(ad,{...y,...M,size:y?.size||M.size,key:`error`,id:y?.id||F},m),ie=B&&(0,C.createElement)(dd,{...b,...M,size:b?.size||M.size,key:`success`,id:b?.id||I},h),ae=f.map(e=>{switch(e){case`label`:return ne;case`input`:return re;case`description`:return K;case`error`:return q||ie;default:return null}});return(0,Y.jsx)(ed,{value:{getStyles:j,describedBy:G,inputId:R,labelId:ne&&f.includes(`label`)?te:void 0,...fd(f,{hasDescription:V,hasError:z||B})},children:(0,Y.jsx)(Q,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},O],id:x===`label`?void 0:T,...j(`root`),...A,children:ae})})});hd.classes=td,hd.varsResolver=md,hd.displayName=`@mantine/core/InputWrapper`;var gd={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},_d=Ot((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":K(t.size,`input-height`),"--input-fz":ie(t.size),"--input-radius":t.radius===void 0?void 0:q(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:N(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:N(t.rightSectionWidth),"--input-padding-y":t.multiline?K(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),vd=kr(e=>{let t=X(`Input`,gd,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:w,vars:T,pointer:E,multiline:D,radius:O,id:k,withAria:A,withErrorStyles:j,withSuccessStyles:M,mod:N,inputSize:P,attributes:F,__clearSection:I,__clearable:L,__clearSectionMode:R,__defaultRightSection:z,loading:B,loadingPosition:V,loaderProps:H,__bottomSection:ee,__bottomSectionProps:U,rootRef:W,dir:G,...te}=t,{styleProps:ne,rest:K}=er(te),re=(0,C.use)(ed),q={offsetBottom:re?.offsetBottom,offsetTop:re?.offsetTop},ie=Kn({name:[`Input`,c],props:l||t,classes:td,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:F,stylesCtx:q,rootSelector:`wrapper`,vars:T,varsResolver:_d}),ae=A?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":re?.describedBy,id:re?.inputId||k}:{},oe=B?(0,Y.jsx)(ol,{size:V===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`,...H}):null,J=B&&V===`left`?oe:h,se=$u({__clearable:L,__clearSection:I,rightSection:B&&V===`right`?oe:v,__defaultRightSection:z,size:u,__clearSectionMode:R});return(0,Y.jsx)(Xu,{value:{size:u||`sm`},children:(0,Y.jsxs)(Q,{ref:W,dir:G,...ie(`wrapper`),...ne,...d,mod:[{error:!!f&&j,success:!!p&&!f&&M,pointer:E,disabled:m,multiline:D,withRightSection:!!se,withLeftSection:!!J,withBottomSection:!!ee},N],variant:w,size:u,children:[J&&(0,Y.jsx)(`div`,{...g,"data-position":`left`,...ie(`section`,{className:g?.className,style:g?.style}),children:J}),(0,Y.jsx)(Q,{component:`input`,...K,...ae,required:s,mod:{disabled:m,error:!!f&&j,success:!!p&&!f&&M},variant:w,__size:P,...ie(`input`)}),ee&&(0,Y.jsx)(`div`,{...U,...ie(`bottomSection`,{className:U?.className,style:U?.style}),children:ee}),se&&(0,Y.jsx)(`div`,{...y,"data-position":`right`,...ie(`section`,{className:y?.className,style:y?.style}),children:se})]})})});vd.classes=td,vd.varsResolver=_d,vd.Wrapper=hd,vd.Label=cd,vd.Error=ad,vd.Success=dd,vd.Description=rd,vd.Placeholder=ld,vd.ClearButton=Zu,vd.displayName=`@mantine/core/Input`;function yd(e,t,n){let r=X([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:M}=er(A),N={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...M,classNames:l,styles:u,unstyled:f,wrapperProps:{...N,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var bd={__staticSelector:`InputBase`,withAria:!0,size:`sm`},xd=kr(e=>{let{inputProps:t,wrapperProps:n,...r}=yd(`InputBase`,bd,e);return(0,Y.jsx)(vd.Wrapper,{...n,children:(0,Y.jsx)(vd,{...t,...r})})});xd.classes={...vd.classes,...vd.Wrapper.classes},xd.displayName=`@mantine/core/InputBase`;function Sd(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function Cd({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,C.useRef)(-1),s=(0,C.useRef)(e),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(typeof r==`boolean`&&r),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=Qr(s.borderTopWidth)+Qr(c.borderTopWidth),u=Qr(s.borderLeftWidth)+Qr(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,C.useRef)(null),h=(0,C.useRef)(null),g=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t),g.current=new MutationObserver(()=>{t.contains(e)&&f()}),g.current.observe(t,{childList:!0,subtree:!0})),()=>{m.current?.disconnect(),h.current?.disconnect(),g.current?.disconnect()}},[t,e]),(0,C.useEffect)(()=>{if(t){let e=e=>{Sd(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,C.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),dt(()=>{xt()!==`test`&&l(!0)},20,{autoInvoke:!0}),pt(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var wd={root:`m_96b553a6`},Td=Ot((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),Ed=Z(e=>{let t=X(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=Kn({name:`FloatingIndicator`,classes:wd,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:Td,stylesCtx:{shouldReduceMotion:st()}}),y=(0,C.useRef)(null),{initialized:b,hidden:x}=Cd({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=nt(g,y);return!c||!l?null:(0,Y.jsx)(Q,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});Ed.displayName=`@mantine/core/FloatingIndicator`,Ed.classes=wd,Ed.varsResolver=Td;function Dd({style:e,size:t=16,...n}){return(0,Y.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:N(t),height:N(t),display:`block`},...n,children:(0,Y.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}Dd.displayName=`@mantine/core/AccordionChevron`;var Od={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},kd=Ot((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:q(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),Ad=Z(e=>{let t=X(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=Kn({name:`Alert`,classes:Od,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:kd}),C=Qe(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,Y.jsx)(Q,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,Y.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,Y.jsx)(`div`,{...S(`icon`),children:p}),(0,Y.jsxs)(`div`,{...S(`body`),children:[u&&(0,Y.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,Y.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,Y.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,Y.jsx)(yl,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});Ad.classes=Od,Ad.varsResolver=kd,Ad.displayName=`@mantine/core/Alert`;var jd={root:`m_b6d8b162`};function Md(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var Nd={inherit:!1},Pd=Ot((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":ie(i),"--text-lh":ae(i),"--text-gradient":t===`gradient`?Yt(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),Fd=kr(e=>{let t=X(`Text`,Nd,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t,x=Kn({name:[`Text`,l],props:t,classes:jd,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:Pd});return(0,Y.jsx)(Q,{...x(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{truncate:Md(r),lineClamp:typeof n==`number`,inline:i,inherit:a},_],size:v,...b})});Fd.classes=jd,Fd.varsResolver=Pd,Fd.displayName=`@mantine/core/Text`;var Id={root:`m_849cf0da`},Ld={underline:`hover`},Rd=kr(e=>{let{underline:t,className:n,unstyled:r,mod:i,...a}=X(`Anchor`,Ld,e);return(0,Y.jsx)(Fd,{component:`a`,className:At({[Id.root]:!r},n),...a,mod:[{underline:t},i],__staticSelector:`Anchor`,unstyled:r})});Rd.classes=Id,Rd.displayName=`@mantine/core/Anchor`;function zd(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>zd(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function Bd(e){return e?e.map(e=>zd(e)):[]}function Vd(e){return e.reduce((e,t)=>`group`in t?{...e,...Vd(t.items)}:(e[`${t.value}`]=t,e),{})}var Hd={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},Ud={error:null},Wd=Ot((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":K(t,`combobox-chevron-size`),"--combobox-chevron-color":n?Kt(n,e):void 0}})),Gd=Z(e=>{let t=X(`ComboboxChevron`,Ud,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=Kn({name:`ComboboxChevron`,classes:Hd,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:Wd,attributes:u,rootSelector:`chevron`});return(0,Y.jsx)(Q,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,Y.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});Gd.classes=Hd,Gd.varsResolver=Wd,Gd.displayName=`@mantine/core/ComboboxChevron`;var[Kd,qd]=R(`Combobox component was not found in tree`);function Jd({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,Y.jsx)(vd.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}Jd.displayName=`@mantine/core/ComboboxClearButton`;var Yd=Z(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=X(`ComboboxDropdown`,null,e),s=qd();return(0,Y.jsx)(Qc.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});Yd.classes=Hd,Yd.displayName=`@mantine/core/ComboboxDropdown`;var Xd={refProp:`ref`},Zd=Z(e=>{let{children:t,refProp:n,ref:r}=X(`ComboboxDropdownTarget`,Xd,e);if(qd(),!L(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,Y.jsx)(Qc.Target,{ref:r,refProp:n,children:t})});Zd.displayName=`@mantine/core/ComboboxDropdownTarget`;var Qd=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`ComboboxEmpty`,null,e),s=qd();return(0,Y.jsx)(Q,{...s.getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});Qd.classes=Hd,Qd.displayName=`@mantine/core/ComboboxEmpty`;function $d({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=qd(),[c,l]=(0,C.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var ef={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},tf=Z(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=X(`ComboboxEventsTarget`,ef,e),u=Dt(t);if(!u)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=qd(),f=$d({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s});return(0,C.cloneElement)(u,{...f,...l,[n]:nt(c,d.store.targetRef,St(u))})});tf.displayName=`@mantine/core/ComboboxEventsTarget`;var nf=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`ComboboxFooter`,null,e),s=qd();return(0,Y.jsx)(Q,{...s.getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});nf.classes=Hd,nf.displayName=`@mantine/core/ComboboxFooter`;var rf=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=X(`ComboboxGroup`,null,e),u=qd(),d=Qe(c),f=s!=null&&s!==!1&&s!==``;return(0,Y.jsxs)(Q,{role:`group`,"aria-labelledby":f?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[f&&(0,Y.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});rf.classes=Hd,rf.displayName=`@mantine/core/ComboboxGroup`;var af=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`ComboboxHeader`,null,e),s=qd();return(0,Y.jsx)(Q,{...s.getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});af.classes=Hd,af.displayName=`@mantine/core/ComboboxHeader`;function of({value:e,valuesDivider:t=`,`,...n}){return(0,Y.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e==null?``:`${e}`,...n})}of.displayName=`@mantine/core/ComboboxHiddenInput`;var sf=Z(e=>{let t=X(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=qd(),_=(0,C.useId)(),v=c||_;return(0,Y.jsx)(Q,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),"aria-disabled":f||void 0,...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});sf.classes=Hd,sf.displayName=`@mantine/core/ComboboxOption`;var cf=Z(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=X(`ComboboxOptions`,null,e),l=qd(),u=Qe(a);return(0,C.useEffect)(()=>{l.store.setListId(u)},[u]),(0,Y.jsx)(Q,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});cf.classes=Hd,cf.displayName=`@mantine/core/ComboboxOptions`;var lf={withAriaAttributes:!0,withKeyboardNavigation:!0},uf=Z(e=>{let{classNames:t,styles:n,unstyled:r,vars:i,withAriaAttributes:a,onKeyDown:o,onClick:s,withKeyboardNavigation:c,size:l,ref:u,...d}=X(`ComboboxSearch`,lf,e),f=qd(),p=f.getStyles(`search`),m=$d({targetType:`input`,withAriaAttributes:a,withKeyboardNavigation:c,withExpandedAttribute:!1,onKeyDown:o,onClick:s,autoComplete:`off`});return(0,Y.jsx)(vd,{ref:nt(u,f.store.searchRef),classNames:[{input:p.className},t],styles:[{input:p.style},n],size:l||f.size,...m,...d,__staticSelector:`Combobox`})});uf.classes=Hd,uf.displayName=`@mantine/core/ComboboxSearch`;var df={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},ff=Z(e=>{let{children:t,refProp:n,withKeyboardNavigation:r,withAriaAttributes:i,withExpandedAttribute:a,targetType:o,autoComplete:s,ref:c,...l}=X(`ComboboxTarget`,df,e),u=Dt(t);if(!u)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let d=qd(),f=$d({targetType:o,withAriaAttributes:i,withKeyboardNavigation:r,withExpandedAttribute:a,onKeyDown:u.props.onKeyDown,onClick:u.props.onClick,autoComplete:s}),p=(0,C.cloneElement)(u,{...f,...l});return(0,Y.jsx)(Qc.Target,{refProp:n,ref:nt(c,d.store.targetRef),children:p})});ff.displayName=`@mantine/core/ComboboxTarget`;function pf(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function mf(e,t,n){for(let n=e+1;n<t.length;n+=1)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=0;e<t.length;e+=1)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function hf(e){for(let t=0;t<e.length;t+=1)if(!e[t].hasAttribute(`data-combobox-disabled`))return t;return-1}function gf({defaultOpened:e,opened:t,onOpenedChange:n,onDropdownClose:r,onDropdownOpen:i,loop:a=!0,scrollBehavior:o=`instant`}={}){let[s,c]=rt({value:t,defaultValue:e,finalValue:!1,onChange:n}),l=(0,C.useRef)(null),u=(0,C.useRef)(-1),d=(0,C.useRef)(null),f=(0,C.useRef)(null),p=(0,C.useRef)(-1),m=(0,C.useRef)(-1),h=(0,C.useRef)(-1),g=(0,C.useCallback)((e=`unknown`)=>{s||(c(!0),i?.(e))},[c,i,s]),_=(0,C.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,C.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,C.useCallback)(()=>{let e=Et(f.current);wt(`#${l.current} [data-combobox-selected]`,e)?.removeAttribute(`data-combobox-selected`)},[]),b=(0,C.useCallback)(e=>{let t=Et(f.current),n=wt(`#${l.current}`,t),r=n?Tt(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,C.useCallback)(()=>{let e=Et(f.current),t=wt(`#${l.current} [data-combobox-active]`,e);if(t){let n=Tt(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,C.useCallback)(()=>{let e=Et(f.current),t=Tt(`#${l.current} [data-combobox-option]`,e);return b(mf(u.current,t,a))},[b,a]),w=(0,C.useCallback)(()=>{let e=Et(f.current),t=Tt(`#${l.current} [data-combobox-option]`,e);return b(pf(u.current,t,a))},[b,a]),T=(0,C.useCallback)(()=>{let e=Et(f.current),t=Tt(`#${l.current} [data-combobox-option]`,e);return b(hf(t))},[b]),E=(0,C.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=Et(f.current),r=Tt(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o})}else h.current=window.setTimeout(()=>{let n=Et(f.current),r=Tt(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),D=(0,C.useCallback)(()=>{u.current=-1,y()},[y]),O=(0,C.useCallback)(()=>{let e=Et(f.current);(Tt(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),k=(0,C.useCallback)(e=>{l.current=e},[]),A=(0,C.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),j=(0,C.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),M=(0,C.useCallback)(()=>u.current,[]);return(0,C.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:M,selectOption:b,selectFirstOption:T,selectActiveOption:x,selectNextOption:S,selectPreviousOption:w,resetSelectedOption:D,updateSelectedOptionIndex:E,listId:l.current,setListId:k,clickSelectedOption:O,searchRef:d,focusSearchInput:A,targetRef:f,focusTarget:j}}var _f={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},vf=Ot((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":ie(t),"--combobox-option-padding":K(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:N(n),"--combobox-option-fz":ie(t),"--combobox-option-padding":K(t,`combobox-option-padding`)}})),yf=e=>{let t=X(`Combobox`,_f,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,floatingHeight:g,middlewares:_,...v}=t,y=g===`viewport`?{..._,flip:!1,size:{...typeof _?.size==`object`?_.size:{},padding:typeof _?.size==`object`&&_.size.padding!==void 0?_.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=_?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:_,b=gf(),x=o||b,S=Kn({name:p||`Combobox`,classes:Hd,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:vf}),C=()=>{l?.(),x.closeDropdown()};return(0,Y.jsx)(Kd,{value:{getStyles:S,store:x,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m,floatingHeight:g},children:(0,Y.jsx)(Qc,{opened:x.dropdownOpened,...v,middlewares:y,onChange:e=>!e&&C(),withRoles:!1,unstyled:i,children:a})})};yf.extend=e=>e,yf.classes=Hd,yf.varsResolver=vf,yf.displayName=`@mantine/core/Combobox`,yf.Target=ff,yf.Dropdown=Yd,yf.Options=cf,yf.Option=sf,yf.Search=uf,yf.Empty=Qd,yf.Chevron=Gd,yf.Footer=nf,yf.Header=af,yf.EventsTarget=tf,yf.DropdownTarget=Zd,yf.Group=rf,yf.ClearButton=Jd,yf.HiddenInput=of;function bf({children:e,role:t}){let n=(0,C.use)(ed);return n?(0,Y.jsx)(`div`,{role:t,"aria-labelledby":n.labelId,"aria-describedby":n.describedBy,children:e}):(0,Y.jsx)(Y.Fragment,{children:e})}var xf=(0,C.createContext)(null),Sf={hiddenInputValuesSeparator:`,`},Cf=Or((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=X(`CheckboxGroup`,Sf,e),[m,h]=rt({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=typeof e==`string`?e:e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,Y.jsx)(xf,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,Y.jsxs)(vd.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`CheckboxGroup`,children:[(0,Y.jsx)(bf,{role:`group`,children:o}),(0,Y.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));Cf.classes=vd.Wrapper.classes,Cf.displayName=`@mantine/core/CheckboxGroup`;var wf={card:`m_26775b0a`},Tf=(0,C.createContext)(null),Ef={withBorder:!0},Df=Ot((e,{radius:t})=>({card:{"--card-radius":q(t)}})),Of=Z(e=>{let t=X(`CheckboxCard`,Ef,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,checked:c,mod:l,withBorder:u,value:d,onClick:f,defaultChecked:p,onChange:m,indeterminate:h,attributes:g,..._}=t,v=Kn({name:`CheckboxCard`,classes:wf,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s,varsResolver:Df,rootSelector:`card`}),y=(0,C.use)(xf),[b,x]=rt({value:typeof c==`boolean`?c:y?y.value.includes(d||``):void 0,defaultValue:p,finalValue:!1,onChange:m});return(0,Y.jsx)(Tf,{value:{checked:b,indeterminate:h},children:(0,Y.jsx)(ic,{mod:[{"with-border":u,checked:b,indeterminate:h},l],...v(`card`),..._,role:`checkbox`,"aria-checked":h?`mixed`:b,onClick:e=>{f?.(e),y?.onChange(d||``),x(!b)}})})});Of.displayName=`@mantine/core/CheckboxCard`,Of.classes=wf,Of.varsResolver=Df;function kf({size:e,style:t,...n}){let r=e===void 0?t:{width:N(e),height:N(e),...t};return(0,Y.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:r,"aria-hidden":!0,...n,children:(0,Y.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function Af({indeterminate:e,...t}){return e?(0,Y.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 32 6`,"aria-hidden":!0,...t,children:(0,Y.jsx)(`rect`,{width:`32`,height:`6`,fill:`currentColor`,rx:`3`})}):(0,Y.jsx)(kf,{...t})}var jf={indicator:`m_5e5256ee`,icon:`m_1b1c543a`,"indicator--light":`m_193e54c8`,"indicator--outline":`m_76e20374`},Mf={icon:Af,variant:`filled`,radius:`sm`},Nf=Ot((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=Gt({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:Kt(n,e);return{indicator:{"--checkbox-size":K(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:q(t),"--checkbox-color":u,"--checkbox-bg":l?.background,"--checkbox-icon-color":i?Kt(i,e):l?l.color:nn(o,e)?$t({color:n,theme:e,autoContrast:o}):void 0}}}),Pf=Z(e=>{let t=X(`CheckboxIndicator`,Mf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,icon:c,indeterminate:l,radius:u,color:d,iconColor:f,autoContrast:p,checked:m,mod:h,variant:g,disabled:_,attributes:v,...y}=t,b=Kn({name:`CheckboxIndicator`,classes:jf,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:Nf,rootSelector:`indicator`}),x=(0,C.use)(Tf),S=typeof l==`boolean`?l:x?.indeterminate,w=typeof m==`boolean`||typeof l==`boolean`?m||l:x?.checked||x?.indeterminate||!1;return(0,Y.jsx)(Q,{...b(`indicator`,{variant:g}),variant:g,mod:[{checked:w,disabled:_},h],...y,children:(0,Y.jsx)(c,{indeterminate:S,...b(`icon`)})})});Pf.displayName=`@mantine/core/CheckboxIndicator`,Pf.classes=jf,Pf.varsResolver=Nf;var Ff={root:`m_5f75b09e`,body:`m_5f6e695e`,labelWrapper:`m_d3ea56bb`,label:`m_8ee546b8`,description:`m_328f68c0`,error:`m_8e8a99cc`},If=Ff;function Lf({__staticSelector:e,__stylesApiProps:t,className:n,classNames:r,styles:i,unstyled:a,children:o,label:s,description:c,id:l,disabled:u,error:d,size:f,labelPosition:p=`left`,bodyElement:m=`div`,labelElement:h=`label`,variant:g,style:_,vars:v,mod:y,attributes:b,...x}){let S=Kn({name:e,props:t,className:n,style:_,classes:Ff,classNames:r,styles:i,unstyled:a,attributes:b}),C=c?`${l}-description`:void 0,w=d&&typeof d!=`boolean`?`${l}-error`:void 0;return(0,Y.jsx)(Q,{...S(`root`),__vars:{"--label-fz":ie(f),"--label-lh":K(f,`label-lh`)},mod:[{"label-position":p},y],variant:g,size:f,...x,children:(0,Y.jsxs)(Q,{component:m,htmlFor:m===`label`?l:void 0,...S(`body`),children:[o,(0,Y.jsxs)(`div`,{...S(`labelWrapper`),"data-disabled":u||void 0,children:[s&&(0,Y.jsx)(Q,{component:h,htmlFor:h===`label`?l:void 0,...S(`label`),"data-disabled":u||void 0,children:s}),c&&(0,Y.jsx)(vd.Description,{id:C,size:f,__inheritStyles:!1,...S(`description`),children:c}),d&&typeof d!=`boolean`&&(0,Y.jsx)(vd.Error,{id:w,size:f,__inheritStyles:!1,...S(`error`),children:d})]})]})})}Lf.displayName=`@mantine/core/InlineInput`;var Rf={root:`m_bf2d988c`,inner:`m_26062bec`,input:`m_26063560`,icon:`m_bf295423`,"input--light":`m_595ab216`,"input--outline":`m_215c4542`},zf={labelPosition:`right`,icon:Af,withErrorStyles:!0,variant:`filled`,radius:`sm`},Bf=Ot((e,{radius:t,color:n,size:r,iconColor:i,variant:a,autoContrast:o})=>{let s=Gt({color:n||e.primaryColor,theme:e}),c=s.isThemeColor&&s.shade===void 0?`var(--mantine-color-${s.color}-outline)`:s.color,l=a===`light`?e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:`light`,autoContrast:o}):void 0,u=a===`outline`?c:l?l.color:Kt(n,e);return{root:{"--checkbox-size":K(r,`checkbox-size`),"--checkbox-radius":t===void 0?void 0:q(t),"--checkbox-color":u,"--checkbox-bg":l?.background,"--checkbox-icon-color":i?Kt(i,e):l?l.color:nn(o,e)?$t({color:n,theme:e,autoContrast:o}):void 0}}}),Vf=Z(e=>{let t=X(`Checkbox`,zf,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,id:u,size:d,radius:f,wrapperProps:p,checked:m,labelPosition:h,description:g,error:_,disabled:v,variant:y,indeterminate:b,icon:x,rootRef:S,iconColor:w,onChange:T,autoContrast:E,mod:D,attributes:O,readOnly:k,onClick:A,withErrorStyles:j,ref:M,...N}=t,P=(0,C.useRef)(null),F=(0,C.use)(xf),I=d||F?.size,L=Kn({name:`Checkbox`,props:t,classes:Rf,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:Bf}),{styleProps:R,rest:z}=er(N),B=Qe(u),V=[g?`${B}-description`:void 0,_&&typeof _!=`boolean`?`${B}-error`:void 0,z[`aria-describedby`]].filter(Boolean).join(` `)||void 0,H={checked:F?.value.includes(z.value)??m,onChange:e=>{k||(F?.onChange(e),T?.(e))}},ee=F?.isDisabled?.(z.value)??!1,U=v||ee;return(0,C.useEffect)(()=>{P.current&&(P.current.indeterminate=b||!1,b?P.current.setAttribute(`data-indeterminate`,`true`):P.current.removeAttribute(`data-indeterminate`))},[b]),(0,Y.jsx)(Lf,{...L(`root`),__staticSelector:`Checkbox`,__stylesApiProps:t,id:B,size:I,labelPosition:h,label:l,description:g,error:_,disabled:U,classNames:n,styles:a,unstyled:o,"data-checked":H.checked||m||void 0,variant:y,ref:S,mod:D,attributes:O,inert:z.inert,...R,...p,children:(0,Y.jsxs)(Q,{...L(`inner`),mod:{labelPosition:h},children:[(0,Y.jsx)(Q,{component:`input`,id:B,ref:nt(P,M),mod:{error:!!_,"with-error-styles":j},...L(`input`,{focusable:!0,variant:y}),...z,...H,"aria-describedby":V,disabled:U,inert:z.inert,type:`checkbox`,readOnly:k,onClick:e=>{k&&H.checked===void 0&&e.preventDefault(),A?.(e)}}),(0,Y.jsx)(x,{indeterminate:b,...L(`icon`)})]})})});Vf.classes={...Rf,...If},Vf.varsResolver=Bf,Vf.displayName=`@mantine/core/Checkbox`,Vf.Group=Cf,Vf.Indicator=Pf,Vf.Card=Of;function Hf(e){return`group`in e}function Uf({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a<e.length;a+=1){let o=e[a];if(i.length===n)return i;if(Hf(o)){let e=Uf({options:o.items,search:t,limit:n-i.length});e.length>0&&i.push({group:o.group,items:e})}Hf(o)||o.label.toLowerCase().includes(r)&&i.push(o)}return i}function Wf(e){if(e.length===0)return!0;for(let t of e)if(!(`group`in t)||t.items.length>0)return!1;return!0}function Gf(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Hf(n))Gf(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function Kf(e,t){return Array.isArray(e)?e.includes(t):e===t}function qf({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Hf(e)){let s=Kf(r,e.value),c=t&&(s?(0,Y.jsx)(kf,{className:Hd.optionsDropdownCheckIcon}):n?(0,Y.jsx)(`div`,{className:Hd.optionsDropdownCheckPlaceholder}):null),l=(0,Y.jsxs)(Y.Fragment,{children:[i===`left`&&c,(0,Y.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,Y.jsx)(yf.Option,{value:e.value,disabled:e.disabled,className:At({[Hd.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,Y.jsx)(qf,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,Y.jsx)(yf.Group,{label:e.group,children:s})}function Jf({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=qd();Gf(e);let x=typeof i==`string`?(r||Uf)({options:e,search:l?i:``,limit:a??1/0}):e,S=Wf(x),C=x.map((e,t)=>(0,Y.jsx)(qf,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Hf(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,Y.jsx)(yf.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,Y.jsxs)(yf.Options,{labelledBy:g,"aria-label":y,children:[c?(0,Y.jsx)(ec.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,Y.jsx)(yf.Empty,{children:m})]})})}function Yf(e,t,n,r){if(t===n||r===`before`&&n===t+1||r===`after`&&n===t-1)return e;let i=e.slice(),[a]=i.splice(t,1),o=t<n?n-1:n;return r===`after`&&(o+=1),i.splice(o,0,a),i}var Xf=e=>{let t=e.lastElementChild;return t?t instanceof HTMLInputElement?t:t.querySelector(`input`):null},Zf=(e,t)=>{if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0};function Qf({value:e,onChange:t,enabled:n}){let r=(0,C.useRef)({draggedIndex:null,currentDropTarget:null}),i=(0,C.useRef)(null),a=(0,C.useRef)(null),o=(0,C.useRef)(e);o.current=e,(0,C.useEffect)(()=>{let e=i.current;e&&(i.current=null,Zf(o.current,e.expectedValue)&&e.container?.querySelector(`[data-mantine-pill-index="${e.index}"]`)?.focus())});let s=(0,C.useCallback)(e=>{a.current=e},[]);return{getPillProps:e=>{if(n)return{draggable:!0,tabIndex:-1,"data-mantine-pill-index":e,"aria-keyshortcuts":`Alt+ArrowLeft Alt+ArrowRight`,onMouseDown:e=>{e.button===0&&e.stopPropagation()},onDragStart:t=>{t.stopPropagation(),t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`text/plain`,String(e)),r.current.draggedIndex=e;let n=t.currentTarget,i=n.getBoundingClientRect(),a=n.cloneNode(!0);a.removeAttribute(`data-dragging`),a.removeAttribute(`data-drag-over`),a.style.position=`fixed`,a.style.top=`-9999px`,a.style.left=`-9999px`,a.style.width=`${i.width}px`,a.style.height=`${i.height}px`,a.style.pointerEvents=`none`,document.body.appendChild(a),t.dataTransfer.setDragImage(a,t.clientX-i.left,t.clientY-i.top),setTimeout(()=>a.parentNode?.removeChild(a),0),requestAnimationFrame(()=>{n.setAttribute(`data-dragging`,`true`)})},onDragOver:t=>{let{draggedIndex:n}=r.current;if(n===null||n===e)return;let i=t.currentTarget,a=i.getBoundingClientRect(),o=t.clientX-a.left,s=(getComputedStyle(i).direction===`rtl`?o>a.width/2:o<a.width/2)?`before`:`after`;t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect=`move`;let c=r.current.currentDropTarget;c&&c!==i&&c.removeAttribute(`data-drag-over`),i.setAttribute(`data-drag-over`,s),r.current.currentDropTarget=i},onDragLeave:e=>{let t=e.currentTarget,n=e.relatedTarget;n&&t.contains(n)||(t.removeAttribute(`data-drag-over`),r.current.currentDropTarget===t&&(r.current.currentDropTarget=null))},onDrop:n=>{n.preventDefault(),n.stopPropagation();let i=n.currentTarget,a=i.getAttribute(`data-drag-over`);i.removeAttribute(`data-drag-over`);let{draggedIndex:s}=r.current;if(s!==null&&a&&s!==e){let n=Yf(o.current,s,e,a);n!==o.current&&t(n)}r.current.draggedIndex=null,r.current.currentDropTarget=null},onDragEnd:e=>{e.currentTarget.removeAttribute(`data-dragging`);let t=r.current.currentDropTarget;t&&t.removeAttribute(`data-drag-over`),r.current.draggedIndex=null,r.current.currentDropTarget=null},onKeyDown:n=>{if(n.key!==`ArrowLeft`&&n.key!==`ArrowRight`)return;let r=n.currentTarget,a=getComputedStyle(r).direction===`rtl`?n.key===`ArrowLeft`:n.key===`ArrowRight`,s=a?e+1:e-1;if(n.altKey){if(s<0||s>=o.current.length)return;n.preventDefault(),n.stopPropagation();let c=a?`after`:`before`,l=Yf(o.current,e,s,c);if(l===o.current)return;i.current={container:r.parentElement,index:s,expectedValue:l},t(l);return}if(s<0)return;let c=r.parentElement;c&&(n.preventDefault(),n.stopPropagation(),s>=o.current.length?Xf(c)?.focus():c.querySelector(`[data-mantine-pill-index="${s}"]`)?.focus())}}},getListProps:()=>n?{ref:s}:{},handleInputKeyDown:e=>{if(!n||e.key!==`ArrowLeft`)return;let t=e.currentTarget;if(!(t.value.length===0||t.selectionStart===0&&t.selectionEnd===0))return;let r=a.current;if(!r)return;let i=r.querySelectorAll(`[data-mantine-pill-index]`);i.length!==0&&(e.preventDefault(),i[i.length-1].focus())}}}function $f({id:e,label:t,labelProps:n,inputWrapperOrder:r}){if(t&&(!r||r.includes(`label`)))return n?.id||`${e}-label`}var ep={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},tp=Ot((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":K(a,`badge-height`),"--badge-padding-x":K(a,`badge-padding-x`),"--badge-fz":K(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:q(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?Kt(n,e):void 0}}}),np=kr(e=>{let t=X(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=Kn({name:`Badge`,props:t,classes:ep,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:tp});return(0,Y.jsxs)(Q,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,Y.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,Y.jsx)(`span`,{...x(`label`),children:p}),f&&(0,Y.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});np.classes=ep,np.varsResolver=tp,np.displayName=`@mantine/core/Badge`;var rp={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},ip={orientation:`horizontal`},ap=Ot((e,{borderWidth:t})=>({group:{"--button-border-width":N(t)}})),op=Z(e=>{let t=X(`ButtonGroup`,ip,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=X(`ButtonGroup`,ip,e),p=Kn({name:`ButtonGroup`,props:t,classes:rp,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:ap,rootSelector:`group`});return(0,Y.jsx)(Q,{...p(`group`),mod:[{orientation:s},u],role:`group`,...f})});op.classes=rp,op.varsResolver=ap,op.displayName=`@mantine/core/ButtonGroup`;var sp=Ot((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":K(o,`section-height`),"--section-padding-x":K(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?ie(o.replace(`compact-`,``)):ie(o),"--section-radius":t===void 0?void 0:q(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),cp=Z(e=>{let t=X(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t,p=Kn({name:`ButtonGroupSection`,props:t,classes:rp,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:sp,rootSelector:`groupSection`});return(0,Y.jsx)(Q,{...p(`groupSection`),...f})});cp.classes=rp,cp.varsResolver=sp,cp.displayName=`@mantine/core/ButtonGroupSection`;var lp={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${N(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},up=Ot((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":K(a,`button-height`),"--button-padding-x":K(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?ie(a.replace(`compact-`,``)):ie(a),"--button-radius":t===void 0?void 0:q(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),dp=kr(e=>{let t=X(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=Kn({name:`Button`,props:t,classes:rp,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:up}),T=!!c,E=!!l;return(0,Y.jsxs)(ic,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,Y.jsx)(Pc,{mounted:p,transition:lp,duration:150,children:e=>(0,Y.jsx)(Q,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,Y.jsx)(ol,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,Y.jsxs)(`span`,{...w(`inner`),children:[c&&(0,Y.jsx)(Q,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,Y.jsx)(Q,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,Y.jsx)(Q,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});dp.classes=rp,dp.varsResolver=up,dp.displayName=`@mantine/core/Button`,dp.Group=op,dp.GroupSection=cp;var[fp,pp]=R(`Card component was not found in tree`),mp={root:`m_e615b15f`,section:`m_599a2148`},hp=kr(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,withBorder:o,inheritPadding:s,mod:c,...l}=X(`CardSection`,null,e),u=pp();return(0,Y.jsx)(Q,{mod:[{"with-border":o,"inherit-padding":s},c],...u.getStyles(`section`,{className:n,style:r,styles:i,classNames:t}),...l})});hp.classes=mp,hp.displayName=`@mantine/core/CardSection`;var gp=Ot((e,{padding:t})=>({root:{"--card-padding":re(t)}})),_p={orientation:`vertical`},vp=kr(e=>{let t=X(`Card`,_p,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,padding:l,attributes:u,orientation:d,...f}=t,p=Kn({name:`Card`,props:t,classes:mp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:gp}),m=C.Children.toArray(c),h=m.map((e,t)=>typeof e==`object`&&e&&`type`in e&&(e.type===hp||e.type?.displayName===`@mantine/core/CardSection`)?(0,C.cloneElement)(e,{"data-orientation":d,"data-first-section":t===0||void 0,"data-last-section":t===m.length-1||void 0}):e);return(0,Y.jsx)(fp,{value:{getStyles:p},children:(0,Y.jsx)(lc,{unstyled:o,"data-orientation":d,...p(`root`),...f,children:h})})});vp.classes=mp,vp.varsResolver=gp,vp.displayName=`@mantine/core/Card`,vp.Section=hp;function yp(e){let t=e.currentTarget;return Et(t).activeElement!==t}var bp={root:`m_4451eb3a`},xp=kr(e=>{let t=X(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=Kn({name:`Center`,props:t,classes:bp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,Y.jsx)(Q,{mod:[{inline:c},l],...f(`root`),...d})});xp.classes=bp,xp.displayName=`@mantine/core/Center`;var Sp={root:`m_b183c0a2`},Cp=Ot((e,{color:t})=>({root:{"--code-bg":t?Kt(t,e):void 0}})),wp=Z(e=>{let t=X(`Code`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,block:l,mod:u,attributes:d,...f}=t,p=Kn({name:`Code`,props:t,classes:Sp,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:Cp});return(0,Y.jsx)(Q,{component:l?`pre`:`code`,mod:[{block:l},u],...p(`root`),...f,dir:`ltr`})});wp.classes=Sp,wp.varsResolver=Cp,wp.displayName=`@mantine/core/Code`;var Tp={timeout:1e3};function Ep(e){let{children:t,timeout:n,value:r,...i}=X(`CopyButton`,Tp,e),a=ve({timeout:n});return(0,Y.jsx)(Y.Fragment,{children:t({copy:()=>a.copy(r),copied:a.copied,...i})})}Ep.displayName=`@mantine/core/CopyButton`;var Dp={root:`m_3eebeb36`,label:`m_9e365f20`},Op={orientation:`horizontal`},kp=Ot((e,{color:t,variant:n,size:r})=>({root:{"--divider-color":t?Kt(t,e):void 0,"--divider-border-style":n,"--divider-size":K(r,`divider-size`)}})),Ap=Z(e=>{let t=X(`Divider`,Op,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,orientation:l,label:u,labelPosition:d,mod:f,attributes:p,...m}=t,h=Kn({name:`Divider`,classes:Dp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:kp});return(0,Y.jsx)(Q,{mod:[{orientation:l,withLabel:!!u},f],role:`separator`,"aria-orientation":l,...h(`root`),...m,children:u&&(0,Y.jsx)(Q,{component:`span`,mod:{position:d},...h(`label`),children:u})})});Ap.classes=Dp,Ap.varsResolver=kp,Ap.displayName=`@mantine/core/Divider`;var[jp,Mp]=R(`Grid component was not found in tree`),Np=(e,t)=>{if(e===`content`)return`auto`;if(e===`auto`)return`0rem`;if(e)return e===t?`100%`:`calc(${100*e/t}% - ${(t-e)/t} * var(--grid-column-gap))`},Pp=(e,t,n)=>n||e===`auto`?`100%`:e===`content`?`unset`:Np(e,t),Fp=(e,t)=>{if(e)return e===`auto`||t?`1`:`auto`},Ip=(e,t)=>{if(e===0)return`0`;if(e)return`calc(${100*e/t}% + ${e/t} * var(--grid-column-gap))`};function Lp({span:e,order:t,offset:n,align:r,selector:i}){let a=kn(),o=Mp(),s=o.breakpoints||a.breakpoints,c=le(e),l=c===void 0?12:c,u=F({"--col-order":le(t)?.toString(),"--col-flex-grow":Fp(l,o.grow),"--col-flex-basis":Np(l,o.columns),"--col-width":l===`content`?`auto`:void 0,"--col-max-width":Pp(l,o.columns,o.grow),"--col-offset":Ip(le(n),o.columns),"--col-align-self":le(r)}),d=w(s).reduce((i,a)=>(i[a]||(i[a]={}),typeof t==`object`&&t[a]!==void 0&&(i[a][`--col-order`]=t[a]?.toString()),typeof e==`object`&&e[a]!==void 0&&(i[a][`--col-flex-grow`]=Fp(e[a],o.grow),i[a][`--col-flex-basis`]=Np(e[a],o.columns),i[a][`--col-width`]=e[a]===`content`?`auto`:void 0,i[a][`--col-max-width`]=Pp(e[a],o.columns,o.grow)),typeof n==`object`&&n[a]!==void 0&&(i[a][`--col-offset`]=Ip(n[a],o.columns)),typeof r==`object`&&r[a]!==void 0&&(i[a][`--col-align-self`]=r[a]),i),{}),f=ce(w(d),s).filter(e=>w(d[e.value]).length>0).map(e=>({query:o.type===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:d[e.value]}));return(0,Y.jsx)(Zn,{styles:u,media:o.type===`container`?void 0:f,container:o.type===`container`?f:void 0,selector:i})}var Rp={container:`m_8478a6da`,root:`m_410352e9`,inner:`m_dee7bd2f`,col:`m_96bdd299`},zp={span:12},Bp=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,span:o,order:s,offset:c,align:l,...u}=X(`GridCol`,zp,e),d=Mp(),f=Cr();return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Lp,{selector:`.${f}`,span:o,order:s,offset:c,align:l}),(0,Y.jsx)(Q,{...d.getStyles(`col`,{className:At(n,f),style:r,classNames:t,styles:i}),...u})]})});Bp.classes=Rp,Bp.displayName=`@mantine/core/GridCol`;function Vp({gap:e,rowGap:t,columnGap:n,selector:r,breakpoints:i,type:a}){let o=kn(),s=i||o.breakpoints,c=F({"--grid-gap":re(le(e)),"--grid-row-gap":re(le(t)),"--grid-column-gap":re(le(n))}),l=w(s).reduce((r,i)=>(r[i]||(r[i]={}),typeof e==`object`&&e[i]!==void 0&&(r[i][`--grid-gap`]=re(e[i])),typeof t==`object`&&t[i]!==void 0&&(r[i][`--grid-row-gap`]=re(t[i])),typeof n==`object`&&n[i]!==void 0&&(r[i][`--grid-column-gap`]=re(n[i])),r),{}),u=ce(w(l),s).filter(e=>w(l[e.value]).length>0).map(e=>({query:a===`container`?`mantine-grid (min-width: ${s[e.value]})`:`(min-width: ${s[e.value]})`,styles:l[e.value]}));return(0,Y.jsx)(Zn,{styles:c,media:a===`container`?void 0:u,container:a===`container`?u:void 0,selector:r})}var Hp={gap:`md`,columns:12},Up=Ot((e,{justify:t,align:n,overflow:r})=>({root:{"--grid-justify":t,"--grid-align":n,"--grid-overflow":r}})),Wp=Z(e=>{let t=X(`Grid`,Hp,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,grow:c,gap:l,rowGap:u,columnGap:d,columns:f,align:p,justify:m,children:h,breakpoints:g,type:_,attributes:v,...y}=t,b=Kn({name:`Grid`,classes:Rp,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:v,vars:s,varsResolver:Up}),x=Cr();return _===`container`&&g?(0,Y.jsxs)(jp,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,Y.jsx)(Vp,{selector:`.${x}`,...t}),(0,Y.jsx)(`div`,{...b(`container`),children:(0,Y.jsx)(Q,{...b(`root`,{className:x}),...y,children:(0,Y.jsx)(`div`,{...b(`inner`),children:h})})})]}):(0,Y.jsxs)(jp,{value:{getStyles:b,grow:c,columns:f,breakpoints:g,type:_},children:[(0,Y.jsx)(Vp,{selector:`.${x}`,...t}),(0,Y.jsx)(Q,{...b(`root`,{className:x}),...y,children:(0,Y.jsx)(`div`,{...b(`inner`),children:h})})]})});Wp.classes=Rp,Wp.varsResolver=Up,Wp.displayName=`@mantine/core/Grid`,Wp.Col=Bp;var[Gp,Kp]=R(`HoverCard component was not found in the tree`);function qp(e){let{children:t,onMouseEnter:n,onMouseLeave:r,ref:i,...a}=X(`HoverCardDropdown`,null,e),o=Kp(),s=o.getFloatingProps(),c=nt(o.floating,i),l=o.withRoles&&o.role===`tooltip`?{role:`tooltip`,id:o.dropdownId}:void 0;return(0,Y.jsx)(Qc.Dropdown,{ref:c,...s,...l,onMouseEnter:J(n,s.onMouseEnter),onMouseLeave:J(r,s.onMouseLeave),...a,children:t})}qp.displayName=`@mantine/core/HoverCardDropdown`;var Jp=(0,C.createContext)({withinGroup:!1}),Yp={openDelay:0,closeDelay:0};function Xp(e){let{openDelay:t,closeDelay:n,children:r}=X(`HoverCardGroup`,Yp,e);return(0,Y.jsx)(Jp,{value:{withinGroup:!0},children:(0,Y.jsx)(Ms,{delay:{open:t,close:n},children:r})})}Xp.displayName=`@mantine/core/HoverCardGroup`,Xp.extend=e=>e;var Zp={refProp:`ref`};function Qp(e){let{children:t,refProp:n,eventPropsWrapperName:r,...i}=X(`HoverCardTarget`,Zp,e),a=Dt(t);if(!a)throw Error(`HoverCard.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let o=Kp(),s=a.props,c=nt(St(a),o.assignTarget,o.reference),l=o.getReferenceProps(r?s[r]:s),u=o.withRoles&&o.role===`tooltip`?{"aria-describedby":[s[`aria-describedby`],o.opened?o.dropdownId:null].filter(Boolean).join(` `)||void 0}:void 0,d={...r?{[r]:l}:l,...u,ref:c};return(0,Y.jsx)(Qc.Target,{refProp:n,...i,children:(0,C.cloneElement)(a,d)})}Qp.displayName=`@mantine/core/HoverCardTarget`;function $p(e){let[t,n]=(0,C.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,C.use)(Jp).withinGroup,a=Qe(e.id),o=(0,C.useRef)(r);o.current=r;let s=(0,C.useRef)(-1),c=(0,C.useRef)(-1),l=(0,C.useRef)(null),u=(0,C.useCallback)(e=>{l.current=e},[]),d=(0,C.useCallback)(()=>{window.clearTimeout(s.current),window.clearTimeout(c.current)},[]),f=(0,C.useCallback)(t=>{o.current!==t&&(o.current=t,n(t),t?(g(a),e.onOpen?.()):e.onClose?.())},[a,e.onOpen,e.onClose]),{context:p,refs:m}=Vs({open:r,onOpenChange:(0,C.useCallback)((t,n,r)=>{let i=o.current;f(t),i&&!t&&(r===`escape-key`||r===`outside-press`)&&e.onDismiss?.()},[f,e.onDismiss])}),{delay:h,setCurrentId:g}=Ns(p,{id:a}),{getReferenceProps:_,getFloatingProps:v}=Gs([Os(p,{enabled:e.events.hover,delay:i?h:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events.touch,handleClose:e.interactive?Zs():null}),Us(p,{enabled:e.events.focus,visibleOnly:!0}),zs(p,{escapeKey:e.closeOnEscape,outsidePress:e.closeOnClickOutside})]),y=(0,C.useCallback)(()=>{d(),e.openDelay?s.current=window.setTimeout(()=>f(!0),e.openDelay):f(!0)},[d,e.openDelay,f]),b=(0,C.useCallback)(()=>{d(),e.closeDelay?c.current=window.setTimeout(()=>f(!1),e.closeDelay):f(!1)},[d,e.closeDelay,f]),x=(0,C.useRef)(f);return x.current=f,(0,C.useEffect)(()=>()=>d(),[d]),(0,C.useEffect)(()=>{if(!r||i||typeof IntersectionObserver>`u`)return;let e=l.current;if(!e)return;let t=new IntersectionObserver(()=>{e.isConnected&&e.getClientRects().length!==0||(d(),x.current(!1))});return t.observe(e),()=>t.disconnect()},[r,i,d]),{opened:r,dropdownId:`${a}-dropdown`,reference:m.setReference,floating:m.setFloating,assignTarget:u,getReferenceProps:_,getFloatingProps:v,openDropdown:y,closeDropdown:b}}var em={hover:!0,focus:!0,touch:!1},tm={openDelay:0,closeDelay:150,initiallyOpened:!1,interactive:!1,closeOnEscape:!0,closeOnClickOutside:!0,role:`dialog`};function nm(e){let{children:t,onOpen:n,onClose:r,openDelay:i,closeDelay:a,initiallyOpened:o,events:s,interactive:c,closeOnEscape:l,closeOnClickOutside:u,returnFocus:d,onDismiss:f,id:p,role:m,withRoles:h,...g}=X(`HoverCard`,tm,e),_={...em,...s},v=h!==!1,y=$p({openDelay:i,closeDelay:a,defaultOpened:o,onOpen:n,onClose:r,events:_,interactive:c,closeOnEscape:l,closeOnClickOutside:u,onDismiss:f,id:p});return(0,Y.jsx)(Gp,{value:{openDropdown:y.openDropdown,closeDropdown:y.closeDropdown,assignTarget:y.assignTarget,getReferenceProps:y.getReferenceProps,getFloatingProps:y.getFloatingProps,reference:y.reference,floating:y.floating,opened:y.opened,dropdownId:y.dropdownId,role:m,withRoles:v},children:(0,Y.jsx)(Qc,{...g,id:p,closeOnEscape:l,closeOnClickOutside:u,returnFocus:!_.focus&&d,withRoles:m!==`tooltip`&&h,opened:y.opened,__staticSelector:`HoverCard`,children:t})})}nm.displayName=`@mantine/core/HoverCard`,nm.Target=Qp,nm.Dropdown=qp,nm.Group=Xp,nm.extend=e=>e;var rm={root:`m_6e45937b`,loader:`m_e8eb006c`,overlay:`m_df587f17`},im={transitionProps:{transition:`fade`,duration:0},overlayProps:{backgroundOpacity:.75},zIndex:G(`overlay`)},am=Ot((e,{zIndex:t})=>({root:{"--lo-z-index":t?.toString()}})),om=Z(e=>{let t=X(`LoadingOverlay`,im,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,transitionProps:c,loaderProps:l,overlayProps:u,visible:d,zIndex:f,attributes:p,onEnter:m,onEntered:h,onExit:g,onExited:_,...v}=t,y=kn(),b=Kn({name:`LoadingOverlay`,classes:rm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:am}),x={...im.overlayProps,...u};return(0,Y.jsx)(Pc,{transition:`fade`,...c,mounted:!!d,onEnter:m,onEntered:h,onExit:g,onExited:_,children:e=>(0,Y.jsxs)(Q,{...b(`root`,{style:e}),...v,children:[(0,Y.jsx)(ol,{unstyled:o,...l,...b(`loader`,{className:l?.className,style:l?.style})}),(0,Y.jsx)(Sc,{...x,...b(`overlay`,{className:x?.className,style:x?.style}),darkHidden:!0,unstyled:o,color:u?.color||y.white}),(0,Y.jsx)(Sc,{...x,...b(`overlay`,{className:x?.className,style:x?.style}),lightHidden:!0,unstyled:o,color:u?.color||y.colors.dark[5]})]})})});om.classes=rm,om.varsResolver=am,om.displayName=`@mantine/core/LoadingOverlay`;var[sm,cm]=R(`Menu component was not found in the tree`),lm=(0,C.createContext)(null);function um(e){let{value:t,defaultValue:n,onChange:r,children:i}=X(`MenuCheckboxGroup`,null,e),[a,o]=rt({value:t,defaultValue:n,finalValue:[],onChange:r}),s=(0,C.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o]);return(0,Y.jsx)(lm,{value:{values:a,onChange:s},children:i})}um.displayName=`@mantine/core/MenuCheckboxGroup`;var dm=(0,C.createContext)(null);function fm({role:e,checked:t,indicator:n,onSelect:r,color:i,closeMenuOnClick:a,rightSection:o,children:s,disabled:c,dataDisabled:l,className:u,style:d,styles:f,classNames:p,buttonRef:m,others:h}){let g=cm(),_=(0,C.use)(dm),v=kn(),{dir:y}=Lr(),b=y===`rtl`?`ArrowRight`:`ArrowLeft`,x=(0,C.useRef)(null),S=J(h.onClick,()=>{l||(r(),a&&g.closeDropdownImmediately())}),w=J(h.onMouseMove,()=>{if(!g.hasSearch)return;let e=x.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==x.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),T=J(h.onKeyDown,e=>{e.key===b&&_&&(_.close(),_.focusParentItem())}),E=i?v.variantColorResolver({color:i,theme:v,variant:`light`}):void 0,D=i?Gt({color:i,theme:v}):null,O=g.alignItemsLabels!==`none`||t;return(0,Y.jsxs)(ic,{onMouseDown:e=>e.preventDefault(),...h,unstyled:g.unstyled,tabIndex:g.menuItemTabIndex,...g.getStyles(`item`,{className:u,style:d,styles:f,classNames:p}),ref:nt(x,m),role:e,"aria-checked":t,disabled:c,"aria-disabled":h[`aria-disabled`]??(c||l||void 0),"data-menu-item":!0,"data-checked":t||void 0,"data-disabled":c||l||void 0,"data-mantine-stop-propagation":!0,onClick:S,onMouseMove:w,onKeyDown:U({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:g.loop,dir:y,orientation:`vertical`,onKeyDown:T}),__vars:{"--menu-item-color":D?.isThemeColor&&D?.shade===void 0?`var(--mantine-color-${D.color}-6)`:E?.color,"--menu-item-hover":E?.hover},children:[O&&(0,Y.jsx)(`div`,{...g.getStyles(`itemIndicator`,{styles:f,classNames:p}),"data-checked":t||void 0,children:t?n:null}),s&&(0,Y.jsx)(`div`,{...g.getStyles(`itemLabel`,{styles:f,classNames:p}),"data-menu-item-label":!0,children:s}),o&&(0,Y.jsx)(`div`,{...g.getStyles(`itemSection`,{styles:f,classNames:p}),"data-position":`right`,children:o})]})}var pm={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},mm=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:_,...v}=X(`MenuCheckboxItem`,null,e),y=cm(),b=(0,C.use)(lm),x=b&&f!==void 0?b.values.includes(f):void 0,[S,w]=rt({value:p??x,defaultValue:m,finalValue:!1,onChange:h}),T=g??y.checkIcon??(0,Y.jsx)(kf,{size:10});return(0,Y.jsx)(fm,{role:`menuitemcheckbox`,checked:S,indicator:T,onSelect:()=>{h?w(!S):b&&f!==void 0?b.onChange(f):w(!S)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:_,others:v,children:l})});mm.classes=pm,mm.displayName=`@mantine/core/MenuCheckboxItem`;function hm(e){let{children:t,disabled:n,longPressDelay:r}=X(`MenuContextMenu`,null,e),i=Dt(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=cm(),o=Rc(),s=zc({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()});return(0,C.cloneElement)(i,s)}hm.displayName=`@mantine/core/MenuContextMenu`;var gm=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`MenuDivider`,null,e),s=cm();return(0,Y.jsx)(Q,{...s.getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});gm.classes=pm,gm.displayName=`@mantine/core/MenuDivider`;var _m=500;function vm(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function ym(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function bm({enabled:e,opened:t,getDropdown:n}){let r=(0,C.useRef)({buffer:``,timeoutId:null});return(0,C.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,C.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},_m);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||ym(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n<o.length;n+=1){let r=(t+n)%o.length;if(vm(o[r]).startsWith(e)){u=o[r];break}}}else for(let e=0;e<o.length;e+=1)if(vm(o[e]).startsWith(s.buffer)){u=o[e];break}u&&(t.preventDefault(),u.focus())}}var xm=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onKeyDown:c,children:l,ref:u,...d}=X(`MenuDropdown`,null,e),f=(0,C.useRef)(null),p=cm(),m=bm({enabled:!p.hasSearch,opened:p.opened,getDropdown:()=>f.current}),h=J(c,e=>{m(e),e.defaultPrevented||p.hasSearch||(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),f.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),g=J(o,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.openDropdown()),_=J(s,()=>(p.trigger===`hover`||p.trigger===`click-hover`)&&p.closeDropdown());return(0,Y.jsxs)(Qc.Dropdown,{...d,onMouseEnter:g,onMouseLeave:_,role:`menu`,"aria-orientation":`vertical`,ref:nt(u,f),...p.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:h,children:[p.withInitialFocusPlaceholder&&!p.hasSearch&&(0,Y.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),l]})});xm.classes=pm,xm.displayName=`@mantine/core/MenuDropdown`;var Sm=kr(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,leftSection:c,rightSection:l,children:u,disabled:d,"data-disabled":f,ref:p,...m}=X(`MenuItem`,null,e),h=cm(),g=(0,C.use)(dm),_=kn(),{dir:v}=Lr(),y=v===`rtl`?`ArrowRight`:`ArrowLeft`,b=(0,C.useRef)(null),x=m,S=J(x.onClick,()=>{f||(typeof s==`boolean`?s&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),w=J(x.onMouseMove,()=>{if(!h.hasSearch)return;let e=b.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==b.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),T=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,E=o?Gt({color:o,theme:_}):null,D=J(x.onKeyDown,e=>{e.key===y&&g&&(g.close(),g.focusParentItem())});return(0,Y.jsxs)(ic,{onMouseDown:e=>e.preventDefault(),...m,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:nt(b,p),role:`menuitem`,disabled:d,"aria-disabled":x[`aria-disabled`]??(d||f||void 0),"data-menu-item":!0,"data-disabled":d||f||void 0,"data-mantine-stop-propagation":!0,onClick:S,onMouseMove:w,onKeyDown:U({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:D}),__vars:{"--menu-item-color":E?.isThemeColor&&E?.shade===void 0?`var(--mantine-color-${E.color}-6)`:T?.color,"--menu-item-hover":T?.hover},children:[h.alignItemsLabels===`all`&&(0,Y.jsx)(`div`,{...h.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),c&&(0,Y.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:c}),u&&(0,Y.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:u}),l&&(0,Y.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:l})]})});Sm.classes=pm,Sm.displayName=`@mantine/core/MenuItem`;var Cm=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`MenuLabel`,null,e),s=cm();return(0,Y.jsx)(Q,{...s.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});Cm.classes=pm,Cm.displayName=`@mantine/core/MenuLabel`;var wm=(0,C.createContext)(null);function Tm(e){let{value:t,defaultValue:n,onChange:r,children:i}=X(`MenuRadioGroup`,null,e),[a,o]=rt({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,Y.jsx)(wm,{value:{value:a,onChange:e=>o(e)},children:i})}Tm.displayName=`@mantine/core/MenuRadioGroup`;function Em({size:e,style:t,...n}){return(0,Y.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:N(e),height:N(e),...t},"aria-hidden":!0,...n,children:(0,Y.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var Dm=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,..._}=X(`MenuRadioItem`,null,e),v=cm(),y=(0,C.use)(wm),b=p??(y?y.value===f:!1),x=h??v.checkIcon??(0,Y.jsx)(Em,{size:5});return(0,Y.jsx)(fm,{role:`menuitemradio`,checked:b,indicator:x,onSelect:()=>{b||(m?m(f):y&&y.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:_,children:l})});Dm.classes=pm,Dm.displayName=`@mantine/core/MenuRadioItem`;var Om=`[data-menu-item]:not([data-disabled])`,km=`[data-menu-active]`;function Am(e){return e?.closest(`[data-menu-dropdown]`)}function jm(e){return e?Array.from(e.querySelectorAll(Om)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function Mm(e){e&&e.querySelectorAll(km).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function Nm(e,t){Mm(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function Pm(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var Fm={clearSearchOnClose:!0},Im=Z(e=>{let{classNames:t,styles:n,onKeyDown:r,onChange:i,size:a,clearSearchOnClose:o,ref:s,...c}=X(`MenuSearch`,Fm,e),l=cm(),{dir:u}=Lr(),d=(0,C.useRef)(null),f=nt(s,d),p=(0,C.useRef)(i);p.current=i,(0,C.useEffect)(()=>l.registerSearch(),[l.registerSearch]),(0,C.useEffect)(()=>{o?l.searchExitClearRef.current=()=>{p.current?.({currentTarget:{value:``}})}:l.searchExitClearRef.current=null},[o,l.searchExitClearRef]),(0,C.useEffect)(()=>{l.opened||Mm(Am(d.current))},[l.opened]);let m=J(i,e=>{Mm(Am(e.currentTarget))}),h=J(r,e=>{if(e.defaultPrevented)return;let t=Am(e.currentTarget),n=jm(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=Pm(n);Nm(n[r>=n.length-1?l.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=Pm(n);Nm(n[r<=0?r===-1||l.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&Nm(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&Nm(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[Pm(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:u===`rtl`?`ArrowLeft`:`ArrowRight`,bubbles:!0}))):t.click())}}),g=l.getStyles(`search`);return(0,Y.jsx)(vd,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:a,...c,ref:f,classNames:[{input:g.className},t],styles:[{input:g.style},n],onKeyDown:h,onChange:m,__staticSelector:`Menu`})});Im.classes=pm,Im.displayName=`@mantine/core/MenuSearch`;var Lm=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l,onKeyDown:u,children:d,ref:f,...p}=X(`MenuSubDropdown`,null,e),m=(0,C.useRef)(null),h=cm(),g=(0,C.use)(dm),_=bm({enabled:!h.hasSearch,opened:g?.opened??!1,getDropdown:()=>m.current}),v=J(u,e=>{_(e),e.ctrlKey||e.metaKey||e.altKey||e.key.length!==1||e.key===` `||e.stopPropagation()}),y=g?.getFloatingProps({onMouseEnter:o,onMouseLeave:s,onPointerEnter:c,onPointerLeave:l});return(0,Y.jsx)(Qc.Dropdown,{...p,...y,role:`menu`,"aria-orientation":`vertical`,ref:nt(f,m,g?.setFloating),...h.getStyles(`dropdown`,{className:n,style:r,styles:i,classNames:t,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:v,children:d})});Lm.classes=pm,Lm.displayName=`@mantine/core/MenuSubDropdown`;var Rm=kr(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,leftSection:s,rightSection:c,children:l,disabled:u,"data-disabled":d,closeMenuOnClick:f,ref:p,...m}=X(`MenuSubItem`,null,e),h=cm(),g=(0,C.use)(dm),_=kn(),{dir:v}=Lr(),y=v===`rtl`?`ArrowLeft`:`ArrowRight`,b=v===`rtl`?`ArrowRight`:`ArrowLeft`,x=(0,C.useRef)(null),S=m,w=o?_.variantColorResolver({color:o,theme:_,variant:`light`}):void 0,T=o?Gt({color:o,theme:_}):null,E=J(S.onKeyDown,e=>{e.key===y&&(g?.open(),g?.focusFirstItem()),e.key===b&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),D=J(S.onClick,()=>{!d&&f&&h.closeDropdownImmediately()}),O=J(S.onMouseMove,()=>{if(!h.hasSearch)return;let e=x.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==x.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),k=g?.getReferenceProps({onMouseEnter:S.onMouseEnter,onMouseLeave:S.onMouseLeave,onPointerEnter:S.onPointerEnter,onPointerLeave:S.onPointerLeave});return(0,Y.jsxs)(ic,{onMouseDown:e=>e.preventDefault(),...m,...k,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles(`item`,{className:n,style:r,styles:i,classNames:t}),ref:nt(x,p,g?.setReference),role:`menuitem`,disabled:u,"aria-disabled":S[`aria-disabled`]??(u||d||void 0),"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:D,onMouseMove:O,onKeyDown:U({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:h.loop,dir:v,orientation:`vertical`,onKeyDown:E}),__vars:{"--menu-item-color":T?.isThemeColor&&T?.shade===void 0?`var(--mantine-color-${T.color}-6)`:w?.color,"--menu-item-hover":w?.hover},children:[h.alignItemsLabels===`all`&&(0,Y.jsx)(`div`,{...h.getStyles(`itemIndicator`,{styles:i,classNames:t}),"data-placeholder":!0}),s&&(0,Y.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`left`,children:s}),l&&(0,Y.jsx)(`div`,{...h.getStyles(`itemLabel`,{styles:i,classNames:t}),"data-menu-item-label":!0,children:l}),(0,Y.jsx)(`div`,{...h.getStyles(`itemSection`,{styles:i,classNames:t}),"data-position":`right`,children:c||(0,Y.jsx)(Dd,{...h.getStyles(`chevron`),size:14})})]})});Rm.classes=pm,Rm.displayName=`@mantine/core/MenuSubItem`;function zm({children:e,refProp:t}){if(!L(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return cm(),(0,Y.jsx)(Qc.Target,{refProp:t,popupType:`menu`,children:e})}zm.displayName=`@mantine/core/MenuSubTarget`;var Bm={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Vm(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=X(`MenuSub`,Bm,e),l=Qe(),[u,d]=rt({value:o,finalValue:!1,onChange:s}),f=(0,C.use)(dm),p=cm(),{dir:m}=Lr(),h=_c(m,i),g=f?.registerOpenSub??p.registerOpenSub,_=(0,C.useRef)(null),v=(0,C.useCallback)(e=>{let t=_.current;return t&&t!==e&&t(),_.current=e,()=>{_.current===e&&(_.current=null)}},[]),y=(0,C.useRef)(d);y.current=d;let b=(0,C.useCallback)(()=>y.current(!0),[]),x=(0,C.useCallback)(()=>y.current(!1),[]);(0,C.useEffect)(()=>{if(u)return g(x)},[u,g,x]);let{context:S,refs:w}=Vs({placement:h,open:u,onOpenChange:e=>{e?b():x()}}),{getReferenceProps:T,getFloatingProps:E}=Gs([Os(S,{handleClose:a?Zs(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,Y.jsx)(dm,{value:{opened:u,close:x,open:b,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(l)?.focus()},16),parentContext:f,setReference:w.setReference,setFloating:w.setFloating,getReferenceProps:T,getFloatingProps:E,registerOpenSub:v},children:(0,Y.jsx)(Qc,{opened:u,onChange:e=>e?b():x(),withArrow:!1,id:l,position:i,...c,withinPortal:!1,children:t})})}Vm.extend=e=>e,Vm.displayName=`@mantine/core/MenuSub`,Vm.Target=zm,Vm.Dropdown=Lm,Vm.Item=Rm;var Hm={refProp:`ref`};function Um(e){let{children:t,refProp:n,...r}=X(`MenuTarget`,Hm,e),i=Dt(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=cm(),o=i.props,s=J(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=J(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=J(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,Y.jsx)(Qc.Target,{refProp:n,popupType:`menu`,...r,children:(0,C.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Um.displayName=`@mantine/core/MenuTarget`;var Wm={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Gm=Z(e=>{let t=X(`Menu`,Wm,e),{children:n,onOpen:r,onClose:i,opened:a,defaultOpened:o,trapFocus:s,onChange:c,closeOnItemClick:l,loop:u,closeOnEscape:d,trigger:f,openDelay:p,closeDelay:m,classNames:h,styles:g,unstyled:_,variant:v,vars:y,menuItemTabIndex:b,keepMounted:x,withInitialFocusPlaceholder:S,attributes:w,onExitTransitionEnd:T,alignItemsLabels:E,checkIcon:D,...O}=t,k=Kn({name:`Menu`,classes:pm,props:t,classNames:h,styles:g,unstyled:_,attributes:w}),[A,j]=rt({value:a,defaultValue:o,finalValue:!1,onChange:c}),[M,N]=(0,C.useState)(!1),P=()=>{j(!1),N(!1),A&&i?.()},F=()=>{j(!0),!A&&r?.()},I=()=>{A?P():F()},{openDropdown:L,closeDropdown:R}=vc({open:F,close:P,closeDelay:m,openDelay:p}),z=(0,C.useRef)(null),B=(0,C.useCallback)(e=>{let t=z.current;return t&&t!==e&&t(),z.current=e,()=>{z.current===e&&(z.current=null)}},[]),V=(0,C.useRef)(0),[H,ee]=(0,C.useState)(!1),U=(0,C.useCallback)(()=>(V.current+=1,V.current===1&&ee(!0),()=>{--V.current,V.current===0&&ee(!1)}),[]),W=(0,C.useRef)(null),G=()=>{W.current?.(),T?.()},te=e=>ue(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:ne,resolvedStyles:K}=jn({classNames:h,styles:g,props:t});return(0,Y.jsx)(sm,{value:{getStyles:k,opened:A,toggleDropdown:I,getItemIndex:te,openedViaClick:M,setOpenedViaClick:N,closeOnItemClick:l,closeDropdown:f===`click`?P:R,openDropdown:f===`click`?F:L,closeDropdownImmediately:P,loop:u,trigger:f,unstyled:_,menuItemTabIndex:b,withInitialFocusPlaceholder:S,registerOpenSub:B,hasSearch:H,registerSearch:U,searchExitClearRef:W,alignItemsLabels:E,checkIcon:D},children:(0,Y.jsx)(Qc,{returnFocus:!0,...O,opened:A,onChange:I,defaultOpened:o,trapFocus:!x&&s,closeOnEscape:d,__staticSelector:`Menu`,classNames:ne,styles:K,unstyled:_,variant:v,keepMounted:x,onExitTransitionEnd:G,children:n})})});Gm.displayName=`@mantine/core/Menu`,Gm.classes=pm,Gm.Item=Sm,Gm.Label=Cm,Gm.Dropdown=xm,Gm.Target=Um,Gm.Divider=gm,Gm.Search=Im,Gm.Sub=Vm,Gm.CheckboxItem=mm,Gm.CheckboxGroup=um,Gm.RadioItem=Dm,Gm.RadioGroup=Tm,Gm.ContextMenu=hm;var[Km,qm]=R(`Modal component was not found in tree`),Jm={root:`m_9df02822`,content:`m_54c44539`,inner:`m_1f958f16`,header:`m_d0e2b9cd`},Ym=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`ModalBody`,null,e),s=qm();return(0,Y.jsx)(Bu,{...s.getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});Ym.classes=Jm,Ym.displayName=`@mantine/core/ModalBody`;var Xm=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`ModalCloseButton`,null,e),s=qm();return(0,Y.jsx)(Vu,{...s.getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});Xm.classes=Jm,Xm.displayName=`@mantine/core/ModalCloseButton`;var Zm=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,__hidden:s,...c}=X(`ModalContent`,null,e),l=qm(),u=l.scrollAreaComponent||Yu;return(0,Y.jsx)(Hu,{...l.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:l.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),"data-full-screen":l.fullScreen||void 0,"data-modal-content":!0,"data-hidden":s||void 0,...c,children:(0,Y.jsx)(u,{style:{maxHeight:l.fullScreen?`100dvh`:`calc(100dvh - (${N(l.yOffset)} * 2))`},children:o})})});Zm.classes=Jm,Zm.displayName=`@mantine/core/ModalContent`;var Qm=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`ModalHeader`,null,e),s=qm();return(0,Y.jsx)(Uu,{...s.getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Qm.classes=Jm,Qm.displayName=`@mantine/core/ModalHeader`;var $m=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`ModalOverlay`,null,e),s=qm();return(0,Y.jsx)(Ku,{...s.getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});$m.classes=Jm,$m.displayName=`@mantine/core/ModalOverlay`;var eh={__staticSelector:`Modal`,closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:G(`modal`),transitionProps:{duration:200,transition:`fade-down`},yOffset:`5dvh`},th=Ot((e,{radius:t,size:n,yOffset:r,xOffset:i})=>({root:{"--modal-radius":t===void 0?void 0:q(t),"--modal-size":K(n,`modal-size`),"--modal-y-offset":N(r),"--modal-x-offset":N(i)}})),nh=Z(e=>{let t=X(`ModalRoot`,eh,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,yOffset:c,scrollAreaComponent:l,radius:u,fullScreen:d,centered:f,xOffset:p,__staticSelector:m,attributes:h,...g}=t,_=Kn({name:m,classes:Jm,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:th});return(0,Y.jsx)(Km,{value:{yOffset:c,scrollAreaComponent:l,getStyles:_,fullScreen:d},children:(0,Y.jsx)(Lu,{..._(`root`),"data-full-screen":d||void 0,"data-centered":f||void 0,"data-offset-scrollbars":l===ec.Autosize||void 0,unstyled:o,...g})})});nh.classes=Jm,nh.varsResolver=th,nh.displayName=`@mantine/core/ModalRoot`;var rh=(0,C.createContext)(null);function ih({children:e}){let[t,n]=(0,C.useState)([]),[r,i]=(0,C.useState)(G(`modal`)),[a]=(0,C.useState)(()=>new WeakSet);return(0,Y.jsx)(rh,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r,handledEscapeEvents:a},children:e})}ih.displayName=`@mantine/core/ModalStack`;var ah=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=X(`ModalTitle`,null,e),s=qm();return(0,Y.jsx)(Ju,{...s.getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});ah.classes=Jm,ah.displayName=`@mantine/core/ModalTitle`;var oh={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:G(`modal`),transitionProps:{duration:200,transition:`fade-down`},withOverlay:!0,withCloseButton:!0},sh=Z(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,radius:s,opened:c,stackId:l,zIndex:u,...d}=X(`Modal`,oh,e),f=(0,C.use)(rh),p=!!t||i,m=f&&l?{closeOnEscape:f.currentId===l,trapFocus:f.currentId===l,zIndex:f.getZIndex(l),__handledEscapeEvents:f.handledEscapeEvents}:{},h=n===!1?!1:l&&f?f.currentId===l:c;return(0,C.useEffect)(()=>{f&&l&&(c?f.addModal(l,u||G(`modal`)):f.removeModal(l))},[c,l,u]),(0,Y.jsxs)(nh,{radius:s,opened:c,zIndex:f&&l?f.getZIndex(l):u,...d,...m,children:[n&&(0,Y.jsx)($m,{visible:h,transitionProps:f&&l?{duration:0}:void 0,...r}),(0,Y.jsxs)(Zm,{radius:s,__hidden:f&&l&&c?l!==f.currentId:!1,children:[p&&(0,Y.jsxs)(Qm,{children:[t&&(0,Y.jsx)(ah,{children:t}),i&&(0,Y.jsx)(Xm,{...a})]}),(0,Y.jsx)(Ym,{children:o})]})]})});sh.classes=Jm,sh.displayName=`@mantine/core/Modal`,sh.Root=nh,sh.Overlay=$m,sh.Content=Zm,sh.Body=Ym,sh.Header=Qm,sh.Title=ah,sh.CloseButton=Xm,sh.Stack=ih;var ch=(0,C.createContext)(null),lh={root:`m_7cda1cd6`,"root--default":`m_44da308b`,"root--contrast":`m_e3a01f8`,label:`m_1e0e6180`,remove:`m_ae386778`,group:`m_1dcfd90b`},uh=(0,C.createContext)(null),dh=Ot((e,{gap:t},{size:n})=>({group:{"--pg-gap":t===void 0?K(n,`pg-gap`):K(t)}})),fh=Z(e=>{let t=X(`PillGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,disabled:l,attributes:u,...d}=t,f=(0,C.use)(ch)?.size||c||void 0,p=Kn({name:`PillGroup`,classes:lh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s,varsResolver:dh,stylesCtx:{size:f},rootSelector:`group`});return(0,Y.jsx)(uh,{value:{size:f,disabled:l},children:(0,Y.jsx)(Q,{size:f,...p(`group`),...d})})});fh.classes=lh,fh.varsResolver=dh,fh.displayName=`@mantine/core/PillGroup`;var ph={variant:`default`},mh=Ot((e,{radius:t},{size:n})=>({root:{"--pill-fz":K(n,`pill-fz`),"--pill-height":K(n,`pill-height`),"--pill-radius":t===void 0?void 0:q(t)}})),hh=Z(e=>{let t=X(`Pill`,ph,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,variant:c,children:l,withRemoveButton:u,onRemove:d,removeButtonProps:f,radius:p,size:m,disabled:h,mod:g,attributes:_,...v}=t,y=(0,C.use)(uh),b=(0,C.use)(ch),x=m||y?.size||void 0,S=b?.variant===`filled`?`contrast`:c||`default`,w=Kn({name:`Pill`,classes:lh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:_,vars:s,varsResolver:mh,stylesCtx:{size:x}});return(0,Y.jsxs)(Q,{component:`span`,variant:S,size:x,...w(`root`,{variant:S}),mod:[{"with-remove":u&&!h,disabled:h||y?.disabled},g],...v,children:[(0,Y.jsx)(`span`,{...w(`label`),children:l}),u&&(0,Y.jsx)(yl,{variant:`transparent`,radius:p,tabIndex:-1,"aria-hidden":!0,unstyled:o,...f,...w(`remove`,{className:f?.className,style:f?.style}),onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),f?.onMouseDown?.(e)},onClick:e=>{e.stopPropagation(),d?.(),f?.onClick?.(e)}})]})});hh.classes=lh,hh.varsResolver=mh,hh.displayName=`@mantine/core/Pill`,hh.Group=fh;var gh={field:`m_45c4369d`},_h={type:`visible`},vh=Z(e=>{let t=X(`PillsInputField`,_h,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,type:c,disabled:l,id:u,pointer:d,mod:f,attributes:p,ref:m,...h}=t,g=(0,C.use)(ch),_=(0,C.use)(ed),v=Kn({name:`PillsInputField`,classes:gh,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,rootSelector:`field`}),y=l||g?.disabled;return(0,Y.jsx)(Q,{component:`input`,ref:nt(m,g?.fieldRef),"data-type":c,disabled:y,mod:[{disabled:y,pointer:d},f],...v(`field`),...h,id:_?.inputId||u,"aria-invalid":g?.hasError,"aria-describedby":_?.describedBy,type:`text`,onMouseDown:e=>!d&&e.stopPropagation()})});vh.classes=gh,vh.displayName=`@mantine/core/PillsInputField`;var yh={size:`sm`},bh=Z(e=>{let{children:t,onMouseDown:n,onClick:r,size:i,disabled:a,__staticSelector:o,error:s,variant:c,...l}=X([`Input`,`InputWrapper`,`PillsInput`],yh,e),u=(0,C.useRef)(null);return(0,Y.jsx)(ch,{value:{fieldRef:u,size:i,disabled:a,hasError:!!s,variant:c},children:(0,Y.jsx)(xd,{size:i,error:s,variant:c,component:`div`,"data-no-overflow":!0,onMouseDown:e=>{e.preventDefault(),n?.(e),u.current?.focus()},onClick:e=>{e.preventDefault(),e.currentTarget.closest(`fieldset`)?.disabled||(u.current?.focus(),r?.(e))},...l,multiline:!0,disabled:a,__staticSelector:o||`PillsInput`,withAria:!1,children:t})})});bh.displayName=`@mantine/core/PillsInput`,bh.classes=xd.classes,bh.Field=vh;function xh(e,t){let n=t.trim().toLowerCase();if(n===``)return;let r=Object.values(e).filter(e=>!e.disabled&&e.label.trim().toLowerCase()===n);return r.length===1?r[0]:void 0}function Sh(e){return typeof e==`string`?e.trim().toLowerCase():e}function Ch({data:e,value:t}){let n=t.map(Sh);return e.reduce((e,t)=>(Hf(t)?e.push({group:t.group,items:t.items.filter(e=>n.indexOf(Sh(e.value))===-1)}):n.indexOf(Sh(t.value))===-1&&e.push(t),e),[])}var wh={xs:41,sm:50,md:60,lg:72,xl:89},Th={maxValues:1/0,withCheckIcon:!0,checkIconPosition:`left`,hiddenInputValuesDivider:`,`,clearSearchOnChange:!0,openOnFocus:!0,size:`sm`},Eh=Or(e=>{let t=X([`Input`,`InputWrapper`,`MultiSelect`],Th,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,value:l,defaultValue:u,onChange:d,onKeyDown:f,variant:p,data:m,dropdownOpened:h,defaultDropdownOpened:g,onDropdownOpen:_,onDropdownClose:v,selectFirstOptionOnChange:y,selectFirstOptionOnDropdownOpen:b,onOptionSubmit:x,comboboxProps:S,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,searchValue:k,defaultSearchValue:A,onSearchChange:j,readOnly:M,disabled:N,onFocus:P,onBlur:F,radius:I,rightSection:L,rightSectionWidth:R,rightSectionPointerEvents:z,rightSectionProps:B,leftSection:V,leftSectionWidth:H,leftSectionPointerEvents:ee,leftSectionProps:U,inputContainer:W,inputWrapperOrder:G,withAsterisk:te,labelProps:ne,descriptionProps:K,errorProps:re,successProps:q,wrapperProps:ie,description:ae,label:oe,error:J,success:se,maxValues:ce,searchable:le,nothingFoundMessage:ue,withCheckIcon:de,withAlignedLabels:fe,checkIconPosition:pe,hidePickedOptions:me,withErrorStyles:he,withSuccessStyles:ge,name:_e,form:ve,id:ye,clearable:be,clearSectionMode:xe,clearButtonProps:Se,hiddenInputProps:Ce,placeholder:we,hiddenInputValuesDivider:Te,required:Ee,mod:De,renderOption:Oe,renderPill:ke,onRemove:Ae,onClear:je,onMaxValues:Me,scrollAreaProps:Ne,chevronColor:Pe,attributes:Fe,clearSearchOnChange:Ie,openOnFocus:Le,loading:Re,loadingPosition:ze,loaderProps:Be,withPillsReorder:Ve,...He}=t,Ue=Qe(ye),We=$f({id:Ue,label:oe,labelProps:ne,inputWrapperOrder:G}),Ge=Bd(m),Ke=Vd(Ge),qe=(0,C.useRef)({}),Je=gf({opened:h,defaultOpened:g,onDropdownOpen:()=>{_?.(),b&&Je.selectFirstOption()},onDropdownClose:()=>{v?.(),Je.resetSelectedOption()}}),{styleProps:Ye,rest:{type:Xe,autoComplete:Ze,...$e}}=er(He),[et,tt]=rt({value:l,defaultValue:u,finalValue:[],onChange:d}),{getPillProps:nt,getListProps:it,handleInputKeyDown:at}=Qf({value:et,onChange:tt,enabled:Ve&&!N&&!M}),[ot,st]=rt({value:k,defaultValue:A,finalValue:``,onChange:j}),ct=e=>{st(e),Je.resetSelectedOption()},lt=Kn({name:`MultiSelect`,classes:{},props:t,classNames:n,styles:a,unstyled:o,attributes:Fe}),{resolvedClassNames:ut,resolvedStyles:dt}=jn({props:t,styles:a,classNames:n}),ft=e=>{f?.(e),e.defaultPrevented||(e.key===` `&&!le&&(e.preventDefault(),Je.toggleDropdown()),e.key===`Backspace`&&ot.length===0&&et.length>0&&!e.nativeEvent.isComposing&&!M&&(Ae?.(et[et.length-1]),tt(et.slice(0,et.length-1))),at(e))},pt=et.map((e,t)=>{let n=Ke[`${e}`]||qe.current[`${e}`],r=nt(t);return ke?(0,Y.jsx)(C.Fragment,{children:ke({option:n,value:e,onRemove:()=>{tt(et.filter(t=>e!==t)),Ae?.(e)},disabled:N,reorderProps:r})},`${e}-${t}`):(0,Y.jsx)(hh,{withRemoveButton:!M&&!Ke[`${e}`]?.disabled,onRemove:()=>{tt(et.filter(t=>e!==t)),Ae?.(e)},unstyled:o,disabled:N,...lt(`pill`),...r,children:n?.label||e},`${e}-${t}`)});(0,C.useEffect)(()=>{y&&Je.selectFirstOption()},[y,ot]),(0,C.useEffect)(()=>{et.forEach(e=>{`${e}`in Ke&&(qe.current[`${e}`]=Ke[`${e}`])})},[Ke,et]);let mt=(0,Y.jsx)(yf.ClearButton,{...Se,onClear:()=>{je?.(),tt([]),ct(``)}}),ht=Ch({data:Ge,value:et}),gt=be&&et.length>0&&!N&&!M,_t=gt?{paddingInlineEnd:wh[c]??wh.sm}:void 0;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(yf,{store:Je,classNames:ut,styles:dt,unstyled:o,size:c,readOnly:M,__staticSelector:`MultiSelect`,attributes:Fe,floatingHeight:O,onOptionSubmit:e=>{x?.(e),Ie&&ct(``),Je.updateSelectedOptionIndex(`selected`),et.includes(Ke[`${e}`].value)?(tt(et.filter(t=>t!==Ke[`${e}`].value)),Ae?.(Ke[`${e}`].value)):et.length<ce?tt([...et,Ke[`${e}`].value]):Me?.()},...S,children:[(0,Y.jsx)(yf.DropdownTarget,{children:(0,Y.jsx)(bh,{...Ye,__staticSelector:`MultiSelect`,classNames:ut,styles:dt,unstyled:o,size:c,className:r,style:i,variant:p,disabled:N,radius:I,__defaultRightSection:(0,Y.jsx)(yf.Chevron,{size:c,error:J,unstyled:o,color:Pe}),__clearSection:mt,__clearable:gt,__clearSectionMode:xe,rightSection:L,rightSectionPointerEvents:z||`none`,rightSectionWidth:R,rightSectionProps:B,leftSection:V,leftSectionWidth:H,leftSectionPointerEvents:ee,leftSectionProps:U,loading:Re,loadingPosition:ze,loaderProps:Be,inputContainer:W,inputWrapperOrder:G,withAsterisk:te,labelProps:ne,descriptionProps:K,errorProps:re,successProps:q,wrapperProps:ie,description:ae,label:oe,error:J,success:se,withErrorStyles:he,withSuccessStyles:ge,__stylesApiProps:{...t,rightSectionPointerEvents:z||`none`,multiline:!0},pointer:!le,onClick:()=>le?Je.openDropdown():Je.toggleDropdown(),"data-expanded":Je.dropdownOpened||void 0,id:Ue,required:Ee,mod:De,attributes:Fe,children:(0,Y.jsxs)(hh.Group,{attributes:Fe,disabled:N,unstyled:o,...lt(`pillsList`,{style:_t}),...it(),children:[pt,(0,Y.jsx)(yf.EventsTarget,{autoComplete:Ze,withExpandedAttribute:!0,children:(0,Y.jsx)(bh.Field,{...$e,id:Ue,placeholder:we,type:!le&&!we?`hidden`:`visible`,...lt(`inputField`),unstyled:o,onFocus:e=>{P?.(e),Le&&le&&Je.openDropdown()},onBlur:e=>{F?.(e),Je.closeDropdown(),ct(``)},onKeyDown:ft,value:ot,onChange:e=>{if(yp(e)){if(!M){let t=xh(Ke,e.currentTarget.value);t&&!et.includes(t.value)&&et.length<ce&&tt([...et,t.value])}}else ct(e.currentTarget.value),le&&Je.openDropdown(),y&&Je.selectFirstOption()},disabled:N,readOnly:M||!le,pointer:!le})})]})})}),(0,Y.jsx)(Jf,{data:me?ht:Ge,hidden:M||N,filter:w,search:ot,limit:T,hiddenWhenEmpty:!ue,withScrollArea:E,maxDropdownHeight:D,filterOptions:le,value:et,checkIconPosition:pe,withCheckIcon:de,withAlignedLabels:fe,nothingFoundMessage:ue,unstyled:o,labelId:We,"aria-label":We?void 0:He[`aria-label`],renderOption:Oe,scrollAreaProps:Ne})]}),(0,Y.jsx)(yf.HiddenInput,{name:_e,valuesDivider:Te,value:et,form:ve,disabled:N,...Ce})]})});Eh.classes={...xd.classes,...yf.classes},Eh.displayName=`@mantine/core/MultiSelect`;function Dh(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var Oh;(function(e){e.event=`event`,e.props=`prop`})(Oh||={});function kh(){}function Ah(e){var t,n=void 0;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return t&&r.length===t.length&&r.every(function(e,n){return e===t[n]})||(t=r,n=e.apply(void 0,r)),n}}function jh(e){return!!(e||``).match(/\d/)}function Mh(e){return e==null}function Nh(e){return typeof e==`number`&&isNaN(e)}function Ph(e){return Mh(e)||Nh(e)||typeof e==`number`&&!isFinite(e)}function Fh(e){return e.replace(/[-[\]/{}()*+?.\\^$|]/g,`\\$&`)}function Ih(e){switch(e){case`lakh`:return/(\d+?)(?=(\d\d)+(\d)(?!\d))(\.\d+)?/g;case`wan`:return/(\d)(?=(\d{4})+(?!\d))/g;default:return/(\d)(?=(\d{3})+(?!\d))/g}}function Lh(e,t,n){var r=Ih(n),i=e.search(/[1-9]/);return i=i===-1?e.length:i,e.substring(0,i)+e.substring(i,e.length).replace(r,`$1`+t)}function Rh(e){var t=(0,C.useRef)(e);return t.current=e,(0,C.useRef)(function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return t.current.apply(t,e)}).current}function zh(e,t){t===void 0&&(t=!0);var n=e[0]===`-`,r=n&&t;e=e.replace(`-`,``);var i=e.split(`.`);return{beforeDecimal:i[0],afterDecimal:i[1]||``,hasNegation:n,addNegation:r}}function Bh(e){if(!e)return e;var t=e[0]===`-`;t&&(e=e.substring(1,e.length));var n=e.split(`.`),r=n[0].replace(/^0+/,``)||`0`,i=n[1]||``;return(t?`-`:``)+r+(i?`.`+i:``)}function Vh(e,t,n){for(var r=``,i=n?`0`:``,a=0;a<=t-1;a++)r+=e[a]||i;return r}function Hh(e,t){return Array(t+1).join(e)}function Uh(e){var t=e+``,n=t[0]===`-`?`-`:``;n&&(t=t.substring(1));var r=t.split(/[eE]/g),i=r[0],a=r[1];if(a=Number(a),!a)return n+i;i=i.replace(`.`,``);var o=1+a,s=i.length;return o<0?i=`0.`+Hh(`0`,Math.abs(o))+i:o>=s?i+=Hh(`0`,o-s):i=(i.substring(0,o)||`0`)+`.`+i.substring(o),n+i}function Wh(e,t,n){if([``,`-`].indexOf(e)!==-1)return e;var r=(e.indexOf(`.`)!==-1||n)&&t,i=zh(e),a=i.beforeDecimal,o=i.afterDecimal,s=i.hasNegation,c=parseFloat(`0.`+(o||`0`)),l=(o.length<=t?`0.`+o:c.toFixed(t)).split(`.`),u=a;a&&Number(l[0])&&(u=a.split(``).reverse().reduce(function(e,t,n){return e.length>n?(Number(e[0])+Number(t)).toString()+e.substring(1,e.length):t+e},l[0]));var d=Vh(l[1]||``,t,n),f=s?`-`:``,p=r?`.`:``;return``+f+u+p+d}function Gh(e,t){if(e.value=e.value,e!==null){if(e.createTextRange){var n=e.createTextRange();return n.move(`character`,t),n.select(),!0}return e.selectionStart||e.selectionStart===0?(e.focus(),e.setSelectionRange(t,t),!0):(e.focus(),!1)}}var Kh=Ah(function(e,t){for(var n=0,r=0,i=e.length,a=t.length;e[n]===t[n]&&n<i;)n++;for(;e[i-1-r]===t[a-1-r]&&a-r>n&&i-r>n;)r++;return{from:{start:n,end:i-r},to:{start:n,end:a-r}}}),qh=function(e,t){var n=Math.min(e.selectionStart,t);return{from:{start:n,end:e.selectionEnd},to:{start:n,end:t}}};function Jh(e,t,n){return Math.min(Math.max(e,t),n)}function Yh(e){return Math.max(e.selectionStart,e.selectionEnd)}function Xh(){return typeof navigator<`u`&&!(navigator.platform&&/iPhone|iPod/.test(navigator.platform))}function Zh(e){return{from:{start:0,end:0},to:{start:0,end:e.length},lastValue:``}}function Qh(e){var t=e.currentValue,n=e.formattedValue,r=e.currentValueIndex,i=e.formattedValueIndex;return t[r]===n[i]}function $h(e,t,n,r,i,a,o){o===void 0&&(o=Qh);var s=i.findIndex(function(e){return e}),c=e.slice(0,s);!t&&!n.startsWith(c)&&(t=c,n=c+n,r+=c.length);for(var l=n.length,u=e.length,d={},f=Array(l),p=0;p<l;p++){f[p]=-1;for(var m=0,h=u;m<h;m++)if(o({currentValue:n,lastValue:t,formattedValue:e,currentValueIndex:p,formattedValueIndex:m})&&d[m]!==!0){f[p]=m,d[m]=!0;break}}for(var g=r;g<l&&(f[g]===-1||!a(n[g]));)g++;var _=g===l||f[g]===-1?u:f[g];for(g=r-1;g>0&&f[g]===-1;)g--;var v=g===-1||f[g]===-1?0:f[g]+1;return v>_?_:r-v<_-r?v:_}function eg(e,t,n,r){var i=e.length;if(t=Jh(t,0,i),r===`left`){for(;t>=0&&!n[t];)t--;t===-1&&(t=n.indexOf(!0))}else{for(;t<=i&&!n[t];)t++;t>i&&(t=n.lastIndexOf(!0))}return t===-1&&(t=i),t}function tg(e){for(var t=Array.from({length:e.length+1}).map(function(){return!0}),n=0,r=t.length;n<r;n++)t[n]=!!(jh(e[n])||jh(e[n-1]));return t}function ng(e,t,n,r,i,a){a===void 0&&(a=kh);var o=Rh(function(e,t){var n,a;return Ph(e)?(a=``,n=``):typeof e==`number`||t?(a=typeof e==`number`?Uh(e):e,n=r(a)):(a=i(e,void 0),n=r(a)),{formattedValue:n,numAsString:a}}),s=(0,C.useState)(function(){return o(Mh(e)?t:e,n)}),c=s[0],l=s[1],u=Rh(function(e,t){e.formattedValue!==c.formattedValue&&l({formattedValue:e.formattedValue,numAsString:e.value}),a(e,t)}),d=e,f=n;Mh(e)&&(d=c.numAsString,f=!0);var p=o(d,f);return(0,C.useMemo)(function(){l(p)},[p.formattedValue]),(0,C.useEffect)(function(){if(!Mh(t)&&Mh(e)&&c.formattedValue!==``){var n=parseFloat(c.numAsString);u({formattedValue:c.formattedValue,value:c.numAsString,floatValue:isNaN(n)?void 0:n},{event:void 0,source:Oh.props})}},[]),[c,u]}function rg(e){return e.replace(/[^0-9]/g,``)}function ig(e){return e}function ag(e){var t=e.type;t===void 0&&(t=`text`);var n=e.displayType;n===void 0&&(n=`input`);var r=e.customInput,i=e.renderText,a=e.getInputRef,o=e.format;o===void 0&&(o=ig);var s=e.removeFormatting;s===void 0&&(s=rg);var c=e.defaultValue,l=e.valueIsNumericString,u=e.onValueChange,d=e.isAllowed,f=e.onChange;f===void 0&&(f=kh);var p=e.onKeyDown;p===void 0&&(p=kh);var m=e.onMouseUp;m===void 0&&(m=kh);var h=e.onFocus;h===void 0&&(h=kh);var g=e.onBlur;g===void 0&&(g=kh);var _=e.value,v=e.getCaretBoundary;v===void 0&&(v=tg);var y=e.isValidInputCharacter;y===void 0&&(y=jh);var b=e.isCharacterSame,x=Dh(e,[`type`,`displayType`,`customInput`,`renderText`,`getInputRef`,`format`,`removeFormatting`,`defaultValue`,`valueIsNumericString`,`onValueChange`,`isAllowed`,`onChange`,`onKeyDown`,`onMouseUp`,`onFocus`,`onBlur`,`value`,`getCaretBoundary`,`isValidInputCharacter`,`isCharacterSame`]),S=ng(_,c,!!l,o,s,u),w=S[0],T=w.formattedValue,E=w.numAsString,D=S[1],O=(0,C.useRef)(),k=(0,C.useRef)({formattedValue:T,numAsString:E}),A=function(e,t){k.current={formattedValue:e.formattedValue,numAsString:e.value},D(e,t)},j=(0,C.useState)(!1),M=j[0],N=j[1],P=(0,C.useRef)(null),F=(0,C.useRef)({setCaretTimeout:null,focusTimeout:null});(0,C.useEffect)(function(){return N(!0),function(){clearTimeout(F.current.setCaretTimeout),clearTimeout(F.current.focusTimeout)}},[]);var I=o,L=function(e,t){var n=parseFloat(t);return{formattedValue:e,value:t,floatValue:isNaN(n)?void 0:n}},R=function(e,t,n){(e.selectionStart!==0||e.selectionEnd!==e.value.length)&&(Gh(e,t),F.current.setCaretTimeout=setTimeout(function(){e.value===n&&e.selectionStart!==t&&Gh(e,t)},0))},z=function(e,t,n){return eg(e,t,v(e),n)},B=function(e,t,n){var r=v(t),i=$h(t,T,e,n,r,y,b);return i=eg(t,i,r),i},V=function(e){var t=e.formattedValue;t===void 0&&(t=``);var n=e.input,r=e.source,i=e.event,a=e.numAsString,o;if(n){var s=e.inputValue||n.value,c=Yh(n);n.value=t,o=B(s,t,c),o!==void 0&&R(n,o,t)}t!==T&&A(L(t,a),{event:i,source:r})};(0,C.useEffect)(function(){var e=k.current,t=e.formattedValue,n=e.numAsString;(T!==t||E!==n)&&A(L(T,E),{event:void 0,source:Oh.props})},[T,E]);var H=P.current?Yh(P.current):void 0;(typeof window<`u`?C.useLayoutEffect:C.useEffect)(function(){var e=P.current;if(T!==k.current.formattedValue&&e){var t=B(k.current.formattedValue,T,H);e.value=T,R(e,t,T)}},[T]);var ee=function(e,t,n){var r=t.target,i=O.current?qh(O.current,r.selectionEnd):Kh(T,e),a=Object.assign(Object.assign({},i),{lastValue:T}),o=s(e,a),c=I(o);if(o=s(c,void 0),d&&!d(L(c,o))){var l=t.target,u=B(e,T,Yh(l));return l.value=T,R(l,u,T),!1}return V({formattedValue:c,numAsString:o,inputValue:e,event:t,source:n,input:t.target}),!0},U=function(e,t){t===void 0&&(t=0),O.current={selectionStart:e.selectionStart,selectionEnd:e.selectionEnd+t}},W=function(e){var t=e.target.value;ee(t,e,Oh.event)&&f(e),O.current=void 0},G=function(e){var t=e.target,n=e.key,r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o;n===`ArrowLeft`||n===`Backspace`?o=Math.max(r-1,0):n===`ArrowRight`?o=Math.min(r+1,a.length):n===`Delete`&&(o=r);var s=0;n===`Delete`&&r===i&&(s=1);var c=n===`ArrowLeft`||n===`ArrowRight`;if(o===void 0||r!==i&&!c)p(e),U(t,s);else{var l=o;c?(l=z(a,o,n===`ArrowLeft`?`left`:`right`),l!==o&&e.preventDefault()):n===`Delete`&&!y(a[o])?l=z(a,o,`right`):n===`Backspace`&&!y(a[o])&&(l=z(a,o,`left`)),l!==o&&R(t,l,a),p(e),U(t,s)}},te=function(e){var t=e.target,n=function(){var e=t.selectionStart,n=t.selectionEnd,r=t.value;if(r===void 0&&(r=``),e===n){var i=z(r,e);i!==e&&R(t,i,r)}};n(),requestAnimationFrame(function(){n()}),m(e),U(t)},ne=function(e){e.persist&&e.persist();var t=e.target,n=e.currentTarget;P.current=t,F.current.focusTimeout=setTimeout(function(){var r=t.selectionStart,i=t.selectionEnd,a=t.value;a===void 0&&(a=``);var o=z(a,r);o!==r&&(r!==0||i!==a.length)&&R(t,o,a),h(Object.assign(Object.assign({},e),{currentTarget:n}))},0)},K=function(e){P.current=null,clearTimeout(F.current.focusTimeout),clearTimeout(F.current.setCaretTimeout),g(e)},re=M&&Xh()?`numeric`:void 0,q=Object.assign({inputMode:re},x,{type:t,value:T,onChange:W,onKeyDown:G,onMouseUp:te,onFocus:ne,onBlur:K});if(n===`text`)return i?C.createElement(C.Fragment,null,i(T,x)||null):C.createElement(`span`,Object.assign({},x,{ref:a}),T);if(r){var ie=r;return C.createElement(ie,Object.assign({},q,{ref:a}))}return C.createElement(`input`,Object.assign({},q,{ref:a}))}function og(e,t){var n=t.decimalScale,r=t.fixedDecimalScale,i=t.prefix;i===void 0&&(i=``);var a=t.suffix;a===void 0&&(a=``);var o=t.allowNegative,s=t.thousandsGroupStyle;if(s===void 0&&(s=`thousand`),e===``||e===`-`)return e;var c=sg(t),l=c.thousandSeparator,u=c.decimalSeparator,d=n!==0&&e.indexOf(`.`)!==-1||n&&r,f=zh(e,o),p=f.beforeDecimal,m=f.afterDecimal,h=f.addNegation;return n!==void 0&&(m=Vh(m,n,!!r)),l&&(p=Lh(p,l,s)),i&&(p=i+p),a&&(m+=a),h&&(p=`-`+p),e=p+(d&&u||``)+m,e}function sg(e){var t=e.decimalSeparator;t===void 0&&(t=`.`);var n=e.thousandSeparator,r=e.allowedDecimalSeparators;return n===!0&&(n=`,`),r||=[t,`.`],{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r}}function cg(e,t){e===void 0&&(e=``);var n=RegExp(`(-)`),r=RegExp(`(-)(.)*(-)`),i=n.test(e),a=r.test(e);return e=e.replace(/-/g,``),i&&!a&&t&&(e=`-`+e),e}function lg(e,t){return RegExp(`(^-)|[0-9]|`+Fh(e),t?`g`:void 0)}function ug(e,t,n){return e===``||!t?.match(/\d/)&&!n?.match(/\d/)&&typeof e==`string`&&!isNaN(Number(e))}function dg(e,t,n){var r;t===void 0&&(t=Zh(e));var i=n.allowNegative,a=n.prefix;a===void 0&&(a=``);var o=n.suffix;o===void 0&&(o=``);var s=n.decimalScale,c=t.from,l=t.to,u=l.start,d=l.end,f=sg(n),p=f.allowedDecimalSeparators,m=f.decimalSeparator,h=e[d]===m;if(jh(e)&&(e===a||e===o)&&t.lastValue===``)return e;if(d-u===1&&p.indexOf(e[u])!==-1){var g=s===0?``:m;e=e.substring(0,u)+g+e.substring(u+1,e.length)}var _=function(e,t,n){var r=!1,i=!1;a.startsWith(`-`)?r=!1:e.startsWith(`--`)?(r=!1,i=!0):o.startsWith(`-`)&&e.length===o.length?r=!1:e[0]===`-`&&(r=!0);var s=+!!r;return i&&(s=2),s&&(e=e.substring(s),t-=s,n-=s),{value:e,start:t,end:n,hasNegation:r}},v=_(e,u,d),y=v.hasNegation;r=v,e=r.value,u=r.start,d=r.end;var b=_(t.lastValue,c.start,c.end),x=b.start,S=b.end,C=b.value,w=e.substring(u,d);e.length&&C.length&&(x>C.length-o.length||S<a.length)&&!(w&&o.startsWith(w))&&(e=C);var T=0;e.startsWith(a)?T+=a.length:u<a.length&&(T=u),e=e.substring(T),d-=T;var E=e.length,D=e.length-o.length;e.endsWith(o)?E=D:(d>D||d>e.length-o.length)&&(E=d),e=e.substring(0,E),e=cg(y?`-`+e:e,i),e=(e.match(lg(m,!0))||[]).join(``);var O=e.indexOf(m);e=e.replace(new RegExp(Fh(m),`g`),function(e,t){return t===O?`.`:``});var k=zh(e,i),A=k.beforeDecimal,j=k.afterDecimal,M=k.addNegation;return l.end-l.start<c.end-c.start&&A===``&&h&&!parseFloat(j)&&(e=M?`-`:``),e}function fg(e,t){var n=t.prefix;n===void 0&&(n=``);var r=t.suffix;r===void 0&&(r=``);var i=Array.from({length:e.length+1}).map(function(){return!0}),a=e[0]===`-`;i.fill(!1,0,Math.min(n.length+ +!!a,e.length));var o=e.length;return i.fill(!1,o-r.length+1,o+1),i}function pg(e){var t=sg(e),n=t.thousandSeparator,r=t.decimalSeparator,i=e.prefix;i===void 0&&(i=``);var a=e.allowNegative;if(a===void 0&&(a=!0),n===r)throw Error(`
|
|
43
|
+
Decimal separator can't be same as thousand separator.
|
|
44
|
+
thousandSeparator: `+n+` (thousandSeparator = {true} is same as thousandSeparator = ",")
|
|
45
|
+
decimalSeparator: `+r+` (default value for decimalSeparator is .)
|
|
46
|
+
`);return i.startsWith(`-`)&&a&&(console.error(`
|
|
47
|
+
Prefix can't start with '-' when allowNegative is true.
|
|
48
|
+
prefix: `+i+`
|
|
49
|
+
allowNegative: `+a+`
|
|
50
|
+
`),a=!1),Object.assign(Object.assign({},e),{allowNegative:a})}function mg(e){e=pg(e),e.decimalSeparator,e.allowedDecimalSeparators,e.thousandsGroupStyle;var t=e.suffix,n=e.allowNegative,r=e.allowLeadingZeros,i=e.onKeyDown;i===void 0&&(i=kh);var a=e.onBlur;a===void 0&&(a=kh);var o=e.thousandSeparator,s=e.decimalScale,c=e.fixedDecimalScale,l=e.prefix;l===void 0&&(l=``);var u=e.defaultValue,d=e.value,f=e.valueIsNumericString,p=e.onValueChange,m=Dh(e,[`decimalSeparator`,`allowedDecimalSeparators`,`thousandsGroupStyle`,`suffix`,`allowNegative`,`allowLeadingZeros`,`onKeyDown`,`onBlur`,`thousandSeparator`,`decimalScale`,`fixedDecimalScale`,`prefix`,`defaultValue`,`value`,`valueIsNumericString`,`onValueChange`]),h=sg(e),g=h.decimalSeparator,_=h.allowedDecimalSeparators,v=function(t){return og(t,e)},y=function(t,n){return dg(t,n,e)},b=Mh(d)?u:d,x=f??ug(b,l,t);Mh(d)?Mh(u)||(x||=typeof u==`number`):x||=typeof d==`number`;var S=function(e){return Ph(e)?e:(typeof e==`number`&&(e=Uh(e)),x&&typeof s==`number`?Wh(e,s,!!c):e)},C=ng(S(d),S(u),!!x,v,y,p),w=C[0],T=w.numAsString,E=w.formattedValue,D=C[1];return Object.assign(Object.assign({},m),{value:E,valueIsNumericString:!1,isValidInputCharacter:function(e){return e===g||jh(e)},isCharacterSame:function(e){var t=e.currentValue,n=e.lastValue,r=e.formattedValue,i=e.currentValueIndex,a=e.formattedValueIndex,o=t[i],u=r[a],f=Kh(n,t).to,p=function(e){return y(e).indexOf(`.`)+l.length};return d===0&&c&&s&&t[f.start]===g&&p(t)<i&&p(r)>a?!1:i>=f.start&&i<f.end&&_&&_.includes(o)&&u===g?!0:o===u},onValueChange:D,format:v,removeFormatting:y,getCaretBoundary:function(t){return fg(t,e)},onKeyDown:function(e){var t=e.target,r=e.key,a=t.selectionStart,u=t.selectionEnd,d=t.value;if(d===void 0&&(d=``),(r===`Backspace`||r===`Delete`)&&u<l.length&&d!==`-`)e.preventDefault();else if(a!==u)i(e);else{r===`Backspace`&&d[0]===`-`&&a===l.length+1&&n&&Gh(t,1),s&&c&&(r===`Backspace`&&d[a-1]===g?(Gh(t,a-1),e.preventDefault()):r===`Delete`&&d[a]===g&&e.preventDefault()),_?.includes(r)&&d[a]===g&&Gh(t,a+1);var f=o===!0?`,`:o;r===`Backspace`&&d[a-1]===f&&Gh(t,a-1),r===`Delete`&&d[a]===f&&Gh(t,a+1),i(e)}},onBlur:function(t){var n=T;n.match(/\d/g)||(n=``),r||(n=Bh(n)),c&&s&&(n=Wh(n,s,c)),n!==T&&D({formattedValue:og(n,e),value:n,floatValue:parseFloat(n)},{event:t,source:Oh.event}),a(t)}})}function hg(e){var t=mg(e);return C.createElement(ag,Object.assign({},t))}function gg(e,t){return/\d/.test(e)||e===t}function _g(e,t,n,r){let i=0;for(let n=0;n<t&&n<e.length;n+=1)gg(e[n],r)&&(i+=1);if(i===0)return Math.min(t,n.length);for(let e=0;e<n.length;e+=1)if(gg(n[e],r)&&(--i,i===0))return e+1;return n.length}function vg(e,t){let n=0;for(;t+n<e.length&&/\d/.test(e[t+n]);)n+=1;return n}function yg(e,{decimalSeparator:t,thousandSeparator:n,allowedDecimalSeparators:r,thousandsGroupStyle:i}){let a=new Set([...r,t].filter(e=>e.length===1)),o=e.split(``),s=o.reduce((e,t,n)=>(a.has(t)&&e.push(n),e),[]);if(s.length===0)return e;let c=s[s.length-1],l=o[c],u=s.filter(e=>o[e]===l).length,d=i===`wan`?4:3,f=-1;return u===1&&(f=l===t?c:l===n&&vg(e,c+1)===d?-1:c),o.map((e,r)=>r===f?t:a.has(e)&&e!==n?``:e).join(``)}function bg({direction:e,style:t,...n}){return(0,Y.jsx)(`svg`,{style:{width:`var(--ni-chevron-size)`,height:`var(--ni-chevron-size)`,transform:e===`up`?`rotate(180deg)`:void 0,...t},viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...n,children:(0,Y.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var xg={root:`m_e2f5cd4e`,controls:`m_95e17d22`,control:`m_80b4b171`},Sg=/^(0\.0*|-0(\.0*)?)$/,Cg=/^-?0\d+(\.\d+)?\.?$/,wg=/\.\d*0$/,Tg=/^-?\d+\.$/;function Eg(e){return typeof e==`string`&&e!==``&&!Number.isNaN(Number(e))}function Dg(e){return typeof e==`bigint`}function Og(e){return typeof e==`number`?e<2**53-1:e===``||Eg(e)&&Number(e)<2**53-1}function kg(e,t){return e===``||e===`-`||!t&&e.startsWith(`-`)?!1:/^-?\d+$/.test(e)}function Ag(e,t){return typeof e==`bigint`||e===``||kg(e,t)}function jg(e){if(!/^-?\d+$/.test(e))return null;try{return BigInt(e)}catch{return null}}function Mg(e){if(typeof e==`bigint`)return e;if(typeof e==`number`&&Number.isFinite(e)&&Number.isInteger(e))return BigInt(e)}function Ng(e,t,n){return t!==void 0&&e<t?t:n!==void 0&&e>n?n:e}function Pg(e){return e.toString().replace(`.`,``).length}function Fg(e,t){return(typeof e==`number`?e<2**53-1:!Number.isNaN(Number(e)))&&!Number.isNaN(e)&&Pg(t)<14&&t!==``}function Ig(e,t,n){return e===void 0||(t===void 0||e>=t)&&(n===void 0||e<=n)}var Lg={size:`sm`,step:1,clampBehavior:`blur`,allowDecimal:!0,allowNegative:!0,withKeyboardEvents:!0,allowLeadingZeros:!0,trimLeadingZeroesOnBlur:!0,startValue:0,allowedDecimalSeparators:[`.`,`,`]},Rg=Ot((e,{size:t})=>({controls:{"--ni-chevron-size":K(t,`ni-chevron-size`)}}));function zg(e,t){return t?`${e}.`:e}function Bg(e,t){let n=Tg.test(e),r=t.trim?e.replace(/^0+(?=\d)/,``):e,i=parseFloat(r);if(Number.isNaN(i))return r;if(!t.clamp)return t.trim?zg(i,n):e;let a=i>2**53-1&&t.max!==void 0?t.max:de(i,t.min,t.max);return!t.trim&&a===i?e:zg(a,n)}function Vg(e,t){if(e===``||e===`-`)return e;let n=jg(e);return n===null?e:t.clampBehavior===`blur`?Ng(n,t.min,t.max):n}var Hg=Or(e=>{let t=X([`Input`,`InputWrapper`,`NumberInput`],Lg,e),{className:n,classNames:r,styles:i,unstyled:a,vars:o,onChange:s,onValueChange:c,value:l,defaultValue:u,max:d,min:f,step:p,hideControls:m,rightSection:h,isAllowed:g,clampBehavior:_,onBlur:v,allowDecimal:y,decimalScale:b,onKeyDown:x,onKeyDownCapture:S,handlersRef:w,startValue:T,disabled:E,rightSectionPointerEvents:D,allowNegative:O,readOnly:k,size:A,inputMode:j,rightSectionWidth:M,stepHoldInterval:N,stepHoldDelay:P,allowLeadingZeros:F,withKeyboardEvents:I,trimLeadingZeroesOnBlur:L,allowedDecimalSeparators:R,selectAllOnFocus:z,onMinReached:B,onMaxReached:V,onFocus:H,attributes:ee,ref:U,...W}=t,G=O??!0,ne=F??!0,K=Kn({name:`NumberInput`,classes:xg,props:t,classNames:r,styles:i,unstyled:a,attributes:ee,vars:o,varsResolver:Rg}),{resolvedClassNames:re,resolvedStyles:q}=jn({classNames:r,styles:i,props:t}),ie=(0,C.useRef)(Dg(l)||Dg(u)?`bigint`:`number`);Dg(l)?ie.current=`bigint`:typeof l==`number`&&(ie.current=`number`);let ae=ie.current===`bigint`,[oe,J]=rt({value:l,defaultValue:u,finalValue:``,onChange:s}),se=P!==void 0&&N!==void 0,ce=(0,C.useRef)(null),le=(0,C.useRef)(null),ue=(0,C.useRef)(0),fe=typeof f==`number`?f:void 0,pe=typeof d==`number`?d:void 0,me=typeof p==`number`?p:Lg.step,he=typeof T==`number`?T:Lg.startValue,ge=Mg(f),_e=Mg(d),ve=Mg(p)??BigInt(1),ye=Mg(T)??BigInt(0),be=e=>!kg(e,G)||ne&&Cg.test(e)?e:jg(e)??e,xe=e=>{let t=Number(e);return Number.isSafeInteger(t)?t:void 0},Se=(e,t)=>{t.source===`event`&&J(ae?be(e.value):Fg(e.floatValue,e.value)&&!Sg.test(e.value)&&!(ne&&Cg.test(e.value))&&!wg.test(e.value)&&!Tg.test(e.value)?e.floatValue:e.value),c?.(e,t)},Ce=e=>{let t=String(e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0},we=e=>{ce.current&&e!==void 0&&ce.current.setSelectionRange(e,e)},Te=(0,C.useRef)(te);Te.current=()=>{if(ae){if(!Ag(oe,G))return;let e,t=oe;if(typeof t==`bigint`){let n=t+ve;_e!==void 0&&n>_e&&V?.(),e=_e!==void 0&&n>_e?_e:n}else if(typeof t==`string`&&t!==``){let n=jg(t);if(n===null)return;let r=n+ve;_e!==void 0&&r>_e&&V?.(),e=_e!==void 0&&r>_e?_e:r}else e=Ng(ye,ge,_e);let n=e.toString();J(e),c?.({floatValue:xe(e),formattedValue:n,value:n},{source:`increment`}),setTimeout(()=>we(ce.current?.value.length),0);return}if(!Og(oe))return;let e,t=Ce(oe),n=Ce(me),r=Math.max(t,n),i=10**r;if(!Eg(oe)&&(typeof oe!=`number`||Number.isNaN(oe)))e=de(he,fe,pe);else if(pe!==void 0){let t=(Math.round(Number(oe)*i)+Math.round(me*i))/i;t>pe&&V?.(),e=t<=pe?t:pe}else e=(Math.round(Number(oe)*i)+Math.round(me*i))/i;let a=e.toFixed(r);J(parseFloat(a)),c?.({floatValue:parseFloat(a),formattedValue:a,value:a},{source:`increment`}),setTimeout(()=>we(ce.current?.value.length),0)};let Ee=(0,C.useRef)(te);Ee.current=()=>{if(ae){if(!Ag(oe,G))return;let e,t=ge===void 0?G?void 0:BigInt(0):ge,n=oe;if(typeof n==`bigint`){let r=n-ve;t!==void 0&&r<t&&B?.(),e=t!==void 0&&r<t?t:r}else if(typeof n==`string`&&n!==``){let r=jg(n);if(r===null)return;let i=r-ve;t!==void 0&&i<t&&B?.(),e=t!==void 0&&i<t?t:i}else e=Ng(ye,t,_e);let r=e.toString();J(e),c?.({floatValue:xe(e),formattedValue:r,value:r},{source:`decrement`}),setTimeout(()=>we(ce.current?.value.length),0);return}if(!Og(oe))return;let e,t=fe===void 0?G?-(2**53-1):0:fe,n=Ce(oe),r=Ce(me),i=Math.max(n,r),a=10**i;if(!Eg(oe)&&typeof oe!=`number`||Number.isNaN(oe))e=de(he,t,pe);else{let n=(Math.round(Number(oe)*a)-Math.round(me*a))/a;t!==void 0&&n<t&&B?.(),e=t!==void 0&&n<t?t:n}let o=e.toFixed(i);J(parseFloat(o)),c?.({floatValue:parseFloat(o),formattedValue:o,value:o},{source:`decrement`}),setTimeout(()=>we(ce.current?.value.length),0)};let De=e=>{let t=e.clipboardData.getData(`text`),n=W.decimalSeparator||`.`,r=yg(t,{decimalSeparator:n,thousandSeparator:W.thousandSeparator===!0?`,`:W.thousandSeparator===!1?void 0:W.thousandSeparator,allowedDecimalSeparators:R||[`.`,`,`],thousandsGroupStyle:W.thousandsGroupStyle});if(r!==t){e.preventDefault();let t=ce.current;if(t){let e=t.selectionStart??0,i=t.selectionEnd??0,a=t.value,o=a.substring(0,e)+r+a.substring(i);(Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(t,o),t.dispatchEvent(new Event(`change`,{bubbles:!0}));let s=e+r.length;setTimeout(()=>we(_g(o,s,t.value,n)),0)}}W.onPaste?.(e)},Oe=e=>{x?.(e),!k&&I&&(e.key===`ArrowUp`&&(e.preventDefault(),Te.current?.()),e.key===`ArrowDown`&&(e.preventDefault(),Ee.current?.()))},ke=e=>{if(S?.(e),e.key===`Backspace`){let t=ce.current;t&&t.selectionStart===0&&t.selectionStart===t.selectionEnd&&(e.preventDefault(),window.setTimeout(()=>we(0),0))}},Ae=e=>{z&&window.setTimeout(()=>ce.current?.select(),0),H?.(e)},je=e=>{let t=oe;ae?(_===`blur`&&typeof t==`bigint`&&(t=Ng(t,ge,_e)),L&&typeof t==`string`&&(t=Vg(t,{min:ge,max:_e,clampBehavior:_}))):typeof t==`number`?_===`blur`&&(t=de(t,fe,pe)):typeof t==`string`&&(t=Bg(t,{min:fe,max:pe,trim:!!L&&Ce(t)<15,clamp:_===`blur`})),oe!==t&&J(t),v?.(e)};et(w,{increment:Te.current,decrement:Ee.current});let Me=e=>{e?Te.current?.():Ee.current?.(),ue.current+=1},Ne=e=>{if(Me(e),se){let t=typeof N==`number`?N:N(ue.current);le.current=window.setTimeout(()=>Ne(e),t)}},Pe=(e,t)=>{e.preventDefault(),ce.current?.focus(),Me(t),se&&(le.current=window.setTimeout(()=>Ne(t),P))},Fe=()=>{le.current&&window.clearTimeout(le.current),le.current=null,ue.current=0},Ie=(0,Y.jsxs)(`div`,{...K(`controls`),children:[(0,Y.jsx)(ic,{...K(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof oe==`number`&&pe!==void 0&&oe>=pe||typeof oe==`bigint`&&_e!==void 0&&oe>=_e,mod:{direction:`up`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Pe(e,!0)},onPointerUp:Fe,onPointerLeave:Fe,children:(0,Y.jsx)(bg,{direction:`up`})}),(0,Y.jsx)(ic,{...K(`control`),tabIndex:-1,"aria-hidden":!0,disabled:E||typeof oe==`number`&&fe!==void 0&&oe<=fe||typeof oe==`bigint`&&ge!==void 0&&oe<=ge,mod:{direction:`down`},onMouseDown:e=>e.preventDefault(),onPointerDown:e=>{Pe(e,!1)},onPointerUp:Fe,onPointerLeave:Fe,children:(0,Y.jsx)(bg,{direction:`down`})})]});return(0,Y.jsx)(xd,{component:hg,allowNegative:O,className:At(xg.root,n),size:A,...W,inputMode:j??(ae?`numeric`:`decimal`),readOnly:k,disabled:E,value:typeof oe==`bigint`?oe.toString():oe,getInputRef:nt(U,ce),onValueChange:Se,rightSection:m||k||!(ae?Ag(oe,G):Og(oe))?h:h||Ie,classNames:re,styles:q,unstyled:a,__staticSelector:`NumberInput`,decimalScale:ae?0:y?b:0,onPaste:De,onFocus:Ae,onKeyDown:Oe,onKeyDownCapture:ke,rightSectionPointerEvents:D??(E?`none`:void 0),rightSectionWidth:M??`var(--ni-right-section-width-${A||`sm`})`,allowLeadingZeros:F,allowedDecimalSeparators:R,onBlur:je,attributes:ee,isAllowed:e=>{if(g&&!g(e))return!1;if(_!==`strict`)return!0;if(!ae)return Ig(e.floatValue,fe,pe);if(e.value===``||e.value===`-`)return!0;let t=jg(e.value);return t===null||(ge===void 0||t>=ge)&&(_e===void 0||t<=_e)}})});Hg.classes={...xd.classes,...xg},Hg.varsResolver=Rg,Hg.displayName=`@mantine/core/NumberInput`;var[Ug,Wg]=R(`Pagination.Root component was not found in tree`),Gg={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},Kg={withPadding:!0},qg=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=X(`PaginationControl`,Kg,e),d=Wg(),f=s||d.disabled;return(0,Y.jsx)(ic,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});qg.classes=Gg,qg.displayName=`@mantine/core/PaginationControl`;function Jg({style:e,children:t,path:n,...r}){return(0,Y.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,Y.jsx)(`path`,{d:n,fill:`currentColor`})})}var Yg=e=>(0,Y.jsx)(Jg,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),Xg=e=>(0,Y.jsx)(Jg,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),Zg=e=>(0,Y.jsx)(Jg,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),Qg=e=>(0,Y.jsx)(Jg,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),$g={icon:e=>(0,Y.jsx)(Jg,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},e_=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=X(`PaginationDots`,$g,e),c=Wg();return(0,Y.jsx)(Q,{...c.getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,Y.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});e_.classes=Gg,e_.displayName=`@mantine/core/PaginationDots`;function t_({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=X(t,i,e),s=Wg(),c=r===`next`?s.active===s.total:s.active===1;return(0,Y.jsx)(qg,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,Y.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,Er(a)}var n_=t_({icon:Yg,name:`PaginationNext`,action:`onNext`,type:`next`}),r_=t_({icon:Xg,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),i_=t_({icon:Zg,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),a_=t_({icon:Qg,name:`PaginationLast`,action:`onLast`,type:`next`});function o_({dotsIcon:e}){let t=Wg(),n=t.range.map((n,r)=>n===`dots`?(0,Y.jsx)(e_,{icon:e},r):(0,Y.jsx)(qg,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r));return(0,Y.jsx)(Y.Fragment,{children:n})}o_.displayName=`@mantine/core/PaginationItems`;var s_={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},c_=Z(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=X(`PaginationLabel`,s_,e),c=Wg();return(0,Y.jsx)(Q,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});c_.classes=Gg,c_.displayName=`@mantine/core/PaginationLabel`;var l_={siblings:1,boundaries:1},u_=Ot((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:q(n),"--pagination-control-size":K(t,`pagination-control-size`),"--pagination-control-fz":ie(t),"--pagination-active-bg":r?Kt(r,e):void 0,"--pagination-active-color":nn(i,e)?$t({color:r,theme:e,autoContrast:i}):void 0}})),d_=Z(e=>{let t=X(`PaginationRoot`,l_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=Kn({name:`Pagination`,classes:Gg,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:u_}),{range:k,setPage:A,next:j,previous:M,active:N,first:P,last:F}=ot({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,Y.jsx)(Ug,{value:{total:c,range:k,active:N,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:J(_,j),onPrevious:J(v,M),onFirst:J(y,P),onLast:J(b,F),getStyles:O},children:(0,Y.jsx)(Q,{...O(`root`),mod:[{layout:w},T],...D})})});d_.classes=Gg,d_.varsResolver=u_,d_.displayName=`@mantine/core/PaginationRoot`;var f_={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function p_({children:e}){let t=Wg();return(0,Y.jsx)(Q,{...t.getStyles(`items`),children:e})}var m_=Z(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=X(`Pagination`,f_,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(p_,{children:(0,Y.jsx)(o_,{dotsIcon:c})}),(0,Y.jsx)(c_,{formatLabel:m})]}):(0,Y.jsx)(o_,{dotsIcon:c}):null;return(0,Y.jsx)(d_,{total:l,layout:p,...h,children:(0,Y.jsxs)(wl,{gap:u,children:[t&&(0,Y.jsx)(i_,{icon:s,...r?.(`first`)}),n&&(0,Y.jsx)(r_,{icon:a,...r?.(`previous`)}),g,n&&(0,Y.jsx)(n_,{icon:i,...r?.(`next`)}),t&&(0,Y.jsx)(a_,{icon:o,...r?.(`last`)})]})})});m_.classes=Gg,m_.displayName=`@mantine/core/Pagination`,m_.Root=d_,m_.Control=qg,m_.Dots=e_,m_.First=i_,m_.Last=a_,m_.Next=n_,m_.Previous=r_,m_.Items=o_,m_.Label=c_;function h_({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,C.useState)(n),a=(0,C.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=Vs({placement:t,middleware:[Yo({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,C.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,C.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=Ri(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var g_={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},__={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:G(`popover`)},v_=Ot((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:q(t),"--tooltip-bg":n?Kt(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),y_=Z(e=>{let t=X(`TooltipFloating`,__,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:w,...T}=t,E=kn(),D=Kn({name:`TooltipFloating`,props:t,classes:g_,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:v_}),{handleMouseMove:O,x:k,y:A,opened:j,boundaryRef:M,floating:N,setOpened:P}=h_({offset:p,position:m,defaultOpened:v}),F=Dt(n);if(!F)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let I=nt(M,St(F),w),L=F.props,R=e=>{L.onMouseEnter?.(e),O(e),P(!0)},z=e=>{L.onMouseLeave?.(e),P(!1)};return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Oc,{...x,withinPortal:i,children:(0,Y.jsx)(Q,{...T,...D(`tooltip`,{style:{...wr(a,E),zIndex:g,display:!_&&j?`block`:`none`,top:Number.isFinite(A)?Math.round(A):``,left:Number.isFinite(k)?Math.round(k):``}}),variant:y,ref:N,mod:{multiline:h},children:f})}),(0,C.cloneElement)(F,{...L,[r]:I,onMouseEnter:R,onMouseLeave:z})]})});y_.classes=g_,y_.varsResolver=v_,y_.displayName=`@mantine/core/TooltipFloating`;var b_=(0,C.createContext)({withinGroup:!1}),x_={openDelay:0,closeDelay:0};function S_(e){let{openDelay:t,closeDelay:n,children:r}=X(`TooltipGroup`,x_,e);return(0,Y.jsx)(b_,{value:{withinGroup:!0},children:(0,Y.jsx)(Ms,{delay:{open:t,close:n},children:r})})}S_.displayName=`@mantine/core/TooltipGroup`,S_.extend=e=>e;function C_(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function w_(e){let t=C_(e.middlewares),n=[Jo(e.offset),$o()];return t.shift&&n.push(Yo(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?Zo():Zo(t.flip)),n.push(ts({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?es():es(t.inline)):e.inline&&n.push(es()),n}function T_(e){let[t,n]=(0,C.useState)(e.defaultOpened),r=typeof e.opened==`boolean`,i=!e.disabled&&(r?e.opened:t);(0,C.useEffect)(()=>{e.disabled&&n(!1)},[e.disabled]);let a=(0,C.use)(b_).withinGroup,o=Qe(),s=pn(),c=(0,C.useCallback)(e=>{n(e),e&&y(o)},[o]),{x:l,y:u,context:d,refs:f,placement:p,middlewareData:{arrow:{x:m,y:h}={},hide:g}}=Vs({strategy:e.strategy,placement:e.position,open:i,onOpenChange:c,middleware:w_(e),whileElementsMounted:jo}),{delay:_,currentId:v,setCurrentId:y}=Ns(d,{id:o}),{getReferenceProps:b,getFloatingProps:x}=Gs([Os(d,{enabled:!e.disabled&&e.events?.hover,delay:a?_:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?Zs():null}),Us(d,{enabled:!e.disabled&&e.events?.focus,visibleOnly:!0}),qs(d,{role:`tooltip`}),zs(d,{enabled:e.opened===void 0})]),S=(0,C.useRef)(p);Ce(()=>{S.current!==p&&(S.current=p,e.onPositionChange?.(p))},[p]);let w=i&&v&&v!==o;return{x:l,y:u,arrowX:m,arrowY:h,reference:f.setReference,floating:f.setFloating,getFloatingProps:x,getReferenceProps:b,isGroupPhase:w,opened:i,placement:p,referenceHidden:e.hideDetached&&s!==`test`?g?.referenceHidden:!1}}var E_={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:G(`popover`),middlewares:{flip:!0,shift:!0,inline:!1},hideDetached:!0},D_=Ot((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:q(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),O_=Z(e=>{let t=X(`Tooltip`,E_,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,offset:T,transitionProps:E,multiline:D,events:O,interactive:k,zIndex:A,disabled:j,onClick:M,onMouseEnter:N,onMouseLeave:P,inline:F,variant:I,keepMounted:L,vars:R,portalProps:z,mod:B,floatingStrategy:V,middlewares:H,autoContrast:ee,attributes:U,target:W,hideDetached:G,ref:te,...ne}=t,{dir:K}=Lr(),re=(0,C.useRef)(null),q=T_({position:_c(K,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,disabled:j,events:O,interactive:k,arrowRef:re,arrowOffset:x,offset:typeof T==`number`?T+(y?b/2:0):T,inline:F,strategy:V,middlewares:H,hideDetached:G});(0,C.useEffect)(()=>{let e=W instanceof HTMLElement?W:typeof W==`string`?document.querySelector(W):W?.current||null;e&&q.reference(e)},[W,q]);let ie=Kn({name:`Tooltip`,props:t,classes:g_,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:U,rootSelector:`tooltip`,vars:R,varsResolver:D_}),ae=Dt(n);if(!W&&!ae)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let oe=ie(`tooltip`),J=k&&!j&&!!q.opened,se=w===`merge`&&y?hc({position:q.placement,dir:K}):void 0;if(W){let e=Ic(E,{duration:100,transition:`fade`});return(0,Y.jsx)(Y.Fragment,{children:(0,Y.jsx)(Oc,{...z,withinPortal:d,children:(0,Y.jsx)(Pc,{...e,keepMounted:L,mounted:!j&&!!q.opened,duration:q.isGroupPhase?10:e.duration,children:e=>(0,Y.jsxs)(Q,{...ne,"data-fixed":V===`fixed`||void 0,variant:I,mod:[{multiline:D,interactive:J},B],...oe,...q.getFloatingProps({ref:q.floating,className:oe.className,style:{...oe.style,...e,...se,zIndex:A,top:q.y??0,left:q.x??0,...q.referenceHidden?{display:`none`}:null}}),children:[a,(0,Y.jsx)(gc,{ref:re,arrowX:q.arrowX,arrowY:q.arrowY,visible:y,position:q.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,...ie(`arrow`)})]})})})})}let ce=ae.props,le=nt(q.reference,St(ae),te),ue=Ic(E,{duration:100,transition:`fade`});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Oc,{...z,withinPortal:d,children:(0,Y.jsx)(Pc,{...ue,keepMounted:L,mounted:!j&&!!q.opened,duration:q.isGroupPhase?10:ue.duration,children:e=>(0,Y.jsxs)(Q,{...ne,"data-fixed":V===`fixed`||void 0,variant:I,mod:[{multiline:D,interactive:J},B],...q.getFloatingProps({ref:q.floating,className:ie(`tooltip`).className,style:{...ie(`tooltip`).style,...e,...se,zIndex:A,top:q.y??0,left:q.x??0,...q.referenceHidden?{display:`none`}:null}}),children:[a,(0,Y.jsx)(gc,{ref:re,arrowX:q.arrowX,arrowY:q.arrowY,visible:y,position:q.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:w,...ie(`arrow`)})]})})}),(0,C.cloneElement)(ae,q.getReferenceProps({onClick:M,onMouseEnter:N,onMouseLeave:P,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...ce,className:At(v,ce.className),[i]:le}))]})});O_.classes=g_,O_.varsResolver=D_,O_.displayName=`@mantine/core/Tooltip`,O_.Floating=y_,O_.Group=S_;var k_={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},A_={withItemsBorders:!0},j_=Ot((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:q(t),"--sc-color":n?Kt(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":K(i,`sc-padding`),"--sc-font-size":ie(i)}})),M_=Or(e=>{let t=X(`SegmentedControl`,A_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:w,withItemsBorders:T,mod:E,attributes:D,ref:O,...k}=t,A=Kn({name:`SegmentedControl`,props:t,classes:k_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:D,vars:s,varsResolver:j_}),j=kn(),M=c.map(e=>Ct(e)?{label:`${e}`,value:e}:e),N=mt(),[P,F]=(0,C.useState)(0),[I,L]=(0,C.useState)(null),[R,z]=(0,C.useState)({}),B=(e,t)=>{e!==null&&R[t]!==e&&(R[t]=e,z({...R}))},[V,H]=rt({value:l,defaultValue:u,finalValue:Array.isArray(c)?M.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ee=Qe(p),U=M.map(e=>`${e.value}`),W=M.map(e=>(0,C.createElement)(Q,{...A(`control`),mod:{active:V===e.value,orientation:_},key:`${e.value}`},(0,C.createElement)(`input`,{...A(`input`),disabled:m||e.disabled,type:`radio`,name:ee,value:`${e.value}`,id:`${ee}-${e.value}`,checked:V===e.value,onChange:()=>!h&&H(e.value),"data-focus-ring":j.focusRing,key:`${e.value}-input`}),(0,C.createElement)(Q,{component:`label`,...A(`label`),mod:{active:V===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ee}-${e.value}`,ref:t=>B(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:$t({color:y,theme:j,autoContrast:w})},key:`${e.value}-label`},(0,Y.jsx)(`span`,{...A(`innerLabel`),children:e.label})))),G=nt(O,L);return ut(()=>{F(e=>e+1)},[c.length]),ut(()=>{z(e=>{let t={};return U.forEach(n=>{n in e&&(t[n]=e[n])}),Object.keys(t).length===Object.keys(e).length?e:t})},[U]),c.length===0?null:(0,Y.jsxs)(Q,{...A(`root`),variant:S,size:f,ref:G,mod:[{"full-width":g,orientation:_,initialized:N,"with-items-borders":T},E],...k,role:`radiogroup`,"data-disabled":m,children:[V!==void 0&&(0,Y.jsx)(Ed,{target:R[`${V}`],parent:I,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...A(`indicator`)},P),W]})});M_.classes=k_,M_.varsResolver=j_,M_.displayName=`@mantine/core/SegmentedControl`;var N_={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},P_=Or(e=>{let t=X([`Input`,`InputWrapper`,`Select`],N_,e),{classNames:n,styles:r,unstyled:i,vars:a,dropdownOpened:o,defaultDropdownOpened:s,onDropdownClose:c,onDropdownOpen:l,onFocus:u,onBlur:d,onClick:f,onChange:p,data:m,value:h,defaultValue:g,selectFirstOptionOnChange:_,selectFirstOptionOnDropdownOpen:v,onOptionSubmit:y,comboboxProps:b,readOnly:x,disabled:S,filter:w,limit:T,withScrollArea:E,maxDropdownHeight:D,floatingHeight:O,size:k,searchable:A,rightSection:j,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:P,nothingFoundMessage:F,name:I,form:L,searchValue:R,defaultSearchValue:z,onSearchChange:B,allowDeselect:V,error:H,rightSectionPointerEvents:ee,id:U,clearable:W,clearSectionMode:G,clearButtonProps:te,hiddenInputProps:ne,renderOption:K,onClear:re,autoComplete:q,scrollAreaProps:ie,__defaultRightSection:ae,__clearSection:oe,__clearable:J,chevronColor:se,autoSelectOnBlur:ce,openOnFocus:le,attributes:ue,...de}=t,fe=(0,C.useMemo)(()=>Bd(m),[m]),pe=(0,C.useRef)({}),me=(0,C.useMemo)(()=>Vd(fe),[fe]),he=Qe(U),ge=$f({id:he,label:de.label,labelProps:de.labelProps,inputWrapperOrder:de.inputWrapperOrder}),[_e,ve,ye]=rt({value:h,defaultValue:g,finalValue:null,onChange:p}),be=_e==null?void 0:`${_e}`in me?me[`${_e}`]:pe.current[`${_e}`],xe=ft(be),[Se,Ce,we]=rt({value:R,defaultValue:z,finalValue:be?be.label:``,onChange:B}),Te=gf({opened:o,defaultOpened:s,onDropdownOpen:()=>{l?.(),v?Te.selectFirstOption():Te.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{c?.(),setTimeout(Te.resetSelectedOption,0)}}),Ee=e=>{Ce(e),Te.resetSelectedOption()},{resolvedClassNames:De,resolvedStyles:Oe}=jn({props:t,styles:r,classNames:n});(0,C.useEffect)(()=>{_&&Te.selectFirstOption()},[_,Se]),(0,C.useEffect)(()=>{h===null&&Ee(``),h!=null&&be&&(xe?.value!==be.value||xe?.label!==be.label)&&Ee(be.label)},[h,be]),(0,C.useEffect)(()=>{!ye&&!we&&Ee(_e==null?``:`${_e}`in me?me[`${_e}`]?.label:pe.current[`${_e}`]?.label||``)},[me,_e]),(0,C.useEffect)(()=>{_e&&`${_e}`in me&&(pe.current[`${_e}`]=me[`${_e}`])},[me,_e]);let ke=(0,Y.jsx)(yf.ClearButton,{...te,onClear:()=>{ve(null,null),Ee(``),re?.()}}),Ae=W&&_e!=null&&!S&&!x;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(yf,{store:Te,__staticSelector:`Select`,classNames:De,styles:Oe,unstyled:i,readOnly:x,size:k,attributes:ue,floatingHeight:O,keepMounted:ce,onOptionSubmit:e=>{y?.(e);let t=V&&`${me[e].value}`==`${_e}`?null:me[e],n=t?t.value:null;n!==_e&&ve(n,t),!ye&&Ee(n==null?``:t?.label||``),Te.closeDropdown()},...b,children:[(0,Y.jsx)(yf.Target,{targetType:A?`input`:`button`,autoComplete:q,withExpandedAttribute:!0,children:(0,Y.jsx)(xd,{id:he,__defaultRightSection:(0,Y.jsx)(yf.Chevron,{size:k,error:H,unstyled:i,color:se}),__clearSection:ke,__clearable:Ae,__clearSectionMode:G,rightSection:j,rightSectionPointerEvents:ee||`none`,...de,size:k,__staticSelector:`Select`,disabled:S,readOnly:x||!A,value:Se,onChange:e=>{if(yp(e)){if(!x){let t=xh(me,e.currentTarget.value);t&&`${t.value}`!=`${_e}`&&(ve(t.value,t),!ye&&Ee(t.label))}}else Ee(e.currentTarget.value),Te.openDropdown(),_&&Te.selectFirstOption()},onFocus:e=>{le&&A&&Te.openDropdown(),u?.(e)},onBlur:e=>{ce&&Te.clickSelectedOption(),Te.closeDropdown();let t=_e!=null&&(`${_e}`in me?me[`${_e}`]:pe.current[`${_e}`]);Ee(t&&t.label||``),d?.(e)},onClick:e=>{A?Te.openDropdown():Te.toggleDropdown(),f?.(e)},classNames:De,styles:Oe,unstyled:i,pointer:!A,error:H,attributes:ue})}),(0,Y.jsx)(Jf,{data:fe,hidden:x||S,filter:w,search:Se,limit:T,hiddenWhenEmpty:!F,withScrollArea:E,maxDropdownHeight:D,filterOptions:!!A&&be?.label!==Se,value:_e,checkIconPosition:M,withCheckIcon:N,withAlignedLabels:P,nothingFoundMessage:F,unstyled:i,labelId:ge,"aria-label":ge?void 0:de[`aria-label`],renderOption:K,scrollAreaProps:ie})]}),(0,Y.jsx)(yf.HiddenInput,{value:_e,name:I,form:L,disabled:S,...ne})]})});P_.classes={...xd.classes,...yf.classes},P_.displayName=`@mantine/core/Select`;var F_={root:`m_6d731127`},I_={gap:`md`,align:`stretch`,justify:`flex-start`},L_=Ot((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":re(t),"--stack-align":n,"--stack-justify":r}})),R_=Z(e=>{let t=X(`Stack`,I_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t,m=Kn({name:`Stack`,props:t,classes:F_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:L_});return(0,Y.jsx)(Q,{...m(`root`),variant:d,...p})});R_.classes=F_,R_.varsResolver=L_,R_.displayName=`@mantine/core/Stack`;var z_=(0,C.createContext)(null),B_={hiddenInputValuesSeparator:`,`},V_=Or((e=>{let{value:t,defaultValue:n,onChange:r,size:i,wrapperProps:a,children:o,readOnly:s,name:c,hiddenInputValuesSeparator:l,hiddenInputProps:u,maxSelectedValues:d,disabled:f,...p}=X(`SwitchGroup`,B_,e),[m,h]=rt({value:t,defaultValue:n,finalValue:[],onChange:r}),g=e=>{let t=e.currentTarget.value;if(s)return;let n=m.includes(t);!n&&d&&m.length>=d||h(n?m.filter(e=>e!==t):[...m,t])},_=e=>{if(f)return!0;if(!d)return!1;let t=m.includes(e),n=m.length>=d;return!t&&n},v=m.join(l);return(0,Y.jsx)(z_,{value:{value:m,onChange:g,size:i,isDisabled:_},children:(0,Y.jsxs)(vd.Wrapper,{size:i,...a,...p,labelElement:`div`,__staticSelector:`SwitchGroup`,children:[(0,Y.jsx)(bf,{role:`group`,children:o}),(0,Y.jsx)(`input`,{type:`hidden`,name:c,value:v,...u})]})})}));V_.classes=vd.Wrapper.classes,V_.displayName=`@mantine/core/SwitchGroup`;var H_={root:`m_5f93f3bb`,input:`m_926b4011`,track:`m_9307d992`,thumb:`m_93039a1d`,trackLabel:`m_8277e082`},U_={labelPosition:`right`,withThumbIndicator:!0},W_=Ot((e,{radius:t,color:n,size:r})=>({root:{"--switch-radius":t===void 0?void 0:q(t),"--switch-height":K(r,`switch-height`),"--switch-width":K(r,`switch-width`),"--switch-thumb-size":K(r,`switch-thumb-size`),"--switch-label-font-size":K(r,`switch-label-font-size`),"--switch-track-label-padding":K(r,`switch-track-label-padding`),"--switch-color":n?Kt(n,e):void 0}})),G_=Z(e=>{let t=X(`Switch`,U_,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,color:c,label:l,offLabel:u,onLabel:d,id:f,size:p,radius:m,wrapperProps:h,thumbIcon:g,checked:_,defaultChecked:v,onChange:y,labelPosition:b,description:x,error:S,disabled:w,variant:T,rootRef:E,mod:D,withThumbIndicator:O,attributes:k,...A}=t,j=(0,C.use)(z_),M=p||j?.size,N=Kn({name:`Switch`,props:t,classes:H_,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:k,vars:s,varsResolver:W_}),{styleProps:P,rest:F}=er(A),I=Qe(f),L=[x?`${I}-description`:void 0,S&&typeof S!=`boolean`?`${I}-error`:void 0,F[`aria-describedby`]].filter(Boolean).join(` `)||void 0,R={checked:j?.value.includes(F.value)??_,onChange:e=>{j?.onChange(e),y?.(e)}},z=w||j?.isDisabled?.(F.value),[B,V]=rt({value:R.checked??_,defaultValue:v,finalValue:!1});return(0,Y.jsxs)(Lf,{...N(`root`),__staticSelector:`Switch`,__stylesApiProps:t,id:I,size:M,labelPosition:b,label:l,description:x,error:S,disabled:z,bodyElement:`label`,labelElement:`span`,classNames:n,styles:a,unstyled:o,"data-checked":R.checked,variant:T,ref:E,mod:D,attributes:k,inert:F.inert,...P,...h,children:[(0,Y.jsx)(`input`,{...F,...R,disabled:z,checked:B,"data-checked":R.checked,onChange:e=>{F.readOnly||(R.onChange?.(e),V(e.currentTarget.checked))},id:I,type:`checkbox`,role:`switch`,inert:F.inert,"aria-describedby":L,...N(`input`)}),(0,Y.jsxs)(Q,{"aria-hidden":`true`,component:`span`,mod:{error:S,"label-position":b,"without-labels":!d&&!u},...N(`track`),children:[(0,Y.jsx)(Q,{component:`span`,mod:{"reduce-motion":!0,"with-thumb-indicator":O&&!g},...N(`thumb`),children:g}),(0,Y.jsx)(`span`,{...N(`trackLabel`),children:B?d:u})]})]})});G_.classes={...H_,...If},G_.varsResolver=W_,G_.displayName=`@mantine/core/Switch`,G_.Group=V_;var[K_,q_]=R(`Table component was not found in the tree`),J_={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function Y_(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function X_(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=Z(r=>{let i=X(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=q_();return(0,Y.jsx)(Q,{component:e,...Y_(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=J_,r}var Z_=X_(`th`,{columnBorder:!0}),Q_=X_(`td`,{columnBorder:!0}),$_=X_(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),ev=X_(`thead`,{stickyHeader:!0}),tv=X_(`tbody`),nv=X_(`tfoot`),rv=X_(`caption`,{captionSide:!0}),iv={type:`scrollarea`},av=Ot((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":N(t),"--table-max-height":N(n),"--table-overflow":r===`native`?`auto`:void 0}})),ov=Z(e=>{let t=X(`TableScrollContainer`,iv,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=Kn({name:`TableScrollContainer`,classes:J_,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:av,rootSelector:`scrollContainer`});return(0,Y.jsx)(Q,{component:d===`scrollarea`?ec:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,Y.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});ov.classes=J_,ov.varsResolver=av,ov.displayName=`@mantine/core/TableScrollContainer`;function sv({data:e}){return(0,Y.jsxs)(Y.Fragment,{children:[e.caption&&(0,Y.jsx)(rv,{children:e.caption}),e.head&&(0,Y.jsx)(ev,{children:(0,Y.jsx)($_,{children:e.head.map((e,t)=>(0,Y.jsx)(Z_,{children:e},t))})}),e.body&&(0,Y.jsx)(tv,{children:e.body.map((e,t)=>(0,Y.jsx)($_,{children:e.map((e,t)=>(0,Y.jsx)(Q_,{children:e},t))},t))}),e.foot&&(0,Y.jsx)(nv,{children:(0,Y.jsx)($_,{children:e.foot.map((e,t)=>(0,Y.jsx)(Z_,{children:e},t))})})]})}sv.displayName=`@mantine/core/TableDataRenderer`;var cv={withRowBorders:!0,verticalSpacing:7},lv=Ot((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":re(r),"--table-vertical-spacing":re(i),"--table-border-color":a?Kt(a,e):void 0,"--table-striped-color":c&&o?Kt(o,e):void 0,"--table-highlight-on-hover-color":l&&s?Kt(s,e):void 0,"--table-sticky-header-offset":d?N(u):void 0}})),uv=Z(e=>{let t=X(`Table`,cv,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:w,mod:T,tabularNums:E,attributes:D,...O}=t,k=Kn({name:`Table`,props:t,className:r,style:i,classes:J_,classNames:n,styles:a,unstyled:o,attributes:D,rootSelector:`table`,vars:s,varsResolver:lv,stable:!0}),A=p===!0?`odd`:p||void 0,j=u||`bottom`,M=(0,C.useMemo)(()=>({getStyles:k,stickyHeader:S,striped:A,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:j}),[k,S,A,m,h,g,j]);return(0,Y.jsx)(K_,{value:M,children:(0,Y.jsx)(Q,{component:`table`,mod:[{withTableBorder:_,tabularNums:E},T],...k(`table`),...O,children:x||!!b&&(0,Y.jsx)(sv,{data:b})})})});uv.classes=J_,uv.varsResolver=lv,uv.displayName=`@mantine/core/Table`,uv.Td=Q_,uv.Th=Z_,uv.Tr=$_,uv.Thead=ev,uv.Tbody=tv,uv.Tfoot=nv,uv.Caption=rv,uv.ScrollContainer=ov,uv.DataRenderer=sv;var[dv,fv]=R(`Tabs component was not found in the tree`),pv={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},mv=Z(e=>{let t=X(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=fv();return(0,Y.jsx)(Q,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});mv.classes=pv,mv.displayName=`@mantine/core/TabsList`;var hv=Z(e=>{let t=X(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=pn(),f=fv();(0,C.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,Y.jsx)(C.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,Y.jsx)(Q,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});hv.classes=pv,hv.displayName=`@mantine/core/TabsPanel`;var gv=Z(e=>{let t=X(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=kn(),{dir:y}=Lr(),b=fv(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,Y.jsxs)(ic,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?Kt(u,v):void 0},onKeyDown:U({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,Y.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,Y.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,Y.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});gv.classes=pv,gv.displayName=`@mantine/core/TabsTab`;var _v=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,vv={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},yv=Ot((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":q(t),"--tabs-color":Kt(n,e),"--tabs-text-color":nn(r,e)?$t({color:n,theme:e,autoContrast:r}):void 0}})),bv=Z(e=>{let t=X(`Tabs`,vv,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:w,autoContrast:T,mod:E,attributes:D,...O}=t,k=Qe(c),A=(0,C.useRef)(new Set),j=Ze(),M=(0,C.useCallback)((e,t)=>{let n=A.current;t&&!n.has(e)?(n.add(e),j()):!t&&n.has(e)&&(n.delete(e),j())},[]),[N,P]=rt({value:r,defaultValue:n,finalValue:null,onChange:i}),F=Kn({name:`Tabs`,props:t,classes:pv,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:D,vars:w,varsResolver:yv});return(0,Y.jsx)(dv,{value:{placement:h,value:N,orientation:a,id:k,loop:s,activateTabWithKeyboard:l,getTabId:z(`${k}-tab`,_v),getPanelId:z(`${k}-panel`,_v),onChange:P,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:F,mountedPanels:A,setMountedPanel:M},children:(0,Y.jsx)(Q,{id:k,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},E],...F(`root`),...O,children:o})})});bv.classes=pv,bv.varsResolver=yv,bv.displayName=`@mantine/core/Tabs`,bv.Tab=gv,bv.Panel=hv,bv.List=mv;var xv=Z(e=>{let t=X([`Input`,`InputWrapper`,`TextInput`],null,e);return(0,Y.jsx)(xd,{component:`input`,...t,__staticSelector:`TextInput`})});xv.classes=xd.classes,xv.displayName=`@mantine/core/TextInput`;var Sv={root:`m_7341320d`},Cv=Ot((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":K(t,`ti-size`),"--ti-radius":n===void 0?void 0:q(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),wv=Z(e=>{let t=X(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t,d=Kn({name:`ThemeIcon`,classes:Sv,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:Cv});return(0,Y.jsx)(Q,{...d(`root`),...u})});wv.classes=Sv,wv.varsResolver=Cv,wv.displayName=`@mantine/core/ThemeIcon`;var Tv=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],Ev=[`xs`,`sm`,`md`,`lg`,`xl`];function Dv(e,t){let n=t===void 0?`h${e}`:t;return Tv.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:Ev.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:N(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var Ov={root:`m_8a5d1357`},kv={order:1},Av=Ot((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=Dv(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),jv=Z(e=>{let t=X(`Title`,kv,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=Kn({name:`Title`,props:t,classes:Ov,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:Av});return[1,2,3,4,5,6].includes(s)?(0,Y.jsx)(Q,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,lineClamp:typeof d==`number`},p],size:l,...h}):null});jv.classes=Ov,jv.varsResolver=Av,jv.displayName=`@mantine/core/Title`;var Mv={root:`m_d08caa0`},Nv=Z(e=>{let t=X(`Typography`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,attributes:s,...c}=t,l=Kn({name:`Typography`,classes:Mv,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:s});return(0,Y.jsx)(Q,{...l(`root`),...c})});Nv.classes=Mv,Nv.displayName=`@mantine/core/Typography`;var Pv=4001,Fv=4003,Iv=4004,Lv=4005,Rv=4006,zv=4007,Bv={PARSE_ERROR:-32700,INVALID_REQUEST:-32600,METHOD_NOT_FOUND:-32601,INVALID_PARAMS:-32602,INTERNAL_ERROR:-32603},Vv={DEFAULT:-32e3,MIN:-32099,MAX:-32e3};function Hv(e){return typeof e==`string`||typeof e==`number`}function Uv(e){if(typeof e!=`object`||!e)return!1;let t=e;return Number.isInteger(t.code)&&typeof t.message==`string`}function Wv(e){if(typeof e!=`object`||!e)return`invalid`;let t=e;if(t.jsonrpc!==`2.0`)return`invalid`;let n=t.id,r=t.method;if(r!==void 0)return typeof r==`string`?n===void 0?`notification`:Hv(n)?`request`:`invalid`:`invalid`;if(!Hv(n))return`invalid`;let i=`result`in t,a=t.error;return a===void 0?i?`response`:`invalid`:i?`invalid`:Uv(a)?`response`:`invalid`}function Gv(e,t,n){return{jsonrpc:`2.0`,id:e,method:t,params:n}}function Kv(e,t){return{jsonrpc:`2.0`,method:e,params:t}}function qv(e,t){return{jsonrpc:`2.0`,id:e,result:t===void 0?null:t}}function Jv(e,t,n,r){return{jsonrpc:`2.0`,id:e,error:r===void 0?{code:t,message:n}:{code:t,message:n,data:r}}}function Yv(e){return{level:Zv(e.reason),title:`Temps réel`,message:Xv(e),source:`realtime`,ts:Date.now()}}function Xv(e){switch(e.reason){case`unknown`:return`Canal « ${e.channel} » inconnu du serveur : personne ne le produit (nom exact ? module chargé ?)`;case`limit`:return`Canal « ${e.channel} » non ouvert : trop d'abonnements sur cette connexion`;case`unavailable`:return`Canal « ${e.channel} » momentanément indisponible : nouvel essai automatique`;case`forbidden`:return`Accès au canal « ${e.channel} » refusé`}}function Zv(e){switch(e){case`unknown`:case`unavailable`:return`warning`;case`limit`:case`forbidden`:return`error`}}function Qv(e,t){if(e===1e3||e===1001)return null;let n=`warning`,r;switch(e){case 1002:n=`error`,r=`Erreur de protocole temps réel`;break;case 1003:n=`error`,r=`Données temps réel non supportées`;break;case 1006:r=`Connexion temps réel perdue`;break;case 1007:n=`error`,r=`Trame temps réel invalide`;break;case 1008:n=`error`,r=`Accès temps réel refusé`;break;case 1009:r=`Message temps réel trop volumineux`;break;case 1010:n=`error`,r=`Extension temps réel requise manquante`;break;case 1011:n=`error`,r=`Erreur serveur temps réel`;break;case Pv:n=`error`,r=`Session temps réel refusée ou révoquée`;break;case Fv:n=`error`,r=`Origine refusée par le serveur temps réel`;break;case Iv:n=`error`,r=`Ressource temps réel introuvable`;break;case Rv:n=`error`,r=`Votre jeton a expiré — reconnectez-vous avec un jeton neuf`;break;case zv:n=`warning`,r=`File d'envoi saturée — reconnexion temps réel`;break;case Lv:n=`info`,r=`Droits mis à jour — reconnexion temps réel`;break;case void 0:default:r=typeof e==`number`?`Connexion temps réel fermée (code ${e})`:`Connexion temps réel fermée`}let i=t?.trim();return{level:n,title:`Temps réel`,message:i?`${r} : ${i}`:r,source:`realtime`,code:e,ts:Date.now()}}var $v=new Set([1e3,1002,1003,1007,1008,1010,Pv,Fv,Iv,Rv]);function ey(e){return e===void 0||!$v.has(e)}function ty(e){return e<400||e>=500?!1:e!==426&&e!==408&&e!==429}function ny(e){let t;switch(e){case 401:t=`Accès temps réel refusé : connexion requise`;break;case 403:t=`Accès temps réel refusé`;break;case 404:t=`Ressource temps réel introuvable`;break;default:t=`Connexion temps réel refusée (HTTP ${e})`}return{level:`error`,title:`Temps réel`,message:t,source:`realtime`,code:e,ts:Date.now()}}function ry(e,t){return{level:`warning`,title:`Temps réel`,message:e===`binary`?`Trame binaire écartée : en JSON-RPC texte elle n'a pas de canal — onBinary() pour un protocole propre, option codec (nodefony/cbor) pour des octets par canal`:`Trame illisible écartée : elle ne se décode pas en ${t} (pair défaillant ?)`,source:`realtime`,code:Bv.PARSE_ERROR,ts:Date.now()}}function iy(e){return{level:`error`,title:`Temps réel`,message:`Codec « ${e} » annoncé sans avoir été offert : la connexion reste en JSON-RPC texte`,source:`realtime`,code:Bv.PARSE_ERROR,ts:Date.now()}}function ay(e){return{level:`warning`,title:`Temps réel`,message:`Flux binaire brut indisponible sous ${e} : publier les octets sur un canal ; onBinary() et sendBinary() servent les connexions texte`,source:`realtime`,ts:Date.now()}}function oy(){let e=Reflect.get(globalThis,`crypto`);if(typeof e==`object`&&e){let t=Reflect.get(e,`randomUUID`);if(typeof t==`function`){let n=Reflect.apply(t,e,[]);if(typeof n==`string`)return n}}return`idem-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}var sy=/\{([^{}/]+)\}/gu;function cy(e,t){let n=typeof t==`object`&&t?t:void 0;return e.replace(sy,(t,r)=>{let i=n===void 0?void 0:Reflect.get(n,r);if(typeof i!=`string`&&typeof i!=`number`)throw TypeError(`paramètre de chemin « ${r} » manquant pour ${e}`);let a=String(i);if(a===``||a===`.`||a===`..`)throw TypeError(`paramètre de chemin « ${r} » invalide (« ${a} ») : un segment ne peut être vide, « . » ni « .. »`);return encodeURIComponent(a)})}var ly=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,uy=new Uint8Array(64),dy=new Int8Array(128).fill(-1);for(let e=0;e<64;e++){let t=ly.charCodeAt(e);uy[e]=t,dy[t]=e}var fy=new TextDecoder;function py(e){return uy[e&63]??0}function my(e){let t=e.length,n=new Uint8Array(Math.ceil(t*4/3)),r=0,i=0;for(;i+2<t;i+=3){let t=(e[i]??0)<<16|(e[i+1]??0)<<8|(e[i+2]??0);n[r++]=py(t>>>18),n[r++]=py(t>>>12),n[r++]=py(t>>>6),n[r++]=py(t)}let a=t-i;if(a>0){let t=(e[i]??0)<<16|(a===2?(e[i+1]??0)<<8:0);n[r++]=py(t>>>18),n[r++]=py(t>>>12),a===2&&(n[r]=py(t>>>6))}return fy.decode(n)}function hy(e){let t=e.length;if(t%4==1)throw gy(t);let n=new Uint8Array(Math.floor(t*3/4)),r=0,i=0,a=0;for(let o=0;o<t;o++){let t=e.charCodeAt(o),s=t<128?dy[t]??-1:-1;if(s<0)throw gy(o);i=(i<<6|s)&16777215,a+=6,a>=8&&(a-=8,n[r++]=i>>>a&255)}if(i&(1<<a)-1)throw gy(t-1);return n}function gy(e){return TypeError(`base64url invalide (position ${e})`)}function _y(e){return ArrayBuffer.isView(e)?!(e instanceof Uint8Array):e instanceof ArrayBuffer||typeof SharedArrayBuffer==`function`&&e instanceof SharedArrayBuffer}function vy(e){let t=Object.prototype.toString.call(e).slice(8,-1);return`Impossible d'encoder un ${t} : seul un Uint8Array voyage en octets — `+yy(t)}function yy(e){switch(e){case`Float64Array`:case`Float32Array`:case`Uint32Array`:case`Int32Array`:case`Uint16Array`:case`Int16Array`:return`publier toLittleEndianBytes(x), relire fromLittleEndianBytes(reçu, ${e}) — exportées par « nodefony » et « nodefony/client »`;case`ArrayBuffer`:case`SharedArrayBuffer`:return`publier new Uint8Array(x), relire reçu.slice().buffer`;case`DataView`:case`Int8Array`:case`Uint8ClampedArray`:return`publier new Uint8Array(x.buffer, x.byteOffset, x.byteLength), relire new ${e}(reçu.buffer, reçu.byteOffset, reçu.byteLength)`;default:return`publier new Uint8Array(x.buffer, x.byteOffset, x.byteLength), relire new ${e}(reçu.slice().buffer)`}}var by=`nodefony.jsonrpc.v1`,xy=`$bytes`,Sy=`x-nodefony-bytes`,Cy=64;function wy(e){return typeof e==`object`&&!!e}function Ty(e,t,n){if(e instanceof Uint8Array)return!0;if(t>=Cy)return!1;if(Array.isArray(e)){for(let r=0;r<e.length;r++){let i=e[r];if(typeof i==`object`&&i&&Ty(i,t+1,n))return!0}return!1}if(!wy(e))return!1;if(_y(e)){if(n)throw TypeError(vy(e));return!1}for(let r in e){let i=e[r];if(typeof i==`object`&&i&&Ty(i,t+1,n))return!0}return!1}function Ey(e,t){let n=wy(this)?this[e]:t;if(n instanceof Uint8Array)return{[xy]:my(n)};if(wy(n)&&_y(n))throw TypeError(vy(n));if(Dy(t))throw ky(e);return t}function Dy(e){if(!wy(e)||Array.isArray(e)||typeof e.$bytes!=`string`)return!1;for(let t in e)if(t!==`$bytes`)return!1;return!0}var Oy=64;function ky(e){let t=JSON.stringify(e.length>Oy?`${e.slice(0,Oy)}…`:e);return TypeError(`codec JSON : objet {"${xy}": …} non issu d'octets`+(e===``?``:` sous la clé ${t}`)+` — le récepteur le relirait en octets ; envoyer un Uint8Array, ou ajouter une autre clé à l'objet`)}function Ay(e,t){if(!wy(t)||Array.isArray(t))return t;let n=t[xy];if(typeof n!=`string`)return t;for(let e in t)if(e!==`$bytes`)return t;return hy(n)}function jy(){return TypeError(`codec JSON : trame binaire reçue — ce codec ne lit que du texte`)}var My=xy,Ny={protocol:by,encode(e){return JSON.stringify(e)},decode(e){if(typeof e!=`string`)throw jy();return JSON.parse(e)}},Py={protocol:by,bytesMarker:xy,encode(e){if(Ty(e,0,!0))return JSON.stringify(e,Ey);let t=JSON.stringify(e);return t.includes(My)?JSON.stringify(e,Ey):t},decode(e){if(typeof e!=`string`)throw jy();return e.includes(My)?JSON.parse(e,Ay):JSON.parse(e)}};function Fy(e){return e===`$bytes`?Py:Ny}var Iy=-32001,Ly=class extends Error{name=`RpcError`;data;constructor(e,t=Vv.DEFAULT,n){super(e),this.code=t,n!==void 0&&(this.data=n)}},Ry=class{result;meta;constructor(e,t){this.result=e,this.meta=t}},zy=class e{opts;nextId=1;pending=null;actions=null;_codec;writeOut;sendOut;admitOut;constructor(e){this.opts=e,this.writeOut=e.write??null,this.sendOut=e.send??null,this.admitOut=e.admit??null,this._codec=e.codec??Ny}get codec(){return this._codec}set codec(e){this._codec=e}decode(e){return this._codec.decode(e)}register(e,t){this.registerHandler(e,t)}registerHandler(e,t){(this.actions??=new Map).set(e,t)}unregister(e){this.actions?.delete(e)}get methods(){return this.actions?[...this.actions.keys()]:[]}request(e,t,n=3e4){return this.startCall(e,t,n)}requestAs(e,t,n=3e4){return this.startCall(e,t,n)}requestTracedAs(e,t,n=3e4){return this.startCall(e,t,n,!0)}requestTraced(e,t,n=3e4){return this.startCall(e,t,n,!0)}static buildNotification(e,t){return Kv(e,t)}notify(t,n){let r=e.buildNotification(t,n),i=this.opts.onError;if(i===void 0)return this.emit(r);try{return this.emit(r)}catch(e){return i(`notify ${t}`,e),!1}}receive(e){let t=Wv(e);if(t===`invalid`)return this.settleUnreadableResponse(e),this.opts.onFrameAudit?.(`invalid`,e,this),`invalid`;if(t===`response`)return this.handleResponse(e),`response`;let n=e,r=t===`request`;return this.opts.beforeDispatch&&!this.opts.beforeDispatch(n,this)?(this.opts.onFrameAudit?.(`denied`,e,this),r?(this.emit(Jv(n.id,Iy,`unauthorized`)),`request`):`notification`):r?(this.handleRequest(n.id,n.method,n.params,e),`request`):(this.opts.onNotification?.(n.method,n.params),`notification`)}dispose(e=`peer disposed`){if(this.pending){for(let t of this.pending.values())t.timer&&clearTimeout(t.timer),t.reject(Error(e));this.pending.clear()}}emit(e){let t=this.writeOut;return t===null?this.sendOut!==null&&this.sendOut(e)!==!1:this.admitOut!==null&&!this.admitOut()?!1:t(this._codec.encode(e),e)!==!1}reply(e,t,n,r){try{this.emit(r)}catch(r){this.opts.onError?.(`rpc ${t} : réponse non encodable`,r),this.opts.onFrameAudit?.(`internal_error`,n,this),this.emit(Jv(e,Bv.INTERNAL_ERROR,`internal error: non-serializable payload`))}}startCall(e,t,n,r){let i=this.nextId++,a=this.pending??=new Map;return new Promise((o,s)=>{let c=setTimeout(()=>{a.delete(i),s(Error(`RPC timeout: ${e}`))},n);a.set(i,{resolve:e=>{clearTimeout(c),o(e)},reject:e=>{clearTimeout(c),s(e)},timer:c,withMeta:r});let l;try{l=this.emit(Gv(i,e,t))}catch(e){clearTimeout(c),a.delete(i),s(e instanceof Error?e:Error(String(e)));return}l||(clearTimeout(c),a.delete(i),s(Error(`RPC non émis (transport indisponible) : ${e}`)))})}handleRequest(e,t,n,r){let i=this.actions?.get(t);i?Promise.resolve().then(()=>i(n)).then(n=>{if(n instanceof Ry){let i=qv(e,n.result);i.meta=n.meta,this.reply(e,t,r,i)}else this.reply(e,t,r,qv(e,n))},n=>{n instanceof Ly?this.reply(e,t,r,Jv(e,n.code,n.message,n.data)):(this.opts.onError?.(`rpc ${t}`,n),this.opts.onFrameAudit?.(`internal_error`,r,this),this.emit(Jv(e,Bv.INTERNAL_ERROR,`internal error`)))}):(this.opts.onFrameAudit?.(`method_not_found`,r,this),this.emit(Jv(e,Bv.METHOD_NOT_FOUND,`method not found: ${t}`)))}handleResponse(e){if(typeof e.id!=`number`||!this.pending)return;let t=this.pending.get(e.id);t&&(this.pending.delete(e.id),e.error?t.reject(new Ly(e.error.message,e.error.code,e.error.data)):t.resolve(t.withMeta?{result:e.result,meta:e.meta}:e.result))}settleUnreadableResponse(e){if(!this.pending||typeof e!=`object`||!e)return;let t=e;if(t.jsonrpc!==`2.0`||t.method!==void 0||typeof t.id!=`number`)return;let n=this.pending.get(t.id);n&&(this.pending.delete(t.id),n.reject(Uv(t.error)?new Ly(t.error.message,t.error.code,t.error.data):new Ly(`réponse JSON-RPC invalide`,Bv.INTERNAL_ERROR)))}},By={state:`__state__`,identity:`__identity__`,stats:`__stats__`,notice:`__notice__`,denied:`__denied__`,subscribed:`__subscribed__`,closed:`__closed__`,reconnect:`__reconnect__`,frame:`__frame__`},Vy={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3};function Hy(e,t){return typeof e==`object`&&e?Object.getOwnPropertyDescriptor(e,t)?.value:void 0}function Uy(e,t,n=t-1){return e===null?`gap`:t<=e?`stale`:n===e?`applied`:`gap`}var Wy=2e3,Gy=.25,Ky=Object.freeze({ready:!1,count:0,unnamed:0,members:new Map,partial:!1});function qy(e,t){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=t}function Jy(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Yy(e){if(!Array.isArray(e))return!1;let t=e.length;if(t&1)return!1;for(let n=0;n<t;n+=2)if(typeof e[n]!=`string`||!qy(e[n+1],1))return!1;return!0}function Xy(e){if(!Array.isArray(e))return!1;for(let t of e)if(typeof t!=`string`)return!1;return!0}function Zy(e){if(!Jy(e))return!1;for(let t of Object.keys(e))if(!Jy(e[t]))return!1;return!0}function Qy(e){if(!Jy(e))return!1;let t=Hy(e,`set`),n=Hy(e,`gone`),r=Hy(e,`states`);return(t===void 0||Yy(t))&&(n===void 0||Xy(n))&&(r===void 0||Zy(r))}function $y(e){if(!Jy(e))return!1;let t=Hy(e,`partial`);if(typeof Hy(e,`channel`)!=`string`||!qy(Hy(e,`version`),0)||!qy(Hy(e,`count`),0)||!qy(Hy(e,`unnamed`),0)||t!==void 0&&t!==!0)return!1;let n=Hy(e,`members`),r=Hy(e,`changes`),i=Hy(e,`states`);return r===void 0?n===void 0?i===void 0:Yy(n)&&(i===void 0||Zy(i)):n===void 0&&i===void 0&&Qy(r)}function eb(e,t,n){return n===void 0?e?.tabs===t&&e.states===void 0?e:{tabs:t}:{tabs:t,states:n}}function tb(e,t){if(e===void 0)return;let n=Hy(e,t);return Jy(n)?n:void 0}var nb=class{channel;#e=null;#t=!1;#n=0;#r=0;#i=!1;#a=new Map;#o=!1;#s=null;constructor(e){this.channel=e}get synced(){return this.#e!==null}get reference(){return this.#e}apply(e){if(e.channel!==this.channel)throw Error(`[nodefony] trame de présence de « ${e.channel} » appliquée à la vue de « ${this.channel} »`);let t=e.changes;if(t===void 0)this.#l(e.members,e.states);else{let n=Uy(this.#e,e.version);if(n!==`applied`)return n===`gap`&&this.unsync(),n;this.#u(t)}return this.#e=e.version,this.#t=!0,this.#n=e.count,this.#r=e.unnamed,this.#i=e.partial===!0,this.#s=null,`applied`}unsync(){return this.#e!==null&&(this.#e=null,this.#s=null,!0)}snapshot(){let e=this.#s;if(e===null){let t=this.#t;e={ready:t,count:this.#n,unnamed:this.#r,members:this.#a,partial:this.#i||t&&this.#e===null},this.#o=!0,this.#s=e}return e}#c(){return this.#o&&=(this.#a=new Map(this.#a),!1),this.#a}#l(e,t){let n=this.#a,r=new Map;if(e!==void 0)for(let i=0;i<e.length;i+=2){let a=e[i],o=e[i+1];typeof a==`string`&&typeof o==`number`&&r.set(a,eb(n.get(a),o,tb(t,a)))}this.#a=r,this.#o=!1}#u(e){let{set:t,gone:n,states:r}=e;if(t===void 0&&n===void 0)return;let i=this.#c();if(n!==void 0)for(let e of n)i.delete(e);if(t!==void 0)for(let e=0;e<t.length;e+=2){let n=t[e],a=t[e+1];typeof n==`string`&&typeof a==`number`&&i.set(n,eb(i.get(n),a,tb(r,n)))}}};function rb(e){e?.unref?.()}var ib=class{#e;#t=0;#n=0;capacity;constructor(e){this.capacity=e,this.#e=Array(e)}push(e){this.#n===this.capacity?(this.#e[this.#t]=e,this.#t=(this.#t+1)%this.capacity):(this.#e[(this.#t+this.#n)%this.capacity]=e,this.#n++)}shift(){if(this.#n===0)return;let e=this.#e[this.#t];return this.#e[this.#t]=void 0,this.#t=(this.#t+1)%this.capacity,this.#n--,e}at(e){let t=e<0?this.#n+e:e;if(!(!Number.isInteger(t)||t<0||t>=this.#n))return this.#e[(this.#t+t)%this.capacity]}get length(){return this.#n}last(){return this.at(-1)}clear(){this.#e.fill(void 0),this.#t=0,this.#n=0}toArray(){let e=Array(this.#n);for(let t=0;t<this.#n;t++)e[t]=this.#e[(this.#t+t)%this.capacity];return e}};function ab(e,t,n){let r;try{r=Reflect.construct(WebSocket,[e,{protocols:t===void 0?[]:[...t],headers:n}])}catch(e){throw TypeError("[nodefony] en-têtes de poignée de main refusés par ce WebSocket : un navigateur joint lui-même ses cookies, `headers` ne sert que sous Node",{cause:e})}if(!(r instanceof WebSocket))throw TypeError(`[nodefony] WebSocket non construit`);return r}var ob=class{url;protocols;headers;ws=null;_onOpen=null;_onMessage=null;_onClose=null;_onError=null;constructor(e,t,n){this.url=e,this.protocols=t,this.headers=n}connect(){let e=this.headers===void 0?this.protocols===void 0?new WebSocket(this.url):new WebSocket(this.url,[...this.protocols]):ab(this.url,this.protocols,this.headers);e.binaryType=`arraybuffer`,this.ws=e,e.addEventListener(`open`,()=>this._onOpen?.()),e.addEventListener(`message`,e=>{let t=e.data;this._onMessage?.(typeof t==`string`?t:new Uint8Array(t))}),e.addEventListener(`close`,e=>{this.ws=null,this._onClose?.(e.code,e.reason)}),e.addEventListener(`error`,()=>this._onError?.(Error(`websocket error`)))}send(e){this.ws?.readyState===Vy.OPEN&&this.ws.send(e)}close(e,t){this.ws?.close(e,t)}get readyState(){return this.ws?.readyState??Vy.CLOSED}get bufferedAmount(){return this.ws?.bufferedAmount??0}onOpen(e){this._onOpen=e}onMessage(e){this._onMessage=e}onClose(e){this._onClose=e}onError(e){this._onError=e}},sb=Object.freeze({kind:`unfollowed`}),cb=Object.freeze({kind:`none`});function lb(e){let t=e.subscribedChannels;return{url:e.url,state:e.state,codec:e.codec,channels:t,presence:t.map(t=>e.presenceStatus(t)),frames:e.framesReceived,unsent:e.framesUnsent,dropped:e.framesDropped,binaryDiscarded:e.binaryFramesDiscarded,malformedDiscarded:e.malformedFramesDiscarded,frameLogSince:e.frameLogSince,lastFrame:{method:e.lastFrameMethod,at:e.lastFrameAt},reconnectAttempts:e.reconnectAttempts,nextRetryAt:e.nextRetryAt,identity:e.identity,serverChannels:e.serverChannels,serverMethods:e.serverMethods}}function ub(e){return`JSON-RPC 2.0 · ${e===`nodefony.jsonrpc.v1`?`texte`:`binaire`} (${e})`}function db(e,t){return`${e} ${t}${e>1?`s`:``}`}var fb=3,pb=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/giu;function mb(e){return e.replace(pb,e=>`${e.slice(0,4)}…${e.slice(-3)}`)}function hb(e,t){if(e.kind===`none`)return`sans présence`;if(e.kind===`unfollowed`)return`présence non suivie par la page`;let n=e.view;if(!n.ready)return`en attente de la liste`;let r=n.members,i;if(r.size>0){let e=[];for(let[n,i]of r){if(e.length===fb)break;let r=[],a;t?.id===n?(r.push(`vous`),a=t.name):a=mb(n),i.tabs>1&&r.push(`${i.tabs} onglets`),e.push(r.length===0?a:`${a} (${r.join(`, `)})`)}i=r.size>fb?`${e.join(`, `)} +${r.size-fb}`:e.join(`, `)}else i=db(n.count,`compte`);let a=`${i} · ${db(n.unnamed,`anonyme`)}`;return n.partial?`${a} · partielle`:a}function gb(e){let t=e.binaryDiscarded+e.malformedDiscarded;return e.unsent+e.dropped+t===0?{text:`aucune perte`,lost:!1}:{text:`${e.unsent} non envoyées · ${e.dropped} jetées · ${t} illisibles`,lost:!0}}var _b={connected:`connecté`,connecting:`connexion…`,reconnecting:`reconnexion automatique…`,disconnected:`coupé`,error:`erreur`};function vb(e,t=Date.now()){let n=e.nextRetryAt;return n===null?_b[e.state]:`${_b[e.state]} (tentative ${e.reconnectAttempts}, dans ${Math.max(0,Math.ceil((n-t)/1e3))} s)`}function yb(e,t=Date.now()){let n=e.identity,r=(e,t)=>e===null?`— (avant l'accueil)`:e.join(`, `)||t,i=e=>new Date(e).toLocaleTimeString(),a=n?.authenticated===!0&&n.id?{id:n.id,name:n.userIdentifier||n.id}:void 0,o=e.channels.map((t,n)=>{let r=e.presence[n]??cb;return r.kind===`none`?t:`${t} (${hb(r,a)})`});return[{label:`adresse`,value:e.url??`—`,hint:`Le point d'entrée WebSocket, résolu contre la page : une seule socket par adresse, partagée par tous les composants.`},{label:`état`,value:vb(e,t),hint:`Coupée, la socket se reconnecte seule et rejoue ses abonnements : la page n'a rien à écrire pour ça.`},{label:`format`,value:ub(e.codec),hint:`Choisi par le serveur parmi l'offre du client, annoncé à l'accueil ; en binaire, les octets passent sans base64.`},{label:`identité`,value:n?.authenticated?[n.userIdentifier||`authentifié`,n.type,n.roles.join(`, `)].filter(Boolean).join(` · `):n===null?`— (avant l'accueil)`:`anonyme`,hint:`Résolue par le SERVEUR à l'accueil (realtime:welcome), d'après la session ou le jeton — le navigateur ne la décide jamais.`},{label:`canaux tenus`,value:o.join(`, `)||`aucun`,hint:`Abonnements comptés par référence : dix composants sur le même canal, un seul abonnement réseau. Entre parenthèses, la présence du canal (qui est là) quand il en porte une.`},{label:`canaux offerts`,value:r(e.serverChannels,`aucun`),hint:`Ce que le serveur annonce à l'accueil — ce qu'on PEUT écouter, filtré par les droits de cette identité.`},{label:`actions`,value:r(e.serverMethods,`aucune`),hint:`Les actions de contrôleur joignables par la socket (api.request) — une route ne l'est que si elle le déclare.`},{label:`notifications reçues`,value:String(e.frames),hint:`Poussées par le serveur, accueil compris, et comptées par le client lui-même. Les réponses aux appels n'y entrent pas : elles se lisent au journal.`},{label:`trames perdues`,value:gb(e).text,hint:`Non envoyées : transport fermé à l'émission. Jetées : contre-pression du client (maxBufferedAmount). Illisibles : binaire sans lecteur ou texte non JSON — la première de chaque sorte lève un incident.`},{label:`dernière notification`,value:e.lastFrame.at===null?`—`:`${e.lastFrame.method??`?`} à ${i(e.lastFrame.at)}`,hint:`Une socket qui se tait n'est pas morte : le serveur ne parle que s'il a quelque chose à dire.`},{label:`journal`,value:e.frameLogSince===null?`éteint`:`tenu depuis ${i(e.frameLogSince)}`,hint:`Hors développement, le journal ne retient rien — coût nul par trame — jusqu'à sa première lecture : les trames antérieures n'y sont pas.`}]}var bb=null;function xb(){return typeof globalThis.document==`object`}function Sb(){return globalThis.__nfAnnounced__===!0}var Cb=null;function wb(){return globalThis.__nfDetailed__===!0}function Tb(e){e&&(Cb=e)}function Eb(){return Db()||Cb!==null&&Cb!==`production`}function Db(){return!1}function Ob(){let e=globalThis;return e.__nfRealtime__?[...e.__nfRealtime__.values()]:[]}function kb(e){Eb()&&(globalThis.__nfSockets__??=new Set).add(e)}function Ab(e){globalThis.__nfSockets__?.delete(e)}function jb(){let e=Ob(),t=globalThis.__nfSockets__;if(t===void 0||t.size===0)return e;let n=new Set(e);for(let r of t)n.has(r)||e.push(r);return e}function Mb(){Eb()&&(globalThis.nodefony={get kernel(){return bb??void 0},get socket(){return jb()[0]},sockets:()=>jb().map(e=>({url:e.url??`(adresse non résolue)`,state:e.state})),identity:()=>bb?bb.identity:jb()[0]?.identity??null})}function Nb(){let e=globalThis;delete e.nodefony,delete e.__nfAnnounced__,delete globalThis.__nfDetailed__,Cb=null}function Pb(e){if(Sb())return;let t=globalThis.console;t?.log&&(globalThis.__nfAnnounced__=!0,t.log(`%c◆ nodefony%c${e}%c`,`background:#0b1120;color:#5eead4;font-weight:700;padding:2px 6px;border-radius:3px 0 0 3px`,`background:#1e293b;color:#e2e8f0;padding:2px 6px;border-radius:0 3px 3px 0`,``))}function Fb(e,t,n){return n===!1||!xb()?()=>void 0:(bb=e,Pb(t),Mb(),()=>{bb===e&&(bb=null,Ob().length===0?Nb():Mb())})}function Ib(e){return e===!1||!xb()?()=>void 0:(Pb(`client`),Mb(),()=>{!bb&&Ob().length===0&&Nb()})}function Lb(e,t,n){if(!xb()||wb()||!Eb())return!1;let r=globalThis.console;if(!r?.log||!r.groupCollapsed||!r.groupEnd)return!1;globalThis.__nfDetailed__=!0,r.groupCollapsed(`%c${n}`,`color:#94a3b8`);try{if(r.table)r.table(e);else for(let[t,n]of Object.entries(e))r.log(t,n.valeur);r.log(`%cconsole :%c nodefony.socket · nodefony.sockets() · nodefony.identity()`+(bb?` · nodefony.kernel`:``),`color:#94a3b8`,`color:#5eead4;font-family:monospace`),r.log(`%ccorrélation :%c chaque journal porte un requestId — la même valeur côté serveur relie clic, route, base et réponse`,`color:#94a3b8`,`color:#e2e8f0`),r.log(`%cobjet :%c`,`color:#94a3b8`,``,t)}finally{r.groupEnd()}return!0}function Rb(){return bb!==null}var zb=`nodefony:kernel`;function Bb(e){if(!xb()||!Eb())return()=>void 0;let t=globalThis;return(t.__nfKernels__??=[]).push(e),Vb(),()=>{let n=t.__nfKernels__,r=n?n.indexOf(e):-1;n&&r>=0&&n.splice(r,1),Vb()}}function Vb(){typeof Event==`function`&&globalThis.dispatchEvent?.(new Event(zb))}function Hb(e,t,n){return t==null||t===n?e:`${e}:${t}`}function Ub(e,t){let n=[],r=e;for(;r<t;)n.push(r),r*=2;return n.push(t),n}var Wb=class{ladder;slowest;starvationFactor;healthyFactor;recoveryWindow;idx=0;healthy=0;lastFrameTs=null;constructor(e){let t=e.maxMs??6e4,n=e.ladder&&e.ladder.length>0?[...e.ladder].sort((e,t)=>e-t):Ub(e.intervalMs,Math.max(e.intervalMs,t));this.ladder=n,this.slowest=n[n.length-1]??t,this.starvationFactor=e.starvationFactor??1.8,this.healthyFactor=e.healthyFactor??1.25,this.recoveryWindow=e.recoveryWindow??4}current(){return this.ladder[this.idx]??this.slowest}decrease(){return this.idx>=this.ladder.length-1?!1:(this.idx+=1,!0)}increase(){return this.idx<=0?!1:(--this.idx,!0)}resetSample(){this.lastFrameTs=null,this.healthy=0}noteFrame(e){let t=this.lastFrameTs;if(this.lastFrameTs=e,t===null)return null;let n=e-t,r=this.current();return n>this.starvationFactor*r?this.decrease()?(this.resetSample(),{intervalMs:this.current(),reason:`decrease`}):(this.healthy=0,null):n<=this.healthyFactor*r?(this.healthy+=1,this.healthy>=this.recoveryWindow&&this.increase()?(this.resetSample(),{intervalMs:this.current(),reason:`increase`}):null):(this.healthy=0,null)}checkStarvation(e){return this.lastFrameTs===null?null:e-this.lastFrameTs>this.starvationFactor*this.current()&&this.decrease()?(this.resetSample(),{intervalMs:this.current(),reason:`decrease`}):null}},Gb={set:(e,t)=>setInterval(e,t),clear:e=>clearInterval(e)},Kb=()=>typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now();function qb(e,t,n,r){if(r.enabled===!1){let i=Hb(t,r.intervalMs,r.defaultMs);e.subscribe(i);let a=e.on(i,n);r.onRate?.(r.intervalMs,`init`);let o=!1;return{get intervalMs(){return r.intervalMs},get channel(){return i},dispose(){o||(o=!0,a(),e.unsubscribe(i))}}}let i=r.clock??Kb,a=r.scheduler??Gb,o=new Wb(r),s=o.current(),c=Hb(t,s,r.defaultMs),l=null,u,d=!1,f=(...e)=>{let t=o.noteFrame(i());n(...e),t&&m(t)},p=()=>{u!==void 0&&a.clear(u),u=a.set(()=>{let e=o.checkStarvation(i());e&&m(e)},s)};function m(n){if(d)return;let i=Hb(t,n.intervalMs,r.defaultMs);if(s=n.intervalMs,i!==c){let t=c,n=l;e.subscribe(i),l=e.on(i,f),n?.(),e.unsubscribe(t),c=i}p(),r.onRate?.(s,n.reason)}return e.subscribe(c),l=e.on(c,f),p(),r.onRate?.(s,`init`),{get intervalMs(){return s},get channel(){return c},dispose(){d||(d=!0,u!==void 0&&a.clear(u),l?.(),e.unsubscribe(c))}}}var Jb={syslog:`nodefony:syslog`,audit:`nodefony:audit`,dashboard:`nodefony:dashboard`,supervision:`nodefony:supervision`,debugbar:`nodefony:debugbar`,socket:`nodefony:socket`,ormHealth:`nodefony:orm:health`,ormFlow:`nodefony:orm:flow`,ormRich:`nodefony:orm:rich`,scaffoldJob:`nodefony:scaffold:job`},Yb={syslogUplink:`nodefony:syslog:uplink`},Xb={ping:`nodefony:kernel:ping`,gc:`nodefony:kernel:gc`,scaffoldPreview:`nodefony:scaffold:preview`,scaffoldRun:`nodefony:scaffold:run`,scaffoldCancel:`nodefony:scaffold:cancel`,throughput:`nodefony:realtime:throughput`},Zb={hmr:`nodefony:hmr`,debugbarSelect:`nodefony:debugbar:select`},Qb=`user:`;function $b(e){return`${Qb}${e}`}function ex(e){return e===void 0||typeof e==`object`&&!!e}function tx(e){return`[binary ${e} B]`}function nx(e,t){return TypeError(`realtime: le canal « ${e} » reçoit une charge de type ${t===null?`null`:typeof t} — une charge est un objet ou un tableau, ou absente (JSON-RPC 2.0 §4.2) : publier { value } plutôt qu'un scalaire`)}var rx={text:Ny,binary:null,offer:void 0};function ix(e){return e===void 0?rx:e.protocol===`nodefony.jsonrpc.v1`?{text:e,binary:null,offer:void 0}:{text:e.textCodec??Ny,binary:e,offer:[e.protocol,by]}}function ax(e,t,n){return t===void 0||t===`nodefony.jsonrpc.v1`?e.text===Ny?Fy(n):e.text:t===e.binary?.protocol?e.binary:null}function ox(e,t,n,r,i){return t<=0||e<=t?`send`:n===`close`||r>0&&i+1>=r?`close`:`drop`}function sx(e,t){return e===`send`?t>0?t-1:0:t+1}var cx=1e3,lx=300,ux=2097152;function dx(e){return e>fx?0:e}var fx=65536,px=100,mx=2**31-1,hx=3,gx=1e3,_x=class{view;handlers=new Set;lastResync=0;timer=null;constructor(e){this.view=new nb(e)}notify(){let e=this.view.snapshot();for(let t of this.handlers)try{t(e)}catch{}}cancel(){this.timer!==null&&clearTimeout(this.timer),this.timer=null}};function vx(e,t){let n=Math.random()*gx*2**e;return Math.min(Math.round((t??0)+n),mx)}var yx=5e3,bx=1e4,xx=5e3;function Sx(e,t,n){let r=Number.isFinite(t)&&t>0?t:0,i=Math.min(Math.max(Number.isNaN(n)?0:n,px),mx),a=Math.min(r*2**Math.min(e-1,31),i),o=a/2+a/2*Math.random();return Math.max(px,Math.round(o))}function Cx(e,t){let n;try{n=new URL(e,t)}catch{throw Error(`[nodefony] adresse du serveur temps réel illisible : ${JSON.stringify(e)}`)}if(n.protocol===`http:`?n.protocol=`ws:`:n.protocol===`https:`&&(n.protocol=`wss:`),n.protocol!==`ws:`&&n.protocol!==`wss:`)throw Error(`[nodefony] schéma refusé pour le temps réel : ${n.protocol} (ws:, wss:, http: ou https: attendus)`);if(n.username||n.password)throw Error("[nodefony] identifiants refusés dans l'adresse temps réel : passer le jeton par l'option `token`");return n}function wx(e){let t=new URL(e);return t.protocol=t.protocol===`wss:`?`https:`:`http:`,t.searchParams.delete(`token`),t.toString()}async function Tx(e,t,n){if(typeof fetch!=`function`)return null;let r=new AbortController,i=setTimeout(()=>r.abort(),xx);try{return(await fetch(e,{method:`GET`,credentials:`include`,cache:`no-store`,redirect:`manual`,signal:r.signal,...t||n?{headers:{...n,...t?{authorization:`Bearer ${t}`}:{}}}:{}})).status}catch{return null}finally{clearTimeout(i)}}function Ex(e,t,n){let r={truncated:`${t} ${n?`octets`:`caractères`} — charge non journalisée`};if(typeof e!=`object`||!e)return r;if(`method`in e&&typeof e.method==`string`&&(r.method=e.method),`id`in e&&(typeof e.id==`number`||typeof e.id==`string`)&&(r.id=e.id),`params`in e){let t=e.params;r.params=typeof t==`object`&&t&&`channel`in t&&typeof t.channel==`string`?{channel:t.channel}:`[tronqué]`}return`result`in e&&(r.result=`[tronqué]`),`error`in e&&(r.error=`[tronqué]`),r}var Dx=/(token|password|secret|api[_-]?key|apikey|authorization|bearer)/i;function Ox(e,t=0){return typeof e!=`object`||!e?e:ArrayBuffer.isView(e)||e instanceof ArrayBuffer?tx(e.byteLength):t>4?e:Array.isArray(e)?e.map(e=>Ox(e,t+1)):Object.fromEntries(Object.entries(e).map(([e,n])=>[e,Dx.test(e)?`[redacted]`:Ox(n,t+1)]))}function kx(e){return typeof Hy(e,`channel`)==`string`}var Ax=e=>`[nodefony] abonnement à « ${e} » rendu (unsubscribe) avant son acquittement`,jx=e=>`[nodefony] abonnement à « ${e} » refusé par le serveur`,Mx=e=>`[nodefony] abonnement à « ${e} » terminé par le serveur`;function Nx(e){let t=Hy(e,`reason`);return typeof Hy(e,`channel`)==`string`&&(t===`ended`||t===`evicted`)}function Px(e){let t=Hy(e,`dir`);return(t===`in`||t===`out`)&&typeof Hy(e,`kind`)==`string`&&typeof Hy(e,`size`)==`number`}function Fx(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):null}function Ix(e){let t=Hy(e,`type`),n=Hy(e,`authenticated`),r=Hy(e,`id`),i=r===void 0?null:r,a=Hy(e,`userIdentifier`),o=Hy(e,`roles`),s=Hy(e,`scopes`);if(typeof t!=`string`||typeof n!=`boolean`||i!==null&&typeof i!=`string`||typeof a!=`string`||!Array.isArray(o)||!Array.isArray(s))return null;let c=Fx(o),l=Fx(s);return c?.length!==o.length||l?.length!==s.length?null:{type:t,authenticated:n,id:i,userIdentifier:a,roles:c,scopes:l}}function Lx(e,t){if(typeof t!=`object`||!t)return e;let n=new URLSearchParams;for(let[e,r]of Object.entries(t)){let t=Array.isArray(r)?r:[r];for(let r of t)if(r!=null){if(typeof r!=`string`&&typeof r!=`number`&&typeof r!=`boolean`)throw TypeError(`query « ${e} » : seules les valeurs scalaires voyagent dans un chemin`);n.append(e,String(r))}}let r=n.toString();return r===``?e:`${e}${e.includes(`?`)?`&`:`?`}${r}`}var Rx=class e{opts;transport=null;transportFactory;_state=`disconnected`;peer=new zy({admit:()=>this.admitFrame(),write:(e,t)=>this.writeFrame(e,t),onNotification:(e,t)=>this.dispatchNotification(e,t)});handlers=new Map;_subscriptions=new Map;_welcomed=!1;_subscriptionAcks=!1;_acked=null;_ackWaiters=null;_admissionRetries=null;_presence=null;_presenceUnfollowed=null;reconnectAttempt=0;_nextRetryAt=null;reconnectTimer=null;heartbeatTimer=null;connectTimer=null;intentionalClose=!1;_stats=new Map;_framesReceived=0;_framesUnsent=0;_framesDropped=0;_dropBalance=0;_binaryFramesDiscarded=0;_malformedFramesDiscarded=0;_binaryHandlers=null;codecs;_wire=null;_rawBinaryNoticed=!1;_unsentNotified=!0;_lastFrameAt=null;_lastFrameMethod=null;statsTimer=null;_prevSampled=new Map;_rawFrames=null;_frameLogOn=Db();_frameLogSince=this._frameLogOn?Date.now():null;_rawFramesChars=0;_inboundAt=0;_identity=null;_serverChannels=null;_serverMethods=null;constructor(e={},t){this.opts=e,this.transportFactory=t??((t,n)=>new ob(t,n,e.headers)),this.codecs=ix(e.codec),this.peer.codec=this.codecs.text,Ib(this.opts.banner)}static shared(t={}){let n=e.resolveUrl(t.url),r=globalThis,i=r.__nfRealtime__??=new Map,a=i.get(n);return a?t.codec!==void 0&&t.codec!==a.opts.codec&&!a.adoptRequestedCodec(t.codec)&&Eb()&&console.warn(`[nodefony] ${n} : codec « ${t.codec.protocol} » ignoré, la socket partagée est déjà connectée — le passer à sa création, ou avant la connexion`):(a=new e({...t,url:n}),i.set(n,a)),a}static fromContract(t={},n){let{shared:r,...i}=t;if(r===!0){if(n)throw TypeError("NodefonySocket.fromContract() : `shared` rend la socket de la page, qui a déjà son transport — ne pas passer de fabrique.");return e.shared(i)}return new e(i,n)}static missingUrl(){return Error(`[nodefony] adresse du serveur temps réel manquante.
|
|
51
|
+
Donne-la explicitement : NodefonySocket.shared({ url: "/api/live/realtime" })
|
|
52
|
+
ou, en React : <NodefonyProvider url="/api/live/realtime">
|
|
53
|
+
Il n'y a pas de valeur par défaut : la route dépend de ton application (\`create controller live --kind realtime\` monte /api/live/realtime, la console d'administration /nodefony/studio/api/realtime).`)}static resolveUrl(t){if(!t)throw e.missingUrl();return typeof window>`u`?t:Cx(t,window.location.href).toString()}get state(){return this._state}get reconnectAttempts(){return this.reconnectAttempt}get nextRetryAt(){return this._nextRetryAt}retryNow(){this._state!==`connected`&&this._state!==`connecting`&&(this.reconnectTimer&&=(clearTimeout(this.reconnectTimer),null),this._nextRetryAt=null,this.intentionalClose=!1,this.openSocket().catch(()=>{}))}async connect(e){if(!(this._state===`connected`||this._state===`connecting`&&this.transport!==null))return this.intentionalClose=!1,this.opts.url=e??this.requireUrl(),this.startStatsSampler(),kb(this),this.openSocket()}requireUrl(){if(!this.opts.url)throw e.missingUrl();return this.opts.url}disconnect(){this.intentionalClose=!0,this.clearTimers(),this.statsTimer!==null&&(clearInterval(this.statsTimer),this.statsTimer=null),this.transport?.close(1e3,`client disconnect`),this.peer.dispose(`client disconnect`),this._welcomed=!1,this._subscriptionAcks=!1,this._acked=null,this._presence!==null&&this.unsyncPresence(null);let e=this._ackWaiters;if(e!==null){this._ackWaiters=null;let t=Error(`[nodefony] connexion temps réel fermée par disconnect()`);for(let n of e.values())for(let e of n)e.reject(t)}this._identity=null,this._serverChannels=null,this._serverMethods=null,this.peer.codec=this.codecs.text,Ab(this),this.fireLocal(By.identity,null),this.setState(`disconnected`)}adoptCodec(e,t){let n=ax(this.codecs,e,t);n===null?(this.peer.codec=this.codecs.text,this.fireNotice(iy(typeof e==`string`?e:typeof e))):(this.peer.codec=n,n===this.codecs.binary&&this._binaryHandlers!==null&&this.noticeRawBinary())}noticeRawBinary(){this._rawBinaryNoticed||(this._rawBinaryNoticed=!0,this.fireNotice(ay(this.peer.codec.protocol)))}on(e,t){e===By.frame&&this.startFrameLog();let n=this.handlers.get(e);return n||(n=new Set,this.handlers.set(e,n)),n.add(t),()=>this.off(e,t)}off(e,t){this.handlers.get(e)?.delete(t)}onNotice(e){return this.on(By.notice,e)}onDenied(e){return this.on(By.denied,e)}onSubscribed(e){let t=t=>{kx(t)&&e(t)},n=this.handlers.get(By.subscribed);return n||(n=new Set,this.handlers.set(By.subscribed,n)),n.add(t),()=>{this.handlers.get(By.subscribed)?.delete(t)}}onFrame(e){this.startFrameLog();let t=t=>{Px(t)&&e(t)},n=this.handlers.get(By.frame);return n||(n=new Set,this.handlers.set(By.frame,n)),n.add(t),()=>{this.handlers.get(By.frame)?.delete(t)}}onClosed(e){let t=t=>{Nx(t)&&e(t)},n=this.handlers.get(By.closed);return n||(n=new Set,this.handlers.set(By.closed,n)),n.add(t),()=>{this.handlers.get(By.closed)?.delete(t)}}onPresence(e,t){let n=this._presence??=new Map,r=n.get(e);r===void 0&&(r=new _x(e),n.set(e,r));let i=r;return i.handlers.add(t),()=>{!i.handlers.delete(t)||i.handlers.size>0||(i.cancel(),this._presence?.get(e)===i&&this._presence.delete(e),this._presence?.size===0&&(this._presence=null))}}presence(e){return this._presence?.get(e)?.view.snapshot()??Ky}presenceStatus(e){let t=this._presence?.get(e);return t===void 0?this._presenceUnfollowed?.has(e)===!0?sb:cb:{kind:`followed`,view:t.view.snapshot(),version:t.view.reference}}whenSubscribed(e){return this._subscriptions.has(e)?this.isSubscriptionActive(e)?Promise.resolve():new Promise((t,n)=>{let r=this._ackWaiters??=new Map,i=r.get(e);i||(i=[],r.set(e,i)),i.push({resolve:t,reject:n})}):Promise.reject(Error(`[nodefony] whenSubscribed("${e}") : aucun subscribe() en cours sur ce canal`))}isSubscriptionActive(e){return this._welcomed?!this._subscriptionAcks||this._acked?.has(e)===!0:!1}resolveAckWaiters(e){let t=this.takeAckWaiters(e);if(t)for(let e of t)e.resolve()}takeAckWaiters(e){let t=this._ackWaiters,n=t?.get(e);if(t&&n)return t.delete(e),t.size===0&&(this._ackWaiters=null),n}rejectAckWaiters(e,t,n){let r=this.takeAckWaiters(e);if(!r)return;let i=n===void 0?Error(t(e)):Error(t(e),{cause:n});for(let e of r)e.reject(i)}emit(e,t){!this._emitRaw(e,t)&&this.transport?.readyState!==Vy.OPEN&&this.noticeUnsent()}_emitRaw(e,t){return this.peer.notify(e,t)}publish(e,t){this.#e(e,t)}#e(e,t){if(!ex(t))throw nx(e,t);this._emitRaw(e,t)||this.noticeUnsent()}subscribe(e){let t=e,n=(this._subscriptions.get(t)??0)+1;this._subscriptions.set(t,n),n===1&&this._welcomed&&this._emitRaw(`subscribe`,{channel:t})}unsubscribe(e){let t=e,n=this._subscriptions.get(t);n&&(n<=1?(this._subscriptions.delete(t),this._acked?.delete(t),this._admissionRetries!==null&&this.dropAdmissionRetry(t),this._presence!==null&&this.unsyncPresence(t),this._presenceUnfollowed?.delete(t),this.rejectAckWaiters(t,Ax),this._welcomed&&this._emitRaw(`unsubscribe`,{channel:t})):this._subscriptions.set(t,n-1))}get subscribedChannels(){return Array.from(this._subscriptions.keys())}get url(){return this.opts.url??null}get identity(){return this._identity}get serverChannels(){return this._serverChannels}get serverMethods(){return this._serverMethods}onIdentity(e){return this.on(By.identity,e)}onUser(e){let t=null,n=n=>{let r=n!==null&&n.authenticated&&n.id!==null?$b(n.id):null;if(r===t||(t!==null&&(this.handlers.get(t)?.delete(e),this.unsubscribe(t)),t=r,r===null))return;let i=this.handlers.get(r);i||(i=new Set,this.handlers.set(r,i)),i.add(e),this.subscribe(r)};n(this._identity);let r=this.onIdentity(n);return()=>{r(),n(null)}}onState(e){return this.on(By.state,e)}onStats(e){return this.on(By.stats,e)}onBinary(e){return(this._binaryHandlers??=new Set).add(e),this.peer.codec===this.codecs.binary&&this.noticeRawBinary(),()=>{this._binaryHandlers?.delete(e),this._binaryHandlers?.size===0&&(this._binaryHandlers=null)}}sendBinary(e){return this.transport?.readyState===Vy.OPEN?this.peer.codec===this.codecs.binary?(this.noticeRawBinary(),!1):this.admitOutbound(this.transport)?(this.transport.send(e),!0):!1:(this._framesUnsent++,!1)}admitOutbound(e){let t=this.opts.maxBufferedAmount??0;if(t<=0)return!0;let n=ox(e.bufferedAmount??0,t,`drop`,this.opts.backpressureCloseAfterDrops??cx,this._dropBalance);return this._dropBalance=sx(n,this._dropBalance),n===`send`||(this._framesDropped++,n===`close`&&e.close(zv,`backpressure`),!1)}onReconnect(e){return this.on(By.reconnect,e)}channel(e){let t=this,n=new Set;return{name:e,on(r){let i=t.on(e,r);return n.add(i),()=>{i(),n.delete(i)}},send(n){t.#e(e,n)},open(){t.subscribe(e)},close(){for(let e of n)e();n.clear(),t.unsubscribe(e)}}}adaptiveChannel(e,t,n){return qb(this,e,t,n)}request(e,t,n=3e4){return this.peer.requestAs(e,t,n)}get(e,t){return this.bridge(`GET`,e,void 0,t)}post(e,t,n){return this.bridge(`POST`,e,t,n)}put(e,t,n){return this.bridge(`PUT`,e,t,n)}patch(e,t,n){return this.bridge(`PATCH`,e,t,n)}delete(e,t,n){return this.bridge(`DELETE`,e,t,n)}bridge(e,t,n,r){let i=t.includes(`{`)?cy(t,r?.params):t;r?.query!==void 0&&(i=Lx(i,r.query));let a=e===`GET`?{path:i}:{path:i,method:e,body:n,idempotencyKey:r?.idempotencyKey??oy()};return this.peer.requestAs(`api.request`,a,r?.timeoutMs??3e4)}async call(e,t){let{result:n,meta:r}=await this.peer.requestTracedAs(`api.request`,{path:e,method:t?.method??`GET`,body:t?.body,idempotencyKey:t?.idempotencyKey},t?.timeoutMs??3e4);return{result:n,requestId:typeof r?.requestId==`string`?r.requestId:null}}async ping(e=5e3){let t=()=>typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),n=t();return{...await this.request(Xb.ping,void 0,e),rtt:Math.round(t()-n)}}notify(e,t){this.peer.notify(e,t)}register(e,t){this.peer.registerHandler(e,t)}unregister(e){this.peer.unregister(e)}get methods(){return this.peer.methods}receive(e,t=0,n=!1){let r=Date.now();this._inboundAt=r,this._frameLogOn&&this.recordFrame(`in`,e,t,n,r);let i=this.peer.receive(e);return i===`invalid`&&this.handleServerError(e),i}wireStats(){return this._wire??={framesIn:0,framesOut:0,sizeIn:0,sizeOut:0,binaryIn:0,binaryOut:0,decodeMs:0}}adoptRequestedCodec(e){return this.transport===null&&(this.opts.codec=e,this.codecs=ix(e),this.peer.codec=this.codecs.text,!0)}dispose(e){this.peer.dispose(e)}get framesReceived(){return this._framesReceived}get framesUnsent(){return this._framesUnsent}get framesDropped(){return this._framesDropped}get binaryFramesDiscarded(){return this._binaryFramesDiscarded}get malformedFramesDiscarded(){return this._malformedFramesDiscarded}get lastFrameAt(){return this._lastFrameAt}get lastFrameMethod(){return this._lastFrameMethod}get codec(){return this.peer.codec.protocol}getStats(){return Array.from(this._stats.values())}getChannelStats(e){return this._stats.get(e)}trackFrame(e){let t=this._inboundAt;this._framesReceived++,this._lastFrameAt=t,this._lastFrameMethod=e;let n=this._stats.get(e);n||(n={method:e,msgCount:0,lastMessage:null,rate:0,series:[]},this._stats.set(e,n)),n.msgCount++,n.lastMessage=t}replaySubscriptions(){this._welcomed=!0,this._presence!==null&&this.unsyncPresence(null);for(let e of this._subscriptions.keys())this._emitRaw(`subscribe`,{channel:e});let e=this._ackWaiters;if(!this._subscriptionAcks&&e!==null){this._ackWaiters=null;for(let t of e.values())for(let e of t)e.resolve()}}ingestSubscribed(e){let t=Hy(e,`channel`);if(typeof t!=`string`)return;let n=Hy(e,`imposed`)===!0;if(!this._subscriptions.has(t)){if(!n)return;this._subscriptions.set(t,1)}if((this._acked??=new Set).add(t),this._admissionRetries!==null&&this.dropAdmissionRetry(t),this._ackWaiters!==null&&this.resolveAckWaiters(t),this.handlers.get(By.subscribed)?.size){let e=n?{channel:t,imposed:!0}:{channel:t};this.fireLocal(By.subscribed,e)}}ingestClosed(e){if(!Nx(e))return;let{channel:t,reason:n}=e;if(!this._subscriptions.delete(t))return;this._acked?.delete(t),this._admissionRetries!==null&&this.dropAdmissionRetry(t),this._presence!==null&&this.unsyncPresence(t),this._presenceUnfollowed?.delete(t);let r={channel:t,reason:n};this.rejectAckWaiters(t,Mx,r),this.fireLocal(By.closed,r)}ingestWelcome(e){if(this._subscriptionAcks=Hy(e,`subscriptionAcks`)===!0,this.adoptCodec(Hy(e,`codec`),Hy(e,`bytes`)),typeof e!=`object`||!e)return;this._identity=Ix(Hy(e,`identity`)),this._serverChannels=Fx(Hy(e,`channels`)),this._serverMethods=Fx(Hy(e,`methods`));let t=Hy(e,`env`);Tb(typeof t==`string`?t:void 0),this.intentionalClose||kb(this),Eb()&&this.startFrameLog()&&this.recordFrame(`in`,Kv(`realtime:welcome`,e),0,!1),this.opts.banner!==!1&&!Rb()&&this.detailsSocket(),this.fireLocal(By.identity,this._identity)}detailsSocket(){let e={};for(let t of yb(lb(this)))e[t.label]={valeur:t.value};Lb(e,this,`socket nodefony — détail et raccourcis`)}ingestDenied(e){let t=Hy(e,`channel`),n=typeof t==`string`?t:``,r=Hy(e,`reason`),i=r===`unknown`||r===`limit`||r===`unavailable`?r:`forbidden`,a=Hy(e,`detail`),o=typeof a==`string`?a:void 0,s=i===`unavailable`?Hy(e,`retryAfterMs`):void 0,c=typeof s==`number`&&Number.isFinite(s)&&s>=0?s:void 0;if(i===`unavailable`&&this._subscriptions.has(n)&&this.scheduleAdmissionRetry(n,c))return;let l={channel:n,reason:i,...o===void 0?{}:{detail:o},...c===void 0?{}:{retryAfterMs:c}};this.fireNotice(Yv(l)),this.fireLocal(By.denied,l),this.rejectAckWaiters(n,jx,l)}dispatchNotification(e,t){e===`realtime:welcome`?(this.ingestWelcome(t),this.replaySubscriptions()):e===`realtime:subscribed`?this.ingestSubscribed(t):e===`realtime:denied`?this.ingestDenied(t):e===`realtime:closed`?this.ingestClosed(t):e===`realtime:presence`&&this.ingestPresence(t),this.trackFrame(e);let n=this.handlers.get(e);if(n!==void 0)for(let e of n)try{e(t)}catch{}let r=this.handlers.get(`*`);if(r!==void 0)for(let n of r)try{n(e,t)}catch{}}handleServerError(e){if(typeof e!=`object`||!e||!(`error`in e)||`id`in e&&Hv(e.id))return;let t=e.error;if(typeof t!=`object`||!t)return;let n=`message`in t&&typeof t.message==`string`?t.message:``;this.fireNotice({level:`error`,title:`Temps réel`,message:n||`Erreur serveur temps réel`,source:`server`,code:`code`in t&&typeof t.code==`number`?t.code:void 0,ts:Date.now()})}startStatsSampler(){this.statsTimer||(this.statsTimer=setInterval(()=>{for(let e of this._stats.values()){let t=this._prevSampled.get(e.method)??e.msgCount;e.rate=Math.max(0,e.msgCount-t),this._prevSampled.set(e.method,e.msgCount),e.series=[...e.series,e.rate].slice(-32)}this.fireLocal(By.stats)},1e3),rb(this.statsTimer))}fireNotice(e){this.fireLocal(By.notice,e)}fireLocal(e,...t){let n=this.handlers.get(e);if(n!==void 0)for(let e of n)try{e(...t)}catch{}}openSocket(){return new Promise((e,t)=>{if(this._welcomed=!1,this._acked=null,this.peer.codec=this.codecs.text,this._rawBinaryNoticed=!1,this.setState(this.reconnectAttempt>0?`reconnecting`:`connecting`),this.intentionalClose){t(Error(`[nodefony] connexion temps réel annulée par disconnect()`));return}let n,r=null;try{let e=Cx(this.requireUrl(),typeof window<`u`?window.location.href:`http://localhost`);r=e,this.opts.token&&e.searchParams.set(`token`,this.opts.token),n=this.transportFactory(e.toString(),this.codecs.offer),this.transport=n,this._dropBalance=0}catch(e){this.setState(`error`),t(e instanceof Error?e:Error(String(e),{cause:e}));return}let i=0,a=()=>this.transport!==n;n.onOpen(()=>{if(a()){n.close(1e3,`client disconnect`),e();return}this.connectTimer&&clearTimeout(this.connectTimer),this.connectTimer=null,i=Date.now();let t=this.reconnectAttempt>0;this._nextRetryAt=null,this.setState(`connected`),this.intentionalClose||(this.startHeartbeat(),t&&this.fireNotice({level:`success`,title:`Temps réel`,message:`Connexion temps réel rétablie`,source:`realtime`,ts:Date.now()})),e()}),n.onMessage(e=>{a()||this.handleMessage(e)}),n.onError(()=>{}),n.onClose((e,n)=>{i===0&&t(Error(`[nodefony] connexion temps réel fermée avant ouverture (code ${e})`)),a()||(this.clearTimers(),this.transport=null,this._presence!==null&&this.unsyncPresence(null),this.intentionalClose?this.setState(`disconnected`):(this.peer.dispose(`[nodefony] connexion temps réel fermée (code ${e}${n===``?``:` : ${n}`}) : réponse impossible`),i!==0&&Date.now()-i>=yx&&(this.reconnectAttempt=0),i===0&&this.opts.probe!==!1&&(e===1006||e===1005)?this.probeThenSettle(r,e,n):this.settleClose(e,n)))});let o=this.opts.connectTimeout??bx;o>0&&(this.connectTimer=setTimeout(()=>{this.connectTimer=null,n.close(1e3,`connect timeout`)},Math.min(o,mx)));try{n.connect()}catch(e){this.clearTimers(),this.transport=null,this.setState(`error`),t(e instanceof Error?e:Error(String(e),{cause:e}))}})}disconnectRequested(){return this.intentionalClose}settleClose(e,t){let n=Qv(e,t);if(n&&this.fireNotice(n),this.disconnectRequested())return;let r=ey(e);r&&this.opts.autoReconnect!==!1?this.scheduleReconnect():this.setState(r?`disconnected`:`error`)}async probeThenSettle(e,t,n){let r=this.opts.probe,i=this.opts.token??null,a;try{a=r?await r(wx(e),i):await Tx(wx(e),i,this.opts.headers)}catch{a=null}if(!(this.disconnectRequested()||this.transport!==null)){if(a!==null&&ty(a)){if(this.fireNotice(ny(a)),this.disconnectRequested())return;this.setState(`error`)}else this.settleClose(t,n)}}scheduleReconnect(){this.reconnectAttempt++;let e=Sx(this.reconnectAttempt,this.opts.reconnectDelay??1e3,this.opts.reconnectDelayMax??3e4);this._nextRetryAt=Date.now()+e,this.reconnectTimer=setTimeout(()=>{this.openSocket().catch(()=>{})},e),this.setState(`reconnecting`),this.intentionalClose||this.fireLocal(By.reconnect,{attempt:this.reconnectAttempt,delay:e,nextRetryAt:this._nextRetryAt})}startHeartbeat(){let e=this.opts.heartbeatInterval??3e4;this.heartbeatTimer=setInterval(()=>{this.transport?.readyState===Vy.OPEN&&this._emitRaw(`ping`,{ts:Date.now()})},e)}scheduleAdmissionRetry(e,t){let n=this._admissionRetries??=new Map,r=n.get(e)?.attempt??0;if(r>=hx)return n.delete(e),!1;let i=setTimeout(()=>{this._emitRaw(`subscribe`,{channel:e})},vx(r,t));return n.set(e,{attempt:r+1,timer:i}),!0}ingestPresence(e){let t=Hy(e,`channel`);if(typeof t!=`string`)return;let n=this._presence?.get(t);if(n===void 0){this._subscriptions.has(t)&&(this._presenceUnfollowed??=new Set).add(t);return}if(!$y(e))return;let r=n.view.synced,i=n.view.apply(e);i===`applied`?n.notify():i===`gap`&&(r&&n.notify(),this.resyncPresence(n))}resyncPresence(e){if(e.timer!==null||!this._welcomed||!this._subscriptions.has(e.view.channel))return;let t=e.lastResync===0?0:e.lastResync+Wy*(1+Math.random()*Gy)-Date.now();t<=0?this.emitPresenceResync(e):e.timer=setTimeout(()=>{e.timer=null,this.emitPresenceResync(e)},t)}emitPresenceResync(e){let t=e.view.channel;this._welcomed&&this._subscriptions.has(t)&&(e.lastResync=Date.now(),this._emitRaw(`subscribe`,{channel:t}),e.view.unsync()&&e.notify())}unsyncPresence(e){let t=this._presence;if(t!==null){if(e!==null){let n=t.get(e);if(n===void 0)return;n.cancel(),n.view.unsync()&&n.notify()}else for(let e of t.values())e.cancel(),e.view.unsync()&&e.notify()}}dropAdmissionRetry(e){let t=this._admissionRetries;if(t===null)return;let n=t.get(e);n!==void 0&&(clearTimeout(n.timer),t.delete(e))}clearTimers(){if(this._admissionRetries!==null){for(let e of this._admissionRetries.values())clearTimeout(e.timer);this._admissionRetries=null}this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.heartbeatTimer&&clearInterval(this.heartbeatTimer),this.connectTimer&&clearTimeout(this.connectTimer),this.reconnectTimer=null,this.heartbeatTimer=null,this.connectTimer=null}get frameLogSince(){return this._frameLogSince}startFrameLog(){return!this._frameLogOn&&(this._frameLogOn=!0,this._frameLogSince=Date.now(),!0)}get frameLog(){return this.startFrameLog(),(this._rawFrames?.toArray()??[]).map(t=>e.buildFrame(t.dir,t.msg,t.ts,t.size,t.binary))}clearFrameLog(){this._rawFrames?.clear(),this._rawFramesChars=0}recordFrame(t,n,r,i,a=Date.now()){let o=dx(r),s=o===0&&r>0?Ex(n,r,i):n,c=this._rawFrames??=new ib(lx),l;for(c.length===lx&&(l=c.shift(),l!==void 0&&(this._rawFramesChars-=dx(l.size))),l===void 0?l={ts:a,dir:t,msg:s,size:r,binary:i}:(l.ts=a,l.dir=t,l.msg=s,l.size=r,l.binary=i),c.push(l),this._rawFramesChars+=o;this._rawFramesChars>ux;){let e=c.shift();if(e===void 0)break;this._rawFramesChars-=dx(e.size)}let u=this.handlers.get(By.frame);u&&u.size>0&&this.fireLocal(By.frame,e.buildFrame(t,s,a,r,i))}static buildFrame(e,t,n,r,i){let a=Hy(t,`method`),o=Hy(t,`id`),s=`?`,c;if(typeof a==`string`){s=a;let e=Hy(Hy(t,`params`),`channel`);typeof e==`string`&&(c=e)}else Hy(t,`error`)===void 0?Hy(t,`result`)!==void 0&&(s=`response`):s=`error`;return{ts:n,dir:e,kind:s,id:typeof o==`number`?o:void 0,channel:c,payload:Ox(t),size:r,binary:i}}admitFrame(){return this.transport?.readyState===Vy.OPEN?this.admitOutbound(this.transport):(this._framesUnsent++,!1)}writeFrame(e,t){let n=this.transport;if(n===null)return!1;n.send(e);let r=this._wire;return r!==null&&(r.framesOut++,r.sizeOut+=e.length,typeof e!=`string`&&r.binaryOut++),this._frameLogOn&&this.recordFrame(`out`,t,e.length,typeof e!=`string`),!0}noticeUnsent(){this._unsentNotified||(this._unsentNotified=!0,this.fireNotice({level:`warning`,title:`Temps réel`,message:`Connexion interrompue — les messages émis pendant la coupure sont perdus`,source:`realtime`,ts:Date.now()}))}handleMessage(e){let t=this.peer.codec;if(typeof e!=`string`&&t!==this.codecs.binary){if(this._binaryHandlers!==null){for(let t of this._binaryHandlers)try{t(e)}catch{}return}++this._binaryFramesDiscarded===1&&this.fireNotice(ry(`binary`,t.protocol));return}let n=this._wire,r=n===null?0:performance.now(),i;try{i=this.peer.decode(e)}catch{++this._malformedFramesDiscarded===1&&this.fireNotice(ry(`malformed`,t.protocol));return}let a=typeof e!=`string`;n!==null&&(n.decodeMs+=performance.now()-r,n.framesIn++,n.sizeIn+=e.length,a&&n.binaryIn++),this.receive(i,e.length,a)}setState(e){this._state!==e&&(e===`connected`&&(this._unsentNotified=!1),this._state=e,this.fireLocal(By.state,e))}},zx=Object.prototype,Bx=Function.prototype,Vx=e=>zx.toString.call(e),Hx=e=>Bx.toString.call(e),Ux=Hx(Object),Wx=Object.getPrototypeOf,Gx=e=>{if(typeof e!=`object`||!e||Vx(e)!==`[object Object]`)return!1;let t=Wx(e);if(!t||t===zx)return!0;let n=Object.hasOwn(t,`constructor`)&&t.constructor;return typeof n==`function`&&Hx(n)===Ux};function Kx(e,t){if(!qx(e))throw TypeError(`${t} : gestionnaire de message attendu.`);return e}function qx(e){return typeof e==`function`}function Jx(e){let t=e.kernel?.get(`realtime`)??e.client;if(!t&&e.kernel&&!e.url)throw Error("connectShared : le noyau fourni n'a composé aucune socket temps réel (realtime: false) — lui en composer une, ou donner `client` ou `url`.");let n=t??Rx.shared({url:e.url}),r=!t;return{socket:n,owned:r,start(){r&&n.connect().catch(()=>{})}}}function Yx(e,t){return t(e.state),e.onState(t)}function Xx(e,t,n){let r=e.channel(t);return r.on(e=>n(e)),r.open(),()=>r.close()}function Zx(e,t,n=!0){return`${e}|${t}|${+!!n}`}var Qx=`/nodefony/security/api/auth`,$x=`/nodefony/security/api/webauthn`,eS=`/nodefony/security/api/oauth2`,tS=`${Qx}/login`,nS=`${Qx}/login/totp`,rS=`${Qx}/logout`,iS=`${Qx}/me`,aS=`${$x}/login/options`,oS=`${$x}/login/verify`,sS=`${$x}/status`,cS=`${eS}/providers`;function lS(e,t,n){let r=`${eS}/${encodeURIComponent(e)}/authorize`,i=[];return t&&i.push(`from=${encodeURIComponent(t)}`),n&&i.push(`back=${encodeURIComponent(n)}`),i.length===0?r:`${r}?${i.join(`&`)}`}var uS=`access_denied`,dS=`totp`;Object.freeze({frontispiece:{layout:`split`,backdrop:!1},ledger:{layout:`bare`,backdrop:!1},horizon:{layout:`card`,backdrop:!1},console:{layout:`card`,backdrop:!1},blueprint:{layout:`card`,backdrop:!0},dots:{layout:`card`,backdrop:!0},minimal:{layout:`bare`,backdrop:!1},enterprise:{layout:`card`,backdrop:!0},"photo-card":{layout:`card`,backdrop:!0}});var fS=new Set([dS]),pS=30,mS=class extends Error{};function hS(e){return typeof e==`object`&&e&&`result`in e?e.result:e}function gS(e,t){if(typeof e==`object`&&e)return Reflect.get(e,t)}function _S(e){let t=typeof e==`string`?Number(e):e;return typeof t==`number`&&Number.isFinite(t)&&t>0?Math.ceil(t):null}function vS(e){let t=gS(e.body,`error`);return e.retryAfterS??_S(gS(e.body,`retryAfter`))??_S(gS(t,`retryAfter`))}function yS(e){let t=gS(e,`error`);if(typeof t==`string`)return t;let n=gS(t,`message`);if(typeof n==`string`)return n;let r=gS(e,`message`);return typeof r==`string`?r:``}function bS(e){let t=gS(e,`id`);return(typeof t==`string`||typeof t==`number`)&&typeof gS(e,`identifier`)==`string`&&Array.isArray(gS(e,`roles`))}function xS(e){let t=gS(e,`user`);return bS(t)?t:null}function SS(e){let t=gS(e,`providers`);return Array.isArray(t)?t.flatMap(e=>{let t=gS(e,`name`);if(typeof t!=`string`||t===``)return[];let n=gS(e,`label`);return[{name:t,label:typeof n==`string`?n:t}]}):[]}function CS(){let e=globalThis,t=e.PublicKeyCredential?.parseRequestOptionsFromJSON,n=e.navigator?.credentials,r=n?.get;return typeof t!=`function`||typeof r!=`function`?null:{async sign(i){let a=t.call(e.PublicKeyCredential,i),o=await r.call(n,{publicKey:a}),s=gS(o,`toJSON`);if(typeof s!=`function`)throw TypeError(`assertion WebAuthn non sérialisable`);return s.call(o)}}}function wS(e){let t=gS(e,`name`);return t===`NotAllowedError`||t===`AbortError`}function TS(){let e=globalThis.location;return e===void 0?void 0:`${e.pathname}${e.search}`}var ES=class{#e;#t;#n;#r;#i;#a;#o;#s=null;#c=null;constructor(e={}){this.#e=e.baseUrl??``,this.#t=e.fetch??((e,t)=>globalThis.fetch(e,t)),this.#n=e.now??Date.now,this.#r=e.navigate??(e=>{globalThis.location.assign(e)}),this.#i=e.passkey===void 0?CS():e.passkey,this.#a=e.defaultRetryAfterS??pS;let t=(e.identifier??``).trim();this.#o={step:t===``?`identifier`:`password`,identifier:t,pending:!1,user:null,mfaMethods:[],error:null,providers:null,passkeyAvailable:this.#i!==null}}getState=()=>this.#o;subscribe=e=>((this.#s??=[]).push(e),()=>{if(this.#s===null)return;let t=this.#s.indexOf(e);t!==-1&&this.#s.splice(t,1),this.#s.length===0&&(this.#s=null)});submitIdentifier(e){let t=e.trim();t!==``&&this.#l({step:`password`,identifier:t,error:null})}submitPassword(e){let t=this.#o.identifier;return t===``?Promise.resolve(this.#o):this.#h(async()=>{let n=await this.#u(`POST`,tS,{username:t,password:e});if(n.status===202&&gS(n.body,`mfaRequired`)===!0){let e=gS(n.body,`methods`),t=Array.isArray(e)?e.filter(e=>fS.has(e)):[];return t.length===0?this.#l({pending:!1,error:{kind:`server`,message:``,status:n.status,retryAt:null}}):this.#l({step:`mfa`,pending:!1,mfaMethods:t})}return this.#d(n)})}login(e,t){return this.submitIdentifier(e),this.submitPassword(t)}submitMfaCode(e){return this.#o.step===`mfa`?this.#h(async()=>this.#d(await this.#u(`POST`,nS,{code:e.replace(/\s+/gu,``)}))):Promise.resolve(this.#o)}loginWithPasskey(){let e=this.#i;return e===null?Promise.resolve(this.#l({error:{kind:`unsupported`,message:``,status:null,retryAt:null}})):this.#h(async()=>{let t=await this.#u(`POST`,aS,{});if(t.status!==200)return this.#p(t);let n=await e.sign(t.body);return this.#d(await this.#u(`POST`,oS,{response:n}))})}loadProviders(){return this.#c??=this.#u(`GET`,cS).then(e=>{if(e.status!==200)return this.#c=null,[];let t=SS(e.body);return this.#l({providers:t}),t},()=>(this.#c=null,[]))}startProvider(e,t,n){this.#r(`${this.#e}${lS(e,t,n??TS())}`)}async me(){try{let e=await this.#u(`GET`,iS),t=e.status===200?xS(e.body):null;return t!==null&&this.#f(t),t}catch{return null}}async logout(){let e=null;try{let t=gS((await this.#u(`POST`,rS)).body,`logoutUrl`);e=typeof t==`string`&&t!==``?t:null}catch{e=null}finally{this.#l({step:`identifier`,pending:!1,user:null,mfaMethods:[],error:null})}return e}back(){this.#o.pending||this.#l({step:`identifier`,mfaMethods:[],error:null})}#l(e){this.#o={...this.#o,...e};let t=this.#s;if(t!==null)for(let e of t.slice())e(this.#o);return this.#o}async#u(e,t,n){let r;try{r=await this.#t(`${this.#e}${t}`,{method:e,credentials:`same-origin`,headers:n===void 0?{accept:`application/json`}:{accept:`application/json`,"content-type":`application/json`},...n===void 0?{}:{body:JSON.stringify(n)}})}catch(e){throw new mS(e instanceof Error?e.message:String(e))}let i;try{i=hS(await r.json())}catch{i=null}return{status:r.status,body:i,retryAfterS:_S(r.headers.get(`retry-after`))}}#d(e){let t=e.status===200?xS(e.body):null;return t===null?this.#p(e):this.#f(t)}#f(e){return this.#l({step:`authenticated`,identifier:e.identifier,pending:!1,user:e,mfaMethods:[],error:null})}#p(e,t){if(e===null)return this.#l({pending:!1,error:wS(t)?{kind:`cancelled`,message:``,status:null,retryAt:null}:{kind:t instanceof mS?`network`:`server`,message:t instanceof Error?t.message:``,status:null,retryAt:null}});if(e.status===429){let t=vS(e)??this.#a;return this.#l({pending:!1,error:{kind:`throttled`,message:yS(e.body),status:429,retryAt:this.#n()+t*1e3}})}return this.#l({pending:!1,error:{kind:e.status===401||e.status===403?`credentials`:`server`,message:yS(e.body),status:e.status,retryAt:null}})}#m(){let e=this.#o.error?.retryAt??null;return e!==null&&this.#n()<e}async#h(e){if(this.#o.pending||this.#m())return this.#o;this.#l({pending:!0,error:null});try{return await e()}catch(e){return this.#p(null,e)}}},DS=`text/event-stream`;function OS(e){return e.status===200&&(e.headers.get(`Content-Type`)??``).split(`;`)[0]?.trim().toLowerCase()===DS}var kS=4194304,AS=class extends RangeError{constructor(e){super(`Événement SSE au-delà de ${e} caractères`),this.name=`SseLimitError`}},jS=/^[0-9]+$/,MS=class{#e;#t=/\r\n|\r|\n/g;#n=``;#r=!1;#i=!0;#a=``;#o=!1;#s=``;#c=``;#l=``;#u;constructor(e,t=``,n=kS){this.#e=e,this.#u=n,this.#c=t,this.#l=t}get lastEventId(){return this.#l}push(e){let t=e;this.#r&&t.length>0&&(this.#r=!1,t.charCodeAt(0)===10&&(t=t.slice(1))),this.#i&&t.length>0&&(this.#i=!1,t.charCodeAt(0)===65279&&(t=t.slice(1)));let n=0;this.#t.lastIndex=0;for(let e=this.#t.exec(t);e!==null;e=this.#t.exec(t)){let r=n===0&&this.#n.length>0?this.#n+t.slice(0,e.index):t.slice(n,e.index);n===0&&(this.#n=``),n=e.index+e[0].length,e[0]===`\r`&&n===t.length&&(this.#r=!0),this.#d(r)}if(n<t.length&&(this.#n=n===0?this.#n+t:t.slice(n),this.#n.length>this.#u))throw new AS(this.#u)}end(){this.#n=``,this.#r=!1,this.#a=``,this.#o=!1,this.#s=``,this.#c=this.#l}#d(e){if(e.length===0){this.#p();return}if(e.charCodeAt(0)===58)return;let t=e.indexOf(`:`);if(t===-1){this.#f(e,``);return}let n=e.slice(t+1);n.charCodeAt(0)===32&&(n=n.slice(1)),this.#f(e.slice(0,t),n)}#f(e,t){switch(e){case`event`:this.#s=t;break;case`data`:if(this.#a=this.#o?`${this.#a}\n${t}`:t,this.#o=!0,this.#a.length>this.#u)throw new AS(this.#u);break;case`id`:t.includes(`\0`)||(this.#c=t);break;case`retry`:jS.test(t)&&this.#e.onRetry?.(Number.parseInt(t,10))}}#p(){if(this.#l=this.#c,!this.#o){this.#s=``;return}let e={type:this.#s===``?`message`:this.#s,data:this.#a,lastEventId:this.#l};this.#a=``,this.#o=!1,this.#s=``,this.#e.onEvent(e)}},NS=3e3,PS=250,FS=2147483647,IS=1e4;function LS(e){return Math.min(Math.max(e,PS),FS)}function RS(e){return Math.min(Math.round(e+e/2*Math.random()),FS)}function zS(e){let t=``;for(let n of new TextEncoder().encode(e))t+=String.fromCharCode(n);return t}Object.freeze({readyState:class e extends EventTarget{static CONNECTING=0;static OPEN=1;static CLOSED=2;CONNECTING=0;OPEN=1;CLOSED=2;url;withCredentials;onopen=null;onmessage=null;onerror=null;#e=e.CONNECTING;#t;#n;#r=null;#i=null;#a=null;#o;constructor(e,t={}){super();let n=globalThis.location?.href,r=new URL(e,n);if(r.protocol!==`http:`&&r.protocol!==`https:`)throw TypeError(`NodefonySse : schéma non pris en charge (${r.protocol})`);if(/[\r\n\0]/.test(t.lastEventId??``))throw TypeError(`NodefonySse : lastEventId ne peut contenir ni CR, ni LF, ni NUL`);this.url=r.href,this.withCredentials=t.withCredentials===!0,this.#t=LS(t.retry??NS),this.#n=t.lastEventId??``,this.#o=t,this.#s()}get readyState(){return this.#e}get lastEventId(){return this.#n}close(){this.#e=e.CLOSED,this.#i!==null&&(clearTimeout(this.#i),this.#i=null),this.#u();let t=this.#r;this.#r=null,t?.abort()}#s(){this.#i=null;let e=new AbortController;this.#r=e;let t={Accept:DS,"Cache-Control":`no-cache`,...this.#o.headers};this.#n!==``&&(t[`Last-Event-ID`]=zS(this.#n));let n={method:this.#o.method??`GET`,headers:t,cache:`no-store`,credentials:this.withCredentials?`include`:`same-origin`,signal:e.signal};this.#o.body!==void 0&&(n.body=this.#o.body);let r=this.#o.connectTimeout??IS;r>0&&(this.#a=setTimeout(()=>{this.#a=null,e.abort()},Math.min(r,FS))),(this.#o.fetch??fetch)(this.url,n).then(t=>this.#c(t,e),()=>this.#l(e)).catch(()=>this.#l(e))}async#c(t,n){if(n!==this.#r)return;if(this.#u(),!OS(t)){await t.body?.cancel().catch(()=>void 0),this.#d();return}let r=t.body;if(r===null){this.#l(n);return}this.#e=e.OPEN,this.#f(new Event(`open`),this.onopen);let i=new MS({onEvent:e=>{if(n!==this.#r)return;this.#n=e.lastEventId;let r=new MessageEvent(e.type,{data:e.data,lastEventId:e.lastEventId,origin:new URL(t.url||this.url).origin});this.#f(r,e.type===`message`?this.onmessage:null)},onRetry:e=>{this.#t=LS(e)}},this.#n,this.#o.maxEventSize),a=r.getReader(),o=new TextDecoder;try{for(;;){let{done:e,value:t}=await a.read();if(e)break;if(n!==this.#r)return;i.push(o.decode(t,{stream:!0}))}}catch(e){if(e instanceof AS){a.cancel().catch(()=>void 0),n.abort(),this.#d();return}}n.abort(),i.end(),this.#n=i.lastEventId,this.#l(n)}#l(t){t===this.#r&&(this.#u(),this.#e!==e.CLOSED&&(this.#e=e.CONNECTING,this.#f(new Event(`error`),this.onerror),this.#e===e.CONNECTING&&(this.#i=setTimeout(()=>this.#s(),RS(this.#t)))))}#u(){this.#a!==null&&(clearTimeout(this.#a),this.#a=null)}#d(){this.#u(),this.#e=e.CLOSED,this.#r=null,this.#f(new Event(`error`),this.onerror)}#f(e,t){if(this.dispatchEvent(e),t!==null)try{t.call(this,e)}catch(e){queueMicrotask(()=>{throw e})}}}.CLOSED,lastEvent:null,error:!1});function BS(e){let t=e?.constructor?.name;return typeof t==`string`?t:void 0}var VS=0;function HS(){let e=function(){};return e.prototype=Object.create(null),e}var US=class e{protoService;services;#e=null;scopes=null;constructor(t,n){this.protoService=n??HS(),t&&t instanceof e?(this.services=Object.create(t.protoService.prototype),this.setServices(t.services??{})):this.services=Object.create(this.protoService.prototype)}get id(){return this.#e??=(++VS).toString(36),this.#e}get closed(){return this.services===null}setServices(e){for(let t in e)this.set(t,e[t])}log(e,t,n,r){let i=this.get(`syslog`);if(!i)console.warn(`[Container] no syslog registered —`,e);else return n||=`SERVICES CONTAINER`,i.log(e,t,n,r)}set(e,t){if(this.services&&e)this.protoService.prototype[e]=t,this.services[e]=t;else throw Error(`Container bad argument name`)}get(e){let t=this.services?.[e];return t===void 0?null:t}remove(e){return this.services?e in this.services&&(delete this.services[e],e in this.protoService.prototype&&delete this.protoService.prototype[e],!0):!1}has(e){return this.services!=null&&e in this.services}keys(){return Object.keys(this.services??{})}entries(){return Object.entries(this.services??{})}addScope(e){this.scopes??=new Map;let t=this.scopes.get(e);return t||(t=new Set,this.scopes.set(e,t)),t}enterScope(e){let t=this.scopes?.get(e);if(!t)throw Error(`Scope "${e}" not declared. Call addScope("${e}") first.`);let n=new WS(e,this,this.protoService);return t.add(n),n}leaveScope(e){this.scopes?.get(e.name)?.delete(e)&&e.clean()}scopeCount(e){return this.scopes?.get(e)?.size??0}removeScope(e){let t=this.scopes?.get(e);if(t){for(let e of t)this.leaveScope(e);this.scopes?.delete(e)}}removeAllScopes(){if(this.scopes){for(let e of this.scopes.keys())this.removeScope(e);this.scopes=null}}clean(){this.removeAllScopes(),this.services=null}reset(){this.clean(),this.protoService=HS(),this.services=Object.create(this.protoService.prototype)}},WS=class e extends US{name;owned=null;constructor(t,n,r){super(void 0,r),this.name=t,n instanceof e&&n.services!==null&&(this.services=Object.create(n.services))}reset(){throw Error(`reset() is not allowed on scope "${this.name}": leave it with leaveScope() and enter a new one`)}set(e,t){if(this.services&&e)this.services[e]=t;else throw Error(`Container bad argument name`)}remove(e){return this.services&&Object.prototype.hasOwnProperty.call(this.services,e)?(delete this.services[e],!0):!1}hasOwn(e){return this.services!==null&&Object.prototype.hasOwnProperty.call(this.services,e)}own(e){if(this.services===null)throw Error(`own() sur le scope « ${this.name} », déjà fermé : l'objet ne serait jamais nettoyé.`);this.owned===null?this.owned=[e]:this.owned.push(e)}clean(){let t=this.owned;if(t!==null){this.owned=null;for(let n=t.length-1;n>=0;n--){let r=t[n];try{let t=r.clean?.();if(t!=null&&typeof t.then==`function`){let n=this.get(`syslog`);Promise.resolve(t).catch(t=>{let i=e.cleanFailure(this.name,r,t);n?n.log(i,`ERROR`,`SERVICES CONTAINER`):console.warn(`[Container] ${i}`)})}}catch(t){this.log(e.cleanFailure(this.name,r,t),`ERROR`)}}}return super.clean()}static cleanFailure(e,t,n){return`clean() de « ${typeof t.name==`string`?t.name:BS(t)} », rattaché au scope « ${e} », a levé : `+(n instanceof Error?n.message:String(n))}};function GS(){let e=globalThis.crypto;if(typeof e.randomUUID==`function`)return e.randomUUID();let t=e.getRandomValues(new Uint8Array(16));t[6]=(t[6]??0)&15|64,t[8]=(t[8]??0)&63|128;let n=``;for(let e of t)n+=e.toString(16).padStart(2,`0`);return`${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}var KS=Symbol.for(`nodefony.packageInstances`);function qS(){return globalThis[KS]??[]}function JS(){return qS().length>1}var YS=class{_listeners=new Map;_maxListeners=10;on(e,t){let n=this._listeners.get(e)??[];return n.push(t),this._listeners.set(e,n),this}addListener(e,t){return this.on(e,t)}once(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.on(e,n)}off(e,t){let n=this._listeners.get(e);if(!n)return this;let r=n.indexOf(t);return r!==-1&&n.splice(r,1),n.length===0&&this._listeners.delete(e),this}removeListener(e,t){return this.off(e,t)}removeAllListeners(e){return e===void 0?this._listeners.clear():this._listeners.delete(e),this}emit(e,...t){let n=this._listeners.get(e);if(!n||n.length===0)return!1;for(let e of n.slice())try{e(...t)}catch(e){console.error(`[EventEmitter] listener threw:`,e)}return!0}listenerCount(e){return this._listeners.get(e)?.length??0}listeners(e){return(this._listeners.get(e)??[]).slice()}eventNames(){return Array.from(this._listeners.keys())}setMaxListeners(e){return this._maxListeners=e,this}getMaxListeners(){return this._maxListeners}rawListeners(e){return(this._listeners.get(e)??[]).slice()}prependListener(e,t){let n=this._listeners.get(e)??[];return n.unshift(t),this._listeners.set(e,n),this}prependOnceListener(e,t){let n=(...r)=>{this.off(e,n),t(...r)};return this.prependListener(e,n)}},XS=/^on(.*)$/;function ZS(e){return e!=null&&typeof e.then==`function`}var QS=class extends YS{constructor(e,t,n){super(),n?.nbListeners!==void 0&&this.setMaxListeners(n.nbListeners),e&&this.settingsToListen(e,t)}settingsToListen(e,t){for(let n of Object.keys(e)){let r=XS.exec(n);r&&(t?this.listen(t,r[0],e[n]):this.on(r[0],e[n]))}}listen(e,t,n){return typeof n==`function`&&this.addListener(t,n.bind(e)),(...e)=>this.emit(t,...e)}fire(e,...t){return super.emit(e,...t)}async emitAsync(e,...t){if(this.listenerCount(e)===0)return!1;let n=this.rawListeners(e),r=[];for(let e of n){let n=Reflect.apply(e,this,t);r.push(ZS(n)?await n:n)}return r}async fireAsync(e,...t){return this.emitAsync(e,...t)}async emitAsyncGuarded(e,t={},...n){let r=[],i=[];if(this.listenerCount(e)===0)return{results:r,errors:i,stopped:!1};let a=this.rawListeners(e),o=t.timeoutMs??0,s=typeof o==`function`,c=t.warnMs??0,l=c>0;for(let e=0;e<a.length;e+=1){let u=a[e],d=s?o(u,e):o,f=l?Date.now():0,p=!1;try{let i=Promise.resolve(Reflect.apply(u,this,n)),a;if(d>0){i.catch(()=>{});let e;try{a=await Promise.race([i,new Promise((t,n)=>{e=setTimeout(()=>{p=!0,n(Error(`listener timeout après ${d}ms`))},d),rb(e)})])}finally{e&&clearTimeout(e)}}else a=await i;if(r.push(a),l&&t.onListenerSlow){let n=Date.now()-f;n>=c&&t.onListenerSlow({index:e,listener:u,timedOut:!1,durationMs:n})}}catch(n){let a=l?Date.now()-f:0,o=p?Error(`listener timeout après ${d}ms`):n;if(i.push({index:e,error:o,timedOut:p}),t.onListenerError?.(o,{index:e,listener:u,timedOut:p,durationMs:a})===!0)return{results:r,errors:i,stopped:!0}}}return{results:r,errors:i,stopped:!1}}},$S=function(e){return e[e.EMERGENCY=0]=`EMERGENCY`,e[e.ALERT=1]=`ALERT`,e[e.CRITIC=2]=`CRITIC`,e[e.ERROR=3]=`ERROR`,e[e.WARNING=4]=`WARNING`,e[e.NOTICE=5]=`NOTICE`,e[e.INFO=6]=`INFO`,e[e.DEBUG=7]=`DEBUG`,e}($S||{}),eC=[0,1,2,3,4,5,6,7],tC=[`EMERGENCY`,`ALERT`,`CRITIC`,`ERROR`,`WARNING`,`NOTICE`,`INFO`,`DEBUG`],nC=new Map(tC.map((e,t)=>[e,t]));function rC(e){return nC.has(e)}function iC(e){return e===void 0?void 0:nC.get(e)}function aC(e){throw Error(`Not a valid nodefony syslog severity: ${String(e)}`)}var oC=`browser`,sC=function(e=`INFO`){let t=typeof e==`number`?eC[e]:$S[e];return typeof t==`number`?t:aC(e)},cC=Object.entries($S).reduce((e,[t,n])=>(e[t]=n,e),{}),lC=globalThis.Buffer,uC=globalThis.process?.pid??0,dC=e=>{if(e===null)return null;let t=typeof e;return t===`object`?Array.isArray(e)?`array`:e instanceof Date?`date`:e instanceof RegExp?`RegExp`:e instanceof Error?`Error`:lC?.isBuffer(e)?`buffer`:`object`:t},fC=0,pC=new Set([`payload`,`uid`,`severity`,`timeStamp`,`severityName`,`typePayload`,`moduleName`,`msgid`,`msg`,`status`,`pid`,`requestId`]),mC=class e{payload;uid;severity;timeStamp;severityName;typePayload;moduleName;msgid;msg;status;pid;requestId;static requestIdProvider=null;constructor(t,n,r=`nodefony`,i=``,a=``,o){this.timeStamp=o===void 0?Date.now():typeof o==`number`?o:o instanceof Date?o.getTime():new Date(o).getTime(),this.uid=++fC,this.severity=sC(n);let s=tC[this.severity];if(s===void 0)throw Error(`Invalid severity value: ${this.severity}`);this.severityName=s,this.typePayload=dC(t),this.payload=t,this.moduleName=r,this.msgid=i,this.msg=a,this.status=`NOTDEFINED`,this.pid=uC,this.requestId=e.requestIdProvider===null?void 0:e.requestIdProvider()}static sysLogSeverity(){return cC}static severityToString(e){let t=typeof e==`string`?parseInt(e,10):e;return isNaN(t)?typeof e==`string`&&rC(e)?e:void 0:tC[t]}getDate(){return new Date(this.timeStamp).toTimeString()}toString(){return`TimeStamp:${this.getDate()} Log:${String(this.payload)} ModuleName:${this.moduleName} SeverityName:${this.severityName} MessageID:${this.msgid} UID:${this.uid} Message:${this.msg}`}parseJson(e){let t=JSON.parse(e);if(!Gx(t))return null;for(let[e,n]of Object.entries(t))pC.has(e)&&Reflect.set(this,e,n);return t}},hC=(e,t)=>{try{return JSON.stringify(e,null,2)}catch{return String(e)}},gC=(e,t,n)=>String(t),_C=Array.isArray,vC=e=>_C(e);function yC(){let e=[];return vC(e)?e:{}}function bC(e,t,n){for(let r of Object.keys(n)){let i=n[r];if(r!==`__proto__`&&r!==`constructor`&&r!==`prototype`&&t!==i){if(e&&typeof i==`object`&&i){let e=vC(i);if(e||Gx(i)){let n=t[r],a;a=e?vC(n)?n:yC():Gx(n)?n:{},bC(!0,a,i),t[r]=a;continue}}i!==void 0&&(t[r]=i)}}}var xC=(...e)=>{let t=e[0]||{},n=1,r=!1,{length:i}=e;typeof t==`boolean`&&(r=t,t=e[n]||{},n++),typeof t!=`object`&&typeof t!=`function`&&(t={}),n===i&&(t={},n--);let a=t;for(;n<i;n++){let t=e[n];t!=null&&bC(r,a,t)}return a};globalThis.Buffer;var SC=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)`;RegExp(`^127\\.${SC}\\.${SC}\\.${SC}$`);var CC=new Set(`reset.bold.dim.italic.underline.inverse.strikethrough.black.red.green.yellow.blue.magenta.cyan.white.gray.blackBright.redBright.greenBright.yellowBright.blueBright.magentaBright.cyanBright.whiteBright.bgBlack.bgRed.bgGreen.bgYellow.bgBlue.bgMagenta.bgCyan.bgWhite.bgGray`.split(`.`)),wC=`\x1B[0m`;function TC(e){return new Proxy(t=>{let n=String(t);if(e.length===0)return n;try{return gC(e,n,{validateStream:!1})}catch{return n}},{get(t,n,r){return n===`reset`?wC:typeof n==`string`&&CC.has(n)?TC([...e,n]):Reflect.get(t,n,r)}})}var EC=TC([]),DC=1e4;function OC(e){return typeof e==`number`&&Number.isInteger(e)&&e>0&&e<=DC}function kC(e){if(typeof e!=`object`||!e)return!1;let t=e;return t.channel===`nf-dev`&&t.type===`resize`&&OC(t.columns)&&OC(t.rows)}var AC=`NF_DEV_TERMINAL`,jC=Symbol.for(`nodefony.terminalGate`);function MC(){let e=globalThis;return e[jC]??={verdict:void 0,resizeListeners:null},e[jC]}function NC(){return globalThis.process}function PC(e){if(e.length>1024)return null;let t;try{t=JSON.parse(e)}catch{return null}if(typeof t!=`object`||!t)return null;let n=t;return!OC(n.columns)||!OC(n.rows)?null:{input:!1,columns:n.columns,rows:n.rows}}function FC(){let e=MC();if(e.verdict!==void 0)return e.verdict;let t=NC(),n=t?.env[AC];if(e.verdict=null,n===void 0||t===void 0)return null;Reflect.deleteProperty(t.env,AC);let r=PC(n);if(r===null)return null;let i={columns:r.columns,rows:r.rows};return e.verdict=i,IC(t,e),i}function IC(e,t){typeof e.send==`function`&&(e.on(`message`,e=>{let n=t.verdict;if(!kC(e)||!n||(n.columns=e.columns,n.rows=e.rows,t.resizeListeners===null))return;let r={columns:n.columns,rows:n.rows};for(let e of t.resizeListeners)e(r)}),e.channel?.unref())}function LC(e,t){return e!==void 0&&(t===e.stdout||t===e.stderr)}function RC(e){if(e===void 0)return!1;let t=NC();if(FC()!==null){if(LC(t,e))return!0;if(e===t?.stdin)return!1}return e.isTTY??!1}var zC=[`cyan`,`magenta`,`red`,`green`,`yellow`,`blue`,`blackBright`,`yellowBold`,`redBold`,`cyanBold`,`blueBrightBold`,`cyanBgBlue`,`cyanBgBlack`],BC=e=>e,VC={cyan:EC.cyan,magenta:EC.magenta,red:EC.red,green:EC.green,yellow:EC.yellow,blue:EC.blue,blackBright:EC.blackBright,yellowBold:EC.yellow.bold,redBold:EC.red.bold,cyanBold:EC.cyan.bold,blueBrightBold:EC.blueBright.bold,cyanBgBlue:EC.cyan.bgBlue,cyanBgBlack:EC.cyan.bgBlack},HC={...VC},UC=!1;function WC(e){UC=e;for(let t of zC)HC[t]=e?VC[t]:BC}function GC(){return UC}function KC(e){let t={};return typeof t.NO_COLOR==`string`&&t.NO_COLOR!==``?!1:typeof t.FORCE_COLOR==`string`&&t.FORCE_COLOR!==``&&t.FORCE_COLOR!==`0`||e}var qC=globalThis.process;WC(KC(!qC?.env?.NF_NO_TTY&&RC(qC?.stdout)));function JC(e){let t={uid:e.uid,severity:e.severity,severityName:e.severityName,moduleName:e.moduleName,msgid:e.msgid,msg:e.msg,timeStamp:e.timeStamp,pid:e.pid,payload:e.payload};return e.requestId!==void 0&&(t.requestId=e.requestId),t}function YC(e,t){return t instanceof Error?{name:t.name,message:t.message,stack:t.stack}:t}function XC(e){return JSON.stringify(e,YC)}var ZC=e=>HC.yellowBold(e),QC=e=>HC.redBold(e),$C=e=>HC.cyanBold(e),ew=e=>HC.blueBrightBold(e),tw=e=>HC.green(e),nw=globalThis.process,rw=e=>e.replace(/\x1b\[[0-9;]*m/g,``),iw=`auto`,aw=null,ow=null,sw=0,cw=!1,lw=65536,uw=globalThis.setImmediate,dw=()=>(aw===null&&(aw=uw?iw===`on`||iw!==`off`&&!RC(nw?.stdout):!1),aw),fw={name:`stdout`,writeOut(e){nw?.stdout?nw.stdout.write(e):console.log(rw(e).replace(/\n$/,``))},writeErr(e){nw?.stderr?nw.stderr.write(e):console.error(rw(e).replace(/\n$/,``))},flushSync(){},close(){}},pw={name:`null`,writeOut(){},writeErr(){},flushSync(){},close(){}},mw=fw,hw=!1,gw=`text`,_w={hasSubscribers:!1,publish(){}},vw=e=>{hw||mw.writeOut(e)},yw=e=>{hw||mw.writeErr(e)},bw=()=>{cw=!1,ow&&ow.length>0&&(vw(ow.join(``)),ow.length=0,sw=0)},xw=e=>{bw(),iw=e===!0?`on`:e===!1?`off`:`auto`,aw=null},Sw=e=>{bw(),mw!==e&&mw!==fw&&mw!==pw&&mw.close(),mw=e??fw},Cw=e=>{dw()?(ow??=[],ow.push(e),sw+=e.length,sw>=lw?bw():!cw&&uw&&(cw=!0,uw(bw))):vw(e)},ww=e=>{ow&&ow.length>0&&bw(),yw(e)};if(nw?.on){let e=()=>{bw(),mw.flushSync()};nw.on(`exit`,e),nw.on(`beforeExit`,e)}var Tw=function(e){if(typeof e==`boolean`)return e;if(typeof e==`string`){if([`false`,`undefined`,`null`].includes(e))return!1;if(e===`true`||e===`*`)return!0;let t=e.split(/,| /);return t[0]===`*`||t}return Array.isArray(e)?e[0]===`*`||e:!1},Ew=function(e,t=!1){t=Tw(t);let n;return n=e===`development`?{severity:{operator:`<=`,data:t===!1?6:7}}:{severity:{operator:`<=`,data:t?7:6}},typeof t==`object`&&(n.msgid={operator:`==`,data:t}),n},Dw={moduleName:`SYSLOG`,msgid:``,maxStack:100,rateLimit:!1,burstLimit:3,defaultSeverity:`DEBUG`,checkConditions:`&&`,async:!1},Ow=mC.sysLogSeverity(),kw={"<":(e,t)=>e<t,">":(e,t)=>e>t,"<=":(e,t)=>e<=t,">=":(e,t)=>e>=t,"==":(e,t)=>e==t,"!=":(e,t)=>e!=t,"===":(e,t)=>e===t,"!==":(e,t)=>e!==t,RegExp:(e,t)=>t instanceof RegExp&&t.test(String(e))};function Aw(e){return Array.isArray(e)}var jw=e=>{switch(typeof e){case`object`:if(Aw(e))return e;throw Error(`checkFormatSeverity bad format type: object`);case`string`:return e.split(/,| /);case`number`:return[e];default:throw Error(`checkFormatSeverity bad format type : ${typeof e}`)}},Mw=function(e){if(e instanceof Date)return e.getTime();if(typeof e==`string`)return new Date(e).getTime();throw Error(`checkFormatDate bad format : ${String(e)}`)},Nw=function(e){if(typeof e==`string`)return e.split(/,| /);if(typeof e==`number`)return[e];if(e instanceof RegExp||Aw(e))return e;throw Error(`checkFormatMsgId bad format ${typeof e} : ${String(e)}`)},Pw=()=>!1;function Fw(e){return typeof e==`string`&&Object.prototype.hasOwnProperty.call(kw,e)}function Iw(e){return e===`&&`||e===`||`}function Lw(e){if(e){if(!Fw(e))throw Error(`Contitions bad operator : ${typeof e==`string`?e:typeof e}`);return e}}function Rw(e){return!e&&e!==0}function zw(e){if(!Gx(e))return null;let t=kw[Lw(e.operator)??`==`];if(Rw(e.data))return null;let n=[];for(let t of jw(e.data)){let e=typeof t==`number`||typeof t==`string`?iC(mC.severityToString(t)):void 0;if(e===void 0)return null;n.push(e)}let[r]=n;return n.length===1&&r!==void 0?e=>t(e.severity,r):e=>{for(let r of n)if(t(e.severity,r))return!0;return!1}}function Bw(e){if(!Gx(e))return null;let t=kw[Lw(e.operator)??`==`];if(Rw(e.data))return null;let n=Nw(e.data);if(n instanceof RegExp)return e=>n.test(e.msgid);let r=n.map(String);return e=>{for(let n of r)if(t(e.msgid,n))return!0;return!1}}function Vw(e){if(!Gx(e))return null;let t=Lw(e.operator);if(Rw(e.data))return null;let n=Mw(e.data);if(!n)return null;if(t===void 0)return Pw;let r=kw[t];return e=>r(e.timeStamp,n)}function Hw(e,t){if(typeof e!=`object`||!e)return null;let n=t,r=[];for(let t in e){let i=e[t];if(t===`checkConditions`&&Iw(i)){n=i;continue}let a=t===`severity`?zw(i):t===`msgid`?Bw(i):t===`date`?Vw(i):null;if(a===null)return null;r.push(a)}if(n===void 0||r.length===0)return null;let[i]=r;return r.length===1&&i!==void 0?i:n===`&&`?e=>{for(let t of r)if(!t(e))return!1;return!0}:e=>{for(let t of r)if(t(e))return!0;return!1}}var Uw=function(e,t,n,r,i){return new mC(e,t??this.settings.defaultSeverity,n,r,i)},Ww=(e,t)=>e===void 0||typeof e===t;function Gw(e){if(e!==void 0)return mC.severityToString(e)??aC(e)}function Kw(e){if(!Gx(e))return!1;let{severity:t,moduleName:n,msgid:r,msg:i,timeStamp:a}=e;return(Ww(t,`number`)||typeof t==`string`)&&Ww(n,`string`)&&Ww(r,`string`)&&Ww(i,`string`)&&(Ww(a,`number`)||typeof a==`string`)}var qw=class e extends QS{settings;_ring;burstPrinted;missed;invalid;valid;errorTotal;criticTotal;start;_async=!1;_transports=[];_disabledTransports=null;_ringEnabled=!0;_streamEnabled=!0;_severityThreshold=null;_gatedPdu=null;gated=0;_debugOverrides=null;_debugOverrideTimers=null;_debugOverrideExpiry=null;constructor(t){super(t),this.settings=xC({},Dw,t??{}),this._ring=new ib(this.settings.maxStack??100),this.burstPrinted=0,this.missed=0,this.invalid=0,this.valid=0,this.errorTotal=0,this.criticTotal=0,this.start=0,this._async=!!this.settings.async,this.settings.overrideConsole&&e.overrideConsole(this)}get ringStack(){return this._ring.toArray()}get bufferCapacity(){return this._ring.capacity}get ringEnabled(){return this._ringEnabled}setRingEnabled(e){return this._ringEnabled!==e&&(this._ringEnabled=e,e||this._ring.clear(),!0)}get streamEnabled(){return this._streamEnabled}setStreamEnabled(e){return this._streamEnabled!==e&&(this._streamEnabled=e,!0)}setMaxStack(e){if(!Number.isFinite(e)||e<=0||e===this.settings.maxStack)return;let t=this._ring.toArray().slice(-e);this.settings.maxStack=e,this._ring=new ib(e);for(let e of t)this._ring.push(e)}static formatDebug(e){return Tw(e)}init(t,n,r){this.removeAllListeners(`onLog`),this.listenWithConditions(r??Ew(t,n),t=>e.normalizeLog(t))}static toSeverityNumber(e){if(typeof e==`number`)return e;let t=Ow[e];return typeof t==`number`?t:-1}static severityFromInput(e){if(typeof e==`number`)return Number.isInteger(e)&&e>=0&&e<=7?e:null;if(typeof e==`string`){if(/^\d+$/.test(e)){let t=Number(e);return t>=0&&t<=7?t:null}return iC(e)??null}return null}static parseDebugSpec(t){let n={global:!1,overrides:[]};if(typeof t!=`string`)return n;for(let r of t.split(/[,\s]+/)){if(!r)continue;if(r===`*`){n.global=!0;continue}let t=r.indexOf(`:`);if(t===-1){n.overrides.push({module:r,level:7});continue}let i=r.slice(0,t);if(!i)continue;let a=e.severityFromInput(r.slice(t+1))??7;n.overrides.push({module:i,level:a})}return n}setSeverityThreshold(t){this._severityThreshold=t===null?null:e.toSeverityNumber(t)}severityEnabled(t,n){if(this._severityThreshold===null)return!0;let r=this._severityThreshold;return n!==void 0&&this._debugOverrides!==null&&(r=this.overrideThreshold(n)??r),e.toSeverityNumber(t)<=r}overrideThreshold(e){let t=this._debugOverrides;if(t!==null)return(e===void 0?void 0:t.get(e))??t.get(`*`)}setDebugOverride(t,n,r){if(this._debugOverrides??=new Map,this._debugOverrides.set(t,e.toSeverityNumber(n)),this.clearOverrideTimer(t),r!==void 0&&r>0){this._debugOverrideTimers??=new Map;let e=setTimeout(()=>{this.clearDebugOverride(t)},r);e.unref(),this._debugOverrideTimers.set(t,e),this._debugOverrideExpiry??=new Map,this._debugOverrideExpiry.set(t,Date.now()+r)}else this._debugOverrideExpiry!==null&&(this._debugOverrideExpiry.delete(t),this._debugOverrideExpiry.size===0&&(this._debugOverrideExpiry=null))}clearDebugOverride(e){if(this.clearOverrideTimer(e),this._debugOverrideExpiry!==null&&(this._debugOverrideExpiry.delete(e),this._debugOverrideExpiry.size===0&&(this._debugOverrideExpiry=null)),this._debugOverrides===null)return!1;let t=this._debugOverrides.delete(e);return this._debugOverrides.size===0&&(this._debugOverrides=null),t}clearAllDebugOverrides(){if(this._debugOverrideTimers!==null){for(let e of this._debugOverrideTimers.values())clearTimeout(e);this._debugOverrideTimers=null}this._debugOverrides=null,this._debugOverrideExpiry=null}getDebugOverrides(){if(this._debugOverrides===null)return{};let e={};for(let[t,n]of this._debugOverrides)e[t]=n;return e}getDebugOverrideExpiry(){if(this._debugOverrideExpiry===null)return{};let e={};for(let[t,n]of this._debugOverrideExpiry)e[t]=n;return e}clearOverrideTimer(e){if(this._debugOverrideTimers===null)return;let t=this._debugOverrideTimers.get(e);t!==void 0&&(clearTimeout(t),this._debugOverrideTimers.delete(e),this._debugOverrideTimers.size===0&&(this._debugOverrideTimers=null))}get async(){return this._async}set async(e){this._async=e}clean(){return this.reset()}reset(){return this._ring.clear(),this.removeAllListeners(),this.clearAllDebugOverrides(),this}clearLogStack(){this._ring.clear()}pushStack(e){this._ringEnabled&&this._ring.push(e),this.valid++;let t=e.severity;return t>=0&&t<=3&&(this.errorTotal++,t<=2&&this.criticTotal++),this._ring.length}log(t,n,r,i,a){if(this._severityThreshold!==null){let i=t instanceof mC?t.severity:e.toSeverityNumber(n??this.settings.defaultSeverity??`DEBUG`),a=this._severityThreshold;if(this._debugOverrides!==null){let e=t instanceof mC?t.msgid:r||this.settings.msgid,n=this.overrideThreshold(e);n!==void 0&&(a=n)}if(i>a)return this.gated++,this._gatedPdu===null&&(this._gatedPdu=Uw.call(this,`GATED`,`DEBUG`,this.settings.moduleName,r||this.settings.msgid),this._gatedPdu.status=`DROPPED`),this._gatedPdu}let o;if(this.settings.rateLimit!==!1){let e=Number(this.settings.rateLimit),s=Date.now();if(this.start=this.start||s,s>this.start+e&&(this.burstPrinted=0,this.missed=0,this.start=0),this.settings.burstLimit&&this.settings.burstLimit>this.burstPrinted){try{o=t instanceof mC?t:Uw.call(this,t,n,a??this.settings.moduleName,r||this.settings.msgid,i)}catch(e){return console.error(e),this.invalid++,o??=Uw.call(this,e,`ERROR`),o.status=`INVALID`,o}return this.pushStack(o),o.status=`ACCEPTED`,this.listenerCount(`onLog`)>0&&this.fire(`onLog`,o),this._transports.length>0&&this._fireTransports(o),_w.hasSubscribers&&_w.publish(o),this.burstPrinted++,o}return this.missed++,o??=Uw.call(this,`DROPPED`,`WARNING`),o.status=`DROPPED`,o}try{o=t instanceof mC?t:Uw.call(this,t,n,a??this.settings.moduleName,r||this.settings.msgid,i)}catch(e){return console.error(e),this.invalid++,o??=Uw.call(this,e,`ERROR`),o.status=`INVALID`,o}return this.pushStack(o),o.status=`ACCEPTED`,this.listenerCount(`onLog`)>0&&this.fire(`onLog`,o),this._transports.length>0&&this._fireTransports(o),_w.hasSubscribers&&_w.publish(o),o}getLogStack(e,t,n){if(arguments.length===0)return this._ring.last();let r;return r=n?this.getLogs(n):this.ringStack,t?e===t?r[r.length-e-1]:r.slice(e,t):r.slice(e)}getLogs(e,t=null){if(e){let n=Hw(e,this.settings.checkConditions);return n===null?[]:(t??this.ringStack).filter(n)}return this.ringStack}logToJson(e,t=null){let n=e?this.getLogs(e,t):this.ringStack;return JSON.stringify(n)}loadStack(e,t=!1,n=null){if(!e)throw Error(`syslog loadStack : not stack in arguments `);if(typeof e==`string`){let r=JSON.parse(e);if(!Array.isArray(r))throw Error(`syslog loadStack : la pile JSON n'est pas un tableau`);return this.loadStack(r.filter(Kw),t,n)}if(Array.isArray(e)||typeof e==`object`){for(let r of e){let e=new mC(r.payload,Gw(r.severity),r.moduleName||this.settings.moduleName,r.msgid,r.msg,r.timeStamp);this.pushStack(e),t&&(n&&n.call(this,e,r),this.fire(`onLog`,e))}return e}throw Error(`syslog loadStack : bad stack in arguments type`)}filter(e,t){if(!e)throw Error(`filter conditions not found `);if(typeof t!=`function`)throw Error(`Bad wrapper`);let n=Hw(e,this.settings.checkConditions);n!==null&&super.on(`onLog`,e=>{n(e)&&t(e)})}listenWithConditions(e,t){return this.filter(e,t)}error(e){return this.log(e,`ERROR`)}warn(e){return this.log(e,`WARNING`)}info(e){return this.log(e,`INFO`)}debug(e){return this.log(e,`DEBUG`)}trace(e,t,n){return this.log(e,`NOTICE`,t,n)}print(...e){let t=e.length===1?e[0]:e;return this.log(t,this.settings.defaultSeverity)}logMultiple(e,...t){let n=t.length===1?t[0]:t;return this.log(n,e)}addTransport(e){let t=this._transports.findIndex(t=>t.name===e.name),n=t===-1?void 0:this._transports[t];return n===void 0?this._transports.push(e):n!==e&&(this._closeTransport(n),this._transports[t]=e),this}removeTransport(e){let t=this._transports.indexOf(e);return t!==-1&&(this._transports.splice(t,1),this._closeTransport(e)),this}_closeTransport(e){e.close?.().catch(t=>this.fire(`onTransportCloseError`,t,e))}get transportCount(){return this._transports.length}listTransports(){let e=this._transports.map(e=>({name:e.name,enabled:!0}));if(this._disabledTransports)for(let t of this._disabledTransports.keys())e.push({name:t,enabled:!1});return e}setTransportEnabled(e,t){if(t){let t=this._disabledTransports,n=t?.get(e);return!t||!n?!1:(t.delete(e),t.size===0&&(this._disabledTransports=null),this.addTransport(n),!0)}let n=this._transports.findIndex(t=>t.name===e);if(n===-1)return!1;let[r]=this._transports.splice(n,1);return(this._disabledTransports??=new Map).set(e,r),!0}_fireTransports(e){for(let t of this._transports)t.send(e).catch(t=>this.fire(`onTransportError`,t,e))}static _nativeConsole={log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console),trace:console.trace.bind(console),table:console.table.bind(console),dir:console.dir.bind(console)};static _savedConsole=null;static SEVERITY_WIDTH=7;static MSGID_WIDTH=18;static wrapper(t){if(!t)throw Error(`Syslog pdu not defined`);let n=new Date(t.timeStamp),r=`${String(n.getHours()).padStart(2,`0`)}:${String(n.getMinutes()).padStart(2,`0`)}:${String(n.getSeconds()).padStart(2,`0`)}.${String(n.getMilliseconds()).padStart(3,`0`)}`,i=t.severityName.padEnd(e.SEVERITY_WIDTH),a=tw(t.msgid.padEnd(e.MSGID_WIDTH));switch(t.severity){case 0:case 1:case 2:case 3:return{logger:e._nativeConsole.error,text:`${r} ${QC(i)} ${a} : `};case 4:return{logger:e._nativeConsole.warn,text:`${r} ${ZC(i)} ${a} : `};case 5:return{logger:e._nativeConsole.log,text:`${r} ${QC(i)} ${a} : `};case 6:return{logger:e._nativeConsole.info,text:`${r} ${ew(i)} ${a} : `};case 7:return{logger:e._nativeConsole.debug,text:`${r} ${$C(i)} ${a} : `};default:return{logger:e._nativeConsole.log,text:`${r} ${$C(i)} ${a} : `}}}static normalizeLog(t,n=``){if(t.payload===``||t.payload===void 0)return e._nativeConsole.warn(`${t.severityName} ${t.msgid} : logger message empty !!!!`),e._nativeConsole.trace(t),t;if(gw===`json`)return e.rawLog(t,n);let r=t.payload,i=e.wrapper(t),a=n?`${n} `:``;return i.logger(`${a}${i.text}`,r),t}static rawLog(t,n=``){if(t.payload===``||t.payload===void 0)return t;let r=t.severity<=3?ww:Cw;if(gw===`json`)return r(XC(JC(t))+`
|
|
54
|
+
`),t;let{text:i}=e.wrapper(t),a=typeof t.payload==`string`||typeof t.payload==`number`?String(t.payload):hC(t.payload,{depth:3,colors:GC(),breakLength:1/0});return r(`${n?`${n} `:``}${i}${a}\n`),t}static setOutputBuffering(e){xw(e)}static setLineFormat(e){gw=e}static get lineFormat(){return gw}static flushOutput(){bw()}static setLogSink(e){Sw(e)}static get logSinkName(){return mw.name}static get sinkEnabled(){return!hw}static setSinkEnabled(e){let t=!e;return hw!==t&&(hw=t,!0)}static overrideConsole(t){if(e._savedConsole!==null){t.log(`Syslog.overrideConsole: already active`,`WARNING`);return}e._savedConsole={log:console.log.bind(console),info:console.info.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),debug:console.debug.bind(console),trace:console.trace.bind(console),table:console.table.bind(console),dir:console.dir.bind(console)};let n=console;n.log=(...e)=>t.print(...e),n.info=(...e)=>t.logMultiple(`INFO`,...e),n.warn=(...e)=>t.logMultiple(`WARNING`,...e),n.error=(...e)=>t.logMultiple(`ERROR`,...e),n.debug=(...e)=>t.logMultiple(`DEBUG`,...e),n.table=e=>t.logMultiple(`INFO`,e),n.dir=e=>t.logMultiple(`DEBUG`,e)}static restoreConsole(){e._savedConsole!==null&&(Object.assign(console,e._savedConsole),e._savedConsole=null)}},Jw={events:{nbListeners:20}},Yw=typeof process<`u`&&{}.NF_PERF_PROBE===`1`;function Xw(e){let t=globalThis.__nfPerfProbe;t&&t.t0!==0n&&(t[e]+=Number(process.hrtime.bigint()-t.t0))}function Zw(e){for(let t in e)if(Object.hasOwn(e,t)&&t.startsWith(`on`))return!0;return!1}var Qw={moduleName:`SERVICE `,defaultSeverity:`INFO`};function $w(e){let t=BS(e);return t&&t!==`Object`?`une instance de ${t}`:`un ${typeof e} littéral`}var eT=class e{name;options;container;kernel;syslog;#e;#t=null;#n=!1;#r=!1;#i=0;get notificationsCenter(){return this.#e===void 0&&this.#r?this.#a():this.#e}get nc(){if(this.#e===void 0){if(this.#r)return this.#a();throw Error(`${this.name}: notificationsCenter not initialized`)}return this.#e}#a(){this.#r=!1;let e=new QS(this.options,this,this.options);return this.#i&&e.setMaxListeners(this.#i),this.#e=e,e}#o(){return this.#e===void 0&&this.#r}constructor(e,t,n,r){if(Yw&&Xw(`svcStartNs`),this.name=e,t instanceof US)this.container=t;else{if(t!=null)throw Error(JS()?`${e} : le container reçu n'est pas un Container de CE paquet \`nodefony\` — deux copies du paquet tournent dans ce process. \`npm ls nodefony\` les liste ; l'avertissement de boot nomme leurs chemins. Un service ne peut pas être construit à cette frontière.`:`${e} : le container reçu n'est pas un \`Container\` (reçu : ${$w(t)}). Une seule copie du paquet \`nodefony\` tourne dans ce process — ce n'est donc pas une dualité de paquet, mais un objet qui n'en est pas un. Passer le container du module (\`module.container\`), ou \`new Container()\`.`);this.container=new US}let i;if(r===void 0)r={},i=Jw.events,this.options={};else{let{events:e,...t}=r;i=e??Jw.events,this.options=t}if(Yw&&Xw(`svcOptsNs`),this.kernel=this.container.get(`kernel`),this.syslog=this.container.get(`syslog`),Yw&&Xw(`svcLookupsNs`),!this.syslog){let e={...Qw,moduleName:this.name,...this.options.syslog};this.syslog=new qw(e),this.container.set(`syslog`,this.syslog)}if(n instanceof QS){this.#n=!0,this.#e=n,this.attachConfiguredListeners(r);let e=this.#e.getMaxListeners(),t=i?.nbListeners??0;t>e&&this.#e.setMaxListeners(t)}else if(n!==!1){this.#i=i?.nbListeners??0;let e=!(this.container instanceof WS)&&(!this.kernel||this.kernel.container!==this.container);e||Zw(this.options)?(this.#a(),e&&this.container.set(`notificationsCenter`,this.#e)):this.#r=!0}Yw&&Xw(`svcEventNs`)}attachConfiguredListeners(e){for(let t of Object.keys(e)){if(!/^on(.+)$/.test(t))continue;let n=e[t];typeof n==`function`&&this.on(t,n.bind(this))}}initSyslog(e=`production`,t=!1,n){return this.syslog?this.syslog.init(e,t,n):null}getName(){return this.name}clean(e=!1){if(this.#e&&this.#n&&this.#t)for(let[e,t]of this.#t)for(let n of t)this.#e.removeListener(e,n);this.#t=null,this.#n=!1,this.syslog&&e&&this.syslog.reset(),this.syslog=null,this.#e=void 0,this.#r=!1,this.container=null,this.kernel=null}log(e,t,n,r,i){try{return n||=this.name,this.syslog?this.syslog.log(e,t,n,r,i):new mC(e,t,i??this.name,n,r)}catch(i){return console.log(t,n,r,` : `,e),console.warn(i),new mC(i,`ERROR`,this.name,n,r)}}logger(e,...t){console.debug(qw.wrapper(this.log(e,`DEBUG`)).text,e,...t)}trace(e,...t){console.trace(qw.wrapper(this.log(e,`DEBUG`)).text,e,...t)}trackListener(e,t){this.#t??=new Map;let n=this.#t.get(e)??[];n.push(t),this.#t.set(e,n)}untrackListener(e,t){let n=this.#t;if(!n)return;let r=n.get(e);if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1),r.length===0&&n.delete(e)}eventNames(){return this.#o()?[]:this.nc.eventNames()}fire(e,...t){return e!==`error`&&this.#o()?!1:this.nc.emit(e,...t)}fireAsync(e,...t){return this.#o()?Promise.resolve(!1):this.nc.emitAsync(e,...t)}emit(e,...t){return e!==`error`&&this.#o()?!1:this.nc.emit(e,...t)}emitAsync(e,...t){return this.#o()?Promise.resolve(!1):this.nc.emitAsync(e,...t)}emitAsyncGuarded(e,t,...n){return this.nc.emitAsyncGuarded(e,t,...n)}addListener(e,t){return this.nc.addListener(e,t),this.trackListener(e,t),this}listen(e,t){return this.nc.listen(this,e,t)}on(e,t){return this.nc.on(e,t),this.trackListener(e,t),this}once(e,t){return this.nc.once(e,t),this.trackListener(e,t),this}off(e,t){return this.nc.off(e,t),this.untrackListener(e,t),this}settingsToListen(e,t){this.nc.settingsToListen(e,t)}setMaxListeners(e){return this.nc.setMaxListeners(e),this}removeListener(e,t){return this.nc.removeListener(e,t),this.untrackListener(e,t),this}removeAllListeners(e){return e===void 0?(this.#t=null,this.nc.removeAllListeners()):(this.#t?.delete(e),this.nc.removeAllListeners(e)),this}prependOnceListener(e,t){return this.nc.prependOnceListener(e,t),this.trackListener(e,t),this}prependListener(e,t){return this.nc.prependListener(e,t),this.trackListener(e,t),this}getMaxListeners(){return this.nc.getMaxListeners()}listenerCount(e,t){return this.#o()?0:this.nc.listenerCount(e,t)}listeners(e){return this.nc.listeners(e)}rawListeners(e){return this.nc.rawListeners(e)}get(e){return this.container?.get(e)??null}set(e,t){if(!this.container)throw Error(`${this.name}: container not initialized`);this.container.set(e,t)}remove(t){if(this.container){let n=this.get(t);if(n)return n instanceof e&&n.clean(),this.container.remove(t)}return!1}has(e){return this.container?.has(e)??!1}};new Uint8Array(new Uint16Array([1]).buffer)[0];var tT=class{syslog;#e;#t;#n=`created`;#r=null;#i=null;#a=null;#o={created:Date.now()};#s=()=>void 0;#c=null;#l=null;constructor(e={}){this.#t=e,this.#e=new eT(e.name??`CLIENT KERNEL`),this.syslog=this.#e.syslog,this.#l=Fb(this,this.name,this.#t.banner),this.#p();let t=this.#t;this.#s=Bb({kernel:this,name:this.name,createdAt:this.#o.created??Date.now(),timeline:()=>({...this.#o}),options:{connectOnBoot:String(t.connectOnBoot??!0),browserEvents:String(t.browserEvents??`auto`),banner:String(t.banner??`auto`),realtime:t.realtime===!1||t.realtime===void 0?`aucun`:t.realtime instanceof Rx?`socket fournie`:`composée par le noyau`},rows:()=>this.#f()})}get(e){if(this.#a)return this.#a[e]}set(e,t){(this.#a??=Object.create(null))[e]=t}has(e){return this.#a?.[e]!==void 0}get state(){return this.#n}boot(){return this.#n===`terminated`||this.#n===`ready`?Promise.resolve():(this.#i||=this.#u(),this.#i)}async#u(){this.#n=`booting`,this.#o.booting=Date.now(),this.#e.fire(`onBoot`,this),this.#m();let e=this.#t.connectOnBoot===!1?void 0:this.get(`realtime`);if(e)try{await e.connect()}catch(e){this.syslog.log(e instanceof Error?e.message:String(e),`WARNING`)}this.#n===`booting`&&(this.#n=`ready`,this.#o.ready=Date.now(),this.#d(),this.#e.fire(`onReady`,this))}#d(){if(this.#t.banner===!1||this.#t.banner!==!0&&!Eb())return;let e={};for(let[t,n]of this.#f())e[t]={valeur:n};Lb(e,this,`noyau client — détail et raccourcis`)}#f(){let e=this.get(`realtime`),t=[[`état`,this.state],[`identité`,this.identity?this.identity.key:`anonyme`],[`temps réel`,e?e.url??`socket fournie`:`aucun`],[`socket`,e?e.state:`—`],[`format`,e?ub(e.codec):`—`]];for(let e of this.#a?Object.keys(this.#a):[])t.push([`service · ${e}`,`composé`]);return t}#p(){if(this.has(`realtime`))return;let e=this.#t.realtime;e&&this.set(`realtime`,e instanceof Rx?e:Rx.shared(e))}async terminate(){if(this.#n===`terminated`)return;this.#n=`terminated`,this.#o.terminated=Date.now(),this.#e.fire(`onTerminate`,this);let e=this.get(`realtime`);e&&e.disconnect(),this.#h(),this.#l?.(),this.#l=null,this.#s(),this.#s=()=>void 0,this.#i=null,this.#a=null,this.#e.clean()}get name(){return this.#e.name}get identity(){return this.#r}setIdentity(e){let t=this.#r,n=t?t.key:null,r=e?e.key:null;if(this.#r=e,n===r)return;let i=this.get(`realtime`);i&&(n!==null&&i.disconnect(),r!==null&&i.connect().catch(()=>{})),this.#e.fire(`onIdentityChange`,e,t)}on(e,t){return this.#n===`terminated`||this.#e.on(e,t),this}off(e,t){return this.#n===`terminated`||this.#e.removeListener(e,t),this}#m(){if(this.#t.browserEvents===!1)return;let e=globalThis.document,t=globalThis.window;if(!e||!t)return;let n=(e,t,n)=>{e.addEventListener(t,n),(this.#c??=[]).push(()=>e.removeEventListener(t,n))};n(e,`visibilitychange`,()=>this.#e.fire(`onVisibility`,e.visibilityState!==`hidden`)),n(t,`online`,()=>this.#e.fire(`onOnline`,!0)),n(t,`offline`,()=>this.#e.fire(`onOnline`,!1)),n(t,`pagehide`,()=>void this.terminate())}#h(){if(this.#c){for(let e of this.#c)e();this.#c=null}}get browserListenerCount(){return this.#c?this.#c.length:0}},nT=null,rT=null,iT=!1;function aT(){return nT??=GS(),nT}function oT(){}function sT(){return iT?()=>{}:(iT=!0,rT=mC.requestIdProvider,mC.requestIdProvider=oT,()=>{iT&&(iT=!1,mC.requestIdProvider=rT,rT=null)})}function cT(e,t){return e.length<=t?e:`${e.slice(0,t)}… [+${e.length-t}]`}function lT(e,t){if(e==null)return e;if(e instanceof Error)return{name:e.name,message:cT(e.message,t),stack:e.stack?cT(e.stack,t):void 0};let n=typeof e;if(n===`string`)return cT(e,t);if(n===`number`||n===`boolean`)return e;if(typeof e==`function`||typeof e==`symbol`||typeof e==`bigint`)return cT(e.toString(),t);try{let n=JSON.stringify(e);return JSON.parse(cT(n??`null`,t))}catch{return cT(String(e),t)}}function uT(e){let{syslog:t,publisher:n,maxSeverity:r=4,batchMs:i=2e3,maxBatch:a=50,maxQueue:o=200,maxStringLength:s=4096,channel:c=Yb.syslogUplink}=e,l=null,u=0,d=null,f=!1,p=()=>{if(d!==null&&(clearTimeout(d),d=null),l===null||l.length===0)return;let e={pageId:aT(),entries:l};u>0&&(e.dropped=u),l=null,u=0;try{n.publish(c,e)}catch{}},m=e=>{if(f||e.severity>r||e.msgid===`CLIENT_UPLINK`)return;l??=[],l.length>=o&&(l.shift(),u+=1);let t={severity:e.severity,severityName:e.severityName,moduleName:e.moduleName,msgid:e.msgid,msg:cT(e.msg,s),timeStamp:e.timeStamp,payload:lT(e.payload,s)};e.requestId!==void 0&&(t.requestId=e.requestId),l.push(t),l.length>=a?p():d??=setTimeout(p,i)};return t.on(`onLog`,m),()=>{f||(f=!0,t.removeListener(`onLog`,m),p())}}function dT(e){let t=e??(typeof document>`u`?void 0:document);if(t!==void 0)return t.querySelector(`meta[property="csp-nonce"]`)?.nonce||t.querySelector(`script[nonce]`)?.nonce||void 0}function fT(e,t){let n=t??document;if(typeof CSSStyleSheet==`function`&&`replaceSync`in CSSStyleSheet.prototype&&`adoptedStyleSheets`in n){let t=new CSSStyleSheet;return t.replaceSync(e),n.adoptedStyleSheets=[...n.adoptedStyleSheets,t],t}let r=n instanceof Document?n:n.ownerDocument,i=r.createElement(`style`),a=dT(r);return a&&(i.nonce=a),i.textContent=e,(n instanceof Document?n.head:n).appendChild(i),i}var pT={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},mT=(e,t,n,r)=>{let i=(0,C.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,C.createElement)(`svg`,{ref:u,...pT[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].filter(Boolean).join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,C.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,C.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},hT=mT(`outline`,`alert-circle`,`AlertCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 8v4`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),gT=mT(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),_T=mT(`outline`,`arrow-right`,`ArrowRight`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M13 18l6 -6`,key:`svg-1`}],[`path`,{d:`M13 6l6 6`,key:`svg-2`}]]),vT=mT(`outline`,`arrows-maximize`,`ArrowsMaximize`,[[`path`,{d:`M16 4l4 0l0 4`,key:`svg-0`}],[`path`,{d:`M14 10l6 -6`,key:`svg-1`}],[`path`,{d:`M8 20l-4 0l0 -4`,key:`svg-2`}],[`path`,{d:`M4 20l6 -6`,key:`svg-3`}],[`path`,{d:`M16 20l4 0l0 -4`,key:`svg-4`}],[`path`,{d:`M14 14l6 6`,key:`svg-5`}],[`path`,{d:`M8 4l-4 0l0 4`,key:`svg-6`}],[`path`,{d:`M4 4l6 6`,key:`svg-7`}]]),yT=mT(`outline`,`bolt`,`Bolt`,[[`path`,{d:`M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11`,key:`svg-0`}]]),bT=mT(`outline`,`book-2`,`Book2`,[[`path`,{d:`M19 4v16h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2h12`,key:`svg-0`}],[`path`,{d:`M19 16h-12a2 2 0 0 0 -2 2`,key:`svg-1`}],[`path`,{d:`M9 8h6`,key:`svg-2`}]]),xT=mT(`outline`,`brand-github`,`BrandGithub`,[[`path`,{d:`M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5`,key:`svg-0`}]]),ST=mT(`outline`,`bulb`,`Bulb`,[[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-15.4 -6.4l.7 .7m12.1 -.7l-.7 .7`,key:`svg-0`}],[`path`,{d:`M9 16a5 5 0 1 1 6 0a3.5 3.5 0 0 0 -1 3a2 2 0 0 1 -4 0a3.5 3.5 0 0 0 -1 -3`,key:`svg-1`}],[`path`,{d:`M9.7 17l4.6 0`,key:`svg-2`}]]),CT=mT(`outline`,`chart-line`,`ChartLine`,[[`path`,{d:`M4 19l16 0`,key:`svg-0`}],[`path`,{d:`M4 15l4 -6l4 2l4 -5l4 4`,key:`svg-1`}]]),wT=mT(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),TT=mT(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),ET=mT(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),DT=mT(`outline`,`chevron-up`,`ChevronUp`,[[`path`,{d:`M6 15l6 -6l6 6`,key:`svg-0`}]]),OT=mT(`outline`,`chevrons-down`,`ChevronsDown`,[[`path`,{d:`M7 7l5 5l5 -5`,key:`svg-0`}],[`path`,{d:`M7 13l5 5l5 -5`,key:`svg-1`}]]),kT=mT(`outline`,`chevrons-up`,`ChevronsUp`,[[`path`,{d:`M7 11l5 -5l5 5`,key:`svg-0`}],[`path`,{d:`M7 17l5 -5l5 5`,key:`svg-1`}]]),AT=mT(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),jT=mT(`outline`,`columns-3`,`Columns3`,[[`path`,{d:`M3 4a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v16a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-16`,key:`svg-0`}],[`path`,{d:`M9 3v18`,key:`svg-1`}],[`path`,{d:`M15 3v18`,key:`svg-2`}]]),MT=mT(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),NT=mT(`outline`,`device-floppy`,`DeviceFloppy`,[[`path`,{d:`M6 4h10l4 4v10a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2`,key:`svg-0`}],[`path`,{d:`M10 14a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M14 4l0 4l-6 0l0 -4`,key:`svg-2`}]]),PT=mT(`outline`,`exclamation-mark`,`ExclamationMark`,[[`path`,{d:`M12 19v.01`,key:`svg-0`}],[`path`,{d:`M12 15v-10`,key:`svg-1`}]]),FT=mT(`outline`,`external-link`,`ExternalLink`,[[`path`,{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 13l9 -9`,key:`svg-1`}],[`path`,{d:`M15 4h5v5`,key:`svg-2`}]]),IT=mT(`outline`,`eye-off`,`EyeOff`,[[`path`,{d:`M10.585 10.587a2 2 0 0 0 2.829 2.828`,key:`svg-0`}],[`path`,{d:`M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87`,key:`svg-1`}],[`path`,{d:`M3 3l18 18`,key:`svg-2`}]]),LT=mT(`outline`,`filter-off`,`FilterOff`,[[`path`,{d:`M8 4h12v2.172a2 2 0 0 1 -.586 1.414l-3.914 3.914m-.5 3.5v4l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}],[`path`,{d:`M3 3l18 18`,key:`svg-1`}]]),RT=mT(`outline`,`filter`,`Filter`,[[`path`,{d:`M4 4h16v2.172a2 2 0 0 1 -.586 1.414l-4.414 4.414v7l-6 2v-8.5l-4.48 -4.928a2 2 0 0 1 -.52 -1.345v-2.227`,key:`svg-0`}]]),zT=mT(`outline`,`inbox`,`Inbox`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M4 13h3l3 3h4l3 -3h3`,key:`svg-1`}]]),BT=mT(`outline`,`info-circle`,`InfoCircle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 9h.01`,key:`svg-1`}],[`path`,{d:`M11 12h1v4h1`,key:`svg-2`}]]),VT=mT(`outline`,`layout-sidebar-right-collapse`,`LayoutSidebarRightCollapse`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M15 4v16`,key:`svg-1`}],[`path`,{d:`M9 10l2 2l-2 2`,key:`svg-2`}]]),HT=mT(`outline`,`layout-sidebar-right-expand`,`LayoutSidebarRightExpand`,[[`path`,{d:`M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M15 4v16`,key:`svg-1`}],[`path`,{d:`M10 10l-2 2l2 2`,key:`svg-2`}]]),UT=mT(`outline`,`link`,`Link`,[[`path`,{d:`M9 15l6 -6`,key:`svg-0`}],[`path`,{d:`M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464`,key:`svg-1`}],[`path`,{d:`M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463`,key:`svg-2`}]]),WT=mT(`outline`,`list`,`List`,[[`path`,{d:`M9 6l11 0`,key:`svg-0`}],[`path`,{d:`M9 12l11 0`,key:`svg-1`}],[`path`,{d:`M9 18l11 0`,key:`svg-2`}],[`path`,{d:`M5 6l0 .01`,key:`svg-3`}],[`path`,{d:`M5 12l0 .01`,key:`svg-4`}],[`path`,{d:`M5 18l0 .01`,key:`svg-5`}]]),GT=mT(`outline`,`lock`,`Lock`,[[`path`,{d:`M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0`,key:`svg-1`}],[`path`,{d:`M8 11v-4a4 4 0 1 1 8 0v4`,key:`svg-2`}]]),KT=mT(`outline`,`maximize`,`Maximize`,[[`path`,{d:`M4 8v-2a2 2 0 0 1 2 -2h2`,key:`svg-0`}],[`path`,{d:`M4 16v2a2 2 0 0 0 2 2h2`,key:`svg-1`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v2`,key:`svg-2`}],[`path`,{d:`M16 20h2a2 2 0 0 0 2 -2v-2`,key:`svg-3`}]]),qT=mT(`outline`,`refresh`,`Refresh`,[[`path`,{d:`M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4`,key:`svg-0`}],[`path`,{d:`M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4`,key:`svg-1`}]]),JT=mT(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),YT=mT(`outline`,`selector`,`Selector`,[[`path`,{d:`M8 9l4 -4l4 4`,key:`svg-0`}],[`path`,{d:`M16 15l-4 4l-4 -4`,key:`svg-1`}]]),XT=mT(`outline`,`settings`,`Settings`,[[`path`,{d:`M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065`,key:`svg-0`}],[`path`,{d:`M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`,key:`svg-1`}]]),ZT=mT(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),QT=mT(`outline`,`wand`,`Wand`,[[`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`,key:`svg-0`}],[`path`,{d:`M15 6l3 3`,key:`svg-1`}],[`path`,{d:`M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-2`}],[`path`,{d:`M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-3`}]]);function $T(e,t){return Gx(e)?Object.fromEntries(Object.entries(e).filter(e=>t(e[1]))):{}}function eE(e,t){return Array.isArray(e)?e.filter(t):[]}function tE(e){return t=>typeof t==`string`&&e.some(e=>e===t)}var nE=e=>typeof e==`string`,rE=e=>typeof e==`boolean`,iE=e=>typeof e==`number`&&Number.isFinite(e);function aE(e){if(typeof window>`u`)return null;try{return e===`local`?window.localStorage:window.sessionStorage}catch{return null}}function oE(e,t){let n=aE(e);if(n)try{let e=n.getItem(t);return e===null?void 0:JSON.parse(e)}catch{return}}var sE=[{name:`ollama`,label:`Ollama (supervisé)`,model:`llama3.1:8b-instruct-q4_K_M`,mode:`sovereign`,hosting:`Local — même hôte`,status:`ok`,ttftMs:180,tokensPerSec:42,calls24h:1284,costEur24h:0},{name:`mistral`,label:`Mistral AI`,model:`mistral-large-latest`,mode:`cloud`,hosting:`UE — Paris`,status:`ok`,ttftMs:420,tokensPerSec:78,calls24h:612,costEur24h:3.84},{name:`claude`,label:`Anthropic`,model:`claude-sonnet-5-5`,mode:`cloud`,hosting:`US`,status:`degraded`,ttftMs:910,tokensPerSec:95,calls24h:233,costEur24h:4.12},{name:`openai`,label:`OpenAI`,model:`—`,mode:`cloud`,hosting:`US`,status:`off`,ttftMs:null,tokensPerSec:null,calls24h:0,costEur24h:0}],cE={command:`ollama serve`,pid:48213,model:`llama3.1:8b-instruct-q4_K_M`,modelSizeGb:4.9,vramUsedGb:6.1,vramTotalGb:8,uptime:`3 h 12 min`,steps:[{label:`Lancer le sous-process`,detail:`pid 48213`},{label:`Télécharger le modèle s'il manque`,detail:`4,9 Go — déjà présent`},{label:`Attendre qu'il réponde`,detail:`prêt en 2,4 s`},{label:`L'exposer derrière ILLMProvider`,detail:`ollama → llama3.1`}]},lE=[{label:`Jetons par réponse`,limit:4096,current:1830,unit:`jetons (p95)`,hint:"Plafond `maxTokens` : borne le coût d'une seule réponse."},{label:`File d'attente`,limit:500,current:37,unit:`tâches`,hint:`Au-delà, une nouvelle tâche est refusée au lieu d'attendre indéfiniment.`},{label:`Délai par tâche`,limit:30,current:11.4,unit:`s (p95)`,hint:`Une tâche plus longue est annulée (AbortController) et ses ressources libérées.`},{label:`Tentatives`,limit:2,current:1,unit:`max observé`,hint:`Nombre de relances après un échec transitoire du fournisseur.`},{label:`Connexions simultanées`,limit:100,current:23,unit:`connexions`,hint:`Plafond des flux de jetons ouverts en même temps.`}],uE=[`public`,`internal`,`restricted`],dE={public:[`ollama`,`mistral`,`claude`],internal:[`ollama`,`mistral`],restricted:[`ollama`]},fE=[{collection:`juridique`,adapter:`pgvector (ORM)`,embedModel:`nomic-embed-text`,dimensions:768,distance:`cosine`,index:`HNSW m=16 ef=64`,vectors:48210,sizeMb:212,lastWrite:`il y a 12 min`},{collection:`support`,adapter:`pgvector (ORM)`,embedModel:`mistral-embed`,dimensions:1024,distance:`cosine`,index:`HNSW m=16 ef=64`,vectors:18734,sizeMb:96,lastWrite:`il y a 40 s`},{collection:`rapports-financiers`,adapter:`Qdrant`,embedModel:`mistral-embed`,dimensions:1024,distance:`cosine`,index:`HNSW m=32 ef=128`,vectors:9120,sizeMb:51,lastWrite:`hier`},{collection:`memoire-agents`,adapter:`pgvector (ORM)`,embedModel:`nomic-embed-text`,dimensions:768,distance:`cosine`,index:`HNSW m=16 ef=64`,vectors:22410,sizeMb:88,lastWrite:`il y a 2 min`}],pE=[{id:`c1`,collection:`juridique`,text:`Le client dispose d'un délai de rétractation de quatorze jours à compter de la réception du produit, sans avoir à justifier de motif.`,source:`CGV-2026.pdf`,page:4,section:`Art. 7 — Rétractation`,hash:`9f3a1c`},{id:`c2`,collection:`juridique`,text:`Une commande en cours de livraison peut être annulée ; le remboursement intervient au plus tard quatorze jours après le retour du colis.`,source:`CGV-2026.pdf`,page:5,section:`Art. 8 — Annulation`,hash:`2b7e90`},{id:`c3`,collection:`juridique`,text:`Les contrats légalement formés tiennent lieu de loi à ceux qui les ont faits. Ils ne peuvent être modifiés ou révoqués que de leur consentement mutuel.`,source:`Code civil — Livre III`,section:`Art. 1103 et 1193`,hash:`c41d07`},{id:`c4`,collection:`juridique`,text:`La résiliation du contrat cadre fournisseur exige un préavis de trois mois, notifié par lettre recommandée avec accusé de réception.`,source:`Contrat cadre fournisseur.pdf`,page:12,section:`Art. 21 — Résiliation`,hash:`77aa31`},{id:`c5`,collection:`support`,text:`Escalade niveau 2 : tout ticket sans réponse sous quatre heures ouvrées est réaffecté au superviseur, qui valide la remise commerciale éventuelle.`,source:`Procédure support N2.md`,section:`Escalade`,hash:`e05b62`},{id:`c6`,collection:`support`,text:`Pour une livraison en retard, vérifier d'abord le statut transporteur, puis proposer l'annulation ou un geste commercial selon le délai écoulé.`,source:`Procédure support N2.md`,section:`Retards de livraison`,hash:`1fd9a8`},{id:`c7`,collection:`support`,text:`Les données personnelles du client (adresse, téléphone) sont masquées avant tout envoi à un modèle hébergé hors de l'Union européenne.`,source:`Politique de protection des données.md`,section:`Transferts`,hash:`5c3e14`},{id:`c8`,collection:`support`,text:`Sur demande d'effacement, toutes les conversations et la mémoire d'agent liées au client sont supprimées sous trente jours.`,source:`Politique de protection des données.md`,section:`Droit à l'effacement`,hash:`a90f22`},{id:`c9`,collection:`rapports-financiers`,text:`Le chiffre d'affaires 2025 atteint 48,2 millions d'euros, en hausse de 11 %, porté par l'activité de services récurrents.`,source:`Rapport annuel 2025.pdf`,page:8,section:`Faits marquants`,hash:`3e6b5d`},{id:`c10`,collection:`rapports-financiers`,text:`La marge opérationnelle recule à 9,4 % sous l'effet des coûts d'infrastructure de calcul, en partie compensés par l'inférence locale.`,source:`Rapport annuel 2025.pdf`,page:14,section:`Résultats`,hash:`8d21c0`}],mE=new Set(`les des une est pour par sur dans qui que avec sans aux son ses leur leurs plus pas tout toute tous être avoir mon mes vos votre nos notre cette ces quel quelle quels quelles comment quand elle ils sont`.split(` `));function hE(e){return e.toLowerCase().normalize(`NFD`).replace(/[̀-ͯ]/g,``).split(/[^a-z0-9]+/).filter(e=>e.length>2&&!mE.has(e)).map(e=>e.length>5?e.slice(0,6):e)}function gE(e){let t=new Map;for(let n of e)t.set(n,(t.get(n)??0)+1);return t}function _E(e,t){let n=0;for(let[r,i]of e)n+=i*(t.get(r)??0);let r=e=>Math.sqrt([...e.values()].reduce((e,t)=>e+t*t,0)),i=r(e)*r(t);return i===0?0:n/i}function vE(e,t={}){let n=gE(hE(e));return pE.filter(e=>(!t.collection||e.collection===t.collection)&&(!t.collections||t.collections.includes(e.collection))).map(e=>({chunk:e,score:.42+.53*_E(n,gE(hE(e.text+` `+(e.section??``))))})).sort((e,t)=>t.score-e.score).slice(0,t.limit??5).map((e,t)=>({chunk:e.chunk,score:Math.round(e.score*1e3)/1e3,rank:t+1}))}var yE=[{source:`CGV-2026.pdf`,kind:`PDF`,collection:`juridique`,strategy:`paragraph`,chunkSize:512,chunkOverlap:50,chunks:186,status:`indexed`,piiMasked:0,indexed:`hier`},{source:`Code civil — Livre III`,kind:`HTML`,collection:`juridique`,strategy:`sentence`,chunkSize:512,chunkOverlap:50,chunks:4120,status:`indexed`,piiMasked:0,indexed:`il y a 6 j`},{source:`Procédure support N2.md`,kind:`Markdown`,collection:`support`,strategy:`paragraph`,chunkSize:384,chunkOverlap:40,chunks:58,status:`indexed`,piiMasked:3,indexed:`il y a 2 h`},{source:`Tickets support 2025.jsonl`,kind:`JSONL`,collection:`support`,strategy:`sentence`,chunkSize:256,chunkOverlap:32,chunks:15230,status:`indexing`,progress:64,piiMasked:412,indexed:`en cours`},{source:`Rapport annuel 2025.pdf`,kind:`PDF`,collection:`rapports-financiers`,strategy:`fixed`,chunkSize:512,chunkOverlap:50,chunks:912,status:`indexed`,piiMasked:0,indexed:`il y a 3 j`},{source:`Contrat cadre fournisseur.pdf`,kind:`PDF`,collection:`juridique`,strategy:`paragraph`,chunkSize:512,chunkOverlap:50,chunks:0,status:`error`,piiMasked:0,indexed:`—`,error:`Document protégé par mot de passe — rien n'a été indexé.`}],bE=[{label:`Extraire`,detail:`texte + métadonnées (page, section)`},{label:`Masquer les PII`,detail:`415 données personnelles masquées`},{label:`Découper`,detail:`taille 512, chevauchement 50`},{label:`Vectoriser`,detail:`mistral-embed · nomic-embed-text`},{label:`Indexer`,detail:`HNSW · empreinte SHA-256 par passage`}],xE={recallAt5:.86,mrr:.71,faithfulness:.93,citedAnswers:.98,recallHistory:[.78,.79,.79,.81,.8,.82,.83,.82,.84,.85,.84,.86,.86,.86]},SE=[{tier:`Court terme`,store:`Session WebSocket`,entries:1284,retention:`durée de la session`,role:`Le fil de la conversation en cours.`},{tier:`Long terme`,store:`Base vectorielle « memoire-agents »`,entries:22410,retention:`365 jours`,role:`Les faits durables, retrouvés par similarité.`},{tier:`Épisodique`,store:`Résumés consolidés (ORM)`,entries:1106,retention:`730 jours`,role:`Un résumé par session close : ce qui s'est passé, ce qui a été décidé.`}],CE=[{sessionId:`s-7f3a21`,agentId:`assistant-support`,user:`u-…91`,entries:18,lastActivity:`il y a 2 min`,consolidated:!1},{sessionId:`s-61be04`,agentId:`assistant-support`,user:`u-…07`,entries:42,lastActivity:`il y a 25 min`,consolidated:!0},{sessionId:`s-a90c3f`,agentId:`juriste`,user:`u-…33`,entries:9,lastActivity:`il y a 1 h`,consolidated:!0},{sessionId:`s-2d4e88`,agentId:`analyste-financier`,user:`u-…12`,entries:27,lastActivity:`il y a 3 h`,consolidated:!0},{sessionId:`s-c03b19`,agentId:`ops-insights`,user:`u-…01`,entries:6,lastActivity:`hier`,consolidated:!0},{sessionId:`s-5e71d2`,agentId:`assistant-support`,user:`u-…48`,entries:31,lastActivity:`hier`,consolidated:!0}],wE=[{role:`system`,content:`Préférence retrouvée (long terme) : réponses courtes, vouvoiement.`,at:`14:02:11`},{role:`user`,content:`Ma commande A-4821 n'est pas arrivée, je veux annuler.`,at:`14:02:12`},{role:`assistant`,content:`Votre commande est en transit, livraison prévue le 9 octobre. Selon nos CGV, vous pouvez l'annuler dès maintenant.`,at:`14:02:18`},{role:`user`,content:`Oui, annulez-la.`,at:`14:02:41`},{role:`assistant`,content:`C'est fait : ticket T-4821 ouvert, remboursement sous quatorze jours après retour du colis.`,at:`14:02:49`}],TE=`Client fidèle (3ᵉ commande). A demandé l'annulation de A-4821, en transit. Annulation acceptée, ticket T-4821. Préfère des réponses courtes.`,EE=[{name:`assistant-support`,description:`Répond aux clients depuis la base support et ouvre un ticket si besoin.`,model:`mistral-large (UE)`,tools:[`search_knowledge`,`get_order_status`,`create_ticket`],collections:[`support`,`juridique`],zone:`internal`,runs24h:1120,successRate:96.4,avgCostEur:.004,breaker:`closed`},{name:`juriste`,description:`Analyse un contrat et cite les articles applicables.`,model:`llama3.1 8b (local)`,tools:[`search_knowledge`,`compare_clauses`],collections:[`juridique`],zone:`restricted`,runs24h:86,successRate:98.8,avgCostEur:0,breaker:`closed`},{name:`analyste-financier`,description:`Lit les rapports annuels et lance des simulations.`,model:`claude-sonnet-5-5 (US)`,tools:[`search_knowledge`,`run_simulation`],collections:[`rapports-financiers`],zone:`public`,runs24h:41,successRate:92.7,avgCostEur:.031,breaker:`half-open`,breakerReason:`Fournisseur dégradé : 3 délais dépassés en 10 min, une requête d'essai sur deux.`},{name:`ops-insights`,description:`Lit les sondes du data plane et explique les dérives en langage naturel.`,model:`llama3.1 8b (local)`,tools:[`nodefony_inspect`,`nodefony_check`,`nodefony_admin_list`],collections:[],zone:`restricted`,runs24h:12,successRate:100,avgCostEur:0,breaker:`closed`},{name:`generateur-module`,description:`Propose une ModuleSpec et son diff ; n'écrit qu'après validation humaine.`,model:`claude-sonnet-5-5 (US)`,tools:[`nodefony_symbols`,`nodefony_docs`,`write_files`],collections:[],zone:`restricted`,runs24h:3,successRate:66.7,avgCostEur:.12,breaker:`open`,breakerReason:`Boucle détectée : le même outil appelé 14 fois avec les mêmes arguments. Coupé, en attente d'un humain.`}],DE=[{type:`started`,afterMs:0,content:`Ma commande A-4821 n'est pas arrivée, je veux annuler.`,data:{agent:`assistant-support`,sessionId:`s-7f3a21`,requestId:`req-01J9X4`}},{type:`thinking`,afterMs:500,content:`Une commande est citée : vérifier son statut avant de répondre.`},{type:`tool_call`,afterMs:400,tool:`get_order_status`,data:{orderId:`A-4821`}},{type:`tool_result`,afterMs:700,tool:`get_order_status`,data:{status:`en transit`,eta:`2026-10-09`}},{type:`thinking`,afterMs:400,content:`Annulation demandée : retrouver la règle applicable.`},{type:`tool_call`,afterMs:300,tool:`search_knowledge`,data:{query:`annuler une commande en cours de livraison`,collection:`juridique`,limit:3}},{type:`tool_result`,afterMs:600,tool:`search_knowledge`,data:[{source:`CGV-2026.pdf`,page:5,score:.912},{source:`Procédure support N2.md`,score:.874}]},{type:`tool_call`,afterMs:400,tool:`create_ticket`,data:{order:`A-4821`,reason:`annulation`,refund:!0}},{type:`approval`,afterMs:300,tool:`create_ticket`,content:`Remboursement engagé : validation humaine requise (zone interne, montant > 0).`},{type:`approval`,afterMs:2200,tool:`create_ticket`,content:`Approuvé par superviseur.n2`,data:{approved:!0}},{type:`tool_result`,afterMs:400,tool:`create_ticket`,data:{ticket:`T-4821`}},{type:`token`,afterMs:300,content:`Votre commande A-4821 est en transit (livraison prévue le 9 octobre). Conformément à l'article 8 de nos CGV [1], je l'ai annulée : ticket T-4821. Le remboursement interviendra sous quatorze jours après le retour du colis.`},{type:`completed`,afterMs:200,data:{inputTokens:1840,outputTokens:212,costEur:.0041,durationMs:6400,toolsUsed:[`get_order_status`,`search_knowledge`,`create_ticket`]}}],OE=[{name:`nodefony_inspect`,purpose:`Routes, services et configuration effective de l'application.`},{name:`nodefony_card`,purpose:`La carte de visite : ce que l'application est et sait faire.`},{name:`nodefony_check`,purpose:"Le diagnostic `doctor` : manquements constatés."},{name:`nodefony_docs`,purpose:`La documentation des modules, par sommaire puis par section.`},{name:`nodefony_symbols`,purpose:`Le graphe symbolique : qui étend, implémente, utilise.`},{name:`nodefony_admin_list`,purpose:`Le catalogue du plan d'administration.`},{name:`nodefony_admin_call`,purpose:`Un appel au plan d'administration, sous le rôle de l'appelant.`}],kE=[{name:`filesystem (projet)`,transport:`stdio`,status:`ok`,tools:11,allowedAgents:[`generateur-module`]},{name:`github`,transport:`streamable-http`,status:`ok`,tools:26,allowedAgents:[`generateur-module`]},{name:`postgres (lecture seule)`,transport:`stdio`,status:`degraded`,tools:3,allowedAgents:[`analyste-financier`,`ops-insights`]},{name:`crm-interne`,transport:`streamable-http`,status:`down`,tools:8,allowedAgents:[`assistant-support`]}],AE=Gv(17,`tools/call`,{name:`nodefony_inspect`,arguments:{subject:`routes`,filter:`/api/orders`},_meta:{"io.modelcontextprotocol/protocolVersion":`2026-07-28`}}),jE={name:`agentgateway`,url:`https://agentgateway.dev/`,tagline:`Une passerelle unique pour le trafic des services, des modèles et des outils d'agents.`},ME=[{label:`Gestion du trafic`,hint:`L'aiguilleur du trafic classique (HTTP, gRPC, TCP) : répartir la charge, réessayer, couper un service malade avant qu'il n'entraîne les autres.`},{label:`Passerelle LLM`,hint:`Une seule porte vers tous les modèles : une clé gérée au même endroit plutôt qu'une clé par agent, et une bascule automatique si un fournisseur tombe.`},{label:`Routage d'inférence`,hint:`Choisir QUEL modèle répond : le moins cher, le plus rapide, ou le modèle local quand la donnée ne doit pas sortir.`},{label:`Passerelle MCP / A2A`,hint:`Les outils (MCP) et les autres agents (A2A) : la passerelle décide quel agent a le droit d'appeler quel outil, et le note.`}],NE=[{id:`cli`,column:`source`,protocol:`MCP · LLM`,examples:[`Claude Code`,`Cursor`,`VS Code + Copilot`,`OpenCode`],label:`CLI / IDE`,sub:`Assistants de code et éditeurs`,detail:`Les outils de développement qui appellent des modèles et des serveurs MCP pour le compte d'un développeur.`},{id:`agents`,column:`source`,protocol:`A2A · MCP · LLM`,examples:[`LangChain`,`LangGraph`,`CrewAI`,`Google ADK`,`OpenAI Agents SDK`,`Mastra`],label:`Agents IA`,sub:`Bâtis sur les frameworks d'agents du marché`,detail:`Des agents autonomes : ils appellent des modèles, des outils et d'autres agents. La passerelle voit et règle chacun de ces appels.`},{id:`apps`,column:`source`,protocol:`HTTP · gRPC · WS`,examples:[`application web`,`application mobile`,`service interne`],label:`Apps & clients`,sub:`Web, mobile, services, utilisateurs`,detail:`Le trafic applicatif classique, qui passe par la même porte que le trafic des agents.`},{id:`gateway`,column:`gateway`,label:`Passerelle d'agents`,sub:`${jE.name} — plan de contrôle`,detail:`Le point de passage unique : elle aiguille, authentifie, observe et plafonne le trafic au bord du système.`},{id:`llm`,column:`destination`,protocol:`HTTPS + SSE`,examples:[`OpenAI`,`Anthropic`,`Google Gemini`,`Mistral`,`Ollama ou vLLM (local)`],label:`Modèles (LLM)`,sub:`Fournisseurs cloud et inférence locale`,detail:`Les modèles appelés derrière la passerelle : API distantes ou inférence hébergée en interne.`},{id:`mcp`,column:`destination`,protocol:`MCP · A2A`,examples:[`serveurs MCP GitHub, GitLab, Atlassian`,`agents A2A d'autres équipes`],label:`MCP / A2A`,sub:`Serveurs d'outils et agents distants`,detail:`Les outils exposés en MCP et les agents joignables en A2A, que la passerelle ouvre aux seuls appelants autorisés.`},{id:`apis`,column:`destination`,protocol:`HTTP · gRPC · TCP`,examples:[`API REST`,`services gRPC`,`bases et files de messages`],label:`APIs & services`,sub:`Trafic HTTP, gRPC et TCP`,detail:`Les services existants de l'entreprise, que la passerelle expose aux agents comme aux applications.`}],PE=[{id:`r-agent-legal`,attachTo:`agents`,box:`Agent juriste`,pin:`contrats`,label:`L'agent juriste`,readiness:`target`,detail:`Il lit les contrats et cite l'article applicable ; pour le faire, il appelle un modèle et ses outils à travers la passerelle. Ses documents ne quittent pas sa zone.`},{id:`r-agent-billing`,attachTo:`agents`,box:`Agent facturation`,pin:`factures`,label:`L'agent facturation`,readiness:`target`,detail:`Il lit une facture ou un échéancier et répond ; il appelle lui aussi modèles, outils et autres agents à travers la passerelle, sous les droits de l'utilisateur d'origine.`},{id:`r-mcp`,attachTo:`mcp`,box:`Outils MCP`,pin:`${OE.length} outils`,label:`Des outils qu'on appelle (MCP)`,readiness:`real`,detail:`Le serveur MCP de Nodefony sert déjà ses outils (routes, configuration, diagnostic, documentation…) sur /nodefony/mcp ; OAuth en production (ressource protégée, RFC 9728) et rôle vérifié outil par outil.`},{id:`r-a2a-legal`,attachTo:`mcp`,box:`Agents A2A`,pin:`juriste`,label:`L'agent juriste, qu'on appelle en A2A`,readiness:`target`,detail:`Le même agent juriste que dans « Agents IA », vu de l'autre côté : il publie sa carte (/.well-known/agent-card.json) et répond à SendMessage. Un autre agent, Nodefony ou non, lui confie une question de droit.`},{id:`r-a2a-billing`,attachTo:`mcp`,box:`Agents A2A`,pin:`facturation`,label:`L'agent facturation, qu'on appelle en A2A`,readiness:`target`,detail:`Le même agent facturation, vu de l'autre côté : on lui confie une tâche en A2A, et il l'exécute sous les droits de l'utilisateur d'origine.`},{id:`r-front`,attachTo:`apps`,box:`Front Nodefony`,pin:`React · Vue · Angular`,label:`Le front de l'application`,readiness:`real`,detail:`Nodefony bâtit et sert le front avec Vite (React, Vue ou Angular), rechargement à chaud compris. Ses appels au serveur passent par la passerelle comme le reste du trafic.`},{id:`r-socket`,attachTo:`apps`,box:`Front Nodefony`,pin:`socket temps réel`,label:`Le client temps réel, dans le navigateur`,readiness:`real`,detail:"Le client isomorphe `nodefony` tourne dans le navigateur : socket temps réel (JSON-RPC sur WebSocket), connexion, appels au serveur — le même code que côté serveur."},{id:`r-rest`,attachTo:`apis`,box:`API d'entreprise`,pin:`REST · WS`,label:`Une API d'entreprise (HTTP + WebSocket)`,readiness:`real`,detail:`Le même contrôleur sert HTTP et WebSocket, sous la même garde : pare-feu, rôles, traçabilité.`},{id:`r-grpc`,attachTo:`apis`,box:`API d'entreprise`,pin:`gRPC`,label:`Des services gRPC`,readiness:`target`,detail:`Une action exposée en gRPC, en plus du HTTP et du temps réel, sans être réécrite.`}],FE=[{verb:`Router`,atGateway:`Aiguiller chaque appel vers le bon modèle, outil ou service.`,inNodefony:`Un routeur unique HTTP + WebSocket ; la porte MCP existe, A2A et gRPC sont à venir.`,readiness:`partial`},{verb:`Sécuriser`,atGateway:`Authentifier au bord : jetons, mTLS, clés, limites de débit.`,inNodefony:`Pare-feu applicatif, OAuth, rôles : un outil d'agent obéit aux mêmes règles qu'une route HTTP.`,readiness:`real`},{verb:`Observer`,atGateway:`Tracer et mesurer le trafic qui traverse la passerelle.`,inNodefony:`Un requestId de bout en bout (requête, base de données, journaux), visible dans cette console.`,readiness:`real`},{verb:`Gouverner`,atGateway:`Politiques d'accès aux outils, garde-fous sur les prompts.`,inNodefony:`Zones de confiance, validation humaine, disjoncteur et audit signé, au plus près de la donnée.`,readiness:`target`},{verb:`Coûts`,atGateway:`Budgets, clés virtuelles, dépenses par modèle.`,inNodefony:`Coût par agent, par utilisateur et par requête, corrélé au requestId.`,readiness:`target`}],IE=[{title:`L'image`,body:`Un poste de péage. Tout ce qui circule entre les agents, les modèles et les outils passe par une seule barrière, au lieu de mille petites routes sans contrôle.`},{title:`Le problème`,body:`Chaque agent appelle des modèles, des outils et d'autres agents, chacun avec ses clés, ses règles et ses coûts. Contrôler cela agent par agent devient vite impossible.`},{title:`Ce qu'elle fait`,body:`À la barrière : elle vérifie qui appelle, envoie au bon endroit, note tout, applique les règles d'accès et compte la dépense. Elle RELAIE le protocole sans en imposer : du MCP repart en MCP, de l'A2A en A2A, du gRPC en gRPC.`},{title:`Ce qu'elle ne voit pas`,body:`L'intérieur de l'application : quel utilisateur est derrière l'appel, quelle donnée est sensible, quelle action exige un humain. C'est le rôle de Nodefony, derrière la barrière — réel aujourd'hui pour la sécurité et la traçabilité, en cible pour le reste.`,nodefony:!0}],LE=[{exchange:`Agent → modèle (LLM)`,protocol:`API du fournisseur`,transport:`HTTPS`,stream:`SSE : les jetons arrivent un à un`,readiness:`target`},{exchange:`Agent → outils`,protocol:`MCP (JSON-RPC 2.0)`,transport:`Streamable HTTP, ou stdio en local`,stream:`SSE dans la réponse HTTP`,readiness:`real`},{exchange:`Agent → agent`,protocol:`A2A 1.0`,transport:`JSON-RPC 2.0, gRPC ou HTTP+JSON`,stream:`SSE, ou flux serveur gRPC`,readiness:`target`},{exchange:`Service → service`,protocol:`gRPC (contrat .proto)`,transport:`HTTP/2`,stream:`flux gRPC, dans les deux sens`,readiness:`target`},{exchange:`Navigateur ↔ application`,protocol:`HTTP + WebSocket (JSON-RPC 2.0)`,transport:`HTTP/1.1 ou HTTP/2, WS`,stream:`WebSocket : temps réel dans les deux sens`,readiness:`real`}],RE=[{id:`a-support`,label:`Support`,sub:`Application « support » — elle ne charge que l'agent support`,nodefony:`target`,pods:3,detail:`Un client demande s'il peut résilier. L'agent support ne connaît pas le droit : il pose la question à l'agent juriste, en A2A, à travers la passerelle.`},{id:`a-legal`,label:`Juriste`,sub:`Application « juriste » — elle ne charge que l'agent juriste`,nodefony:`target`,pods:10,detail:`Très demandé : son application tourne sur 10 pods, sans en imposer 10 aux autres. Ses contrats ne quittent pas sa zone : il rend une réponse sourcée, jamais le document entier.`},{id:`a-billing`,label:`Facturation`,sub:`Application « facturation » — elle ne charge que l'agent facturation`,nodefony:`target`,pods:2,detail:`Peu demandé : 2 pods suffisent. Il applique les droits de l'utilisateur d'ORIGINE, pas ceux de l'agent qui l'appelle.`}],zE=[{title:`Se présenter`,body:`Chaque agent publie sa carte, à /.well-known/agent-card.json : ce qu'il sait faire, comment le joindre, quelle authentification il exige.`,by:`nodefony`,readiness:`target`},{title:`Demander`,body:`L'agent support envoie SendMessage à l'agent juriste (SendStreamingMessage si la réponse est longue), à travers la passerelle.`,by:`nodefony`,readiness:`target`},{title:`Contrôler`,body:`La passerelle vérifie que l'agent support a le droit de parler à l'agent juriste, trace l'échange et compte son coût.`,by:`gateway`,readiness:`real`},{title:`Garder l'utilisateur`,body:`Nodefony transmet l'identité de l'utilisateur d'origine : l'agent juriste applique SES droits, avec le même pare-feu qu'une route HTTP.`,by:`nodefony`,readiness:`partial`},{title:`Répondre`,body:`L'agent juriste rend une tâche terminée, ou un flux d'étapes ; l'agent support répond au client.`,by:`nodefony`,readiness:`target`}];function BE(e,t=EE[0]){if(!t)return{steps:[],citations:[],answer:`Aucun agent n'est configuré.`,usage:{inputTokens:0,outputTokens:0,costEur:0,model:`—`}};let n=t.model;if(t.breaker===`open`)return{steps:[{kind:`thinking`,label:`Disjoncteur ouvert — exécution refusée`,detail:t.breakerReason??``}],citations:[],answer:`L'agent ${t.name} est coupé par son disjoncteur et attend qu'un humain le réarme. Aucun appel au modèle n'a été fait.`,usage:{inputTokens:0,outputTokens:0,costEur:0,model:n}};if(t.collections.length===0){let e=t.tools[0]??`nodefony_inspect`,r=`Je n'interroge pas de base documentaire : mes outils lisent l'application elle-même (${t.tools.join(`, `)}). Ici, ${e} renverrait l'état réel — routes, sondes, manquements — et ma réponse le citerait.`;return{steps:[{kind:`thinking`,label:`Choisir l'outil`,detail:`Outils autorisés : ${t.tools.join(`, `)}`},{kind:`tool_call`,label:e,detail:JSON.stringify({subject:`health`})},{kind:`tool_result`,label:`réponse du data plane (simulée)`,detail:`0 manquement · p95 41 ms · boucle d'événements 3 ms`}],citations:[],answer:r,usage:{inputTokens:540,outputTokens:Math.round(r.length/4),costEur:0,model:n}}}let r=vE(e,{collections:t.collections,limit:3}),i=r.filter(e=>e.score>=.6),a=[{kind:`thinking`,label:`Comprendre la question`,detail:`Termes retenus : ${hE(e).slice(0,6).join(`, `)||`—`}`},{kind:`tool_call`,label:`search_knowledge`,detail:JSON.stringify({query:e,collections:t.collections,limit:3})},{kind:`tool_result`,label:`${i.length} passage(s) pertinent(s) sur ${r.length}`,detail:r.map(e=>`${e.chunk.source}${e.chunk.page?` p.${e.chunk.page}`:``} — ${e.score.toFixed(3)}`).join(`
|
|
55
|
+
`)}],o=i.map((e,t)=>({index:t+1,source:e.chunk.source,...e.chunk.section?{section:e.chunk.section}:{},...e.chunk.page?{page:e.chunk.page}:{},score:e.score,hash:e.chunk.hash})),s=i[0],c=i[1],l=s?`D'après ${s.chunk.source}${s.chunk.section?` (${s.chunk.section})`:``} [1] : ${s.chunk.text}`+(c?`\n\nÀ rapprocher de ${c.chunk.source} [2] : ${c.chunk.text}`:``):`Je n'ai trouvé aucun passage assez proche dans les sources indexées pour répondre sans inventer. Reformulez, ou indexez le document qui traite ce sujet.`,u=Math.round(l.length/4);return{steps:a,citations:o,answer:l,usage:{inputTokens:620+i.length*180,outputTokens:u,costEur:t.model.includes(`local`)?0:Math.round(u*18e-6*1e4)/1e4,model:n}}}function VE({title:e,subtitle:t,icon:n,actions:r,sticky:i}){let a=(0,C.useRef)(null);return(0,C.useEffect)(()=>{if(!i||!a.current)return;let e=document.documentElement,t=a.current,n=()=>{e.style.setProperty(`--nf-pageheader-height`,`${t.offsetHeight}px`)};n();let r=new ResizeObserver(n);return r.observe(t),()=>{r.disconnect(),e.style.setProperty(`--nf-pageheader-height`,`0px`)}},[i]),(0,Y.jsxs)(wl,{ref:a,justify:`space-between`,align:`flex-end`,wrap:`nowrap`,style:i?{position:`sticky`,top:0,zIndex:2,background:`var(--mantine-color-body)`,marginInline:`calc(var(--mantine-spacing-md) * -1)`,paddingInline:`var(--mantine-spacing-md)`,paddingBlock:`var(--mantine-spacing-sm)`,borderBottom:`1px solid var(--mantine-color-default-border)`}:void 0,children:[(0,Y.jsxs)(R_,{gap:4,children:[(0,Y.jsxs)(wl,{gap:`xs`,wrap:`nowrap`,children:[n,(0,Y.jsx)(jv,{order:1,size:`h2`,children:e})]}),t&&(0,Y.jsx)(Fd,{c:`dimmed`,size:`sm`,component:`div`,children:t})]}),r&&(0,Y.jsx)(wl,{gap:`xs`,wrap:`nowrap`,children:r})]})}function HE({title:e,subtitle:t,icon:n,actions:r,gap:i=`md`,children:a}){return(0,Y.jsxs)(R_,{gap:i,children:[(0,Y.jsx)(VE,{title:e,subtitle:t,icon:n,actions:r,sticky:!0}),a]})}function UE({children:e,...t}){return(0,Y.jsx)(bv.List,{...t,style:[{position:`sticky`,top:`var(--nf-pageheader-height, 76px)`,zIndex:1,background:`var(--mantine-color-body)`},t.style],children:e})}function WE({loading:e,error:t,empty:n,onRetry:r,emptyMessage:i,minHeight:a=200,children:o}){return t?(0,Y.jsx)(Ad,{color:`red`,variant:`light`,icon:(0,Y.jsx)(gT,{size:16}),title:`Erreur de chargement`,children:(0,Y.jsxs)(R_,{gap:`sm`,align:`flex-start`,children:[(0,Y.jsx)(Fd,{size:`sm`,children:t}),r&&(0,Y.jsx)(dp,{size:`xs`,variant:`light`,leftSection:(0,Y.jsx)(qT,{size:14}),onClick:r,children:`Réessayer`})]})}):e?(0,Y.jsx)(xp,{mih:a,"aria-busy":`true`,"aria-live":`polite`,children:(0,Y.jsx)(ol,{})}):n?(0,Y.jsx)(xp,{mih:a,children:(0,Y.jsxs)(R_,{gap:4,align:`center`,c:`dimmed`,children:[(0,Y.jsx)(zT,{size:28,stroke:1.4}),(0,Y.jsx)(Fd,{size:`sm`,children:i??`Aucune donnée.`})]})}):(0,Y.jsx)(Y.Fragment,{children:o})}var GE={doc:{trigger:BT,header:bT,accent:`brand`,badge:`doc`},graph:{trigger:CT,header:CT,accent:`blue`,badge:`graphe`},link:{trigger:FT,header:FT,accent:`grape`,badge:`lien`},tip:{trigger:ST,header:ST,accent:`teal`,badge:`astuce`},warning:{trigger:gT,header:gT,accent:`yellow`,badge:`attention`},relation:{trigger:UT,header:UT,accent:`blue`,badge:`relation`}},KE=[],qE=[];function JE({kind:e=`doc`,title:t,version:n,summary:r,sections:i=KE,links:a=qE,width:o=360,children:s,block:c=!1,interactive:l=!1}){let u=GE[e],d=u.trigger;return(0,Y.jsxs)(nm,{width:o,shadow:`md`,radius:`md`,withArrow:!0,openDelay:100,closeDelay:120,position:`top`,withinPortal:!0,children:[(0,Y.jsx)(nm.Target,{children:s&&l?s:s?(0,Y.jsxs)(ic,{style:{display:c?`block`:`inline-flex`,width:c?`100%`:void 0,lineHeight:c?void 0:0,cursor:`help`,textAlign:c?`inherit`:void 0},children:[s,(0,Y.jsx)(oc,{children:` — ${u.badge} : ${t}`})]}):(0,Y.jsx)(ml,{variant:`subtle`,color:e===`doc`?`gray`:u.accent,size:`sm`,radius:`xl`,w:24,h:24,"aria-label":`${u.badge} : ${t}`,children:(0,Y.jsx)(d,{size:15,stroke:1.6})})}),(0,Y.jsx)(nm.Dropdown,{p:0,children:(0,Y.jsx)(YE,{kind:e,title:t,version:n,summary:r,sections:i,links:a})})]})}function YE({kind:e=`doc`,title:t,version:n,badge:r,accent:i,summary:a,sections:o=KE,links:s=qE,children:c}){let l=GE[e],u=l.header,d=i??l.accent;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Q,{p:`xs`,style:{borderBottom:`1px solid var(--mantine-color-default-border)`,background:`var(--mantine-color-default-hover)`,borderTopLeftRadius:`var(--mantine-radius-md)`,borderTopRightRadius:`var(--mantine-radius-md)`},children:(0,Y.jsxs)(wl,{gap:8,wrap:`nowrap`,justify:`space-between`,children:[(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,style:{minWidth:0},children:[(0,Y.jsx)(wv,{variant:`light`,color:d,size:`sm`,radius:`sm`,children:(0,Y.jsx)(u,{size:14})}),(0,Y.jsx)(Fd,{fw:700,size:`sm`,lineClamp:2,children:t})]}),(0,Y.jsxs)(np,{size:`xs`,variant:`light`,color:d,tt:`none`,style:{flexShrink:0},children:[r??l.badge,n?` ${n}`:``]})]})}),(0,Y.jsxs)(R_,{gap:`sm`,p:`sm`,children:[a?(0,Y.jsx)(Fd,{size:`sm`,c:`dimmed`,children:a}):null,c,o.map((e,t)=>(0,Y.jsxs)(Q,{children:[(0,Y.jsx)(Fd,{size:`xs`,fw:700,tt:`uppercase`,c:d,style:{letterSpacing:.4},mb:2,children:e.label}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,children:e.body})]},`${e.label}-${t}`)),s.length>0?(0,Y.jsx)(R_,{gap:4,children:s.map(e=>(0,Y.jsx)(Rd,{href:e.href,target:`_blank`,rel:`noreferrer noopener`,size:`xs`,children:(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,component:`span`,children:[(0,Y.jsx)(FT,{size:12}),e.label]})},e.href))}):null]})]})}var XE=e=>(0,Y.jsx)(JE,{kind:`doc`,...e}),ZE=e=>(0,Y.jsx)(JE,{kind:`graph`,...e}),QE=e=>(0,Y.jsx)(JE,{kind:`tip`,...e}),$E=e=>(0,Y.jsx)(JE,{kind:`warning`,...e}),eD={base:12,sm:6,lg:3};function tD({text:e}){return(0,Y.jsx)(O_,{label:e,multiline:!0,w:280,withArrow:!0,position:`top`,events:{hover:!0,focus:!0,touch:!0},children:(0,Y.jsx)(ml,{variant:`subtle`,color:`gray`,size:`sm`,w:24,h:24,style:{cursor:`help`},"aria-label":e,children:(0,Y.jsx)(BT,{size:15})})})}function nD({label:e,icon:t,hint:n,info:r,span:i=eD,onClick:a,active:o=!1,actionLabel:s,children:c}){let l=a!==void 0;return(0,Y.jsx)(Wp.Col,{span:i,children:(0,Y.jsx)(vp,{withBorder:!0,radius:`md`,p:`lg`,h:`100%`,role:l?`button`:void 0,"aria-pressed":l?o:void 0,"aria-label":l?s:void 0,title:l?s:void 0,tabIndex:l?0:void 0,onClick:a,onKeyDown:l?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),a())}:void 0,style:l?{cursor:`pointer`,borderColor:o?`var(--mantine-color-brand-5)`:void 0,backgroundColor:o?`var(--mantine-color-brand-light)`:void 0}:void 0,children:(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`nowrap`,children:[(0,Y.jsxs)(R_,{gap:2,children:[(0,Y.jsxs)(wl,{gap:4,children:[(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:600,children:e}),(0,Y.jsx)(`span`,{onClick:l?e=>e.stopPropagation():void 0,onKeyDown:l?e=>e.stopPropagation():void 0,children:r??(n?(0,Y.jsx)(XE,{title:e,summary:n}):null)})]}),c]}),t]})})})}function rD({k:e,v:t,mono:n}){return(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`nowrap`,gap:`md`,children:[(0,Y.jsx)(Fd,{size:`sm`,c:`dimmed`,children:e}),(0,Y.jsx)(Fd,{size:`sm`,fw:600,ff:n?`monospace`:void 0,ta:`right`,children:t})]})}function iD({children:e,gap:t=6}){return(0,Y.jsx)(R_,{gap:t,children:e})}function aD(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var oD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cD={};function lD(e,t){return((t||cD).jsx?sD:oD).test(e)}var uD=/[ \t\n\f\r]/g;function dD(e){return typeof e==`object`?e.type===`text`&&fD(e.value):fD(e)}function fD(e){return e.replace(uD,``)===``}var pD=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};pD.prototype.normal={},pD.prototype.property={},pD.prototype.space=void 0;function mD(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new pD(n,r,t)}function hD(e){return e.toLowerCase()}var gD=class{constructor(e,t){this.attribute=t,this.property=e}};gD.prototype.attribute=``,gD.prototype.booleanish=!1,gD.prototype.boolean=!1,gD.prototype.commaOrSpaceSeparated=!1,gD.prototype.commaSeparated=!1,gD.prototype.defined=!1,gD.prototype.mustUseProperty=!1,gD.prototype.number=!1,gD.prototype.overloadedBoolean=!1,gD.prototype.property=``,gD.prototype.spaceSeparated=!1,gD.prototype.space=void 0;var _D=t({boolean:()=>yD,booleanish:()=>bD,commaOrSpaceSeparated:()=>wD,commaSeparated:()=>CD,number:()=>$,overloadedBoolean:()=>xD,spaceSeparated:()=>SD}),vD=0,yD=TD(),bD=TD(),xD=TD(),$=TD(),SD=TD(),CD=TD(),wD=TD();function TD(){return 2**++vD}var ED=Object.keys(_D),DD=class extends gD{constructor(e,t,n,r){let i=-1;if(super(e,t),OD(this,`space`,r),typeof n==`number`)for(;++i<ED.length;){let e=ED[i];OD(this,ED[i],(n&_D[e])===_D[e])}}};DD.prototype.defined=!0;function OD(e,t,n){n&&(e[t]=n)}function kD(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new DD(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[hD(r)]=r,n[hD(a.attribute)]=r}return new pD(t,n,e.space)}var AD=kD({properties:{ariaActiveDescendant:null,ariaAtomic:bD,ariaAutoComplete:null,ariaBusy:bD,ariaChecked:bD,ariaColCount:$,ariaColIndex:$,ariaColSpan:$,ariaControls:SD,ariaCurrent:null,ariaDescribedBy:SD,ariaDetails:null,ariaDisabled:bD,ariaDropEffect:SD,ariaErrorMessage:null,ariaExpanded:bD,ariaFlowTo:SD,ariaGrabbed:bD,ariaHasPopup:null,ariaHidden:bD,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:SD,ariaLevel:$,ariaLive:null,ariaModal:bD,ariaMultiLine:bD,ariaMultiSelectable:bD,ariaOrientation:null,ariaOwns:SD,ariaPlaceholder:null,ariaPosInSet:$,ariaPressed:bD,ariaReadOnly:bD,ariaRelevant:null,ariaRequired:bD,ariaRoleDescription:SD,ariaRowCount:$,ariaRowIndex:$,ariaRowSpan:$,ariaSelected:bD,ariaSetSize:$,ariaSort:null,ariaValueMax:$,ariaValueMin:$,ariaValueNow:$,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function jD(e,t){return t in e?e[t]:t}function MD(e,t){return jD(e,t.toLowerCase())}var ND=kD({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:CD,acceptCharset:SD,accessKey:SD,action:null,allow:null,allowFullScreen:yD,allowPaymentRequest:yD,allowUserMedia:yD,alpha:yD,alt:null,as:null,async:yD,autoCapitalize:null,autoComplete:SD,autoFocus:yD,autoPlay:yD,blocking:SD,capture:null,charSet:null,checked:yD,cite:null,className:SD,closedBy:null,colorSpace:null,cols:$,colSpan:$,command:null,commandFor:null,content:null,contentEditable:bD,controls:yD,controlsList:SD,coords:$|CD,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yD,defer:yD,dir:null,dirName:null,disabled:yD,download:xD,draggable:bD,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yD,formTarget:null,headers:SD,height:$,hidden:xD,high:$,href:null,hrefLang:null,htmlFor:SD,httpEquiv:SD,id:null,imageSizes:null,imageSrcSet:null,inert:yD,inputMode:null,integrity:null,is:null,isMap:yD,itemId:null,itemProp:SD,itemRef:SD,itemScope:yD,itemType:SD,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:yD,low:$,manifest:null,max:null,maxLength:$,media:null,method:null,min:null,minLength:$,multiple:yD,muted:yD,name:null,nonce:null,noModule:yD,noValidate:yD,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:yD,optimum:$,pattern:null,ping:SD,placeholder:null,playsInline:yD,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:yD,referrerPolicy:null,rel:SD,required:yD,reversed:yD,rows:$,rowSpan:$,sandbox:SD,scope:null,scoped:yD,seamless:yD,selected:yD,shadowRootClonable:yD,shadowRootCustomElementRegistry:yD,shadowRootDelegatesFocus:yD,shadowRootMode:null,shadowRootSerializable:yD,shape:null,size:$,sizes:null,slot:null,span:$,spellCheck:bD,src:null,srcDoc:null,srcLang:null,srcSet:null,start:$,step:null,style:null,tabIndex:$,target:null,title:null,translate:null,type:null,typeMustMatch:yD,useMap:null,value:bD,width:$,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:SD,axis:null,background:null,bgColor:null,border:$,borderColor:null,bottomMargin:$,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:yD,declare:yD,event:null,face:null,frame:null,frameBorder:null,hSpace:$,leftMargin:$,link:null,longDesc:null,lowSrc:null,marginHeight:$,marginWidth:$,noResize:yD,noHref:yD,noShade:yD,noWrap:yD,object:null,profile:null,prompt:null,rev:null,rightMargin:$,rules:null,scheme:null,scrolling:bD,standby:null,summary:null,text:null,topMargin:$,valueType:null,version:null,vAlign:null,vLink:null,vSpace:$,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:yD,disablePictureInPicture:yD,disableRemotePlayback:yD,exportParts:CD,part:SD,prefix:null,property:null,results:$,security:null,unselectable:null},space:`html`,transform:MD}),PD=kD({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,maskType:`mask-type`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:wD,accentHeight:$,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:$,amplitude:$,arabicForm:null,ascent:$,attributeName:null,attributeType:null,azimuth:$,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:$,by:null,calcMode:null,capHeight:$,className:SD,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:$,diffuseConstant:$,direction:null,display:null,dur:null,divisor:$,dominantBaseline:null,download:yD,dx:null,dy:null,edgeMode:null,editable:null,elevation:$,enableBackground:null,end:null,event:null,exponent:$,externalResourcesRequired:null,fill:null,fillOpacity:$,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:CD,g2:CD,glyphName:CD,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:$,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:$,horizOriginX:$,horizOriginY:$,id:null,ideographic:$,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:$,k:$,k1:$,k2:$,k3:$,k4:$,kernelMatrix:wD,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:$,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:$,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:$,overlineThickness:$,paintOrder:null,panose1:null,path:null,pathLength:$,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:SD,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:$,pointsAtY:$,pointsAtZ:$,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wD,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wD,rev:wD,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wD,requiredFeatures:wD,requiredFonts:wD,requiredFormats:wD,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:$,specularExponent:$,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:$,strikethroughThickness:$,string:null,stroke:null,strokeDashArray:wD,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:$,strokeOpacity:$,strokeWidth:null,style:null,surfaceScale:$,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wD,tabIndex:$,tableValues:null,target:null,targetX:$,targetY:$,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wD,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:$,underlineThickness:$,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:$,values:null,vAlphabetic:$,vMathematical:$,vectorEffect:null,vHanging:$,vIdeographic:$,version:null,vertAdvY:$,vertOriginX:$,vertOriginY:$,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:$,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:jD}),FD=kD({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),ID=kD({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:MD}),LD=kD({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),RD={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},zD=/[A-Z]/g,BD=/-[a-z]/g,VD=/^data[-\w.:]+$/i;function HD(e,t){let n=hD(t),r=t,i=gD;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&VD.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(BD,WD);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!BD.test(e)){let n=e.replace(zD,UD);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=DD}return new i(r,t)}function UD(e){return`-`+e.toLowerCase()}function WD(e){return e.charAt(1).toUpperCase()}var GD=mD([AD,ND,FD,ID,LD],`html`),KD=mD([AD,PD,FD,ID,LD],`svg`);function qD(e){return e.join(` `).trim()}var JD=r(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
|
|
56
|
+
`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),YD=r(((e,t,n)=>{var r=n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=a;var i=r(JD());function a(e,t){let n=null;if(!e||typeof e!=`string`)return n;let r=(0,i.default)(e),a=typeof t==`function`;return r.forEach(e=>{if(e.type!==`declaration`)return;let{property:r,value:i}=e;a?t(r,i,e):i&&(n||={},n[r]=i)}),n}})),XD=r((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),ZD=r(((e,t,n)=>{var r=(n&&n.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(YD()),i=XD();function a(e,t){var n={};return!e||typeof e!=`string`||(0,r.default)(e,function(e,r){e&&r&&(n[(0,i.camelCase)(e,t)]=r)}),n}a.default=a,t.exports=a})),QD=eO(`end`),$D=eO(`start`);function eO(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function tO(e){let t=$D(e),n=QD(e);if(t&&n)return{start:t,end:n}}function nO(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?iO(e.position):`start`in e||`end`in e?iO(e):`line`in e||`column`in e?rO(e):``}function rO(e){return aO(e&&e.line)+`:`+aO(e&&e.column)}function iO(e){return rO(e&&e.start)+`-`+rO(e&&e.end)}function aO(e){return e&&typeof e==`number`?e:1}var oO=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=nO(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};oO.prototype.file=``,oO.prototype.name=``,oO.prototype.reason=``,oO.prototype.message=``,oO.prototype.stack=``,oO.prototype.column=void 0,oO.prototype.line=void 0,oO.prototype.ancestors=void 0,oO.prototype.cause=void 0,oO.prototype.fatal=void 0,oO.prototype.place=void 0,oO.prototype.ruleId=void 0,oO.prototype.source=void 0;var sO=e(ZD(),1),cO={}.hasOwnProperty,lO=new Map,uO=/[A-Z]/g,dO=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),fO=new Set([`td`,`th`]),pO=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function mO(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=TO(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=wO(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?KD:GD,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=hO(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function hO(e,t,n){if(t.type===`element`)return gO(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return _O(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return yO(e,t,n);if(t.type===`mdxjsEsm`)return vO(e,t);if(t.type===`root`)return bO(e,t,n);if(t.type===`text`)return xO(e,t)}function gO(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=KD,e.schema=i),e.ancestors.push(t);let a=jO(e,t.tagName,!1),o=EO(e,t),s=OO(e,t);return dO.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!dD(e)})),SO(e,o,a,t),CO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function _O(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}MO(e,t.position)}function vO(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);MO(e,t.position)}function yO(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=KD,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:jO(e,t.name,!0),o=DO(e,t),s=OO(e,t);return SO(e,o,a,t),CO(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function bO(e,t,n){let r={};return CO(r,OO(e,t)),e.create(t,e.Fragment,r,n)}function xO(e,t){return t.value}function SO(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function CO(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function wO(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function TO(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=$D(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function EO(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&cO.call(t.properties,i)){let a=kO(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&fO.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function DO(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else MO(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else MO(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function OO(e,t){let n=[],r=-1,i=e.passKeys?new Map:lO;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=hO(e,a,o);s!==void 0&&n.push(s)}return n}function kO(e,t,n){let r=HD(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?aD(n):qD(n)),r.property===`style`){let t=typeof n==`object`?n:AO(e,String(n));return e.stylePropertyNameCase===`css`&&(t=NO(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?RD[r.property]||r.property:r.attribute,n]}}function AO(e,t){try{return(0,sO.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new oO("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=pO+`#cannot-parse-style-attribute`,r}}function jO(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=lD(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=lD(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return cO.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);MO(e)}function MO(e,t){let n=new oO("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=pO+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function NO(e){let t={},n;for(n in e)cO.call(e,n)&&(t[PO(n)]=e[n]);return t}function PO(e){let t=e.replace(uO,FO);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function FO(e){return`-`+e.toLowerCase()}var IO={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},LO={};function RO(e,t){let n=t||LO;return zO(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function zO(e,t,n){if(VO(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return BO(e.children,t,n)}return Array.isArray(e)?BO(e,t,n):``}function BO(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=zO(e[i],t,n);return r.join(``)}function VO(e){return!!(e&&typeof e==`object`)}var HO=document.createElement(`i`);function UO(e){let t=`&`+e+`;`;HO.innerHTML=t;let n=HO.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function WO(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function GO(e,t){return e.length>0?(WO(e,e.length,0,t),e):t}var KO={}.hasOwnProperty;function qO(e){let t={},n=-1;for(;++n<e.length;)JO(t,e[n]);return t}function JO(e,t){let n;for(n in t){let r=(KO.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){KO.call(r,a)||(r[a]=[]);let e=i[a];YO(r[a],Array.isArray(e)?e:e?[e]:[])}}}function YO(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);WO(e,0,0,r)}function XO(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function ZO(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var QO=uk(/[A-Za-z]/),$O=uk(/[\dA-Za-z]/),ek=uk(/[#-'*+\--9=?A-Z^-~]/);function tk(e){return e!==null&&(e<32||e===127)}var nk=uk(/\d/),rk=uk(/[\dA-Fa-f]/),ik=uk(/[!-/:-@[-`{-~]/);function ak(e){return e!==null&&e<-2}function ok(e){return e!==null&&(e<0||e===32)}function sk(e){return e===-2||e===-1||e===32}var ck=uk(/\p{P}|\p{S}/u),lk=uk(/\s/);function uk(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function dk(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&$O(e.charCodeAt(n+1))&&$O(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function fk(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return sk(r)?(e.enter(n),s(r)):t(r)}function s(r){return sk(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var pk={tokenize:mk};function mk(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),fk(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return ak(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var hk={tokenize:_k},gk={tokenize:vk};function _k(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return WO(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(gk,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(gk,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return ak(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;WO(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function vk(e,t,n){return fk(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function yk(e){if(e===null||ok(e)||lk(e))return 1;if(ck(e))return 2}function bk(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var xk={name:`attention`,resolveAll:Sk,tokenize:Ck};function Sk(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};wk(d,-c),wk(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=GO(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=GO(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=GO(l,bk(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=GO(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=GO(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,WO(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Ck(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=yk(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=yk(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function wk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Tk={name:`autolink`,tokenize:Ek};function Ek(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return QO(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||$O(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||$O(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||tk(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):ek(t)?(e.consume(t),l):n(t)}function u(e){return $O(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||$O(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Dk={partial:!0,tokenize:Ok};function Ok(e,t,n){return r;function r(t){return sk(t)?fk(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||ak(e)?t(e):n(e)}}var kk={continuation:{tokenize:jk},exit:Mk,name:`blockQuote`,tokenize:Ak};function Ak(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return sk(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function jk(e,t,n){let r=this;return i;function i(t){return sk(t)?fk(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(kk,t,n)(r)}}function Mk(e){e.exit(`blockQuote`)}var Nk={name:`characterEscape`,tokenize:Pk};function Pk(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return ik(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Fk={name:`characterReference`,tokenize:Ik};function Ik(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=$O,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=rk,u):(e.enter(`characterReferenceValue`),a=7,o=nk,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===$O&&!UO(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Lk={partial:!0,tokenize:Bk},Rk={concrete:!0,name:`codeFenced`,tokenize:zk};function zk(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),sk(t)?fk(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||ak(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Lk,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||ak(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):sk(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),fk(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||ak(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||ak(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&sk(t)?fk(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||ak(t)?e.check(Lk,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||ak(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),sk(t)?fk(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),sk(t)?fk(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||ak(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Bk(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Vk={name:`codeIndented`,tokenize:Uk},Hk={partial:!0,tokenize:Wk};function Uk(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),fk(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):ak(t)?e.attempt(Hk,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||ak(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Wk(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):ak(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):fk(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):ak(e)?i(e):n(e)}}var Gk={name:`codeText`,previous:qk,resolve:Kk,tokenize:Jk};function Kk(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function qk(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function Jk(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):ak(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||ak(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Yk=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Xk(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Xk(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Xk(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);Xk(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Xk(this.left,t.reverse())}}}};function Xk(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Zk(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Yk(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Qk(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return WO(e,0,1/0,u.slice(0)),!l}function Qk(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var $k={resolve:tA,tokenize:nA},eA={partial:!0,tokenize:rA};function tA(e){return Zk(e),e}function nA(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):ak(t)?e.check(eA,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function rA(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),fk(e,a,`linePrefix`)}function a(i){if(i===null||ak(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function iA(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||tk(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||ak(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||ok(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||tk(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function aA(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):ak(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||ak(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!sk(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function oA(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):ak(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),fk(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||ak(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function sA(e,t){let n;return r;function r(i){return ak(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):sk(i)?fk(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var cA={name:`definition`,tokenize:uA},lA={partial:!0,tokenize:dA};function uA(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return aA.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=ZO(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return ok(t)?sA(e,l)(t):l(t)}function l(t){return iA(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(lA,d,d)(t)}function d(t){return sk(t)?fk(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||ak(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function dA(e,t,n){return r;function r(t){return ok(t)?sA(e,i)(t):n(t)}function i(t){return oA(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return sk(t)?fk(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||ak(e)?t(e):n(e)}}var fA={name:`hardBreakEscape`,tokenize:pA};function pA(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return ak(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var mA={name:`headingAtx`,resolve:hA,tokenize:gA};function hA(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},WO(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function gA(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||ok(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||ak(n)?(e.exit(`atxHeading`),t(n)):sk(n)?fk(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||ok(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var _A=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),vA=[`pre`,`script`,`style`,`textarea`],yA={concrete:!0,name:`htmlFlow`,resolveTo:SA,tokenize:CA},bA={partial:!0,tokenize:TA},xA={partial:!0,tokenize:wA};function SA(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function CA(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):QO(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):QO(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return QO(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||ok(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&vA.includes(l)?(i=1,r.interrupt?t(s):O(s)):_A.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||$O(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return sk(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||QO(t)?(e.consume(t),b):sk(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||$O(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):sk(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):sk(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||ak(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||ok(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||sk(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||ak(t)?O(t):sk(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):ak(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(bA,R,k)(t)):t===null||ak(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(xA,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||ak(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return vA.includes(n)?(e.consume(t),L):O(t)}return QO(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||ak(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function wA(e,t,n){let r=this;return i;function i(t){return ak(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function TA(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Dk,t,n)}}var EA={name:`htmlText`,tokenize:DA};function DA(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):QO(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):QO(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):ak(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):ak(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):ak(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):ak(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return QO(t)?(e.consume(t),S):n(t)}function S(t){return t===45||$O(t)?(e.consume(t),S):C(t)}function C(t){return ak(t)?(o=C,N(t)):sk(t)?(e.consume(t),C):M(t)}function w(t){return t===45||$O(t)?(e.consume(t),w):t===47||t===62||ok(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||QO(t)?(e.consume(t),E):ak(t)?(o=T,N(t)):sk(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||$O(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):ak(t)?(o=D,N(t)):sk(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):ak(t)?(o=O,N(t)):sk(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):ak(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||ok(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||ok(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return sk(t)?fk(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var OA={name:`labelEnd`,resolveAll:MA,resolveTo:NA,tokenize:PA},kA={tokenize:FA},AA={tokenize:IA},jA={tokenize:LA};function MA(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&WO(e,0,e.length,n),e}function NA(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=GO(s,e.slice(a+1,a+r+3)),s=GO(s,[[`enter`,u,t]]),s=GO(s,bk(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=GO(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=GO(s,e.slice(o+1)),s=GO(s,[[`exit`,c,t]]),WO(e,a,e.length,s),e}function PA(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(ZO(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(kA,u,o?u:d)(t):t===91?e.attempt(AA,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(jA,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function FA(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return ok(t)?sA(e,a)(t):a(t)}function a(t){return t===41?u(t):iA(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return ok(t)?sA(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?oA(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return ok(t)?sA(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function IA(e,t,n){let r=this;return i;function i(t){return aA.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(ZO(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function LA(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var RA={name:`labelStartImage`,resolveAll:OA.resolveAll,tokenize:zA};function zA(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var BA={name:`labelStartLink`,resolveAll:OA.resolveAll,tokenize:VA};function VA(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var HA={name:`lineEnding`,tokenize:UA};function UA(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),fk(e,t,`linePrefix`)}}var WA={name:`thematicBreak`,tokenize:GA};function GA(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||ak(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),sk(t)?fk(e,s,`whitespace`)(t):s(t))}}var KA={continuation:{tokenize:XA},exit:QA,name:`list`,tokenize:YA},qA={partial:!0,tokenize:$A},JA={partial:!0,tokenize:ZA};function YA(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:nk(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(WA,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return nk(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Dk,r.interrupt?n:u,e.attempt(qA,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return sk(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function XA(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Dk,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,fk(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!sk(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(JA,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,fk(e,e.attempt(KA,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ZA(e,t,n){let r=this;return fk(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function QA(e){e.exit(this.containerState.type)}function $A(e,t,n){let r=this;return fk(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!sk(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var ej={name:`setextUnderline`,resolveTo:tj,tokenize:nj};function tj(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function nj(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),sk(t)?fk(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||ak(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var rj={tokenize:ij};function ij(e){let t=this,n=e.attempt(Dk,r,e.attempt(this.parser.constructs.flowInitial,i,fk(e,e.attempt(this.parser.constructs.flow,i,e.attempt($k,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var aj={resolveAll:lj()},oj=cj(`string`),sj=cj(`text`);function cj(e){return{resolveAll:lj(e===`text`?uj:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function lj(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function uj(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var dj=t({attentionMarkers:()=>yj,contentInitial:()=>pj,disable:()=>bj,document:()=>fj,flow:()=>hj,flowInitial:()=>mj,insideSpan:()=>vj,string:()=>gj,text:()=>_j}),fj={42:KA,43:KA,45:KA,48:KA,49:KA,50:KA,51:KA,52:KA,53:KA,54:KA,55:KA,56:KA,57:KA,62:kk},pj={91:cA},mj={[-2]:Vk,[-1]:Vk,32:Vk},hj={35:mA,42:WA,45:[ej,WA],60:yA,61:ej,95:WA,96:Rk,126:Rk},gj={38:Fk,92:Nk},_j={[-5]:HA,[-4]:HA,[-3]:HA,33:RA,38:Fk,42:xk,60:[Tk,EA],91:BA,92:[fA,Nk],93:OA,95:xk,96:Gk},vj={null:[xk,aj]},yj={null:[42,95]},bj={null:[]};function xj(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=GO(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=bk(a,l.events,l),l.events):[]}function f(e,t){return Cj(p(e),t)}function p(e){return Sj(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){ak(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&WO(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Sj(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Cj(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
57
|
+
`;break;case-3:o=`\r
|
|
58
|
+
`;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function wj(e){let t={constructs:qO([dj,...(e||{}).extensions||[]]),content:n(pk),defined:[],document:n(hk),flow:n(rj),lazy:{},string:n(oj),text:n(sj)};return t;function n(e){return n;function n(n){return xj(t,e,n)}}}function Tj(e){for(;!Zk(e););return e}var Ej=/[\0\t\n\r]/g;function Dj(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Ej.lastIndex=u,c=Ej.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Oj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function kj(e){return e.replace(Oj,Aj)}function Aj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return XO(n.slice(t?2:1),t?16:10)}return UO(n)||e}var jj={}.hasOwnProperty;function Mj(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Nj(n)(Tj(wj(n).document().write(Dj()(e,t,!0))))}function Nj(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(J),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(q),blockQuote:a(G),characterEscape:T,characterReference:T,codeFenced:a(te),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(te,o),codeText:a(ne,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(K),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(re),hardBreakEscape:a(ie),hardBreakTrailing:a(ie),htmlFlow:a(ae,o),htmlFlowData:T,htmlText:a(ae,o),htmlTextData:T,image:a(oe),label:o,link:a(J),listItem:a(ce),listItemValue:f,listOrdered:a(se,d),listUnordered:a(se),paragraph:a(le),reference:z,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(q),strong:a(ue),thematicBreak:a(fe)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:W,autolinkProtocol:U,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:H,characterReference:ee,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:F,labelText:P,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:B,resourceDestinationString:I,resourceTitleString:L,resource:R,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};Fj(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];jj.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Lj).call(a,void 0,e[0])}for(r.position={start:Pj(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Pj(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Pj(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Lj).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+nO({start:e.start,end:e.end})+`): it’s not open`);n.position.end=Pj(e.end)}function u(){return RO(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ZO(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=de(),n.position={start:Pj(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Pj(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Pj(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=kj(t),n.identifier=ZO(t).toLowerCase()}function F(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function I(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function L(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function R(){this.data.inReference=void 0}function z(){this.data.referenceType=`collapsed`}function B(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=ZO(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function V(e){this.data.characterReferenceType=e.type}function H(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=XO(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=UO(t);let i=this.stack[this.stack.length-1];i.value+=r}function ee(e){let t=this.stack.pop();t.position.end=Pj(e.end)}function U(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function W(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function G(){return{type:`blockquote`,children:[]}}function te(){return{type:`code`,lang:null,meta:null,value:``}}function ne(){return{type:`inlineCode`,value:``}}function K(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function re(){return{type:`emphasis`,children:[]}}function q(){return{type:`heading`,depth:0,children:[]}}function ie(){return{type:`break`}}function ae(){return{type:`html`,value:``}}function oe(){return{type:`image`,title:null,url:``,alt:null}}function J(){return{type:`link`,title:null,url:``,children:[]}}function se(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ce(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function le(){return{type:`paragraph`,children:[]}}function ue(){return{type:`strong`,children:[]}}function de(){return{type:`text`,value:``}}function fe(){return{type:`thematicBreak`}}}function Pj(e){return{line:e.line,column:e.column,offset:e.offset}}function Fj(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Fj(e,r):Ij(e,r)}}function Ij(e,t){let n;for(n in t)if(jj.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Lj(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+nO({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+nO({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+nO({start:t.start,end:t.end})+`) is still open`)}function Rj(e){let t=this;t.parser=n;function n(n){return Mj(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function zj(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Bj(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
|
|
59
|
+
`}]}function Vj(e,t){let n=t.value?t.value+`
|
|
60
|
+
`:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Hj(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Uj(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Wj(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=dk(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Gj(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Kj(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function qj(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Jj(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qj(e,t);let i={src:dk(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Yj(e,t){let n={src:dk(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Xj(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Zj(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return qj(e,t);let i={href:dk(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Qj(e,t){let n={href:dk(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function $j(e,t,n){let r=e.all(t),i=n?eM(n):tM(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
61
|
+
`}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
|
|
62
|
+
`});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function eM(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=tM(n[r])}return t}function tM(e){return e.spread??e.children.length>1}function nM(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function rM(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iM(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function aM(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oM(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=$D(t.children[1]),o=QD(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function sM(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function cM(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var lM=9,uM=32;function dM(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(fM(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(fM(t.slice(i),i>0,!1)),a.join(``)}function fM(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===lM||t===uM;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===lM||t===uM;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function pM(e,t){let n={type:`text`,value:dM(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function mM(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var hM={blockquote:zj,break:Bj,code:Vj,delete:Hj,emphasis:Uj,footnoteReference:Wj,heading:Gj,html:Kj,imageReference:Jj,image:Yj,inlineCode:Xj,linkReference:Zj,link:Qj,listItem:$j,list:nM,paragraph:rM,root:iM,strong:aM,table:oM,tableCell:cM,tableRow:sM,text:pM,thematicBreak:mM,toml:gM,yaml:gM,definition:gM,footnoteDefinition:gM};function gM(){}var _M=typeof self==`object`?self:globalThis,vM=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new _M[e](t)},yM=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof _M[e]==`function`?vM(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(vM(a,o),i)};return r},bM=e=>yM(new Map,e)(0),xM=``,{toString:SM}={},{keys:CM}=Object,wM=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=SM.call(e).slice(8,-1);switch(n){case`Array`:return[1,xM];case`Object`:return[2,xM];case`Date`:return[3,xM];case`RegExp`:return[4,xM];case`Map`:return[5,xM];case`Set`:return[6,xM];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},TM=([e,t])=>e===0&&(t===`function`||t===`symbol`),EM=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=wM(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of CM(r))(e||!TM(wM(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?xM:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(TM(wM(n))||TM(wM(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!TM(wM(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},DM=(e,{json:t,lossy:n}={})=>{let r=[];return EM(!(t||n),!!t,new Map,r)(e),r},OM=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?bM(DM(e,t)):structuredClone(e):(e,t)=>bM(DM(e,t));function kM(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function AM(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function jM(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||kM,r=e.options.footnoteBackLabel||AM,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=dk(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...OM(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
|
|
63
|
+
`},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
|
|
64
|
+
`}]}}var MM=(function(e){if(e==null)return LM;if(typeof e==`function`)return IM(e);if(typeof e==`object`)return Array.isArray(e)?NM(e):PM(e);if(typeof e==`string`)return FM(e);throw Error(`Expected function, string, or object as test`)});function NM(e){let t=[],n=-1;for(;++n<e.length;)t[n]=MM(e[n]);return IM(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function PM(e){let t=e;return IM(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function FM(e){return IM(t);function t(t){return t&&t.type===e}}function IM(e){return t;function t(t,n,r){return!!(RM(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function LM(){return!0}function RM(e){return typeof e==`object`&&!!e&&`type`in e}function zM(e){return e}var BM=[];function VM(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=MM(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+zM(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=BM,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=HM(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function HM(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?BM:[e]}function UM(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),VM(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var WM={}.hasOwnProperty,GM={};function KM(e,t){let n=t||GM,r=new Map,i=new Map,a={all:s,applyData:JM,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...hM,...n.handlers},one:o,options:n,patch:qM,wrap:XM};return UM(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(WM.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=OM(n);return r.children=a.all(e),r}return OM(e)}return(a.options.unknownHandler||YM)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=ZM(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=ZM(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function qM(e,t){e.position&&(t.position=tO(e))}function JM(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,OM(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function YM(e,t){let n=t.data||{},r=`value`in t&&!(WM.call(n,`hProperties`)||WM.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function XM(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
|
|
65
|
+
`});++r<e.length;)r&&n.push({type:`text`,value:`
|
|
66
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
|
|
67
|
+
`}),n}function ZM(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function QM(e,t){let n=KM(e,t),r=n.one(e,void 0),i=jM(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
|
|
68
|
+
`},i)),a}function $M(e,t){return e&&`run`in e?async function(n,r){let i=QM(n,{file:r,...t});await e.run(i,r)}:function(n,r){return QM(n,{file:r,...e||t})}}function eN(e){if(e)throw e}var tN=e(r(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}))(),1);function nN(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function rN(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?iN(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function iN(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var aN={basename:oN,dirname:sN,extname:cN,join:lN,sep:`/`};function oN(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);fN(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function sN(e){if(fN(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function cN(e){fN(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function lN(...e){let t=-1,n;for(;++t<e.length;)fN(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:uN(n)}function uN(e){fN(e);let t=e.codePointAt(0)===47,n=dN(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function dN(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function fN(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var pN={cwd:mN};function mN(){return`/`}function hN(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function gN(e){if(typeof e==`string`)e=new URL(e);else if(!hN(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return _N(e)}function _N(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var vN=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],yN=class{constructor(e){let t;t=e?hN(e)?{path:e}:typeof e==`string`||CN(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:pN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<vN.length;){let e=vN[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)vN.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?aN.basename(this.path):void 0}set basename(e){xN(e,`basename`),bN(e,`basename`),this.path=aN.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?aN.dirname(this.path):void 0}set dirname(e){SN(this.basename,`dirname`),this.path=aN.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?aN.extname(this.path):void 0}set extname(e){if(bN(e,`extname`),SN(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=aN.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){hN(e)&&(e=gN(e)),xN(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?aN.basename(this.path,this.extname):void 0}set stem(e){xN(e,`stem`),bN(e,`stem`),this.path=aN.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new oO(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function bN(e,t){if(e&&e.includes(aN.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+aN.sep+"`")}function xN(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function SN(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function CN(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var wN=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),TN={}.hasOwnProperty,EN=new class e extends wN{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=rN()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,tN.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(kN(`data`,this.frozen),this.namespace[e]=t,this):TN.call(this.namespace,e)&&this.namespace[e]||void 0:e?(kN(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=MN(e),n=this.parser||this.Parser;return DN(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),DN(`process`,this.parser||this.Parser),ON(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=MN(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);PN(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),DN(`processSync`,this.parser||this.Parser),ON(`processSync`,this.compiler||this.Compiler),this.process(e,r),jN(`processSync`,`process`,t),n;function r(e,r){t=!0,eN(e),n=r}}run(e,t,n){AN(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=MN(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),jN(`runSync`,`run`,n),r;function i(e,t){eN(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=MN(t),r=this.compiler||this.Compiler;return ON(`stringify`,r),AN(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(kN(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,tN.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];nN(o)&&nN(r)&&(r=(0,tN.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function DN(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function ON(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function kN(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function AN(e){if(!nN(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function jN(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function MN(e){return NN(e)?e:new yN(e)}function NN(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function PN(e){return typeof e==`string`||FN(e)}function FN(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var IN=[],LN={allowDangerousHtml:!0},RN=/^(https?|ircs?|mailto|xmpp)$/i,zN=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function BN(e){let t=VN(e),n=HN(e);return UN(t.runSync(t.parse(n),n),e)}function VN(e){let t=e.rehypePlugins||IN,n=e.remarkPlugins||IN,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...LN}:LN;return EN().use(Rj).use(n).use($M,r).use(t)}function HN(e){let t=e.children||``,n=new yN;return typeof t==`string`?n.value=t:``+t,n}function UN(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||WN;for(let e of zN)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return UM(e,l),mO(e,{Fragment:Y.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Y.jsx,jsxs:Y.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in IO)if(Object.hasOwn(IO,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=IO[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function WN(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||RN.test(e.slice(0,t))?e:``}function GN(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function KN(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function qN(e,t,n){let r=MM((n||{}).ignore||[]),i=JN(t),a=-1;for(;++a<i.length;)VM(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function JN(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([YN(e[0]),XN(e[1])])}return t}function YN(e){return typeof e==`string`?new RegExp(KN(e),`g`):e}function XN(e){return typeof e==`function`?e:function(){return e}}var ZN=`phrasing`,QN=[`autolink`,`link`,`image`,`label`];function $N(){return{transforms:[sP],enter:{literalAutolink:tP,literalAutolinkEmail:nP,literalAutolinkHttp:nP,literalAutolinkWww:nP},exit:{literalAutolink:oP,literalAutolinkEmail:aP,literalAutolinkHttp:rP,literalAutolinkWww:iP}}}function eP(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:ZN,notInConstruct:QN},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:ZN,notInConstruct:QN},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:ZN,notInConstruct:QN}]}}function tP(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function nP(e){this.config.enter.autolinkProtocol.call(this,e)}function rP(e){this.config.exit.autolinkProtocol.call(this,e)}function iP(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function aP(e){this.config.exit.autolinkEmail.call(this,e)}function oP(e){this.exit(e)}function sP(e){qN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,cP],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,lP]],{ignore:[`link`,`linkReference`]})}function cP(e,t,n,r,i){let a=``;if(!fP(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!uP(n)))return!1;let o=dP(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function lP(e,t,n,r){return!fP(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function uP(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function dP(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=GN(e,`(`),a=GN(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function fP(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||lk(n)||ck(n))&&(!t||n!==47)}SP.peek=xP;function pP(){this.buffer()}function mP(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function hP(){this.buffer()}function gP(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function _P(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ZO(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vP(e){this.exit(e)}function yP(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ZO(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bP(e){this.exit(e)}function xP(){return`[`}function SP(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function CP(){return{enter:{gfmFootnoteCallString:pP,gfmFootnoteCall:mP,gfmFootnoteDefinitionLabelString:hP,gfmFootnoteDefinition:gP},exit:{gfmFootnoteCallString:_P,gfmFootnoteCall:vP,gfmFootnoteDefinitionLabelString:yP,gfmFootnoteDefinition:bP}}}function wP(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:SP},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
69
|
+
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?EP:TP))),s(),o}}function TP(e,t,n){return t===0?e:EP(e,t,n)}function EP(e,t,n){return(n?``:` `)+e}var DP=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];MP.peek=NP;function OP(){return{canContainEols:[`delete`],enter:{strikethrough:AP},exit:{strikethrough:jP}}}function kP(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:DP}],handlers:{delete:MP}}}function AP(e){this.enter({type:`delete`,children:[]},e)}function jP(e){this.exit(e)}function MP(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function NP(){return`~`}function PP(e){return e.length}function FP(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||PP,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=IP(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=LP(r[d]);else{let e=LP(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
70
|
+
`)}function IP(e){return e==null?``:String(e)}function LP(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function RP(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),zP);return i(),o}function zP(e,t,n){return`>`+(n?``:` `)+e}function BP(e,t){return VP(e,t.inConstruct,!0)&&!VP(e,t.notInConstruct,!1)}function VP(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function HP(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
71
|
+
`&&BP(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
72
|
+
`}function UP(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function WP(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^ \r\n]/.test(e.value)||/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function GP(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function KP(e,t,n,r){let i=GP(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(WP(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,qP);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(UP(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
73
|
+
`,encode:["`"],...s.current()})),t()}return u+=s.move(`
|
|
74
|
+
`),a&&(u+=s.move(a+`
|
|
75
|
+
`)),u+=s.move(c),l(),u}function qP(e,t,n){return(n?``:` `)+e}function JP(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function YP(e,t,n,r){let i=JP(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\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?` `:`
|
|
76
|
+
`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function XP(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function ZP(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function QP(e,t,n){let r=yk(e),i=yk(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}$P.peek=eF;function $P(e,t,n,r){let i=XP(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=QP(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=ZP(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=QP(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ZP(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function eF(e,t,n){return n.options.emphasis||`*`}function tF(e,t){let n=!1;return UM(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&RO(e)&&(t.options.setext||n))}function nF(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(tF(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
|
|
77
|
+
`,after:`
|
|
78
|
+
`});return r(),t(),o+`
|
|
79
|
+
`+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
|
|
80
|
+
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
81
|
+
`,...a.current()});return/^[\t ]/.test(l)&&(l=ZP(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}rF.peek=iF;function rF(e){return e.value||``}function iF(){return`<`}aF.peek=oF;function aF(e,t,n,r){let i=JP(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),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(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function oF(){return`!`}sF.peek=cF;function sF(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function cF(){return`!`}lF.peek=uF;function lF(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function uF(){return"`"}function dF(e,t){let n=RO(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))}fF.peek=pF;function fF(e,t,n,r){let i=JP(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(dF(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function pF(e,t,n){return dF(e,n)?`<`:`[`}mF.peek=hF;function mF(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function hF(){return`[`}function gF(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function _F(e){let t=gF(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function vF(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function yF(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function bF(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?vF(n):gF(n),s=e.ordered?o===`.`?`)`:`.`:_F(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.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),yF(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function xF(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function SF(e,t,n,r){let i=xF(n),a=n.bulletCurrent||gF(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 o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function CF(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var wF=MM([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function TF(e,t,n,r){return(e.children.some(function(e){return wF(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function EF(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}DF.peek=OF;function DF(e,t,n,r){let i=EF(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=QP(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=ZP(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=QP(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+ZP(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function OF(e,t,n){return n.options.strong||`*`}function kF(e,t,n,r){return n.safe(e.value,r)}function AF(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function jF(e,t,n){let r=(yF(n)+(n.options.ruleSpaces?` `:``)).repeat(AF(n));return n.options.ruleSpaces?r.slice(0,-1):r}var MF={blockquote:RP,break:HP,code:KP,definition:YP,emphasis:$P,hardBreak:HP,heading:nF,html:rF,image:aF,imageReference:sF,inlineCode:lF,link:fF,linkReference:mF,list:bF,listItem:SF,paragraph:CF,root:TF,strong:DF,text:kF,thematicBreak:jF};function NF(){return{enter:{table:PF,tableData:RF,tableHeader:RF,tableRow:IF},exit:{codeText:zF,table:FF,tableData:LF,tableHeader:LF,tableRow:LF}}}function PF(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function FF(e){this.exit(e),this.data.inTable=void 0}function IF(e){this.enter({type:`tableRow`,children:[]},e)}function LF(e){this.exit(e)}function RF(e){this.enter({type:`tableCell`,children:[]},e)}function zF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,BF));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function BF(e,t){return t===`|`?t:e}function VF(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
82
|
+
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
83
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return FP(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=MF.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function HF(){return{exit:{taskListCheckValueChecked:WF,taskListCheckValueUnchecked:WF,paragraph:GF}}}function UF(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:KF}}}function WF(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function GF(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function KF(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=MF.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function qF(){return[$N(),CP(),OP(),NF(),HF()]}function JF(e){return{extensions:[eP(),wP(e),kP(),VF(e),UF()]}}var YF={tokenize:lI,partial:!0},XF={tokenize:uI,partial:!0},ZF={tokenize:dI,partial:!0},QF={tokenize:fI,partial:!0},$F={tokenize:pI,partial:!0},eI={name:`wwwAutolink`,tokenize:sI,previous:mI},tI={name:`protocolAutolink`,tokenize:cI,previous:hI},nI={name:`emailAutolink`,tokenize:oI,previous:gI},rI={};function iI(){return{text:rI}}for(var aI=48;aI<123;)rI[aI]=nI,aI++,aI===58?aI=65:aI===91&&(aI=97);rI[43]=nI,rI[45]=nI,rI[46]=nI,rI[95]=nI,rI[72]=[nI,tI],rI[104]=[nI,tI],rI[87]=[nI,eI],rI[119]=[nI,eI];function oI(e,t,n){let r=this,i,a;return o;function o(t){return!_I(t)||!gI.call(r,r.previous)||vI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return _I(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check($F,u,l)(t):t===45||t===95||$O(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&QO(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function sI(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!mI.call(r,r.previous)||vI(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(YF,e.attempt(XF,e.attempt(ZF,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function cI(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&hI.call(r,r.previous)&&!vI(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(QO(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||tk(t)||ok(t)||lk(t)||ck(t)?n(t):e.attempt(XF,e.attempt(ZF,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function lI(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function uI(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(QF,c,s)(t):t===null||ok(t)||lk(t)||t!==45&&ck(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function dI(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(QF,t,a)(o):o===null||ok(o)||lk(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function fI(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||ok(o)||lk(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||ok(e)||lk(e)?t(e):r(e)}function a(e){return QO(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):QO(t)?(e.consume(t),o):n(t)}}function pI(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return $O(e)?n(e):t(e)}}function mI(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ok(e)}function hI(e){return!QO(e)}function gI(e){return!(e===47||_I(e))}function _I(e){return e===43||e===45||e===46||e===95||$O(e)}function vI(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var yI={tokenize:DI,partial:!0};function bI(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:wI,continuation:{tokenize:TI},exit:EI}},text:{91:{name:`gfmFootnoteCall`,tokenize:CI},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:xI,resolveTo:SI}}}}function xI(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=ZO(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function SI(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`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function CI(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||ok(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(ZO(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return ok(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function wI(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||ok(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=ZO(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return ok(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),fk(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function TI(e,t,n){return e.check(Dk,t,e.attempt(yI,t,n))}function EI(e){e.exit(`gfmFootnoteDefinition`)}function DI(e,t,n){let r=this;return fk(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function OI(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&WO(o,o.length,0,bk(s,e.slice(r+1,n),t)),WO(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),WO(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=yk(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=yk(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var kI=class{constructor(){this.map=[]}add(e,t,n){AI(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function AI(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function jI(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function MI(){return{flow:{null:{name:`table`,tokenize:NI,resolveAll:PI}}}}function NI(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):ak(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):sk(t)?fk(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||ok(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,sk(t)?fk(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return sk(t)?fk(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||ak(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return sk(t)?fk(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||ak(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||ak(n)?(e.exit(`tableRow`),t(n)):sk(n)?fk(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||ok(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function PI(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new kI;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(II(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=FI(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=FI(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=FI(f,t,o,i,n,d)):(o[0]=o[1],d=FI(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&II(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=jI(t.events,n))}return e}function FI(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},LI(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=LI(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=LI(t.events,n[2]),a=LI(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},LI(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function II(e,t,n,r,i){let a=[],o=LI(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function LI(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var RI={name:`tasklistCheck`,tokenize:BI};function zI(){return{text:{91:RI}}}function BI(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return ok(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return ak(r)?t(r):sk(r)?e.check({tokenize:VI},t,n)(r):n(r)}}function VI(e,t,n){return fk(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function HI(e){return qO([iI(),bI(),OI(e),MI(),zI()])}var UI={};function WI(e){let t=this,n=e||UI,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(HI(n)),a.push(qF()),o.push(JF(n))}function GI(e){return e.toLowerCase().replace(/[︀-️]/g,``).replace(/[^\p{L}\p{N}\p{M}\s-]/gu,``).replace(/\s/g,`-`)}function KI(e,t=2,n=3){if(!e)return[];let r=[],i=!1;for(let a of e.split(`
|
|
84
|
+
`)){if(/^\s*(```|~~~)/.test(a)){i=!i;continue}if(i)continue;let e=/^(#{1,6})\s+(.+?)\s*#*\s*$/.exec(a);if(!e)continue;let[,o=``,s=``]=e,c=o.length;if(c<t||c>n)continue;let l=s.replace(/[*_`]/g,``).trim();l&&r.push({level:c,text:l,id:GI(l)})}return r}function qI({markdown:e,scrollRootRef:t,minLevel:n=2,maxLevel:r=3,maxHeight:i,actions:a}){let o=(0,C.useMemo)(()=>KI(e,n,r),[e,n,r]),[s,c]=(0,C.useState)(``),[l,u]=(0,C.useState)(null),d=(0,C.useRef)(n),f=(0,C.useMemo)(()=>{let e=s.trim().toLowerCase();return e?o.filter(t=>t.text.toLowerCase().includes(e)):o},[o,s]);if((0,C.useEffect)(()=>{if(!o.length)return;let e=o.map(e=>document.getElementById(e.id)).filter(e=>e!==null);if(!e.length)return;let n=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top).at(0);t&&u(t.target.id)},{root:t?.current??null,rootMargin:`0px 0px -70% 0px`,threshold:0});return e.forEach(e=>n.observe(e)),()=>n.disconnect()},[o,t]),!o.length)return null;let p=e=>{let t=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;document.getElementById(e)?.scrollIntoView({behavior:t?`auto`:`smooth`,block:`start`}),u(e)},m=(0,Y.jsxs)(Q,{style:{flexShrink:0},children:[(0,Y.jsxs)(wl,{gap:6,mb:6,px:`xs`,justify:`space-between`,wrap:`nowrap`,children:[(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,children:[(0,Y.jsx)(WT,{size:14}),(0,Y.jsx)(Fd,{size:`xs`,fw:700,tt:`uppercase`,c:`dimmed`,children:`Sur cette page`})]}),a]}),o.length>8&&(0,Y.jsx)(xv,{size:`xs`,mb:6,placeholder:`Filtrer le sommaire…`,value:s,onChange:e=>c(e.currentTarget.value),leftSection:(0,Y.jsx)(JT,{size:13}),"aria-label":`Filtrer le sommaire`})]}),h=(0,Y.jsxs)(R_,{gap:1,children:[f.map(e=>{let t=e.id===l;return(0,Y.jsx)(ic,{onClick:()=>p(e.id),style:{paddingLeft:N((e.level-d.current)*12+10),paddingTop:N(3),paddingBottom:N(3),minHeight:N(24),display:`flex`,alignItems:`center`,borderLeft:`2px solid ${t?`var(--mantine-primary-color-filled)`:`transparent`}`},children:(0,Y.jsx)(Fd,{size:`xs`,lineClamp:2,c:t?void 0:`dimmed`,fw:t?600:400,children:e.text})},e.id)}),!f.length&&(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,px:`xs`,py:4,children:`Aucun titre ne correspond.`})]});return i?(0,Y.jsxs)(Q,{style:{display:`flex`,flexDirection:`column`,maxHeight:i,minHeight:0},children:[m,(0,Y.jsx)(ec,{type:`hover`,style:{flex:1,minHeight:0},children:h})]}):(0,Y.jsxs)(Q,{children:[m,h]})}var JI=`var(--app-shell-header-height, 56px)`,YI=`var(--nodefony-debugbar-height, 0px)`,XI=`var(--mantine-spacing-md, 16px)`,ZI=`var(--nf-pageheader-height, 76px)`,QI=`48px`,$I=`60px`,eL=ZI,tL=`calc(${ZI} + ${XI})`,nL=`calc(100dvh - ${JI} - ${ZI} - ${YI} - ${XI} * 3)`,rL=`calc(${ZI} + ${XI} * 2)`,iL=nL,aL=`calc(100dvh - ${JI} - ${ZI} - ${QI} - ${YI} - ${XI} * 2)`,oL=`calc(100dvh - ${JI} - ${ZI} - ${QI} - ${YI} - ${XI} * 4)`,sL=`calc(100dvh - ${$I} - ${YI})`,cL=`calc(100dvh - ${$I} - ${YI} - ${XI} * 2)`;function lL({LiveGraph:e,height:t=560,title:n=`Schéma live`,hint:r}){let[i,a]=(0,C.useState)(!1);return(0,Y.jsxs)(lc,{withBorder:!0,radius:`md`,p:`md`,mt:`xl`,children:[(0,Y.jsxs)(wl,{justify:`space-between`,mb:`sm`,wrap:`wrap`,children:[(0,Y.jsxs)(Q,{style:{maxWidth:560},children:[(0,Y.jsx)(Fd,{fw:700,size:`md`,children:n}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,mt:2,children:r??(0,Y.jsxs)(Y.Fragment,{children:[`Le graphe respire via le canal `,(0,Y.jsx)(wp,{children:`nodefony:socket`}),` `,`quand le temps réel est activé. `,(0,Y.jsx)(`b`,{children:`OFF`}),` = 0 ticker côté serveur (composant statique). `,(0,Y.jsx)(`b`,{children:`ON`}),` = abonnement ref-compté.`]})})]}),(0,Y.jsx)(G_,{checked:i,onChange:e=>a(e.currentTarget.checked),label:`Temps réel`,"aria-label":`Activer le temps réel sur le graphe`})]}),(0,Y.jsx)(e,{live:i,height:t})]})}var uL=`nodefony:studio:stale-chunk-reload`,dL=1e4;function fL(){try{let e=Number(sessionStorage.getItem(uL)??0);if(Date.now()-e<dL)return!1;sessionStorage.setItem(uL,String(Date.now()))}catch{return!1}return window.location.reload(),!0}var pL=e=>(0,C.lazy)(()=>e().catch(e=>{if(fL())return new Promise(()=>{});throw e})),mL=[{name:`architecture`,label:`Architecture`,component:pL(()=>i(()=>import(`./ArchitectureLiveGraph-DdYMg18n.js`).then(e=>({default:e.ArchitectureLiveGraph})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])))},{name:`protocole`,label:`Protocole`,component:pL(()=>i(()=>import(`./ProtocoleLiveGraph-Cmbh6-Gx.js`).then(e=>({default:e.ProtocoleLiveGraph})),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,24,19,21,22])))},{name:`fan-out`,label:`Fan-out`,component:pL(()=>i(()=>import(`./FanOutLiveGraph-CTVtTGnG.js`).then(e=>({default:e.FanOutLiveGraph})),__vite__mapDeps([25,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,26,18,19,21,22])))},{name:`actions`,label:`Actions`,component:pL(()=>i(()=>import(`./ActionsLiveGraph-DPG8293v.js`).then(e=>({default:e.ActionsLiveGraph})),__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,28,21,22])))},{name:`backplane`,label:`Backplane`,component:pL(()=>i(()=>import(`./BackplaneLiveGraph-ieJyx_Ub.js`).then(e=>({default:e.BackplaneLiveGraph})),__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,30,31,21,22])))},{name:`sondes`,label:`Sondes`,component:pL(()=>i(()=>import(`./ProbesLiveGraph-ClLUCJ9O.js`).then(e=>({default:e.ProbesLiveGraph})),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,19,21,22])))}],hL=mL.map(e=>e.name);function gL(e){return mL.find(t=>t.name===e)?.component}function _L(e){if(e==null)return`null`;if(Array.isArray(e))return`array`;let t=typeof e;return t===`string`?`string`:t===`number`||t===`bigint`?`number`:t===`boolean`?`boolean`:`object`}function vL(e){return Array.isArray(e)?e.length>0:e&&typeof e==`object`?Object.keys(e).length>0:!1}var yL={string:`light-dark(var(--mantine-color-teal-8), var(--mantine-color-teal-3))`,number:`light-dark(var(--mantine-color-blue-8), var(--mantine-color-blue-4))`,boolean:`light-dark(var(--mantine-color-grape-8), var(--mantine-color-grape-3))`,null:`var(--mantine-color-dimmed)`,object:`var(--mantine-color-dimmed)`,array:`var(--mantine-color-dimmed)`};function bL(e){let t=_L(e);return t===`null`?e===void 0?`undefined`:`null`:t===`string`?JSON.stringify(e):String(e)}function xL(e){if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`)return String(e);if(typeof e==`symbol`)return e.toString();if(Array.isArray(e))return e.map(e=>xL(e)).join(`,`);if(e instanceof Date)return e.toString();try{return JSON.stringify(e)??``}catch{return Object.prototype.toString.call(e)}}function SL(e){if(Array.isArray(e))return`${e.length} élément${e.length>1?`s`:``}`;let t=e&&typeof e==`object`?Object.keys(e).length:0;return`${t} clé${t>1?`s`:``}`}function CL(e,t=80){let n=_L(e);if(n!==`object`&&n!==`array`)return wL(bL(e),t);let r;try{r=JSON.stringify(e)}catch{r=String(e)}return wL(r??String(e),t)}function wL(e,t){return e.length<=t?e:`${e.slice(0,t-1)}…`}function TL(e,t=2){try{return JSON.stringify(e,null,t)}catch{return String(e)}}function EL(e){let t=e.trim();if(!t||!t.startsWith(`{`)&&!t.startsWith(`[`))return{ok:!1,value:e};try{return{ok:!0,value:JSON.parse(t)}}catch{return{ok:!1,value:e}}}var DL=new Set;function OL(e,t){DL.has(e)||typeof document>`u`||(DL.add(e),fT(t))}function kL(e){return e==null||typeof e==`boolean`?``:typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(kL).join(``):(0,C.isValidElement)(e)?kL(e.props.children):``}var AL={scrollMarginTop:rL};function jL(){OL(`nf-doc-styles`,`
|
|
85
|
+
/* Un schéma se lit D'ABORD EN ENTIER. Mermaid pose \`max-width\` EN LIGNE sur
|
|
86
|
+
son SVG et le comprime à la largeur de la colonne : un \`flowchart\` s'étire
|
|
87
|
+
alors en hauteur (mesuré 351 × 1549 px), et il faut défiler pour en voir des
|
|
88
|
+
bouts — sans jamais avoir la vue d'ensemble. On le met à l'ÉCHELLE : il tient
|
|
89
|
+
dans la largeur ET la hauteur offertes, ratio préservé. Le zoom se fait en
|
|
90
|
+
ouvrant le schéma, pas en le parcourant au doigt. */
|
|
91
|
+
.nf-mermaid > svg {
|
|
92
|
+
max-width: 100% !important;
|
|
93
|
+
/* dvh et non vh : sur mobile, la barre d'adresse escamotable fausse vh,
|
|
94
|
+
et le schéma déborde de l'écran au premier défilement. */
|
|
95
|
+
max-height: 60dvh;
|
|
96
|
+
width: auto;
|
|
97
|
+
height: auto;
|
|
98
|
+
}
|
|
99
|
+
/* Ouvert : le schéma prend TOUTE la place offerte, sans jamais la dépasser.
|
|
100
|
+
Le rendre à sa taille réelle le laissait déborder — « trop gros », et on
|
|
101
|
+
revenait à devoir le parcourir au lieu de le voir. L'échelle reste donc
|
|
102
|
+
relative à la FENÊTRE, ici comme dans le corps de la page ; seul le
|
|
103
|
+
plafond change, parce que la place disponible change. */
|
|
104
|
+
.nf-mermaid-zoom > svg {
|
|
105
|
+
max-width: 100% !important;
|
|
106
|
+
max-height: calc(100dvh - 9rem);
|
|
107
|
+
}
|
|
108
|
+
.nf-heading { position: relative; }
|
|
109
|
+
.nf-heading-anchor {
|
|
110
|
+
opacity: 0;
|
|
111
|
+
transition: opacity 0.15s ease;
|
|
112
|
+
margin-left: 0.4em;
|
|
113
|
+
color: var(--mantine-color-dimmed);
|
|
114
|
+
text-decoration: none;
|
|
115
|
+
font-weight: normal;
|
|
116
|
+
cursor: pointer;
|
|
117
|
+
user-select: none;
|
|
118
|
+
}
|
|
119
|
+
.nf-heading:hover .nf-heading-anchor,
|
|
120
|
+
.nf-heading:focus-within .nf-heading-anchor { opacity: 0.7; }
|
|
121
|
+
.nf-heading-anchor:hover,
|
|
122
|
+
.nf-heading-anchor:focus { opacity: 1 !important; color: var(--mantine-primary-color-filled); outline: none; }
|
|
123
|
+
@media (prefers-reduced-motion: reduce) { .nf-heading-anchor { transition: none; } }
|
|
124
|
+
|
|
125
|
+
/* Catalogue de briques : l'en-tête de card (nom en pastille + libellé). */
|
|
126
|
+
.nf-brick-h {
|
|
127
|
+
display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
|
|
128
|
+
border-left: 3px solid var(--mantine-primary-color-filled);
|
|
129
|
+
background: var(--mantine-color-default-hover);
|
|
130
|
+
border-radius: 8px; padding: 10px 14px;
|
|
131
|
+
}
|
|
132
|
+
.nf-brick-name {
|
|
133
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
134
|
+
font-size: 0.82em; font-weight: 700;
|
|
135
|
+
color: var(--mantine-primary-color-filled);
|
|
136
|
+
background: var(--mantine-color-default);
|
|
137
|
+
padding: 2px 10px; border-radius: 20px; white-space: nowrap;
|
|
138
|
+
}
|
|
139
|
+
.nf-brick-name a { color: inherit; text-decoration: none; }
|
|
140
|
+
.nf-brick-title { font-size: 0.92em; }
|
|
141
|
+
.nf-brick-h:hover { border-left-color: var(--mantine-primary-color-filled); }
|
|
142
|
+
|
|
143
|
+
/* Grille de cards d'un catalogue (bloc de fence nodefony-cards).
|
|
144
|
+
Parti pris : card d'INFORMATION sobre — pastille d'icône, titre net,
|
|
145
|
+
description atténuée, méta discrète, chevron d'affordance. Aucune ombre
|
|
146
|
+
portée ni dégradé : la hiérarchie vient de la typo et de l'espacement. */
|
|
147
|
+
/* ── Grille de cards ──────────────────────────────────────────────────
|
|
148
|
+
Respiration d'abord : une card de catalogue se BALAIE, elle ne se lit
|
|
149
|
+
pas en continu. Colonnes plus larges et gouttière franche pour que
|
|
150
|
+
chaque card se détache comme un objet, au lieu de former un bloc. */
|
|
151
|
+
.nf-cards {
|
|
152
|
+
display: grid; gap: 14px; margin: 1.5em 0;
|
|
153
|
+
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
154
|
+
align-items: stretch;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* 🔴 ZÉRO SOULIGNEMENT, à aucun état. Une card est une SURFACE cliquable,
|
|
158
|
+
pas un lien dans une phrase : souligner son contenu au survol barbouille
|
|
159
|
+
le titre, la description ET la méta d'un trait. Le wrapper Typography de
|
|
160
|
+
Mantine style les ancres au survol, il faut donc désamorcer explicitement
|
|
161
|
+
— sur la card ET sur toute sa descendance, à tous les états. */
|
|
162
|
+
.nf-card,
|
|
163
|
+
.nf-card *,
|
|
164
|
+
.nf-card:hover,
|
|
165
|
+
.nf-card:hover *,
|
|
166
|
+
.nf-card:focus,
|
|
167
|
+
.nf-card:focus-visible,
|
|
168
|
+
.nf-card:active,
|
|
169
|
+
.nf-card:active * {
|
|
170
|
+
text-decoration: none;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.nf-card {
|
|
174
|
+
display: flex; align-items: flex-start; gap: 13px;
|
|
175
|
+
padding: 16px 18px; color: inherit;
|
|
176
|
+
background: var(--mantine-color-body);
|
|
177
|
+
border-color: var(--mantine-color-default-border);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Un seul signal de survol qui PORTE — l'élévation. La bordure d'accent et
|
|
181
|
+
la teinte du titre l'accompagnent discrètement ; trois signaux d'égale
|
|
182
|
+
force se diluaient et rendaient le survol illisible. */
|
|
183
|
+
.nf-card-link {
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
|
|
186
|
+
will-change: transform;
|
|
187
|
+
}
|
|
188
|
+
.nf-card-link:hover {
|
|
189
|
+
transform: translateY(-2px);
|
|
190
|
+
box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .28);
|
|
191
|
+
border-color: color-mix(in srgb, var(--mantine-primary-color-filled) 55%, var(--mantine-color-default-border));
|
|
192
|
+
}
|
|
193
|
+
.nf-card-link:active { transform: translateY(0); box-shadow: none; }
|
|
194
|
+
.nf-card-link:hover .nf-card-title { color: var(--mantine-primary-color-filled); }
|
|
195
|
+
.nf-card-link:hover .nf-card-go { opacity: .9; transform: translateX(3px); }
|
|
196
|
+
.nf-card-link:hover .nf-card-icon {
|
|
197
|
+
background: color-mix(in srgb, var(--mantine-primary-color-filled) 22%, transparent);
|
|
198
|
+
}
|
|
199
|
+
.nf-card-link:focus-visible {
|
|
200
|
+
outline: 2px solid var(--mantine-primary-color-filled);
|
|
201
|
+
outline-offset: 3px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Pastille d'icône : repère stable à gauche, taille fixe → les colonnes de
|
|
205
|
+
texte s'alignent d'une card à l'autre même quand les titres diffèrent. */
|
|
206
|
+
.nf-card-icon {
|
|
207
|
+
flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px;
|
|
208
|
+
display: inline-flex; align-items: center; justify-content: center;
|
|
209
|
+
font-size: 18px; line-height: 1;
|
|
210
|
+
background: color-mix(in srgb, var(--mantine-primary-color-filled) 13%, transparent);
|
|
211
|
+
transition: background-color .16s ease;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.nf-card-body { display: flex; flex-direction: column; min-width: 0; gap: 4px; flex: 1 1 auto; }
|
|
215
|
+
.nf-card-title {
|
|
216
|
+
font-weight: 650; font-size: 15px; line-height: 1.25;
|
|
217
|
+
letter-spacing: -0.01em;
|
|
218
|
+
transition: color .16s ease;
|
|
219
|
+
}
|
|
220
|
+
/* La description porte le vrai contenu : elle doit rester CONFORTABLE.
|
|
221
|
+
Contraste relevé d'un cran par rapport au gris atténué — une description
|
|
222
|
+
qu'on doit deviner ne sert à rien. */
|
|
223
|
+
.nf-card-desc {
|
|
224
|
+
font-size: 13.2px; line-height: 1.5;
|
|
225
|
+
color: var(--mantine-color-text);
|
|
226
|
+
opacity: .78;
|
|
227
|
+
}
|
|
228
|
+
.nf-card-meta {
|
|
229
|
+
font-size: 11.5px; line-height: 1.3; color: var(--mantine-color-dimmed);
|
|
230
|
+
margin-top: 3px; font-variant-numeric: tabular-nums;
|
|
231
|
+
}
|
|
232
|
+
.nf-card-go {
|
|
233
|
+
flex: 0 0 auto; align-self: center; opacity: .3; font-size: 16px;
|
|
234
|
+
color: var(--mantine-primary-color-filled);
|
|
235
|
+
transition: opacity .16s ease, transform .16s ease;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Card mise en avant : pleine largeur, liseré d'accent — un point d'entrée
|
|
239
|
+
unique se distingue du catalogue sans crier. */
|
|
240
|
+
.nf-card-featured {
|
|
241
|
+
grid-column: 1 / -1;
|
|
242
|
+
border-left: 3px solid var(--mantine-primary-color-filled);
|
|
243
|
+
background: color-mix(in srgb, var(--mantine-primary-color-filled) 6%, var(--mantine-color-body));
|
|
244
|
+
}
|
|
245
|
+
.nf-card-featured .nf-card-title { font-size: 16px; }
|
|
246
|
+
.nf-card-featured .nf-card-icon { width: 40px; height: 40px; font-size: 20px; }
|
|
247
|
+
|
|
248
|
+
/* Ombre plus dense en thème sombre : sur fond foncé, une ombre légère ne se
|
|
249
|
+
voit pas — l'élévation serait perdue exactement là où elle porte seule. */
|
|
250
|
+
@media (prefers-color-scheme: dark) {
|
|
251
|
+
.nf-card-link:hover { box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .6); }
|
|
252
|
+
}
|
|
253
|
+
[data-mantine-color-scheme="dark"] .nf-card-link:hover {
|
|
254
|
+
box-shadow: 0 8px 22px -6px rgba(0, 0, 0, .6);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
@media (prefers-reduced-motion: reduce) {
|
|
258
|
+
.nf-card-link, .nf-card-go, .nf-card-title, .nf-card-icon { transition: none; }
|
|
259
|
+
.nf-card-link:hover { transform: none; }
|
|
260
|
+
.nf-card-link:hover .nf-card-go { transform: none; }
|
|
261
|
+
}
|
|
262
|
+
`)}var ML={note:{title:`Note`,color:`blue`,icon:(0,Y.jsx)(BT,{size:18})},tip:{title:`Astuce`,color:`teal`,icon:(0,Y.jsx)(ST,{size:18})},important:{title:`Important`,color:`violet`,icon:(0,Y.jsx)(hT,{size:18})},warning:{title:`Avertissement`,color:`yellow`,icon:(0,Y.jsx)(gT,{size:18})},caution:{title:`Attention`,color:`red`,icon:(0,Y.jsx)(PT,{size:18})}},NL=/^\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*\n?/i;function PL(e){let t=null,n=e=>{if(t)return e;if(typeof e==`string`){let n=NL.exec(e)?.[1];return n?(t=n.toLowerCase(),e.replace(NL,``)||null):e}if(Array.isArray(e))return e.map(n).filter(e=>e!==null&&e!==``);if((0,C.isValidElement)(e)){let r=e.props.children,i=n(r);return t?(0,C.cloneElement)(e,{},i):e}return e},r=n(e),i=t;if(!i)return null;let a=ML[i];return a?{meta:a,rest:r}:null}function FL({code:e}){let{colorScheme:t}=gn(),n=(0,C.useRef)(null),r=(0,C.useId)().replace(/[^a-zA-Z0-9]/g,``),[a,o]=(0,C.useState)(null),[s,c]=(0,C.useState)(!1),[l,u]=(0,C.useState)(``);return(0,C.useEffect)(()=>{let a=!1,s=()=>a;return(async()=>{try{let a=(await i(async()=>{let{default:e}=await import(`./mermaid.core-B6xpe3Jr.js`);return{default:e}},__vite__mapDeps([33,34,35,36,37,38,39,40,41,42,1,43,15,44,45,46,47,48,49,50,51,52,53]))).default;a.initialize({startOnLoad:!1,theme:t===`light`?`default`:`dark`,securityLevel:`strict`,fontFamily:`inherit`});let{svg:c}=await a.render(`mermaid-${r}-${Date.now()}`,e);!s()&&n.current&&(n.current.innerHTML=c,u(c),o(null))}catch(e){s()||o(e instanceof Error?e.message:String(e))}})(),()=>{a=!0}},[e,t,r]),a?(0,Y.jsxs)(Ad,{color:`orange`,icon:(0,Y.jsx)(gT,{size:16}),my:`md`,children:[(0,Y.jsx)(Q,{component:`pre`,style:{margin:0,fontSize:N(12),whiteSpace:`pre-wrap`,overflowX:`auto`},children:e}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,mt:`xs`,children:a})]}):(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Q,{ref:n,className:`nf-mermaid`,my:`md`,onClick:()=>c(!0),title:`Agrandir le schéma`,style:{textAlign:`center`,cursor:`zoom-in`}}),(0,Y.jsx)(sh,{opened:s,onClose:()=>c(!1),fullScreen:!0,radius:0,title:`Schéma`,styles:{body:{height:sL,overflow:`auto`}},children:(0,Y.jsx)(Q,{className:`nf-mermaid nf-mermaid-zoom`,style:{textAlign:`center`},dangerouslySetInnerHTML:{__html:l}})})]})}function IL({language:e,code:t}){let[n,r]=(0,C.useState)(!1),i=(0,C.useCallback)(()=>{let e=typeof navigator>`u`?void 0:navigator.clipboard;e&&e.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),1200)}).catch(()=>{})},[t]);return(0,Y.jsxs)(lc,{withBorder:!0,radius:`md`,my:`md`,style:{overflow:`hidden`},children:[(0,Y.jsxs)(wl,{justify:`space-between`,px:`sm`,py:4,wrap:`nowrap`,style:{background:`var(--mantine-color-default-hover)`,borderBottom:`1px solid var(--mantine-color-default-border)`},children:[(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,ff:`monospace`,tt:`lowercase`,style:{userSelect:`none`},children:e||`text`}),(0,Y.jsx)(O_,{label:n?`Copié`:`Copier`,withinPortal:!0,children:(0,Y.jsx)(ml,{size:`sm`,variant:`subtle`,color:`gray`,onClick:i,"aria-label":n?`Code copié`:`Copier le bloc de code`,children:n?(0,Y.jsx)(wT,{size:14}):(0,Y.jsx)(MT,{size:14})})})]}),(0,Y.jsx)(Q,{component:`pre`,style:{margin:0,padding:N(12),overflowX:`auto`,fontSize:N(13),lineHeight:1.6},children:(0,Y.jsx)(`code`,{children:t})})]})}var LL={scrollMarginTop:rL,marginTop:`1.4em`,marginBottom:`0.4em`};function RL({json:e}){let t=null,n=null;try{let n=JSON.parse(e);if(typeof n!=`object`||!n||Array.isArray(n))throw Error(`un objet est attendu`);let r=n.graph;if(typeof r!=`string`||r.length===0)throw Error("champ `graph` manquant");t=n}catch(e){n=e instanceof Error?e.message:String(e)}let r=t?gL(t.graph):void 0;return!t||!r?(0,Y.jsxs)(Ad,{color:`orange`,title:`Graphe live non rendu`,mt:`md`,children:[(0,Y.jsx)(Fd,{size:`sm`,mb:`xs`,children:n??`Graphe « ${t?.graph??`?`} » inconnu. Disponibles : ${hL.join(`, `)}.`}),(0,Y.jsx)(`pre`,{style:{margin:0,overflowX:`auto`,fontSize:`0.8em`},children:e})]}):(0,Y.jsx)(C.Suspense,{fallback:(0,Y.jsx)(lc,{withBorder:!0,radius:`md`,p:`md`,mt:`xl`,children:(0,Y.jsx)(Fd,{size:`sm`,c:`dimmed`,children:`Chargement du schéma…`})}),children:(0,Y.jsx)(lL,{LiveGraph:r,height:t.height,title:t.title,hint:t.hint})})}function zL(e){let t=[],n=0;for(let r of e.matchAll(/`([^`]+)`/g))r.index>n&&t.push(e.slice(n,r.index)),t.push((0,Y.jsx)(`code`,{children:r[1]},r.index)),n=r.index+r[0].length;return n<e.length&&t.push(e.slice(n)),t}function BL({json:e,onNavigate:t}){let n=[],r=null;try{let t=JSON.parse(e);if(!Array.isArray(t))throw Error(`un tableau est attendu`);n=t.filter(e=>typeof e==`object`&&!!e&&typeof e.title==`string`)}catch(e){r=e instanceof Error?e.message:String(e)}if(r||!n.length)return(0,Y.jsx)(Ad,{color:`yellow`,variant:`light`,title:`Bloc de cards illisible`,children:(0,Y.jsx)(Fd,{size:`sm`,children:r??`aucune card valide dans ce bloc`})});let i=e=>n=>{if(!e||!t)return;let r=e.match(/^\.?\/?([A-Za-z0-9._~-]+)\.md(?:#.*)?$/)?.[1];r&&t(r)&&n.preventDefault()};return(0,Y.jsx)(Q,{className:`nf-cards`,children:n.map(e=>(0,Y.jsxs)(lc,{component:e.href?`a`:`div`,href:e.href,onClick:i(e.href),withBorder:!0,radius:`md`,className:[`nf-card`,e.href?`nf-card-link`:``,e.featured?`nf-card-featured`:``].filter(Boolean).join(` `),children:[e.icon?(0,Y.jsx)(`span`,{className:`nf-card-icon`,"aria-hidden":`true`,children:e.icon}):null,(0,Y.jsxs)(`span`,{className:`nf-card-body`,children:[(0,Y.jsx)(`span`,{className:`nf-card-title`,children:e.title}),e.desc?(0,Y.jsx)(`span`,{className:`nf-card-desc`,children:zL(e.desc)}):null,e.meta?(0,Y.jsx)(`span`,{className:`nf-card-meta`,children:e.meta}):null]}),e.href?(0,Y.jsx)(`span`,{className:`nf-card-go`,"aria-hidden":`true`,children:`→`}):null]},e.title))})}function VL(e){if(!(0,C.isValidElement)(e))return null;let t=e;if(t.type===`code`)return t;if(t.type===`a`||typeof t.type==`function`||typeof t.type==`object`){let e=C.Children.toArray(t.props.children??[]);if(e.length===1&&(0,C.isValidElement)(e[0])&&e[0].type===`code`)return t}return null}function HL(e){let t=C.Children.toArray(e);if(t.length<2)return null;let n=VL(t[0]);if(!n)return null;let r=t.slice(1).map(e=>typeof e==`string`?e:kL(e)).join(``).trim(),i=r.replace(/^[—–-]\s*/,``).trim();return!i||i===r?null:{name:n,title:i}}function UL({level:e,children:t}){(0,C.useEffect)(()=>jL(),[]);let n=GI(kL(t)),r=kL(t),i=(0,C.useCallback)(e=>{if(e.preventDefault(),typeof window>`u`)return;let t=`${window.location.origin}${window.location.pathname}#${n}`,r=navigator.clipboard;r&&r.writeText(t).catch(()=>{});let i=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches;document.getElementById(n)?.scrollIntoView({behavior:i?`auto`:`smooth`,block:`start`})},[n]),a=(0,Y.jsx)(`a`,{href:`#${n}`,className:`nf-heading-anchor`,onClick:i,"aria-label":`Lien vers la section : ${r}`,children:`#`});if(e===2)return(0,Y.jsxs)(`h2`,{id:n,className:`nf-heading`,style:AL,children:[t,a]});if(e===3){let e=HL(t);return e?(0,Y.jsxs)(`h3`,{id:n,className:`nf-heading nf-brick-h`,style:LL,children:[(0,Y.jsx)(`span`,{className:`nf-brick-name`,children:e.name}),(0,Y.jsx)(`span`,{className:`nf-brick-title`,children:e.title}),a]}):(0,Y.jsxs)(`h3`,{id:n,className:`nf-heading`,style:AL,children:[t,a]})}return(0,Y.jsxs)(`h4`,{id:n,className:`nf-heading`,style:AL,children:[t,a]})}var WL=[WI];function GL(e){return{h2:({children:e})=>(0,Y.jsx)(UL,{level:2,children:e}),h3:({children:e})=>(0,Y.jsx)(UL,{level:3,children:e}),h4:({children:e})=>(0,Y.jsx)(UL,{level:4,children:e}),blockquote:({children:e})=>{let t=PL(e);return t?(0,Y.jsx)(Ad,{color:t.meta.color,icon:t.meta.icon,title:t.meta.title,variant:`light`,my:`md`,children:t.rest}):(0,Y.jsx)(`blockquote`,{children:e})},pre:({children:t})=>{let n=Array.isArray(t)?t[0]:t;if(n!=null&&(0,C.isValidElement)(n)){let t=n.props,r=t.className??``,i=xL(t.children).replace(/\n$/,``);if(/\blanguage-mermaid\b/.test(r))return(0,Y.jsx)(FL,{code:i});if(/\blanguage-nodefony-cards\b/.test(r))return(0,Y.jsx)(BL,{json:i,onNavigate:e});if(/\blanguage-nodefony-livegraph\b/.test(r))return(0,Y.jsx)(RL,{json:i});if(/\blanguage-/.test(r)){let e=r.match(/language-([a-z0-9]+)/i)?.[1]??``;return(0,Y.jsx)(IL,{language:e,code:i})}}return(0,Y.jsx)(`pre`,{children:t})},code({className:e,children:t}){return(0,Y.jsx)(`code`,{className:e,children:t})},a({href:t,children:n}){let r=t??``,i=/^https?:\/\//i.test(r),a=r.match(/^\.?\/?([A-Za-z0-9._~-]+)\.md(#.*)?$/)?.[1];return a&&e?(0,Y.jsx)(Rd,{onClick:t=>{e(a)&&t.preventDefault()},style:{cursor:`pointer`},children:n}):(0,Y.jsx)(Rd,{href:r,target:i?`_blank`:void 0,rel:i?`noreferrer noopener`:void 0,children:n})}}}function KL({markdown:e,onInternalLink:t,maxWidth:n=860}){let r=(0,C.useMemo)(()=>GL(t),[t]);return(0,Y.jsx)(Nv,{children:(0,Y.jsx)(Q,{style:{maxWidth:N(n),fontSize:N(15),lineHeight:1.75},children:(0,Y.jsx)(BN,{remarkPlugins:WL,components:r,children:e})})})}var qL=264,JL=240;function YL(){OL(`nf-doclayout-styles`,`
|
|
263
|
+
.nf-doc-region{display:flex;gap:var(--mantine-spacing-xl,32px);align-items:stretch}
|
|
264
|
+
.nf-doc-region.is-page{align-items:flex-start}
|
|
265
|
+
.nf-doc-nav{flex:0 0 ${qL}px;width:${qL}px}
|
|
266
|
+
.nf-doc-toc{flex:0 0 ${JL}px;width:${JL}px}
|
|
267
|
+
.nf-doc-main{flex:1 1 0;min-width:0}
|
|
268
|
+
.nf-doc-region.is-container>.nf-doc-region-col{height:var(--nf-doc-h)}
|
|
269
|
+
@media (max-width:991px){
|
|
270
|
+
.nf-doc-region{flex-direction:column}
|
|
271
|
+
.nf-doc-nav,.nf-doc-toc{flex-basis:auto;width:100%}
|
|
272
|
+
.nf-doc-toc{display:none}
|
|
273
|
+
.nf-doc-region.is-container>.nf-doc-region-col{height:auto}
|
|
274
|
+
}`)}function XL({navTitle:e,navActions:t,navSearch:n,nav:r,title:i,children:a,tocMarkdown:o,mode:s=`page`,height:c=`70vh`,enableFullscreen:l=!0}){let[u,d]=(0,C.useState)(!1),[f,p]=(0,C.useState)(!0),m=(0,C.useRef)(null),h=!!o&&KI(o).length>0;YL();let g=(s,c,u)=>{let g=h&&(u?!0:f),_=s===`page`?nL:c,v=(0,Y.jsxs)(lc,{withBorder:!0,radius:`md`,p:`sm`,className:`nf-doc-nav nf-doc-region-col`,style:s===`page`?{position:`sticky`,top:tL,height:nL,display:`flex`,flexDirection:`column`,overflow:`hidden`}:{display:`flex`,flexDirection:`column`,overflow:`hidden`},children:[(0,Y.jsxs)(Q,{style:{flexShrink:0},children:[(0,Y.jsxs)(wl,{justify:`space-between`,mb:6,px:`xs`,wrap:`nowrap`,children:[(0,Y.jsx)(Fd,{size:`xs`,fw:700,c:`dimmed`,tt:`uppercase`,children:e}),t]}),n]}),(0,Y.jsx)(ec,{type:`hover`,style:{flex:1,minHeight:0},children:r})]}),y=(0,Y.jsxs)(wl,{gap:`xs`,mb:`md`,wrap:`nowrap`,style:{flexShrink:0,...s===`page`?{position:`sticky`,top:eL,background:`var(--mantine-color-body)`,zIndex:1,paddingTop:`var(--mantine-spacing-xs, 8px)`,paddingBottom:`var(--mantine-spacing-xs, 8px)`}:{}},children:[(0,Y.jsx)(Q,{style:{flex:1,minWidth:0},children:i}),h&&!g&&!u&&(0,Y.jsx)(O_,{label:`Afficher le sommaire`,position:`left`,children:(0,Y.jsx)(ml,{variant:`subtle`,color:`gray`,size:`sm`,onClick:()=>p(!0),"aria-label":`Afficher le sommaire`,children:(0,Y.jsx)(HT,{size:16})})}),l&&!u&&(0,Y.jsx)(O_,{label:`Plein écran`,position:`left`,children:(0,Y.jsx)(ml,{variant:`subtle`,color:`gray`,size:`sm`,onClick:()=>d(!0),"aria-label":`Plein écran`,children:(0,Y.jsx)(KT,{size:16})})})]});return(0,Y.jsxs)(Q,{className:`nf-doc-region ${s===`page`?`is-page`:`is-container`}`,style:{"--nf-doc-h":c},children:[v,s===`page`?(0,Y.jsxs)(Q,{className:`nf-doc-main nf-doc-region-col`,children:[y,a]}):(0,Y.jsxs)(lc,{withBorder:u,radius:u?`md`:0,p:u?`sm`:0,bg:u?void 0:`transparent`,className:`nf-doc-main nf-doc-region-col`,style:{display:`flex`,flexDirection:`column`},children:[y,(0,Y.jsx)(ec,{type:`auto`,offsetScrollbars:!0,viewportRef:m,style:{flex:1,minHeight:0},children:a})]}),g&&o&&(0,Y.jsx)(Q,{className:`nf-doc-toc`,style:s===`page`?{position:`sticky`,top:`calc(var(--nf-pageheader-height, 76px) + var(--mantine-spacing-md, 16px))`,alignSelf:`flex-start`,height:`calc(100dvh - var(--app-shell-header-height, 56px) - var(--nf-pageheader-height, 76px) - var(--nodefony-debugbar-height, 0px) - var(--mantine-spacing-md, 16px) * 3)`,display:`flex`,flexDirection:`column`}:void 0,children:(0,Y.jsx)(lc,{withBorder:!0,radius:`md`,p:`sm`,style:{flex:1,minHeight:0,display:`flex`,flexDirection:`column`},children:(0,Y.jsx)(qI,{markdown:o,scrollRootRef:s===`container`?m:void 0,maxHeight:_,actions:u?void 0:(0,Y.jsx)(O_,{label:`Masquer le sommaire`,children:(0,Y.jsx)(ml,{variant:`subtle`,color:`gray`,size:`xs`,onClick:()=>p(!1),"aria-label":`Masquer le sommaire`,children:(0,Y.jsx)(VT,{size:14})})})})})})]})};return(0,Y.jsxs)(Y.Fragment,{children:[g(s,c,!1),(0,Y.jsx)(sh,{opened:u,onClose:()=>d(!1),fullScreen:!0,radius:0,title:e,styles:{body:{height:sL,paddingTop:N(12)}},children:g(`container`,cL,!0)})]})}var ZL={stable:`teal`,draft:`yellow`,temporary:`orange`,experimental:`violet`,deprecated:`red`};function QL(e){if(!e)return null;let t=typeof e==`string`?new Date(e):e;return Number.isNaN(t.getTime())?null:t.toLocaleDateString(`fr-FR`,{year:`numeric`,month:`long`,day:`numeric`})}function $L({breadcrumbs:e,title:t,version:n,status:r,wip:i,updated:a,sourceUrl:o,actions:s}){let c=QL(a),l=r?ZL[r.toLowerCase()]??`gray`:`gray`;return(0,Y.jsxs)(R_,{gap:4,children:[e&&e.length>0&&(0,Y.jsx)(wl,{gap:4,wrap:`nowrap`,children:e.map((e,t)=>(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,children:[t>0&&(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,"aria-hidden":!0,children:`›`}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,tt:`uppercase`,fw:700,style:{letterSpacing:`0.04em`},children:e})]},`${t}-${e}`))}),(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`nowrap`,align:`flex-start`,children:[(0,Y.jsxs)(wl,{gap:`xs`,wrap:`nowrap`,style:{flex:1,minWidth:0},align:`center`,children:[(0,Y.jsx)(jv,{order:2,lineClamp:2,style:{minWidth:0},children:t}),i&&(0,Y.jsx)(np,{color:`gray`,variant:`light`,children:`à venir`}),r&&(0,Y.jsx)(np,{color:l,variant:`light`,children:r}),n&&(0,Y.jsx)(np,{variant:`default`,style:{fontVariantNumeric:`tabular-nums`},children:n})]}),s]}),(c||o)&&(0,Y.jsxs)(wl,{gap:`md`,wrap:`wrap`,children:[c&&(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,children:[(0,Y.jsx)(AT,{size:13,color:`var(--mantine-color-dimmed)`,"aria-hidden":!0}),(0,Y.jsxs)(Fd,{size:`xs`,c:`dimmed`,children:[`Mis à jour le `,c]})]}),o&&(0,Y.jsxs)(Rd,{href:o,target:`_blank`,rel:`noreferrer noopener`,size:`xs`,c:`dimmed`,style:{display:`inline-flex`,alignItems:`center`,gap:N(4),minHeight:N(24),paddingBlock:N(3)},children:[(0,Y.jsx)(xT,{size:13,"aria-hidden":!0}),`Modifier sur GitHub`]})]})]})}var eR=r(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},u=(e,t,i)=>(i=e==null?{}:n(o(e)),l(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),d=e=>l(r({},`__esModule`,{value:!0}),e),f={};c(f,{$dispatcherGuard:()=>T,$makeReadOnly:()=>D,$reset:()=>E,$structuralCheck:()=>P,c:()=>y,clearRenderCounterRegistry:()=>k,renderCounterRegistry:()=>O,useRenderCounter:()=>M}),t.exports=d(f);var p=u(b()),{useRef:m,useEffect:h,isValidElement:g}=p,_=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE??p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,v=Symbol.for(`react.memo_cache_sentinel`),y=typeof p.__COMPILER_RUNTIME?.c==`function`?p.__COMPILER_RUNTIME.c:function(e){return p.useMemo(()=>{let t=Array(e);for(let n=0;n<e;n++)t[n]=v;return t[v]=!0,t},[])},x={};[`readContext`,`useCallback`,`useContext`,`useEffect`,`useImperativeHandle`,`useInsertionEffect`,`useLayoutEffect`,`useMemo`,`useReducer`,`useRef`,`useState`,`useDebugValue`,`useDeferredValue`,`useTransition`,`useMutableSource`,`useSyncExternalStore`,`useId`,`unstable_isNewReconciler`,`getCacheSignal`,`getCacheForType`,`useCacheRefresh`].forEach(e=>{x[e]=()=>{throw Error(`[React] Unexpected React hook call (${e}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var S=null;x.useMemoCache=e=>{if(S==null)throw Error(`React Compiler internal invariant violation: unexpected null dispatcher`);return S.useMemoCache(e)};function C(e){return _.ReactCurrentDispatcher.current=e,_.ReactCurrentDispatcher.current}var w=[];function T(e){let t=_.ReactCurrentDispatcher.current;if(e===0){if(w.push(t),w.length===1&&(S=t),t===x)throw Error(`[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.`);C(x)}else if(e===1){let e=w.pop();if(e==null)throw Error(`React Compiler internal error: unexpected null in guard stack`);w.length===0&&(S=null),C(e)}else if(e===2)w.push(t),C(S);else if(e===3){let e=w.pop();if(e==null)throw Error(`React Compiler internal error: unexpected null in guard stack`);C(e)}else throw Error(`React Compiler internal error: unreachable block`+e)}function E(e){for(let t=0;t<e.length;t++)e[t]=v}function D(){throw Error(`TODO: implement $makeReadOnly in react-compiler-runtime`)}var O=new Map;function k(){for(let e of O.values())e.forEach(e=>{e.count=0})}function A(e,t){let n=O.get(e);n??(n=new Set,O.set(e,n)),n.add(t)}function j(e,t){O.get(e)?.delete(t)}function M(e){let t=m(null);t.current!=null&&(t.current.count+=1),h(()=>{if(t.current==null){let n={count:0};A(e,n),t.current=n}return()=>{t.current!==null&&j(e,t.current)}})}var N=new Set;function P(e,t,n,r,i,a){function o(e,t,o,s){let c=`${r}:${a} [${i}] ${n}${o} changed from ${e} to ${t} at depth ${s}`;N.has(c)||(N.add(c),console.error(c))}function s(e,t,n,r){if(!(r>2)&&e!==t){if(typeof e!=typeof t)o(`type ${typeof e}`,`type ${typeof t}`,n,r);else if(typeof e==`object`){let i=Array.isArray(e),a=Array.isArray(t);if(e===null&&t!==null)o(`null`,`type ${typeof t}`,n,r);else if(t===null)o(`type ${typeof e}`,`null`,n,r);else if(e instanceof Map){if(!(t instanceof Map))o(`Map instance`,`other value`,n,r);else if(e.size!==t.size)o(`Map instance with size ${e.size}`,`Map instance with size ${t.size}`,n,r);else for(let[i,a]of e)t.has(i)?s(a,t.get(i),`${n}.get(${i})`,r+1):o(`Map instance with key ${i}`,`Map instance without key ${i}`,n,r)}else if(t instanceof Map)o(`other value`,`Map instance`,n,r);else if(e instanceof Set){if(!(t instanceof Set))o(`Set instance`,`other value`,n,r);else if(e.size!==t.size)o(`Set instance with size ${e.size}`,`Set instance with size ${t.size}`,n,r);else for(let i of t)e.has(i)||o(`Set instance without element ${i}`,`Set instance with element ${i}`,n,r)}else if(t instanceof Set)o(`other value`,`Set instance`,n,r);else if(i||a){if(i!==a)o(`type ${i?`array`:`object`}`,`type ${a?`array`:`object`}`,n,r);else if(e.length!==t.length)o(`array with length ${e.length}`,`array with length ${t.length}`,n,r);else for(let i=0;i<e.length;i++)s(e[i],t[i],`${n}[${i}]`,r+1)}else if(g(e)||g(t))g(e)===g(t)?e.type===t.type?s(e.props,t.props,`[props of ${n}]`,r+1):o(`React element of type ${e.type}`,`React element of type ${t.type}`,n,r):o(`type ${g(e)?`React element`:`object`}`,`type ${g(t)?`React element`:`object`}`,n,r);else{for(let i in t)i in e||o(`object without key ${i}`,`object with key ${i}`,n,r);for(let i in e)i in t?s(e[i],t[i],`${n}.${i}`,r+1):o(`object with key ${i}`,`object without key ${i}`,n,r)}}else if(typeof e==`function`)return;else isNaN(e)||isNaN(t)?isNaN(e)!==isNaN(t)&&o(`${isNaN(e)?`NaN`:`non-NaN value`}`,`${isNaN(t)?`NaN`:`non-NaN value`}`,n,r):e!==t&&o(e,t,n,r)}}s(e,t,``,0)}0&&(t.exports={$dispatcherGuard:T,$makeReadOnly:D,$reset:E,$structuralCheck:P,c:y,clearRenderCounterRegistry:k,renderCounterRegistry:O,useRenderCounter:M})}))();function tR(e){if(typeof e==`string`||typeof e==`number`)return``+e;let t=``;if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=tR(e[n]))!==``&&(t+=(t&&` `)+r);else for(let n in e)e[n]&&(t+=(t&&` `)+n);return t}var nR=e=>()=>e;function rR(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:c,dy:l,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:o,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:u}})}rR.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function iR(e){return!e.ctrlKey&&!e.button}function aR(){return this.parentNode}function oR(e,t){return t??{x:e.x,y:e.y}}function sR(){return navigator.maxTouchPoints||`ontouchstart`in this}function cR(){var e=iR,t=aR,n=oR,r=sR,i={},u=s(`start`,`drag`,`end`),d=0,f,p,v,y,b=0;function x(e){e.on(`mousedown.drag`,S).filter(r).on(`touchstart.drag`,T).on(`touchmove.drag`,E,l).on(`touchend.drag touchcancel.drag`,D).style(`touch-action`,`none`).style(`-webkit-tap-highlight-color`,`rgba(0,0,0,0)`)}function S(n,r){if(!y&&e.call(this,n,r)){var i=O(this,t.call(this,n,r),n,r,`mouse`);i&&(h(n.view).on(`mousemove.drag`,C,g).on(`mouseup.drag`,w,g),c(n.view),o(n),v=!1,f=n.clientX,p=n.clientY,i(`start`,n))}}function C(e){if(_(e),!v){var t=e.clientX-f,n=e.clientY-p;v=t*t+n*n>b}i.mouse(`drag`,e)}function w(e){h(e.view).on(`mousemove.drag mouseup.drag`,null),m(e.view,v),_(e),i.mouse(`end`,e)}function T(n,r){if(e.call(this,n,r))for(var i=n.changedTouches,a=t.call(this,n,r),s=i.length,c=0,l;c<s;++c)(l=O(this,a,n,r,i[c].identifier,i[c]))&&(o(n),l(`start`,n,i[c]))}function E(e){for(var t=e.changedTouches,n=t.length,r=0,a;r<n;++r)(a=i[t[r].identifier])&&(_(e),a(`drag`,e,t[r]))}function D(e){var t=e.changedTouches,n=t.length,r,a;for(y&&clearTimeout(y),y=setTimeout(function(){y=null},500),r=0;r<n;++r)(a=i[t[r].identifier])&&(o(e),a(`end`,e,t[r]))}function O(e,t,r,o,s,c){var l=u.copy(),f=a(c||r,t),p,m,h;if((h=n.call(e,new rR(`beforestart`,{sourceEvent:r,target:x,identifier:s,active:d,x:f[0],y:f[1],dx:0,dy:0,dispatch:l}),o))!=null)return p=h.x-f[0]||0,m=h.y-f[1]||0,function n(r,c,u){var g=f,_;switch(r){case`start`:i[s]=n,_=d++;break;case`end`:delete i[s],--d;case`drag`:f=a(u||c,t),_=d}l.call(r,e,new rR(r,{sourceEvent:c,subject:h,target:x,identifier:s,active:_,x:f[0]+p,y:f[1]+m,dx:f[0]-g[0],dy:f[1]-g[1],dispatch:l}),o)}}return x.filter=function(t){return arguments.length?(e=typeof t==`function`?t:nR(!!t),x):e},x.container=function(e){return arguments.length?(t=typeof e==`function`?e:nR(e),x):t},x.subject=function(e){return arguments.length?(n=typeof e==`function`?e:nR(e),x):n},x.touchable=function(e){return arguments.length?(r=typeof e==`function`?e:nR(!!e),x):r},x.on=function(){var e=u.on.apply(u,arguments);return e===u?x:e},x.clickDistance=function(e){return arguments.length?(b=(e=+e)*e,x):Math.sqrt(b)},x}var lR={error001:(e=`react`)=>`Seems like you have not used ${e===`svelte`?`SvelteFlowProvider`:`ReactFlowProvider`} as an ancestor. Help: https://${e}flow.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 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:r})=>`Couldn't create edge for ${e} handle id: "${e===`source`?n:r}", 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.`,error016:e=>`Edge with id "${e}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},uR=[[-1/0,-1/0],[1/0,1/0]],dR=[`Enter`,` `,`Escape`],fR={"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`},pR=function(e){return e.Strict=`strict`,e.Loose=`loose`,e}({}),mR=function(e){return e.Free=`free`,e.Vertical=`vertical`,e.Horizontal=`horizontal`,e}({}),hR=function(e){return e.Partial=`partial`,e.Full=`full`,e}({}),gR={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},_R=function(e){return e.Bezier=`default`,e.Straight=`straight`,e.Step=`step`,e.SmoothStep=`smoothstep`,e.SimpleBezier=`simplebezier`,e}({}),vR=function(e){return e.Arrow=`arrow`,e.ArrowClosed=`arrowclosed`,e}({}),yR=function(e){return e.Left=`left`,e.Top=`top`,e.Right=`right`,e.Bottom=`bottom`,e}({}),bR={left:`right`,right:`left`,top:`bottom`,bottom:`top`},xR=e=>!!e&&typeof e==`object`&&`id`in e&&`source`in e&&`target`in e,SR=e=>!!e&&typeof e==`object`&&`id`in e&&`position`in e&&!(`source`in e)&&!(`target`in e),CR=e=>!!e&&typeof e==`object`&&`id`in e&&`internals`in e&&!(`source`in e)&&!(`target`in e),wR=(e,t=[0,0])=>{let{width:n,height:r}=rz(e),i=e.origin??t,a=n*i[0],o=r*i[1];return{x:e.position.x-a,y:e.position.y-o}},TR=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};let n=!1,r=e.reduce((e,r)=>{let i=typeof r==`string`,a=!t.nodeLookup&&!i?r:void 0;return t.nodeLookup&&(a=i?t.nodeLookup.get(r):CR(r)?r:t.nodeLookup.get(r.id)),a?(n=!0,LR(e,VR(a,t.nodeOrigin))):e},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?zR(r):{x:0,y:0,width:0,height:0}},ER=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return e.forEach(e=>{(t.filter===void 0||t.filter(e))&&(n=LR(n,VR(e)),r=!0)}),r?zR(n):{x:0,y:0,width:0,height:0}},DR=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1)=>{let s=(t.x-n)/i,c=(t.y-r)/i,l=t.width/i,u=t.height/i,d=[];for(let t of e.values()){let{measured:e,selectable:n=!0,hidden:r=!1}=t;if(o&&!n||r)continue;let i=e.width??t.width??t.initialWidth??0,f=e.height??t.height??t.initialHeight??0,{x:p,y:m}=t.internals.positionAbsolute,h=UR(s,c,l,u,p,m,i,f),g=i*f,_=a&&h>0;(!t.internals.handleBounds||_||h>=g||t.dragging)&&d.push(t)}return d};function OR(e,t){let n=new Map,r=t?.nodes?new Set(t.nodes.map(e=>e.id)):null;return e.forEach(e=>{let i;if(t?.includeHiddenNodes){let{width:t,height:n}=rz(e);i=t>0&&n>0}else i=!!(e.measured.width&&e.measured.height&&!e.hidden);i&&(!r||r.has(e.id))&&n.set(e.id,e)}),n}async function kR({nodes:e,width:t,height:n,panZoom:r,minZoom:i,maxZoom:a},o){if(e.size===0)return!0;let s=ez(ER(OR(e,o)),t,n,o?.minZoom??i,o?.maxZoom??a,o?.padding??`5%`);return r.setViewport(s,{duration:o?.duration,ease:o?.ease,interpolate:o?.interpolate})}function AR({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:a}){let o=n.get(e),s=o.parentId?n.get(o.parentId):void 0,{x:c,y:l}=s?s.internals.positionAbsolute:{x:0,y:0},u=o.origin??r,d=o.extent||i;if(o.extent===`parent`&&!o.expandParent){if(!s)a?.(`005`,lR.error005());else{let{width:e,height:t}=rz(s);e&&t&&(d=[[c,l],[c+e,l+t]])}}else s&&nz(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+l],[o.extent[1][0]+c,o.extent[1][1]+l]]);let f=nz(d)?NR(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&a?.(`015`,lR.error015()),{position:{x:f.x-c+(o.measured.width??0)*u[0],y:f.y-l+(o.measured.height??0)*u[1]},positionAbsolute:f}}async function jR({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:r,onBeforeDelete:i}){let a=new Set(e.map(e=>e.id)),o=new Map,s=new Map;for(let e of n)if(e.deletable!==!1&&(a.has(e.id)&&o.set(e.id,e),e.parentId)){let t=s.get(e.parentId)??[];t.push(e),s.set(e.parentId,t)}let c=[...o.keys()];for(let e=0;e<c.length;e++)for(let t of s.get(c[e])??[])o.has(t.id)||(o.set(t.id,t),c.push(t.id));let l=new Set(t.map(e=>e.id)),u=new Map;for(let e of r)e.deletable!==!1&&(o.has(e.source)||o.has(e.target))&&u.set(e.id,e);for(let e of r)e.deletable!==!1&&l.has(e.id)&&!u.has(e.id)&&u.set(e.id,e);let d=n.filter(e=>o.has(e.id)),f=Array.from(u.values());if(!i)return{edges:f,nodes:d};let p=await i({nodes:d,edges:f});return typeof p==`boolean`?p?{edges:f,nodes:d}:{edges:[],nodes:[]}:p}var MR=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),NR=(e={x:0,y:0},t,n)=>({x:MR(e.x,t[0][0],t[1][0]-(n?.width??0)),y:MR(e.y,t[0][1],t[1][1]-(n?.height??0))});function PR(e,t,n){let{width:r,height:i}=rz(n),{x:a,y:o}=n.internals.positionAbsolute;return NR(e,[[a,o],[a+r,o+i]],t)}var FR=(e,t,n)=>e<t?MR(Math.abs(e-t),1,t)/t:e>n?-MR(Math.abs(e-n),1,t)/t:0,IR=(e,t,n=15,r=40)=>[FR(e.x,r,t.width-r)*n,FR(e.y,r,t.height-r)*n],LR=(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)}),RR=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),zR=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),BR=(e,t=[0,0])=>{let{x:n,y:r}=CR(e)?e.internals.positionAbsolute:wR(e,t);return{x:n,y:r,width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}},VR=(e,t=[0,0])=>{let{x:n,y:r}=CR(e)?e.internals.positionAbsolute:wR(e,t);return{x:n,y:r,x2:n+(e.measured?.width??e.width??e.initialWidth??0),y2:r+(e.measured?.height??e.height??e.initialHeight??0)}},HR=(e,t)=>zR(LR(RR(e),RR(t))),UR=(e,t,n,r,i,a,o,s)=>{let c=Math.max(0,Math.min(e+n,i+o)-Math.max(e,i)),l=Math.max(0,Math.min(t+r,a+s)-Math.max(t,a));return Math.ceil(c*l)},WR=(e,t)=>UR(e.x,e.y,e.width,e.height,t.x,t.y,t.width,t.height),GR=e=>{if(typeof e!=`object`||!e)return!1;let t=e;return KR(t.width)&&KR(t.height)&&KR(t.x)&&KR(t.y)},KR=e=>typeof e==`number`&&!isNaN(e)&&isFinite(e),qR=(e,t)=>(e,t)=>{},JR=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),YR=({x:e,y:t},[n,r,i],a=!1,o=[1,1])=>{let s={x:(e-n)/i,y:(t-r)/i};return a?JR(s,o):s},XR=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r});function ZR(e,t){if(typeof e==`number`)return Math.floor(e);if(typeof e==`string`&&e.endsWith(`px`)){let t=parseFloat(e);if(!Number.isNaN(t))return Math.floor(t)}if(typeof e==`string`&&e.endsWith(`%`)){let n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function QR(e,t,n){if(typeof e==`string`||typeof e==`number`){let r=ZR(e,n),i=ZR(e,t);return{top:r,right:i,bottom:r,left:i,x:i*2,y:r*2}}if(typeof e==`object`){let r=ZR(e.top??e.y??0,n),i=ZR(e.bottom??e.y??0,n),a=ZR(e.left??e.x??0,t),o=ZR(e.right??e.x??0,t);return{top:r,right:o,bottom:i,left:a,x:a+o,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function $R(e,t,n,r,i,a){let{x:o,y:s}=XR(e,[t,n,r]),{x:c,y:l}=XR({x:e.x+e.width,y:e.y+e.height},[t,n,r]),u=i-c,d=a-l;return{left:Math.floor(o),top:Math.floor(s),right:Math.floor(u),bottom:Math.floor(d)}}var ez=(e,t,n,r=0,i=1/0,a=0)=>{let o=QR(a,t,n),s=(t-o.x)/e.width,c=(n-o.y)/e.height,l=MR(Math.min(s,c),r,i),u=e.x+e.width/2,d=e.y+e.height/2,f=t/2-u*l,p=n/2-d*l,m=$R(e,f,p,l,t,n),h={left:Math.min(m.left-o.left,0),top:Math.min(m.top-o.top,0),right:Math.min(m.right-o.right,0),bottom:Math.min(m.bottom-o.bottom,0)};return{x:f-h.left+h.right,y:p-h.top+h.bottom,zoom:l}},tz=()=>typeof navigator<`u`&&navigator?.userAgent?.indexOf(`Mac`)>=0;function nz(e){return e!=null&&e!==`parent`}function rz(e){return{width:e.measured?.width??e.width??e.initialWidth??0,height:e.measured?.height??e.height??e.initialHeight??0}}function iz(e){return(e.measured?.width??e.width??e.initialWidth)!==void 0&&(e.measured?.height??e.height??e.initialHeight)!==void 0}function az(e,t={width:0,height:0},n,r,i){let a={...e},o=r.get(n);if(o){let e=o.origin||i;a.x+=o.internals.positionAbsolute.x-(t.width??0)*e[0],a.y+=o.internals.positionAbsolute.y-(t.height??0)*e[1]}return a}function oz(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function sz(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function cz(e){return{...fR,...e||{}}}function lz(e,t,n){return t?n?`${e}-${t}-${n}`:`${e}-${t}`:e}function uz(e,{nodeId:t,type:n,handleId:r}){return Array.from(e.get(lz(t,n,r))?.values()??[])}function dz(e){return e===null?null:e?`valid`:`invalid`}function fz(e){return e instanceof MouseEvent||mz(e)}function pz(e){return e instanceof WheelEvent}function mz(e){return typeof TouchEvent<`u`&&e instanceof TouchEvent}function hz(e){return e instanceof MouseEvent}function gz(e){if(mz(e)){let t=e.touches[0]??e.changedTouches[0];return[t?.clientX??0,t?.clientY??0]}return[e.clientX,e.clientY]}function _z(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:a,y:o}=Sz(e),s=YR({x:a-(i?.left??0),y:o-(i?.top??0)},r),{x:c,y:l}=n?JR(s,t):s;return{xSnapped:c,ySnapped:l,...s}}var vz=e=>({width:e.offsetWidth,height:e.offsetHeight}),yz=e=>e?.getRootNode?.()||window?.document,bz=[`INPUT`,`SELECT`,`TEXTAREA`];function xz(e){let t=e.composedPath?.()?.[0]||e.target;return t?.nodeType===1?bz.includes(t.nodeName)||t.hasAttribute(`contenteditable`)||!!t.closest(`.nokey`):!1}var Sz=(e,t)=>{let n=hz(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},Cz=(e,t,n,r,i)=>{let a=t.querySelectorAll(`.${e}`);return!a||!a.length?null:Array.from(a).map(t=>{let a=t.getBoundingClientRect();return{id:t.getAttribute(`data-handleid`),type:e,nodeId:i,position:t.getAttribute(`data-handlepos`),x:(a.left-n.left)/r,y:(a.top-n.top)/r,...vz(t)}})};function wz({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){let c=e*.125+i*.375+o*.375+n*.125,l=t*.125+a*.375+s*.375+r*.125;return[c,l,Math.abs(c-e),Math.abs(l-t)]}function Tz(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ez({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case`left`:return[t-Tz(t-r,a),n];case`right`:return[t+Tz(r-t,a),n];case`top`:return[t,n-Tz(n-i,a)];case`bottom`:return[t,n+Tz(i-n,a)]}}function Dz({sourceX:e,sourceY:t,sourcePosition:n=`bottom`,targetX:r,targetY:i,targetPosition:a=`top`,curvature:o=.25}){let[s,c]=Ez({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[l,u]=Ez({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[d,f,p,m]=wz({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:c,targetControlX:l,targetControlY:u});return[`M${e},${t} C${s},${c} ${l},${u} ${r},${i}`,d,f,p,m]}function Oz({sourceX:e,sourceY:t,targetX:n,targetY:r}){let i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2;return[a,r<t?r+o:r-o,i,o]}function kz({sourceNode:e,targetNode:t,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:a=`basic`}){return a===`manual`?r:(i&&n?r+1e3:r)+Math.max(e.parentId||i&&e.selected?e.internals.z:0,t.parentId||i&&t.selected?t.internals.z:0)}function Az({sourceNode:e,targetNode:t,width:n,height:r,transform:i}){let a=LR(VR(e),VR(t));return a.x===a.x2&&(a.x2+=1),a.y===a.y2&&(a.y2+=1),WR({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},zR(a))>0}var jz=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`xy-edge__${e}${t||``}-${n}${r||``}`,Mz=(e,t)=>t.some(t=>t.source===e.source&&t.target===e.target&&(t.sourceHandle===e.sourceHandle||!t.sourceHandle&&!e.sourceHandle)&&(t.targetHandle===e.targetHandle||!t.targetHandle&&!e.targetHandle)),Nz=(e,t,n={})=>{if(!e.source||!e.target)return n.onError?.(`006`,lR.error006()),t;let r=n.getEdgeId||jz,i;return i=xR(e)?{...e}:{...e,id:r(e)},Mz(i,t)?t:(i.sourceHandle===null&&delete i.sourceHandle,i.targetHandle===null&&delete i.targetHandle,t.concat(i))};function Pz({sourceX:e,sourceY:t,targetX:n,targetY:r}){let[i,a,o,s]=Oz({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}var Fz={left:{x:-1,y:0},right:{x:1,y:0},top:{x:0,y:-1},bottom:{x:0,y:1}},Iz=({source:e,sourcePosition:t=`bottom`,target:n})=>t===`left`||t===`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},Lz=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),Rz=(e,t,n)=>e.x===t.x&&t.x===n.x&&(t.y-e.y)*(n.y-t.y)>=0||e.y===t.y&&t.y===n.y&&(t.x-e.x)*(n.x-t.x)>=0;function zz({source:e,sourcePosition:t=`bottom`,target:n,targetPosition:r=`top`,center:i,offset:a,stepPosition:o}){let s=Fz[t],c=Fz[r],l={x:e.x+s.x*a,y:e.y+s.y*a},u={x:n.x+c.x*a,y:n.y+c.y*a},d=Iz({source:l,sourcePosition:t,target:u}),f=d.x===0?`y`:`x`,p=d[f],m,h,g,_={x:0,y:0},v={x:0,y:0},[,,y,b]=Oz({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(s[f]*c[f]===-1){f===`x`?(h=i.x??l.x+(u.x-l.x)*o,g=i.y??(l.y+u.y)/2):(h=i.x??(l.x+u.x)/2,g=i.y??l.y+(u.y-l.y)*o);let e=[{x:h,y:l.y},{x:h,y:u.y}],t=[{x:l.x,y:g},{x:u.x,y:g}];m=s[f]===p?f===`x`?e:t:f===`x`?t:e}else{let i=[{x:l.x,y:u.y}],o=[{x:u.x,y:l.y}];if(m=f===`x`?s.x===p?o:i:s.y===p?i:o,t===r){let t=Math.abs(e[f]-n[f]);if(t<=a){let r=Math.min(a-1,a-t);s[f]===p?_[f]=(l[f]>e[f]?-1:1)*r:v[f]=(u[f]>n[f]?-1:1)*r}}if(t!==r){let e=f===`x`?`y`:`x`,t=s[f]===c[e],n=l[e]>u[e],r=l[e]<u[e];(s[f]===1&&(!t&&n||t&&r)||s[f]!==1&&(!t&&r||t&&n))&&(m=f===`x`?i:o)}let d={x:l.x+_.x,y:l.y+_.y},y={x:u.x+v.x,y:u.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(y.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(y.y-m[0].y))?(h=(d.x+y.x)/2,g=m[0].y):(h=m[0].x,g=(d.y+y.y)/2)}let x={x:l.x+_.x,y:l.y+_.y},S={x:u.x+v.x,y:u.y+v.y},C=[];for(let t of[e,x,...m,S,n]){let[e,n]=C.slice(-2);n&&Rz(e,n,t)&&C.pop(),C.push(t)}return[C,h,g,y,b]}function Bz(e,t,n,r){let i=Math.min(Lz(e,t)/2,Lz(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){let t=e.x<n.x?-1:1,r=e.y<n.y?1:-1;return`L ${a+i*t},${o}Q ${a},${o} ${a},${o+i*r}`}let s=e.x<n.x?1:-1;return`L ${a},${o+i*(e.y<n.y?-1:1)}Q ${a},${o} ${a+i*s},${o}`}function Vz({sourceX:e,sourceY:t,sourcePosition:n=`bottom`,targetX:r,targetY:i,targetPosition:a=`top`,borderRadius:o=5,centerX:s,centerY:c,offset:l=20,stepPosition:u=.5}){let[d,f,p,m,h]=zz({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:c},offset:l,stepPosition:u}),g=`M${d[0].x} ${d[0].y}`;for(let e=1;e<d.length-1;e++)g+=Bz(d[e-1],d[e],d[e+1],o);return g+=`L${d[d.length-1].x} ${d[d.length-1].y}`,[g,f,p,m,h]}function Hz(e){return e&&!!(e.internals.handleBounds||e.handles?.length)&&!!(e.measured.width||e.width||e.initialWidth)}function Uz(e){let{sourceNode:t,targetNode:n}=e;if(!Hz(t)||!Hz(n))return null;let r=t.internals.handleBounds,i=n.internals.handleBounds,a=Gz(r?.source??[],e.sourceHandle),o=Gz(e.connectionMode===`strict`?i?.target??[]:(i?.target??[]).concat(i?.source??[]),e.targetHandle);if(!a||!o)return e.onError?.(`008`,lR.error008(a?`target`:`source`,{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;let s=a?.position||`bottom`,c=o?.position||`top`,l=Wz(t,a,s),u=Wz(n,o,c);return{sourceX:l.x,sourceY:l.y,targetX:u.x,targetY:u.y,sourcePosition:s,targetPosition:c}}function Wz(e,t,n=`left`,r=!1){let i=(t?.x??0)+e.internals.positionAbsolute.x,a=(t?.y??0)+e.internals.positionAbsolute.y,{width:o,height:s}=t??rz(e);if(r)return{x:i+o/2,y:a+s/2};switch(t?.position??n){case`top`:return{x:i+o/2,y:a};case`right`:return{x:i+o,y:a+s/2};case`bottom`:return{x:i+o/2,y:a+s};case`left`:return{x:i,y:a+s/2}}}function Gz(e,t){return e&&(t?e.find(e=>e.id===t):e[0])||null}function Kz(e,t){return e?typeof e==`string`?e:`${t?`${t}__`:``}${Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join(`&`)}`:``}function qz(e,{id:t,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let a=new Set;return e.reduce((e,o)=>([o.markerStart||r,o.markerEnd||i].forEach(r=>{if(r&&typeof r==`object`){let i=Kz(r,t);a.has(i)||(e.push({id:i,color:r.color||n,...r}),a.add(i))}}),e),[]).sort((e,t)=>e.id.localeCompare(t.id))}var Jz=1e3,Yz=10,Xz={nodeOrigin:[0,0],nodeExtent:uR,elevateNodesOnSelect:!0,zIndexMode:`basic`,defaults:{},checkEquality:!0};function Zz(e,t){let n={...e};for(let e in t)t[e]!==void 0&&(n[e]=t[e]);return n}function Qz(e,t,n=uR){return NR(wR(e,t),nz(e.extent)?e.extent:n,rz(e))}function $z(e,t){if(!e.handles)return e.measured?t?.internals.handleBounds:void 0;let n=[],r=[];for(let t of e.handles){let i={id:t.id,width:t.width??1,height:t.height??1,nodeId:e.id,x:t.x,y:t.y,position:t.position,type:t.type};t.type===`source`?n.push(i):t.type===`target`&&r.push(i)}return{source:n,target:r}}function eB(e){return e===`manual`}function tB(e,t,n,r={}){let i=Zz(Xz,r),a={i:0},o=new Map(t),s=!!r.defaults?.parentId||e.some(e=>!!e.parentId),c=i?.elevateNodesOnSelect&&!eB(i.zIndexMode)?Jz:0,l=new Set,u=new Map,d=e.length>0,f=!1,p=new Set;function m(e){if(p.has(e.id)){let n=t.get(e.id);n&&Object.assign(n,e)}else p.add(e.id),t.set(e.id,e)}t.clear(),n.clear();let h={nodeLookup:t,parentLookup:n,options:r,rootParentIndex:a,processedNodes:l,deferredChildNodes:u,updateNode:m};for(let n of e){let e=o.get(n.id);i.checkEquality&&n===e?.internals.userNode?t.set(n.id,e):(e={...i.defaults,...n,measured:{width:n.measured?.width,height:n.measured?.height},internals:{positionAbsolute:Qz(n,i.nodeOrigin,i.nodeExtent),handleBounds:$z(n,e),z:oB(n,c,i.zIndexMode),userNode:n,isParent:!1}},m(e)),e.measured!==void 0&&e.measured.width!==void 0&&e.measured.height!==void 0||e.hidden||(d=!1),s&&nB(e,h),f||=n.selected??!1}for(let e of o.keys()){let r=t.get(e);r?r.internals.isParent&&!n.has(e)&&m({...r,internals:{...r.internals,isParent:!1}}):p.add(e)}return{nodesInitialized:d,hasSelectedNodes:f,updatedNodes:p}}function nB(e,t){let{nodeLookup:n,parentLookup:r,options:i,rootParentIndex:a,processedNodes:o,deferredChildNodes:s,updateNode:c}=t;if(e.parentId&&!o.has(e.parentId)){let t=s.get(e.parentId)??[];t.push(e),s.set(e.parentId,t);return}e.parentId&&iB(e,n,r,i,a,c),o.add(e.id);let l=s.get(e.id);l&&(s.delete(e.id),l.forEach(e=>nB(e,t)))}function rB(e,t,n,r){if(!e.parentId)return;let i=t.get(e.parentId);i?i.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]])),n.internals.isParent||r({...n,internals:{...n.internals,isParent:!0}})}function iB(e,t,n,r,i,a=e=>{t.set(e.id,e)}){let o=Zz(Xz,r),{zIndexMode:s}=o,c=e.parentId,l=t.get(c);l?(i&&!l.parentId&&l.internals.rootParentIndex===void 0&&s===`auto`&&(l.internals.rootParentIndex=++i.i,l.internals.z=l.internals.z+i.i*Yz),i&&l.internals.rootParentIndex!==void 0&&(i.i=l.internals.rootParentIndex),rB(aB(e,l,{nodeLookup:t,options:o,updateNode:a}),n,l,a)):console.warn(`Parent node ${c} not found.`)}function aB(e,t,n){let{elevateNodesOnSelect:r,nodeOrigin:i,nodeExtent:a,zIndexMode:o}=n.options,{x:s,y:c,z:l}=sB(e,t,i,a,r&&!eB(o)?Jz:0,o),{positionAbsolute:u}=e.internals,d=s!==u.x||c!==u.y;if(d||l!==e.internals.z){let t={...e,internals:{...e.internals,positionAbsolute:d?{x:s,y:c}:u,z:l}};return n.updateNode(t),t}return e}function oB(e,t,n){let r=KR(e.zIndex)?e.zIndex:0;return eB(n)?r:r+(e.selected?t:0)}function sB(e,t,n,r,i,a){let{x:o,y:s}=t.internals.positionAbsolute,c=rz(e),l=wR(e,n),u=nz(e.extent)?NR(l,e.extent,c):l,d=NR({x:o+u.x,y:s+u.y},r,c);e.extent===`parent`&&(d=PR(d,c,t));let f=oB(e,i,a),p=t.internals.z??0;return{x:d.x,y:d.y,z:p>=f?p+1:f}}function cB(e,t,n,r=[0,0]){let i=[],a=new Map;for(let n of e){let e=t.get(n.parentId);if(!e)continue;let r=HR(a.get(n.parentId)?.expandedRect??BR(e),n.rect);a.set(n.parentId,{expandedRect:r,parent:e})}return a.size>0&&a.forEach(({expandedRect:t,parent:a},o)=>{let s=a.internals.positionAbsolute,c=rz(a),l=a.origin??r,u=t.x<s.x?Math.round(Math.abs(s.x-t.x)):0,d=t.y<s.y?Math.round(Math.abs(s.y-t.y)):0,f=Math.max(c.width,Math.round(t.width)),p=Math.max(c.height,Math.round(t.height)),m=(f-c.width)*l[0],h=(p-c.height)*l[1];(u>0||d>0||m||h)&&(i.push(gV(o,{x:a.position.x-u+m,y:a.position.y-d+h})),n.get(o)?.forEach(t=>{e.some(e=>e.id===t.id)||i.push(gV(t.id,{x:t.position.x+u,y:t.position.y+d}))})),(c.width<t.width||c.height<t.height||u||d)&&i.push({id:o,type:`dimensions`,setAttributes:!0,dimensions:{width:f+(u?l[0]*u-m:0),height:p+(d?l[1]*d-h:0)}})}),i}function lB(e,t,n,r,i,a,o){let s=new Set,c=e=>{t.set(e.id,e),s.add(e.id)},l=r?.querySelector(`.xyflow__viewport`),u=!1;if(!l)return{changes:[],updatedInternals:u,updatedNodes:s};let d=[],f=window.getComputedStyle(l),{m22:p}=new window.DOMMatrixReadOnly(f.transform),m=[],h=[];for(let n of e.values()){let e=t.get(n.id);if(!e)continue;if(e.hidden){c({...e,internals:{...e.internals,handleBounds:void 0}}),u=!0;continue}let r=vz(n.nodeElement),o=e.measured.width!==r.width||e.measured.height!==r.height;if(r.width&&r.height&&(o||!e.internals.handleBounds||n.force)){let t=n.nodeElement.getBoundingClientRect(),s={...e,measured:r};c({...s,internals:{...e.internals,positionAbsolute:e.parentId?e.internals.positionAbsolute:Qz(s,i,a),handleBounds:{source:Cz(`source`,n.nodeElement,t,p,e.id),target:Cz(`target`,n.nodeElement,t,p,e.id)}}}),u=!0,o&&(d.push(_V(e.id,r)),e.expandParent&&e.parentId&&h.push(e.id))}}if(u){let e={nodeOrigin:i,nodeExtent:a,zIndexMode:o};for(let r of n.values())for(let i of r.keys()){let r=t.get(i);r&&iB(r,t,n,e,void 0,e=>c(e))}}for(let e of h){let n=t.get(e);m.push({id:e,parentId:n.parentId,rect:BR(n,i)})}if(m.length>0){let e=cB(m,t,n,i);d.push(...e)}return{changes:d,updatedInternals:u,updatedNodes:s}}async function uB({delta:e,panZoom:t,transform:n,translateExtent:r,width:i,height:a}){if(!t||!e.x&&!e.y)return!1;let o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[i,a]],r);return!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2])}function dB(e,t,n,r,i,a,o){let s=i,c=r.get(s);c&&o.has(s)||(c=new Map(c),o.add(s),r.set(s,c)),c.set(n,t),s=`${i}-${e}`;let l=r.get(s);if(l&&o.has(s)||(l=new Map(l),o.add(s),r.set(s,l)),l.set(n,t),a){s=`${i}-${e}-${a}`;let c=r.get(s);c&&o.has(s)||(c=new Map(c),o.add(s),r.set(s,c)),c.set(n,t)}}function fB(e,t,n,r,i,a){let o=[r,`${r}-${e}`];i&&o.push(`${r}-${e}-${i}`);for(let e of o){let r=n.get(e);r&&(a.has(e)||(r=new Map(r),n.set(e,r),a.add(e)),r.delete(t),r.size===0&&n.delete(e))}}function pB(e,t,n,r){let{source:i,target:a,sourceHandle:o=null,targetHandle:s=null}=t,c={edgeId:t.id,source:i,target:a,sourceHandle:o,targetHandle:s},l=`${i}-${o}--${a}-${s}`,u=`${a}-${s}--${i}-${o}`;n===`add`?(dB(`source`,c,u,e,i,o,r),dB(`target`,c,l,e,a,s,r)):(fB(`source`,u,e,i,o,r),fB(`target`,l,e,a,s,r))}function mB(e,t,n){let r=new Map(t),i=new Set,a=new Set,o=[];t.clear();for(let s of n){let n=r.get(s.id);n===s?t.set(s.id,s):(n&&n.source===s.source&&n.target===s.target&&n.sourceHandle==s.sourceHandle&&n.targetHandle==s.targetHandle||(n&&pB(e,n,`remove`,a),o.push(s)),t.set(s.id,s),i.add(s.id))}for(let n of r.values())t.has(n.id)||(pB(e,n,`remove`,a),i.add(n.id));for(let t of o)pB(e,t,`add`,a);return{updatedEdges:i}}function hB(e,t,n,r,i){let a=t.get(e);if(!a){console.warn(`changeParent: Node "${e}" does not exists`);return}if(n===e)return;let o=a.internals.positionAbsolute,s=a.origin??r,c=rz(a),l={x:s[0]*c.width,y:s[1]*c.height};if(n===null){i({nodeId:e,parentId:n,x:o.x+l.x,y:o.y+l.y});return}let u=t.get(n);if(!u){console.warn(`changeParent: Parent node "${n}" does not exists`);return}let d=u.internals.positionAbsolute;i({nodeId:e,parentId:n,x:o.x+l.x-d.x,y:o.y+l.y-d.y})}function gB(e,t){if(!e.parentId)return!1;let n=t.get(e.parentId);return n?n.selected?!0:gB(n,t):!1}function _B(e,t,n){let r=e;do{if(r?.matches?.(t))return!0;if(r===n)return!1;r=r?.parentElement}while(r);return!1}function vB(e,t,n,r,i){let a=new Map;for(let[o,s]of e)if((i?s.id===r:s.selected||s.id===r)&&(i||!s.parentId||!gB(s,e))&&(s.draggable||t&&s.draggable===void 0)){let t=e.get(o);t&&a.set(o,{id:o,position:t.position||{x:0,y:0},distance:{x:n.x-t.internals.positionAbsolute.x,y:n.y-t.internals.positionAbsolute.y},extent:t.extent,parentId:t.parentId,origin:t.origin,expandParent:t.expandParent,internals:{positionAbsolute:t.internals.positionAbsolute||{x:0,y:0}},measured:{width:t.measured.width??0,height:t.measured.height??0}})}return a}function yB({nodeId:e,dragItems:t,nodeLookup:n,dragging:r=!0}){let i=[];for(let[e,a]of t){let t=n.get(e)?.internals.userNode;t&&i.push({...t,position:a.position,dragging:r})}if(!e)return[i[0],i];let a=n.get(e)?.internals.userNode;return[a?{...a,position:t.get(e)?.position||a.position,dragging:r}:i[0],i]}function bB({dragItems:e,snapGrid:t,x:n,y:r}){let i=e.values().next().value;if(!i)return null;let a={x:n-i.distance.x,y:r-i.distance.y},o=JR(a,t);return{x:o.x-a.x,y:o.y-a.y}}function xB({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:r,onDragStop:i}){let a={x:null,y:null},o=0,s=new Map,c=!1,l={x:0,y:0},u={x:0,y:0},d=null,f=!1,p=null,m=!1,g=!1,_=null;function v(e){let t=e.view??window,n=e=>{e.preventDefault(),e.stopImmediatePropagation()};t.addEventListener(`click`,n,{capture:!0}),setTimeout(()=>t.removeEventListener(`click`,n,{capture:!0}),0)}function y({noDragClassName:y,handleSelector:b,domNode:x,isSelectable:S,nodeId:C}){p=h(x);function w({x:e,y:n}){let{nodeLookup:i,nodeExtent:o,snapGrid:c,snapToGrid:l,nodeOrigin:u,onNodeDrag:d,onSelectionDrag:f,onError:p,updateNodePositions:m}=t();a={x:e,y:n};let h=!1,v=s.size>1,y=v&&o?RR(ER(s)):null,b=v&&l?bB({dragItems:s,snapGrid:c,x:e,y:n}):null;for(let[t,r]of s){if(!i.has(t))continue;let a={x:e-r.distance.x,y:n-r.distance.y};l&&(a=b?{x:Math.round(a.x+b.x),y:Math.round(a.y+b.y)}:JR(a,c));let s=null;if(v&&o&&!r.extent&&y){let{positionAbsolute:e}=r.internals,t=e.x-y.x+o[0][0],n=e.x+r.measured.width-y.x2+o[1][0],i=e.y-y.y+o[0][1],a=e.y+r.measured.height-y.y2+o[1][1];s=[[t,i],[n,a]]}let{position:d,positionAbsolute:f}=AR({nodeId:t,nextPosition:a,nodeLookup:i,nodeExtent:s||o,nodeOrigin:u,onError:p});h=h||r.position.x!==d.x||r.position.y!==d.y,r.position=d,r.internals.positionAbsolute=f}if(g||=h,h&&(m(s,!0),_&&(r||d||!C&&f))){let[e,t]=yB({nodeId:C,dragItems:s,nodeLookup:i});r?.(_,s,e,t),d?.(_,e,t),C||f?.(_,t)}}async function T(){if(!d)return;let{transform:e,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=t();if(!i){c=!1,cancelAnimationFrame(o);return}let[s,u]=IR(l,d,r);(s!==0||u!==0)&&(a.x=(a.x??0)-s/e[2],a.y=(a.y??0)-u/e[2],await n({x:s,y:u})&&w(a)),o=requestAnimationFrame(()=>{T()})}function E(r){let{nodeLookup:i,multiSelectionActive:o,nodesDraggable:c,transform:l,snapGrid:u,snapToGrid:p,selectNodesOnDrag:m,onNodeDragStart:h,onSelectionDragStart:g,unselectNodesAndEdges:_}=t();f=!0;let v=!!C&&!o&&!i.get(C)?.selected;m&&S||o||!C||i.get(C)?.selected||_(),S&&m&&C&&e?.(C);let y=_z(r.sourceEvent,{transform:l,snapGrid:u,snapToGrid:p,containerBounds:d});if(a=y,s=vB(i,c,y,C,v),s.size>0&&(n||h||!C&&g)){let[e,t]=yB({nodeId:C,dragItems:s,nodeLookup:i});n?.(r.sourceEvent,s,e,t),h?.(r.sourceEvent,e,t),C||g?.(r.sourceEvent,t)}}let D=cR().clickDistance(1/0).on(`start`,e=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:o,snapToGrid:s}=t();d=n?.getBoundingClientRect()||null,f=!1,c=!1,m=!1,g=!1,_=e.sourceEvent,r===0&&E(e),a=_z(e.sourceEvent,{transform:i,snapGrid:o,snapToGrid:s,containerBounds:d}),l=Sz(e.sourceEvent,d),u=l}).on(`drag`,e=>{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:o,nodeDragThreshold:p,nodeLookup:h}=t();_=e.sourceEvent;let g=_z(_,{transform:r,snapGrid:i,snapToGrid:o,containerBounds:d});if((mz(_)&&_.type===`touchmove`&&_.touches.length>1||C&&!h.has(C))&&(m=!0),!m){if(!c&&n&&f&&(c=!0,T()),!f){let t=Sz(e.sourceEvent,d),n=t.x-u.x,r=t.y-u.y;Math.hypot(n,r)>p&&E(e)}(a.x!==g.xSnapped||a.y!==g.ySnapped)&&s&&f&&(l=Sz(_,d),w(g))}}).on(`end`,e=>{if((!x.contains(e.sourceEvent.target)||g)&&v(e.sourceEvent),!f||m)m&&s.size>0&&t().updateNodePositions(s,!1);else if(cancelAnimationFrame(o),s.size>0){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:a,onSelectionDragStop:o}=t();if(g&&=(r(s,!1),!1),i||a||!C&&o){let[t,r]=yB({nodeId:C,dragItems:s,nodeLookup:n,dragging:!1});i?.(e.sourceEvent,s,t,r),a?.(e.sourceEvent,t,r),C||o?.(e.sourceEvent,r)}}}).filter(e=>{let t=e.target;return!e.button&&(!y||!_B(t,`.${y}`,x))&&(!b||_B(t,b,x))});p.call(D)}function b(){p?.on(`.drag`,null)}return{update:y,destroy:b}}function SB(e,t,n){let r=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(let e of t.values())WR(i,BR(e))>0&&r.push(e);return r}var CB=250;function wB(e,t,n,r){let i=[],a=1/0,o=SB(e,n,t+CB);for(let n of o){let o=[...n.internals.handleBounds?.source??[],...n.internals.handleBounds?.target??[]];for(let s of o){if(r.nodeId===s.nodeId&&r.type===s.type&&r.id===s.id)continue;let{x:o,y:c}=Wz(n,s,s.position,!0),l=Math.sqrt((o-e.x)**2+(c-e.y)**2);l>t||(l<a?(i=[{...s,x:o,y:c}],a=l):l===a&&i.push({...s,x:o,y:c}))}}if(!i.length)return null;if(i.length>1){let e=r.type===`source`?`target`:`source`;return i.find(t=>t.type===e)??i[0]}return i[0]}function TB(e,t,n,r,i,a=!1){let o=r.get(e);if(!o)return null;let s=i===`strict`?o.internals.handleBounds?.[t]:[...o.internals.handleBounds?.source??[],...o.internals.handleBounds?.target??[]],c=(n?s?.find(e=>e.id===n):s?.[0])??null;return c&&a?{...c,...Wz(o,c,c.position,!0)}:c}function EB(e,t){return e||(t?.classList.contains(`target`)?`target`:t?.classList.contains(`source`)?`source`:null)}function DB(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}var OB=()=>!0;function kB(e,{connectionMode:t,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:a,isTarget:o,domNode:s,nodeLookup:c,lib:l,autoPanOnConnect:u,flowId:d,panBy:f,cancelConnection:p,onConnectStart:m,onConnect:h,onConnectEnd:g,isValidConnection:_=OB,onReconnectEnd:v,updateConnection:y,getTransform:b,getFromHandle:x,autoPanSpeed:S,dragThreshold:C=1,handleDomNode:w}){let T=yz(e.target),E=0,D,{x:O,y:k}=Sz(e),A=EB(a,w),j=s?.getBoundingClientRect(),M=!1;if(!j||!A)return;let N=TB(i,A,r,c,t);if(!N)return;let P=Sz(e,j),F=!1,I=null,L=!1,R=null;function z(){if(!u||!j)return;let[e,t]=IR(P,j,S);f({x:e,y:t}),E=requestAnimationFrame(z)}let B={...N,nodeId:i,type:A,position:N.position},V=c.get(i),H={inProgress:!0,isValid:null,from:Wz(V,B,`left`,!0),fromHandle:B,fromPosition:B.position,fromNode:V,to:P,toHandle:null,toPosition:bR[B.position],toNode:null,pointer:P};function ee(){M=!0,y(H),m?.(e,{nodeId:i,handleId:r,handleType:A})}C===0&&ee();function U(e){if(!M){let{x:t,y:n}=Sz(e),r=t-O,i=n-k;if(!(r*r+i*i>C*C))return;ee()}if(!x()||!B){W(e);return}let a=b();P=Sz(e,j),D=wB(YR(P,a,!1,[1,1]),n,c,B),F||=(z(),!0);let s=AB(e,{handle:D,connectionMode:t,fromNodeId:i,fromHandleId:r,fromType:o?`target`:`source`,isValidConnection:_,doc:T,lib:l,flowId:d,nodeLookup:c});R=s.handleDomNode,I=s.connection,L=DB(!!D,s.isValid);let u=c.get(i),f=u?Wz(u,B,`left`,!0):H.from,p={...H,from:f,isValid:L,to:s.toHandle&&L?XR({x:s.toHandle.x,y:s.toHandle.y},a):P,toHandle:s.toHandle,toPosition:L&&s.toHandle?s.toHandle.position:bR[B.position],toNode:s.toHandle?c.get(s.toHandle.nodeId):null,pointer:P};y(p),H=p}function W(e){if(!(`touches`in e&&e.touches.length>0)){if(M){(D||R)&&I&&L&&h?.(I);let{inProgress:t,...n}=H,r={...n,to:YR(H.to,b()),toPosition:H.toHandle?H.toPosition:null};g?.(e,r),a&&v?.(e,r)}p(),cancelAnimationFrame(E),F=!1,L=!1,I=null,R=null,T.removeEventListener(`mousemove`,U),T.removeEventListener(`mouseup`,W),T.removeEventListener(`touchmove`,U),T.removeEventListener(`touchend`,W)}}T.addEventListener(`mousemove`,U),T.addEventListener(`mouseup`,W),T.addEventListener(`touchmove`,U),T.addEventListener(`touchend`,W)}function AB(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:a,doc:o,lib:s,flowId:c,isValidConnection:l=OB,nodeLookup:u}){let d=a===`target`,f=t?o.querySelector(`.${s}-flow__handle[data-id="${c}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:p,y:m}=Sz(e),h=o.elementFromPoint(p,m),g=h?.classList.contains(`${s}-flow__handle`)?h:f,_={handleDomNode:g,isValid:!1,connection:null,toHandle:null};if(g){let e=EB(void 0,g),t=g.getAttribute(`data-nodeid`),a=g.getAttribute(`data-handleid`),o=g.classList.contains(`connectable`),s=g.classList.contains(`connectableend`);if(!t||!e)return _;let c={source:d?t:r,sourceHandle:d?a:i,target:d?r:t,targetHandle:d?i:a};_.connection=c,_.isValid=o&&s&&(n===`strict`?d&&e===`source`||!d&&e===`target`:t!==r||a!==i)&&l(c),_.toHandle=TB(t,e,a,u,n,!0)}return _}var jB={onPointerDown:kB,isValid:AB};function MB({domNode:e,panZoom:t,getTransform:n,getViewScale:r}){let i=h(e);function o({translateExtent:e,width:a,height:o,zoomStep:s=1,pannable:c=!0,zoomable:l=!0,inversePan:u=!1}){let d=e=>{let r=e.sourceEvent;if(!pz(r)||!t)return;let i=n(),a=r.ctrlKey&&tz()?10:1,o=-r.deltaY*(r.deltaMode===1?.05:r.deltaMode?1:.002)*s,c=i[2]*2**(o*a);t.scaleTo(c)},f=[0,0],m=p().on(`start`,e=>{let t=e.sourceEvent;fz(t)&&(t.type===`mousedown`||t.type===`touchstart`)&&(f=gz(t))}).on(`zoom`,c?i=>{let s=n(),c=i.sourceEvent;if(!fz(c)||pz(c)||!t)return;let l=gz(c),d=[l[0]-f[0],l[1]-f[1]];f=l;let p=r()*Math.max(s[2],Math.log(s[2]))*(u?-1:1),m={x:s[0]-d[0]*p,y:s[1]-d[1]*p},h=[[0,0],[a,o]];t.setViewportConstrained({x:m.x,y:m.y,zoom:s[2]},h,e)}:null).on(`zoom.wheel`,l?d:null);i.call(m,{})}function s(){i.on(`zoom`,null)}return{update:o,destroy:s,pointer:a}}var NB=e=>({x:e.x,y:e.y,zoom:e.k}),PB=({x:e,y:t,zoom:n})=>d.translate(e,t).scale(n),FB=(e,t)=>{if(!t)return!1;let n=e.target;return n instanceof Element&&!!n.closest(`.${t}`)},IB=e=>e===!0||Array.isArray(e)&&e.includes(0),LB=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),RB=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,zB=(e,t=0,n=RB,r=()=>{})=>{let i=typeof t==`number`&&t>0;return i||r(!0),i?e.transition().duration(t).ease(n).on(`end`,()=>r(!0)).on(`interrupt cancel`,()=>r(!1)):e},BB=e=>{let t=e.ctrlKey&&tz()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function VB({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:s,onPanZoomStart:c,onPanZoom:l,onPanZoomEnd:u}){return d=>{if(FB(d,t))return d.ctrlKey&&d.preventDefault(),!1;d.preventDefault(),d.stopImmediatePropagation();let f=n.property(`__zoom`).k||1;if(d.ctrlKey&&s){let e=a(d),t=f*2**BB(d);r.scaleTo(n,t,e,d);return}let p=d.deltaMode===1?20:1,m=i===`vertical`?0:d.deltaX*p,h=i===`horizontal`?0:d.deltaY*p;!tz()&&d.shiftKey&&i!==`vertical`&&(m=d.deltaY*p,h=0),r.translateBy(n,-(m/f)*o,-(h/f)*o,{internal:!0});let g=NB(n.property(`__zoom`));clearTimeout(e.panScrollTimeout),e.isPanScrolling?l?.(d,g):(e.isPanScrolling=!0,c?.(d,g)),e.panScrollTimeout=setTimeout(()=>{u?.(d,g),e.isPanScrolling=!1},150)}}function HB({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(r,i){let a=r.type===`wheel`,o=!t&&a&&!r.ctrlKey,s=FB(r,e);if(r.ctrlKey&&a&&s&&r.preventDefault(),o||s)return null;r.preventDefault(),n.call(this,r,i)}}function UB(e,t,n){let r=e.pointerDrag;r&&!r.moveStarted&&(r.moveStarted=!0,n?.(t,e.prevViewport))}function WB(e,t,n,r){let i=e.pointerDrag;i&&(UB(e,t,r),i.dragging=!0,i.isTouch||n(!0))}function GB(e){return e?.type===`mousemove`||e?.type===`touchmove`}function KB(e,t){return`touches`in e?Array.from(e.touches).find(e=>e.identifier===t)??null:e}function qB({zoomPanValues:e,paneDragThreshold:t,onDraggingChange:n,onPanZoomStart:r}){return i=>{let a=i.sourceEvent;if(!a||a.internal)return;let o=NB(i.transform);e.mouseButton=`button`in a?a.button:0,e.isZoomingOrPanning=!0,e.prevViewport=o,e.pointerDrag=null;let s=a.type===`touchstart`;if(a.type===`mousedown`||s){let o=s?a.touches[0]:null,{clientX:c,clientY:l}=o??a;e.pointerDrag={isTouch:s,touchId:o?.identifier??null,startX:c,startY:l,startTransform:i.transform,thresholdCrossed:!1,lastMove:null,moveStarted:!1,dragging:!1},t===0&&WB(e,a,n,r)}else r?.(a,o)}}function JB({zoomPanValues:e,d3Selection:t,paneDragThreshold:n,onDraggingChange:r,onTransformChange:i,onPanZoomStart:a,onPanZoom:o}){return s=>{let c=s.sourceEvent,l=e.pointerDrag;if(l){let i=GB(c)&&c!==l.lastMove;if(i&&(l.lastMove=c),i&&!l.thresholdCrossed){let e=KB(c,l.touchId),t=`touches`in c&&c.touches.length>1;if(!e||t)l.thresholdCrossed=!0;else{let t=e.clientX-l.startX,r=e.clientY-l.startY;l.thresholdCrossed=t*t+r*r>n*n}}if(!l.dragging){if(!i)l.startTransform=s.transform,c?.internal||UB(e,c,a);else if(l.thresholdCrossed)WB(e,c,r,a);else{t.property(`__zoom`,l.startTransform);return}}}c?.sync||i([s.transform.x,s.transform.y,s.transform.k]),o&&!c?.internal&&(!l||l.moveStarted)&&o?.(s.sourceEvent,NB(s.transform))}}function YB({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:a}){return o=>{if(o.sourceEvent?.internal)return;e.isZoomingOrPanning=!1;let s=e.pointerDrag;if(e.pointerDrag=null,a&&LB(t,e.mouseButton??0)&&!s?.thresholdCrossed&&o.sourceEvent&&a(o.sourceEvent),(!s||s.moveStarted)&&(r(!1),i)){let t=NB(o.transform);e.prevViewport=t,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{i?.(o.sourceEvent,t)},n?150:0)}}}function XB({panActivationKeyPressed:e,zoomActivationKeyPressed:t,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:i,panOnScroll:a,zoomOnDoubleClick:o,userSelectionActive:s,noWheelClassName:c,noPanClassName:l,lib:u,connectionInProgress:d}){return f=>{let p=t||n,m=r&&f.ctrlKey,h=f.type===`wheel`;if((i===!0||Array.isArray(i)&&i.includes(1))&&hz(f)&&f.button===1&&f.type===`mousedown`&&(FB(f,`${u}-flow__node`)||FB(f,`${u}-flow__edge`)||FB(f,`${u}-flow__selection`)||FB(f,`${u}-flow__nodesselection`)))return!0;if(!i&&!p&&!a&&!o&&!r||s||d&&!h||FB(f,c)&&h||FB(f,l)&&(!h||a&&h&&!t)||!r&&f.ctrlKey&&h)return!1;if(!r&&mz(f)&&f.type===`touchstart`&&f.touches.length>1)return f.preventDefault(),!1;if(!p&&!a&&!m&&h||!i&&(f.type===`mousedown`||f.type===`touchstart`)||Array.isArray(i)&&hz(f)&&f.type===`mousedown`&&!i.includes(f.button))return!1;let g=hz(f)?f.button:0,_=Array.isArray(i)&&i.includes(g)||g<=1;return(!f.ctrlKey||h||e)&&_}}function ZB({domNode:e,minZoom:t,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:a,onPanZoomStart:o,onPanZoomEnd:s,onDraggingChange:c}){let l={isZoomingOrPanning:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1,pointerDrag:null},d=e.getBoundingClientRect(),m=[[0,0],[d.width,d.height]],g=typeof ResizeObserver<`u`?new ResizeObserver(e=>{let t=e[0];t?.contentRect&&(m=[[0,0],[t.contentRect.width,t.contentRect.height]])}):null;g?.observe(e);let _=p().extent(()=>m).scaleExtent([t,n]).translateExtent(r),y=h(e).call(_);T({x:i.x,y:i.y,zoom:MR(i.zoom,t,n)},[[0,0],[d.width,d.height]],r);let b=y.on(`wheel.zoom`),x=y.on(`dblclick.zoom`);_.wheelDelta(BB);async function S(e,t){return y?new Promise(n=>{_?.interpolate(t?.interpolate===`linear`?v:u).transform(zB(y,t?.duration,t?.ease,n),e)}):!1}function C({noWheelClassName:e,noPanClassName:t,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:u,panOnScrollMode:d,panOnScrollSpeed:f,preventScrolling:p,zoomOnPinch:m,zoomOnScroll:h,zoomOnDoubleClick:g,panActivationKeyPressed:v=!1,zoomActivationKeyPressed:S,lib:C,onTransformChange:w,connectionInProgress:T,paneDragThreshold:E}){r&&!l.isZoomingOrPanning&&_.on(`zoom`,null);let D=i&&!S&&!r,O=KR(E)&&E>0?E:0;_.clickDistance(O);let k=D?VB({zoomPanValues:l,noWheelClassName:e,d3Selection:y,d3Zoom:_,panOnScrollMode:d,panOnScrollSpeed:f,zoomOnPinch:m,onPanZoomStart:o,onPanZoom:a,onPanZoomEnd:s}):HB({noWheelClassName:e,preventScrolling:p,d3ZoomHandler:b});y.on(`wheel.zoom`,k,{passive:!1});let A=qB({zoomPanValues:l,paneDragThreshold:O,onDraggingChange:c,onPanZoomStart:o});_.on(`start`,A);let j=JB({zoomPanValues:l,d3Selection:y,paneDragThreshold:O,onPanZoomStart:o,onPanZoom:a,onDraggingChange:c,onTransformChange:w});_.on(`zoom`,j);let M=YB({zoomPanValues:l,panOnDrag:u,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:s,onDraggingChange:c});_.on(`end`,M);let N=XB({panActivationKeyPressed:v,zoomActivationKeyPressed:S,panOnDrag:u,zoomOnScroll:h,panOnScroll:i,zoomOnDoubleClick:g,zoomOnPinch:m,userSelectionActive:r,noPanClassName:t,noWheelClassName:e,lib:C,connectionInProgress:T});_.filter(N),g?y.on(`dblclick.zoom`,x):y.on(`dblclick.zoom`,null)}function w(){_.on(`zoom`,null),g?.disconnect()}async function T(e,t,n){let r=PB(e),i=_?.constrain()(r,t,n);return i&&await S(i),i}async function E(e,t){return S(PB(e),t)}function D(e){if(y){let t=PB(e),n=y.property(`__zoom`);(n.k!==e.zoom||n.x!==e.x||n.y!==e.y)&&_?.transform(y,t,null,{sync:!0})}}function O(){let e=y?f(y.node()):{x:0,y:0,k:1};return{x:e.x,y:e.y,zoom:e.k}}async function k(e,t){return y?new Promise(n=>{_?.interpolate(t?.interpolate===`linear`?v:u).scaleTo(zB(y,t?.duration,t?.ease,n),e)}):!1}async function A(e,t){return y?new Promise(n=>{_?.interpolate(t?.interpolate===`linear`?v:u).scaleBy(zB(y,t?.duration,t?.ease,n),e)}):!1}function j(e){_?.scaleExtent(e)}function M(e){_?.translateExtent(e)}return{update:C,destroy:w,setViewport:E,setViewportConstrained:T,getViewport:O,scaleTo:k,scaleBy:A,setScaleExtent:j,setTranslateExtent:M,syncViewport:D}}var QB=function(e){return e.Line=`line`,e.Handle=`handle`,e}({});function $B({width:e,prevWidth:t,height:n,prevHeight:r,affectsX:i,affectsY:a}){let o=e-t,s=n-r,c=[o>0?1:o<0?-1:0,s>0?1:s<0?-1:0];return o&&i&&(c[0]*=-1),s&&a&&(c[1]*=-1),c}function eV(e){return{isHorizontal:e.includes(`right`)||e.includes(`left`),isVertical:e.includes(`bottom`)||e.includes(`top`),affectsX:e.includes(`left`),affectsY:e.includes(`top`)}}function tV(e,t){return Math.max(0,t-e)}function nV(e,t){return Math.max(0,e-t)}function rV(e,t,n){return Math.max(0,t-e,e-n)}function iV(e,t){return e?!t:t}function aV(e,t,n,r,i,a,o,s){let{affectsX:c,affectsY:l}=t,{isHorizontal:u,isVertical:d}=t,f=u&&d,{xSnapped:p,ySnapped:m}=n,{minWidth:h,maxWidth:g,minHeight:_,maxHeight:v}=r,{x:y,y:b,width:x,height:S,aspectRatio:C}=e,w=Math.floor(u?p-e.pointerX:0),T=Math.floor(d?m-e.pointerY:0),E=x+(c?-w:w),D=S+(l?-T:T),O=-a[0]*x,k=-a[1]*S,A=rV(E,h,g),j=rV(D,_,v);if(o){let e=0,t=0;c&&w<0?e=tV(y+w+O,o[0][0]):!c&&w>0&&(e=nV(y+E+O,o[1][0])),l&&T<0?t=tV(b+T+k,o[0][1]):!l&&T>0&&(t=nV(b+D+k,o[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(s){let e=0,t=0;c&&w>0?e=nV(y+w,s[0][0]):!c&&w<0&&(e=tV(y+E,s[1][0])),l&&T>0?t=nV(b+T,s[0][1]):!l&&T<0&&(t=tV(b+D,s[1][1])),A=Math.max(A,e),j=Math.max(j,t)}if(i){if(u){let e=rV(E/C,_,v)*C;if(A=Math.max(A,e),o){let e=!c&&!l||c&&!l&&f?nV(b+k+E/C,o[1][1])*C:tV(b+k+(c?w:-w)/C,o[0][1])*C;A=Math.max(A,e)}if(s){let e=!c&&!l||c&&!l&&f?tV(b+E/C,s[1][1])*C:nV(b+(c?w:-w)/C,s[0][1])*C;A=Math.max(A,e)}}if(d){let e=rV(D*C,h,g)/C;if(j=Math.max(j,e),o){let e=!c&&!l||l&&!c&&f?nV(y+D*C+O,o[1][0])/C:tV(y+(l?T:-T)*C+O,o[0][0])/C;j=Math.max(j,e)}if(s){let e=!c&&!l||l&&!c&&f?tV(y+D*C,s[1][0])/C:nV(y+(l?T:-T)*C,s[0][0])/C;j=Math.max(j,e)}}}T+=T<0?j:-j,w+=w<0?A:-A,i&&(f?E>D*C?T=(iV(c,l)?-w:w)/C:w=(iV(c,l)?-T:T)*C:u?(T=w/C,l=c):(w=T*C,c=l));let M=c?y+w:y,N=l?b+T:b;return{width:x+(c?-w:w),height:S+(l?-T:T),x:a[0]*w*(c?-1:1)+M,y:a[1]*T*(l?-1:1)+N}}var oV={width:0,height:0,x:0,y:0},sV={...oV,pointerX:0,pointerY:0,aspectRatio:1};function cV(e,t,n){let r=n.x+e.internals.positionAbsolute.x-t.internals.positionAbsolute.x,i=n.y+e.internals.positionAbsolute.y-t.internals.positionAbsolute.y,a=e.measured.width??0,o=e.measured.height??0;return[[r,i],[r+a,i+o]]}function lV({domNode:e,nodeId:t,getStoreItems:n,onChange:r,onEnd:i}){let a=h(e),o={controlDirection:eV(`bottom-right`),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function s({controlPosition:e,boundaries:s,keepAspectRatio:c,resizeDirection:l,onResizeStart:u,onResize:d,onResizeEnd:f,shouldResize:p}){let m={...oV},h={...sV};o={boundaries:s,resizeDirection:l,keepAspectRatio:c,controlDirection:eV(e)};let g,_=null,v=[],y,b,x,S=cR().on(`start`,e=>{let{nodeLookup:r,transform:i,snapGrid:a,snapToGrid:o,nodeOrigin:s,paneDomNode:c}=n();if(g=r.get(t),!g)return;_=c?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:d}=_z(e.sourceEvent,{transform:i,snapGrid:a,snapToGrid:o,containerBounds:_}),f=g.measured.width??0,p=g.measured.height??0,S=g.origin??s,C=g.parentId?r.get(g.parentId)?.internals.positionAbsolute:void 0;m={width:f,height:p,x:g.internals.positionAbsolute.x-(C?.x??0)+S[0]*f,y:g.internals.positionAbsolute.y-(C?.y??0)+S[1]*p},h={...m,pointerX:l,pointerY:d,aspectRatio:m.width/m.height},y=void 0,b=nz(g.extent)?g.extent:void 0,g.parentId&&(g.extent===`parent`||g.expandParent)&&(y=r.get(g.parentId)),y&&g.extent===`parent`&&(b=[[0,0],[y.measured.width,y.measured.height]]),v=[],x=void 0;for(let[e,n]of r)if(n.parentId===t&&(v.push({id:e,position:{...n.position},extent:n.extent}),n.extent===`parent`||n.expandParent)){let e=cV(n,g,m);x=x?[[Math.min(e[0][0],x[0][0]),Math.min(e[0][1],x[0][1])],[Math.max(e[1][0],x[1][0]),Math.max(e[1][1],x[1][1])]]:e}u?.(e,{...m})}).on(`drag`,e=>{let{transform:t,snapGrid:i,snapToGrid:a,nodeOrigin:s}=n(),c=_z(e.sourceEvent,{transform:t,snapGrid:i,snapToGrid:a,containerBounds:_}),l=[];if(!g)return;let{x:u,y:f,width:S,height:C}=m,w={},T=g.origin??s,{width:E,height:D,x:O,y:k}=aV(h,o.controlDirection,c,o.boundaries,o.keepAspectRatio,T,b,x),A=E!==S,j=D!==C,M=O!==u&&A,N=k!==f&&j;if(!M&&!N&&!A&&!j)return;let P={prevValues:{...m},startX:h.x,startY:h.y,childNodes:v.map(e=>({...e,position:{...e.position}}))};if((M||N||T[0]===1||T[1]===1)&&(w.x=M?O:m.x,w.y=N?k:m.y,m.x=w.x,m.y=w.y,v.length>0)){let e=O-u,t=k-f;for(let n of v)n.position={x:n.position.x-e+T[0]*(E-S),y:n.position.y-t+T[1]*(D-C)},l.push(n)}if((A||j)&&(w.width=A&&(!o.resizeDirection||o.resizeDirection===`horizontal`)?E:m.width,w.height=j&&(!o.resizeDirection||o.resizeDirection===`vertical`)?D:m.height,m.width=w.width,m.height=w.height),y&&g.expandParent){let e=T[0]*(w.width??0);w.x&&w.x<e&&(m.x=e,h.x-=w.x-e);let t=T[1]*(w.height??0);w.y&&w.y<t&&(m.y=t,h.y-=w.y-t)}let F=$B({width:m.width,prevWidth:S,height:m.height,prevHeight:C,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),I={...m,direction:F};p?.(e,I)===!1?(m=P.prevValues,h.x=P.startX,h.y=P.startY,v.forEach((e,t)=>{e.position=P.childNodes[t].position})):(d?.(e,I),r(w,l))}).on(`end`,e=>{f?.(e,{...m}),i?.({...m})});a.call(S)}function c(){a.on(`.drag`,null)}return{update:s,destroy:c}}function uV(e,t){return fV(e,t,pV)}function dV(e,t){return fV(e,t,mV)}function fV(e,t,n){let r=[],i=t.getNewElements(),a=new Set(i.map(e=>e.id)),o;for(let s of[e,i]){o=!o;elementsLoop:for(let e of s){if(!o&&!a.has(e.id))continue;let i=t.getForElement(e.id);if(!i.length){r.push(e),a.delete(e.id);continue}let s={...e};for(let t of i)switch(t.type){case`remove`:a.delete(e.id);continue elementsLoop;case`replace`:s={...t.item};continue;default:n(s,t)}r.push(s),a.delete(e.id)}}return r}function pV(e,t){switch(t.type){case`select`:e.selected=t.selected;break;case`position`:t.position!==void 0&&(e.position=t.position),t.dragging!==void 0&&(e.dragging=t.dragging);break;case`dimensions`:t.dimensions!==void 0&&(e.measured={...t.dimensions},(t.setAttributes===!0||t.setAttributes===`width`)&&(e.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes===`height`)&&(e.height=t.dimensions.height)),typeof t.resizing==`boolean`&&(e.resizing=t.resizing);break;case`update`:Object.assign(e,t.item);break;case`data`:e.data=t.replace?t.data:{...e.data,...t.data};break;default:return}}function mV(e,t){switch(t.type){case`select`:e.selected=t.selected;break;case`update`:Object.assign(e,t.item);break;case`data`:e.data=t.replace?t.data:{...e.data,...t.data};break;default:return}}function hV(e,t){return{id:e,type:`select`,selected:t}}function gV(e,t){return{id:e,type:`position`,position:t}}function _V(e,t){return{id:e,type:`dimensions`,dimensions:t}}function vV(e){return{id:e,type:`remove`}}function yV(e){return{id:e.id,item:e,type:`add`}}function bV(e){return{id:e.id,item:e,type:`replace`}}function xV(e){"@babel/helpers - typeof";return xV=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},xV(e)}function SV(e,t){if(xV(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(xV(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function CV(e){var t=SV(e,`string`);return xV(t)==`symbol`?t:t+``}function wV(e,t,n){return(t=CV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var TV=Symbol.iterator,EV=class{constructor(e){this.applyChanges=e,wV(this,`changeTypes`,{}),wV(this,`changeMap`,new Map),wV(this,`addChanges`,new Map)}add(e){let t=Array.isArray(e)?e:[e];for(let e of t){if(this.changeTypes[e.type]=!0,e.type===`add`){this.addChanges.set(e.id,e);continue}let t=this.changeMap.get(e.id);t?t.push(e):this.changeMap.set(e.id,[e])}}remove(e){if(e.type===`add`){this.addChanges.get(e.id)===e&&this.addChanges.delete(e.id);return}let t=this.changeMap.get(e.id);if(!t)return;let n=t.indexOf(e);n<0||(t.length===1?this.changeMap.delete(e.id):t.splice(n,1))}getForElement(e){return this.changeMap.get(e)||[]}removeForElement(e){this.changeMap.delete(e),this.addChanges.delete(e)}clear(){this.changeTypes={},this.changeMap.clear(),this.addChanges.clear()}isEmpty(){return this.changeMap.size===0&&this.addChanges.size===0}*[TV](){yield*this.addChanges.values();for(let e of this.changeMap.values())yield*e}getNewElements(){let e=[];for(let t of this.addChanges.values())e.push(t.item);return e}toArray(){let e=[];for(let t of this.addChanges.values())e.push(t);for(let t of this.changeMap.values())for(let n of t)e.push(n);return e}getByType(e){if(this.changeTypes[e]){if(e===`add`)return Array.from(this.addChanges.values());let t=[];for(let n of this.changeMap.values())for(let r of n)r.type===e&&t.push(r);return t}return[]}applyTo(e){return this.applyChanges(e,this)}},DV=class extends EV{constructor(e){super(uV),e&&this.add(e)}getForNode(e){return this.getForElement(e)}removeForNode(e){this.removeForElement(e)}getNewNodes(){return this.getNewElements()}},OV=class extends EV{constructor(e){super(dV),e&&this.add(e)}getForEdge(e){return this.getForElement(e)}removeForEdge(e){this.removeForElement(e)}getNewEdges(){return this.getNewElements()}};function kV(e,t=new Set){let n=[];for(let[,r]of e){let e=t.has(r.id);(r.selected!==void 0||e)&&r.selected!==e&&n.push(hV(r.id,e))}return n}var AV=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},jV=(e=>e?AV(e):AV),MV=e=>e;function NV(e,t=MV){let n=C.useSyncExternalStore(e.subscribe,C.useCallback(()=>t(e.getState()),[e,t]),()=>t(e.getInitialState()));return C.useDebugValue(n),n}var PV=e=>Symbol.iterator in e,FV=e=>`entries`in e,IV=(e,t)=>{let n=e instanceof Map?e:new Map(e.entries()),r=t instanceof Map?t:new Map(t.entries());if(n.size!==r.size)return!1;for(let[e,t]of n)if(!r.has(e)||!Object.is(t,r.get(e)))return!1;return!0},LV=(e,t)=>{let n=e[Symbol.iterator](),r=t[Symbol.iterator](),i=n.next(),a=r.next();for(;!i.done&&!a.done;){if(!Object.is(i.value,a.value))return!1;i=n.next(),a=r.next()}return!!i.done&&!!a.done};function RV(e,t){return Object.is(e,t)?!0:typeof e!=`object`||!e||typeof t!=`object`||!t||Object.getPrototypeOf(e)!==Object.getPrototypeOf(t)?!1:PV(e)&&PV(t)?FV(e)&&FV(t)?IV(e,t):LV(e,t):IV({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)})}var zV=(0,C.createContext)(null),BV=zV.Provider;function VV(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}let n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}function HV(e){let t=(0,eR.c)(2),n=(0,C.useRef)(void 0),r;return t[0]===e?r=t[1]:(r=t=>{let r=e(t);return VV(n.current,r)?n.current:n.current=r},t[0]=e,t[1]=r),r}var UV=e=>e,WV=lR.error001(`react`);function GV(e){let t=e===void 0?UV:e,{optionsStore:n}=KV();return NV(n,t)}function KV(){let e=(0,C.useContext)(zV);if(e===null)throw Error(WV);return e}function qV(e){let t=e===void 0?UV:e;return NV(KV().viewportStore,t)}function JV(e){let t=e===void 0?UV:e;return NV(KV().connectionStore,t)}function YV(e){let t=e===void 0?UV:e;return NV(KV().nodesStore,t)}function XV(e){let t=e===void 0?UV:e;return NV(KV().edgesStore,t)}function ZV(e){let t=e===void 0?UV:e;return NV(KV().selectionStore,t)}function QV(e,t){let n=(0,eR.c)(3),r=(0,C.useRef)(),i;return n[0]!==t||n[1]!==e?(i=n=>{let i=e(n);return r.current!==void 0&&t(r.current,i)?r.current:(r.current=i,i)},n[0]=t,n[1]=e,n[2]=i):i=n[2],i}var $V={display:`none`},eH={position:`absolute`,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0px, 0px, 0px, 0px)`,clipPath:`inset(100%)`},tH=`react-flow__node-desc`,nH=`react-flow__edge-desc`;function rH(e){let t=(0,eR.c)(3),{rfId:n}=e,r=GV(iH),i=`react-flow__aria-live-${n}`,a;return t[0]!==r||t[1]!==i?(a=(0,Y.jsx)(`div`,{id:i,"aria-live":`assertive`,"aria-atomic":`true`,style:eH,children:r}),t[0]=r,t[1]=i,t[2]=a):a=t[2],a}function iH(e){return e.ariaLiveMessage}function aH(e){let t=(0,eR.c)(13),{rfId:n,disableKeyboardA11y:r}=e,i=GV(oH),a=`${tH}-${n}`,o=r?i[`node.a11yDescription.default`]:i[`node.a11yDescription.keyboardDisabled`],s;t[0]!==a||t[1]!==o?(s=(0,Y.jsx)(`div`,{id:a,style:$V,children:o}),t[0]=a,t[1]=o,t[2]=s):s=t[2];let c=`${nH}-${n}`,l=i[`edge.a11yDescription.default`],u;t[3]!==c||t[4]!==l?(u=(0,Y.jsx)(`div`,{id:c,style:$V,children:l}),t[3]=c,t[4]=l,t[5]=u):u=t[5];let d;t[6]!==r||t[7]!==n?(d=!r&&(0,Y.jsx)(rH,{rfId:n}),t[6]=r,t[7]=n,t[8]=d):d=t[8];let f;return t[9]!==s||t[10]!==u||t[11]!==d?(f=(0,Y.jsxs)(Y.Fragment,{children:[s,u,d]}),t[9]=s,t[10]=u,t[11]=d,t[12]=f):f=t[12],f}function oH(e){return e.ariaLabelConfig}var sH=(0,C.forwardRef)((e,t)=>{let n=(0,eR.c)(15),r,i,a,o,s;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5]):({position:s,children:r,className:i,style:o,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s);let c=s===void 0?`top-left`:s,l;if(n[6]!==i||n[7]!==c){let e=`${c}`.split(`-`);l=tR([`react-flow__panel`,i,...e]),n[6]=i,n[7]=c,n[8]=l}else l=n[8];let u;return n[9]!==r||n[10]!==t||n[11]!==a||n[12]!==o||n[13]!==l?(u=(0,Y.jsx)(`div`,{className:l,style:o,ref:t,...a,children:r}),n[9]=r,n[10]=t,n[11]=a,n[12]=o,n[13]=l,n[14]=u):u=n[14],u});sH.displayName=`Panel`;var cH=`https://reactflow.dev?utm_source=attribution`;function lH(e){let t=(0,eR.c)(4),{proOptions:n,position:r}=e,i=r===void 0?`bottom-right`:r,a;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],t[0]=a):a=t[0],(0,C.useEffect)(uH,a),n?.hideAttribution)return null;let o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Y.jsx)(`a`,{href:cH,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`React Flow attribution`,children:`React Flow`}),t[1]=o):o=t[1];let s;return t[2]===i?s=t[3]:(s=(0,Y.jsx)(sH,{position:i,className:`react-flow__attribution`,"data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${cH}`,children:o}),t[2]=i,t[3]=s),s}function uH(){}var dH=e=>{let t=[];for(let[,n]of e.nodeLookup)n.selected&&t.push(n.internals.userNode);return t},fH=e=>{let t=[];for(let[,n]of e.edgeLookup)n.selected&&t.push(n);return t},pH=e=>e.id;function mH(e,t){return RV(e.map(pH),t.map(pH))}function hH(e){let t=(0,eR.c)(12),{onSelectionChange:n}=e,{optionsStore:r,nodesStore:i,edgesStore:a}=KV(),o=YV(QV(dH,mH)),s=XV(QV(fH,mH)),c;t[0]!==a||t[1]!==i||t[2]!==n||t[3]!==r?(c=()=>{let e={nodes:dH(i.getState()),edges:fH(a.getState())};n?.(e),r.getState().onSelectionChangeHandlers.forEach(t=>t(e))},t[0]=a,t[1]=i,t[2]=n,t[3]=r,t[4]=c):c=t[4];let l;return t[5]!==a||t[6]!==i||t[7]!==n||t[8]!==r||t[9]!==s||t[10]!==o?(l=[o,s,n,r,i,a],t[5]=a,t[6]=i,t[7]=n,t[8]=r,t[9]=s,t[10]=o,t[11]=l):l=t[11],(0,C.useEffect)(c,l),null}var gH=e=>e.onSelectionChangeHandlers.length>0;function _H(e){let t=(0,eR.c)(2),{onSelectionChange:n}=e,r=GV(gH);if(n||r){let e;return t[0]===n?e=t[1]:(e=(0,Y.jsx)(hH,{onSelectionChange:n}),t[0]=n,t[1]=e),e}return null}var vH=[0,0],yH={x:0,y:0,zoom:1},bH=[...`nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode`.split(`.`),`rfId`],xH={translateExtent:uR,nodeOrigin:vH,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:`nopan`,rfId:`1`};function SH(e){let{optionsStore:t}=KV(),n=(0,C.useRef)(xH);return(0,C.useEffect)(()=>{let{setDefaultNodesAndEdges:r,reset:i}=t.getState();return r(e.defaultNodes,e.defaultEdges),()=>{n.current=xH,i()}},[]),(0,C.useEffect)(()=>{let{setNodes:r,setEdges:i,setMinZoom:a,setMaxZoom:o,setTranslateExtent:s,setNodeExtent:c}=t.getState();for(let l of bH){let u=e[l];u!==n.current[l]&&e[l]!==void 0&&(l===`nodes`?r(u):l===`edges`?i(u):l===`minZoom`?a(u):l===`maxZoom`?o(u):l===`translateExtent`?s(u):l===`nodeExtent`?c(u):l===`ariaLabelConfig`?t.setState({ariaLabelConfig:cz(u)}):l===`fitView`?t.setState({fitViewQueued:u}):l===`fitViewOptions`?t.setState({fitViewOptions:u}):t.setState({[l]:u}))}n.current=e},bH.map(t=>e[t])),null}var CH=typeof document<`u`?document:null;function wH(e,t){let n=(0,eR.c)(12),r=e===void 0?null:e,i;n[0]===t?i=n[1]:(i=t===void 0?{target:CH,actInsideInputWithModifier:!0}:t,n[0]=t,n[1]=i);let a=i,[o,s]=(0,C.useState)(!1),c=(0,C.useRef)(!1),l;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=new Set([]),n[2]=l):l=n[2];let u=(0,C.useRef)(l),d;n[3]===r?d=n[4]:(d=TH(r),n[3]=r,n[4]=d);let[f,p]=d,m;n[5]!==r||n[6]!==f||n[7]!==p||n[8]!==a?(m=()=>{let e=a?.target??CH,t=a?.actInsideInputWithModifier??!0;if(r!==null){let n=e=>{if(c.current=e.ctrlKey||e.metaKey||e.shiftKey||e.altKey,(!c.current||c.current&&!t)&&xz(e))return!1;let n=DH(e.code,p);if(u.current.add(e[n]),EH(f,u.current,!1)){let t=e.composedPath?.()?.[0]||e.target,n=t?.nodeName===`BUTTON`||t?.nodeName===`A`;a.preventDefault!==!1&&(c.current||!n)&&e.preventDefault(),s(!0)}},r=e=>{let t=DH(e.code,p);EH(f,u.current,!0)?(s(!1),u.current.clear()):u.current.delete(e[t]),e.key===`Meta`&&u.current.clear(),c.current=!1},i=()=>{u.current.clear(),s(!1)};return e?.addEventListener(`keydown`,n),e?.addEventListener(`keyup`,r),window.addEventListener(`blur`,i),window.addEventListener(`contextmenu`,i),()=>{e?.removeEventListener(`keydown`,n),e?.removeEventListener(`keyup`,r),window.removeEventListener(`blur`,i),window.removeEventListener(`contextmenu`,i)}}},n[5]=r,n[6]=f,n[7]=p,n[8]=a,n[9]=m):m=n[9];let h;return n[10]===r?h=n[11]:(h=[r,s],n[10]=r,n[11]=h),(0,C.useEffect)(m,h),o}function TH(e){if(e!==null){let t=(Array.isArray(e)?e:[e]).filter(e=>typeof e==`string`).map(e=>e.replace(/\+/g,`
|
|
275
|
+
`).replace(`
|
|
276
|
+
|
|
277
|
+
`,`
|
|
278
|
+
+`).split(`
|
|
279
|
+
`));return[t,t.reduce((e,t)=>e.concat(...t),[])]}return[[],[]]}function EH(e,t,n){return e.filter(e=>n||e.length===t.size).some(e=>e.every(e=>t.has(e)))}function DH(e,t){return t.includes(e)?`code`:`key`}var OH=()=>{let e=(0,eR.c)(29),{optionsStore:t,viewportStore:n}=KV(),r,i,a;e[0]===t?(r=e[1],i=e[2],a=e[3]):(r=async e=>{let{panZoom:n}=t.getState();return n?n.scaleBy(1.2,e):!1},i=async e=>{let{panZoom:n}=t.getState();return n?n.scaleBy(.8333333333333334,e):!1},a=async(e,n)=>{let{panZoom:r}=t.getState();return r?r.scaleTo(e,n):!1},e[0]=t,e[1]=r,e[2]=i,e[3]=a);let o;e[4]===n?o=e[5]:(o=()=>n.getState().transform[2],e[4]=n,e[5]=o);let s;e[6]!==t||e[7]!==n?(s=async(e,r)=>{let{transform:i}=n.getState(),[a,o,s]=i,{panZoom:c}=t.getState();return c?c.setViewport({x:e.x??a,y:e.y??o,zoom:e.zoom??s},r):!1},e[6]=t,e[7]=n,e[8]=s):s=e[8];let c;e[9]===n?c=e[10]:(c=()=>{let[e,t,r]=n.getState().transform;return{x:e,y:t,zoom:r}},e[9]=n,e[10]=c);let l;e[11]===t?l=e[12]:(l=async(e,n,r)=>t.getState().setCenter(e,n,r),e[11]=t,e[12]=l);let u,d,f;e[13]!==t||e[14]!==n?(u=async(e,r)=>{let{width:i,height:a}=n.getState(),{minZoom:o,maxZoom:s,panZoom:c}=t.getState(),l=ez(e,i,a,o,s,r?.padding??`5%`);return c?c.setViewport(l,r):!1},d=(e,r)=>{let i=r===void 0?{}:r,{transform:a}=n.getState(),{snapGrid:o,snapToGrid:s,domNode:c}=t.getState();if(!c)return e;let{x:l,y:u}=c.getBoundingClientRect(),d={x:e.x-l,y:e.y-u},f=i.snapGrid??o;return YR(d,a,i.snapToGrid??s,f)},f=e=>{let{transform:r}=n.getState(),{domNode:i}=t.getState();if(!i)return e;let{x:a,y:o}=i.getBoundingClientRect(),s=XR(e,r);return{x:s.x+a,y:s.y+o}},e[13]=t,e[14]=n,e[15]=u,e[16]=d,e[17]=f):(u=e[15],d=e[16],f=e[17]);let p;return e[18]!==r||e[19]!==i||e[20]!==a||e[21]!==o||e[22]!==s||e[23]!==c||e[24]!==l||e[25]!==u||e[26]!==d||e[27]!==f?(p={zoomIn:r,zoomOut:i,zoomTo:a,getZoom:o,setViewport:s,getViewport:c,setCenter:l,fitBounds:u,screenToFlowPosition:d,flowToScreenPosition:f},e[18]=r,e[19]=i,e[20]=a,e[21]=o,e[22]=s,e[23]=c,e[24]=l,e[25]=u,e[26]=d,e[27]=f,e[28]=p):p=e[28],p};function kH({items:e=[],lookup:t}){let n=[],r=new Map(e.map(e=>[e.id,e]));for(let[,r]of e.entries()){let e=t.get(r.id),i=e?.internals?.userNode??e;i!==void 0&&i!==r&&n.push(bV({...r})),i===void 0&&n.push(yV({...r}))}for(let[e]of t)r.get(e)===void 0&&n.push(vV(e));return n}var AH=qR(`React Flow`,`https://reactflow.dev/`);function jH(e,t,n={}){return Nz(e,t,{...n,onError:n.onError??AH})}var MH=e=>SR(e),NH=e=>xR(e);function PH(e){return(0,C.forwardRef)(e)}var FH=typeof window<`u`?C.useLayoutEffect:C.useEffect;function IH(e){let t=(0,eR.c)(7),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=BigInt(0),t[0]=n):n=t[0];let[r,i]=(0,C.useState)(n),a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>RH(()=>i(LH)),t[1]=a):a=t[1];let[o]=(0,C.useState)(a),s;t[2]!==o||t[3]!==e?(s=()=>{let t=o.get();t.length&&(e(t),o.reset())},t[2]=o,t[3]=e,t[4]=s):s=t[4];let c;return t[5]===r?c=t[6]:(c=[r],t[5]=r,t[6]=c),FH(s,c),o}function LH(e){return e+BigInt(1)}function RH(e){let t=[];return{get:()=>t,reset:()=>{t=[]},push:n=>{t.push(n),e()}}}var zH=(0,C.createContext)(null);function BH(e){let t=(0,eR.c)(12),{children:n}=e,{optionsStore:r,nodesStore:i,edgesStore:a}=KV(),o;t[0]!==i||t[1]!==r?(o=e=>{let{nodes:t,nodeLookup:n}=i.getState(),a=t===void 0?[]:t,{onNodesChange:o,fitViewQueued:s,onNodesChangeMiddlewareMap:c,setNodes:l,hasDefaultNodes:u}=r.getState(),d=a;for(let t of e)d=typeof t==`function`?t(d):t;let f=kH({items:d,lookup:n});for(let e of c.values())f=e(f);u&&l(d),f.length>0?o?.(new DV(f)):s&&window.requestAnimationFrame(()=>{let{fitViewQueued:e,setNodes:t}=r.getState(),{nodes:n}=i.getState();e&&t(n)})},t[0]=i,t[1]=r,t[2]=o):o=t[2];let s=IH(o),c;t[3]!==a||t[4]!==r?(c=e=>{let{edges:t,edgeLookup:n}=a.getState(),i=t===void 0?[]:t,{setEdges:o,hasDefaultEdges:s,onEdgesChange:c}=r.getState(),l=i;for(let t of e)l=typeof t==`function`?t(l):t;if(s)o(l);else if(c){let e=kH({items:l,lookup:n});c?.(new OV(e))}},t[3]=a,t[4]=r,t[5]=c):c=t[5];let l=IH(c),u;t[6]!==l||t[7]!==s?(u={nodeQueue:s,edgeQueue:l},t[6]=l,t[7]=s,t[8]=u):u=t[8];let d=u,f;return t[9]!==n||t[10]!==d?(f=(0,Y.jsx)(zH.Provider,{value:d,children:n}),t[9]=n,t[10]=d,t[11]=f):f=t[11],f}function VH(){let e=(0,C.useContext)(zH);if(!e)throw Error(`useBatchContext must be used within a BatchProvider`);return e}var HH=e=>!!e.panZoom;function UH(){let e=(0,eR.c)(79),t=OH(),{optionsStore:n,viewportStore:r,nodesStore:i,edgesStore:a}=KV(),o=VH(),s=GV(HH),c;e[0]===i?c=e[1]:(c=e=>i.getState().nodeLookup.get(e),e[0]=i,e[1]=c);let l=c,u;e[2]===o?u=e[3]:(u=e=>{o.nodeQueue.push(e)},e[2]=o,e[3]=u);let d=u,f;e[4]===o?f=e[5]:(f=e=>{o.edgeQueue.push(e)},e[4]=o,e[5]=f);let p=f,m;e[6]!==i||e[7]!==n?(m=e=>{let{nodeLookup:t}=i.getState(),{nodeOrigin:r}=n.getState(),a=MH(e)?e:t.get(e.id),o=a.parentId?az(a.position,a.measured,a.parentId,t,r):a.position;return BR({...a,position:o,width:a.measured?.width??a.width,height:a.measured?.height??a.height},a.parentId?void 0:r)},e[6]=i,e[7]=n,e[8]=m):m=e[8];let h=m,g;e[9]===d?g=e[10]:(g=(e,t,n)=>{let r=n===void 0?{replace:!1}:n;d(n=>n.map(n=>{if(n.id===e){let e=typeof t==`function`?t(n):t;return r.replace&&MH(e)?e:{...n,...e}}return n}))},e[9]=d,e[10]=g);let _=g,v;e[11]===p?v=e[12]:(v=(e,t,n)=>{let r=n===void 0?{replace:!1}:n;p(n=>n.map(n=>{if(n.id===e){let e=typeof t==`function`?t(n):t;return r.replace&&NH(e)?e:{...n,...e}}return n}))},e[11]=p,e[12]=v);let y=v,b;e[13]===i?b=e[14]:(b=()=>i.getState().nodes.map(XH),e[13]=i,e[14]=b);let x;e[15]===l?x=e[16]:(x=e=>l(e)?.internals.userNode,e[15]=l,e[16]=x);let S,C;e[17]===a?(S=e[18],C=e[19]):(S=()=>{let{edges:e}=a.getState();return(e===void 0?[]:e).map(YH)},C=e=>a.getState().edgeLookup.get(e),e[17]=a,e[18]=S,e[19]=C);let w,T;e[20]===o?(w=e[21],T=e[22]):(w=e=>{let t=Array.isArray(e)?e:[e];o.nodeQueue.push(e=>[...e,...t])},T=e=>{let t=Array.isArray(e)?e:[e];o.edgeQueue.push(e=>[...e,...t])},e[20]=o,e[21]=w,e[22]=T);let E;e[23]!==a||e[24]!==i||e[25]!==r?(E=()=>{let{nodes:e}=i.getState(),t=e===void 0?[]:e,{edges:n}=a.getState(),o=n===void 0?[]:n,{transform:s}=r.getState(),[c,l,u]=s;return{nodes:t.map(JH),edges:o.map(qH),viewport:{x:c,y:l,zoom:u}}},e[23]=a,e[24]=i,e[25]=r,e[26]=E):E=e[26];let D;e[27]!==a||e[28]!==i||e[29]!==n?(D=async e=>{let{nodes:t,edges:r}=e,o=t===void 0?[]:t,s=r===void 0?[]:r,{nodes:c}=i.getState(),{edges:l}=a.getState(),{onNodesDelete:u,onEdgesDelete:d,emitNodeChanges:f,emitEdgeChanges:p,onDelete:m,onBeforeDelete:h}=n.getState(),{nodes:g,edges:_}=await jR({nodesToRemove:o,edgesToRemove:s,nodes:c,edges:l,onBeforeDelete:h}),v=_.length>0,y=g.length>0;if(v){let e=_.map(KH);d?.(_),p(e)}if(y){let e=g.map(GH);u?.(g),f(e)}return(y||v)&&m?.({nodes:g,edges:_}),{deletedNodes:g,deletedEdges:_}},e[27]=a,e[28]=i,e[29]=n,e[30]=D):D=e[30];let O;e[31]!==h||e[32]!==i||e[33]!==n?(O=(e,t,r)=>{let a=t===void 0||t,o=GR(e),s=o?e:h(e),c=r!==void 0;if(!s)return[];let{nodeOrigin:l}=n.getState();return(r||i.getState().nodes).filter(t=>{let n=i.getState().nodeLookup.get(t.id);if(n&&!o&&(t.id===e.id||!n.internals.positionAbsolute))return!1;let r=BR(c?t:n,l),u=WR(r,s);return a&&u>0||u>=r.width*r.height||u>=s.width*s.height})},e[31]=h,e[32]=i,e[33]=n,e[34]=O):O=e[34];let k;e[35]===h?k=e[36]:(k=(e,t,n)=>{let r=n===void 0||n,i=GR(e)?e:h(e);if(!i)return!1;let a=WR(i,t);return r&&a>0||a>=t.width*t.height||a>=i.width*i.height},e[35]=h,e[36]=k);let A;e[37]===_?A=e[38]:(A=(e,t,n)=>{let r=n===void 0?{replace:!1}:n;_(e,e=>{let n=typeof t==`function`?t(e):t;return r.replace?{...e,data:n}:{...e,data:{...e.data,...n}}},r)},e[37]=_,e[38]=A);let j;e[39]!==i||e[40]!==n||e[41]!==_?(j=(e,t)=>{hB(e,i.getState().nodeLookup,t,n.getState().nodeOrigin,e=>{let{nodeId:t,parentId:n,x:r,y:i}=e;_(t,{parentId:n??void 0,position:{x:r,y:i}})})},e[39]=i,e[40]=n,e[41]=_,e[42]=j):j=e[42];let M;e[43]===y?M=e[44]:(M=(e,t,n)=>{let r=n===void 0?{replace:!1}:n;y(e,e=>{let n=typeof t==`function`?t(e):t;return r.replace?{...e,data:n}:{...e,data:{...e.data,...n}}},r)},e[43]=y,e[44]=M);let N;e[45]!==i||e[46]!==n?(N=e=>{let{nodeLookup:t}=i.getState(),{nodeOrigin:r}=n.getState();return TR(e,{nodeLookup:t,nodeOrigin:r})},e[45]=i,e[46]=n,e[47]=N):N=e[47];let P;e[48]===a?P=e[49]:(P=e=>{let{type:t,handleId:n,nodeId:r}=e;return uz(a.getState().connectionLookup,{nodeId:r,type:t,handleId:n})},e[48]=a,e[49]=P);let F;e[50]!==o||e[51]!==n?(F=async e=>{let t=n.getState().fitViewResolver??sz();return n.setState({fitViewQueued:!0,fitViewOptions:e,fitViewResolver:t}),o.nodeQueue.push(WH),t.promise},e[50]=o,e[51]=n,e[52]=F):F=e[52];let I;e[53]!==l||e[54]!==p||e[55]!==d||e[56]!==w||e[57]!==T||e[58]!==E||e[59]!==D||e[60]!==O||e[61]!==k||e[62]!==A||e[63]!==j||e[64]!==M||e[65]!==N||e[66]!==P||e[67]!==F||e[68]!==b||e[69]!==x||e[70]!==S||e[71]!==C||e[72]!==y||e[73]!==_?(I={getNodes:b,getNode:x,getInternalNode:l,getEdges:S,getEdge:C,setNodes:d,setEdges:p,addNodes:w,addEdges:T,toObject:E,deleteElements:D,getIntersectingNodes:O,isNodeIntersecting:k,updateNode:_,updateNodeData:A,changeParent:j,updateEdge:y,updateEdgeData:M,getNodesBounds:N,getNodeConnections:P,fitView:F},e[53]=l,e[54]=p,e[55]=d,e[56]=w,e[57]=T,e[58]=E,e[59]=D,e[60]=O,e[61]=k,e[62]=A,e[63]=j,e[64]=M,e[65]=N,e[66]=P,e[67]=F,e[68]=b,e[69]=x,e[70]=S,e[71]=C,e[72]=y,e[73]=_,e[74]=I):I=e[74];let L=I,R;return e[75]!==L||e[76]!==t||e[77]!==s?(R={...L,...t,viewportInitialized:s},e[75]=L,e[76]=t,e[77]=s,e[78]=R):R=e[78],R}function WH(e){return[...e]}function GH(e){return vV(e.id)}function KH(e){return vV(e.id)}function qH(e){return{...e}}function JH(e){return{...e}}function YH(e){return{...e}}function XH(e){return{...e}}var ZH=e=>e.selected,QH=typeof window<`u`?window:void 0;function $H(e){let t=(0,eR.c)(15),{deleteKeyCode:n,multiSelectionKeyCode:r}=e,{optionsStore:i,nodesStore:a,edgesStore:o}=KV(),{deleteElements:s}=UH(),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={actInsideInputWithModifier:!1},t[0]=c):c=t[0];let l=wH(n,c),u;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(u={target:QH},t[1]=u):u=t[1];let d=wH(r,u),f;t[2]!==s||t[3]!==l||t[4]!==o||t[5]!==a||t[6]!==i?(f=()=>{if(l){let{edges:e}=o.getState(),{nodes:t}=a.getState();s({nodes:t.filter(ZH),edges:e.filter(ZH)}),i.getState().nodesSelectionActive&&i.setState({nodesSelectionActive:!1})}},t[2]=s,t[3]=l,t[4]=o,t[5]=a,t[6]=i,t[7]=f):f=t[7];let p;t[8]===l?p=t[9]:(p=[l],t[8]=l,t[9]=p),(0,C.useEffect)(f,p);let m;t[10]!==d||t[11]!==i?(m=()=>{i.setState({multiSelectionActive:d})},t[10]=d,t[11]=i,t[12]=m):m=t[12];let h;t[13]===d?h=t[14]:(h=[d],t[13]=d,t[14]=h),(0,C.useEffect)(m,h)}function eU(e){let t=(0,eR.c)(5),{optionsStore:n,viewportStore:r}=KV(),i;t[0]!==e.current||t[1]!==n||t[2]!==r?(i=()=>{let t=()=>{if(!e.current||!(e.current.checkVisibility?.()??!0))return!1;let t=vz(e.current);(t.height===0||t.width===0)&&n.getState().onError?.(`004`,lR.error004()),r.setState({width:t.width||500,height:t.height||500})};if(e.current){t(),window.addEventListener(`resize`,t);let n=new ResizeObserver(()=>t());return n.observe(e.current),()=>{window.removeEventListener(`resize`,t),n.disconnect()}}},t[0]=e.current,t[1]=n,t[2]=r,t[3]=i):i=t[3];let a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=[],t[4]=a):a=t[4],(0,C.useEffect)(i,a)}var tU={position:`absolute`,width:`100%`,height:`100%`,top:0,left:0};function nU(e){let t=(0,eR.c)(35),{onPaneContextMenu:n,zoomOnScroll:r,zoomOnPinch:i,panOnScroll:a,panActivationKeyPressed:o,panOnScrollSpeed:s,panOnScrollMode:c,zoomOnDoubleClick:l,panOnDrag:u,defaultViewport:d,translateExtent:f,minZoom:p,maxZoom:m,zoomActivationKeyCode:h,preventScrolling:g,children:_,noWheelClassName:v,noPanClassName:y,onViewportChange:b,isControlledViewport:x,paneDragThreshold:S}=e,w=r===void 0||r,T=i===void 0||i,E=a!==void 0&&a,D=s===void 0?.5:s,O=c===void 0?mR.Free:c,k=l===void 0||l,A=u===void 0||u,j=g===void 0||g,{optionsStore:M,viewportStore:N}=KV(),P=GV(iU),F=JV(rU),I=wH(h),L=(0,C.useRef)(null),R=(0,C.useRef)(),z;t[0]!==d||t[1]!==m||t[2]!==p||t[3]!==f?(z=()=>({minZoom:p,maxZoom:m,translateExtent:f,defaultViewport:d}),t[0]=d,t[1]=m,t[2]=p,t[3]=f,t[4]=z):z=t[4];let[B]=(0,C.useState)(z);eU(L);let V;t[5]!==x||t[6]!==b||t[7]!==N?(V=e=>{b?.({x:e[0],y:e[1],zoom:e[2]}),x||N.setState({transform:e})},t[5]=x,t[6]=b,t[7]=N,t[8]=V):V=t[8];let H=V,ee,U;t[9]!==M||t[10]!==B||t[11]!==N?(ee=()=>{if(L.current){R.current=ZB({domNode:L.current,minZoom:B.minZoom,maxZoom:B.maxZoom,translateExtent:B.translateExtent,viewport:B.defaultViewport,onDraggingChange:e=>N.setState(t=>t.paneDragging===e?t:{paneDragging:e}),onPanZoomStart:(e,t)=>{let{onViewportChangeStart:n,onMoveStart:r}=M.getState();r?.(e,t),n?.(t)},onPanZoom:(e,t)=>{let{onViewportChange:n,onMove:r}=M.getState();r?.(e,t),n?.(t)},onPanZoomEnd:(e,t)=>{let{onViewportChangeEnd:n,onMoveEnd:r}=M.getState();r?.(e,t),n?.(t)}});let{x:e,y:t,zoom:n}=R.current.getViewport();return M.setState({panZoom:R.current,domNode:L.current.closest(`.react-flow`)}),N.setState({transform:[e,t,n]}),()=>{R.current?.destroy()}}},U=[B,M,N],t[9]=M,t[10]=B,t[11]=N,t[12]=ee,t[13]=U):(ee=t[12],U=t[13]),(0,C.useEffect)(ee,U);let W,G;t[14]!==F||t[15]!==y||t[16]!==v||t[17]!==n||t[18]!==H||t[19]!==o||t[20]!==A||t[21]!==E||t[22]!==O||t[23]!==D||t[24]!==S||t[25]!==j||t[26]!==P||t[27]!==I||t[28]!==k||t[29]!==T||t[30]!==w?(W=()=>{R.current?.update({onPaneContextMenu:n,zoomOnScroll:w,zoomOnPinch:T,panOnScroll:E,panActivationKeyPressed:o,panOnScrollSpeed:D,panOnScrollMode:O,zoomOnDoubleClick:k,panOnDrag:A,zoomActivationKeyPressed:I,preventScrolling:j,noPanClassName:y,userSelectionActive:P,noWheelClassName:v,lib:`react`,onTransformChange:H,connectionInProgress:F,paneDragThreshold:S})},G=[n,w,T,E,o,D,O,k,A,I,j,y,P,v,H,F,S],t[14]=F,t[15]=y,t[16]=v,t[17]=n,t[18]=H,t[19]=o,t[20]=A,t[21]=E,t[22]=O,t[23]=D,t[24]=S,t[25]=j,t[26]=P,t[27]=I,t[28]=k,t[29]=T,t[30]=w,t[31]=W,t[32]=G):(W=t[31],G=t[32]),(0,C.useEffect)(W,G);let te;return t[33]===_?te=t[34]:(te=(0,Y.jsx)(`div`,{className:`react-flow__renderer`,ref:L,style:tU,children:_}),t[33]=_,t[34]=te),te}function rU(e){return e.connection.inProgress}function iU(e){return e.userSelectionActive}function aU(){let e=(0,eR.c)(4),t=GV(sU),n=ZV(HV(oU));if(!(t&&n))return null;let r=`translate(${n.x}px, ${n.y}px)`,i;return e[0]!==r||e[1]!==n.height||e[2]!==n.width?(i=(0,Y.jsx)(`div`,{className:`react-flow__selection react-flow__container`,style:{width:n.width,height:n.height,transform:r}}),e[0]=r,e[1]=n.height,e[2]=n.width,e[3]=i):i=e[3],i}function oU(e){return e.userSelectionRect}function sU(e){return e.userSelectionActive}var cU=(e,t,n)=>{e.target===n.current&&t?.(e)};function lU(e){let t=(0,eR.c)(79),{isSelecting:n,selectionKeyPressed:r,selectionMode:i,panOnDrag:a,autoPanOnSelection:o,paneDragThreshold:s,selectionOnDrag:c,onSelectionStart:l,onSelectionEnd:u,onPaneClick:d,onPaneContextMenu:f,onPaneScroll:p,onPaneMouseEnter:m,onPaneMouseMove:h,onPaneMouseLeave:g,children:_}=e,v=i===void 0?hR.Full:i,y=(0,C.useRef)(0),{optionsStore:b,viewportStore:x,connectionStore:S,nodesStore:w,edgesStore:T,selectionStore:E}=KV(),D=GV(gU),O=GV(hU),k=GV(mU),A=GV(pU),j=qV(fU),M=O&&(n||D),N=(0,C.useRef)(null),P=(0,C.useRef)(),F;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(F=new Set,t[0]=F):F=t[0];let I=(0,C.useRef)(F),L;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(L=new Set,t[1]=L):L=t[1];let R=(0,C.useRef)(L),z=(0,C.useRef)(!1),B=(0,C.useRef)(!1),V;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(V={x:0,y:0},t[2]=V):V=t[2];let H=(0,C.useRef)(V),ee=(0,C.useRef)(!1),U;t[3]!==S||t[4]!==d||t[5]!==b?(U=e=>{if(B.current||z.current||S.getState().connection.inProgress){B.current=!1,z.current=!1;return}let{nodesSelectionActive:t,onClickConnectEnd:n,resetSelectedElements:r}=b.getState(),{connectionClickStartHandle:i,connection:a}=S.getState();if(i){let t=structuredClone(a);delete t.inProgress,t.toPosition=t.toHandle?t.toHandle.position:null,n?.(e.nativeEvent,t),b.getState().updateConnectionClickStart(null)}d?.(e),r(),t&&b.setState({nodesSelectionActive:!1})},t[3]=S,t[4]=d,t[5]=b,t[6]=U):U=t[6];let W=U,G;t[7]!==f||t[8]!==a?(G=e=>{Array.isArray(a)&&a?.includes(2)?e.preventDefault():f?.(e)},t[7]=f,t[8]=a,t[9]=G):G=t[9];let te=G,ne;t[10]===p?ne=t[11]:(ne=p?e=>p(e):void 0,t[10]=p,t[11]=ne);let K=ne,re;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(re=e=>{B.current&&=(e.stopPropagation(),!1)},t[12]=re):re=t[12];let q=re,ie;t[13]!==n||t[14]!==b||t[15]!==a||t[16]!==r||t[17]!==c||t[18]!==E||t[19]!==x?(ie=e=>{if(e.pointerType===`touch`&&a!==!1&&!r)return;let{domNode:t}=b.getState(),{transform:i}=x.getState();if(P.current=t?.getBoundingClientRect(),!P.current)return;let o=e.target===N.current;if(!o&&e.target.closest(`.nokey`)||!n||!(c&&o||r)||e.button!==0||!e.isPrimary)return;e.target?.setPointerCapture?.(e.pointerId),B.current=!1;let{x:s,y:l}=Sz(e.nativeEvent,P.current),u=YR({x:s,y:l},i);E.setState({userSelectionRect:{width:0,height:0,startX:u.x,startY:u.y,x:s,y:l}}),o||(e.stopPropagation(),e.preventDefault())},t[13]=n,t[14]=b,t[15]=a,t[16]=r,t[17]=c,t[18]=E,t[19]=x,t[20]=ie):ie=t[20];let ae=ie,oe;t[21]!==T||t[22]!==w||t[23]!==b||t[24]!==v||t[25]!==E||t[26]!==x?(oe=function(e,t){let{userSelectionRect:n}=E.getState();if(!n)return;let{transform:r}=x.getState(),{nodeLookup:i}=w.getState(),{edgeLookup:a,connectionLookup:o}=T.getState(),{emitNodeChanges:s,emitEdgeChanges:c,defaultEdgeOptions:l}=b.getState(),u={x:n.startX,y:n.startY},{x:d,y:f}=XR(u,r),p={startX:u.x,startY:u.y,x:e<d?e:d,y:t<f?t:f,width:Math.abs(e-d),height:Math.abs(t-f)},m=I.current,h=R.current;I.current=new Set(DR(i,p,r,v===hR.Partial,!0).map(dU)),R.current=new Set;let g=l?.selectable??!0;for(let e of I.current){let t=o.get(e);if(t)for(let{edgeId:e}of t.values()){let t=a.get(e);t&&(t.selectable??g)&&R.current.add(e)}}oz(m,I.current)||s(kV(i,I.current)),oz(h,R.current)||c(kV(a,R.current)),E.setState({userSelectionRect:p}),b.setState(uU)},t[21]=T,t[22]=w,t[23]=b,t[24]=v,t[25]=E,t[26]=x,t[27]=oe):oe=t[27];let J=oe,se;t[28]!==o||t[29]!==A||t[30]!==J||t[31]!==k?(se=()=>{if(!o||!P.current)return;let[e,t]=IR(H.current,P.current,A);k({x:e,y:t}).then(e=>{if(!B.current||!e){y.current=requestAnimationFrame(se);return}let{x:t,y:n}=H.current;J(t,n),y.current=requestAnimationFrame(se)})},t[28]=o,t[29]=A,t[30]=J,t[31]=k,t[32]=se):se=t[32];let ce;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(ce=()=>{cancelAnimationFrame(y.current),y.current=0,ee.current=!1},t[33]=ce):ce=t[33];let le=ce,ue,de;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(ue=()=>()=>le(),de=[],t[34]=ue,t[35]=de):(ue=t[34],de=t[35]),(0,C.useEffect)(ue,de);let fe;t[36]!==se||t[37]!==J||t[38]!==l||t[39]!==b||t[40]!==s||t[41]!==r||t[42]!==E||t[43]!==x?(fe=e=>{let{userSelectionRect:t}=E.getState(),{transform:n}=x.getState(),{resetSelectedElements:i}=b.getState();if(!P.current||!t)return;let{x:a,y:o}=Sz(e.nativeEvent,P.current);H.current={x:a,y:o};let c=XR({x:t.startX,y:t.startY},n);if(!B.current){let t=r?0:s;if(Math.hypot(a-c.x,o-c.y)<=t)return;i(),l?.(e)}B.current=!0,ee.current||=(se(),!0),J(a,o)},t[36]=se,t[37]=J,t[38]=l,t[39]=b,t[40]=s,t[41]=r,t[42]=E,t[43]=x,t[44]=fe):fe=t[44];let pe=fe,me;t[45]!==S||t[46]!==M||t[47]!==W||t[48]!==u||t[49]!==b||t[50]!==E||t[51]!==D?(me=e=>{if(!M)e.target===N.current&&S.getState().connection.inProgress&&(z.current=!0);else if(e.button===0){if(e.target?.releasePointerCapture?.(e.pointerId),!D&&e.target===N.current&&E.getState().userSelectionRect&&W?.(e),b.setState({userSelectionActive:!1}),E.setState({userSelectionRect:null}),B.current){u?.(e);let t=I.current.size>0;b.getState().nodesSelectionActive!==t&&b.setState({nodesSelectionActive:t})}le()}},t[45]=S,t[46]=M,t[47]=W,t[48]=u,t[49]=b,t[50]=E,t[51]=D,t[52]=me):me=t[52];let he=me,ge;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(ge=e=>{e.target?.releasePointerCapture?.(e.pointerId),le()},t[53]=ge):ge=t[53];let _e=ge,ve;t[54]!==j||t[55]!==n||t[56]!==a?(ve=tR([`react-flow__pane`,{draggable:a===!0||Array.isArray(a)&&a.includes(0),dragging:j,selection:n}]),t[54]=j,t[55]=n,t[56]=a,t[57]=ve):ve=t[57];let ye;t[58]!==M||t[59]!==W?(ye=M?void 0:e=>cU(e,W,N),t[58]=M,t[59]=W,t[60]=ye):ye=t[60];let be;t[61]===te?be=t[62]:(be=e=>cU(e,te,N),t[61]=te,t[62]=be);let xe;t[63]===K?xe=t[64]:(xe=e=>cU(e,K,N),t[63]=K,t[64]=xe);let Se=M?void 0:m,Ce=M?pe:h,we=M?_e:void 0,Te=M?ae:void 0,Ee=M?q:void 0,De;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,Y.jsx)(aU,{}),t[65]=De):De=t[65];let Oe;return t[66]!==_||t[67]!==g||t[68]!==he||t[69]!==ve||t[70]!==ye||t[71]!==be||t[72]!==xe||t[73]!==Se||t[74]!==Ce||t[75]!==we||t[76]!==Te||t[77]!==Ee?(Oe=(0,Y.jsxs)(`div`,{className:ve,onClick:ye,onContextMenu:be,onWheel:xe,onPointerEnter:Se,onPointerMove:Ce,onPointerUp:he,onPointerCancel:we,onPointerDownCapture:Te,onClickCapture:Ee,onPointerLeave:g,ref:N,style:tU,children:[_,De]}),t[66]=_,t[67]=g,t[68]=he,t[69]=ve,t[70]=ye,t[71]=be,t[72]=xe,t[73]=Se,t[74]=Ce,t[75]=we,t[76]=Te,t[77]=Ee,t[78]=Oe):Oe=t[78],Oe}function uU(e){return e.userSelectionActive&&!e.nodesSelectionActive?e:{userSelectionActive:!0,nodesSelectionActive:!1}}function dU(e){return e.id}function fU(e){return e.paneDragging}function pU(e){return e.autoPanSpeed}function mU(e){return e.panBy}function hU(e){return e.elementsSelectable}function gU(e){return e.userSelectionActive}function _U({id:e,optionsStore:t,nodesStore:n,unselect:r=!1,nodeRef:i}){let{addSelectedNodes:a,unselectNodesAndEdges:o,multiSelectionActive:s,onError:c,nodesSelectionActive:l}=t.getState(),{nodeLookup:u}=n.getState(),d=u.get(e);d?(l&&t.setState({nodesSelectionActive:!1}),d.selected?(r||d.selected&&s)&&(o({nodes:[d],edges:[]}),requestAnimationFrame(()=>i?.current?.blur())):a([e])):c?.(`012`,lR.error012(e))}function vU(e){let t=(0,eR.c)(16),{nodeRef:n,disabled:r,noDragClassName:i,handleSelector:a,nodeId:o,isSelectable:s}=e,c=r!==void 0&&r,{optionsStore:l,viewportStore:u,nodesStore:d,edgesStore:f}=KV(),[p,m]=(0,C.useState)(!1),h=(0,C.useRef)(),g,_;t[0]!==c||t[1]!==f||t[2]!==n||t[3]!==d||t[4]!==l||t[5]!==u?(g=()=>{if(!c)return h.current=xB({getStoreItems:()=>{let{nodes:e,nodeLookup:t}=d.getState(),{edges:n}=f.getState(),{transform:r}=u.getState();return{...l.getState(),nodes:e,nodeLookup:t,edges:n,transform:r}},onNodeMouseDown:e=>{_U({id:e,optionsStore:l,nodesStore:d,nodeRef:n})},onDragStart:()=>{m(!0)},onDragStop:()=>{m(!1)}}),()=>{h.current?.destroy(),h.current=void 0}},_=[c,l,u,d,f,n],t[0]=c,t[1]=f,t[2]=n,t[3]=d,t[4]=l,t[5]=u,t[6]=g,t[7]=_):(g=t[6],_=t[7]),(0,C.useEffect)(g,_);let v,y;return t[8]!==c||t[9]!==a||t[10]!==s||t[11]!==i||t[12]!==o||t[13]!==n?(v=()=>{!c&&n.current&&h.current&&h.current.update({noDragClassName:i,handleSelector:a,domNode:n.current,isSelectable:s,nodeId:o})},y=[i,a,c,s,n,o],t[8]=c,t[9]=a,t[10]=s,t[11]=i,t[12]=o,t[13]=n,t[14]=v,t[15]=y):(v=t[14],y=t[15]),(0,C.useEffect)(v,y),p}var yU=e=>t=>t.selected&&(t.draggable||e&&t.draggable===void 0);function bU(){let e=(0,eR.c)(3),{optionsStore:t,nodesStore:n}=KV(),r;return e[0]!==n||e[1]!==t?(r=e=>{let{nodeExtent:r,snapToGrid:i,snapGrid:a,nodesDraggable:o,onError:s,updateNodePositions:c,nodeOrigin:l}=t.getState(),{nodeLookup:u}=n.getState(),d=new Map,f=yU(o),p=i?a[0]:5,m=i?a[1]:5,h=e.direction.x*p*e.factor,g=e.direction.y*m*e.factor;for(let[,e]of u){if(!f(e))continue;let t={x:e.internals.positionAbsolute.x+h,y:e.internals.positionAbsolute.y+g};i&&(t=JR(t,a));let{position:n,positionAbsolute:o}=AR({nodeId:e.id,nextPosition:t,nodeLookup:u,nodeExtent:r,nodeOrigin:l,onError:s});e.position=n,e.internals.positionAbsolute=o,d.set(e.id,e)}c(d)},e[0]=n,e[1]=t,e[2]=r):r=e[2],r}var xU=(0,C.createContext)(null),SU=xU.Provider;xU.Consumer;var CU=()=>(0,C.useContext)(xU),wU=(0,C.createContext)(null);function TU(e){let t=(0,eR.c)(3),{children:n}=e,r=GV(HV(EU)),i;return t[0]!==n||t[1]!==r?(i=(0,Y.jsx)(wU.Provider,{value:r,children:n}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function EU(e){return{connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId,connectionMode:e.connectionMode}}function DU(){let e=(0,C.useContext)(wU);if(!e)throw Error(`useHandleConfig must be used within a HandleConfigProvider`);return e}function OU(e){let t=(0,eR.c)(2),n;return t[0]===e?n=t[1]:(n=t=>{let{connection:n}=t;return e?e(n):n},t[0]=e,t[1]=n),JV(HV(n))}function kU(e){let t=(0,eR.c)(5),{optionsStore:n,connectionStore:r}=KV(),i;t[0]!==e||t[1]!==n?(i=t=>n.getState().pubSub.subscribeToConnectionForHandle(e,t),t[0]=e,t[1]=n,t[2]=i):i=t[2];let a=i,o;t[3]===r?o=t[4]:(o=()=>r.getState(),t[3]=r,t[4]=o);let s=o;return(0,C.useSyncExternalStore)(a,s,s)}var AU={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProgress:!1,clickConnectionInProgress:!1,valid:!1},jU=(e,t,n,r,i)=>{let{connectionClickStartHandle:a,connection:o}=e,{fromHandle:s,toHandle:c,isValid:l}=o;if(!s&&!a)return AU;let u=c?.nodeId===t&&c?.id===n&&c?.type===r;return{connectingFrom:s?.nodeId===t&&s?.id===n&&s?.type===r,connectingTo:u,clickConnecting:a?.nodeId===t&&a?.id===n&&a?.type===r,isPossibleEndHandle:i===pR.Strict?s?.type!==r:t!==s?.nodeId||n!==s?.id,connectionInProgress:o.inProgress,clickConnectionInProgress:!!a,valid:u&&l}};function MU(e,t){let n=(0,eR.c)(85),r,i,a,o,s,c,l,u,d,f,p,m,h;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],d=n[9],f=n[10],p=n[11],m=n[12],h=n[13]):({type:d,position:f,isValidConnection:o,isConnectable:p,isConnectableStart:m,isConnectableEnd:h,id:a,onConnect:s,children:r,className:i,onMouseDown:c,onTouchStart:l,...u}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u,n[9]=d,n[10]=f,n[11]=p,n[12]=m,n[13]=h);let g=d===void 0?`source`:d,_=f===void 0?yR.Top:f,v=p===void 0||p,y=m===void 0||m,b=h===void 0||h,x=a||null,S=g===`target`,{optionsStore:C,viewportStore:w,connectionStore:T,nodesStore:E,edgesStore:D}=KV(),{connectOnClick:O,noPanClassName:k,rfId:A,connectionMode:j}=DU(),M=CU();M||C.getState().onError?.(`010`,lR.error010());let N=M||``,P;n[14]!==x||n[15]!==N||n[16]!==g?(P={nodeId:N,type:g,id:x},n[14]=x,n[15]=N,n[16]=g,n[17]=P):P=n[17];let F=kU(P),I,L,R,z,B,V,H;if(n[18]!==i||n[19]!==F||n[20]!==j||n[21]!==T||n[22]!==D||n[23]!==x||n[24]!==v||n[25]!==b||n[26]!==y||n[27]!==S||n[28]!==o||n[29]!==k||n[30]!==M||n[31]!==E||n[32]!==s||n[33]!==c||n[34]!==l||n[35]!==C||n[36]!==_||n[37]!==A||n[38]!==g||n[39]!==w){let e=jU(F,M,x,g,j),t;n[47]!==D||n[48]!==s||n[49]!==C?(t=e=>{let{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=C.getState(),i={...t,...e};if(r){let{edges:e}=D.getState(),{setEdges:t,onError:n}=C.getState();t(jH(i,e,{onError:n}))}n?.(i),s?.(i)},n[47]=D,n[48]=s,n[49]=C,n[50]=t):t=n[50];let r=t,a;n[51]!==T||n[52]!==x||n[53]!==y||n[54]!==S||n[55]!==o||n[56]!==M||n[57]!==E||n[58]!==r||n[59]!==c||n[60]!==l||n[61]!==C||n[62]!==w?(a=e=>{if(!M)return;let t=hz(e.nativeEvent);if(y&&(t&&e.button===0||!t)){let t=C.getState();jB.onPointerDown(e.nativeEvent,{handleDomNode:e.currentTarget,autoPanOnConnect:t.autoPanOnConnect,connectionMode:t.connectionMode,connectionRadius:t.connectionRadius,domNode:t.domNode,nodeLookup:E.getState().nodeLookup,lib:`react`,isTarget:S,handleId:x,nodeId:M,flowId:t.rfId,panBy:t.panBy,cancelConnection:t.cancelConnection,onConnectStart:t.onConnectStart,onConnectEnd:(...e)=>{let t=e;return C.getState().onConnectEnd?.(...t)},updateConnection:t.updateConnection,onConnect:r,isValidConnection:o||((...e)=>{let t=e;return C.getState().isValidConnection?.(...t)??!0}),getTransform:()=>w.getState().transform,getFromHandle:()=>T.getState().connection.fromHandle,autoPanSpeed:t.autoPanSpeed,dragThreshold:t.connectionDragThreshold})}t?c?.(e):l?.(e)},n[51]=T,n[52]=x,n[53]=y,n[54]=S,n[55]=o,n[56]=M,n[57]=E,n[58]=r,n[59]=c,n[60]=l,n[61]=C,n[62]=w,n[63]=a):a=n[63],L=a;let u;n[64]!==T||n[65]!==x||n[66]!==y||n[67]!==o||n[68]!==M||n[69]!==E||n[70]!==r||n[71]!==C||n[72]!==g?(u=e=>{let{onClickConnectStart:t,onClickConnectEnd:n,updateConnectionClickStart:i,connectionMode:a,isValidConnection:s,rfId:c}=C.getState(),{connectionClickStartHandle:l,connection:u}=T.getState(),{nodeLookup:d}=E.getState();if(!M||!l&&!y)return;if(!l){t?.(e.nativeEvent,{nodeId:M,handleId:x,handleType:g}),i({nodeId:M,type:g,id:x});return}let f=yz(e.target),p=o||s,{connection:m,isValid:h}=jB.isValid(e.nativeEvent,{handle:{nodeId:M,id:x,type:g},connectionMode:a,fromNodeId:l.nodeId,fromHandleId:l.id||null,fromType:l.type,isValidConnection:p,flowId:c,doc:f,lib:`react`,nodeLookup:d});h&&m&&r(m);let _=structuredClone(u);delete _.inProgress,_.toPosition=_.toHandle?_.toHandle.position:null,n?.(e,_),i(null)},n[64]=T,n[65]=x,n[66]=y,n[67]=o,n[68]=M,n[69]=E,n[70]=r,n[71]=C,n[72]=g,n[73]=u):u=n[73],I=u,V=x,H=M,R=_,z=`${A}-${M}-${x}-${g}`,B=tR([`react-flow__handle`,`react-flow__handle-${_}`,`nodrag`,k,i,{source:!S,target:S,connectable:v,connectablestart:y,connectableend:b,clickconnecting:e.clickConnecting,connectingfrom:e.connectingFrom,connectingto:e.connectingTo,valid:e.valid,connectionindicator:v&&(!e.connectionInProgress||e.isPossibleEndHandle)&&(e.connectionInProgress||e.clickConnecting?b:y)}]),n[18]=i,n[19]=F,n[20]=j,n[21]=T,n[22]=D,n[23]=x,n[24]=v,n[25]=b,n[26]=y,n[27]=S,n[28]=o,n[29]=k,n[30]=M,n[31]=E,n[32]=s,n[33]=c,n[34]=l,n[35]=C,n[36]=_,n[37]=A,n[38]=g,n[39]=w,n[40]=I,n[41]=L,n[42]=R,n[43]=z,n[44]=B,n[45]=V,n[46]=H}else I=n[40],L=n[41],R=n[42],z=n[43],B=n[44],V=n[45],H=n[46];let ee=O?I:void 0,U;return n[74]!==r||n[75]!==L||n[76]!==t||n[77]!==u||n[78]!==R||n[79]!==z||n[80]!==B||n[81]!==ee||n[82]!==V||n[83]!==H?(U=(0,Y.jsx)(`div`,{"data-handleid":V,"data-nodeid":H,"data-handlepos":R,"data-id":z,className:B,onMouseDown:L,onTouchStart:L,onClick:ee,ref:t,...u,children:r}),n[74]=r,n[75]=L,n[76]=t,n[77]=u,n[78]=R,n[79]=z,n[80]=B,n[81]=ee,n[82]=V,n[83]=H,n[84]=U):U=n[84],U}var NU=(0,C.memo)(PH(MU));function PU(e){let t=(0,eR.c)(6),{data:n,isConnectable:r,sourcePosition:i}=e,a=i===void 0?yR.Bottom:i,o=n?.label,s;t[0]!==r||t[1]!==a?(s=(0,Y.jsx)(NU,{type:`source`,position:a,isConnectable:r}),t[0]=r,t[1]=a,t[2]=s):s=t[2];let c;return t[3]!==o||t[4]!==s?(c=(0,Y.jsxs)(Y.Fragment,{children:[o,s]}),t[3]=o,t[4]=s,t[5]=c):c=t[5],c}function FU(e){let t=(0,eR.c)(10),{data:n,isConnectable:r,targetPosition:i,sourcePosition:a}=e,o=i===void 0?yR.Top:i,s=a===void 0?yR.Bottom:a,c;t[0]!==r||t[1]!==o?(c=(0,Y.jsx)(NU,{type:`target`,position:o,isConnectable:r}),t[0]=r,t[1]=o,t[2]=c):c=t[2];let l=n?.label,u;t[3]!==r||t[4]!==s?(u=(0,Y.jsx)(NU,{type:`source`,position:s,isConnectable:r}),t[3]=r,t[4]=s,t[5]=u):u=t[5];let d;return t[6]!==c||t[7]!==l||t[8]!==u?(d=(0,Y.jsxs)(Y.Fragment,{children:[c,l,u]}),t[6]=c,t[7]=l,t[8]=u,t[9]=d):d=t[9],d}function IU(){return null}function LU(e){let t=(0,eR.c)(6),{data:n,isConnectable:r,targetPosition:i}=e,a=i===void 0?yR.Top:i,o;t[0]!==r||t[1]!==a?(o=(0,Y.jsx)(NU,{type:`target`,position:a,isConnectable:r}),t[0]=r,t[1]=a,t[2]=o):o=t[2];let s=n?.label,c;return t[3]!==o||t[4]!==s?(c=(0,Y.jsxs)(Y.Fragment,{children:[o,s]}),t[3]=o,t[4]=s,t[5]=c):c=t[5],c}var RU={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},zU={input:PU,default:FU,output:LU,group:IU};function BU(e){return e.internals.handleBounds===void 0?{width:e.width??e.initialWidth??e.style?.width,height:e.height??e.initialHeight??e.style?.height}:{width:e.width??e.style?.width,height:e.height??e.style?.height}}var VU=e=>{let{width:t,height:n,x:r,y:i}=ER(e.nodeLookup,{filter:e=>!!e.selected});return{width:KR(t)?t:null,height:KR(n)?n:null,x:r,y:i}};function HU(e){let t=(0,eR.c)(26),{onSelectionContextMenu:n,noPanClassName:r,disableKeyboardA11y:i}=e,{nodesStore:a}=KV(),{width:o,height:s,x:c,y:l}=YV(HV(VU)),u=GV(WU),{transform:d}=qV(),f=`translate(${d[0]}px,${d[1]}px) scale(${d[2]}) translate(${c}px,${l}px)`,p=bU(),m=(0,C.useRef)(null),h,g;t[0]===i?(h=t[1],g=t[2]):(h=()=>{i||m.current?.focus({preventScroll:!0})},g=[i],t[0]=i,t[1]=h,t[2]=g),(0,C.useEffect)(h,g);let _=!u&&o!==null&&s!==null,v=!_,y;if(t[3]===v?y=t[4]:(y={nodeRef:m,disabled:v},t[3]=v,t[4]=y),vU(y),!_)return null;let b;t[5]!==a||t[6]!==n?(b=n?e=>{let t=a.getState().nodes.filter(UU);n(e,t)}:void 0,t[5]=a,t[6]=n,t[7]=b):b=t[7];let x=b,S;t[8]===p?S=t[9]:(S=e=>{Object.prototype.hasOwnProperty.call(RU,e.key)&&(e.preventDefault(),p({direction:RU[e.key],factor:e.shiftKey?4:1}))},t[8]=p,t[9]=S);let w=S,T;t[10]===r?T=t[11]:(T=tR([`react-flow__nodesselection`,`react-flow__container`,r]),t[10]=r,t[11]=T);let E;t[12]===f?E=t[13]:(E={transform:f},t[12]=f,t[13]=E);let D=i?void 0:-1,O=i?void 0:w,k;t[14]!==s||t[15]!==o?(k={width:o,height:s},t[14]=s,t[15]=o,t[16]=k):k=t[16];let A;t[17]!==x||t[18]!==O||t[19]!==k||t[20]!==D?(A=(0,Y.jsx)(`div`,{ref:m,className:`react-flow__nodesselection-rect`,onContextMenu:x,tabIndex:D,onKeyDown:O,style:k}),t[17]=x,t[18]=O,t[19]=k,t[20]=D,t[21]=A):A=t[21];let j;return t[22]!==A||t[23]!==T||t[24]!==E?(j=(0,Y.jsx)(`div`,{className:T,style:E,children:A}),t[22]=A,t[23]=T,t[24]=E,t[25]=j):j=t[25],j}function UU(e){return e.selected}function WU(e){return e.userSelectionActive}var GU=typeof window<`u`?window:void 0;function KU(e){let t=(0,eR.c)(54),{children:n,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:a,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:c,paneDragThreshold:l,deleteKeyCode:u,selectionKeyCode:d,selectionOnDrag:f,selectionMode:p,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:g,panActivationKeyCode:_,zoomActivationKeyCode:v,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:x,panOnScroll:S,panOnScrollSpeed:C,panOnScrollMode:w,zoomOnDoubleClick:T,panOnDrag:E,autoPanOnSelection:D,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,preventScrolling:M,onSelectionContextMenu:N,noWheelClassName:P,noPanClassName:F,disableKeyboardA11y:I,onViewportChange:L,isControlledViewport:R}=e,z=GV(JU),B=GV(qU),V;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(V={target:GU},t[0]=V):V=t[0];let H=wH(d,V),ee;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(ee={target:GU},t[1]=ee):ee=t[1];let U=wH(_,ee),W=U||E,G=U||S,te;t[2]!==W||t[3]!==f?(te=f&&!IB(W??!0),t[2]=W,t[3]=f,t[4]=te):te=t[4];let ne=te,K=H||B||ne,re;t[5]!==u||t[6]!==g?(re={deleteKeyCode:u,multiSelectionKeyCode:g},t[5]=u,t[6]=g,t[7]=re):re=t[7],$H(re);let q=!H&&W,ie=!!K,ae;t[8]!==I||t[9]!==F||t[10]!==z||t[11]!==N?(ae=z&&(0,Y.jsx)(HU,{onSelectionContextMenu:N,noPanClassName:F,disableKeyboardA11y:I}),t[8]=I,t[9]=F,t[10]=z,t[11]=N,t[12]=ae):ae=t[12];let oe;t[13]!==ne||t[14]!==D||t[15]!==n||t[16]!==r||t[17]!==s||t[18]!==i||t[19]!==o||t[20]!==a||t[21]!==c||t[22]!==h||t[23]!==m||t[24]!==W||t[25]!==l||t[26]!==H||t[27]!==p||t[28]!==ie||t[29]!==ae?(oe=(0,Y.jsxs)(lU,{onSelectionStart:m,onSelectionEnd:h,onPaneClick:r,onPaneMouseEnter:i,onPaneMouseMove:a,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:c,panOnDrag:W,autoPanOnSelection:D,isSelecting:ie,selectionMode:p,selectionKeyPressed:H,paneDragThreshold:l,selectionOnDrag:ne,children:[n,ae]}),t[13]=ne,t[14]=D,t[15]=n,t[16]=r,t[17]=s,t[18]=i,t[19]=o,t[20]=a,t[21]=c,t[22]=h,t[23]=m,t[24]=W,t[25]=l,t[26]=H,t[27]=p,t[28]=ie,t[29]=ae,t[30]=oe):oe=t[30];let J;return t[31]!==O||t[32]!==y||t[33]!==R||t[34]!==j||t[35]!==A||t[36]!==F||t[37]!==P||t[38]!==s||t[39]!==L||t[40]!==U||t[41]!==G||t[42]!==w||t[43]!==C||t[44]!==l||t[45]!==M||t[46]!==q||t[47]!==oe||t[48]!==k||t[49]!==v||t[50]!==T||t[51]!==x||t[52]!==b?(J=(0,Y.jsx)(nU,{onPaneContextMenu:s,elementsSelectable:y,zoomOnScroll:b,zoomOnPinch:x,panOnScroll:G,panActivationKeyPressed:U,panOnScrollSpeed:C,panOnScrollMode:w,zoomOnDoubleClick:T,panOnDrag:q,defaultViewport:O,translateExtent:k,minZoom:A,maxZoom:j,zoomActivationKeyCode:v,preventScrolling:M,noWheelClassName:P,noPanClassName:F,onViewportChange:L,isControlledViewport:R,paneDragThreshold:l,children:oe}),t[31]=O,t[32]=y,t[33]=R,t[34]=j,t[35]=A,t[36]=F,t[37]=P,t[38]=s,t[39]=L,t[40]=U,t[41]=G,t[42]=w,t[43]=C,t[44]=l,t[45]=M,t[46]=q,t[47]=oe,t[48]=k,t[49]=v,t[50]=T,t[51]=x,t[52]=b,t[53]=J):J=t[53],J}function qU(e){return e.userSelectionActive}function JU(e){return e.nodesSelectionActive}KU.displayName=`FlowRenderer`;var YU=KU,XU=(e,t)=>n=>e?DR(n.nodeLookup,{x:0,y:0,width:t.width,height:t.height},t.transform,!0).map(e=>e.id):Array.from(n.nodeLookup.keys());function ZU(e){let t=(0,eR.c)(5),n;t[0]===e?n=t[1]:(n=t=>e?t:void 0,t[0]=e,t[1]=n);let r=qV(n),i;return t[2]!==e||t[3]!==r?(i=XU(e,r),t[2]=e,t[3]=r,t[4]=i):i=t[4],YV(HV(i))}function QU(){let e=(0,eR.c)(5),{optionsStore:t}=KV(),n;e[0]===t?n=e[1]:(n=()=>typeof ResizeObserver>`u`?null:new ResizeObserver(e=>{let n=new Map;e.forEach(e=>{let t=e.target.getAttribute(`data-id`);n.set(t,{id:t,nodeElement:e.target,force:!0})}),t.getState().updateNodeInternals(n)}),e[0]=t,e[1]=n);let[r]=(0,C.useState)(n),i,a;return e[2]===r?(i=e[3],a=e[4]):(i=()=>()=>{r?.disconnect()},a=[r],e[2]=r,e[3]=i,e[4]=a),(0,C.useEffect)(i,a),r}function $U(e){let t=(0,eR.c)(6),{optionsStore:n,nodesStore:r}=KV(),i;t[0]!==e||t[1]!==n?(i=t=>n.getState().pubSub.subscribeToNode(e,t),t[0]=e,t[1]=n,t[2]=i):i=t[2];let a=i,o;t[3]!==e||t[4]!==r?(o=()=>r.getState().nodeLookup.get(e),t[3]=e,t[4]=r,t[5]=o):o=t[5];let s=o;return(0,C.useSyncExternalStore)(a,s,s)}function eW(e){let t=(0,eR.c)(23),{node:n,nodeType:r,hasDimensions:i,resizeObserver:a}=e,{optionsStore:o}=KV(),s=(0,C.useRef)(null),c=(0,C.useRef)(null),l=(0,C.useRef)(n.sourcePosition),u=(0,C.useRef)(n.targetPosition),d=(0,C.useRef)(r),f=i&&!!n.internals.handleBounds,p;t[0]!==f||t[1]!==n.hidden||t[2]!==a?(p=()=>{!s.current||n.hidden||f&&c.current===s.current||(c.current&&a?.unobserve(c.current),a?.observe(s.current),c.current=s.current)},t[0]=f,t[1]=n.hidden,t[2]=a,t[3]=p):p=t[3];let m;t[4]!==f||t[5]!==n.hidden||t[6]!==n.measured.height||t[7]!==n.measured.width?(m=[f,n.hidden,n.measured.width,n.measured.height],t[4]=f,t[5]=n.hidden,t[6]=n.measured.height,t[7]=n.measured.width,t[8]=m):m=t[8],(0,C.useEffect)(p,m);let h;t[9]===a?h=t[10]:(h=()=>()=>{c.current&&=(a?.unobserve(c.current),null)},t[9]=a,t[10]=h);let g;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(g=[],t[11]=g):g=t[11],(0,C.useEffect)(h,g);let _;t[12]!==n.id||t[13]!==n.sourcePosition||t[14]!==n.targetPosition||t[15]!==r||t[16]!==o?(_=()=>{if(s.current){let e=d.current!==r,t=l.current!==n.sourcePosition,i=u.current!==n.targetPosition;(e||t||i)&&(d.current=r,l.current=n.sourcePosition,u.current=n.targetPosition,o.getState().updateNodeInternals(new Map([[n.id,{id:n.id,nodeElement:s.current,force:!0}]])))}},t[12]=n.id,t[13]=n.sourcePosition,t[14]=n.targetPosition,t[15]=r,t[16]=o,t[17]=_):_=t[17];let v;return t[18]!==n.id||t[19]!==n.sourcePosition||t[20]!==n.targetPosition||t[21]!==r?(v=[n.id,r,n.sourcePosition,n.targetPosition],t[18]=n.id,t[19]=n.sourcePosition,t[20]=n.targetPosition,t[21]=r,t[22]=v):v=t[22],(0,C.useEffect)(_,v),s}function tW(e){let t=(0,eR.c)(119),{id:n,onClick:r,onMouseEnter:i,onMouseMove:a,onMouseLeave:o,onContextMenu:s,onDoubleClick:c,nodesDraggable:l,elementsSelectable:u,nodesConnectable:d,nodesFocusable:f,resizeObserver:p,noDragClassName:m,noPanClassName:h,disableKeyboardA11y:g,rfId:_,nodeTypes:v,onError:y}=e,b=$U(n),{internals:x}=b,S=b.type||`default`,C=v?.[S]||zU[S];C===void 0&&(y?.(`003`,lR.error003(S)),S=`default`,C=v?.default||zU.default);let w=!!(b.draggable||l&&b.draggable===void 0),T=!!(b.selectable||u&&b.selectable===void 0),E=!!(b.connectable||d&&b.connectable===void 0),D=!!(b.focusable||f&&b.focusable===void 0),{optionsStore:O,viewportStore:k,nodesStore:A}=KV(),j;t[0]===b?j=t[1]:(j=iz(b),t[0]=b,t[1]=j);let M=j,N;t[2]!==M||t[3]!==b||t[4]!==S||t[5]!==p?(N={node:b,nodeType:S,hasDimensions:M,resizeObserver:p},t[2]=M,t[3]=b,t[4]=S,t[5]=p,t[6]=N):N=t[6];let P=eW(N),F=b.hidden||!w,I;t[7]!==n||t[8]!==T||t[9]!==m||t[10]!==b.dragHandle||t[11]!==P||t[12]!==F?(I={nodeRef:P,disabled:F,noDragClassName:m,handleSelector:b.dragHandle,nodeId:n,isSelectable:T},t[7]=n,t[8]=T,t[9]=m,t[10]=b.dragHandle,t[11]=P,t[12]=F,t[13]=I):I=t[13];let L=vU(I),R=bU();if(b.hidden)return null;let z;t[14]===b?z=t[15]:(z=rz(b),t[14]=b,t[15]=z);let B=z,V;t[16]===b?V=t[17]:(V=BU(b),t[16]=b,t[17]=V);let H=V,ee=T||w||r||i||a||o,U;t[18]!==x.userNode||t[19]!==i?(U=i?e=>i(e,{...x.userNode}):void 0,t[18]=x.userNode,t[19]=i,t[20]=U):U=t[20];let W=U,G;t[21]!==x.userNode||t[22]!==a?(G=a?e=>a(e,{...x.userNode}):void 0,t[21]=x.userNode,t[22]=a,t[23]=G):G=t[23];let te=G,ne;t[24]!==x.userNode||t[25]!==o?(ne=o?e=>o(e,{...x.userNode}):void 0,t[24]=x.userNode,t[25]=o,t[26]=ne):ne=t[26];let K=ne,re;t[27]!==x.userNode||t[28]!==s?(re=s?e=>s(e,{...x.userNode}):void 0,t[27]=x.userNode,t[28]=s,t[29]=re):re=t[29];let q=re,ie;t[30]!==x.userNode||t[31]!==c?(ie=c?e=>c(e,{...x.userNode}):void 0,t[30]=x.userNode,t[31]=c,t[32]=ie):ie=t[32];let ae=ie,oe;t[33]!==n||t[34]!==x.userNode||t[35]!==w||t[36]!==T||t[37]!==P||t[38]!==A||t[39]!==r||t[40]!==O?(oe=e=>{let{selectNodesOnDrag:t,nodeDragThreshold:i}=O.getState();T&&(!t||!w||i>0)&&_U({id:n,optionsStore:O,nodesStore:A,nodeRef:P}),r&&r(e,{...x.userNode})},t[33]=n,t[34]=x.userNode,t[35]=w,t[36]=T,t[37]=P,t[38]=A,t[39]=r,t[40]=O,t[41]=oe):oe=t[41];let J=oe,se;t[42]!==g||t[43]!==n||t[44]!==x.positionAbsolute||t[45]!==w||t[46]!==T||t[47]!==R||t[48]!==b.selected||t[49]!==P||t[50]!==A||t[51]!==O?(se=e=>{if(!(xz(e.nativeEvent)||g)){if(dR.includes(e.key)&&T){let t=e.key===`Escape`;_U({id:n,optionsStore:O,nodesStore:A,unselect:t,nodeRef:P})}else if(w&&b.selected&&Object.prototype.hasOwnProperty.call(RU,e.key)){e.preventDefault(),R({direction:RU[e.key],factor:e.shiftKey?4:1});let{ariaLabelConfig:t}=O.getState(),{nodeLookup:r}=A.getState(),i=r.get(n)?.internals.positionAbsolute??x.positionAbsolute;O.setState({ariaLiveMessage:t[`node.a11yDescription.ariaLiveMessage`]({direction:e.key.replace(`Arrow`,``).toLowerCase(),x:~~i.x,y:~~i.y})})}}},t[42]=g,t[43]=n,t[44]=x.positionAbsolute,t[45]=w,t[46]=T,t[47]=R,t[48]=b.selected,t[49]=P,t[50]=A,t[51]=O,t[52]=se):se=t[52];let ce=se,le;t[53]!==g||t[54]!==n||t[55]!==b||t[56]!==B||t[57]!==P||t[58]!==O||t[59]!==k?(le=()=>{if(g||!P.current?.matches(`:focus-visible`))return;let{transform:e,width:t,height:r}=k.getState(),{autoPanOnNodeFocus:i,setCenter:a}=O.getState();i&&(DR(new Map([[n,b]]),{x:0,y:0,width:t,height:r},e,!0).length>0||a(b.position.x+B.width/2,b.position.y+B.height/2,{zoom:e[2]}))},t[53]=g,t[54]=n,t[55]=b,t[56]=B,t[57]=P,t[58]=O,t[59]=k,t[60]=le):le=t[60];let ue=le,de=`react-flow__node-${S}`,fe;t[61]!==L||t[62]!==x.isParent||t[63]!==w||t[64]!==T||t[65]!==h||t[66]!==b.className||t[67]!==b.selected||t[68]!==de?(fe=tR([`react-flow__node`,de,{[h]:w},b.className,{selected:b.selected,selectable:T,parent:x.isParent,draggable:w,dragging:L}]),t[61]=L,t[62]=x.isParent,t[63]=w,t[64]=T,t[65]=h,t[66]=b.className,t[67]=b.selected,t[68]=de,t[69]=fe):fe=t[69];let pe=`translate(${x.positionAbsolute.x}px,${x.positionAbsolute.y}px)`,me=ee?`all`:`none`,he=M?`visible`:`hidden`,ge;t[70]!==H||t[71]!==x.z||t[72]!==b.style||t[73]!==pe||t[74]!==me||t[75]!==he?(ge={zIndex:x.z,transform:pe,pointerEvents:me,visibility:he,...b.style,...H},t[70]=H,t[71]=x.z,t[72]=b.style,t[73]=pe,t[74]=me,t[75]=he,t[76]=ge):ge=t[76];let _e=`rf__node-${n}`,ve=D?ce:void 0,ye=D?0:void 0,be=D?ue:void 0,xe=b.ariaRole??(D?`group`:void 0),Se=g?void 0:`${tH}-${_}`,Ce=b.selected??!1,we=b.deletable??!0,Te;t[77]!==C||t[78]!==L||t[79]!==n||t[80]!==x.positionAbsolute.x||t[81]!==x.positionAbsolute.y||t[82]!==x.z||t[83]!==E||t[84]!==w||t[85]!==T||t[86]!==b.data||t[87]!==b.dragHandle||t[88]!==b.parentId||t[89]!==b.sourcePosition||t[90]!==b.targetPosition||t[91]!==B||t[92]!==S||t[93]!==Ce||t[94]!==we?(Te=(0,Y.jsx)(C,{id:n,data:b.data,type:S,positionAbsoluteX:x.positionAbsolute.x,positionAbsoluteY:x.positionAbsolute.y,selected:Ce,selectable:T,draggable:w,deletable:we,isConnectable:E,sourcePosition:b.sourcePosition,targetPosition:b.targetPosition,dragging:L,dragHandle:b.dragHandle,zIndex:x.z,parentId:b.parentId,...B}),t[77]=C,t[78]=L,t[79]=n,t[80]=x.positionAbsolute.x,t[81]=x.positionAbsolute.y,t[82]=x.z,t[83]=E,t[84]=w,t[85]=T,t[86]=b.data,t[87]=b.dragHandle,t[88]=b.parentId,t[89]=b.sourcePosition,t[90]=b.targetPosition,t[91]=B,t[92]=S,t[93]=Ce,t[94]=we,t[95]=Te):Te=t[95];let Ee;t[96]!==n||t[97]!==Te?(Ee=(0,Y.jsx)(SU,{value:n,children:Te}),t[96]=n,t[97]=Te,t[98]=Ee):Ee=t[98];let De;return t[99]!==n||t[100]!==b.ariaLabel||t[101]!==b.domAttributes||t[102]!==P||t[103]!==q||t[104]!==ae||t[105]!==W||t[106]!==K||t[107]!==te||t[108]!==J||t[109]!==fe||t[110]!==ge||t[111]!==_e||t[112]!==ve||t[113]!==ye||t[114]!==be||t[115]!==xe||t[116]!==Se||t[117]!==Ee?(De=(0,Y.jsx)(`div`,{className:fe,ref:P,style:ge,"data-id":n,"data-testid":_e,onMouseEnter:W,onMouseMove:te,onMouseLeave:K,onContextMenu:q,onClick:J,onDoubleClick:ae,onKeyDown:ve,tabIndex:ye,onFocus:be,role:xe,"aria-roledescription":`node`,"aria-describedby":Se,"aria-label":b.ariaLabel,...b.domAttributes,children:Ee}),t[99]=n,t[100]=b.ariaLabel,t[101]=b.domAttributes,t[102]=P,t[103]=q,t[104]=ae,t[105]=W,t[106]=K,t[107]=te,t[108]=J,t[109]=fe,t[110]=ge,t[111]=_e,t[112]=ve,t[113]=ye,t[114]=be,t[115]=xe,t[116]=Se,t[117]=Ee,t[118]=De):De=t[118],De}var nW=(0,C.memo)(tW);function rW(e){let t=(0,eR.c)(41),n=GV(sW),r=GV(oW),i=GV(aW),a=GV(iW),o=ZU(e.onlyRenderVisibleElements),s=QU(),c;if(t[0]!==i||t[1]!==o||t[2]!==n||t[3]!==r||t[4]!==a||t[5]!==e.disableKeyboardA11y||t[6]!==e.noDragClassName||t[7]!==e.noPanClassName||t[8]!==e.nodeExtent||t[9]!==e.nodeTypes||t[10]!==e.nodesDraggable||t[11]!==e.onNodeClick||t[12]!==e.onNodeContextMenu||t[13]!==e.onNodeDoubleClick||t[14]!==e.onNodeMouseEnter||t[15]!==e.onNodeMouseLeave||t[16]!==e.onNodeMouseMove||t[17]!==e.rfId||t[18]!==s){let l;t[20]!==i||t[21]!==n||t[22]!==r||t[23]!==a||t[24]!==e.disableKeyboardA11y||t[25]!==e.noDragClassName||t[26]!==e.noPanClassName||t[27]!==e.nodeExtent||t[28]!==e.nodeTypes||t[29]!==e.nodesDraggable||t[30]!==e.onNodeClick||t[31]!==e.onNodeContextMenu||t[32]!==e.onNodeDoubleClick||t[33]!==e.onNodeMouseEnter||t[34]!==e.onNodeMouseLeave||t[35]!==e.onNodeMouseMove||t[36]!==e.rfId||t[37]!==s?(l=t=>(0,Y.jsx)(nW,{id:t,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:e.nodesDraggable??!0,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,onError:a},t),t[20]=i,t[21]=n,t[22]=r,t[23]=a,t[24]=e.disableKeyboardA11y,t[25]=e.noDragClassName,t[26]=e.noPanClassName,t[27]=e.nodeExtent,t[28]=e.nodeTypes,t[29]=e.nodesDraggable,t[30]=e.onNodeClick,t[31]=e.onNodeContextMenu,t[32]=e.onNodeDoubleClick,t[33]=e.onNodeMouseEnter,t[34]=e.onNodeMouseLeave,t[35]=e.onNodeMouseMove,t[36]=e.rfId,t[37]=s,t[38]=l):l=t[38],c=o.map(l),t[0]=i,t[1]=o,t[2]=n,t[3]=r,t[4]=a,t[5]=e.disableKeyboardA11y,t[6]=e.noDragClassName,t[7]=e.noPanClassName,t[8]=e.nodeExtent,t[9]=e.nodeTypes,t[10]=e.nodesDraggable,t[11]=e.onNodeClick,t[12]=e.onNodeContextMenu,t[13]=e.onNodeDoubleClick,t[14]=e.onNodeMouseEnter,t[15]=e.onNodeMouseLeave,t[16]=e.onNodeMouseMove,t[17]=e.rfId,t[18]=s,t[19]=c}else c=t[19];let l;return t[39]===c?l=t[40]:(l=(0,Y.jsx)(`div`,{className:`react-flow__nodes`,style:tU,children:c}),t[39]=c,t[40]=l),l}function iW(e){return e.onError}function aW(e){return e.elementsSelectable}function oW(e){return e.nodesFocusable}function sW(e){return e.nodesConnectable}rW.displayName=`NodeRenderer`;var cW=(0,C.memo)(rW);function lW(e){let t=(0,eR.c)(8),n;t[0]===e?n=t[1]:(n=t=>e?t:void 0,t[0]=e,t[1]=n);let r=qV(n),i;t[2]===e?i=t[3]:(i=t=>e?t:void 0,t[2]=e,t[3]=i);let a=YV(i),o;return t[4]!==a||t[5]!==e||t[6]!==r?(o=t=>{if(!e)return t.edges.map(uW);let n=[];if(r.width&&r.height)for(let e of t.edges){let t=a.nodeLookup.get(e.source),i=a.nodeLookup.get(e.target);t&&i&&Az({sourceNode:t,targetNode:i,width:r.width,height:r.height,transform:r.transform})&&n.push(e.id)}return n},t[4]=a,t[5]=e,t[6]=r,t[7]=o):o=t[7],XV(HV(o))}function uW(e){return e.id}var dW=e=>{let t=(0,eR.c)(5),{color:n,strokeWidth:r}=e,i=n===void 0?`none`:n,a=r===void 0?1:r,o;t[0]===i?o=t[1]:(o=i&&{stroke:i},t[0]=i,t[1]=o);let s;if(t[2]!==a||t[3]!==o){let e={strokeWidth:a,...o};s=(0,Y.jsx)(`polyline`,{className:`arrow`,style:e,strokeLinecap:`round`,fill:`none`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4`}),t[2]=a,t[3]=o,t[4]=s}else s=t[4];return s},fW=e=>{let t=(0,eR.c)(5),{color:n,strokeWidth:r}=e,i=n===void 0?`none`:n,a=r===void 0?1:r,o;t[0]===i?o=t[1]:(o=i&&{stroke:i,fill:i},t[0]=i,t[1]=o);let s;if(t[2]!==a||t[3]!==o){let e={strokeWidth:a,...o};s=(0,Y.jsx)(`polyline`,{className:`arrowclosed`,style:e,strokeLinecap:`round`,strokeLinejoin:`round`,points:`-5,-4 0,0 -5,4 -5,-4`}),t[2]=a,t[3]=o,t[4]=s}else s=t[4];return s},pW={[vR.Arrow]:dW,[vR.ArrowClosed]:fW},mW=e=>{let t=(0,eR.c)(11),{id:n,type:r,color:i,width:a,height:o,markerUnits:s,strokeWidth:c,orient:l,onError:u}=e,d=a===void 0?12.5:a,f=o===void 0?12.5:o,p=s===void 0?`strokeWidth`:s,m=l===void 0?`auto-start-reverse`:l;if(!Object.hasOwn(pW,r))return u?.(`009`,lR.error009(r)),null;let h=pW[r],g=`${d}`,_=`${f}`,v;t[0]!==h||t[1]!==i||t[2]!==c?(v=(0,Y.jsx)(h,{color:i,strokeWidth:c}),t[0]=h,t[1]=i,t[2]=c,t[3]=v):v=t[3];let y;return t[4]!==n||t[5]!==p||t[6]!==m||t[7]!==g||t[8]!==_||t[9]!==v?(y=(0,Y.jsx)(`marker`,{className:`react-flow__arrowhead`,id:n,markerWidth:g,markerHeight:_,viewBox:`-10 -10 20 20`,markerUnits:p,orient:m,refX:`0`,refY:`0`,children:v}),t[4]=n,t[5]=p,t[6]=m,t[7]=g,t[8]=_,t[9]=v,t[10]=y):y=t[10],y},hW=e=>{let t=(0,eR.c)(18),{defaultColor:n,rfId:r,onError:i}=e,a=GV(_W),{edges:o}=XV(),s,c,l,u;if(t[0]!==n||t[1]!==a?.markerEnd||t[2]!==a?.markerStart||t[3]!==o||t[4]!==i||t[5]!==r){u=Symbol.for(`react.early_return_sentinel`);bb0:{let e=qz(o,{id:r,defaultColor:n,defaultMarkerStart:a?.markerStart,defaultMarkerEnd:a?.markerEnd});if(!e.length){u=null;break bb0}c=`react-flow__marker`,l=`true`;let d;t[10]===i?d=t[11]:(d=e=>(0,Y.jsx)(mW,{id:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient,onError:i},e.id),t[10]=i,t[11]=d),s=e.map(d)}t[0]=n,t[1]=a?.markerEnd,t[2]=a?.markerStart,t[3]=o,t[4]=i,t[5]=r,t[6]=s,t[7]=c,t[8]=l,t[9]=u}else s=t[6],c=t[7],l=t[8],u=t[9];if(u!==Symbol.for(`react.early_return_sentinel`))return u;let d;t[12]===s?d=t[13]:(d=(0,Y.jsx)(`defs`,{children:s}),t[12]=s,t[13]=d);let f;return t[14]!==c||t[15]!==l||t[16]!==d?(f=(0,Y.jsx)(`svg`,{className:c,"aria-hidden":l,children:d}),t[14]=c,t[15]=l,t[16]=d,t[17]=f):f=t[17],f};hW.displayName=`MarkerDefinitions`;var gW=(0,C.memo)(hW);function _W(e){return e.defaultEdgeOptions}function vW(e){let t=(0,eR.c)(6),{optionsStore:n,edgesStore:r}=KV(),i;t[0]!==e||t[1]!==n?(i=t=>n.getState().pubSub.subscribeToEdge(e,t),t[0]=e,t[1]=n,t[2]=i):i=t[2];let a=i,o;t[3]!==r||t[4]!==e?(o=()=>r.getState().edgeLookup.get(e),t[3]=r,t[4]=e,t[5]=o):o=t[5];let s=o;return(0,C.useSyncExternalStore)(a,s,s)}var yW=[2,4];function bW(e){let t=(0,eR.c)(37),n,r,i,a,o,s,c,l,u,d,f;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11]):({x:d,y:f,label:i,labelStyle:o,labelShowBg:c,labelBgStyle:a,labelBgPadding:l,labelBgBorderRadius:u,children:n,className:r,...s}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f);let p=c===void 0||c,m=l===void 0?yW:l,h=u===void 0?2:u,g;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(g={x:1,y:0,width:0,height:0},t[12]=g):g=t[12];let[_,v]=(0,C.useState)(g),y;t[13]===r?y=t[14]:(y=tR([`react-flow__edge-textwrapper`,r]),t[13]=r,t[14]=y);let b=y,x=(0,C.useRef)(null),S;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(S=()=>{if(x.current){let e=x.current.getBBox();v({x:e.x,y:e.y,width:e.width,height:e.height})}},t[15]=S):S=t[15];let w;if(t[16]===i?w=t[17]:(w=[i],t[16]=i,t[17]=w),(0,C.useEffect)(S,w),!i)return null;let T=`translate(${d-_.width/2} ${f-_.height/2})`,E=_.width?`visible`:`hidden`,D;t[18]!==_.height||t[19]!==_.width||t[20]!==h||t[21]!==m||t[22]!==a||t[23]!==p?(D=p&&(0,Y.jsx)(`rect`,{width:_.width+2*m[0],x:-m[0],y:-m[1],height:_.height+2*m[1],className:`react-flow__edge-textbg`,style:a,rx:h,ry:h}),t[18]=_.height,t[19]=_.width,t[20]=h,t[21]=m,t[22]=a,t[23]=p,t[24]=D):D=t[24];let O=_.height/2,k;t[25]!==i||t[26]!==o||t[27]!==O?(k=(0,Y.jsx)(`text`,{className:`react-flow__edge-text`,y:O,dy:`0.3em`,ref:x,style:o,children:i}),t[25]=i,t[26]=o,t[27]=O,t[28]=k):k=t[28];let A;return t[29]!==n||t[30]!==b||t[31]!==s||t[32]!==D||t[33]!==k||t[34]!==T||t[35]!==E?(A=(0,Y.jsxs)(`g`,{transform:T,className:b,visibility:E,...s,children:[D,k,n]}),t[29]=n,t[30]=b,t[31]=s,t[32]=D,t[33]=k,t[34]=T,t[35]=E,t[36]=A):A=t[36],A}bW.displayName=`EdgeText`;var xW=(0,C.memo)(bW);function SW(e){let t=(0,eR.c)(36),n,r,i,a,o,s,c,l,u,d,f,p,m,h;if(t[0]!==e){let{path:g,labelX:_,labelY:v,label:y,labelStyle:b,labelShowBg:x,labelBgStyle:S,labelBgPadding:C,labelBgBorderRadius:w,interactionWidth:T,...E}=e;d=g,l=_,u=v,r=y,c=b,s=x,o=S,a=C,i=w,n=T===void 0?20:T,f=E,p=d,m=`none`,h=tR([`react-flow__edge-path`,E.className]),t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m,t[14]=h}else n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13],h=t[14];let g;t[15]!==f||t[16]!==p||t[17]!==m||t[18]!==h?(g=(0,Y.jsx)(`path`,{...f,d:p,fill:m,className:h}),t[15]=f,t[16]=p,t[17]=m,t[18]=h,t[19]=g):g=t[19];let _;t[20]!==n||t[21]!==d?(_=n?(0,Y.jsx)(`path`,{d,fill:`none`,strokeOpacity:0,strokeWidth:n,className:`react-flow__edge-interaction`}):null,t[20]=n,t[21]=d,t[22]=_):_=t[22];let v;t[23]!==r||t[24]!==i||t[25]!==a||t[26]!==o||t[27]!==s||t[28]!==c||t[29]!==l||t[30]!==u?(v=r&&KR(l)&&KR(u)?(0,Y.jsx)(xW,{x:l,y:u,label:r,labelStyle:c,labelShowBg:s,labelBgStyle:o,labelBgPadding:a,labelBgBorderRadius:i}):null,t[23]=r,t[24]=i,t[25]=a,t[26]=o,t[27]=s,t[28]=c,t[29]=l,t[30]=u,t[31]=v):v=t[31];let y;return t[32]!==g||t[33]!==_||t[34]!==v?(y=(0,Y.jsxs)(Y.Fragment,{children:[g,_,v]}),t[32]=g,t[33]=_,t[34]=v,t[35]=y):y=t[35],y}function CW({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===yR.Left||e===yR.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function wW({sourceX:e,sourceY:t,sourcePosition:n=yR.Bottom,targetX:r,targetY:i,targetPosition:a=yR.Top}){let[o,s]=CW({pos:n,x1:e,y1:t,x2:r,y2:i}),[c,l]=CW({pos:a,x1:r,y1:i,x2:e,y2:t}),[u,d,f,p]=wz({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:c,targetControlY:l});return[`M${e},${t} C${o},${s} ${c},${l} ${r},${i}`,u,d,f,p]}function TW(e){function t(t){let n=(0,eR.c)(22),{id:r,sourceX:i,sourceY:a,targetX:o,targetY:s,sourcePosition:c,targetPosition:l,label:u,labelStyle:d,labelShowBg:f,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:_,markerStart:v,interactionWidth:y}=t,b;n[0]!==c||n[1]!==i||n[2]!==a||n[3]!==l||n[4]!==o||n[5]!==s?(b=wW({sourceX:i,sourceY:a,sourcePosition:c,targetX:o,targetY:s,targetPosition:l}),n[0]=c,n[1]=i,n[2]=a,n[3]=l,n[4]=o,n[5]=s,n[6]=b):b=n[6];let[x,S,C]=b,w=e.isInternal?void 0:r,T;return n[7]!==w||n[8]!==y||n[9]!==u||n[10]!==h||n[11]!==m||n[12]!==p||n[13]!==f||n[14]!==d||n[15]!==S||n[16]!==C||n[17]!==_||n[18]!==v||n[19]!==x||n[20]!==g?(T=(0,Y.jsx)(SW,{id:w,path:x,labelX:S,labelY:C,label:u,labelStyle:d,labelShowBg:f,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:_,markerStart:v,interactionWidth:y}),n[7]=w,n[8]=y,n[9]=u,n[10]=h,n[11]=m,n[12]=p,n[13]=f,n[14]=d,n[15]=S,n[16]=C,n[17]=_,n[18]=v,n[19]=x,n[20]=g,n[21]=T):T=n[21],T}return t.displayName=e.isInternal?`SimpleBezierEdgeInternal`:`SimpleBezierEdge`,(0,C.memo)(t)}TW({isInternal:!1});var EW=TW({isInternal:!0});function DW(e){function t(t){let n=(0,eR.c)(25),{id:r,sourceX:i,sourceY:a,targetX:o,targetY:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,sourcePosition:h,targetPosition:g,markerEnd:_,markerStart:v,pathOptions:y,interactionWidth:b}=t,x=h===void 0?yR.Bottom:h,S=g===void 0?yR.Top:g,C=y?.borderRadius,w=y?.offset,T=y?.stepPosition,E;n[0]!==x||n[1]!==i||n[2]!==a||n[3]!==C||n[4]!==w||n[5]!==T||n[6]!==S||n[7]!==o||n[8]!==s?(E=Vz({sourceX:i,sourceY:a,sourcePosition:x,targetX:o,targetY:s,targetPosition:S,borderRadius:C,offset:w,stepPosition:T}),n[0]=x,n[1]=i,n[2]=a,n[3]=C,n[4]=w,n[5]=T,n[6]=S,n[7]=o,n[8]=s,n[9]=E):E=n[9];let[D,O,k]=E,A=e.isInternal?void 0:r,j;return n[10]!==A||n[11]!==b||n[12]!==c||n[13]!==p||n[14]!==f||n[15]!==d||n[16]!==u||n[17]!==l||n[18]!==O||n[19]!==k||n[20]!==_||n[21]!==v||n[22]!==D||n[23]!==m?(j=(0,Y.jsx)(SW,{id:A,path:D,labelX:O,labelY:k,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:_,markerStart:v,interactionWidth:b}),n[10]=A,n[11]=b,n[12]=c,n[13]=p,n[14]=f,n[15]=d,n[16]=u,n[17]=l,n[18]=O,n[19]=k,n[20]=_,n[21]=v,n[22]=D,n[23]=m,n[24]=j):j=n[24],j}return t.displayName=e.isInternal?`SmoothStepEdgeInternal`:`SmoothStepEdge`,(0,C.memo)(t)}var OW=DW({isInternal:!1}),kW=DW({isInternal:!0});function AW(e){function t(t){let n=(0,eR.c)(9),r,i;n[0]===t?(r=n[1],i=n[2]):({id:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let a=e.isInternal?void 0:r,o=i.pathOptions?.offset,s;n[3]===o?s=n[4]:(s={borderRadius:0,offset:o},n[3]=o,n[4]=s);let c;return n[5]!==a||n[6]!==i||n[7]!==s?(c=(0,Y.jsx)(OW,{...i,id:a,pathOptions:s}),n[5]=a,n[6]=i,n[7]=s,n[8]=c):c=n[8],c}return t.displayName=e.isInternal?`StepEdgeInternal`:`StepEdge`,(0,C.memo)(t)}AW({isInternal:!1});var jW=AW({isInternal:!0});function MW(e){function t(t){let n=(0,eR.c)(20),{id:r,sourceX:i,sourceY:a,targetX:o,targetY:s,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_}=t,v;n[0]!==i||n[1]!==a||n[2]!==o||n[3]!==s?(v=Pz({sourceX:i,sourceY:a,targetX:o,targetY:s}),n[0]=i,n[1]=a,n[2]=o,n[3]=s,n[4]=v):v=n[4];let[y,b,x]=v,S=e.isInternal?void 0:r,C;return n[5]!==S||n[6]!==_||n[7]!==c||n[8]!==p||n[9]!==f||n[10]!==d||n[11]!==u||n[12]!==l||n[13]!==b||n[14]!==x||n[15]!==h||n[16]!==g||n[17]!==y||n[18]!==m?(C=(0,Y.jsx)(SW,{id:S,path:y,labelX:b,labelY:x,label:c,labelStyle:l,labelShowBg:u,labelBgStyle:d,labelBgPadding:f,labelBgBorderRadius:p,style:m,markerEnd:h,markerStart:g,interactionWidth:_}),n[5]=S,n[6]=_,n[7]=c,n[8]=p,n[9]=f,n[10]=d,n[11]=u,n[12]=l,n[13]=b,n[14]=x,n[15]=h,n[16]=g,n[17]=y,n[18]=m,n[19]=C):C=n[19],C}return t.displayName=e.isInternal?`StraightEdgeInternal`:`StraightEdge`,(0,C.memo)(t)}MW({isInternal:!1});var NW=MW({isInternal:!0});function PW(e){function t(t){let n=(0,eR.c)(23),{id:r,sourceX:i,sourceY:a,targetX:o,targetY:s,sourcePosition:c,targetPosition:l,label:u,labelStyle:d,labelShowBg:f,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:_,markerStart:v,pathOptions:y,interactionWidth:b}=t,x=c===void 0?yR.Bottom:c,S=l===void 0?yR.Top:l,C=y?.curvature,w;n[0]!==x||n[1]!==i||n[2]!==a||n[3]!==C||n[4]!==S||n[5]!==o||n[6]!==s?(w=Dz({sourceX:i,sourceY:a,sourcePosition:x,targetX:o,targetY:s,targetPosition:S,curvature:C}),n[0]=x,n[1]=i,n[2]=a,n[3]=C,n[4]=S,n[5]=o,n[6]=s,n[7]=w):w=n[7];let[T,E,D]=w,O=e.isInternal?void 0:r,k;return n[8]!==O||n[9]!==b||n[10]!==u||n[11]!==h||n[12]!==m||n[13]!==p||n[14]!==f||n[15]!==d||n[16]!==E||n[17]!==D||n[18]!==_||n[19]!==v||n[20]!==T||n[21]!==g?(k=(0,Y.jsx)(SW,{id:O,path:T,labelX:E,labelY:D,label:u,labelStyle:d,labelShowBg:f,labelBgStyle:p,labelBgPadding:m,labelBgBorderRadius:h,style:g,markerEnd:_,markerStart:v,interactionWidth:b}),n[8]=O,n[9]=b,n[10]=u,n[11]=h,n[12]=m,n[13]=p,n[14]=f,n[15]=d,n[16]=E,n[17]=D,n[18]=_,n[19]=v,n[20]=T,n[21]=g,n[22]=k):k=n[22],k}return t.displayName=e.isInternal?`BezierEdgeInternal`:`BezierEdge`,(0,C.memo)(t)}PW({isInternal:!1});var FW={default:PW({isInternal:!0}),straight:NW,step:jW,smoothstep:kW,simplebezier:EW},IW={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},LW=(e,t,n)=>n===yR.Left?e-t:n===yR.Right?e+t:e,RW=(e,t,n)=>n===yR.Top?e-t:n===yR.Bottom?e+t:e,zW=`react-flow__edgeupdater`;function BW(e){let t=(0,eR.c)(18),{position:n,centerX:r,centerY:i,radius:a,onMouseDown:o,onMouseEnter:s,onMouseOut:c,type:l}=e,u=a===void 0?10:a,d=`${zW}-${l}`,f;t[0]===d?f=t[1]:(f=tR([zW,d]),t[0]=d,t[1]=f);let p;t[2]!==r||t[3]!==n||t[4]!==u?(p=LW(r,u,n),t[2]=r,t[3]=n,t[4]=u,t[5]=p):p=t[5];let m;t[6]!==i||t[7]!==n||t[8]!==u?(m=RW(i,u,n),t[6]=i,t[7]=n,t[8]=u,t[9]=m):m=t[9];let h;return t[10]!==o||t[11]!==s||t[12]!==c||t[13]!==u||t[14]!==f||t[15]!==p||t[16]!==m?(h=(0,Y.jsx)(`circle`,{onMouseDown:o,onMouseEnter:s,onMouseOut:c,className:f,cx:p,cy:m,r:u,stroke:`transparent`,fill:`transparent`}),t[10]=o,t[11]=s,t[12]=c,t[13]=u,t[14]=f,t[15]=p,t[16]=m,t[17]=h):h=t[17],h}function VW(e){let t=(0,eR.c)(43),{isReconnectable:n,reconnectRadius:r,edge:i,sourceX:a,sourceY:o,targetX:s,targetY:c,sourcePosition:l,targetPosition:u,onReconnect:d,onReconnectStart:f,onReconnectEnd:p,setReconnecting:m,setUpdateHover:h}=e,{optionsStore:g,viewportStore:_,connectionStore:v,nodesStore:y}=KV(),b;t[0]!==v||t[1]!==i||t[2]!==y||t[3]!==d||t[4]!==p||t[5]!==f||t[6]!==g||t[7]!==m||t[8]!==_?(b=(e,t)=>{if(e.button!==0)return;let{autoPanOnConnect:n,domNode:r,connectionMode:a,connectionRadius:o,onConnectStart:s,cancelConnection:c,rfId:l,panBy:u,updateConnection:h}=g.getState(),{nodeLookup:b}=y.getState(),x=t.type===`target`;jB.onPointerDown(e.nativeEvent,{autoPanOnConnect:n,connectionMode:a,connectionRadius:o,domNode:r,handleId:t.id,nodeId:t.nodeId,nodeLookup:b,isTarget:x,edgeUpdaterType:t.type,lib:`react`,flowId:l,cancelConnection:c,panBy:u,isValidConnection:(...e)=>{let t=e;return g.getState().isValidConnection?.(...t)??!0},onConnect:e=>d?.(i,e),onConnectStart:(n,r)=>{m(!0),f?.(e,i,t.type),s?.(n,r)},onConnectEnd:(...e)=>{let t=e;return g.getState().onConnectEnd?.(...t)},onReconnectEnd:(e,n)=>{m(!1),p?.(e,i,t.type,n)},updateConnection:h,getTransform:()=>_.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,dragThreshold:g.getState().connectionDragThreshold,handleDomNode:e.currentTarget})},t[0]=v,t[1]=i,t[2]=y,t[3]=d,t[4]=p,t[5]=f,t[6]=g,t[7]=m,t[8]=_,t[9]=b):b=t[9];let x=b,S;t[10]!==i.target||t[11]!==i.targetHandle||t[12]!==x?(S=e=>x(e,{nodeId:i.target,id:i.targetHandle??null,type:`target`}),t[10]=i.target,t[11]=i.targetHandle,t[12]=x,t[13]=S):S=t[13];let C=S,w;t[14]!==i.source||t[15]!==i.sourceHandle||t[16]!==x?(w=e=>x(e,{nodeId:i.source,id:i.sourceHandle??null,type:`source`}),t[14]=i.source,t[15]=i.sourceHandle,t[16]=x,t[17]=w):w=t[17];let T=w,E;t[18]===h?E=t[19]:(E=()=>h(!0),t[18]=h,t[19]=E);let D=E,O;t[20]===h?O=t[21]:(O=()=>h(!1),t[20]=h,t[21]=O);let k=O,A;t[22]!==n||t[23]!==D||t[24]!==k||t[25]!==C||t[26]!==r||t[27]!==l||t[28]!==a||t[29]!==o?(A=(n===!0||n===`source`)&&(0,Y.jsx)(BW,{position:l,centerX:a,centerY:o,radius:r,onMouseDown:C,onMouseEnter:D,onMouseOut:k,type:`source`}),t[22]=n,t[23]=D,t[24]=k,t[25]=C,t[26]=r,t[27]=l,t[28]=a,t[29]=o,t[30]=A):A=t[30];let j;t[31]!==n||t[32]!==D||t[33]!==k||t[34]!==T||t[35]!==r||t[36]!==u||t[37]!==s||t[38]!==c?(j=(n===!0||n===`target`)&&(0,Y.jsx)(BW,{position:u,centerX:s,centerY:c,radius:r,onMouseDown:T,onMouseEnter:D,onMouseOut:k,type:`target`}),t[31]=n,t[32]=D,t[33]=k,t[34]=T,t[35]=r,t[36]=u,t[37]=s,t[38]=c,t[39]=j):j=t[39];let M;return t[40]!==A||t[41]!==j?(M=(0,Y.jsxs)(Y.Fragment,{children:[A,j]}),t[40]=A,t[41]=j,t[42]=M):M=t[42],M}function HW(e){let t=(0,eR.c)(110),{id:n,edgesFocusable:r,edgesReconnectable:i,elementsSelectable:a,onClick:o,onDoubleClick:s,onContextMenu:c,onMouseEnter:l,onMouseMove:u,onMouseLeave:d,reconnectRadius:f,onReconnect:p,onReconnectStart:m,onReconnectEnd:h,rfId:g,edgeTypes:_,noPanClassName:v,onError:y,disableKeyboardA11y:b,connectionMode:x,elevateEdgesOnSelect:S,zIndexMode:w,defaultEdgeOptions:T}=e,E=vW(n);E=T?{...T,...E}:E;let D=E.type||`default`,O=_?.[D]||FW[D];O===void 0&&(y?.(`011`,lR.error011(D)),D=`default`,O=_?.default||FW.default);let k=!!(E.focusable||r&&E.focusable===void 0),A=p!==void 0&&(E.reconnectable||i&&E.reconnectable===void 0),j=!!(E.selectable||a&&E.selectable===void 0),M=(0,C.useRef)(null),[N,P]=(0,C.useState)(!1),[F,I]=(0,C.useState)(!1),{optionsStore:L}=KV(),R=$U(E.source),z=$U(E.target),B=E.zIndex,V;bb0:{if(!R||!z){V=IW;break bb0}let e=E.sourceHandle||null,r=E.targetHandle||null,i;t[0]!==x||t[1]!==n||t[2]!==y||t[3]!==R||t[4]!==e||t[5]!==r||t[6]!==z?(i=Uz({id:n,sourceNode:R,targetNode:z,sourceHandle:e,targetHandle:r,connectionMode:x,onError:y}),t[0]=x,t[1]=n,t[2]=y,t[3]=R,t[4]=e,t[5]=r,t[6]=z,t[7]=i):i=t[7];let a=i,o;t[8]!==E.selected||t[9]!==E.zIndex||t[10]!==S||t[11]!==R||t[12]!==z||t[13]!==w?(o=kz({selected:E.selected,zIndex:E.zIndex,sourceNode:R,targetNode:z,elevateOnSelect:S,zIndexMode:w}),t[8]=E.selected,t[9]=E.zIndex,t[10]=S,t[11]=R,t[12]=z,t[13]=w,t[14]=o):o=t[14];let s=o,c=a||IW,l;t[15]!==c||t[16]!==s?(l={...c,zIndex:s},t[15]=c,t[16]=s,t[17]=l):l=t[17],V=l}let{zIndex:H,sourceX:ee,sourceY:U,targetX:W,targetY:G,sourcePosition:te,targetPosition:ne}=V,K=H===void 0?B:H,re;t[18]!==E.markerStart||t[19]!==g?(re=E.markerStart?`url('#${Kz(E.markerStart,g)}')`:void 0,t[18]=E.markerStart,t[19]=g,t[20]=re):re=t[20];let q=re,ie;t[21]!==E.markerEnd||t[22]!==g?(ie=E.markerEnd?`url('#${Kz(E.markerEnd,g)}')`:void 0,t[21]=E.markerEnd,t[22]=g,t[23]=ie):ie=t[23];let ae=ie;if(E.hidden||ee===null||U===null||W===null||G===null)return null;let oe;t[24]!==E||t[25]!==n||t[26]!==j||t[27]!==o||t[28]!==L?(oe=e=>{let{addSelectedEdges:t,unselectNodesAndEdges:r,multiSelectionActive:i,nodesSelectionActive:a}=L.getState();j&&(a&&L.setState({nodesSelectionActive:!1}),E.selected&&i?(r({nodes:[],edges:[E]}),M.current?.blur()):t([n])),o&&o(e,E)},t[24]=E,t[25]=n,t[26]=j,t[27]=o,t[28]=L,t[29]=oe):oe=t[29];let J=oe,se;t[30]!==E||t[31]!==s?(se=s?e=>{s(e,{...E})}:void 0,t[30]=E,t[31]=s,t[32]=se):se=t[32];let ce=se,le;t[33]!==E||t[34]!==c?(le=c?e=>{c(e,{...E})}:void 0,t[33]=E,t[34]=c,t[35]=le):le=t[35];let ue=le,de;t[36]!==E||t[37]!==l?(de=l?e=>{l(e,{...E})}:void 0,t[36]=E,t[37]=l,t[38]=de):de=t[38];let fe=de,pe;t[39]!==E||t[40]!==u?(pe=u?e=>{u(e,{...E})}:void 0,t[39]=E,t[40]=u,t[41]=pe):pe=t[41];let me=pe,he;t[42]!==E||t[43]!==d?(he=d?e=>{d(e,{...E})}:void 0,t[42]=E,t[43]=d,t[44]=he):he=t[44];let ge=he,_e;t[45]!==b||t[46]!==E||t[47]!==n||t[48]!==j||t[49]!==L?(_e=e=>{if(!b&&dR.includes(e.key)&&j){let{unselectNodesAndEdges:t,addSelectedEdges:r}=L.getState();e.key===`Escape`?(M.current?.blur(),t({edges:[E]})):r([n])}},t[45]=b,t[46]=E,t[47]=n,t[48]=j,t[49]=L,t[50]=_e):_e=t[50];let ve=_e,ye;t[51]===K?ye=t[52]:(ye={zIndex:K},t[51]=K,t[52]=ye);let be=`react-flow__edge-${D}`,xe=!j&&!o,Se;t[53]!==E.animated||t[54]!==E.className||t[55]!==E.selected||t[56]!==j||t[57]!==v||t[58]!==be||t[59]!==xe||t[60]!==N?(Se=tR([`react-flow__edge`,be,E.className,v,{selected:E.selected,animated:E.animated,inactive:xe,updating:N,selectable:j}]),t[53]=E.animated,t[54]=E.className,t[55]=E.selected,t[56]=j,t[57]=v,t[58]=be,t[59]=xe,t[60]=N,t[61]=Se):Se=t[61];let Ce=k?ve:void 0,we=k?0:void 0,Te=E.ariaRole??(k?`group`:`img`),Ee=`rf__edge-${n}`,De=E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,Oe=k?`${nH}-${g}`:void 0,ke;t[62]!==O||t[63]!==E||t[64]!==n||t[65]!==j||t[66]!==ae||t[67]!==q||t[68]!==F||t[69]!==te||t[70]!==ee||t[71]!==U||t[72]!==ne||t[73]!==W||t[74]!==G?(ke=!F&&(0,Y.jsx)(O,{id:n,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:j,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:ee,sourceY:U,targetX:W,targetY:G,sourcePosition:te,targetPosition:ne,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:q,markerEnd:ae,pathOptions:`pathOptions`in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),t[62]=O,t[63]=E,t[64]=n,t[65]=j,t[66]=ae,t[67]=q,t[68]=F,t[69]=te,t[70]=ee,t[71]=U,t[72]=ne,t[73]=W,t[74]=G,t[75]=ke):ke=t[75];let Ae;t[76]!==E||t[77]!==A||t[78]!==p||t[79]!==h||t[80]!==m||t[81]!==f||t[82]!==te||t[83]!==ee||t[84]!==U||t[85]!==ne||t[86]!==W||t[87]!==G?(Ae=A&&(0,Y.jsx)(VW,{edge:E,isReconnectable:A,reconnectRadius:f,onReconnect:p,onReconnectStart:m,onReconnectEnd:h,sourceX:ee,sourceY:U,targetX:W,targetY:G,sourcePosition:te,targetPosition:ne,setUpdateHover:P,setReconnecting:I}),t[76]=E,t[77]=A,t[78]=p,t[79]=h,t[80]=m,t[81]=f,t[82]=te,t[83]=ee,t[84]=U,t[85]=ne,t[86]=W,t[87]=G,t[88]=Ae):Ae=t[88];let je;t[89]!==E.domAttributes||t[90]!==n||t[91]!==J||t[92]!==ue||t[93]!==ce||t[94]!==fe||t[95]!==ge||t[96]!==me||t[97]!==Se||t[98]!==Ce||t[99]!==we||t[100]!==Te||t[101]!==Ee||t[102]!==De||t[103]!==Oe||t[104]!==ke||t[105]!==Ae?(je=(0,Y.jsxs)(`g`,{className:Se,onClick:J,onDoubleClick:ce,onContextMenu:ue,onMouseEnter:fe,onMouseMove:me,onMouseLeave:ge,onKeyDown:Ce,tabIndex:we,role:Te,"aria-roledescription":`edge`,"data-id":n,"data-testid":Ee,"aria-label":De,"aria-describedby":Oe,ref:M,...E.domAttributes,children:[ke,Ae]}),t[89]=E.domAttributes,t[90]=n,t[91]=J,t[92]=ue,t[93]=ce,t[94]=fe,t[95]=ge,t[96]=me,t[97]=Se,t[98]=Ce,t[99]=we,t[100]=Te,t[101]=Ee,t[102]=De,t[103]=Oe,t[104]=ke,t[105]=Ae,t[106]=je):je=t[106];let Me;return t[107]!==ye||t[108]!==je?(Me=(0,Y.jsx)(`svg`,{style:ye,children:je}),t[107]=ye,t[108]=je,t[109]=Me):Me=t[109],Me}var UW=(0,C.memo)(HW);function WW(e){let t=(0,eR.c)(54),{defaultMarkerColor:n,onlyRenderVisibleElements:r,rfId:i,edgeTypes:a,noPanClassName:o,onReconnect:s,onEdgeContextMenu:c,onEdgeMouseEnter:l,onEdgeMouseMove:u,onEdgeMouseLeave:d,onEdgeClick:f,reconnectRadius:p,onEdgeDoubleClick:m,onReconnectStart:h,onReconnectEnd:g,disableKeyboardA11y:_}=e,v=GV(QW),y=GV(ZW),b=GV(XW),x=GV(YW),S=GV(JW),C=GV(qW),w=GV(KW),T=GV(GW),E=lW(r),D;t[0]!==n||t[1]!==x||t[2]!==i?(D=(0,Y.jsx)(gW,{defaultColor:n,rfId:i,onError:x}),t[0]=n,t[1]=x,t[2]=i,t[3]=D):D=t[3];let O;if(t[4]!==S||t[5]!==T||t[6]!==_||t[7]!==E||t[8]!==a||t[9]!==v||t[10]!==y||t[11]!==b||t[12]!==C||t[13]!==o||t[14]!==f||t[15]!==c||t[16]!==m||t[17]!==l||t[18]!==d||t[19]!==u||t[20]!==x||t[21]!==s||t[22]!==g||t[23]!==h||t[24]!==p||t[25]!==i||t[26]!==w){let e;t[28]!==S||t[29]!==T||t[30]!==_||t[31]!==a||t[32]!==v||t[33]!==y||t[34]!==b||t[35]!==C||t[36]!==o||t[37]!==f||t[38]!==c||t[39]!==m||t[40]!==l||t[41]!==d||t[42]!==u||t[43]!==x||t[44]!==s||t[45]!==g||t[46]!==h||t[47]!==p||t[48]!==i||t[49]!==w?(e=e=>(0,Y.jsx)(UW,{id:e,edgesFocusable:v,edgesReconnectable:y,elementsSelectable:b,noPanClassName:o,onReconnect:s,onContextMenu:c,onMouseEnter:l,onMouseMove:u,onMouseLeave:d,onClick:f,reconnectRadius:p,onDoubleClick:m,onReconnectStart:h,onReconnectEnd:g,rfId:i,onError:x,edgeTypes:a,disableKeyboardA11y:_,connectionMode:S,elevateEdgesOnSelect:C,zIndexMode:w,defaultEdgeOptions:T},e),t[28]=S,t[29]=T,t[30]=_,t[31]=a,t[32]=v,t[33]=y,t[34]=b,t[35]=C,t[36]=o,t[37]=f,t[38]=c,t[39]=m,t[40]=l,t[41]=d,t[42]=u,t[43]=x,t[44]=s,t[45]=g,t[46]=h,t[47]=p,t[48]=i,t[49]=w,t[50]=e):e=t[50],O=E.map(e),t[4]=S,t[5]=T,t[6]=_,t[7]=E,t[8]=a,t[9]=v,t[10]=y,t[11]=b,t[12]=C,t[13]=o,t[14]=f,t[15]=c,t[16]=m,t[17]=l,t[18]=d,t[19]=u,t[20]=x,t[21]=s,t[22]=g,t[23]=h,t[24]=p,t[25]=i,t[26]=w,t[27]=O}else O=t[27];let k;return t[51]!==D||t[52]!==O?(k=(0,Y.jsxs)(`div`,{className:`react-flow__edges`,children:[D,O]}),t[51]=D,t[52]=O,t[53]=k):k=t[53],k}function GW(e){return e.defaultEdgeOptions}function KW(e){return e.zIndexMode}function qW(e){return e.elevateEdgesOnSelect}function JW(e){return e.connectionMode}function YW(e){return e.onError}function XW(e){return e.elementsSelectable}function ZW(e){return e.edgesReconnectable}function QW(e){return e.edgesFocusable}WW.displayName=`EdgeRenderer`;var $W=(0,C.memo)(WW),eG=e=>`translate(${e[0]}px,${e[1]}px) scale(${e[2]})`;function tG(e){let t=(0,eR.c)(12),{children:n}=e,{viewportStore:r}=KV(),i=(0,C.useRef)(null),a;t[0]===r?a=t[1]:(a=()=>r.getState().transform,t[0]=r,t[1]=a);let[o]=(0,C.useState)(a),s,c;t[2]===r?(s=t[3],c=t[4]):(s=()=>{let e=null,t=()=>{let t=r.getState().transform;e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]||(e=t,i.current&&(i.current.style.transform=eG(t)))};return t(),r.subscribe(t)},c=[r],t[2]=r,t[3]=s,t[4]=c),FH(s,c);let l;t[5]===o?l=t[6]:(l=eG(o),t[5]=o,t[6]=l);let u;t[7]===l?u=t[8]:(u={transform:l},t[7]=l,t[8]=u);let d;return t[9]!==n||t[10]!==u?(d=(0,Y.jsx)(`div`,{ref:i,className:`react-flow__viewport xyflow__viewport react-flow__container`,style:u,children:n}),t[9]=n,t[10]=u,t[11]=d):d=t[11],d}function nG(e){let t=(0,eR.c)(6),n=UH(),r=(0,C.useRef)(!1),i;t[0]!==e||t[1]!==n?(i=()=>{!r.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),r.current=!0)},t[0]=e,t[1]=n,t[2]=i):i=t[2];let a;t[3]!==e||t[4]!==n.viewportInitialized?(a=[e,n.viewportInitialized],t[3]=e,t[4]=n.viewportInitialized,t[5]=a):a=t[5],(0,C.useEffect)(i,a)}function rG(e){let t=(0,eR.c)(5),n=GV(iG)?.syncViewport,{viewportStore:r}=KV(),i,a;return t[0]!==n||t[1]!==e||t[2]!==r?(i=()=>{e&&(n?.(e),r.setState({transform:[e.x,e.y,e.zoom]}))},a=[e,n,r],t[0]=n,t[1]=e,t[2]=r,t[3]=i,t[4]=a):(i=t[3],a=t[4]),(0,C.useEffect)(i,a),null}function iG(e){return e.panZoom}function aG(e){let t=(0,eR.c)(15),{containerStyle:n,style:r,type:i,component:a}=e,o=GV(cG),s=qV(sG),c=qV(oG),{connection:l}=JV(),{isValid:u,inProgress:d}=l;if(!(s&&o&&d))return null;let f;t[0]===u?f=t[1]:(f=tR([`react-flow__connection`,dz(u)]),t[0]=u,t[1]=f);let p;t[2]!==a||t[3]!==u||t[4]!==r||t[5]!==i?(p=(0,Y.jsx)(lG,{style:r,type:i,CustomComponent:a,isValid:u}),t[2]=a,t[3]=u,t[4]=r,t[5]=i,t[6]=p):p=t[6];let m;t[7]!==f||t[8]!==p?(m=(0,Y.jsx)(`g`,{className:f,children:p}),t[7]=f,t[8]=p,t[9]=m):m=t[9];let h;return t[10]!==n||t[11]!==c||t[12]!==m||t[13]!==s?(h=(0,Y.jsx)(`svg`,{style:n,width:s,height:c,className:`react-flow__connectionline react-flow__container`,children:m}),t[10]=n,t[11]=c,t[12]=m,t[13]=s,t[14]=h):h=t[14],h}function oG(e){return e.height}function sG(e){return e.width}function cG(e){return e.nodesConnectable}var lG=e=>{let t=(0,eR.c)(29),{style:n,type:r,CustomComponent:i,isValid:a}=e,o=r===void 0?_R.Bezier:r,{inProgress:s,from:c,fromNode:l,fromHandle:u,fromPosition:d,to:f,toNode:p,toHandle:m,toPosition:h,pointer:g}=OU();if(!s)return;if(i){let e=c.x,r=c.y,s=f.x,_=f.y,v;t[0]===a?v=t[1]:(v=dz(a),t[0]=a,t[1]=v);let y;return t[2]!==i||t[3]!==c.x||t[4]!==c.y||t[5]!==u||t[6]!==l||t[7]!==d||t[8]!==g||t[9]!==n||t[10]!==v||t[11]!==f.x||t[12]!==f.y||t[13]!==m||t[14]!==p||t[15]!==h||t[16]!==o?(y=(0,Y.jsx)(i,{connectionLineType:o,connectionLineStyle:n,fromNode:l,fromHandle:u,fromX:e,fromY:r,toX:s,toY:_,fromPosition:d,toPosition:h,connectionStatus:v,toNode:p,toHandle:m,pointer:g}),t[2]=i,t[3]=c.x,t[4]=c.y,t[5]=u,t[6]=l,t[7]=d,t[8]=g,t[9]=n,t[10]=v,t[11]=f.x,t[12]=f.y,t[13]=m,t[14]=p,t[15]=h,t[16]=o,t[17]=y):y=t[17],y}let _;if(t[18]!==c.x||t[19]!==c.y||t[20]!==d||t[21]!==f.x||t[22]!==f.y||t[23]!==h||t[24]!==o){let e={sourceX:c.x,sourceY:c.y,sourcePosition:d,targetX:f.x,targetY:f.y,targetPosition:h};bb0:switch(o){case _R.Bezier:[_]=Dz(e);break bb0;case _R.SimpleBezier:[_]=wW(e);break bb0;case _R.Step:[_]=Vz({...e,borderRadius:0});break bb0;case _R.SmoothStep:[_]=Vz(e);break bb0;default:[_]=Pz(e)}t[18]=c.x,t[19]=c.y,t[20]=d,t[21]=f.x,t[22]=f.y,t[23]=h,t[24]=o,t[25]=_}else _=t[25];let v;return t[26]!==_||t[27]!==n?(v=(0,Y.jsx)(`path`,{d:_,fill:`none`,className:`react-flow__connection-path`,style:n}),t[26]=_,t[27]=n,t[28]=v):v=t[28],v};lG.displayName=`ConnectionLine`;var uG={};function dG(e){let t=(0,eR.c)(5),n=e===void 0?uG:e;(0,C.useRef)(n);let{optionsStore:r}=KV(),i;t[0]!==n||t[1]!==r?(i=()=>{},t[0]=n,t[1]=r,t[2]=i):i=t[2];let a;t[3]===n?a=t[4]:(a=[n],t[3]=n,t[4]=a),(0,C.useEffect)(i,a)}function fG(){let e=(0,eR.c)(3),{optionsStore:t}=KV();(0,C.useRef)(!1);let n;e[0]===t?n=e[1]:(n=()=>{},e[0]=t,e[1]=n);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=[],e[2]=r):r=e[2],(0,C.useEffect)(n,r)}function pG(e){let t=(0,eR.c)(82),{nodeTypes:n,edgeTypes:r,onInit:i,onNodeClick:a,onEdgeClick:o,onNodeDoubleClick:s,onEdgeDoubleClick:c,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:d,onNodeContextMenu:f,onSelectionContextMenu:p,onSelectionStart:m,onSelectionEnd:h,connectionLineType:g,connectionLineStyle:_,connectionLineComponent:v,connectionLineContainerStyle:y,selectionKeyCode:b,selectionOnDrag:x,selectionMode:S,multiSelectionKeyCode:C,panActivationKeyCode:w,zoomActivationKeyCode:T,deleteKeyCode:E,onlyRenderVisibleElements:D,elementsSelectable:O,defaultViewport:k,translateExtent:A,minZoom:j,maxZoom:M,preventScrolling:N,defaultMarkerColor:P,zoomOnScroll:F,zoomOnPinch:I,panOnScroll:L,panOnScrollSpeed:R,panOnScrollMode:z,zoomOnDoubleClick:B,panOnDrag:V,autoPanOnSelection:H,onPaneClick:ee,onPaneMouseEnter:U,onPaneMouseMove:W,onPaneMouseLeave:G,onPaneScroll:te,onPaneContextMenu:ne,paneDragThreshold:K,onEdgeContextMenu:re,onEdgeMouseEnter:q,onEdgeMouseMove:ie,onEdgeMouseLeave:ae,reconnectRadius:oe,onReconnect:J,onReconnectStart:se,onReconnectEnd:ce,noDragClassName:le,noWheelClassName:ue,noPanClassName:de,disableKeyboardA11y:fe,nodeExtent:pe,rfId:me,viewport:he,onViewportChange:ge,nodesDraggable:_e}=e;dG(n),dG(r),fG(),nG(i),rG(he);let ve=!!he,ye;t[0]!==P||t[1]!==fe||t[2]!==r||t[3]!==de||t[4]!==o||t[5]!==re||t[6]!==c||t[7]!==q||t[8]!==ae||t[9]!==ie||t[10]!==J||t[11]!==ce||t[12]!==se||t[13]!==D||t[14]!==oe||t[15]!==me?(ye=(0,Y.jsx)($W,{edgeTypes:r,onEdgeClick:o,onEdgeDoubleClick:c,onReconnect:J,onReconnectStart:se,onReconnectEnd:ce,onlyRenderVisibleElements:D,onEdgeContextMenu:re,onEdgeMouseEnter:q,onEdgeMouseMove:ie,onEdgeMouseLeave:ae,reconnectRadius:oe,defaultMarkerColor:P,noPanClassName:de,disableKeyboardA11y:fe,rfId:me}),t[0]=P,t[1]=fe,t[2]=r,t[3]=de,t[4]=o,t[5]=re,t[6]=c,t[7]=q,t[8]=ae,t[9]=ie,t[10]=J,t[11]=ce,t[12]=se,t[13]=D,t[14]=oe,t[15]=me,t[16]=ye):ye=t[16];let be;t[17]!==v||t[18]!==y||t[19]!==_||t[20]!==g?(be=(0,Y.jsx)(aG,{style:_,type:g,component:v,containerStyle:y}),t[17]=v,t[18]=y,t[19]=_,t[20]=g,t[21]=be):be=t[21];let xe;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Y.jsx)(`div`,{className:`react-flow__edgelabel-renderer`}),t[22]=xe):xe=t[22];let Se;t[23]!==fe||t[24]!==le||t[25]!==de||t[26]!==pe||t[27]!==n||t[28]!==_e||t[29]!==a||t[30]!==f||t[31]!==s||t[32]!==l||t[33]!==d||t[34]!==u||t[35]!==D||t[36]!==me?(Se=(0,Y.jsx)(cW,{nodeTypes:n,onNodeClick:a,onNodeDoubleClick:s,onNodeMouseEnter:l,onNodeMouseMove:u,onNodeMouseLeave:d,onNodeContextMenu:f,onlyRenderVisibleElements:D,noPanClassName:de,noDragClassName:le,disableKeyboardA11y:fe,nodeExtent:pe,rfId:me,nodesDraggable:_e}),t[23]=fe,t[24]=le,t[25]=de,t[26]=pe,t[27]=n,t[28]=_e,t[29]=a,t[30]=f,t[31]=s,t[32]=l,t[33]=d,t[34]=u,t[35]=D,t[36]=me,t[37]=Se):Se=t[37];let Ce;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,Y.jsx)(`div`,{className:`react-flow__viewport-portal`}),t[38]=Ce):Ce=t[38];let we;t[39]!==ye||t[40]!==be||t[41]!==Se?(we=(0,Y.jsxs)(tG,{children:[ye,be,xe,Se,Ce]}),t[39]=ye,t[40]=be,t[41]=Se,t[42]=we):we=t[42];let Te;return t[43]!==H||t[44]!==k||t[45]!==E||t[46]!==fe||t[47]!==O||t[48]!==M||t[49]!==j||t[50]!==C||t[51]!==le||t[52]!==de||t[53]!==ue||t[54]!==ee||t[55]!==ne||t[56]!==U||t[57]!==G||t[58]!==W||t[59]!==te||t[60]!==p||t[61]!==h||t[62]!==m||t[63]!==ge||t[64]!==w||t[65]!==V||t[66]!==L||t[67]!==z||t[68]!==R||t[69]!==K||t[70]!==N||t[71]!==b||t[72]!==S||t[73]!==x||t[74]!==ve||t[75]!==we||t[76]!==A||t[77]!==T||t[78]!==B||t[79]!==I||t[80]!==F?(Te=(0,Y.jsx)(YU,{onPaneClick:ee,onPaneMouseEnter:U,onPaneMouseMove:W,onPaneMouseLeave:G,onPaneContextMenu:ne,onPaneScroll:te,paneDragThreshold:K,deleteKeyCode:E,selectionKeyCode:b,selectionOnDrag:x,selectionMode:S,onSelectionStart:m,onSelectionEnd:h,multiSelectionKeyCode:C,panActivationKeyCode:w,zoomActivationKeyCode:T,elementsSelectable:O,zoomOnScroll:F,zoomOnPinch:I,zoomOnDoubleClick:B,panOnScroll:L,panOnScrollSpeed:R,panOnScrollMode:z,panOnDrag:V,autoPanOnSelection:H,defaultViewport:k,translateExtent:A,minZoom:j,maxZoom:M,onSelectionContextMenu:p,preventScrolling:N,noDragClassName:le,noWheelClassName:ue,noPanClassName:de,disableKeyboardA11y:fe,onViewportChange:ge,isControlledViewport:ve,children:we}),t[43]=H,t[44]=k,t[45]=E,t[46]=fe,t[47]=O,t[48]=M,t[49]=j,t[50]=C,t[51]=le,t[52]=de,t[53]=ue,t[54]=ee,t[55]=ne,t[56]=U,t[57]=G,t[58]=W,t[59]=te,t[60]=p,t[61]=h,t[62]=m,t[63]=ge,t[64]=w,t[65]=V,t[66]=L,t[67]=z,t[68]=R,t[69]=K,t[70]=N,t[71]=b,t[72]=S,t[73]=x,t[74]=ve,t[75]=we,t[76]=A,t[77]=T,t[78]=B,t[79]=I,t[80]=F,t[81]=Te):Te=t[81],Te}pG.displayName=`GraphView`;var mG=(0,C.memo)(pG);function hG(e){"@babel/helpers - typeof";return hG=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},hG(e)}function gG(e,t){if(hG(e)!=`object`||!e)return e;var n;if(typeof Symbol<`u`&&(n=e[Symbol.toPrimitive])!==void 0){var r=n.call(e,t||`default`);if(hG(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function _G(e){var t=gG(e,`string`);return hG(t)==`symbol`?t:t+``}function vG(e,t,n){return(t=_G(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yG(e){return e?`${e.nodeId}-${e.id}-${e.type}`:``}function bG(e,t){return e===t||e&&t&&e.nodeId===t.nodeId&&e.id===t.id&&e.type===t.type}var xG=class{constructor(){vG(this,`nodeListeners`,new Map),vG(this,`edgeListeners`,new Map),vG(this,`handleListeners`,new Map)}subscribeToNode(e,t){return this.subscribe(this.nodeListeners,e,t)}subscribeToNodes(e,t){let n=Array.from(new Set(e),e=>this.subscribeToNode(e,t));return()=>n.forEach(e=>e())}publishNodes(e){this.notify(this.nodeListeners,e)}subscribeToEdge(e,t){return this.subscribe(this.edgeListeners,e,t)}subscribeToEdges(e,t){let n=Array.from(new Set(e),e=>this.subscribeToEdge(e,t));return()=>n.forEach(e=>e())}publishEdges(e){this.notify(this.edgeListeners,e)}subscribeToConnectionForHandle(e,t){return this.subscribe(this.handleListeners,yG(e),t)}publishConnectionClickStart(){this.notifyAll(this.handleListeners)}publishConnection(e,t){let n=new Set;bG(e.fromHandle,t.fromHandle)?(n.add(yG(e.fromHandle)),n.add(yG(e.toHandle)),n.add(yG(t.fromHandle)),n.add(yG(t.toHandle)),n.delete(yG(null)),this.notify(this.handleListeners,n)):this.notifyAll(this.handleListeners)}reset(){this.notifyAll(this.nodeListeners),this.notifyAll(this.edgeListeners),this.notifyAll(this.handleListeners)}subscribe(e,t,n){let r=e.get(t);return r||(r=new Set,e.set(t,r)),r.add(n),()=>{r.delete(n),r.size===0&&e.delete(t)}}notify(e,t){for(let n of t){let t=e.get(n);if(t)for(let e of t)e()}}notifyAll(e){for(let t of e.values())for(let e of t)e()}},SG=qR(`React Flow`,`https://reactflow.dev/`),CG=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,width:i,height:a,fitView:o,fitViewOptions:s,minZoom:c=.5,maxZoom:l=2,nodeOrigin:u,nodeExtent:d,zIndexMode:f=`basic`}={})=>{let p=new Map,m=new Map,h=new Map,g=new Map,_=r??t??[],v=n??e??[],y=u??[0,0],b=d??uR;mB(h,g,_);let{nodesInitialized:x}=tB(v,p,m,{nodeOrigin:y,nodeExtent:b,zIndexMode:f}),S=[0,0,1];if(o&&i&&a){let{x:e,y:t,zoom:n}=ez(ER(p,{filter:e=>!(!e.width&&!e.initialWidth||!e.height&&!e.initialHeight)}),i,a,c,l,s?.padding??`5%`);S=[e,t,n]}return{optionsStore:{rfId:`1`,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:n!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:l,translateExtent:uR,nodeExtent:b,nodesSelectionActive:!1,userSelectionActive:!1,connectionMode:pR.Strict,domNode:null,noPanClassName:`nopan`,nodeOrigin:y,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:o??!1,fitViewOptions:s,fitViewResolver:null,connectOnClick:!0,ariaLiveMessage:``,autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:SG,isValidConnection:void 0,onSelectionChangeHandlers:[],debug:!1,ariaLabelConfig:fR,zIndexMode:f,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,pubSub:new xG,defaultEdgeOptions:void 0,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0},viewportStore:{paneDragging:!1,width:i??0,height:a??0,transform:S},connectionStore:{connection:{...gR},connectionClickStartHandle:null},nodesStore:{nodes:v,nodesInitialized:x,nodeLookup:p,parentLookup:m},edgesStore:{edges:_,edgeLookup:g,connectionLookup:h},selectionStore:{userSelectionRect:null}}},wG=e=>{let t=CG(e),n=jV(()=>t.viewportStore),r=jV(()=>t.connectionStore),i=jV(()=>t.nodesStore),a=jV(()=>t.edgesStore),o=jV(()=>t.selectionStore),s=gR;function c(e){return s.inProgress?{...s,to:YR(s.to,e)}:s}function l(e){let{connection:t}=r.getState();s=e;let i=c(n.getState().transform);r.setState({connection:i}),u.getState().pubSub.publishConnection(t,i)}n.subscribe(({transform:e},t)=>{e!==t.transform&&s.inProgress&&r.setState({connection:c(e)})});let u=jV((e,c)=>{let u=0;async function d(){let{nodeLookup:t}=i.getState(),{panZoom:r,fitViewOptions:a,fitViewResolver:o,minZoom:s,maxZoom:l}=c(),{width:d,height:f}=n.getState();if(!r)return;let p=++u,m=await kR({nodes:t,width:d,height:f,panZoom:r,minZoom:s,maxZoom:l},a);p===u&&(o?.resolve(m),c().fitViewResolver===o&&e({fitViewResolver:null}))}return{...t.optionsStore,setNodes:t=>{let{nodeLookup:n,parentLookup:r}=i.getState(),{nodeOrigin:a,nodeExtent:o,elevateNodesOnSelect:s,fitViewQueued:l,zIndexMode:u,nodesSelectionActive:f,pubSub:p}=c(),{nodesInitialized:m,hasSelectedNodes:h,updatedNodes:g}=tB(t,n,r,{nodeOrigin:a,nodeExtent:o,elevateNodesOnSelect:s,checkEquality:!0,zIndexMode:u}),_=f&&h;l&&m?(d(),e({fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:_})):f!==_&&e({nodesSelectionActive:_}),i.setState({nodes:t,nodesInitialized:m}),p.publishNodes(g)},setEdges:e=>{let{connectionLookup:t,edgeLookup:n}=a.getState(),{updatedEdges:r}=mB(t,n,e);a.setState({edges:e}),c().pubSub.publishEdges(r)},setDefaultNodesAndEdges:(t,n)=>{if(t){let{setNodes:n}=c();n(t),e({hasDefaultNodes:!0})}if(n){let{setEdges:t}=c();t(n),e({hasDefaultEdges:!0})}},updateNodeInternals:t=>{let{emitNodeChanges:n,domNode:r,nodeOrigin:a,nodeExtent:o,fitViewQueued:s,zIndexMode:l,pubSub:u}=c(),{nodeLookup:f,parentLookup:p}=i.getState(),{changes:m,updatedInternals:h,updatedNodes:g}=lB(t,f,p,r,a,o,l);h&&(s&&(d(),e({fitViewQueued:!1,fitViewOptions:void 0})),i.setState({}),u.publishNodes(g),n(m))},updateNodePositions:(e,t=!1)=>{let n=[],r=[],{nodeLookup:a}=i.getState(),{emitNodeChanges:o,onNodesChangeMiddlewareMap:u}=c();for(let[i,o]of e){let e=a.get(i),c=!!(e?.expandParent&&e?.parentId&&o?.position),u={id:i,type:`position`,position:c?{x:Math.max(0,o.position.x),y:Math.max(0,o.position.y)}:o.position,dragging:t};if(e&&s.inProgress&&s.fromNode.id===e.id){let t=Wz(e,s.fromHandle,yR.Left,!0);l({...s,from:t})}c&&e.parentId&&n.push({id:i,parentId:e.parentId,rect:{...o.internals.positionAbsolute,width:o.measured.width??0,height:o.measured.height??0}}),r.push(u)}if(n.length>0){let{parentLookup:e}=i.getState(),{nodeOrigin:t}=c(),o=cB(n,a,e,t);r.push(...o)}for(let e of u.values())r=e(r);o(r)},emitNodeChanges:e=>{if(e.length===0)return;let{debug:t,onNodesChange:n,hasDefaultNodes:r}=c(),a=new DV(e);if(t&&console.log(`React Flow: queue node changes`,e),r){let{nodes:e}=i.getState(),{setNodes:t}=c();t(a.applyTo(e))}n?.(a)},emitEdgeChanges:e=>{if(e.length===0)return;let{debug:t,hasDefaultEdges:n,onEdgesChange:r}=c(),i=new OV(e);if(t&&console.log(`React Flow: queue edge changes`,e),n){let{setEdges:e}=c(),{edges:t}=a.getState();e(i.applyTo(t))}r?.(i)},addSelectedNodes:e=>{let{multiSelectionActive:t,emitNodeChanges:n,emitEdgeChanges:r}=c(),{edgeLookup:o}=a.getState(),{nodeLookup:s}=i.getState();t?n(e.map(e=>hV(e,!0))):(n(kV(s,new Set([...e]))),r(kV(o)))},addSelectedEdges:e=>{let{multiSelectionActive:t,emitNodeChanges:n,emitEdgeChanges:r}=c(),{edgeLookup:o}=a.getState(),{nodeLookup:s}=i.getState();t?r(e.map(e=>hV(e,!0))):(r(kV(o,new Set([...e]))),n(kV(s,new Set)))},unselectNodesAndEdges:({nodes:e,edges:t}={})=>{let{edges:n}=a.getState(),{nodes:r}=i.getState(),{emitNodeChanges:o,emitEdgeChanges:s}=c(),l=e||r,u=t||n,d=[];for(let e of l)e.selected&&d.push(hV(e.id,!1));let f=[];for(let e of u)e.selected&&f.push(hV(e.id,!1));o(d),s(f)},setMinZoom:t=>{let{panZoom:n,maxZoom:r}=c();n?.setScaleExtent([t,r]),e({minZoom:t})},setMaxZoom:t=>{let{panZoom:n,minZoom:r}=c();n?.setScaleExtent([r,t]),e({maxZoom:t})},setTranslateExtent:t=>{c().panZoom?.setTranslateExtent(t),e({translateExtent:t})},resetSelectedElements:()=>{let{edges:e}=a.getState(),{nodes:t}=i.getState(),{emitNodeChanges:n,emitEdgeChanges:r,elementsSelectable:o}=c();if(!o)return;let s=t.reduce((e,t)=>t.selected?[...e,hV(t.id,!1)]:e,[]),l=e.reduce((e,t)=>t.selected?[...e,hV(t.id,!1)]:e,[]);n(s),r(l)},setNodeExtent:t=>{let{nodes:n,nodeLookup:r,parentLookup:a}=i.getState(),{nodeOrigin:o,elevateNodesOnSelect:s,nodeExtent:l,zIndexMode:u,pubSub:d}=c();if(t[0][0]===l[0][0]&&t[0][1]===l[0][1]&&t[1][0]===l[1][0]&&t[1][1]===l[1][1])return;let{updatedNodes:f}=tB(n,r,a,{nodeOrigin:o,nodeExtent:t,elevateNodesOnSelect:s,checkEquality:!1,zIndexMode:u});e({nodeExtent:t}),i.setState({}),d.publishNodes(f)},panBy:e=>{let{transform:t,width:r,height:i}=n.getState(),{panZoom:a,translateExtent:o}=c();return uB({delta:e,panZoom:a,transform:t,translateExtent:o,width:r,height:i})},setCenter:async(e,t,r)=>{let{width:i,height:a}=n.getState(),{maxZoom:o,panZoom:s}=c();if(!s)return!1;let l=r?.zoom===void 0?o:r.zoom;return s.setViewport({x:i/2-e*l,y:a/2-t*l,zoom:l},{duration:r?.duration,ease:r?.ease,interpolate:r?.interpolate})},cancelConnection:()=>l(gR),updateConnection:e=>l(e),updateConnectionClickStart:e=>{r.setState({connectionClickStartHandle:e}),c().pubSub.publishConnectionClickStart()},reset:()=>{let t=CG();n.setState(t.viewportStore),s=gR,r.setState(t.connectionStore),i.setState(t.nodesStore),a.setState(t.edgesStore),o.setState(t.selectionStore);let{pubSub:l}=c();e({...t.optionsStore,pubSub:l}),l.reset()}}});return{optionsStore:u,viewportStore:n,connectionStore:r,nodesStore:i,edgesStore:a,selectionStore:o}};function TG(e){let t=(0,eR.c)(19),{initialNodes:n,initialEdges:r,defaultNodes:i,defaultEdges:a,initialWidth:o,initialHeight:s,initialMinZoom:c,initialMaxZoom:l,initialFitViewOptions:u,fitView:d,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:h}=e,g;t[0]!==a||t[1]!==i||t[2]!==r||t[3]!==d||t[4]!==u||t[5]!==s||t[6]!==l||t[7]!==c||t[8]!==p||t[9]!==f||t[10]!==n||t[11]!==o||t[12]!==m?(g=()=>wG({nodes:n,edges:r,defaultNodes:i,defaultEdges:a,width:o,height:s,fitView:d,minZoom:c,maxZoom:l,fitViewOptions:u,nodeOrigin:f,nodeExtent:p,zIndexMode:m}),t[0]=a,t[1]=i,t[2]=r,t[3]=d,t[4]=u,t[5]=s,t[6]=l,t[7]=c,t[8]=p,t[9]=f,t[10]=n,t[11]=o,t[12]=m,t[13]=g):g=t[13];let[_]=(0,C.useState)(g),v;t[14]===h?v=t[15]:(v=(0,Y.jsx)(BH,{children:(0,Y.jsx)(TU,{children:h})}),t[14]=h,t[15]=v);let y;return t[16]!==_||t[17]!==v?(y=(0,Y.jsx)(BV,{value:_,children:v}),t[16]=_,t[17]=v,t[18]=y):y=t[18],y}function EG(e){let t=(0,eR.c)(17),{children:n,nodes:r,edges:i,defaultNodes:a,defaultEdges:o,width:s,height:c,fitView:l,fitViewOptions:u,minZoom:d,maxZoom:f,nodeOrigin:p,nodeExtent:m,zIndexMode:h}=e;if((0,C.useContext)(zV)){let e;return t[0]===n?e=t[1]:(e=(0,Y.jsx)(Y.Fragment,{children:n}),t[0]=n,t[1]=e),e}let g;return t[2]!==n||t[3]!==o||t[4]!==a||t[5]!==i||t[6]!==l||t[7]!==u||t[8]!==c||t[9]!==f||t[10]!==d||t[11]!==m||t[12]!==p||t[13]!==r||t[14]!==s||t[15]!==h?(g=(0,Y.jsx)(TG,{initialNodes:r,initialEdges:i,defaultNodes:a,defaultEdges:o,initialWidth:s,initialHeight:c,fitView:l,initialFitViewOptions:u,initialMinZoom:d,initialMaxZoom:f,nodeOrigin:p,nodeExtent:m,zIndexMode:h,children:n}),t[2]=n,t[3]=o,t[4]=a,t[5]=i,t[6]=l,t[7]=u,t[8]=c,t[9]=f,t[10]=d,t[11]=m,t[12]=p,t[13]=r,t[14]=s,t[15]=h,t[16]=g):g=t[16],g}var DG={width:`100%`,height:`100%`,overflow:`hidden`,position:`relative`,zIndex:0};function OG(e,t){let n=(0,eR.c)(294),r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,ee,U,W,G,te,ne,K,re,q,ie,ae,oe,J,se,ce,le,ue,de,fe,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7],u=n[8],d=n[9],f=n[10],p=n[11],m=n[12],h=n[13],g=n[14],_=n[15],v=n[16],y=n[17],b=n[18],x=n[19],S=n[20],C=n[21],w=n[22],T=n[23],E=n[24],D=n[25],O=n[26],k=n[27],A=n[28],j=n[29],M=n[30],N=n[31],P=n[32],F=n[33],I=n[34],L=n[35],R=n[36],z=n[37],B=n[38],V=n[39],H=n[40],ee=n[41],U=n[42],W=n[43],G=n[44],te=n[45],ne=n[46],K=n[47],re=n[48],q=n[49],ie=n[50],ae=n[51],oe=n[52],J=n[53],se=n[54],ce=n[55],le=n[56],ue=n[57],de=n[58],fe=n[59],pe=n[60],me=n[61],he=n[62],ge=n[63],_e=n[64],ve=n[65],ye=n[66],be=n[67],xe=n[68],Se=n[69],Ce=n[70],we=n[71],Te=n[72],Ee=n[73],De=n[74],Oe=n[75],ke=n[76],Ae=n[77],je=n[78],Me=n[79],Ne=n[80],Pe=n[81],Fe=n[82],Ie=n[83],Le=n[84],Re=n[85],ze=n[86],Be=n[87],Ve=n[88],He=n[89],Ue=n[90],We=n[91],Ge=n[92],Ke=n[93],qe=n[94],Je=n[95],Ye=n[96],Xe=n[97],Ze=n[98],Qe=n[99],$e=n[100],et=n[101],tt=n[102],nt=n[103],rt=n[104],it=n[105],at=n[106],ot=n[107],st=n[108],ct=n[109],lt=n[110],ut=n[111],dt=n[112],ft=n[113],pt=n[114],mt=n[115],ht=n[116],gt=n[117],_t=n[118],vt=n[119],yt=n[120],bt=n[121],xt=n[122],St=n[123],Ct=n[124],wt=n[125],Tt=n[126],Et=n[127]):({nodes:F,edges:C,defaultNodes:x,defaultEdges:b,className:u,nodeTypes:P,edgeTypes:S,onNodeClick:ue,onEdgeClick:G,onInit:J,onMove:se,onMoveStart:le,onMoveEnd:ce,onConnect:H,onConnectStart:U,onConnectEnd:ee,onClickConnectStart:V,onClickConnectEnd:B,onNodeMouseEnter:ge,onNodeMouseMove:ve,onNodeMouseLeave:_e,onNodeContextMenu:de,onNodeDoubleClick:fe,onNodeDragStart:me,onNodeDrag:pe,onNodeDragStop:he,onNodesDelete:be,onEdgesDelete:ae,onDelete:W,onSelectionChange:je,onSelectionDragStart:Pe,onSelectionDrag:Ne,onSelectionDragStop:Fe,onSelectionContextMenu:Me,onSelectionStart:Le,onSelectionEnd:Ie,onBeforeDelete:z,connectionMode:g,connectionLineType:Ge,connectionLineStyle:h,connectionLineComponent:p,connectionLineContainerStyle:m,deleteKeyCode:nt,selectionKeyCode:pt,selectionOnDrag:yt,selectionMode:bt,panActivationKeyCode:xt,multiSelectionKeyCode:St,zoomActivationKeyCode:Ct,snapToGrid:Ue,snapGrid:He,onlyRenderVisibleElements:wt,selectNodesOnDrag:Ve,nodesDraggable:L,autoPanOnNodeFocus:s,nodesConnectable:I,nodesFocusable:R,nodeOrigin:Ke,edgesFocusable:w,edgesReconnectable:T,elementsSelectable:qe,defaultViewport:Je,minZoom:Ye,maxZoom:Xe,translateExtent:Ze,preventScrolling:Qe,nodeExtent:N,defaultMarkerColor:$e,zoomOnScroll:et,zoomOnPinch:tt,panOnScroll:rt,panOnScrollSpeed:it,panOnScrollMode:at,zoomOnDoubleClick:ot,panOnDrag:st,onPaneClick:xe,onPaneMouseEnter:Ce,onPaneMouseMove:Te,onPaneMouseLeave:we,onPaneScroll:Ee,onPaneContextMenu:Se,paneDragThreshold:ct,children:l,onReconnect:De,onReconnectStart:ke,onReconnectEnd:Oe,onEdgeContextMenu:te,onEdgeDoubleClick:ne,onEdgeMouseEnter:K,onEdgeMouseMove:q,onEdgeMouseLeave:re,reconnectRadius:lt,onNodesChange:ye,onEdgesChange:ie,noDragClassName:ut,noWheelClassName:dt,noPanClassName:ft,fitView:E,fitViewOptions:D,connectOnClick:d,attributionPosition:i,proOptions:ze,defaultEdgeOptions:y,elevateNodesOnSelect:mt,elevateEdgesOnSelect:ht,disableKeyboardA11y:gt,autoPanOnConnect:a,autoPanOnNodeDrag:o,autoPanOnSelection:_t,autoPanSpeed:c,connectionRadius:_,isValidConnection:j,onError:oe,style:We,id:A,nodeDragThreshold:M,connectionDragThreshold:f,viewport:Tt,onViewportChange:Re,width:Et,height:k,forceColorMode:O,debug:v,onScroll:Ae,ariaLabelConfig:r,zIndexMode:vt,...Be}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l,n[8]=u,n[9]=d,n[10]=f,n[11]=p,n[12]=m,n[13]=h,n[14]=g,n[15]=_,n[16]=v,n[17]=y,n[18]=b,n[19]=x,n[20]=S,n[21]=C,n[22]=w,n[23]=T,n[24]=E,n[25]=D,n[26]=O,n[27]=k,n[28]=A,n[29]=j,n[30]=M,n[31]=N,n[32]=P,n[33]=F,n[34]=I,n[35]=L,n[36]=R,n[37]=z,n[38]=B,n[39]=V,n[40]=H,n[41]=ee,n[42]=U,n[43]=W,n[44]=G,n[45]=te,n[46]=ne,n[47]=K,n[48]=re,n[49]=q,n[50]=ie,n[51]=ae,n[52]=oe,n[53]=J,n[54]=se,n[55]=ce,n[56]=le,n[57]=ue,n[58]=de,n[59]=fe,n[60]=pe,n[61]=me,n[62]=he,n[63]=ge,n[64]=_e,n[65]=ve,n[66]=ye,n[67]=be,n[68]=xe,n[69]=Se,n[70]=Ce,n[71]=we,n[72]=Te,n[73]=Ee,n[74]=De,n[75]=Oe,n[76]=ke,n[77]=Ae,n[78]=je,n[79]=Me,n[80]=Ne,n[81]=Pe,n[82]=Fe,n[83]=Ie,n[84]=Le,n[85]=Re,n[86]=ze,n[87]=Be,n[88]=Ve,n[89]=He,n[90]=Ue,n[91]=We,n[92]=Ge,n[93]=Ke,n[94]=qe,n[95]=Je,n[96]=Ye,n[97]=Xe,n[98]=Ze,n[99]=Qe,n[100]=$e,n[101]=et,n[102]=tt,n[103]=nt,n[104]=rt,n[105]=it,n[106]=at,n[107]=ot,n[108]=st,n[109]=ct,n[110]=lt,n[111]=ut,n[112]=dt,n[113]=ft,n[114]=pt,n[115]=mt,n[116]=ht,n[117]=gt,n[118]=_t,n[119]=vt,n[120]=yt,n[121]=bt,n[122]=xt,n[123]=St,n[124]=Ct,n[125]=wt,n[126]=Tt,n[127]=Et);let Dt=Ge===void 0?_R.Bezier:Ge,Ot=nt===void 0?`Backspace`:nt,kt=pt===void 0?`Shift`:pt,At=yt!==void 0&&yt,jt=bt===void 0?hR.Full:bt,Mt=xt===void 0?`Space`:xt,Nt=St===void 0?tz()?`Meta`:`Control`:St,Pt=Ct===void 0?tz()?`Meta`:`Control`:Ct,Ft=wt!==void 0&&wt,It=Ke===void 0?vH:Ke,Lt=qe===void 0||qe,Rt=Je===void 0?yH:Je,zt=Ye===void 0?.5:Ye,Bt=Xe===void 0?2:Xe,Vt=Ze===void 0?uR:Ze,Ht=Qe===void 0||Qe,Ut=$e===void 0?`#b1b1b7`:$e,Wt=et===void 0||et,Gt=tt===void 0||tt,Kt=rt!==void 0&&rt,qt=it===void 0?.5:it,Jt=at===void 0?mR.Free:at,Yt=ot===void 0||ot,Xt=st===void 0||st,Zt=ct===void 0?1:ct,Qt=lt===void 0?10:lt,$t=ut===void 0?`nodrag`:ut,en=dt===void 0?`nowheel`:dt,tn=ft===void 0?`nopan`:ft,nn=mt===void 0||mt,rn=ht===void 0||ht,an=gt!==void 0&>,on=_t===void 0||_t,sn=vt===void 0?`basic`:vt,cn=A||`1`,ln;n[128]===Ae?ln=n[129]:(ln=e=>{e.currentTarget.scrollTo({top:0,left:0,behavior:`instant`}),Ae?.(e)},n[128]=Ae,n[129]=ln);let un=ln,dn;n[130]===We?dn=n[131]:(dn={...We,...DG},n[130]=We,n[131]=dn);let fn;n[132]!==u||n[133]!==O?(fn=tR([`react-flow`,O,u]),n[132]=u,n[133]=O,n[134]=fn):fn=n[134];let pn;n[135]!==r||n[136]!==a||n[137]!==o||n[138]!==s||n[139]!==c||n[140]!==d||n[141]!==f||n[142]!==g||n[143]!==_||n[144]!==v||n[145]!==y||n[146]!==b||n[147]!==x||n[148]!==C||n[149]!==w||n[150]!==T||n[151]!==Lt||n[152]!==rn||n[153]!==nn||n[154]!==E||n[155]!==D||n[156]!==j||n[157]!==Bt||n[158]!==zt||n[159]!==tn||n[160]!==M||n[161]!==N||n[162]!==It||n[163]!==F||n[164]!==I||n[165]!==L||n[166]!==R||n[167]!==z||n[168]!==B||n[169]!==V||n[170]!==H||n[171]!==ee||n[172]!==U||n[173]!==W||n[174]!==ie||n[175]!==ae||n[176]!==oe||n[177]!==se||n[178]!==ce||n[179]!==le||n[180]!==pe||n[181]!==me||n[182]!==he||n[183]!==ye||n[184]!==be||n[185]!==Ne||n[186]!==Pe||n[187]!==Fe||n[188]!==cn||n[189]!==Ve||n[190]!==He||n[191]!==Ue||n[192]!==Vt||n[193]!==sn?(pn=(0,Y.jsx)(SH,{nodes:F,edges:C,defaultNodes:x,defaultEdges:b,onConnect:H,onConnectStart:U,onConnectEnd:ee,onClickConnectStart:V,onClickConnectEnd:B,nodesDraggable:L,autoPanOnNodeFocus:s,nodesConnectable:I,nodesFocusable:R,edgesFocusable:w,edgesReconnectable:T,elementsSelectable:Lt,elevateNodesOnSelect:nn,elevateEdgesOnSelect:rn,minZoom:zt,maxZoom:Bt,nodeExtent:N,onNodesChange:ye,onEdgesChange:ie,snapToGrid:Ue,snapGrid:He,connectionMode:g,translateExtent:Vt,connectOnClick:d,defaultEdgeOptions:y,fitView:E,fitViewOptions:D,onNodesDelete:be,onEdgesDelete:ae,onDelete:W,onNodeDragStart:me,onNodeDrag:pe,onNodeDragStop:he,onSelectionDrag:Ne,onSelectionDragStart:Pe,onSelectionDragStop:Fe,onMove:se,onMoveStart:le,onMoveEnd:ce,noPanClassName:tn,nodeOrigin:It,rfId:cn,autoPanOnConnect:a,autoPanOnNodeDrag:o,autoPanSpeed:c,onError:oe,connectionRadius:_,isValidConnection:j,selectNodesOnDrag:Ve,nodeDragThreshold:M,connectionDragThreshold:f,onBeforeDelete:z,debug:v,ariaLabelConfig:r,zIndexMode:sn}),n[135]=r,n[136]=a,n[137]=o,n[138]=s,n[139]=c,n[140]=d,n[141]=f,n[142]=g,n[143]=_,n[144]=v,n[145]=y,n[146]=b,n[147]=x,n[148]=C,n[149]=w,n[150]=T,n[151]=Lt,n[152]=rn,n[153]=nn,n[154]=E,n[155]=D,n[156]=j,n[157]=Bt,n[158]=zt,n[159]=tn,n[160]=M,n[161]=N,n[162]=It,n[163]=F,n[164]=I,n[165]=L,n[166]=R,n[167]=z,n[168]=B,n[169]=V,n[170]=H,n[171]=ee,n[172]=U,n[173]=W,n[174]=ie,n[175]=ae,n[176]=oe,n[177]=se,n[178]=ce,n[179]=le,n[180]=pe,n[181]=me,n[182]=he,n[183]=ye,n[184]=be,n[185]=Ne,n[186]=Pe,n[187]=Fe,n[188]=cn,n[189]=Ve,n[190]=He,n[191]=Ue,n[192]=Vt,n[193]=sn,n[194]=pn):pn=n[194];let mn;n[195]!==on||n[196]!==p||n[197]!==m||n[198]!==h||n[199]!==Dt||n[200]!==Ut||n[201]!==Rt||n[202]!==Ot||n[203]!==an||n[204]!==S||n[205]!==Bt||n[206]!==zt||n[207]!==Nt||n[208]!==$t||n[209]!==tn||n[210]!==en||n[211]!==N||n[212]!==P||n[213]!==L||n[214]!==G||n[215]!==te||n[216]!==ne||n[217]!==K||n[218]!==re||n[219]!==q||n[220]!==J||n[221]!==ue||n[222]!==de||n[223]!==fe||n[224]!==ge||n[225]!==_e||n[226]!==ve||n[227]!==xe||n[228]!==Se||n[229]!==Ce||n[230]!==we||n[231]!==Te||n[232]!==Ee||n[233]!==De||n[234]!==Oe||n[235]!==ke||n[236]!==Me||n[237]!==Ie||n[238]!==Le||n[239]!==Re||n[240]!==Ft||n[241]!==Mt||n[242]!==Xt||n[243]!==Kt||n[244]!==Jt||n[245]!==qt||n[246]!==Zt||n[247]!==Ht||n[248]!==Qt||n[249]!==cn||n[250]!==kt||n[251]!==jt||n[252]!==At||n[253]!==Vt||n[254]!==Tt||n[255]!==Pt||n[256]!==Yt||n[257]!==Gt||n[258]!==Wt?(mn=(0,Y.jsx)(mG,{onInit:J,onNodeClick:ue,onEdgeClick:G,onNodeMouseEnter:ge,onNodeMouseMove:ve,onNodeMouseLeave:_e,onNodeContextMenu:de,onNodeDoubleClick:fe,nodeTypes:P,edgeTypes:S,connectionLineType:Dt,connectionLineStyle:h,connectionLineComponent:p,connectionLineContainerStyle:m,selectionKeyCode:kt,selectionOnDrag:At,selectionMode:jt,deleteKeyCode:Ot,multiSelectionKeyCode:Nt,panActivationKeyCode:Mt,zoomActivationKeyCode:Pt,onlyRenderVisibleElements:Ft,defaultViewport:Rt,translateExtent:Vt,minZoom:zt,maxZoom:Bt,preventScrolling:Ht,zoomOnScroll:Wt,zoomOnPinch:Gt,zoomOnDoubleClick:Yt,panOnScroll:Kt,panOnScrollSpeed:qt,panOnScrollMode:Jt,panOnDrag:Xt,autoPanOnSelection:on,onPaneClick:xe,onPaneMouseEnter:Ce,onPaneMouseMove:Te,onPaneMouseLeave:we,onPaneScroll:Ee,onPaneContextMenu:Se,paneDragThreshold:Zt,onSelectionContextMenu:Me,onSelectionStart:Le,onSelectionEnd:Ie,onReconnect:De,onReconnectStart:ke,onReconnectEnd:Oe,onEdgeContextMenu:te,onEdgeDoubleClick:ne,onEdgeMouseEnter:K,onEdgeMouseMove:q,onEdgeMouseLeave:re,reconnectRadius:Qt,defaultMarkerColor:Ut,noDragClassName:$t,noWheelClassName:en,noPanClassName:tn,rfId:cn,disableKeyboardA11y:an,nodeExtent:N,viewport:Tt,onViewportChange:Re,nodesDraggable:L}),n[195]=on,n[196]=p,n[197]=m,n[198]=h,n[199]=Dt,n[200]=Ut,n[201]=Rt,n[202]=Ot,n[203]=an,n[204]=S,n[205]=Bt,n[206]=zt,n[207]=Nt,n[208]=$t,n[209]=tn,n[210]=en,n[211]=N,n[212]=P,n[213]=L,n[214]=G,n[215]=te,n[216]=ne,n[217]=K,n[218]=re,n[219]=q,n[220]=J,n[221]=ue,n[222]=de,n[223]=fe,n[224]=ge,n[225]=_e,n[226]=ve,n[227]=xe,n[228]=Se,n[229]=Ce,n[230]=we,n[231]=Te,n[232]=Ee,n[233]=De,n[234]=Oe,n[235]=ke,n[236]=Me,n[237]=Ie,n[238]=Le,n[239]=Re,n[240]=Ft,n[241]=Mt,n[242]=Xt,n[243]=Kt,n[244]=Jt,n[245]=qt,n[246]=Zt,n[247]=Ht,n[248]=Qt,n[249]=cn,n[250]=kt,n[251]=jt,n[252]=At,n[253]=Vt,n[254]=Tt,n[255]=Pt,n[256]=Yt,n[257]=Gt,n[258]=Wt,n[259]=mn):mn=n[259];let hn;n[260]===je?hn=n[261]:(hn=(0,Y.jsx)(_H,{onSelectionChange:je}),n[260]=je,n[261]=hn);let gn;n[262]!==i||n[263]!==ze?(gn=(0,Y.jsx)(lH,{proOptions:ze,position:i}),n[262]=i,n[263]=ze,n[264]=gn):gn=n[264];let _n;n[265]!==an||n[266]!==cn?(_n=(0,Y.jsx)(aH,{rfId:cn,disableKeyboardA11y:an}),n[265]=an,n[266]=cn,n[267]=_n):_n=n[267];let vn;n[268]!==l||n[269]!==C||n[270]!==E||n[271]!==D||n[272]!==k||n[273]!==Bt||n[274]!==zt||n[275]!==N||n[276]!==It||n[277]!==F||n[278]!==pn||n[279]!==mn||n[280]!==hn||n[281]!==gn||n[282]!==_n||n[283]!==Et||n[284]!==sn?(vn=(0,Y.jsxs)(EG,{nodes:F,edges:C,width:Et,height:k,fitView:E,fitViewOptions:D,minZoom:zt,maxZoom:Bt,nodeOrigin:It,nodeExtent:N,zIndexMode:sn,children:[pn,mn,hn,l,gn,_n]}),n[268]=l,n[269]=C,n[270]=E,n[271]=D,n[272]=k,n[273]=Bt,n[274]=zt,n[275]=N,n[276]=It,n[277]=F,n[278]=pn,n[279]=mn,n[280]=hn,n[281]=gn,n[282]=_n,n[283]=Et,n[284]=sn,n[285]=vn):vn=n[285];let yn;return n[286]!==A||n[287]!==t||n[288]!==Be||n[289]!==dn||n[290]!==fn||n[291]!==vn||n[292]!==un?(yn=(0,Y.jsx)(`div`,{"data-testid":`rf__wrapper`,...Be,onScroll:un,style:dn,ref:t,className:fn,id:A,role:`application`,children:vn}),n[286]=A,n[287]=t,n[288]=Be,n[289]=dn,n[290]=fn,n[291]=vn,n[292]=un,n[293]=yn):yn=n[293],yn}var kG=PH(OG);function AG(e){let t=(0,eR.c)(3),[n,r]=(0,C.useState)(e),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=e=>r(t=>e.applyTo(t)),t[0]=i):i=t[0];let a=i,o;return t[1]===n?o=t[2]:(o=[n,r,a],t[1]=n,t[2]=o),o}function jG(e){let t=(0,eR.c)(3),[n,r]=(0,C.useState)(e),i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=e=>r(t=>e.applyTo(t)),t[0]=i):i=t[0];let a=i,o;return t[1]===n?o=t[2]:(o=[n,r,a],t[1]=n,t[2]=o),o}lR.error014();function MG(e){let t=(0,eR.c)(7),{dimensions:n,lineWidth:r,variant:i,className:a}=e,o=`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`,s;t[0]!==a||t[1]!==i?(s=tR([`react-flow__background-pattern`,i,a]),t[0]=a,t[1]=i,t[2]=s):s=t[2];let c;return t[3]!==r||t[4]!==o||t[5]!==s?(c=(0,Y.jsx)(`path`,{strokeWidth:r,d:o,className:s}),t[3]=r,t[4]=o,t[5]=s,t[6]=c):c=t[6],c}function NG(e){let t=(0,eR.c)(5),{radius:n,className:r}=e,i;t[0]===r?i=t[1]:(i=tR([`react-flow__background-pattern`,`dots`,r]),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,Y.jsx)(`circle`,{cx:n,cy:n,r:n,className:i}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}var PG=function(e){return e.Lines=`lines`,e.Dots=`dots`,e.Cross=`cross`,e}({}),FG={dots:1,lines:1,cross:6};function IG(e){let t=(0,eR.c)(42),{id:n,variant:r,gap:i,size:a,lineWidth:o,offset:s,color:c,bgColor:l,style:u,className:d,patternClassName:f}=e,p=r===void 0?`dots`:r,m=i===void 0?20:i,h=o===void 0?1:o,g=s===void 0?0:s,_=(0,C.useRef)(null),v=`pattern-${GV(RG)}`,y=qV(LG),b=a||FG[p],x=p===`dots`,S=p===`cross`,w;t[0]===m?w=t[1]:(w=Array.isArray(m)?m:[m,m],t[0]=m,t[1]=w);let T=w,E=T[0]*y[2]||1,D=T[1]*y[2]||1,O;t[2]!==E||t[3]!==D?(O=[E,D],t[2]=E,t[3]=D,t[4]=O):O=t[4];let k=O,A=b*y[2],j;t[5]===g?j=t[6]:(j=Array.isArray(g)?g:[g,g],t[5]=g,t[6]=j);let M=j,N;t[7]!==S||t[8]!==k||t[9]!==A?(N=S?[A,A]:k,t[7]=S,t[8]=k,t[9]=A,t[10]=N):N=t[10];let P=N,F=M[0]*y[2]+P[0]/2,I=M[1]*y[2]+P[1]/2,L;t[11]!==F||t[12]!==I?(L=[F,I],t[11]=F,t[12]=I,t[13]=L):L=t[13];let R=L,z=`${v}${n||``}`,B;t[14]===d?B=t[15]:(B=tR([`react-flow__background`,d]),t[14]=d,t[15]=B);let V;t[16]!==l||t[17]!==c||t[18]!==u?(V={...u,...tU,"--xy-background-color-props":l,"--xy-background-pattern-color-props":c},t[16]=l,t[17]=c,t[18]=u,t[19]=V):V=t[19];let H=V,ee=y[0]%k[0],U=y[1]%k[1],W=`translate(-${R[0]},-${R[1]})`,G;t[20]!==x||t[21]!==h||t[22]!==f||t[23]!==P||t[24]!==A||t[25]!==p?(G=x?(0,Y.jsx)(NG,{radius:A/2,className:f}):(0,Y.jsx)(MG,{dimensions:P,lineWidth:h,variant:p,className:f}),t[20]=x,t[21]=h,t[22]=f,t[23]=P,t[24]=A,t[25]=p,t[26]=G):G=t[26];let te;t[27]!==z||t[28]!==k[0]||t[29]!==k[1]||t[30]!==ee||t[31]!==U||t[32]!==W||t[33]!==G?(te=(0,Y.jsx)(`pattern`,{id:z,x:ee,y:U,width:k[0],height:k[1],patternUnits:`userSpaceOnUse`,patternTransform:W,children:G}),t[27]=z,t[28]=k[0],t[29]=k[1],t[30]=ee,t[31]=U,t[32]=W,t[33]=G,t[34]=te):te=t[34];let ne=`url(#${z})`,K;t[35]===ne?K=t[36]:(K=(0,Y.jsx)(`rect`,{x:`0`,y:`0`,width:`100%`,height:`100%`,fill:ne}),t[35]=ne,t[36]=K);let re;return t[37]!==B||t[38]!==H||t[39]!==te||t[40]!==K?(re=(0,Y.jsxs)(`svg`,{className:B,style:H,ref:_,"data-testid":`rf__background`,children:[te,K]}),t[37]=B,t[38]=H,t[39]=te,t[40]=K,t[41]=re):re=t[41],re}function LG(e){return e.transform}function RG(e){return e.rfId}IG.displayName=`Background`;var zG=(0,C.memo)(IG);function BG(){let e=(0,eR.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 32`,children:(0,Y.jsx)(`path`,{d:`M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z`})}),e[0]=t):t=e[0],t}function VG(){let e=(0,eR.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 5`,children:(0,Y.jsx)(`path`,{d:`M0 0h32v4.2H0z`})}),e[0]=t):t=e[0],t}function HG(){let e=(0,eR.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 32 30`,children:(0,Y.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`})}),e[0]=t):t=e[0],t}function UG(){let e=(0,eR.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,Y.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`})}),e[0]=t):t=e[0],t}function WG(){let e=(0,eR.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 25 32`,children:(0,Y.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`})}),e[0]=t):t=e[0],t}function GG(e){let t=(0,eR.c)(10),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,className:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=tR([`react-flow__controls-button`,r]),t[4]=r,t[5]=a);let o;return t[6]!==n||t[7]!==i||t[8]!==a?(o=(0,Y.jsx)(`button`,{type:`button`,className:a,...i,children:n}),t[6]=n,t[7]=i,t[8]=a,t[9]=o):o=t[9],o}function KG(e){let t=(0,eR.c)(46),{style:n,showZoom:r,showFitView:i,showInteractive:a,fitViewOptions:o,onZoomIn:s,onZoomOut:c,onFitView:l,onInteractiveChange:u,className:d,children:f,position:p,orientation:m,"aria-label":h}=e,g=r===void 0||r,_=i===void 0||i,v=a===void 0||a,y=p===void 0?`bottom-left`:p,b=m===void 0?`vertical`:m,{optionsStore:x}=KV(),S=GV(QG),C=GV(ZG),w=GV(XG),T=GV(YG),E=GV(JG),D=GV(qG),O=S||C||w,k;t[0]===T?k=t[1]:(k=e=>e.transform[2]<=T,t[0]=T,t[1]=k);let A=qV(k),j;t[2]===E?j=t[3]:(j=e=>e.transform[2]>=E,t[2]=E,t[3]=j);let M=qV(j),{zoomIn:N,zoomOut:P,fitView:F}=UH(),I;t[4]!==s||t[5]!==N?(I=()=>{N(),s?.()},t[4]=s,t[5]=N,t[6]=I):I=t[6];let L=I,R;t[7]!==c||t[8]!==P?(R=()=>{P(),c?.()},t[7]=c,t[8]=P,t[9]=R):R=t[9];let z=R,B;t[10]!==F||t[11]!==o||t[12]!==l?(B=()=>{F(o),l?.()},t[10]=F,t[11]=o,t[12]=l,t[13]=B):B=t[13];let V=B,H;t[14]!==O||t[15]!==u||t[16]!==x?(H=()=>{x.setState({nodesDraggable:!O,nodesConnectable:!O,elementsSelectable:!O}),u?.(!O)},t[14]=O,t[15]=u,t[16]=x,t[17]=H):H=t[17];let ee=H,U=b===`horizontal`?`horizontal`:`vertical`,W;t[18]!==d||t[19]!==U?(W=tR([`react-flow__controls`,U,d]),t[18]=d,t[19]=U,t[20]=W):W=t[20];let G=h??D[`controls.ariaLabel`],te;t[21]!==D||t[22]!==M||t[23]!==A||t[24]!==L||t[25]!==z||t[26]!==g?(te=g&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(GG,{onClick:L,className:`react-flow__controls-zoomin`,title:D[`controls.zoomIn.ariaLabel`],"aria-label":D[`controls.zoomIn.ariaLabel`],disabled:M,children:(0,Y.jsx)(BG,{})}),(0,Y.jsx)(GG,{onClick:z,className:`react-flow__controls-zoomout`,title:D[`controls.zoomOut.ariaLabel`],"aria-label":D[`controls.zoomOut.ariaLabel`],disabled:A,children:(0,Y.jsx)(VG,{})})]}),t[21]=D,t[22]=M,t[23]=A,t[24]=L,t[25]=z,t[26]=g,t[27]=te):te=t[27];let ne;t[28]!==D||t[29]!==V||t[30]!==_?(ne=_&&(0,Y.jsx)(GG,{className:`react-flow__controls-fitview`,onClick:V,title:D[`controls.fitView.ariaLabel`],"aria-label":D[`controls.fitView.ariaLabel`],children:(0,Y.jsx)(HG,{})}),t[28]=D,t[29]=V,t[30]=_,t[31]=ne):ne=t[31];let K;t[32]!==D||t[33]!==O||t[34]!==ee||t[35]!==v?(K=v&&(0,Y.jsx)(GG,{className:`react-flow__controls-interactive`,onClick:ee,title:D[`controls.interactive.ariaLabel`],"aria-label":D[`controls.interactive.ariaLabel`],children:(0,Y.jsx)(O?WG:UG,{})}),t[32]=D,t[33]=O,t[34]=ee,t[35]=v,t[36]=K):K=t[36];let re;return t[37]!==f||t[38]!==y||t[39]!==n||t[40]!==W||t[41]!==G||t[42]!==te||t[43]!==ne||t[44]!==K?(re=(0,Y.jsxs)(sH,{className:W,position:y,style:n,"data-testid":`rf__controls`,"aria-label":G,children:[te,ne,K,f]}),t[37]=f,t[38]=y,t[39]=n,t[40]=W,t[41]=G,t[42]=te,t[43]=ne,t[44]=K,t[45]=re):re=t[45],re}function qG(e){return e.ariaLabelConfig}function JG(e){return e.maxZoom}function YG(e){return e.minZoom}function XG(e){return e.elementsSelectable}function ZG(e){return e.nodesConnectable}function QG(e){return e.nodesDraggable}KG.displayName=`Controls`;var $G=(0,C.memo)(KG);function eK(e){let t=(0,eR.c)(22),{id:n,x:r,y:i,width:a,height:o,style:s,color:c,strokeColor:l,strokeWidth:u,className:d,borderRadius:f,shapeRendering:p,selected:m,onClick:h}=e,g;t[0]===s?g=t[1]:(g=s||{},t[0]=s,t[1]=g);let{background:_,backgroundColor:v}=g,y=c||_||v,b;t[2]!==d||t[3]!==m?(b=tR([`react-flow__minimap-node`,{selected:m},d]),t[2]=d,t[3]=m,t[4]=b):b=t[4];let x;t[5]!==y||t[6]!==l||t[7]!==u?(x={fill:y,stroke:l,strokeWidth:u},t[5]=y,t[6]=l,t[7]=u,t[8]=x):x=t[8];let S;t[9]!==n||t[10]!==h?(S=h?e=>h(e,n):void 0,t[9]=n,t[10]=h,t[11]=S):S=t[11];let C;return t[12]!==f||t[13]!==o||t[14]!==p||t[15]!==b||t[16]!==x||t[17]!==S||t[18]!==a||t[19]!==r||t[20]!==i?(C=(0,Y.jsx)(`rect`,{className:b,x:r,y:i,rx:f,ry:f,width:a,height:o,style:x,shapeRendering:p,onClick:S}),t[12]=f,t[13]=o,t[14]=p,t[15]=b,t[16]=x,t[17]=S,t[18]=a,t[19]=r,t[20]=i,t[21]=C):C=t[21],C}var tK=(0,C.memo)(eK),nK=e=>e.nodes.map(e=>e.id),rK=e=>e instanceof Function?e:()=>e;function iK(e){let t=(0,eR.c)(25),{nodeStrokeColor:n,nodeColor:r,nodeClassName:i,nodeBorderRadius:a,nodeStrokeWidth:o,nodeComponent:s,onClick:c}=e,l=i===void 0?``:i,u=a===void 0?5:a,d=s===void 0?tK:s,f=YV(HV(nK)),p;t[0]===r?p=t[1]:(p=rK(r),t[0]=r,t[1]=p);let m=p,h;t[2]===n?h=t[3]:(h=rK(n),t[2]=n,t[3]=h);let g=h,_;t[4]===l?_=t[5]:(_=rK(l),t[4]=l,t[5]=_);let v=_,y=typeof window>`u`||`chrome`in window&&window.chrome?`crispEdges`:`geometricPrecision`,b;if(t[6]!==d||t[7]!==u||t[8]!==v||t[9]!==m||t[10]!==f||t[11]!==g||t[12]!==o||t[13]!==c){let e;t[15]!==d||t[16]!==u||t[17]!==v||t[18]!==m||t[19]!==g||t[20]!==o||t[21]!==c?(e=e=>(0,Y.jsx)(oK,{id:e,nodeColorFunc:m,nodeStrokeColorFunc:g,nodeClassNameFunc:v,nodeBorderRadius:u,nodeStrokeWidth:o,NodeComponent:d,onClick:c,shapeRendering:y},e),t[15]=d,t[16]=u,t[17]=v,t[18]=m,t[19]=g,t[20]=o,t[21]=c,t[22]=e):e=t[22],b=f.map(e),t[6]=d,t[7]=u,t[8]=v,t[9]=m,t[10]=f,t[11]=g,t[12]=o,t[13]=c,t[14]=b}else b=t[14];let x;return t[23]===b?x=t[24]:(x=(0,Y.jsx)(Y.Fragment,{children:b}),t[23]=b,t[24]=x),x}function aK(e){let t=(0,eR.c)(27),{id:n,nodeColorFunc:r,nodeStrokeColorFunc:i,nodeClassNameFunc:a,nodeBorderRadius:o,nodeStrokeWidth:s,shapeRendering:c,NodeComponent:l,onClick:u}=e,d=$U(n);if(!d||d.hidden)return null;let f;t[0]===d?f=t[1]:(f=rz(d),t[0]=d,t[1]=f);let{width:p,height:m}=f;if(p===0||m===0)return null;let h=d.internals.userNode,{x:g,y:_}=d.internals.positionAbsolute,v=h.style,y=!!h.selected,b;t[2]!==h||t[3]!==a?(b=a(h),t[2]=h,t[3]=a,t[4]=b):b=t[4];let x;t[5]!==h||t[6]!==r?(x=r(h),t[5]=h,t[6]=r,t[7]=x):x=t[7];let S;t[8]!==h||t[9]!==i?(S=i(h),t[8]=h,t[9]=i,t[10]=S):S=t[10];let C;return t[11]!==l||t[12]!==m||t[13]!==h.id||t[14]!==h.style||t[15]!==o||t[16]!==s||t[17]!==u||t[18]!==c||t[19]!==y||t[20]!==b||t[21]!==x||t[22]!==S||t[23]!==p||t[24]!==g||t[25]!==_?(C=(0,Y.jsx)(l,{x:g,y:_,width:p,height:m,style:v,selected:y,className:b,color:x,borderRadius:o,strokeColor:S,strokeWidth:s,shapeRendering:c,onClick:u,id:h.id}),t[11]=l,t[12]=m,t[13]=h.id,t[14]=h.style,t[15]=o,t[16]=s,t[17]=u,t[18]=c,t[19]=y,t[20]=b,t[21]=x,t[22]=S,t[23]=p,t[24]=g,t[25]=_,t[26]=C):C=t[26],C}var oK=(0,C.memo)(aK),sK=(0,C.memo)(iK),cK=e=>!e.hidden,lK=({transform:e,width:t,height:n})=>({transform:e,width:t,height:n}),uK=(e,t)=>{let n={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]},r=!1;for(let t of e.nodeLookup.values())if(!t.hidden){r=!0;break}return{viewBB:n,boundingRect:r?HR(ER(e.nodeLookup,{filter:cK}),n):n,flowWidth:t.width,flowHeight:t.height}},dK=(e,t)=>e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height,fK=(e,t)=>dK(e.viewBB,t.viewBB)&&dK(e.boundingRect,t.boundingRect)&&e.flowWidth===t.flowWidth&&e.flowHeight===t.flowHeight;function pK(e){let t=(0,eR.c)(64),{style:n,className:r,nodeStrokeColor:i,nodeColor:a,nodeClassName:o,nodeBorderRadius:s,nodeStrokeWidth:c,nodeComponent:l,bgColor:u,maskColor:d,maskStrokeColor:f,maskStrokeWidth:p,position:m,onClick:h,onNodeClick:g,pannable:_,zoomable:v,ariaLabel:y,inversePan:b,zoomStep:x,offsetScale:S}=e,w=o===void 0?``:o,T=s===void 0?5:s,E=m===void 0?`bottom-right`:m,D=_!==void 0&&_,O=v!==void 0&&v,k=x===void 0?1:x,A=S===void 0?5:S,{optionsStore:j,viewportStore:M,nodesStore:N}=KV(),P=(0,C.useRef)(null),F=GV(_K),I=GV(gK),L=GV(hK),R=GV(mK),z=qV(HV(lK)),B;t[0]===z?B=t[1]:(B=e=>uK(e,z),t[0]=z,t[1]=B);let{viewBB:V,boundingRect:H,flowWidth:ee,flowHeight:U}=YV(QV(B,fK)),W=n?.width??200,G=n?.height??150,te=H.width/W,ne=H.height/G,K=Math.max(te,ne),re=K*W,q=K*G,ie=A*K,ae=H.x-(re-H.width)/2-ie,oe=H.y-(q-H.height)/2-ie,J=re+ie*2,se=q+ie*2,ce=`react-flow__minimap-desc-${F}`,le=(0,C.useRef)(),ue=(0,C.useRef)(K),de,fe;t[2]===K?(de=t[3],fe=t[4]):(fe=()=>{ue.current=K},de=[K],t[2]=K,t[3]=de,t[4]=fe),FH(fe,de);let pe;t[5]!==j||t[6]!==M?(pe=()=>{let e=j.getState().panZoom;if(P.current&&e)return le.current=MB({domNode:P.current,panZoom:e,getTransform:()=>M.getState().transform,getViewScale:()=>ue.current}),()=>{le.current?.destroy()}},t[5]=j,t[6]=M,t[7]=pe):pe=t[7];let me;t[8]!==j||t[9]!==I||t[10]!==M?(me=[I,j,M],t[8]=j,t[9]=I,t[10]=M,t[11]=me):me=t[11],(0,C.useEffect)(pe,me);let he,ge;t[12]!==U||t[13]!==ee||t[14]!==b||t[15]!==D||t[16]!==L||t[17]!==k||t[18]!==O?(he=()=>{le.current?.update({translateExtent:L,width:ee,height:U,inversePan:b,pannable:D,zoomStep:k,zoomable:O})},ge=[D,O,b,k,L,ee,U],t[12]=U,t[13]=ee,t[14]=b,t[15]=D,t[16]=L,t[17]=k,t[18]=O,t[19]=he,t[20]=ge):(he=t[19],ge=t[20]),(0,C.useEffect)(he,ge);let _e;t[21]===h?_e=t[22]:(_e=h?e=>{let[t,n]=le.current?.pointer(e)||[0,0];h(e,{x:t,y:n})}:void 0,t[21]=h,t[22]=_e);let ve=_e,ye;t[23]!==N||t[24]!==g?(ye=(e,t)=>{let n=N.getState().nodeLookup.get(t);n&&g&&g(e,n.internals.userNode)},t[23]=N,t[24]=g,t[25]=ye):ye=t[25];let be=g?ye:void 0,xe=y??R[`minimap.ariaLabel`],Se=typeof u==`string`?u:void 0,Ce=typeof d==`string`?d:void 0,we=typeof f==`string`?f:void 0,Te=typeof p==`number`?p*K:void 0,Ee=typeof a==`string`?a:void 0,De=typeof i==`string`?i:void 0,Oe=typeof c==`number`?c:void 0,ke;t[26]!==n||t[27]!==Se||t[28]!==Ce||t[29]!==we||t[30]!==Te||t[31]!==Ee||t[32]!==De||t[33]!==Oe?(ke={...n,"--xy-minimap-background-color-props":Se,"--xy-minimap-mask-background-color-props":Ce,"--xy-minimap-mask-stroke-color-props":we,"--xy-minimap-mask-stroke-width-props":Te,"--xy-minimap-node-background-color-props":Ee,"--xy-minimap-node-stroke-color-props":De,"--xy-minimap-node-stroke-width-props":Oe},t[26]=n,t[27]=Se,t[28]=Ce,t[29]=we,t[30]=Te,t[31]=Ee,t[32]=De,t[33]=Oe,t[34]=ke):ke=t[34];let Ae=ke,je;t[35]===r?je=t[36]:(je=tR([`react-flow__minimap`,r]),t[35]=r,t[36]=je);let Me=`${ae} ${oe} ${J} ${se}`,Ne;t[37]!==xe||t[38]!==ce?(Ne=xe&&(0,Y.jsx)(`title`,{id:ce,children:xe}),t[37]=xe,t[38]=ce,t[39]=Ne):Ne=t[39];let Pe=g?be:void 0,Fe;t[40]!==T||t[41]!==w||t[42]!==a||t[43]!==l||t[44]!==i||t[45]!==c||t[46]!==Pe?(Fe=(0,Y.jsx)(sK,{onClick:Pe,nodeColor:a,nodeStrokeColor:i,nodeBorderRadius:T,nodeClassName:w,nodeStrokeWidth:c,nodeComponent:l}),t[40]=T,t[41]=w,t[42]=a,t[43]=l,t[44]=i,t[45]=c,t[46]=Pe,t[47]=Fe):Fe=t[47];let Ie=`M${ae-ie},${oe-ie}h${J+ie*2}v${se+ie*2}h${-J-ie*2}z
|
|
280
|
+
M${V.x},${V.y}h${V.width}v${V.height}h${-V.width}z`,Le;t[48]===Ie?Le=t[49]:(Le=(0,Y.jsx)(`path`,{className:`react-flow__minimap-mask`,d:Ie,fillRule:`evenodd`,pointerEvents:`none`}),t[48]=Ie,t[49]=Le);let Re;t[50]!==G||t[51]!==W||t[52]!==ce||t[53]!==ve||t[54]!==Me||t[55]!==Ne||t[56]!==Fe||t[57]!==Le?(Re=(0,Y.jsxs)(`svg`,{width:W,height:G,viewBox:Me,className:`react-flow__minimap-svg`,role:`img`,"aria-labelledby":ce,ref:P,onClick:ve,children:[Ne,Fe,Le]}),t[50]=G,t[51]=W,t[52]=ce,t[53]=ve,t[54]=Me,t[55]=Ne,t[56]=Fe,t[57]=Le,t[58]=Re):Re=t[58];let ze;return t[59]!==E||t[60]!==Ae||t[61]!==je||t[62]!==Re?(ze=(0,Y.jsx)(sH,{position:E,style:Ae,className:je,"data-testid":`rf__minimap`,children:Re}),t[59]=E,t[60]=Ae,t[61]=je,t[62]=Re,t[63]=ze):ze=t[63],ze}function mK(e){return e.ariaLabelConfig}function hK(e){return e.translateExtent}function gK(e){return e.panZoom}function _K(e){return e.rfId}pK.displayName=`MiniMap`;var vK=(0,C.memo)(pK),yK={[QB.Line]:`right`,[QB.Handle]:`bottom-right`};function bK(e){let t=(0,eR.c)(37),{nodeId:n,position:r,variant:i,className:a,style:o,children:s,color:c,minWidth:l,minHeight:u,maxWidth:d,maxHeight:f,keepAspectRatio:p,resizeDirection:m,autoScale:h,shouldResize:g,onResizeStart:_,onResize:v,onResizeEnd:y}=e,b=i===void 0?QB.Handle:i,x=o===void 0?void 0:o,S=l===void 0?10:l,w=u===void 0?10:u,T=d===void 0?Number.MAX_VALUE:d,E=f===void 0?Number.MAX_VALUE:f,D=p!==void 0&&p,O=h===void 0||h,k=CU(),A=typeof n==`string`?n:k,{optionsStore:j,viewportStore:M,nodesStore:N}=KV(),P=(0,C.useRef)(null),F=b===QB.Handle,I;t[0]!==O||t[1]!==F?(I=e=>F&&O?`${Math.max(1/e.transform[2],1)}`:void 0,t[0]=O,t[1]=F,t[2]=I):I=t[2];let L=qV(I),R=(0,C.useRef)(null),z=r??yK[b],B,V;t[3]!==z||t[4]!==A||t[5]!==D||t[6]!==E||t[7]!==T||t[8]!==w||t[9]!==S||t[10]!==N||t[11]!==v||t[12]!==y||t[13]!==_||t[14]!==j||t[15]!==m||t[16]!==g||t[17]!==M?(B=()=>{if(P.current&&A)return R.current||=lV({domNode:P.current,nodeId:A,getStoreItems:()=>{let{nodeLookup:e}=N.getState(),{transform:t}=M.getState(),{snapGrid:n,snapToGrid:r,nodeOrigin:i,domNode:a}=j.getState();return{nodeLookup:e,transform:t,snapGrid:n,snapToGrid:r,nodeOrigin:i,paneDomNode:a}},onChange:(e,t)=>{let{emitNodeChanges:n,nodeOrigin:r}=j.getState(),{nodeLookup:i,parentLookup:a}=N.getState(),o=[],s={x:e.x,y:e.y},c=i.get(A);if(c&&c.expandParent&&c.parentId){let t=c.origin??r,n=e.width??c.measured.width??0,l=e.height??c.measured.height??0,u=cB([{id:c.id,parentId:c.parentId,rect:{width:n,height:l,...az({x:e.x??c.position.x,y:e.y??c.position.y},{width:n,height:l},c.parentId,i,t)}}],i,a,r);o.push(...u),s.x=e.x?Math.max(t[0]*n,e.x):void 0,s.y=e.y?Math.max(t[1]*l,e.y):void 0}if(s.x!==void 0&&s.y!==void 0&&o.push(gV(A,s)),e.width!==void 0&&e.height!==void 0){let t={id:A,type:`dimensions`,resizing:!0,setAttributes:m?m===`horizontal`?`width`:`height`:!0,dimensions:{width:e.width,height:e.height}};o.push(t)}for(let e of t){let t={...e,type:`position`};o.push(t)}n(o)},onEnd:e=>{let{width:t,height:n}=e,r={id:A,type:`dimensions`,resizing:!1,dimensions:{width:t,height:n}};j.getState().emitNodeChanges([r])}}),R.current.update({controlPosition:z,boundaries:{minWidth:S,minHeight:w,maxWidth:T,maxHeight:E},keepAspectRatio:D,resizeDirection:m,onResizeStart:_,onResize:v,onResizeEnd:y,shouldResize:g}),()=>{R.current?.destroy()}},V=[z,S,w,T,E,D,_,v,y,g,A,m,j,N,M],t[3]=z,t[4]=A,t[5]=D,t[6]=E,t[7]=T,t[8]=w,t[9]=S,t[10]=N,t[11]=v,t[12]=y,t[13]=_,t[14]=j,t[15]=m,t[16]=g,t[17]=M,t[18]=B,t[19]=V):(B=t[18],V=t[19]),(0,C.useEffect)(B,V);let H,ee;if(t[20]!==a||t[21]!==z||t[22]!==F||t[23]!==b){let e=z.split(`-`);H=F?`backgroundColor`:`borderColor`,ee=tR([`react-flow__resize-control`,`nodrag`,...e,b,a]),t[20]=a,t[21]=z,t[22]=F,t[23]=b,t[24]=H,t[25]=ee}else H=t[24],ee=t[25];let U;t[26]!==c||t[27]!==H?(U=c&&{[H]:c},t[26]=c,t[27]=H,t[28]=U):U=t[28];let W;t[29]!==L||t[30]!==x||t[31]!==U?(W={...x,scale:L,...U},t[29]=L,t[30]=x,t[31]=U,t[32]=W):W=t[32];let G;return t[33]!==s||t[34]!==ee||t[35]!==W?(G=(0,Y.jsx)(`div`,{className:ee,ref:P,style:W,children:s}),t[33]=s,t[34]=ee,t[35]=W,t[36]=G):G=t[36],G}(0,C.memo)(bK);var xK=r(((e,t)=>{function n(){this.__data__=[],this.size=0}t.exports=n})),SK=r(((e,t)=>{function n(e,t){return e===t||e!==e&&t!==t}t.exports=n})),CK=r(((e,t)=>{var n=SK();function r(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}t.exports=r})),wK=r(((e,t)=>{var n=CK(),r=Array.prototype.splice;function i(e){var t=this.__data__,i=n(t,e);return i<0?!1:(i==t.length-1?t.pop():r.call(t,i,1),--this.size,!0)}t.exports=i})),TK=r(((e,t)=>{var n=CK();function r(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}t.exports=r})),EK=r(((e,t)=>{var n=CK();function r(e){return n(this.__data__,e)>-1}t.exports=r})),DK=r(((e,t)=>{var n=CK();function r(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}t.exports=r})),OK=r(((e,t)=>{var n=xK(),r=wK(),i=TK(),a=EK(),o=DK();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),kK=r(((e,t)=>{var n=OK();function r(){this.__data__=new n,this.size=0}t.exports=r})),AK=r(((e,t)=>{function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=n})),jK=r(((e,t)=>{function n(e){return this.__data__.get(e)}t.exports=n})),MK=r(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),NK=r(((e,t)=>{t.exports=typeof global==`object`&&global&&global.Object===Object&&global})),PK=r(((e,t)=>{var n=NK(),r=typeof self==`object`&&self&&self.Object===Object&&self;t.exports=n||r||Function(`return this`)()})),FK=r(((e,t)=>{t.exports=PK().Symbol})),IK=r(((e,t)=>{var n=FK(),r=Object.prototype,i=r.hasOwnProperty,a=r.toString,o=n?n.toStringTag:void 0;function s(e){var t=i.call(e,o),n=e[o];try{e[o]=void 0;var r=!0}catch{}var s=a.call(e);return r&&(t?e[o]=n:delete e[o]),s}t.exports=s})),LK=r(((e,t)=>{var n=Object.prototype.toString;function r(e){return n.call(e)}t.exports=r})),RK=r(((e,t)=>{var n=FK(),r=IK(),i=LK(),a=`[object Null]`,o=`[object Undefined]`,s=n?n.toStringTag:void 0;function c(e){return e==null?e===void 0?o:a:s&&s in Object(e)?r(e):i(e)}t.exports=c})),zK=r(((e,t)=>{function n(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}t.exports=n})),BK=r(((e,t)=>{var n=RK(),r=zK(),i=`[object AsyncFunction]`,a=`[object Function]`,o=`[object GeneratorFunction]`,s=`[object Proxy]`;function c(e){if(!r(e))return!1;var t=n(e);return t==a||t==o||t==i||t==s}t.exports=c})),VK=r(((e,t)=>{t.exports=PK()[`__core-js_shared__`]})),HK=r(((e,t)=>{var n=VK(),r=function(){var e=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function i(e){return!!r&&r in e}t.exports=i})),UK=r(((e,t)=>{var n=Function.prototype.toString;function r(e){if(e!=null){try{return n.call(e)}catch{}try{return e+``}catch{}}return``}t.exports=r})),WK=r(((e,t)=>{var n=BK(),r=HK(),i=zK(),a=UK(),o=/[\\^$.*+?()[\]{}|]/g,s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,f=RegExp(`^`+u.call(d).replace(o,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function p(e){return!i(e)||r(e)?!1:(n(e)?f:s).test(a(e))}t.exports=p})),GK=r(((e,t)=>{function n(e,t){return e?.[t]}t.exports=n})),KK=r(((e,t)=>{var n=WK(),r=GK();function i(e,t){var i=r(e,t);return n(i)?i:void 0}t.exports=i})),qK=r(((e,t)=>{t.exports=KK()(PK(),`Map`)})),JK=r(((e,t)=>{t.exports=KK()(Object,`create`)})),YK=r(((e,t)=>{var n=JK();function r(){this.__data__=n?n(null):{},this.size=0}t.exports=r})),XK=r(((e,t)=>{function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}t.exports=n})),ZK=r(((e,t)=>{var n=JK(),r=`__lodash_hash_undefined__`,i=Object.prototype.hasOwnProperty;function a(e){var t=this.__data__;if(n){var a=t[e];return a===r?void 0:a}return i.call(t,e)?t[e]:void 0}t.exports=a})),QK=r(((e,t)=>{var n=JK(),r=Object.prototype.hasOwnProperty;function i(e){var t=this.__data__;return n?t[e]!==void 0:r.call(t,e)}t.exports=i})),$K=r(((e,t)=>{var n=JK(),r=`__lodash_hash_undefined__`;function i(e,t){var i=this.__data__;return this.size+=+!this.has(e),i[e]=n&&t===void 0?r:t,this}t.exports=i})),eq=r(((e,t)=>{var n=YK(),r=XK(),i=ZK(),a=QK(),o=$K();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),tq=r(((e,t)=>{var n=eq(),r=OK(),i=qK();function a(){this.size=0,this.__data__={hash:new n,map:new(i||r),string:new n}}t.exports=a})),nq=r(((e,t)=>{function n(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}t.exports=n})),rq=r(((e,t)=>{var n=nq();function r(e,t){var r=e.__data__;return n(t)?r[typeof t==`string`?`string`:`hash`]:r.map}t.exports=r})),iq=r(((e,t)=>{var n=rq();function r(e){var t=n(this,e).delete(e);return this.size-=+!!t,t}t.exports=r})),aq=r(((e,t)=>{var n=rq();function r(e){return n(this,e).get(e)}t.exports=r})),oq=r(((e,t)=>{var n=rq();function r(e){return n(this,e).has(e)}t.exports=r})),sq=r(((e,t)=>{var n=rq();function r(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}t.exports=r})),cq=r(((e,t)=>{var n=tq(),r=iq(),i=aq(),a=oq(),o=sq();function s(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}s.prototype.clear=n,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=o,t.exports=s})),lq=r(((e,t)=>{var n=OK(),r=qK(),i=cq(),a=200;function o(e,t){var o=this.__data__;if(o instanceof n){var s=o.__data__;if(!r||s.length<a-1)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}t.exports=o})),uq=r(((e,t)=>{var n=OK(),r=kK(),i=AK(),a=jK(),o=MK(),s=lq();function c(e){var t=this.__data__=new n(e);this.size=t.size}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c})),dq=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}t.exports=n})),fq=r(((e,t)=>{var n=KK();t.exports=function(){try{var e=n(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),pq=r(((e,t)=>{var n=fq();function r(e,t,r){t==`__proto__`&&n?n(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}t.exports=r})),mq=r(((e,t)=>{var n=pq(),r=SK(),i=Object.prototype.hasOwnProperty;function a(e,t,a){var o=e[t];(!(i.call(e,t)&&r(o,a))||a===void 0&&!(t in e))&&n(e,t,a)}t.exports=a})),hq=r(((e,t)=>{var n=mq(),r=pq();function i(e,t,i,a){var o=!i;i||={};for(var s=-1,c=t.length;++s<c;){var l=t[s],u=a?a(i[l],e[l],l,i,e):void 0;u===void 0&&(u=e[l]),o?r(i,l,u):n(i,l,u)}return i}t.exports=i})),gq=r(((e,t)=>{function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}t.exports=n})),_q=r(((e,t)=>{function n(e){return typeof e==`object`&&!!e}t.exports=n})),vq=r(((e,t)=>{var n=RK(),r=_q(),i=`[object Arguments]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),yq=r(((e,t)=>{var n=vq(),r=_q(),i=Object.prototype,a=i.hasOwnProperty,o=i.propertyIsEnumerable;t.exports=n(function(){return arguments}())?n:function(e){return r(e)&&a.call(e,`callee`)&&!o.call(e,`callee`)}})),bq=r(((e,t)=>{t.exports=Array.isArray})),xq=r(((e,t)=>{function n(){return!1}t.exports=n})),Sq=r(((e,t)=>{var n=PK(),r=xq(),i=typeof e==`object`&&e&&!e.nodeType&&e,a=i&&typeof t==`object`&&t&&!t.nodeType&&t,o=a&&a.exports===i?n.Buffer:void 0;t.exports=(o?o.isBuffer:void 0)||r})),Cq=r(((e,t)=>{var n=/^(?:0|[1-9]\d*)$/;function r(e,t){var r=typeof e;return t??=9007199254740991,!!t&&(r==`number`||r!=`symbol`&&n.test(e))&&e>-1&&e%1==0&&e<t}t.exports=r})),wq=r(((e,t)=>{function n(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991}t.exports=n})),Tq=r(((e,t)=>{var n=RK(),r=wq(),i=_q(),a=`[object Arguments]`,o=`[object Array]`,s=`[object Boolean]`,c=`[object Date]`,l=`[object Error]`,u=`[object Function]`,d=`[object Map]`,f=`[object Number]`,p=`[object Object]`,m=`[object RegExp]`,h=`[object Set]`,g=`[object String]`,_=`[object WeakMap]`,v=`[object ArrayBuffer]`,y=`[object DataView]`,b=`[object Float32Array]`,x=`[object Float64Array]`,S=`[object Int8Array]`,C=`[object Int16Array]`,w=`[object Int32Array]`,T=`[object Uint8Array]`,E=`[object Uint8ClampedArray]`,D=`[object Uint16Array]`,O=`[object Uint32Array]`,k={};k[b]=k[x]=k[S]=k[C]=k[w]=k[T]=k[E]=k[D]=k[O]=!0,k[a]=k[o]=k[v]=k[s]=k[y]=k[c]=k[l]=k[u]=k[d]=k[f]=k[p]=k[m]=k[h]=k[g]=k[_]=!1;function A(e){return i(e)&&r(e.length)&&!!k[n(e)]}t.exports=A})),Eq=r(((e,t)=>{function n(e){return function(t){return e(t)}}t.exports=n})),Dq=r(((e,t)=>{var n=NK(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r&&n.process;t.exports=function(){try{return i&&i.require&&i.require(`util`).types||a&&a.binding&&a.binding(`util`)}catch{}}()})),Oq=r(((e,t)=>{var n=Tq(),r=Eq(),i=Dq(),a=i&&i.isTypedArray;t.exports=a?r(a):n})),kq=r(((e,t)=>{var n=gq(),r=yq(),i=bq(),a=Sq(),o=Cq(),s=Oq(),c=Object.prototype.hasOwnProperty;function l(e,t){var l=i(e),u=!l&&r(e),d=!l&&!u&&a(e),f=!l&&!u&&!d&&s(e),p=l||u||d||f,m=p?n(e.length,String):[],h=m.length;for(var g in e)(t||c.call(e,g))&&!(p&&(g==`length`||d&&(g==`offset`||g==`parent`)||f&&(g==`buffer`||g==`byteLength`||g==`byteOffset`)||o(g,h)))&&m.push(g);return m}t.exports=l})),Aq=r(((e,t)=>{var n=Object.prototype;function r(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||n)}t.exports=r})),jq=r(((e,t)=>{function n(e,t){return function(n){return e(t(n))}}t.exports=n})),Mq=r(((e,t)=>{t.exports=jq()(Object.keys,Object)})),Nq=r(((e,t)=>{var n=Aq(),r=Mq(),i=Object.prototype.hasOwnProperty;function a(e){if(!n(e))return r(e);var t=[];for(var a in Object(e))i.call(e,a)&&a!=`constructor`&&t.push(a);return t}t.exports=a})),Pq=r(((e,t)=>{var n=BK(),r=wq();function i(e){return e!=null&&r(e.length)&&!n(e)}t.exports=i})),Fq=r(((e,t)=>{var n=kq(),r=Nq(),i=Pq();function a(e){return i(e)?n(e):r(e)}t.exports=a})),Iq=r(((e,t)=>{var n=hq(),r=Fq();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),Lq=r(((e,t)=>{function n(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}t.exports=n})),Rq=r(((e,t)=>{var n=zK(),r=Aq(),i=Lq(),a=Object.prototype.hasOwnProperty;function o(e){if(!n(e))return i(e);var t=r(e),o=[];for(var s in e)(s!=`constructor`||!t&&a.call(e,s))&&o.push(s);return o}t.exports=o})),zq=r(((e,t)=>{var n=kq(),r=Rq(),i=Pq();function a(e){return i(e)?n(e,!0):r(e)}t.exports=a})),Bq=r(((e,t)=>{var n=hq(),r=zq();function i(e,t){return e&&n(t,r(t),e)}t.exports=i})),Vq=r(((e,t)=>{var n=PK(),r=typeof e==`object`&&e&&!e.nodeType&&e,i=r&&typeof t==`object`&&t&&!t.nodeType&&t,a=i&&i.exports===r?n.Buffer:void 0,o=a?a.allocUnsafe:void 0;function s(e,t){if(t)return e.slice();var n=e.length,r=o?o(n):new e.constructor(n);return e.copy(r),r}t.exports=s})),Hq=r(((e,t)=>{function n(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}t.exports=n})),Uq=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}t.exports=n})),Wq=r(((e,t)=>{function n(){return[]}t.exports=n})),Gq=r(((e,t)=>{var n=Uq(),r=Wq(),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;t.exports=a?function(e){return e==null?[]:(e=Object(e),n(a(e),function(t){return i.call(e,t)}))}:r})),Kq=r(((e,t)=>{var n=hq(),r=Gq();function i(e,t){return n(e,r(e),t)}t.exports=i})),qq=r(((e,t)=>{function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}t.exports=n})),Jq=r(((e,t)=>{t.exports=jq()(Object.getPrototypeOf,Object)})),Yq=r(((e,t)=>{var n=qq(),r=Jq(),i=Gq(),a=Wq();t.exports=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)n(t,i(e)),e=r(e);return t}:a})),Xq=r(((e,t)=>{var n=hq(),r=Yq();function i(e,t){return n(e,r(e),t)}t.exports=i})),Zq=r(((e,t)=>{var n=qq(),r=bq();function i(e,t,i){var a=t(e);return r(e)?a:n(a,i(e))}t.exports=i})),Qq=r(((e,t)=>{var n=Zq(),r=Gq(),i=Fq();function a(e){return n(e,i,r)}t.exports=a})),$q=r(((e,t)=>{var n=Zq(),r=Yq(),i=zq();function a(e){return n(e,i,r)}t.exports=a})),eJ=r(((e,t)=>{t.exports=KK()(PK(),`DataView`)})),tJ=r(((e,t)=>{t.exports=KK()(PK(),`Promise`)})),nJ=r(((e,t)=>{t.exports=KK()(PK(),`Set`)})),rJ=r(((e,t)=>{t.exports=KK()(PK(),`WeakMap`)})),iJ=r(((e,t)=>{var n=eJ(),r=qK(),i=tJ(),a=nJ(),o=rJ(),s=RK(),c=UK(),l=`[object Map]`,u=`[object Object]`,d=`[object Promise]`,f=`[object Set]`,p=`[object WeakMap]`,m=`[object DataView]`,h=c(n),g=c(r),_=c(i),v=c(a),y=c(o),b=s;(n&&b(new n(new ArrayBuffer(1)))!=m||r&&b(new r)!=l||i&&b(i.resolve())!=d||a&&b(new a)!=f||o&&b(new o)!=p)&&(b=function(e){var t=s(e),n=t==u?e.constructor:void 0,r=n?c(n):``;if(r)switch(r){case h:return m;case g:return l;case _:return d;case v:return f;case y:return p}return t}),t.exports=b})),aJ=r(((e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]==`string`&&n.call(e,`index`)&&(r.index=e.index,r.input=e.input),r}t.exports=r})),oJ=r(((e,t)=>{t.exports=PK().Uint8Array})),sJ=r(((e,t)=>{var n=oJ();function r(e){var t=new e.constructor(e.byteLength);return new n(t).set(new n(e)),t}t.exports=r})),cJ=r(((e,t)=>{var n=sJ();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}t.exports=r})),lJ=r(((e,t)=>{var n=/\w*$/;function r(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}t.exports=r})),uJ=r(((e,t)=>{var n=FK(),r=n?n.prototype:void 0,i=r?r.valueOf:void 0;function a(e){return i?Object(i.call(e)):{}}t.exports=a})),dJ=r(((e,t)=>{var n=sJ();function r(e,t){var r=t?n(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}t.exports=r})),fJ=r(((e,t)=>{var n=sJ(),r=cJ(),i=lJ(),a=uJ(),o=dJ(),s=`[object Boolean]`,c=`[object Date]`,l=`[object Map]`,u=`[object Number]`,d=`[object RegExp]`,f=`[object Set]`,p=`[object String]`,m=`[object Symbol]`,h=`[object ArrayBuffer]`,g=`[object DataView]`,_=`[object Float32Array]`,v=`[object Float64Array]`,y=`[object Int8Array]`,b=`[object Int16Array]`,x=`[object Int32Array]`,S=`[object Uint8Array]`,C=`[object Uint8ClampedArray]`,w=`[object Uint16Array]`,T=`[object Uint32Array]`;function E(e,t,E){var D=e.constructor;switch(t){case h:return n(e);case s:case c:return new D(+e);case g:return r(e,E);case _:case v:case y:case b:case x:case S:case C:case w:case T:return o(e,E);case l:return new D;case u:case p:return new D(e);case d:return i(e);case f:return new D;case m:return a(e)}}t.exports=E})),pJ=r(((e,t)=>{var n=zK(),r=Object.create;t.exports=function(){function e(){}return function(t){if(!n(t))return{};if(r)return r(t);e.prototype=t;var i=new e;return e.prototype=void 0,i}}()})),mJ=r(((e,t)=>{var n=pJ(),r=Jq(),i=Aq();function a(e){return typeof e.constructor==`function`&&!i(e)?n(r(e)):{}}t.exports=a})),hJ=r(((e,t)=>{var n=iJ(),r=_q(),i=`[object Map]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),gJ=r(((e,t)=>{var n=hJ(),r=Eq(),i=Dq(),a=i&&i.isMap;t.exports=a?r(a):n})),_J=r(((e,t)=>{var n=iJ(),r=_q(),i=`[object Set]`;function a(e){return r(e)&&n(e)==i}t.exports=a})),vJ=r(((e,t)=>{var n=_J(),r=Eq(),i=Dq(),a=i&&i.isSet;t.exports=a?r(a):n})),yJ=r(((e,t)=>{var n=uq(),r=dq(),i=mq(),a=Iq(),o=Bq(),s=Vq(),c=Hq(),l=Kq(),u=Xq(),d=Qq(),f=$q(),p=iJ(),m=aJ(),h=fJ(),g=mJ(),_=bq(),v=Sq(),y=gJ(),b=zK(),x=vJ(),S=Fq(),C=zq(),w=1,T=2,E=4,D=`[object Arguments]`,O=`[object Array]`,k=`[object Boolean]`,A=`[object Date]`,j=`[object Error]`,M=`[object Function]`,N=`[object GeneratorFunction]`,P=`[object Map]`,F=`[object Number]`,I=`[object Object]`,L=`[object RegExp]`,R=`[object Set]`,z=`[object String]`,B=`[object Symbol]`,V=`[object WeakMap]`,H=`[object ArrayBuffer]`,ee=`[object DataView]`,U=`[object Float32Array]`,W=`[object Float64Array]`,G=`[object Int8Array]`,te=`[object Int16Array]`,ne=`[object Int32Array]`,K=`[object Uint8Array]`,re=`[object Uint8ClampedArray]`,q=`[object Uint16Array]`,ie=`[object Uint32Array]`,ae={};ae[D]=ae[O]=ae[H]=ae[ee]=ae[k]=ae[A]=ae[U]=ae[W]=ae[G]=ae[te]=ae[ne]=ae[P]=ae[F]=ae[I]=ae[L]=ae[R]=ae[z]=ae[B]=ae[K]=ae[re]=ae[q]=ae[ie]=!0,ae[j]=ae[M]=ae[V]=!1;function oe(e,t,O,k,A,j){var P,F=t&w,L=t&T,R=t&E;if(O&&(P=A?O(e,k,A,j):O(e)),P!==void 0)return P;if(!b(e))return e;var z=_(e);if(z){if(P=m(e),!F)return c(e,P)}else{var B=p(e),V=B==M||B==N;if(v(e))return s(e,F);if(B==I||B==D||V&&!A){if(P=L||V?{}:g(e),!F)return L?u(e,o(P,e)):l(e,a(P,e))}else{if(!ae[B])return A?e:{};P=h(e,B,F)}}j||=new n;var H=j.get(e);if(H)return H;j.set(e,P),x(e)?e.forEach(function(n){P.add(oe(n,t,O,n,e,j))}):y(e)&&e.forEach(function(n,r){P.set(r,oe(n,t,O,r,e,j))});var ee=z?void 0:(R?L?f:d:L?C:S)(e);return r(ee||e,function(n,r){ee&&(r=n,n=e[r]),i(P,r,oe(n,t,O,r,e,j))}),P}t.exports=oe})),bJ=r(((e,t)=>{var n=yJ(),r=4;function i(e){return n(e,r)}t.exports=i})),xJ=r(((e,t)=>{function n(e){return function(){return e}}t.exports=n})),SJ=r(((e,t)=>{function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(n(a[c],c,a)===!1)break}return t}}t.exports=n})),CJ=r(((e,t)=>{t.exports=SJ()()})),wJ=r(((e,t)=>{var n=CJ(),r=Fq();function i(e,t){return e&&n(e,t,r)}t.exports=i})),TJ=r(((e,t)=>{var n=Pq();function r(e,t){return function(r,i){if(r==null)return r;if(!n(r))return e(r,i);for(var a=r.length,o=t?a:-1,s=Object(r);(t?o--:++o<a)&&i(s[o],o,s)!==!1;);return r}}t.exports=r})),EJ=r(((e,t)=>{var n=wJ();t.exports=TJ()(n)})),DJ=r(((e,t)=>{function n(e){return e}t.exports=n})),OJ=r(((e,t)=>{var n=DJ();function r(e){return typeof e==`function`?e:n}t.exports=r})),kJ=r(((e,t)=>{var n=dq(),r=EJ(),i=OJ(),a=bq();function o(e,t){return(a(e)?n:r)(e,i(t))}t.exports=o})),AJ=r(((e,t)=>{t.exports=kJ()})),jJ=r(((e,t)=>{var n=EJ();function r(e,t){var r=[];return n(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r}t.exports=r})),MJ=r(((e,t)=>{function n(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this}t.exports=n})),NJ=r(((e,t)=>{function n(e){return this.__data__.has(e)}t.exports=n})),PJ=r(((e,t)=>{var n=cq(),r=MJ(),i=NJ();function a(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}a.prototype.add=a.prototype.push=r,a.prototype.has=i,t.exports=a})),FJ=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}t.exports=n})),IJ=r(((e,t)=>{function n(e,t){return e.has(t)}t.exports=n})),LJ=r(((e,t)=>{var n=PJ(),r=FJ(),i=IJ(),a=1,o=2;function s(e,t,s,c,l,u){var d=s&a,f=e.length,p=t.length;if(f!=p&&!(d&&p>f))return!1;var m=u.get(e),h=u.get(t);if(m&&h)return m==t&&h==e;var g=-1,_=!0,v=s&o?new n:void 0;for(u.set(e,t),u.set(t,e);++g<f;){var y=e[g],b=t[g];if(c)var x=d?c(b,y,g,t,e,u):c(y,b,g,e,t,u);if(x!==void 0){if(x)continue;_=!1;break}if(v){if(!r(t,function(e,t){if(!i(v,t)&&(y===e||l(y,e,s,c,u)))return v.push(t)})){_=!1;break}}else if(!(y===b||l(y,b,s,c,u))){_=!1;break}}return u.delete(e),u.delete(t),_}t.exports=s})),RJ=r(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}t.exports=n})),zJ=r(((e,t)=>{function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}t.exports=n})),BJ=r(((e,t)=>{var n=FK(),r=oJ(),i=SK(),a=LJ(),o=RJ(),s=zJ(),c=1,l=2,u=`[object Boolean]`,d=`[object Date]`,f=`[object Error]`,p=`[object Map]`,m=`[object Number]`,h=`[object RegExp]`,g=`[object Set]`,_=`[object String]`,v=`[object Symbol]`,y=`[object ArrayBuffer]`,b=`[object DataView]`,x=n?n.prototype:void 0,S=x?x.valueOf:void 0;function C(e,t,n,x,C,w,T){switch(n){case b:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case y:return!(e.byteLength!=t.byteLength||!w(new r(e),new r(t)));case u:case d:case m:return i(+e,+t);case f:return e.name==t.name&&e.message==t.message;case h:case _:return e==t+``;case p:var E=o;case g:var D=x&c;if(E||=s,e.size!=t.size&&!D)return!1;var O=T.get(e);if(O)return O==t;x|=l,T.set(e,t);var k=a(E(e),E(t),x,C,w,T);return T.delete(e),k;case v:if(S)return S.call(e)==S.call(t)}return!1}t.exports=C})),VJ=r(((e,t)=>{var n=Qq(),r=1,i=Object.prototype.hasOwnProperty;function a(e,t,a,o,s,c){var l=a&r,u=n(e),d=u.length;if(d!=n(t).length&&!l)return!1;for(var f=d;f--;){var p=u[f];if(!(l?p in t:i.call(t,p)))return!1}var m=c.get(e),h=c.get(t);if(m&&h)return m==t&&h==e;var g=!0;c.set(e,t),c.set(t,e);for(var _=l;++f<d;){p=u[f];var v=e[p],y=t[p];if(o)var b=l?o(y,v,p,t,e,c):o(v,y,p,e,t,c);if(!(b===void 0?v===y||s(v,y,a,o,c):b)){g=!1;break}_||=p==`constructor`}if(g&&!_){var x=e.constructor,S=t.constructor;x!=S&&`constructor`in e&&`constructor`in t&&!(typeof x==`function`&&x instanceof x&&typeof S==`function`&&S instanceof S)&&(g=!1)}return c.delete(e),c.delete(t),g}t.exports=a})),HJ=r(((e,t)=>{var n=uq(),r=LJ(),i=BJ(),a=VJ(),o=iJ(),s=bq(),c=Sq(),l=Oq(),u=1,d=`[object Arguments]`,f=`[object Array]`,p=`[object Object]`,m=Object.prototype.hasOwnProperty;function h(e,t,h,g,_,v){var y=s(e),b=s(t),x=y?f:o(e),S=b?f:o(t);x=x==d?p:x,S=S==d?p:S;var C=x==p,w=S==p,T=x==S;if(T&&c(e)){if(!c(t))return!1;y=!0,C=!1}if(T&&!C)return v||=new n,y||l(e)?r(e,t,h,g,_,v):i(e,t,x,h,g,_,v);if(!(h&u)){var E=C&&m.call(e,`__wrapped__`),D=w&&m.call(t,`__wrapped__`);if(E||D){var O=E?e.value():e,k=D?t.value():t;return v||=new n,_(O,k,h,g,v)}}return T?(v||=new n,a(e,t,h,g,_,v)):!1}t.exports=h})),UJ=r(((e,t)=>{var n=HJ(),r=_q();function i(e,t,a,o,s){return e===t?!0:e==null||t==null||!r(e)&&!r(t)?e!==e&&t!==t:n(e,t,a,o,i,s)}t.exports=i})),WJ=r(((e,t)=>{var n=uq(),r=UJ(),i=1,a=2;function o(e,t,o,s){var c=o.length,l=c,u=!s;if(e==null)return!l;for(e=Object(e);c--;){var d=o[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++c<l;){d=o[c];var f=d[0],p=e[f],m=d[1];if(u&&d[2]){if(p===void 0&&!(f in e))return!1}else{var h=new n;if(s)var g=s(p,m,f,e,t,h);if(!(g===void 0?r(m,p,i|a,s,h):g))return!1}}return!0}t.exports=o})),GJ=r(((e,t)=>{var n=zK();function r(e){return e===e&&!n(e)}t.exports=r})),KJ=r(((e,t)=>{var n=GJ(),r=Fq();function i(e){for(var t=r(e),i=t.length;i--;){var a=t[i],o=e[a];t[i]=[a,o,n(o)]}return t}t.exports=i})),qJ=r(((e,t)=>{function n(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}t.exports=n})),JJ=r(((e,t)=>{var n=WJ(),r=KJ(),i=qJ();function a(e){var t=r(e);return t.length==1&&t[0][2]?i(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}t.exports=a})),YJ=r(((e,t)=>{var n=RK(),r=_q(),i=`[object Symbol]`;function a(e){return typeof e==`symbol`||r(e)&&n(e)==i}t.exports=a})),XJ=r(((e,t)=>{var n=bq(),r=YJ(),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;function o(e,t){if(n(e))return!1;var o=typeof e;return o==`number`||o==`symbol`||o==`boolean`||e==null||r(e)?!0:a.test(e)||!i.test(e)||t!=null&&e in Object(t)}t.exports=o})),ZJ=r(((e,t)=>{var n=cq(),r=`Expected a function`;function i(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(r);var a=function(){var n=arguments,r=t?t.apply(this,n):n[0],i=a.cache;if(i.has(r))return i.get(r);var o=e.apply(this,n);return a.cache=i.set(r,o)||i,o};return a.cache=new(i.Cache||n),a}i.Cache=n,t.exports=i})),QJ=r(((e,t)=>{var n=ZJ(),r=500;function i(e){var t=n(e,function(e){return i.size===r&&i.clear(),e}),i=t.cache;return t}t.exports=i})),$J=r(((e,t)=>{var n=QJ(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g;t.exports=n(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(r,function(e,n,r,a){t.push(r?a.replace(i,`$1`):n||e)}),t})})),eY=r(((e,t)=>{function n(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}t.exports=n})),tY=r(((e,t)=>{var n=FK(),r=eY(),i=bq(),a=YJ(),o=1/0,s=n?n.prototype:void 0,c=s?s.toString:void 0;function l(e){if(typeof e==`string`)return e;if(i(e))return r(e,l)+``;if(a(e))return c?c.call(e):``;var t=e+``;return t==`0`&&1/e==-o?`-0`:t}t.exports=l})),nY=r(((e,t)=>{var n=tY();function r(e){return e==null?``:n(e)}t.exports=r})),rY=r(((e,t)=>{var n=bq(),r=XJ(),i=$J(),a=nY();function o(e,t){return n(e)?e:r(e,t)?[e]:i(a(e))}t.exports=o})),iY=r(((e,t)=>{var n=YJ(),r=1/0;function i(e){if(typeof e==`string`||n(e))return e;var t=e+``;return t==`0`&&1/e==-r?`-0`:t}t.exports=i})),aY=r(((e,t)=>{var n=rY(),r=iY();function i(e,t){t=n(t,e);for(var i=0,a=t.length;e!=null&&i<a;)e=e[r(t[i++])];return i&&i==a?e:void 0}t.exports=i})),oY=r(((e,t)=>{var n=aY();function r(e,t,r){var i=e==null?void 0:n(e,t);return i===void 0?r:i}t.exports=r})),sY=r(((e,t)=>{function n(e,t){return e!=null&&t in Object(e)}t.exports=n})),cY=r(((e,t)=>{var n=rY(),r=yq(),i=bq(),a=Cq(),o=wq(),s=iY();function c(e,t,c){t=n(t,e);for(var l=-1,u=t.length,d=!1;++l<u;){var f=s(t[l]);if(!(d=e!=null&&c(e,f)))break;e=e[f]}return d||++l!=u?d:(u=e==null?0:e.length,!!u&&o(u)&&a(f,u)&&(i(e)||r(e)))}t.exports=c})),lY=r(((e,t)=>{var n=sY(),r=cY();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),uY=r(((e,t)=>{var n=UJ(),r=oY(),i=lY(),a=XJ(),o=GJ(),s=qJ(),c=iY(),l=1,u=2;function d(e,t){return a(e)&&o(t)?s(c(e),t):function(a){var o=r(a,e);return o===void 0&&o===t?i(a,e):n(t,o,l|u)}}t.exports=d})),dY=r(((e,t)=>{function n(e){return function(t){return t?.[e]}}t.exports=n})),fY=r(((e,t)=>{var n=aY();function r(e){return function(t){return n(t,e)}}t.exports=r})),pY=r(((e,t)=>{var n=dY(),r=fY(),i=XJ(),a=iY();function o(e){return i(e)?n(a(e)):r(e)}t.exports=o})),mY=r(((e,t)=>{var n=JJ(),r=uY(),i=DJ(),a=bq(),o=pY();function s(e){return typeof e==`function`?e:e==null?i:typeof e==`object`?a(e)?r(e[0],e[1]):n(e):o(e)}t.exports=s})),hY=r(((e,t)=>{var n=Uq(),r=jJ(),i=mY(),a=bq();function o(e,t){return(a(e)?n:r)(e,i(t,3))}t.exports=o})),gY=r(((e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e,t){return e!=null&&n.call(e,t)}t.exports=r})),_Y=r(((e,t)=>{var n=gY(),r=cY();function i(e,t){return e!=null&&r(e,t,n)}t.exports=i})),vY=r(((e,t)=>{var n=Nq(),r=iJ(),i=yq(),a=bq(),o=Pq(),s=Sq(),c=Aq(),l=Oq(),u=`[object Map]`,d=`[object Set]`,f=Object.prototype.hasOwnProperty;function p(e){if(e==null)return!0;if(o(e)&&(a(e)||typeof e==`string`||typeof e.splice==`function`||s(e)||l(e)||i(e)))return!e.length;var t=r(e);if(t==u||t==d)return!e.size;if(c(e))return!n(e).length;for(var p in e)if(f.call(e,p))return!1;return!0}t.exports=p})),yY=r(((e,t)=>{function n(e){return e===void 0}t.exports=n})),bY=r(((e,t)=>{var n=EJ(),r=Pq();function i(e,t){var i=-1,a=r(e)?Array(e.length):[];return n(e,function(e,n,r){a[++i]=t(e,n,r)}),a}t.exports=i})),xY=r(((e,t)=>{var n=eY(),r=mY(),i=bY(),a=bq();function o(e,t){return(a(e)?n:i)(e,r(t,3))}t.exports=o})),SY=r(((e,t)=>{function n(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}t.exports=n})),CY=r(((e,t)=>{function n(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}t.exports=n})),wY=r(((e,t)=>{var n=SY(),r=EJ(),i=mY(),a=CY(),o=bq();function s(e,t,s){var c=o(e)?n:a,l=arguments.length<3;return c(e,i(t,4),s,l,r)}t.exports=s})),TY=r(((e,t)=>{var n=RK(),r=bq(),i=_q(),a=`[object String]`;function o(e){return typeof e==`string`||!r(e)&&i(e)&&n(e)==a}t.exports=o})),EY=r(((e,t)=>{t.exports=dY()(`length`)})),DY=r(((e,t)=>{var n=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function r(e){return n.test(e)}t.exports=r})),OY=r(((e,t)=>{var n=`\\ud800-\\udfff`,r=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,i=`\\ufe0e\\ufe0f`,a=`[`+n+`]`,o=`[`+r+`]`,s=`\\ud83c[\\udffb-\\udfff]`,c=`(?:`+o+`|`+s+`)`,l=`[^`+n+`]`,u=`(?:\\ud83c[\\udde6-\\uddff]){2}`,d=`[\\ud800-\\udbff][\\udc00-\\udfff]`,f=`\\u200d`,p=c+`?`,m=`[`+i+`]?`,h=`(?:`+f+`(?:`+[l,u,d].join(`|`)+`)`+m+p+`)*`,g=m+p+h,_=`(?:`+[l+o+`?`,o,u,d,a].join(`|`)+`)`,v=RegExp(s+`(?=`+s+`)|`+_+g,`g`);function y(e){for(var t=v.lastIndex=0;v.test(e);)++t;return t}t.exports=y})),kY=r(((e,t)=>{var n=EY(),r=DY(),i=OY();function a(e){return r(e)?i(e):n(e)}t.exports=a})),AY=r(((e,t)=>{var n=Nq(),r=iJ(),i=Pq(),a=TY(),o=kY(),s=`[object Map]`,c=`[object Set]`;function l(e){if(e==null)return 0;if(i(e))return a(e)?o(e):e.length;var t=r(e);return t==s||t==c?e.size:n(e).length}t.exports=l})),jY=r(((e,t)=>{var n=dq(),r=pJ(),i=wJ(),a=mY(),o=Jq(),s=bq(),c=Sq(),l=BK(),u=zK(),d=Oq();function f(e,t,f){var p=s(e),m=p||c(e)||d(e);if(t=a(t,4),f==null){var h=e&&e.constructor;f=m?p?new h:[]:u(e)&&l(h)?r(o(e)):{}}return(m?n:i)(e,function(e,n,r){return t(f,e,n,r)}),f}t.exports=f})),MY=r(((e,t)=>{var n=FK(),r=yq(),i=bq(),a=n?n.isConcatSpreadable:void 0;function o(e){return i(e)||r(e)||!!(a&&e&&e[a])}t.exports=o})),NY=r(((e,t)=>{var n=qq(),r=MY();function i(e,t,a,o,s){var c=-1,l=e.length;for(a||=r,s||=[];++c<l;){var u=e[c];t>0&&a(u)?t>1?i(u,t-1,a,o,s):n(s,u):o||(s[s.length]=u)}return s}t.exports=i})),PY=r(((e,t)=>{function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}t.exports=n})),FY=r(((e,t)=>{var n=PY(),r=Math.max;function i(e,t,i){return t=r(t===void 0?e.length-1:t,0),function(){for(var a=arguments,o=-1,s=r(a.length-t,0),c=Array(s);++o<s;)c[o]=a[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=a[o];return l[t]=i(c),n(e,this,l)}}t.exports=i})),IY=r(((e,t)=>{var n=xJ(),r=fq(),i=DJ();t.exports=r?function(e,t){return r(e,`toString`,{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:i})),LY=r(((e,t)=>{var n=Date.now;function r(e){var t=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=r})),RY=r(((e,t)=>{var n=IY();t.exports=LY()(n)})),zY=r(((e,t)=>{var n=DJ(),r=FY(),i=RY();function a(e,t){return i(r(e,t,n),e+``)}t.exports=a})),BY=r(((e,t)=>{function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}t.exports=n})),VY=r(((e,t)=>{function n(e){return e!==e}t.exports=n})),HY=r(((e,t)=>{function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}t.exports=n})),UY=r(((e,t)=>{var n=BY(),r=VY(),i=HY();function a(e,t,a){return t===t?i(e,t,a):n(e,r,a)}t.exports=a})),WY=r(((e,t)=>{var n=UY();function r(e,t){return!!(e!=null&&e.length)&&n(e,t,0)>-1}t.exports=r})),GY=r(((e,t)=>{function n(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}t.exports=n})),KY=r(((e,t)=>{function n(){}t.exports=n})),qY=r(((e,t)=>{var n=nJ(),r=KY(),i=zJ();t.exports=n&&1/i(new n([,-0]))[1]==1/0?function(e){return new n(e)}:r})),JY=r(((e,t)=>{var n=PJ(),r=WY(),i=GY(),a=IJ(),o=qY(),s=zJ(),c=200;function l(e,t,l){var u=-1,d=r,f=e.length,p=!0,m=[],h=m;if(l)p=!1,d=i;else if(f>=c){var g=t?null:o(e);if(g)return s(g);p=!1,d=a,h=new n}else h=t?[]:m;outer:for(;++u<f;){var _=e[u],v=t?t(_):_;if(_=l||_!==0?_:0,p&&v===v){for(var y=h.length;y--;)if(h[y]===v)continue outer;t&&h.push(v),m.push(_)}else d(h,v,l)||(h!==m&&h.push(v),m.push(_))}return m}t.exports=l})),YY=r(((e,t)=>{var n=Pq(),r=_q();function i(e){return r(e)&&n(e)}t.exports=i})),XY=r(((e,t)=>{var n=NY(),r=zY(),i=JY(),a=YY();t.exports=r(function(e){return i(n(e,1,a,!0))})})),ZY=r(((e,t)=>{var n=eY();function r(e,t){return n(t,function(t){return e[t]})}t.exports=r})),QY=r(((e,t)=>{var n=ZY(),r=Fq();function i(e){return e==null?[]:n(e,r(e))}t.exports=i})),$Y=r(((e,t)=>{var r;if(typeof n==`function`)try{r={clone:bJ(),constant:xJ(),each:AJ(),filter:hY(),has:_Y(),isArray:bq(),isEmpty:vY(),isFunction:BK(),isUndefined:yY(),keys:Fq(),map:xY(),reduce:wY(),size:AY(),transform:jY(),union:XY(),values:QY()}}catch{}r||=window._,t.exports=r})),eX=r(((e,t)=>{var n=$Y();t.exports=o;var r=`\0`,i=`\0`,a=``;function o(e){this._isDirected=!n.has(e,`directed`)||e.directed,this._isMultigraph=n.has(e,`multigraph`)?e.multigraph:!1,this._isCompound=n.has(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=n.constant(void 0),this._defaultEdgeLabelFn=n.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}o.prototype._nodeCount=0,o.prototype._edgeCount=0,o.prototype.isDirected=function(){return this._isDirected},o.prototype.isMultigraph=function(){return this._isMultigraph},o.prototype.isCompound=function(){return this._isCompound},o.prototype.setGraph=function(e){return this._label=e,this},o.prototype.graph=function(){return this._label},o.prototype.setDefaultNodeLabel=function(e){return n.isFunction(e)||(e=n.constant(e)),this._defaultNodeLabelFn=e,this},o.prototype.nodeCount=function(){return this._nodeCount},o.prototype.nodes=function(){return n.keys(this._nodes)},o.prototype.sources=function(){var e=this;return n.filter(this.nodes(),function(t){return n.isEmpty(e._in[t])})},o.prototype.sinks=function(){var e=this;return n.filter(this.nodes(),function(t){return n.isEmpty(e._out[t])})},o.prototype.setNodes=function(e,t){var r=arguments,i=this;return n.each(e,function(e){r.length>1?i.setNode(e,t):i.setNode(e)}),this},o.prototype.setNode=function(e,t){return n.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},o.prototype.node=function(e){return this._nodes[e]},o.prototype.hasNode=function(e){return n.has(this._nodes,e)},o.prototype.removeNode=function(e){var t=this;if(n.has(this._nodes,e)){var r=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],n.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),n.each(n.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],n.each(n.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},o.prototype.setParent=function(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(n.isUndefined(t))t=i;else{t+=``;for(var r=t;!n.isUndefined(r);r=this.parent(r))if(r===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},o.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},o.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},o.prototype.children=function(e){if(n.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return n.keys(t)}else if(e===i)return this.nodes();else if(this.hasNode(e))return[]},o.prototype.predecessors=function(e){var t=this._preds[e];if(t)return n.keys(t)},o.prototype.successors=function(e){var t=this._sucs[e];if(t)return n.keys(t)},o.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return n.union(t,this.successors(e))},o.prototype.isLeaf=function(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0},o.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;n.each(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),n.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var i={};function a(e){var n=r.parent(e);return n===void 0||t.hasNode(n)?(i[e]=n,n):n in i?i[n]:a(n)}return this._isCompound&&n.each(t.nodes(),function(e){t.setParent(e,a(e))}),t},o.prototype.setDefaultEdgeLabel=function(e){return n.isFunction(e)||(e=n.constant(e)),this._defaultEdgeLabelFn=e,this},o.prototype.edgeCount=function(){return this._edgeCount},o.prototype.edges=function(){return n.values(this._edgeObjs)},o.prototype.setPath=function(e,t){var r=this,i=arguments;return n.reduce(e,function(e,n){return i.length>1?r.setEdge(e,n,t):r.setEdge(e,n),n}),this},o.prototype.setEdge=function(){var e,t,r,i,a=!1,o=arguments[0];typeof o==`object`&&o&&`v`in o?(e=o.v,t=o.w,r=o.name,arguments.length===2&&(i=arguments[1],a=!0)):(e=o,t=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),e=``+e,t=``+t,n.isUndefined(r)||(r=``+r);var c=l(this._isDirected,e,t,r);if(n.has(this._edgeLabels,c))return a&&(this._edgeLabels[c]=i),this;if(!n.isUndefined(r)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[c]=a?i:this._defaultEdgeLabelFn(e,t,r);var d=u(this._isDirected,e,t,r);return e=d.v,t=d.w,Object.freeze(d),this._edgeObjs[c]=d,s(this._preds[t],e),s(this._sucs[e],t),this._in[t][c]=d,this._out[e][c]=d,this._edgeCount++,this},o.prototype.edge=function(e,t,n){var r=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,e,t,n);return this._edgeLabels[r]},o.prototype.hasEdge=function(e,t,r){var i=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,e,t,r);return n.has(this._edgeLabels,i)},o.prototype.removeEdge=function(e,t,n){var r=arguments.length===1?d(this._isDirected,arguments[0]):l(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},o.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var i=n.values(r);return t?n.filter(i,function(e){return e.v===t}):i}},o.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var i=n.values(r);return t?n.filter(i,function(e){return e.w===t}):i}},o.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))};function s(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function l(e,t,i,o){var s=``+t,c=``+i;if(!e&&s>c){var l=s;s=c,c=l}return s+a+c+a+(n.isUndefined(o)?r:o)}function u(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function d(e,t){return l(e,t.v,t.w,t.name)}})),tX=r(((e,t)=>{t.exports=`2.1.8`})),nX=r(((e,t)=>{t.exports={Graph:eX(),version:tX()}})),rX=r(((e,t)=>{var n=$Y(),r=eX();t.exports={write:i,read:s};function i(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:a(e),edges:o(e)};return n.isUndefined(e.graph())||(t.value=n.clone(e.graph())),t}function a(e){return n.map(e.nodes(),function(t){var r=e.node(t),i=e.parent(t),a={v:t};return n.isUndefined(r)||(a.value=r),n.isUndefined(i)||(a.parent=i),a})}function o(e){return n.map(e.edges(),function(t){var r=e.edge(t),i={v:t.v,w:t.w};return n.isUndefined(t.name)||(i.name=t.name),n.isUndefined(r)||(i.value=r),i})}function s(e){var t=new r(e.options).setGraph(e.value);return n.each(e.nodes,function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),n.each(e.edges,function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}})),iX=r(((e,t)=>{var n=$Y();t.exports=r;function r(e){var t={},r=[],i;function a(r){n.has(t,r)||(t[r]=!0,i.push(r),n.each(e.successors(r),a),n.each(e.predecessors(r),a))}return n.each(e.nodes(),function(e){i=[],a(e),i.length&&r.push(i)}),r}})),aX=r(((e,t)=>{var n=$Y();t.exports=r;function r(){this._arr=[],this._keyIndices={}}r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(e){return e.key})},r.prototype.has=function(e){return n.has(this._keyIndices,e)},r.prototype.priority=function(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority},r.prototype.min=function(){if(this.size()===0)throw Error(`Queue underflow`);return this._arr[0].key},r.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!n.has(r,e)){var i=this._arr,a=i.length;return r[e]=a,i.push({key:e,priority:t}),this._decrease(a),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},r.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw Error(`New priority is greater than current priority. Key: `+e+` Old: `+this._arr[n].priority+` New: `+t);this._arr[n].priority=t,this._decrease(n)},r.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,i=e;n<t.length&&(i=t[n].priority<t[i].priority?n:i,r<t.length&&(i=t[r].priority<t[i].priority?r:i),i!==e&&(this._swap(e,i),this._heapify(i)))},r.prototype._decrease=function(e){for(var t=this._arr,n=t[e].priority,r;e!==0&&(r=e>>1,!(t[r].priority<n));)this._swap(e,r),e=r},r.prototype._swap=function(e,t){var n=this._arr,r=this._keyIndices,i=n[e],a=n[t];n[e]=a,n[t]=i,r[a.key]=e,r[i.key]=t}})),oX=r(((e,t)=>{var n=$Y(),r=aX();t.exports=a;var i=n.constant(1);function a(e,t,n,r){return o(e,String(t),n||i,r||function(t){return e.outEdges(t)})}function o(e,t,n,i){var a={},o=new r,s,c,l=function(e){var t=e.v===s?e.w:e.v,r=a[t],i=n(e),l=c.distance+i;if(i<0)throw Error(`dijkstra does not allow negative edge weights. Bad edge: `+e+` Weight: `+i);l<r.distance&&(r.distance=l,r.predecessor=s,o.decrease(t,l))};for(e.nodes().forEach(function(e){var n=e===t?0:1/0;a[e]={distance:n},o.add(e,n)});o.size()>0&&(s=o.removeMin(),c=a[s],c.distance!==1/0);)i(s).forEach(l);return a}})),sX=r(((e,t)=>{var n=oX(),r=$Y();t.exports=i;function i(e,t,i){return r.transform(e.nodes(),function(r,a){r[a]=n(e,a,t,i)},{})}})),cX=r(((e,t)=>{var n=$Y();t.exports=r;function r(e){var t=0,r=[],i={},a=[];function o(s){var c=i[s]={onStack:!0,lowlink:t,index:t++};if(r.push(s),e.successors(s).forEach(function(e){n.has(i,e)?i[e].onStack&&(c.lowlink=Math.min(c.lowlink,i[e].index)):(o(e),c.lowlink=Math.min(c.lowlink,i[e].lowlink))}),c.lowlink===c.index){var l=[],u;do u=r.pop(),i[u].onStack=!1,l.push(u);while(s!==u);a.push(l)}}return e.nodes().forEach(function(e){n.has(i,e)||o(e)}),a}})),lX=r(((e,t)=>{var n=$Y(),r=cX();t.exports=i;function i(e){return n.filter(r(e),function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}})),uX=r(((e,t)=>{var n=$Y();t.exports=i;var r=n.constant(1);function i(e,t,n){return a(e,t||r,n||function(t){return e.outEdges(t)})}function a(e,t,n){var r={},i=e.nodes();return i.forEach(function(e){r[e]={},r[e][e]={distance:0},i.forEach(function(t){e!==t&&(r[e][t]={distance:1/0})}),n(e).forEach(function(n){var i=n.v===e?n.w:n.v,a=t(n);r[e][i]={distance:a,predecessor:e}})}),i.forEach(function(e){var t=r[e];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[e],i=t[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)})})}),r}})),dX=r(((e,t)=>{var n=$Y();t.exports=r,r.CycleException=i;function r(e){var t={},r={},a=[];function o(s){if(n.has(r,s))throw new i;n.has(t,s)||(r[s]=!0,t[s]=!0,n.each(e.predecessors(s),o),delete r[s],a.push(s))}if(n.each(e.sinks(),o),n.size(t)!==e.nodeCount())throw new i;return a}function i(){}i.prototype=Error()})),fX=r(((e,t)=>{var n=dX();t.exports=r;function r(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}})),pX=r(((e,t)=>{var n=$Y();t.exports=r;function r(e,t,r){n.isArray(t)||(t=[t]);var a=(e.isDirected()?e.successors:e.neighbors).bind(e),o=[],s={};return n.each(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);i(e,t,r===`post`,s,a,o)}),o}function i(e,t,r,a,o,s){n.has(a,t)||(a[t]=!0,r||s.push(t),n.each(o(t),function(t){i(e,t,r,a,o,s)}),r&&s.push(t))}})),mX=r(((e,t)=>{var n=pX();t.exports=r;function r(e,t){return n(e,t,`post`)}})),hX=r(((e,t)=>{var n=pX();t.exports=r;function r(e,t){return n(e,t,`pre`)}})),gX=r(((e,t)=>{var n=$Y(),r=eX(),i=aX();t.exports=a;function a(e,t){var a=new r,o={},s=new i,c;function l(e){var n=e.v===c?e.w:e.v,r=s.priority(n);if(r!==void 0){var i=t(e);i<r&&(o[n]=c,s.decrease(n,i))}}if(e.nodeCount()===0)return a;n.each(e.nodes(),function(e){s.add(e,1/0),a.setNode(e)}),s.decrease(e.nodes()[0],0);for(var u=!1;s.size()>0;){if(c=s.removeMin(),n.has(o,c))a.setEdge(c,o[c]);else if(u)throw Error(`Input graph is not connected: `+e);else u=!0;e.nodeEdges(c).forEach(l)}return a}})),_X=r(((e,t)=>{t.exports={components:iX(),dijkstra:oX(),dijkstraAll:sX(),findCycles:lX(),floydWarshall:uX(),isAcyclic:fX(),postorder:mX(),preorder:hX(),prim:gX(),tarjan:cX(),topsort:dX()}})),vX=r(((e,t)=>{var n=nX();t.exports={Graph:n.Graph,json:rX(),alg:_X(),version:n.version}})),yX=r(((e,t)=>{var r;if(typeof n==`function`)try{r=vX()}catch{}r||=window.graphlib,t.exports=r})),bX=r(((e,t)=>{var n=yJ(),r=1,i=4;function a(e){return n(e,r|i)}t.exports=a})),xX=r(((e,t)=>{var n=SK(),r=Pq(),i=Cq(),a=zK();function o(e,t,o){if(!a(o))return!1;var s=typeof t;return(s==`number`?r(o)&&i(t,o.length):s==`string`&&t in o)?n(o[t],e):!1}t.exports=o})),SX=r(((e,t)=>{var n=zY(),r=SK(),i=xX(),a=zq(),o=Object.prototype,s=o.hasOwnProperty;t.exports=n(function(e,t){e=Object(e);var n=-1,c=t.length,l=c>2?t[2]:void 0;for(l&&i(t[0],t[1],l)&&(c=1);++n<c;)for(var u=t[n],d=a(u),f=-1,p=d.length;++f<p;){var m=d[f],h=e[m];(h===void 0||r(h,o[m])&&!s.call(e,m))&&(e[m]=u[m])}return e})})),CX=r(((e,t)=>{var n=mY(),r=Pq(),i=Fq();function a(e){return function(t,a,o){var s=Object(t);if(!r(t)){var c=n(a,3);t=i(t),a=function(e){return c(s[e],e,s)}}var l=e(t,a,o);return l>-1?s[c?t[l]:l]:void 0}}t.exports=a})),wX=r(((e,t)=>{var n=/\s/;function r(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}t.exports=r})),TX=r(((e,t)=>{var n=wX(),r=/^\s+/;function i(e){return e&&e.slice(0,n(e)+1).replace(r,``)}t.exports=i})),EX=r(((e,t)=>{var n=TX(),r=zK(),i=YJ(),a=NaN,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;function u(e){if(typeof e==`number`)return e;if(i(e))return a;if(r(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=r(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=n(e);var u=s.test(e);return u||c.test(e)?l(e.slice(2),u?2:8):o.test(e)?a:+e}t.exports=u})),DX=r(((e,t)=>{var n=EX(),r=1/0,i=17976931348623157e292;function a(e){return e?(e=n(e),e===r||e===-r?(e<0?-1:1)*i:e===e?e:0):e===0?e:0}t.exports=a})),OX=r(((e,t)=>{var n=DX();function r(e){var t=n(e),r=t%1;return t===t?r?t-r:t:0}t.exports=r})),kX=r(((e,t)=>{var n=BY(),r=mY(),i=OX(),a=Math.max;function o(e,t,o){var s=e==null?0:e.length;if(!s)return-1;var c=o==null?0:i(o);return c<0&&(c=a(s+c,0)),n(e,r(t,3),c)}t.exports=o})),AX=r(((e,t)=>{t.exports=CX()(kX())})),jX=r(((e,t)=>{var n=NY();function r(e){return e!=null&&e.length?n(e,1):[]}t.exports=r})),MX=r(((e,t)=>{var n=CJ(),r=OJ(),i=zq();function a(e,t){return e==null?e:n(e,r(t),i)}t.exports=a})),NX=r(((e,t)=>{function n(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}t.exports=n})),PX=r(((e,t)=>{var n=pq(),r=wJ(),i=mY();function a(e,t){var a={};return t=i(t,3),r(e,function(e,r,i){n(a,r,t(e,r,i))}),a}t.exports=a})),FX=r(((e,t)=>{var n=YJ();function r(e,t,r){for(var i=-1,a=e.length;++i<a;){var o=e[i],s=t(o);if(s!=null&&(c===void 0?s===s&&!n(s):r(s,c)))var c=s,l=o}return l}t.exports=r})),IX=r(((e,t)=>{function n(e,t){return e>t}t.exports=n})),LX=r(((e,t)=>{var n=FX(),r=IX(),i=DJ();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),RX=r(((e,t)=>{var n=pq(),r=SK();function i(e,t,i){(i!==void 0&&!r(e[t],i)||i===void 0&&!(t in e))&&n(e,t,i)}t.exports=i})),zX=r(((e,t)=>{var n=RK(),r=Jq(),i=_q(),a=`[object Object]`,o=Function.prototype,s=Object.prototype,c=o.toString,l=s.hasOwnProperty,u=c.call(Object);function d(e){if(!i(e)||n(e)!=a)return!1;var t=r(e);if(t===null)return!0;var o=l.call(t,`constructor`)&&t.constructor;return typeof o==`function`&&o instanceof o&&c.call(o)==u}t.exports=d})),BX=r(((e,t)=>{function n(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}t.exports=n})),VX=r(((e,t)=>{var n=hq(),r=zq();function i(e){return n(e,r(e))}t.exports=i})),HX=r(((e,t)=>{var n=RX(),r=Vq(),i=dJ(),a=Hq(),o=mJ(),s=yq(),c=bq(),l=YY(),u=Sq(),d=BK(),f=zK(),p=zX(),m=Oq(),h=BX(),g=VX();function _(e,t,_,v,y,b,x){var S=h(e,_),C=h(t,_),w=x.get(C);if(w)n(e,_,w);else{var T=b?b(S,C,_+``,e,t,x):void 0,E=T===void 0;if(E){var D=c(C),O=!D&&u(C),k=!D&&!O&&m(C);T=C,D||O||k?c(S)?T=S:l(S)?T=a(S):O?(E=!1,T=r(C,!0)):k?(E=!1,T=i(C,!0)):T=[]:p(C)||s(C)?(T=S,s(S)?T=g(S):(!f(S)||d(S))&&(T=o(C))):E=!1}E&&(x.set(C,T),y(T,C,v,b,x),x.delete(C)),n(e,_,T)}}t.exports=_})),UX=r(((e,t)=>{var n=uq(),r=RX(),i=CJ(),a=HX(),o=zK(),s=zq(),c=BX();function l(e,t,u,d,f){e!==t&&i(t,function(i,s){if(f||=new n,o(i))a(e,t,s,u,l,d,f);else{var p=d?d(c(e,s),i,s+``,e,t,f):void 0;p===void 0&&(p=i),r(e,s,p)}},s)}t.exports=l})),WX=r(((e,t)=>{var n=zY(),r=xX();function i(e){return n(function(t,n){var i=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=e.length>3&&typeof o==`function`?(a--,o):void 0,s&&r(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),t=Object(t);++i<a;){var c=n[i];c&&e(t,c,i,o)}return t})}t.exports=i})),GX=r(((e,t)=>{var n=UX();t.exports=WX()(function(e,t,r){n(e,t,r)})})),KX=r(((e,t)=>{function n(e,t){return e<t}t.exports=n})),qX=r(((e,t)=>{var n=FX(),r=KX(),i=DJ();function a(e){return e&&e.length?n(e,i,r):void 0}t.exports=a})),JX=r(((e,t)=>{var n=FX(),r=mY(),i=KX();function a(e,t){return e&&e.length?n(e,r(t,2),i):void 0}t.exports=a})),YX=r(((e,t)=>{var n=PK();t.exports=function(){return n.Date.now()}})),XX=r(((e,t)=>{var n=mq(),r=rY(),i=Cq(),a=zK(),o=iY();function s(e,t,s,c){if(!a(e))return e;t=r(t,e);for(var l=-1,u=t.length,d=u-1,f=e;f!=null&&++l<u;){var p=o(t[l]),m=s;if(p===`__proto__`||p===`constructor`||p===`prototype`)return e;if(l!=d){var h=f[p];m=c?c(h,p,f):void 0,m===void 0&&(m=a(h)?h:i(t[l+1])?[]:{})}n(f,p,m),f=f[p]}return e}t.exports=s})),ZX=r(((e,t)=>{var n=aY(),r=XX(),i=rY();function a(e,t,a){for(var o=-1,s=t.length,c={};++o<s;){var l=t[o],u=n(e,l);a(u,l)&&r(c,i(l,e),u)}return c}t.exports=a})),QX=r(((e,t)=>{var n=ZX(),r=lY();function i(e,t){return n(e,t,function(t,n){return r(e,n)})}t.exports=i})),$X=r(((e,t)=>{var n=jX(),r=FY(),i=RY();function a(e){return i(r(e,void 0,n),e+``)}t.exports=a})),eZ=r(((e,t)=>{var n=QX();t.exports=$X()(function(e,t){return e==null?{}:n(e,t)})})),tZ=r(((e,t)=>{var n=Math.ceil,r=Math.max;function i(e,t,i,a){for(var o=-1,s=r(n((t-e)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=e,e+=i;return c}t.exports=i})),nZ=r(((e,t)=>{var n=tZ(),r=xX(),i=DX();function a(e){return function(t,a,o){return o&&typeof o!=`number`&&r(t,a,o)&&(a=o=void 0),t=i(t),a===void 0?(a=t,t=0):a=i(a),o=o===void 0?t<a?1:-1:i(o),n(t,a,o,e)}}t.exports=a})),rZ=r(((e,t)=>{t.exports=nZ()()})),iZ=r(((e,t)=>{function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}t.exports=n})),aZ=r(((e,t)=>{var n=YJ();function r(e,t){if(e!==t){var r=e!==void 0,i=e===null,a=e===e,o=n(e),s=t!==void 0,c=t===null,l=t===t,u=n(t);if(!c&&!u&&!o&&e>t||o&&s&&l&&!c&&!u||i&&s&&l||!r&&l||!a)return 1;if(!i&&!o&&!u&&e<t||u&&r&&a&&!i&&!o||c&&r&&a||!s&&a||!l)return-1}return 0}t.exports=r})),oZ=r(((e,t)=>{var n=aZ();function r(e,t,r){for(var i=-1,a=e.criteria,o=t.criteria,s=a.length,c=r.length;++i<s;){var l=n(a[i],o[i]);if(l)return i>=c?l:l*(r[i]==`desc`?-1:1)}return e.index-t.index}t.exports=r})),sZ=r(((e,t)=>{var n=eY(),r=aY(),i=mY(),a=bY(),o=iZ(),s=Eq(),c=oZ(),l=DJ(),u=bq();function d(e,t,d){t=t.length?n(t,function(e){return u(e)?function(t){return r(t,e.length===1?e[0]:e)}:e}):[l];var f=-1;return t=n(t,s(i)),o(a(e,function(e,r,i){return{criteria:n(t,function(t){return t(e)}),index:++f,value:e}}),function(e,t){return c(e,t,d)})}t.exports=d})),cZ=r(((e,t)=>{var n=NY(),r=sZ(),i=zY(),a=xX();t.exports=i(function(e,t){if(e==null)return[];var i=t.length;return i>1&&a(e,t[0],t[1])?t=[]:i>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),r(e,n(t,1),[])})})),lZ=r(((e,t)=>{var n=nY(),r=0;function i(e){var t=++r;return n(e)+t}t.exports=i})),uZ=r(((e,t)=>{function n(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}t.exports=n})),dZ=r(((e,t)=>{var n=mq(),r=uZ();function i(e,t){return r(e||[],t||[],n)}t.exports=i})),fZ=r(((e,t)=>{var r;if(typeof n==`function`)try{r={cloneDeep:bX(),constant:xJ(),defaults:SX(),each:AJ(),filter:hY(),find:AX(),flatten:jX(),forEach:kJ(),forIn:MX(),has:_Y(),isUndefined:yY(),last:NX(),map:xY(),mapValues:PX(),max:LX(),merge:GX(),min:qX(),minBy:JX(),now:YX(),pick:eZ(),range:rZ(),reduce:wY(),sortBy:cZ(),uniqueId:lZ(),values:QY(),zipObject:dZ()}}catch{}r||=window._,t.exports=r})),pZ=r(((e,t)=>{t.exports=n;function n(){var e={};e._next=e._prev=e,this._sentinel=e}n.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return r(t),t},n.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&r(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},n.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,i)),n=n._prev;return`[`+e.join(`, `)+`]`};function r(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function i(e,t){if(e!==`_next`&&e!==`_prev`)return t}})),mZ=r(((e,t)=>{var n=fZ(),r=yX().Graph,i=pZ();t.exports=o;var a=n.constant(1);function o(e,t){if(e.nodeCount()<=1)return[];var r=l(e,t||a),i=s(r.graph,r.buckets,r.zeroIdx);return n.flatten(n.map(i,function(t){return e.outEdges(t.v,t.w)}),!0)}function s(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)c(e,t,n,o);for(;o=i.dequeue();)c(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(c(e,t,n,o,!0));break}}}return r}function c(e,t,r,i,a){var o=a?[]:void 0;return n.forEach(e.inEdges(i.v),function(n){var i=e.edge(n),s=e.node(n.v);a&&o.push({v:n.v,w:n.w}),s.out-=i,u(t,r,s)}),n.forEach(e.outEdges(i.v),function(n){var i=e.edge(n),a=n.w,o=e.node(a);o.in-=i,u(t,r,o)}),e.removeNode(i.v),o}function l(e,t){var a=new r,o=0,s=0;n.forEach(e.nodes(),function(e){a.setNode(e,{v:e,in:0,out:0})}),n.forEach(e.edges(),function(e){var n=a.edge(e.v,e.w)||0,r=t(e),i=n+r;a.setEdge(e.v,e.w,i),s=Math.max(s,a.node(e.v).out+=r),o=Math.max(o,a.node(e.w).in+=r)});var c=n.range(s+o+3).map(function(){return new i}),l=o+1;return n.forEach(a.nodes(),function(e){u(c,l,a.node(e))}),{graph:a,buckets:c,zeroIdx:l}}function u(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}})),hZ=r(((e,t)=>{var n=fZ(),r=mZ();t.exports={run:i,undo:o};function i(e){var t=e.graph().acyclicer===`greedy`?r(e,i(e)):a(e);n.forEach(t,function(t){var r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,n.uniqueId(`rev`))});function i(e){return function(t){return e.edge(t).weight}}}function a(e){var t=[],r={},i={};function a(o){n.has(i,o)||(i[o]=!0,r[o]=!0,n.forEach(e.outEdges(o),function(e){n.has(r,e.w)?t.push(e):a(e.w)}),delete r[o])}return n.forEach(e.nodes(),a),t}function o(e){n.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}})),gZ=r(((e,t)=>{var n=fZ(),r=yX().Graph;t.exports={addDummyNode:i,simplify:a,asNonCompoundGraph:o,successorWeights:s,predecessorWeights:c,intersectRect:l,buildLayerMatrix:u,normalizeRanks:d,removeEmptyRanks:f,addBorderNode:p,maxRank:m,partition:h,time:g,notime:_};function i(e,t,r,i){var a;do a=n.uniqueId(i);while(e.hasNode(a));return r.dummy=t,e.setNode(a,r),a}function a(e){var t=new r().setGraph(e.graph());return n.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),n.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function o(e){var t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return n.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),n.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function s(e){var t=n.map(e.nodes(),function(t){var r={};return n.forEach(e.outEdges(t),function(t){r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return n.zipObject(e.nodes(),t)}function c(e){var t=n.map(e.nodes(),function(t){var r={};return n.forEach(e.inEdges(t),function(t){r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return n.zipObject(e.nodes(),t)}function l(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function u(e){var t=n.map(n.range(m(e)+1),function(){return[]});return n.forEach(e.nodes(),function(r){var i=e.node(r),a=i.rank;n.isUndefined(a)||(t[a][i.order]=r)}),t}function d(e){var t=n.min(n.map(e.nodes(),function(t){return e.node(t).rank}));n.forEach(e.nodes(),function(r){var i=e.node(r);n.has(i,`rank`)&&(i.rank-=t)})}function f(e){var t=n.min(n.map(e.nodes(),function(t){return e.node(t).rank})),r=[];n.forEach(e.nodes(),function(n){var i=e.node(n).rank-t;r[i]||(r[i]=[]),r[i].push(n)});var i=0,a=e.graph().nodeRankFactor;n.forEach(r,function(t,r){n.isUndefined(t)&&r%a!==0?--i:i&&n.forEach(t,function(t){e.node(t).rank+=i})})}function p(e,t,n,r){var a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=r),i(e,`border`,a,t)}function m(e){return n.max(n.map(e.nodes(),function(t){var r=e.node(t).rank;if(!n.isUndefined(r))return r}))}function h(e,t){var r={lhs:[],rhs:[]};return n.forEach(e,function(e){t(e)?r.lhs.push(e):r.rhs.push(e)}),r}function g(e,t){var r=n.now();try{return t()}finally{console.log(e+` time: `+(n.now()-r)+`ms`)}}function _(e,t){return t()}})),_Z=r(((e,t)=>{var n=fZ(),r=gZ();t.exports={run:i,undo:o};function i(e){e.graph().dummyChains=[],n.forEach(e.edges(),function(t){a(e,t)})}function a(e,t){var n=t.v,i=e.node(n).rank,a=t.w,o=e.node(a).rank,s=t.name,c=e.edge(t),l=c.labelRank;if(o!==i+1){e.removeEdge(t);var u,d,f=0;for(++i;i<o;++f,++i)c.points=[],d={width:0,height:0,edgeLabel:c,edgeObj:t,rank:i},u=r.addDummyNode(e,`edge`,d,`_d`),i===l&&(d.width=c.width,d.height=c.height,d.dummy=`edge-label`,d.labelpos=c.labelpos),e.setEdge(n,u,{weight:c.weight},s),f===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,a,{weight:c.weight},s)}}function o(e){n.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}})),vZ=r(((e,t)=>{var n=fZ();t.exports={longestPath:r,slack:i};function r(e){var t={};function r(i){var a=e.node(i);if(n.has(t,i))return a.rank;t[i]=!0;var o=n.min(n.map(e.outEdges(i),function(t){return r(t.w)-e.edge(t).minlen}));return(o===1/0||o==null)&&(o=0),a.rank=o}n.forEach(e.sources(),r)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}})),yZ=r(((e,t)=>{var n=fZ(),r=yX().Graph,i=vZ().slack;t.exports=a;function a(e){var t=new r({directed:!1}),n=e.nodes()[0],a=e.nodeCount();t.setNode(n,{});for(var l,u;o(t,e)<a;)l=s(t,e),u=t.hasNode(l.v)?i(e,l):-i(e,l),c(t,e,u);return t}function o(e,t){function r(a){n.forEach(t.nodeEdges(a),function(n){var o=n.v,s=a===o?n.w:o;!e.hasNode(s)&&!i(t,n)&&(e.setNode(s,{}),e.setEdge(a,s,{}),r(s))})}return n.forEach(e.nodes(),r),e.nodeCount()}function s(e,t){return n.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)})}function c(e,t,r){n.forEach(e.nodes(),function(e){t.node(e).rank+=r})}})),bZ=r(((e,t)=>{var n=fZ(),r=yZ(),i=vZ().slack,a=vZ().longestPath,o=yX().alg.preorder,s=yX().alg.postorder,c=gZ().simplify;t.exports=l,l.initLowLimValues=p,l.initCutValues=u,l.calcCutValue=f,l.leaveEdge=h,l.enterEdge=g,l.exchangeEdges=_;function l(e){e=c(e),a(e);var t=r(e);p(t),u(t,e);for(var n,i;n=h(t);)i=g(t,e,n),_(t,e,n,i)}function u(e,t){var r=s(e,e.nodes());r=r.slice(0,r.length-1),n.forEach(r,function(n){d(e,t,n)})}function d(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=f(e,t,n)}function f(e,t,r){var i=e.node(r).parent,a=!0,o=t.edge(r,i),s=0;return o||=(a=!1,t.edge(i,r)),s=o.weight,n.forEach(t.nodeEdges(r),function(n){var o=n.v===r,c=o?n.w:n.v;if(c!==i){var l=o===a,u=t.edge(n).weight;if(s+=l?u:-u,y(e,r,c)){var d=e.edge(r,c).cutvalue;s+=l?-d:d}}}),s}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),m(e,{},1,t)}function m(e,t,r,i,a){var o=r,s=e.node(i);return t[i]=!0,n.forEach(e.neighbors(i),function(a){n.has(t,a)||(r=m(e,t,r,a,i))}),s.low=o,s.lim=r++,a?s.parent=a:delete s.parent,r}function h(e){return n.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function g(e,t,r){var a=r.v,o=r.w;t.hasEdge(a,o)||(a=r.w,o=r.v);var s=e.node(a),c=e.node(o),l=s,u=!1;s.lim>c.lim&&(l=c,u=!0);var d=n.filter(t.edges(),function(t){return u===b(e,e.node(t.v),l)&&u!==b(e,e.node(t.w),l)});return n.minBy(d,function(e){return i(t,e)})}function _(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),p(e),u(e,t),v(e,t)}function v(e,t){var r=o(e,n.find(e.nodes(),function(e){return!t.node(e).parent}));r=r.slice(1),n.forEach(r,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function y(e,t,n){return e.hasEdge(t,n)}function b(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}})),xZ=r(((e,t)=>{var n=vZ().longestPath,r=yZ(),i=bZ();t.exports=a;function a(e){switch(e.graph().ranker){case`network-simplex`:c(e);break;case`tight-tree`:s(e);break;case`longest-path`:o(e);break;default:c(e)}}var o=n;function s(e){n(e),r(e)}function c(e){i(e)}})),SZ=r(((e,t)=>{var n=fZ();t.exports=r;function r(e){var t=a(e);n.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),a=r.edgeObj,o=i(e,t,a.v,a.w),s=o.path,c=o.lca,l=0,u=s[l],d=!0;n!==a.w;){if(r=e.node(n),d){for(;(u=s[l])!==c&&e.node(u).maxRank<r.rank;)l++;u===c&&(d=!1)}if(!d){for(;l<s.length-1&&e.node(u=s[l+1]).minRank<=r.rank;)l++;u=s[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function i(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c=n,l;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function a(e){var t={},r=0;function i(a){var o=r;n.forEach(e.children(a),i),t[a]={low:o,lim:r++}}return n.forEach(e.children(),i),t}})),CZ=r(((e,t)=>{var n=fZ(),r=gZ();t.exports={run:i,cleanup:c};function i(e){var t=r.addDummyNode(e,`root`,{},`_root`),i=o(e),c=n.max(n.values(i))-1,l=2*c+1;e.graph().nestingRoot=t,n.forEach(e.edges(),function(t){e.edge(t).minlen*=l});var u=s(e)+1;n.forEach(e.children(),function(n){a(e,t,l,u,c,i,n)}),e.graph().nodeRankFactor=l}function a(e,t,i,o,s,c,l){var u=e.children(l);if(!u.length)l!==t&&e.setEdge(t,l,{weight:0,minlen:i});else{var d=r.addBorderNode(e,`_bt`),f=r.addBorderNode(e,`_bb`),p=e.node(l);e.setParent(d,l),p.borderTop=d,e.setParent(f,l),p.borderBottom=f,n.forEach(u,function(n){a(e,t,i,o,s,c,n);var r=e.node(n),u=r.borderTop?r.borderTop:n,p=r.borderBottom?r.borderBottom:n,m=r.borderTop?o:2*o,h=u===p?s-c[l]+1:1;e.setEdge(d,u,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,f,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(l)||e.setEdge(t,d,{weight:0,minlen:s+c[l]})}}function o(e){var t={};function r(i,a){var o=e.children(i);o&&o.length&&n.forEach(o,function(e){r(e,a+1)}),t[i]=a}return n.forEach(e.children(),function(e){r(e,1)}),t}function s(e){return n.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function c(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,n.forEach(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}})),wZ=r(((e,t)=>{var n=fZ(),r=gZ();t.exports=i;function i(e){function t(r){var i=e.children(r),o=e.node(r);if(i.length&&n.forEach(i,t),n.has(o,`minRank`)){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(e,`borderLeft`,`_bl`,r,o,s),a(e,`borderRight`,`_br`,r,o,s)}}n.forEach(e.children(),t)}function a(e,t,n,i,a,o){var s={width:0,height:0,rank:o,borderType:t},c=a[t][o-1],l=r.addDummyNode(e,`border`,s,n);a[t][o]=l,e.setParent(l,i),c&&e.setEdge(c,l,{weight:1})}})),TZ=r(((e,t)=>{var n=fZ();t.exports={adjust:r,undo:i};function r(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&a(e)}function i(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&s(e),(t===`lr`||t===`rl`)&&(l(e),a(e))}function a(e){n.forEach(e.nodes(),function(t){o(e.node(t))}),n.forEach(e.edges(),function(t){o(e.edge(t))})}function o(e){var t=e.width;e.width=e.height,e.height=t}function s(e){n.forEach(e.nodes(),function(t){c(e.node(t))}),n.forEach(e.edges(),function(t){var r=e.edge(t);n.forEach(r.points,c),n.has(r,`y`)&&c(r)})}function c(e){e.y=-e.y}function l(e){n.forEach(e.nodes(),function(t){u(e.node(t))}),n.forEach(e.edges(),function(t){var r=e.edge(t);n.forEach(r.points,u),n.has(r,`x`)&&u(r)})}function u(e){var t=e.x;e.x=e.y,e.y=t}})),EZ=r(((e,t)=>{var n=fZ();t.exports=r;function r(e){var t={},r=n.filter(e.nodes(),function(t){return!e.children(t).length}),i=n.max(n.map(r,function(t){return e.node(t).rank})),a=n.map(n.range(i+1),function(){return[]});function o(r){n.has(t,r)||(t[r]=!0,a[e.node(r).rank].push(r),n.forEach(e.successors(r),o))}var s=n.sortBy(r,function(t){return e.node(t).rank});return n.forEach(s,o),a}})),DZ=r(((e,t)=>{var n=fZ();t.exports=r;function r(e,t){for(var n=0,r=1;r<t.length;++r)n+=i(e,t[r-1],t[r]);return n}function i(e,t,r){for(var i=n.zipObject(r,n.map(r,function(e,t){return t})),a=n.flatten(n.map(t,function(t){return n.sortBy(n.map(e.outEdges(t),function(t){return{pos:i[t.w],weight:e.edge(t).weight}}),`pos`)}),!0),o=1;o<r.length;)o<<=1;var s=2*o-1;--o;var c=n.map(Array(s),function(){return 0}),l=0;return n.forEach(a.forEach(function(e){var t=e.pos+o;c[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=c[t+1]),t=t-1>>1,c[t]+=e.weight;l+=e.weight*n})),l}})),OZ=r(((e,t)=>{var n=fZ();t.exports=r;function r(e,t){return n.map(t,function(t){var r=e.inEdges(t);if(r.length){var i=n.reduce(r,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:i.sum/i.weight,weight:i.weight}}return{v:t}})}})),kZ=r(((e,t)=>{var n=fZ();t.exports=r;function r(e,t){var r={};return n.forEach(e,function(e,t){var i=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};n.isUndefined(e.barycenter)||(i.barycenter=e.barycenter,i.weight=e.weight)}),n.forEach(t.edges(),function(e){var t=r[e.v],i=r[e.w];!n.isUndefined(t)&&!n.isUndefined(i)&&(i.indegree++,t.out.push(r[e.w]))}),i(n.filter(r,function(e){return!e.indegree}))}function i(e){var t=[];function r(e){return function(t){t.merged||(n.isUndefined(t.barycenter)||n.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&a(e,t)}}function i(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var o=e.pop();t.push(o),n.forEach(o.in.reverse(),r(o)),n.forEach(o.out,i(o))}return n.map(n.filter(t,function(e){return!e.merged}),function(e){return n.pick(e,[`vs`,`i`,`barycenter`,`weight`])})}function a(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}})),AZ=r(((e,t)=>{var n=fZ(),r=gZ();t.exports=i;function i(e,t){var i=r.partition(e,function(e){return n.has(e,`barycenter`)}),s=i.lhs,c=n.sortBy(i.rhs,function(e){return-e.i}),l=[],u=0,d=0,f=0;s.sort(o(!!t)),f=a(l,c,f),n.forEach(s,function(e){f+=e.vs.length,l.push(e.vs),u+=e.barycenter*e.weight,d+=e.weight,f=a(l,c,f)});var p={vs:n.flatten(l,!0)};return d&&(p.barycenter=u/d,p.weight=d),p}function a(e,t,r){for(var i;t.length&&(i=n.last(t)).i<=r;)t.pop(),e.push(i.vs),r++;return r}function o(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}})),jZ=r(((e,t)=>{var n=fZ(),r=OZ(),i=kZ(),a=AZ();t.exports=o;function o(e,t,l,u){var d=e.children(t),f=e.node(t),p=f?f.borderLeft:void 0,m=f?f.borderRight:void 0,h={};p&&(d=n.filter(d,function(e){return e!==p&&e!==m}));var g=r(e,d);n.forEach(g,function(t){if(e.children(t.v).length){var r=o(e,t.v,l,u);h[t.v]=r,n.has(r,`barycenter`)&&c(t,r)}});var _=i(g,l);s(_,h);var v=a(_,u);if(p&&(v.vs=n.flatten([p,v.vs,m],!0),e.predecessors(p).length)){var y=e.node(e.predecessors(p)[0]),b=e.node(e.predecessors(m)[0]);n.has(v,`barycenter`)||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+y.order+b.order)/(v.weight+2),v.weight+=2}return v}function s(e,t){n.forEach(e,function(e){e.vs=n.flatten(e.vs.map(function(e){return t[e]?t[e].vs:e}),!0)})}function c(e,t){n.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}})),MZ=r(((e,t)=>{var n=fZ(),r=yX().Graph;t.exports=i;function i(e,t,i){var o=a(e),s=new r({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(t){return e.node(t)});return n.forEach(e.nodes(),function(r){var a=e.node(r),c=e.parent(r);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(r),s.setParent(r,c||o),n.forEach(e[i](r),function(t){var i=t.v===r?t.w:t.v,a=s.edge(i,r),o=n.isUndefined(a)?0:a.weight;s.setEdge(i,r,{weight:e.edge(t).weight+o})}),n.has(a,`minRank`)&&s.setNode(r,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),s}function a(e){for(var t;e.hasNode(t=n.uniqueId(`_root`)););return t}})),NZ=r(((e,t)=>{var n=fZ();t.exports=r;function r(e,t,r){var i={},a;n.forEach(r,function(n){for(var r=e.parent(n),o,s;r;){if(o=e.parent(r),o?(s=i[o],i[o]=r):(s=a,a=r),s&&s!==r){t.setEdge(s,r);return}r=o}})}})),PZ=r(((e,t)=>{var n=fZ(),r=EZ(),i=DZ(),a=jZ(),o=MZ(),s=NZ(),c=yX().Graph,l=gZ();t.exports=u;function u(e){var t=l.maxRank(e),a=d(e,n.range(1,t+1),`inEdges`),o=d(e,n.range(t-1,-1,-1),`outEdges`),s=r(e);p(e,s);for(var c=1/0,u,m=0,h=0;h<4;++m,++h){f(m%2?a:o,m%4>=2),s=l.buildLayerMatrix(e);var g=i(e,s);g<c&&(h=0,u=n.cloneDeep(s),c=g)}p(e,u)}function d(e,t,r){return n.map(t,function(t){return o(e,t,r)})}function f(e,t){var r=new c;n.forEach(e,function(e){var i=e.graph().root,o=a(e,i,r,t);n.forEach(o.vs,function(t,n){e.node(t).order=n}),s(e,r,o.vs)})}function p(e,t){n.forEach(t,function(t){n.forEach(t,function(t,n){e.node(t).order=n})})}})),FZ=r(((e,t)=>{var n=fZ(),r=yX().Graph,i=gZ();t.exports={positionX:g,findType1Conflicts:a,findType2Conflicts:o,addConflict:c,hasConflict:l,verticalAlignment:u,horizontalCompaction:d,alignCoordinates:m,findSmallestWidthAlignment:p,balance:h};function a(e,t){var r={};function i(t,i){var a=0,o=0,l=t.length,u=n.last(i);return n.forEach(i,function(t,d){var f=s(e,t),p=f?e.node(f).order:l;(f||t===u)&&(n.forEach(i.slice(o,d+1),function(t){n.forEach(e.predecessors(t),function(n){var i=e.node(n),o=i.order;(o<a||p<o)&&!(i.dummy&&e.node(t).dummy)&&c(r,n,t)})}),o=d+1,a=p)}),i}return n.reduce(t,i),r}function o(e,t){var r={};function i(t,i,a,o,s){var l;n.forEach(n.range(i,a),function(i){l=t[i],e.node(l).dummy&&n.forEach(e.predecessors(l),function(t){var n=e.node(t);n.dummy&&(n.order<o||n.order>s)&&c(r,t,l)})})}function a(t,r){var a=-1,o,s=0;return n.forEach(r,function(n,c){if(e.node(n).dummy===`border`){var l=e.predecessors(n);l.length&&(o=e.node(l[0]).order,i(r,s,c,a,o),s=c,a=o)}i(r,s,r.length,o,t.length)}),r}return n.reduce(t,a),r}function s(e,t){if(e.node(t).dummy)return n.find(e.predecessors(t),function(t){return e.node(t).dummy})}function c(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function l(e,t,r){if(t>r){var i=t;t=r,r=i}return n.has(e[t],r)}function u(e,t,r,i){var a={},o={},s={};return n.forEach(t,function(e){n.forEach(e,function(e,t){a[e]=e,o[e]=e,s[e]=t})}),n.forEach(t,function(e){var t=-1;n.forEach(e,function(e){var c=i(e);if(c.length){c=n.sortBy(c,function(e){return s[e]});for(var u=(c.length-1)/2,d=Math.floor(u),f=Math.ceil(u);d<=f;++d){var p=c[d];o[e]===e&&t<s[p]&&!l(r,e,p)&&(o[p]=e,o[e]=a[e]=a[p],t=s[p])}}})}),{root:a,align:o}}function d(e,t,r,i,a){var o={},s=f(e,t,r,a),c=a?`borderLeft`:`borderRight`;function l(e,t){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){o[e]=s.inEdges(e).reduce(function(e,t){return Math.max(e,o[t.v]+s.edge(t))},0)}function d(t){var n=s.outEdges(t).reduce(function(e,t){return Math.min(e,o[t.w]-s.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==c&&(o[t]=Math.max(o[t],n))}return l(u,s.predecessors.bind(s)),l(d,s.successors.bind(s)),n.forEach(i,function(e){o[e]=o[r[e]]}),o}function f(e,t,i,a){var o=new r,s=e.graph(),c=_(s.nodesep,s.edgesep,a);return n.forEach(t,function(t){var r;n.forEach(t,function(t){var n=i[t];if(o.setNode(n),r){var a=i[r],s=o.edge(a,n);o.setEdge(a,n,Math.max(c(e,t,r),s||0))}r=t})}),o}function p(e,t){return n.minBy(n.values(t),function(t){var r=-1/0,i=1/0;return n.forIn(t,function(t,n){var a=v(e,n)/2;r=Math.max(t+a,r),i=Math.min(t-a,i)}),r-i})}function m(e,t){var r=n.values(t),i=n.min(r),a=n.max(r);n.forEach([`u`,`d`],function(r){n.forEach([`l`,`r`],function(o){var s=r+o,c=e[s],l;if(c!==t){var u=n.values(c);l=o===`l`?i-n.min(u):a-n.max(u),l&&(e[s]=n.mapValues(c,function(e){return e+l}))}})})}function h(e,t){return n.mapValues(e.ul,function(r,i){if(t)return e[t.toLowerCase()][i];var a=n.sortBy(n.map(e,i));return(a[1]+a[2])/2})}function g(e){var t=i.buildLayerMatrix(e),r=n.merge(a(e,t),o(e,t)),s={},c;return n.forEach([`u`,`d`],function(i){c=i===`u`?t:n.values(t).reverse(),n.forEach([`l`,`r`],function(t){t===`r`&&(c=n.map(c,function(e){return n.values(e).reverse()}));var a=(i===`u`?e.predecessors:e.successors).bind(e),o=u(e,c,r,a),l=d(e,c,o.root,o.align,t===`r`);t===`r`&&(l=n.mapValues(l,function(e){return-e})),s[i+t]=l})}),m(s,p(e,s)),h(s,e.graph().align)}function _(e,t,r){return function(i,a,o){var s=i.node(a),c=i.node(o),l=0,u;if(l+=s.width/2,n.has(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:u=-s.width/2;break;case`r`:u=s.width/2}if(u&&(l+=r?u:-u),u=0,l+=(s.dummy?t:e)/2,l+=(c.dummy?t:e)/2,l+=c.width/2,n.has(c,`labelpos`))switch(c.labelpos.toLowerCase()){case`l`:u=c.width/2;break;case`r`:u=-c.width/2}return u&&(l+=r?u:-u),u=0,l}}function v(e,t){return e.node(t).width}})),IZ=r(((e,t)=>{var n=fZ(),r=gZ(),i=FZ().positionX;t.exports=a;function a(e){e=r.asNonCompoundGraph(e),o(e),n.forEach(i(e),function(t,n){e.node(n).x=t})}function o(e){var t=r.buildLayerMatrix(e),i=e.graph().ranksep,a=0;n.forEach(t,function(t){var r=n.max(n.map(t,function(t){return e.node(t).height}));n.forEach(t,function(t){e.node(t).y=a+r/2}),a+=r+i})}})),LZ=r(((e,t)=>{var n=fZ(),r=hZ(),i=_Z(),a=xZ(),o=gZ().normalizeRanks,s=SZ(),c=gZ().removeEmptyRanks,l=CZ(),u=wZ(),d=TZ(),f=PZ(),p=IZ(),m=gZ(),h=yX().Graph;t.exports=g;function g(e,t){var n=t&&t.debugTiming?m.time:m.notime;n(`layout`,function(){var t=n(` buildLayoutGraph`,function(){return D(e)});n(` runLayout`,function(){_(t,n)}),n(` updateInputGraph`,function(){v(e,t)})})}function _(e,t){t(` makeSpaceForEdgeLabels`,function(){O(e)}),t(` removeSelfEdges`,function(){L(e)}),t(` acyclic`,function(){r.run(e)}),t(` nestingGraph.run`,function(){l.run(e)}),t(` rank`,function(){a(m.asNonCompoundGraph(e))}),t(` injectEdgeLabelProxies`,function(){k(e)}),t(` removeEmptyRanks`,function(){c(e)}),t(` nestingGraph.cleanup`,function(){l.cleanup(e)}),t(` normalizeRanks`,function(){o(e)}),t(` assignRankMinMax`,function(){A(e)}),t(` removeEdgeLabelProxies`,function(){j(e)}),t(` normalize.run`,function(){i.run(e)}),t(` parentDummyChains`,function(){s(e)}),t(` addBorderSegments`,function(){u(e)}),t(` order`,function(){f(e)}),t(` insertSelfEdges`,function(){R(e)}),t(` adjustCoordinateSystem`,function(){d.adjust(e)}),t(` position`,function(){p(e)}),t(` positionSelfEdges`,function(){z(e)}),t(` removeBorderNodes`,function(){I(e)}),t(` normalize.undo`,function(){i.undo(e)}),t(` fixupEdgeLabelCoords`,function(){P(e)}),t(` undoCoordinateSystem`,function(){d.undo(e)}),t(` translateGraph`,function(){M(e)}),t(` assignNodeIntersects`,function(){N(e)}),t(` reversePoints`,function(){F(e)}),t(` acyclic.undo`,function(){r.undo(e)})}function v(e,t){n.forEach(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),n.forEach(e.edges(),function(r){var i=e.edge(r),a=t.edge(r);i.points=a.points,n.has(a,`x`)&&(i.x=a.x,i.y=a.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var y=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],b={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},x=[`acyclicer`,`ranker`,`rankdir`,`align`],S=[`width`,`height`],C={width:0,height:0},w=[`minlen`,`weight`,`width`,`height`,`labeloffset`],T={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},E=[`labelpos`];function D(e){var t=new h({multigraph:!0,compound:!0}),r=V(e.graph());return t.setGraph(n.merge({},b,B(r,y),n.pick(r,x))),n.forEach(e.nodes(),function(r){var i=V(e.node(r));t.setNode(r,n.defaults(B(i,S),C)),t.setParent(r,e.parent(r))}),n.forEach(e.edges(),function(r){var i=V(e.edge(r));t.setEdge(r,n.merge({},T,B(i,w),n.pick(i,E)))}),t}function O(e){var t=e.graph();t.ranksep/=2,n.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function k(e){n.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};m.addDummyNode(e,`edge-proxy`,i,`_ep`)}})}function A(e){var t=0;n.forEach(e.nodes(),function(r){var i=e.node(r);i.borderTop&&(i.minRank=e.node(i.borderTop).rank,i.maxRank=e.node(i.borderBottom).rank,t=n.max(t,i.maxRank))}),e.graph().maxRank=t}function j(e){n.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function M(e){var t=1/0,r=0,i=1/0,a=0,o=e.graph(),s=o.marginx||0,c=o.marginy||0;function l(e){var n=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,n-s/2),r=Math.max(r,n+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}n.forEach(e.nodes(),function(t){l(e.node(t))}),n.forEach(e.edges(),function(t){var r=e.edge(t);n.has(r,`x`)&&l(r)}),t-=s,i-=c,n.forEach(e.nodes(),function(n){var r=e.node(n);r.x-=t,r.y-=i}),n.forEach(e.edges(),function(r){var a=e.edge(r);n.forEach(a.points,function(e){e.x-=t,e.y-=i}),n.has(a,`x`)&&(a.x-=t),n.has(a,`y`)&&(a.y-=i)}),o.width=r-t+s,o.height=a-i+c}function N(e){n.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(m.intersectRect(r,a)),n.points.push(m.intersectRect(i,o))})}function P(e){n.forEach(e.edges(),function(t){var r=e.edge(t);if(n.has(r,`x`))switch((r.labelpos===`l`||r.labelpos===`r`)&&(r.width-=r.labeloffset),r.labelpos){case`l`:r.x-=r.width/2+r.labeloffset;break;case`r`:r.x+=r.width/2+r.labeloffset}})}function F(e){n.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function I(e){n.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),i=e.node(r.borderTop),a=e.node(r.borderBottom),o=e.node(n.last(r.borderLeft)),s=e.node(n.last(r.borderRight));r.width=Math.abs(s.x-o.x),r.height=Math.abs(a.y-i.y),r.x=o.x+r.width/2,r.y=i.y+r.height/2}}),n.forEach(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function L(e){n.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function R(e){var t=m.buildLayerMatrix(e);n.forEach(t,function(t){var r=0;n.forEach(t,function(t,i){var a=e.node(t);a.order=i+r,n.forEach(a.selfEdges,function(t){m.addDummyNode(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:a.rank,order:i+ ++r,e:t.e,label:t.label},`_se`)}),delete a.selfEdges})})}function z(e){n.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function B(e,t){return n.mapValues(n.pick(e,t),Number)}function V(e){var t={};return n.forEach(e,function(e,n){t[n.toLowerCase()]=e}),t}})),RZ=r(((e,t)=>{var n=fZ(),r=gZ(),i=yX().Graph;t.exports={debugOrdering:a};function a(e){var t=r.buildLayerMatrix(e),a=new i({compound:!0,multigraph:!0}).setGraph({});return n.forEach(e.nodes(),function(t){a.setNode(t,{label:t}),a.setParent(t,`layer`+e.node(t).rank)}),n.forEach(e.edges(),function(e){a.setEdge(e.v,e.w,{},e.name)}),n.forEach(t,function(e,t){var r=`layer`+t;a.setNode(r,{rank:`same`}),n.reduce(e,function(e,t){return a.setEdge(e,t,{style:`invis`}),t})}),a}})),zZ=r(((e,t)=>{t.exports=`0.8.5`})),BZ=r(((e,t)=>{t.exports={graphlib:yX(),layout:LZ(),debug:RZ(),util:{time:gZ().time,notime:gZ().notime},version:zZ()}})),VZ=e(BZ(),1),HZ=(e,t)=>`var(--mantine-color-${e}-${t})`;function UZ(){OL(`nf-flowgraph-live-styles`,`
|
|
281
|
+
.nf-fg-dot {
|
|
282
|
+
width: 9px; height: 9px; border-radius: 50%;
|
|
283
|
+
display: inline-block;
|
|
284
|
+
transition: opacity 0.25s ease, background-color 0.25s ease;
|
|
285
|
+
flex-shrink: 0;
|
|
286
|
+
}
|
|
287
|
+
.nf-fg-dot.is-ok { background: var(--mantine-color-teal-5); opacity: 1; }
|
|
288
|
+
.nf-fg-dot.is-warn { background: var(--mantine-color-yellow-5); opacity: 0.95; }
|
|
289
|
+
.nf-fg-dot.is-down { background: var(--mantine-color-red-5); opacity: 0.95; }
|
|
290
|
+
.nf-fg-dot.is-idle { background: var(--mantine-color-gray-5); opacity: 0.45; }
|
|
291
|
+
.nf-fg-dot.is-pulse { animation: nf-fg-pulse 2.4s ease-in-out infinite; }
|
|
292
|
+
@keyframes nf-fg-pulse {
|
|
293
|
+
0%, 100% { opacity: 1; }
|
|
294
|
+
50% { opacity: 0.4; }
|
|
295
|
+
}
|
|
296
|
+
@media (prefers-reduced-motion: reduce) {
|
|
297
|
+
.nf-fg-dot { transition: none; }
|
|
298
|
+
.nf-fg-dot.is-pulse { animation: none; opacity: 1; }
|
|
299
|
+
}
|
|
300
|
+
`)}function WZ({data:e}){let t=e.dir===`LR`,n={opacity:0,width:1,height:1,border:`none`},r=e.live,i=!!r?.metrics&&r.metrics.length>0;return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(NU,{type:`target`,position:t?yR.Left:yR.Top,style:n}),(0,Y.jsxs)(lc,{radius:`md`,p:`sm`,withBorder:!0,style:{width:232,borderColor:HZ(e.color,5),borderWidth:e.emphasis?2:1,background:`color-mix(in srgb, ${HZ(e.color,6)} 10%, var(--mantine-color-body))`,boxShadow:e.emphasis?`0 0 0 3px color-mix(in srgb, ${HZ(e.color,6)} 22%, transparent)`:void 0,cursor:e.clickable?`pointer`:void 0,contain:`layout paint`},children:[(0,Y.jsxs)(wl,{gap:`xs`,wrap:`nowrap`,align:`flex-start`,children:[(0,Y.jsx)(wv,{variant:`light`,color:e.color,size:36,radius:`md`,style:{flexShrink:0},children:e.icon}),(0,Y.jsxs)(`div`,{style:{minWidth:0,flex:1},children:[(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,justify:`space-between`,children:[(0,Y.jsx)(Fd,{fw:700,size:`sm`,lh:1.2,lineClamp:1,style:{minWidth:0},children:e.label}),r&&(0,Y.jsx)(`span`,{className:`nf-fg-dot is-${r.status??`idle`}${r.pulse?` is-pulse`:``}`,"aria-label":`État : ${r.status??`idle`}`})]}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,lh:1.25,mt:3,lineClamp:2,children:e.sub})]})]}),i&&(0,Y.jsx)(Q,{mt:8,pt:6,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:(r.metrics??[]).map(e=>(0,Y.jsxs)(wl,{justify:`space-between`,gap:4,wrap:`nowrap`,children:[(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,lineClamp:1,children:e.label}),(0,Y.jsx)(Fd,{size:`xs`,fw:600,style:{fontVariantNumeric:`tabular-nums`},children:e.value})]},e.label))})]}),(0,Y.jsx)(NU,{type:`source`,position:t?yR.Right:yR.Bottom,style:n})]})}var GZ={layer:WZ};function KZ(e,t,n,r,i){return(0,C.useMemo)(()=>{let a=!!r&&e.some(e=>(r[e.id]?.metrics?.length??0)>0),o=a?132:86,s=new VZ.default.graphlib.Graph;return s.setDefaultEdgeLabel(()=>({})),s.setGraph({rankdir:n,nodesep:42,ranksep:a?96:72,marginx:16,marginy:16}),e.forEach(e=>s.setNode(e.id,{width:232,height:o})),t.forEach(e=>s.setEdge(e.source,e.target)),VZ.default.layout(s),{nodes:e.map(e=>{let t=s.node(e.id);return{id:e.id,type:`layer`,position:{x:t.x-116,y:t.y-o/2},data:{...e.data,dir:n,live:r?.[e.id],clickable:i||e.data.clickable},draggable:!0}}),edges:t.map((e,t)=>({id:`e${t}-${e.source}-${e.target}`,source:e.source,target:e.target,label:e.label,type:`smoothstep`,animated:e.animated??!e.dashed,style:{stroke:HZ(e.color??`gray`,5),strokeWidth:2,strokeDasharray:e.dashed?`5 5`:void 0},labelStyle:{fontSize:11,fontWeight:600},labelBgPadding:[6,3],labelBgBorderRadius:6,markerEnd:{type:vR.ArrowClosed,color:HZ(e.color??`gray`,5)}}))}},[e,t,n,r,i])}function qZ({nodes:e,edges:t,dir:n=`TB`,height:r=440,ariaLabel:i,liveNodeData:a,onNodeClick:o}){(0,C.useEffect)(()=>UZ(),[]);let s=typeof document<`u`&&document.documentElement.getAttribute(`data-mantine-color-scheme`)===`light`?`light`:`dark`,c=KZ(e,t,n,a,!!o),[l,u]=(0,C.useState)(!1),d=e=>(0,Y.jsx)(Q,{role:`figure`,"aria-label":i,style:{height:e,border:`1px solid var(--mantine-color-default-border)`,borderRadius:N(10),overflow:`hidden`,contain:`content`},children:(0,Y.jsxs)(kG,{nodes:c.nodes,edges:c.edges,nodeTypes:GZ,forceColorMode:s,fitView:!0,fitViewOptions:{padding:`7.6%`},proOptions:{hideAttribution:!0},nodesConnectable:!1,elementsSelectable:!1,onNodeClick:o?(e,t)=>o(t.id):void 0,zoomOnScroll:!1,panOnScroll:!0,children:[(0,Y.jsx)(zG,{variant:PG.Dots,gap:18,size:1}),(0,Y.jsx)($G,{showInteractive:!1}),(0,Y.jsx)(vK,{pannable:!0,zoomable:!0,nodeStrokeWidth:3})]})});return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(Q,{pos:`relative`,children:[(0,Y.jsx)(O_,{label:`Plein écran`,children:(0,Y.jsx)(Q,{component:`button`,onClick:()=>u(!0),"aria-label":`Agrandir le schéma`,style:{position:`absolute`,top:8,right:8,zIndex:5,cursor:`pointer`,border:`1px solid var(--mantine-color-default-border)`,background:`var(--mantine-color-body)`,borderRadius:N(8),padding:N(6),lineHeight:0},children:(0,Y.jsx)(KT,{size:16})})}),d(r)]}),(0,Y.jsx)(sh,{opened:l,onClose:()=>u(!1),fullScreen:!0,radius:0,title:i,children:d(cL)})]})}var JZ=100,YZ=14,XZ={display:`flex`,flexWrap:`wrap`,alignItems:`baseline`,gap:4,lineHeight:1.55},ZZ={color:`light-dark(var(--mantine-color-gray-9), var(--mantine-color-gray-2))`,fontWeight:600},QZ={color:`var(--mantine-color-dimmed)`},$Z={color:`var(--mantine-color-dimmed)`,fontStyle:`italic`,whiteSpace:`pre`},eQ={fontFamily:`ui-monospace, SFMono-Regular, Menlo, monospace`,fontSize:`var(--mantine-font-size-xs)`,fontVariantNumeric:`tabular-nums`};function tQ({open:e}){return(0,Y.jsx)(ET,{size:13,style:{flexShrink:0,transition:`transform 120ms ease`,transform:e?`rotate(90deg)`:`none`,color:`var(--mantine-color-dimmed)`}})}function nQ({name:e,value:t,depth:n,defaultExpandedDepth:r,isLast:i,signal:a}){let o=_L(t),s=vL(t),[c,l]=(0,C.useState)(n<r),[u,d]=(0,C.useState)(!1);(0,C.useEffect)(()=>{a&&l(a.open)},[a]);let f=e===void 0?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`span`,{style:ZZ,children:e}),(0,Y.jsx)(`span`,{style:QZ,children:`:`})]}),p=i?null:(0,Y.jsx)(`span`,{style:QZ,children:`,`});if(!s){let e=o===`object`?`{}`:o===`array`?`[]`:bL(t);return(0,Y.jsxs)(`div`,{style:{...XZ,paddingLeft:n*YZ},children:[f,(0,Y.jsx)(`span`,{style:{color:yL[o],fontStyle:o===`null`?`italic`:void 0,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:e}),p]})}let m=Array.isArray(t),h=m?t.map((e,t)=>[String(t),e]):Object.entries(t),g=m?`[`:`{`,_=m?`]`:`}`,v=u?h:h.slice(0,JZ),y=h.length-v.length;return(0,Y.jsxs)(`div`,{children:[(0,Y.jsxs)(`div`,{style:{...XZ,paddingLeft:n*YZ,cursor:`pointer`},onClick:()=>l(e=>!e),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l(e=>!e))},role:`button`,tabIndex:0,"aria-expanded":c,"aria-label":`${e??g} — ${c?`replier`:`déplier`}`,children:[(0,Y.jsx)(tQ,{open:c}),f,(0,Y.jsx)(`span`,{style:QZ,children:g}),c?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(`span`,{style:$Z,children:[` `,CL(t,56),` `]}),(0,Y.jsx)(`span`,{style:QZ,children:_}),p]}),(0,Y.jsx)(np,{size:`xs`,variant:`light`,color:`gray`,style:{flexShrink:0},children:SL(t)})]}),c?(0,Y.jsxs)(Y.Fragment,{children:[v.map(([e,t],i)=>(0,Y.jsx)(nQ,{name:e,value:t,depth:n+1,defaultExpandedDepth:r,isLast:i===v.length-1&&y===0,signal:a},e)),y>0?(0,Y.jsx)(Q,{style:{paddingLeft:(n+1)*YZ},onClick:()=>d(!0),children:(0,Y.jsxs)(Fd,{size:`xs`,c:`dimmed`,style:{cursor:`pointer`,textDecoration:`underline dotted`},children:[`+`,y,` de plus…`]})}):null,(0,Y.jsxs)(`div`,{style:{...XZ,paddingLeft:n*YZ},children:[(0,Y.jsx)(`span`,{style:QZ,children:_}),p]})]}):null]})}function rQ(e){let[t,n]=(0,C.useState)(!1);return{copied:t,copy:()=>{navigator.clipboard?.writeText(e).then(()=>{n(!0),setTimeout(()=>n(!1),1200)})}}}function iQ({value:e,maxHeight:t=420,defaultExpandedDepth:n=1,toolbar:r=!0}){let[i,a]=(0,C.useState)(`tree`),[o,s]=(0,C.useState)(null),c=(0,C.useMemo)(()=>TL(e),[e]),{copied:l,copy:u}=rQ(c);return(0,Y.jsxs)(Q,{children:[r?(0,Y.jsxs)(wl,{justify:`space-between`,gap:`xs`,mb:6,wrap:`nowrap`,children:[(0,Y.jsx)(M_,{size:`xs`,value:i,onChange:e=>a(e),data:[{label:`Arbre`,value:`tree`},{label:`Brut`,value:`raw`}]}),(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,children:[i===`tree`?(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(O_,{label:`Tout déplier`,children:(0,Y.jsx)(ml,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Tout déplier`,onClick:()=>s({v:Date.now(),open:!0}),children:(0,Y.jsx)(OT,{size:15})})}),(0,Y.jsx)(O_,{label:`Tout replier`,children:(0,Y.jsx)(ml,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Tout replier`,onClick:()=>s({v:Date.now(),open:!1}),children:(0,Y.jsx)(kT,{size:15})})})]}):null,(0,Y.jsx)(O_,{label:l?`Copié`:`Copier le JSON`,children:(0,Y.jsx)(ml,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Copier le JSON`,onClick:u,children:l?(0,Y.jsx)(wT,{size:15}):(0,Y.jsx)(MT,{size:15})})})]})]}):null,i===`tree`?(0,Y.jsx)(Q,{style:{...eQ,maxHeight:t,overflow:`auto`},children:(0,Y.jsx)(nQ,{value:e,depth:0,defaultExpandedDepth:n,isLast:!0,signal:o})}):(0,Y.jsx)(wp,{block:!0,style:{maxHeight:t,overflow:`auto`,whiteSpace:`pre-wrap`,wordBreak:`break-word`},children:c})]})}function aQ({value:e,maxHeight:t=420}){return(0,Y.jsx)(iQ,{value:e,maxHeight:t})}function oQ({value:e,title:t,maxHeight:n=260,defaultExpandedDepth:r=1,toolbar:i=!0,width:a}){let o=_L(e);return(0,Y.jsxs)(lc,{withBorder:!0,radius:`md`,p:`xs`,style:a?{width:a}:void 0,children:[(0,Y.jsxs)(wl,{justify:`space-between`,gap:`xs`,wrap:`nowrap`,mb:6,children:[(0,Y.jsx)(Fd,{size:`xs`,fw:700,truncate:!0,children:t??`JSON`}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,style:{flexShrink:0},children:o===`object`||o===`array`?SL(e):o})]}),(0,Y.jsx)(Q,{children:(0,Y.jsx)(iQ,{value:e,maxHeight:n,defaultExpandedDepth:r,toolbar:i})})]})}function sQ({value:e,label:t,previewLength:n=48,title:r,width:i=380,maxHeight:a=320}){let o=t??CL(e,n);return(0,Y.jsxs)(nm,{width:i,shadow:`md`,radius:`md`,withArrow:!0,openDelay:120,closeDelay:120,position:`top`,withinPortal:!0,children:[(0,Y.jsx)(nm.Target,{children:(0,Y.jsx)(wp,{role:`button`,tabIndex:0,style:{cursor:`pointer`,whiteSpace:`nowrap`},"aria-label":typeof o==`string`?`${o} — aperçu JSON, survoler pour le détail`:void 0,children:o})}),(0,Y.jsx)(nm.Dropdown,{p:`xs`,children:(0,Y.jsx)(oQ,{value:e,title:r,width:i-24,maxHeight:a,toolbar:!0})})]})}function cQ(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function lQ(e){return e==null?(0,Y.jsx)(Fd,{span:!0,c:`dimmed`,children:`—`}):typeof e==`boolean`?(0,Y.jsx)(np,{size:`xs`,variant:`light`,color:e?`teal`:`gray`,children:e?`activé`:`désactivé`}):typeof e==`number`?(0,Y.jsx)(wp,{children:String(e)}):typeof e==`string`?e===``?(0,Y.jsx)(Fd,{span:!0,c:`dimmed`,children:`(vide)`}):(0,Y.jsx)(Fd,{span:!0,size:`sm`,style:{wordBreak:`break-word`},children:e}):(0,Y.jsx)(wp,{children:xL(e)})}function uQ({value:e,level:t=0}){return!cQ(e)||Object.keys(e).length===0?(0,Y.jsx)(Fd,{c:`dimmed`,size:`sm`,children:`Configuration vide.`}):(0,Y.jsx)(R_,{gap:2,style:{paddingLeft:t?12:0,borderLeft:t?`1px solid var(--mantine-color-default-border)`:void 0},children:Object.entries(e).map(([e,n])=>{if(cQ(n))return(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(Fd,{size:`sm`,fw:600,mt:6,children:e}),(0,Y.jsx)(uQ,{value:n,level:t+1})]},e);if(Array.isArray(n)){let t=n.every(e=>!cQ(e)&&!Array.isArray(e));return(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`nowrap`,gap:`xl`,align:`flex-start`,style:{padding:`2px 0`},children:[(0,Y.jsx)(Fd,{size:`sm`,c:`dimmed`,style:{flexShrink:0},children:e}),(0,Y.jsx)(`div`,{style:{textAlign:`right`,minWidth:0},children:n.length===0?(0,Y.jsx)(Fd,{span:!0,c:`dimmed`,children:`(aucun)`}):t?(0,Y.jsx)(Fd,{span:!0,size:`sm`,style:{wordBreak:`break-word`},children:n.map(String).join(`, `)}):(0,Y.jsxs)(np,{size:`xs`,variant:`light`,color:`gray`,children:[n.length,` élément(s)`]})})]},e)}return(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`nowrap`,gap:`xl`,style:{padding:`2px 0`},children:[(0,Y.jsx)(Fd,{size:`sm`,c:`dimmed`,children:e}),(0,Y.jsx)(`div`,{style:{textAlign:`right`},children:lQ(n)})]},e)})})}function dQ(){OL(`data-nf-live`,`
|
|
301
|
+
@keyframes nf-live-breathe{0%,100%{opacity:.5}50%{opacity:1}}
|
|
302
|
+
.nf-live-dot{width:8px;height:8px;border-radius:50%;background:var(--mantine-color-teal-6);animation:nf-live-breathe 2.4s ease-in-out infinite;flex:0 0 auto}
|
|
303
|
+
.nf-live-card{box-shadow:inset 0 0 0 1px rgba(18,184,134,.22)}
|
|
304
|
+
@keyframes nf-flash{0%{background:rgba(18,184,134,.28)}100%{background:transparent}}
|
|
305
|
+
.nf-flash{animation:nf-flash .9s ease-out;border-radius:4px}
|
|
306
|
+
@media (prefers-reduced-motion: reduce){
|
|
307
|
+
.nf-live-dot{animation:none;opacity:.85}
|
|
308
|
+
.nf-flash{animation:none;background:transparent}
|
|
309
|
+
}
|
|
310
|
+
`)}function fQ({value:e,children:t}){return(0,Y.jsx)(`span`,{className:`nf-flash`,children:t},String(e))}function pQ({icon:e,label:t,hint:n,hintVersion:r,info:i,value:a,accent:o=`brand`,footer:s,onClick:c,active:l,pulse:u,span:d=eD}){let f=(0,Y.jsx)(Fd,{size:`xs`,fw:600,tt:`uppercase`,style:{letterSpacing:.3},truncate:!0,children:t}),p=i??(n?(0,Y.jsx)(XE,{title:t,version:r,summary:n}):null);return(0,Y.jsx)(Wp.Col,{span:d,children:(0,Y.jsxs)(vp,{withBorder:!0,radius:`md`,p:`md`,h:`100%`,className:u?`nf-live-card`:void 0,style:{position:`relative`,cursor:c?`pointer`:void 0,borderColor:l?`var(--mantine-color-${o}-filled)`:void 0,transition:`border-color 120ms ease`,contain:`content`},children:[(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`nowrap`,mb:8,align:`flex-start`,children:[(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,c:`dimmed`,style:{minWidth:0},children:[c?(0,Y.jsxs)(ic,{onClick:c,"aria-pressed":l,style:{minWidth:0,color:`inherit`},children:[(0,Y.jsx)(`span`,{"aria-hidden":!0,style:{position:`absolute`,inset:0,borderRadius:`inherit`}}),f]}):f,p?(0,Y.jsx)(`span`,{style:{position:`relative`,zIndex:1,lineHeight:0},children:p}):null]}),(0,Y.jsx)(wv,{variant:`light`,color:o,size:34,radius:`md`,children:e})]}),(0,Y.jsx)(Fd,{component:`div`,fw:700,style:{fontSize:30,lineHeight:1.05,fontVariantNumeric:`tabular-nums`},children:a}),s?(0,Y.jsx)(`div`,{style:{marginTop:10},children:s}):null]})})}var mQ={neutral:`gray`,active:`brand`,ok:`teal`,warn:`yellow`,danger:`red`};function hQ({label:e,icon:t,value:n,tone:r=`neutral`,info:i}){return(0,Y.jsxs)(wl,{gap:`xs`,wrap:`nowrap`,style:{minWidth:0},children:[t&&(0,Y.jsx)(wv,{variant:`light`,color:mQ[r],size:`lg`,radius:`md`,children:t}),(0,Y.jsxs)(R_,{gap:0,style:{minWidth:0},children:[(0,Y.jsx)(Fd,{fz:10,fw:700,tt:`uppercase`,c:`dimmed`,style:{letterSpacing:.4,lineHeight:1.2},children:e}),(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,style:{minWidth:0},children:[(0,Y.jsx)(Q,{style:{fontVariantNumeric:`tabular-nums`,fontWeight:600,lineHeight:1.2,minWidth:0},children:n}),i]})]})]})}function gQ({segments:e,trailing:t,sticky:n=!0,ariaLabel:r=`Barre d'état`}){return(0,Y.jsx)(Q,{role:`region`,"aria-label":r,style:{contain:`content`,...n?{position:`sticky`,top:eL,zIndex:1,background:`var(--mantine-color-body)`,marginInline:`calc(var(--mantine-spacing-md) * -1)`,paddingInline:`var(--mantine-spacing-md)`,paddingBlock:`var(--mantine-spacing-xs)`,borderBottom:`1px solid var(--mantine-color-default-border)`}:{}},children:(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`wrap`,gap:`md`,children:[(0,Y.jsx)(wl,{gap:`md`,wrap:`wrap`,style:{minWidth:0},children:e.map((e,t)=>(0,Y.jsxs)(wl,{gap:`md`,wrap:`nowrap`,children:[t>0&&(0,Y.jsx)(Ap,{orientation:`vertical`,style:{alignSelf:`stretch`}}),(0,Y.jsx)(hQ,{...e})]},e.id))}),t&&(0,Y.jsx)(wl,{gap:`sm`,wrap:`nowrap`,children:t})]})})}function _Q({title:e,subtitle:t,icon:n,actions:r,statusBar:i,tabs:a,value:o,onChange:s,keepMounted:c=!1}){return(0,Y.jsxs)(R_,{gap:`md`,children:[(0,Y.jsx)(VE,{icon:n,title:e,subtitle:t,actions:r,sticky:!0}),i,(0,Y.jsxs)(bv,{value:o,onChange:e=>e&&s(e),keepMounted:c,children:[(0,Y.jsx)(bv.List,{children:a.map(e=>{let t=(0,Y.jsx)(bv.Tab,{value:e.value,leftSection:e.icon,rightSection:e.badge,disabled:e.disabled,children:e.label},e.value);return e.disabled&&e.disabledReason?(0,Y.jsx)(O_,{label:e.disabledReason,withArrow:!0,position:`bottom`,events:{hover:!0,focus:!0,touch:!0},children:(0,Y.jsx)(`span`,{children:t})},e.value):t})}),a.map(e=>(0,Y.jsx)(bv.Panel,{value:e.value,pt:`md`,children:e.panel},e.value))]})]})}function vQ(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase()}function yQ(e){return vQ(e).replace(/[^a-z0-9]+/g,``)}function bQ(e){return`cfg-row-${e}`}var xQ=2500,SQ=600,CQ={default:{label:`défaut`,color:`gray`,help:`Valeur par défaut du schéma (aucune surcharge).`},module:{label:`module`,color:`blue`,help:`Surchargée dans la config du module.`},app:{label:`app`,color:`grape`,help:`Surchargée dans la config de l'application (config.ts).`},env:{label:`env`,color:`teal`,help:`Surchargée par une variable d'environnement (priorité max).`},runtime:{label:`runtime`,color:`cyan`,help:`Valeur posée à l'exécution : éditée à chaud en développement (éphémère, perdue au redémarrage) ou dérivée du runtime.`}},wQ={zod:{label:`validé Zod`,color:`teal`,help:`Config validée par un schéma Zod au démarrage : types, valeurs et contraintes garantis. Un boot avec une config invalide échoue tôt (fail-fast).`},partial:{label:`schéma partiel`,color:`yellow`,help:`Une partie de la config est validée par Zod ; le reste est en migration.`},none:{label:`non migré (Zod)`,color:`gray`,help:`Module pas encore migré vers la validation Zod (dette config).`}};function TQ({source:e}){let t=CQ[e];return(0,Y.jsx)(XE,{title:`Provenance de la valeur`,summary:t.help,width:260,children:(0,Y.jsx)(np,{size:`xs`,variant:`light`,color:t.color,tt:`none`,style:{cursor:`help`},children:t.label})})}function EQ({f:e}){return(0,Y.jsxs)(wl,{gap:4,wrap:`wrap`,children:[e.reserved?(0,Y.jsx)($E,{title:`Réservé`,summary:`Réservé à une feature future — pas lu en runtime aujourd'hui.`,width:240,children:(0,Y.jsx)(np,{size:`sm`,variant:`light`,color:`gray`,leftSection:(0,Y.jsx)(GT,{size:11}),tt:`none`,style:{cursor:`help`},children:`réservé`})}):e.mutability===`live`?(0,Y.jsx)(QE,{title:`Modifiable à chaud`,summary:`Relu à chaque requête — modifiable en développement sans redémarrage. Figé en production.`,width:260,children:(0,Y.jsx)(np,{size:`sm`,variant:`light`,color:`teal`,leftSection:(0,Y.jsx)(yT,{size:11}),tt:`none`,style:{cursor:`help`},children:`à chaud (dev)`})}):e.mutability===`readonly`?(0,Y.jsx)(XE,{title:`Lecture seule`,summary:`Réglage non modifiable au runtime.`,width:220,children:(0,Y.jsx)(np,{size:`sm`,variant:`light`,color:`gray`,leftSection:(0,Y.jsx)(GT,{size:11}),tt:`none`,style:{cursor:`help`},children:`lecture seule`})}):(0,Y.jsx)(XE,{title:`Au redémarrage`,summary:`Pris en compte au démarrage (12-factor) — éditer la config / l'env puis redémarrer le serveur.`,width:260,children:(0,Y.jsx)(np,{size:`sm`,variant:`light`,color:`gray`,leftSection:(0,Y.jsx)(GT,{size:11}),tt:`none`,style:{cursor:`help`},children:`au redémarrage`})}),e.kernelDerived&&(0,Y.jsx)(XE,{title:`Auto (kernel)`,summary:`Valeur par défaut calculée à partir du kernel (tmpDir, domain…) → affichée « auto » ; la valeur effective est la valeur résolue au boot.`,width:260,children:(0,Y.jsx)(np,{size:`sm`,variant:`light`,color:`cyan`,leftSection:(0,Y.jsx)(QT,{size:11}),tt:`none`,style:{cursor:`help`},children:`auto (kernel)`})}),e.secret&&(0,Y.jsx)($E,{title:`Secret`,summary:`Donnée sensible : masquée dans Studio, rédigée dans les logs.`,width:240,children:(0,Y.jsx)(np,{size:`sm`,variant:`light`,color:`orange`,leftSection:(0,Y.jsx)(IT,{size:11}),tt:`none`,style:{cursor:`help`},children:`secret`})})]})}function DQ(){return(0,Y.jsx)(XE,{title:`Cascade de surcharge`,summary:`La valeur effective d'un réglage est calculée en empilant les sources : chaque niveau peut surcharger le précédent. La DERNIÈRE source définie gagne.`,sections:[{label:`Ordre de priorité`,body:(0,Y.jsx)(wl,{gap:6,wrap:`wrap`,children:[`default`,`module`,`app`,`env`].map((e,t)=>(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,children:[t>0&&(0,Y.jsx)(_T,{size:12,style:{opacity:.5}}),(0,Y.jsx)(TQ,{source:e})]},e))})},{label:`12-factor`,body:`La variable d'environnement a le dernier mot : déployer sans toucher au code. La colonne « Provenance » dit d'où vient la valeur gagnante.`}]})}function OQ(e){let t=[e.key];return e.env&&t.push(e.env),e.recipe&&t.push(e.recipe),typeof e.type==`string`&&t.push(e.type),typeof e.description==`string`&&t.push(e.description),typeof e.constraint==`string`&&t.push(e.constraint),t.join(` `)}function kQ({recipe:e}){return(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,children:[(0,Y.jsx)(wp,{style:{fontSize:11},children:e}),(0,Y.jsx)(Ep,{value:e,timeout:1500,children:({copied:t,copy:n})=>(0,Y.jsx)(O_,{label:t?`Copié`:`Copier`,withArrow:!0,children:(0,Y.jsx)(ml,{size:`sm`,variant:`subtle`,color:t?`teal`:`gray`,"aria-label":`Copier ${e}`,onClick:n,children:t?(0,Y.jsx)(wT,{size:14}):(0,Y.jsx)(MT,{size:14})})})})]})}function AQ(e,t){return t&&!!e.editControl&&e.mutability===`live`&&!e.secret&&!e.reserved}function jQ({onClick:e,pending:t,dirty:n}){return(0,Y.jsx)(O_,{label:`Appliquer (Entrée)`,withArrow:!0,children:(0,Y.jsx)(ml,{size:`sm`,variant:`light`,color:`brand`,disabled:!n||t,loading:t,onClick:e,"aria-label":`Appliquer la valeur`,children:(0,Y.jsx)(NT,{size:14})})})}function MQ({field:e,onEdit:t}){let n=e.editControl,[r,i]=(0,C.useState)(e.editValue),[a,o]=(0,C.useState)(xL(e.editValue)),[s,c]=(0,C.useState)(!1),[l,u]=(0,C.useState)(null),[d,f]=(0,C.useState)(!1),p=async n=>{if(s)return;c(!0),u(null),f(!1);let a;try{a=await t(e,n)}catch(e){a={ok:!1,error:e instanceof Error?e.message:String(e)}}c(!1),a.ok?(i(n),o(xL(n)),f(!0)):(u(a.error??`refusé`),o(xL(r)))},m=()=>{d&&f(!1),l&&u(null)},h=()=>{if(a===``){n.kind===`number`&&n.nullable&&p(null);return}let e=Number(a);Number.isNaN(e)?u(`nombre invalide`):r!==e&&p(e)},g=()=>{let e=n.kind===`text`&&n.nullable&&a.trim()===``?null:a;(r??null)!==(e??null)&&p(e)},_;if(n.kind===`switch`)_=(0,Y.jsx)(G_,{size:`sm`,checked:r===!0,disabled:s,onChange:e=>void p(e.currentTarget.checked),"aria-label":`Modifier ${e.key}`});else if(n.kind===`select`){let t=`∅ (null)`,i=n.nullable?[...n.options,t]:n.options;_=(0,Y.jsx)(P_,{size:`xs`,w:170,data:i,value:r==null?n.nullable?t:null:xL(r),disabled:s,allowDeselect:!1,comboboxProps:{withinPortal:!0},onChange:e=>{e!=null&&p(e===t?null:e)},"aria-label":`Modifier ${e.key}`})}else _=n.kind===`number`?(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,children:[(0,Y.jsx)(Hg,{size:`xs`,w:120,value:a===``?``:Number(a),min:n.min,max:n.max,allowDecimal:!n.integer,disabled:s,onChange:e=>{m(),o(e===``?``:String(e))},onKeyDown:e=>{e.key===`Enter`&&h()},"aria-label":`Modifier ${e.key}`}),(0,Y.jsx)(jQ,{onClick:h,pending:s,dirty:xL(r)!==a})]}):(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,children:[(0,Y.jsx)(xv,{size:`xs`,w:170,value:a,placeholder:n.nullable?`(vide = null)`:void 0,disabled:s,onChange:e=>{m(),o(e.currentTarget.value)},onKeyDown:e=>{e.key===`Enter`&&g()},"aria-label":`Modifier ${e.key}`}),(0,Y.jsx)(jQ,{onClick:g,pending:s,dirty:xL(r)!==a})]});return(0,Y.jsxs)(R_,{gap:2,children:[(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,children:[_,d&&(0,Y.jsx)(wT,{size:15,color:`var(--mantine-color-teal-6)`,"aria-label":`Enregistré`})]}),l&&(0,Y.jsx)(Fd,{size:`xs`,c:`red`,children:l})]})}function NQ({module:e,schema:t=`none`,sections:n,notice:r,editable:i=!1,onEdit:a,focusKey:o,renderHelp:s}){let c=wQ[t],[l,u]=(0,C.useState)(``),[d,f]=(0,C.useState)(null),p=(0,C.useRef)(null);(0,C.useEffect)(()=>{if(!o||p.current===o)return;let e=document.getElementById(bQ(o));if(!e)return;p.current=o;let t=window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,n=t=>e.scrollIntoView({block:`center`,behavior:t});n(t?`auto`:`smooth`),e.focus({preventScroll:!0}),f(o);let r=window.setTimeout(()=>n(`auto`),SQ);return()=>window.clearTimeout(r)},[o,n]),(0,C.useEffect)(()=>{if(d===null)return;let e=window.setTimeout(()=>f(null),xQ);return()=>window.clearTimeout(e)},[d]);let m=n.reduce((e,t)=>e+t.fields.length,0),h=(0,C.useMemo)(()=>{let e=vQ(l.trim()).split(/\s+/).filter(Boolean);return e.length?n.map(t=>({...t,fields:t.fields.filter(n=>{let r=vQ(`${OQ(n)} ${t.title}`);return e.every(e=>r.includes(e))})})).filter(e=>e.fields.length>0):n},[n,l]),g=h.reduce((e,t)=>e+t.fields.length,0),_=n.some(e=>e.fields.some(e=>e.effective!==void 0)),v=n.some(e=>e.fields.some(e=>e.source!==void 0)),y=n.some(e=>e.fields.some(e=>e.recipe!==void 0));return(0,Y.jsxs)(R_,{gap:`lg`,children:[(0,Y.jsxs)(wl,{gap:`sm`,wrap:`wrap`,children:[(0,Y.jsx)(wv,{variant:`light`,color:`brand`,size:`lg`,radius:`md`,children:(0,Y.jsx)(XT,{size:20})}),(0,Y.jsxs)(`div`,{style:{minWidth:0},children:[(0,Y.jsx)(Fd,{fz:10,fw:700,tt:`uppercase`,c:`dimmed`,style:{letterSpacing:.4},children:`Configuration`}),(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,children:[(0,Y.jsx)(jv,{order:2,size:`h4`,children:e}),(0,Y.jsx)(XE,{title:`Statut du schéma`,summary:c.help,width:300,children:(0,Y.jsx)(np,{variant:`light`,color:c.color,tt:`none`,style:{cursor:`help`},children:c.label})}),(0,Y.jsx)(XE,{title:`Validation de la configuration (Zod)`,summary:`Nodefony valide la configuration au démarrage avec Zod : un réglage invalide fait échouer le boot tôt, plutôt qu'un bug obscur en cours d'exécution.`,sections:[{label:`Source de vérité`,body:`Le schéma documente les clés, leurs types, leurs valeurs possibles et leurs défauts. C'est « ce qui est configurable ».`},{label:`Migration progressive`,body:`Tous les modules ne sont pas encore migrés ; un badge signale l'état (validé Zod / partiel / non migré).`}]}),v&&(0,Y.jsx)(DQ,{})]})]})]}),r,(0,Y.jsxs)(wl,{justify:`space-between`,align:`center`,gap:`sm`,wrap:`wrap`,children:[(0,Y.jsx)(xv,{value:l,onChange:e=>u(e.currentTarget.value),placeholder:`Rechercher un réglage…`,"aria-label":`Rechercher un réglage de configuration`,leftSection:(0,Y.jsx)(JT,{size:15}),size:`sm`,w:320}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,style:{fontVariantNumeric:`tabular-nums`},children:l.trim()?`${g} / ${m} réglages`:`${m} réglages`})]}),h.length===0&&(0,Y.jsxs)(Fd,{c:`dimmed`,size:`sm`,children:[`Aucun réglage ne correspond à «\xA0`,l.trim(),`\xA0».`]}),h.map(e=>(0,Y.jsxs)(R_,{gap:`xs`,children:[(0,Y.jsx)(jv,{order:3,size:`h5`,children:e.title}),e.description&&(0,Y.jsx)(Fd,{size:`sm`,c:`dimmed`,children:e.description}),(0,Y.jsx)(vp,{withBorder:!0,radius:`md`,p:0,children:(0,Y.jsxs)(uv,{striped:!0,withRowBorders:!1,verticalSpacing:`sm`,horizontalSpacing:`md`,children:[(0,Y.jsx)(uv.Thead,{children:(0,Y.jsxs)(uv.Tr,{children:[(0,Y.jsx)(uv.Th,{style:{width:280},children:`Réglage`}),_&&(0,Y.jsx)(uv.Th,{style:{width:190},children:`Valeur effective`}),(0,Y.jsx)(uv.Th,{style:{width:150},children:`Défaut`}),(0,Y.jsx)(uv.Th,{style:{width:200},children:`Type & valeurs`}),(0,Y.jsx)(uv.Th,{style:{width:180},children:`État`}),y&&(0,Y.jsx)(uv.Th,{style:{width:230},children:(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,children:[`Recette`,(0,Y.jsx)(XE,{title:`Recette d'override (12-factor)`,summary:`La variable d'environnement qui surcharge ce réglage SANS toucher au code (NF__<MODULE>__<CHEMIN>). À copier dans .env (poste) ou dans l'orchestrateur, qui l'emporte.`,width:280})]})})]})}),(0,Y.jsx)(uv.Tbody,{children:e.fields.map(e=>(0,Y.jsxs)(uv.Tr,{id:bQ(e.key),tabIndex:e.key===o?-1:void 0,style:d===e.key?{background:`var(--mantine-color-yellow-light)`,outline:`2px solid var(--mantine-color-yellow-6)`,outlineOffset:-2}:void 0,children:[(0,Y.jsx)(uv.Td,{children:(0,Y.jsxs)(R_,{gap:2,children:[(0,Y.jsxs)(wl,{gap:4,wrap:`wrap`,children:[(0,Y.jsx)(wp,{style:{fontSize:12},children:e.key}),s?.(e),e.env&&(0,Y.jsx)(XE,{title:`Variable d'environnement`,summary:`Surcharge 12-factor : définir cette variable d'environnement surcharge le réglage au déploiement (priorité max dans la cascade).`,width:260,children:(0,Y.jsx)(wp,{style:{fontSize:10,cursor:`help`},children:e.env})})]}),e.description&&!s&&(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,children:e.description})]})}),_&&(0,Y.jsx)(uv.Td,{children:(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,children:[(0,Y.jsx)(Q,{style:{minWidth:0},children:AQ(e,i)&&a?(0,Y.jsx)(MQ,{field:e,onEdit:a}):e.effective??(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,children:`—`})}),e.source&&(0,Y.jsx)(TQ,{source:e.source})]})}),(0,Y.jsx)(uv.Td,{children:e.defaultValue??(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,children:`—`})}),(0,Y.jsx)(uv.Td,{children:(0,Y.jsxs)(R_,{gap:2,children:[e.type&&(0,Y.jsx)(np,{size:`xs`,variant:`default`,tt:`none`,children:e.type}),e.constraint&&(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,children:e.constraint})]})}),(0,Y.jsx)(uv.Td,{children:(0,Y.jsx)(EQ,{f:e})}),y&&(0,Y.jsx)(uv.Td,{children:e.recipe?(0,Y.jsx)(kQ,{recipe:e.recipe}):(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,children:`—`})})]},e.key))})]})})]},e.title))]})}var PQ={zod:{label:`validé Zod`,color:`teal`},partial:{label:`schéma partiel`,color:`yellow`},none:{label:`non migré (Zod)`,color:`gray`}};function FQ(e){return e.normalize(`NFD`).replace(/\p{Diacritic}/gu,``).toLowerCase()}function IQ(e){let t=[e.key];return typeof e.type==`string`&&t.push(e.type),typeof e.description==`string`&&t.push(e.description),typeof e.constraint==`string`&&t.push(e.constraint),t.join(` `)}function LQ({value:e,label:t}){return(0,Y.jsxs)(R_,{gap:0,children:[(0,Y.jsx)(Fd,{fw:700,fz:26,lh:1,style:{fontVariantNumeric:`tabular-nums`},children:e}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,children:t})]})}function RQ({field:e}){return(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`nowrap`,gap:`md`,align:`flex-start`,children:[(0,Y.jsx)(wp,{fz:11,title:e.key,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,minWidth:0,flex:`1 1 auto`},children:e.key}),(0,Y.jsx)(Q,{style:{flex:`0 0 auto`,maxWidth:`55%`,textAlign:`right`},children:e.effective??(0,Y.jsx)(Fd,{span:!0,size:`xs`,c:`dimmed`,children:`—`})})]})}function zQ({schema:e=`none`,sections:t,onOpen:n,height:r=`100%`}){let[i,a]=(0,C.useState)(``),o=(0,C.useMemo)(()=>t.flatMap(e=>e.fields),[t]),s=o.length,c=o.filter(e=>e.reserved).length,l=o.filter(e=>e.mutability===`live`&&!e.reserved).length,u=o.filter(e=>e.kernelDerived).length,d=o.filter(e=>e.secret).length,f=s-l-c,p=PQ[e],m=(0,C.useMemo)(()=>o.filter(e=>e.source===`app`||e.source===`env`),[o]),h=(0,C.useMemo)(()=>{let e=FQ(i.trim()).split(/\s+/).filter(Boolean);return e.length?o.filter(t=>{let n=FQ(IQ(t));return e.every(e=>n.includes(e))}):m},[o,m,i]);return(0,Y.jsxs)(vp,{withBorder:!0,radius:`md`,p:`lg`,h:r,style:{contain:`content`,display:`flex`,flexDirection:`column`},children:[(0,Y.jsxs)(wl,{justify:`space-between`,mb:`sm`,wrap:`nowrap`,children:[(0,Y.jsxs)(wl,{gap:8,wrap:`nowrap`,style:{minWidth:0},children:[(0,Y.jsx)(wv,{variant:`light`,color:`brand`,size:`md`,radius:`md`,children:(0,Y.jsx)(XT,{size:16})}),(0,Y.jsx)(Fd,{fw:600,children:`Configuration`}),(0,Y.jsx)(np,{variant:`light`,color:p.color,tt:`none`,children:p.label}),(0,Y.jsx)(XE,{title:`Synthèse de la configuration`,summary:`Aperçu de ce qui est configurable sur ce module : combien de réglages, lesquels changent sans redémarrer, et la valeur effective de chacun (recherche + détail au survol).`,sections:[{label:`À chaud vs au redémarrage`,body:`« À chaud » = relu à chaque requête (modifiable en dev sans reboot). Le reste est figé au démarrage (12-factor).`},{label:`Valeurs complexes`,body:`Une valeur tableau / objet s'affiche en aperçu compact ; survole-la pour la carte JSON complète.`}]})]}),n&&(0,Y.jsx)(dp,{variant:`light`,size:`xs`,onClick:n,children:`Tout voir`})]}),(0,Y.jsxs)(wl,{gap:`xl`,mb:`sm`,children:[(0,Y.jsx)(LQ,{value:s,label:`réglages`}),(0,Y.jsx)(LQ,{value:t.length,label:`sections`})]}),(0,Y.jsxs)(wl,{gap:6,wrap:`wrap`,mb:`sm`,children:[(0,Y.jsxs)(np,{variant:`light`,color:`teal`,leftSection:(0,Y.jsx)(yT,{size:11}),tt:`none`,children:[l,` à chaud`]}),(0,Y.jsxs)(np,{variant:`light`,color:`gray`,leftSection:(0,Y.jsx)(GT,{size:11}),tt:`none`,children:[f,` au redémarrage`]}),c>0&&(0,Y.jsxs)(np,{variant:`light`,color:`gray`,leftSection:(0,Y.jsx)(GT,{size:11}),tt:`none`,children:[c,` réservé`,c>1?`s`:``]}),u>0&&(0,Y.jsxs)(np,{variant:`light`,color:`cyan`,leftSection:(0,Y.jsx)(QT,{size:11}),tt:`none`,children:[u,` auto (kernel)`]}),d>0&&(0,Y.jsxs)(np,{variant:`light`,color:`orange`,leftSection:(0,Y.jsx)(IT,{size:11}),tt:`none`,children:[d,` secret`,d>1?`s`:``]})]}),(0,Y.jsx)(xv,{value:i,onChange:e=>a(e.currentTarget.value),placeholder:`Rechercher un réglage…`,"aria-label":`Rechercher un réglage de configuration`,leftSection:(0,Y.jsx)(JT,{size:15}),size:`xs`,mb:`xs`}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,mb:6,children:i?`${h.length} résultat${h.length>1?`s`:``} sur ${s}`:m.length?`${m.length} surcharge${m.length>1?`s`:``} — réglages ≠ défaut`:`Tout par défaut · ${s} réglage${s>1?`s`:``}`}),(0,Y.jsx)(ec,{style:{flex:1},mih:60,mah:260,type:`auto`,offsetScrollbars:!0,children:h.length===0?(0,Y.jsx)(Fd,{c:`dimmed`,size:`xs`,py:`sm`,children:i?`Aucun réglage ne correspond.`:`Aucune surcharge : ce module tourne sur ses défauts. Cherche un réglage ci-dessus pour explorer, ou « Tout voir ».`}):(0,Y.jsx)(R_,{gap:6,pr:`xs`,children:h.map(e=>(0,Y.jsx)(RQ,{field:e},e.key))})})]})}function BQ(e){if(!(e>0))return 1;let t=10**Math.floor(Math.log10(e)),n=e/t;return(n<=1?1:n<=2?2:n<=2.5?2.5:n<=5?5:10)*t}function VQ(e,t){let n=BQ(Math.max(1,t)*1.15);return e===null||n>e||n<e*.5?n:e}var HQ=null;function UQ(){return HQ??=typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia(`(prefers-reduced-motion: reduce)`).matches,HQ}var WQ=e=>String(Math.round(e));function GQ({series:e,height:t=190,max:n,threshold:r,format:i=WQ,times:a,windowMs:o}){let[s,c]=(0,C.useState)(null),l=(0,C.useRef)(null),u=(0,C.useRef)(null),d=Math.max(0,...e.map(e=>e.data.length)),f=n??(l.current=VQ(l.current,Math.max(0,...e.flatMap(e=>e.data)))),p=a!==void 0&&o!==void 0&&o>0&&a.length>=2,m=p?a.length:d,h=p?a[m-1]:void 0,g=(0,C.useRef)({last:void 0,at:0});p&&g.current.last!==h&&(g.current={last:h,at:Date.now()});let _=g.current.at,v=p?588/o:0,y=p&&!UQ(),b=e=>p?594-(_-(a[e]??_))*v:6+e*588/Math.max(1,d-1),x=(e,t)=>p?m-e+t:t,S=(e,t)=>e.data[p?t-(m-e.data.length):t],w=e=>194-Math.min(e,f)/f*188;if((0,C.useLayoutEffect)(()=>{let e=u.current;if(!y||e===null||typeof e.animate!=`function`)return;let t=e.animate([{transform:`translateX(0%)`},{transform:`translateX(-98%)`}],{duration:o,easing:`linear`,fill:`forwards`});return t.currentTime=Math.min(o,Math.max(0,Date.now()-_)),()=>t.cancel()},[h,y,588,o,_]),d<2)return null;let T=e=>{let t=e.currentTarget.getBoundingClientRect(),n=Math.min(1,Math.max(0,(e.clientX-t.left)/t.width)),r=n*600+(y?v*(Date.now()-_):0),i=0;for(let e=1;e<m;e+=1)Math.abs(b(e)-r)<Math.abs(b(i)-r)&&(i=e);c({idx:i,xPx:n*t.width,w:t.width})},E=s?s.xPx>s.w*.6?s.xPx-140:s.xPx+12:0,D=e.map(e=>`${e.label} ${i(e.data[e.data.length-1]??0)}`).join(`, `);return(0,Y.jsxs)(`div`,{style:{position:`relative`},onMouseMove:T,onMouseLeave:()=>c(null),role:`img`,"aria-label":`Graphe temps réel — ${D}`,children:[(0,Y.jsxs)(`svg`,{width:`100%`,height:t,viewBox:`0 0 600 200`,preserveAspectRatio:`none`,style:{display:`block`,overflow:`visible`},children:[r!=null&&(0,Y.jsx)(`rect`,{x:6,y:w(f),width:588,height:Math.max(0,w(r)-w(f)),fill:`var(--mantine-color-red-6)`,opacity:.07}),(0,Y.jsx)(`line`,{x1:6,y1:w(0),x2:594,y2:w(0),stroke:`var(--mantine-color-default-border)`,strokeWidth:1,vectorEffect:`non-scaling-stroke`,opacity:.6})]}),(0,Y.jsx)(`div`,{style:{position:`absolute`,inset:0,clipPath:`inset(0 1% 0 1%)`,pointerEvents:`none`},children:(0,Y.jsx)(`div`,{ref:u,style:{position:`absolute`,inset:0,willChange:y?`transform`:void 0},children:(0,Y.jsxs)(`svg`,{width:`100%`,height:`100%`,viewBox:`0 0 600 200`,preserveAspectRatio:`none`,style:{display:`block`,overflow:`visible`},children:[e.map(e=>{let t=e.data.length,n=e.data.map((e,n)=>`${b(x(t,n)).toFixed(1)},${w(e).toFixed(1)}`).join(` `),r=`${b(x(t,0)).toFixed(1)},194 ${n} ${b(x(t,t-1)).toFixed(1)},194`,i=e.data[e.data.length-1];return(0,Y.jsxs)(`g`,{children:[(0,Y.jsx)(`polygon`,{points:r,fill:e.color,opacity:.1}),(0,Y.jsx)(`polyline`,{points:n,fill:`none`,stroke:e.color,strokeWidth:2,strokeLinejoin:`round`,vectorEffect:`non-scaling-stroke`}),i!==void 0&&(0,Y.jsx)(`circle`,{cx:b(x(t,t-1)),cy:w(i),r:3,fill:e.color,vectorEffect:`non-scaling-stroke`})]},e.label)}),s&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(`line`,{x1:b(s.idx),y1:6,x2:b(s.idx),y2:194,stroke:`var(--mantine-color-dimmed)`,strokeWidth:1,strokeDasharray:`4 4`,vectorEffect:`non-scaling-stroke`,opacity:.6}),e.map(e=>(0,Y.jsx)(`circle`,{cx:b(s.idx),cy:w(S(e,s.idx)??0),r:3.5,fill:e.color,stroke:`var(--mantine-color-body)`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`},e.label))]})]})})}),(0,Y.jsx)(Fd,{c:`dimmed`,style:{position:`absolute`,top:0,left:2,fontSize:10},children:i(f)}),(0,Y.jsx)(Fd,{c:`dimmed`,style:{position:`absolute`,bottom:0,left:2,fontSize:10},children:`0`}),s&&(0,Y.jsx)(lc,{shadow:`sm`,p:6,withBorder:!0,style:{position:`absolute`,top:4,left:E,pointerEvents:`none`,zIndex:5},children:(0,Y.jsx)(R_,{gap:2,children:e.map(e=>(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,children:[(0,Y.jsx)(`span`,{style:{width:8,height:8,background:e.color,borderRadius:2}}),(0,Y.jsxs)(Fd,{size:`xs`,children:[e.label,` : `,(0,Y.jsx)(`b`,{children:i(S(e,s.idx)??0)})]})]},e.label))})})]})}function KQ({title:e,caption:t,badge:n,icon:r,fullscreen:i=!1,children:a}){let[o,s]=(0,C.useState)(!1),c=e=>typeof a==`function`?a({fullscreen:e}):a;return(0,Y.jsxs)(vp,{withBorder:!0,radius:`md`,p:`lg`,children:[(0,Y.jsxs)(wl,{justify:`space-between`,mb:2,wrap:`nowrap`,children:[(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,style:{minWidth:0},children:[r,(0,Y.jsx)(jv,{order:2,size:`h4`,children:e})]}),(0,Y.jsxs)(wl,{gap:`xs`,wrap:`nowrap`,children:[n,i&&(0,Y.jsx)(O_,{label:`Plein écran`,withArrow:!0,children:(0,Y.jsx)(ml,{variant:`subtle`,color:`gray`,"aria-label":`Afficher « ${e} » en plein écran`,onClick:()=>s(!0),children:(0,Y.jsx)(vT,{size:16})})})]})]}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,mb:`sm`,children:t}),c(!1),i&&(0,Y.jsx)(sh,{opened:o,onClose:()=>s(!1),fullScreen:!0,radius:0,title:e,transitionProps:{transition:`fade`,duration:150},children:(0,Y.jsxs)(R_,{gap:`sm`,children:[n&&(0,Y.jsx)(wl,{gap:`xs`,children:n}),(0,Y.jsx)(Fd,{size:`sm`,c:`dimmed`,children:t}),c(!0)]})})]})}function qQ({color:e,label:t,size:n=`xs`}){let r=n!==`xs`;return(0,Y.jsxs)(wl,{gap:6,wrap:`nowrap`,children:[(0,Y.jsx)(`span`,{style:{width:r?18:12,height:r?4:3,background:e,borderRadius:2}}),(0,Y.jsx)(Fd,{size:n,c:`dimmed`,children:t})]})}function JQ(e){return YQ(e)||typeof e==`function`||XQ(e)}function YQ(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function XQ(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function ZQ(e,t){return e==null?null:JQ(e)?C.createElement(e,t):e}function QQ(e){if(`cell`in e&&e.cell){let t=e.cell,n=t.column.columnDef,r=t,i=n;return r.getIsAggregated?.()?ZQ(i.aggregatedCell??n.cell,t.getContext()):r.getIsPlaceholder?.()?null:ZQ(n.cell,t.getContext())}return`header`in e&&e.header?ZQ(e.header.column.columnDef.header,e.header.getContext()):`footer`in e&&e.footer?ZQ(e.footer.column.columnDef.footer,e.footer.getContext()):null}function $Q({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0)n=e.nextSub;else{for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function e$(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var t$=[],n$=0,{link:r$,unlink:i$,propagate:a$,checkDirty:o$,shallowPropagate:s$}=$Q({update(e){return e._update()},notify(e){t$[l$++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,p$(e))}}),c$=0,l$=0,u$,d$=0;function f$(e){try{++d$,e()}finally{--d$||m$()}}function p$(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=i$(n,e)}function m$(){if(!(d$>0)){for(;c$<l$;){let e=t$[c$];t$[c$++]=void 0,e.notify()}c$=0,l$=0}}function h$(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:+!n,get(){return u$!==void 0&&r$(i,u$,n$),i._snapshot},subscribe(e){let t=e$(e),n={current:!1},r=g$(()=>{i.get(),n.current?(u$=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=u$,o=t?.compare??Object.is;if(n)u$=i,++n$,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{u$=a,n&&(i.flags&=-5),p$(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&o$(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&s$(e)}}else e&32&&(i.flags=e&-33);return u$!==void 0&&r$(i,u$,n$),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(a$(e),s$(e),m$())}},i}function g$(e){let t=()=>{let t=u$;u$=n,++n$,n.depsTail=void 0,n.flags=6;try{return e()}finally{u$=t,n.flags&=-5,p$(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&o$(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,p$(this)}};return t(),n}function _$(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();let n=v$(e);if(n.length!==v$(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function v$(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}var y$=r((e=>{var t=b();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),b$=r(((e,t)=>{t.exports=y$()})),x$=r((e=>{var t=b(),n=b$();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),S$=r(((e,t)=>{t.exports=x$()}))();function C$(e,t){return e===t}function w$(e,t=e=>e,n){let r=n?.compare??C$,i=(0,C.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,C.useCallback)(()=>e.get(),[e]);return(0,S$.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function T$(e){let t=w$(e.source,e.selector,{compare:_$});return typeof e.children==`function`?e.children(t):e.children}function E$(e){let t=e;return Object.defineProperty(e,"state",{get(){return e.get()}}),`set`in e&&(t.setState=e.set.bind(e)),t}function D$(e){let{createAtom:t,batch:n}=e,r=t(0);return{createOptionsStore:!1,wrapExternalAtoms:!1,addSubscription:()=>{throw Error(`Feature not supported in current reactivity implementation`)},unmount:()=>{throw Error(`Feature not supported in current reactivity implementation`)},schedule:e.schedule??(e=>queueMicrotask(e)),batch:n,untrack:e=>e(),createReadonlyAtom:(e,n)=>{let i=n?.compare??Object.is,a=!1,o,s=()=>{let t=e();return a&&i(o,t)||(o=t,a=!0),o},c=t(()=>(r.get(),s()),{compare:i});return{get:s,subscribe:c.subscribe.bind(c)}},createWritableAtom:(e,n)=>t(e,{compare:n?.compare}),commit:()=>{r.set(e=>e+1)}}}function O$(e,t=Object.is){let n=!1,r;return{get:e.get,markCommitted:e=>{r=e,n=!0},subscribe:i=>e.subscribe(e=>{n&&t(r,e)||i(e)})}}function k$(){return D$({createAtom:h$,batch:f$})}function A$(e,t){return typeof e==`function`?e(t):e}function j$(e){if(Array.isArray(e))return e.map(j$);if(e&&typeof e==`object`){let t=Object.getPrototypeOf(e);if(t!==Object.prototype&&t!==null)return e;let n=t===null?N$():{},r=Object.keys(e);for(let t=0;t<r.length;t++){let i=r[t];Object.defineProperty(n,i,{configurable:!0,enumerable:!0,value:j$(e[i]),writable:!0})}return n}return e}function M$(e,t){let n=Object.keys(t),r=e;for(let e=0;e<n.length;e++){let i=n[e];!i.startsWith(`_memo_`)&&i!==`_cellsCache`&&(r[i]=t[i])}return e}function N$(){return Object.create(null)}function P$(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function F$(e,t){return n=>{(t.options.atoms?.[e]??t.baseAtoms[e]).set(e=>A$(n,e))}}function I$(e){if(typeof e!=`object`||!e)return!1;if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function L$(e){return Reflect.ownKeys(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var R$=3;function z$(e,t){return B$(e,t,R$)}function B$(e,t,n){if(Object.is(e,t))return!0;if(n<=0||!I$(e)||!I$(t)||(Array.isArray(e)||Array.isArray(t))&&(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length))return!1;let r=L$(e),i=L$(t);if(r.length!==i.length)return!1;let a=e,o=t;for(let e=0;e<r.length;e++){let i=r[e];if(!Object.prototype.propertyIsEnumerable.call(t,i)||!B$(a[i],o[i],n-1))return!1}return!0}function V$(e,t,n,r=z$){let i=`on${t.charAt(0).toUpperCase()}${t.slice(1)}Change`,a=e.options[i];a&&a(e=>{let t=A$(n,e);return r(e,t)?e:t})}function H$(e){return e instanceof Function}function U$(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i.length&&r(i)})};return r(e),n}var W$=({fn:e,memoDeps:t,onAfterCompare:n,onAfterUpdate:r,onBeforeCompare:i,onBeforeUpdate:a})=>{let o=[],s;return c=>{i?.();let l=t?.(c),u=!l||l.length!==o?.length;if(!u&&l){for(let e=0;e<l.length;e++)if(l[e]!==o[e]){u=!0;break}}return n?.(u),u&&(o=l,a?.(),s=e(...l??[]),r?.(s)),s}};function G$(e){let t=!1;return()=>{t?e():t=!0}}function K$({feature:e,fnName:t,objectId:n,onAfterUpdate:r,table:i,...a}){let o={onAfterUpdate:r?()=>{let{schedule:e,untrack:t}=i._reactivity;e(()=>t(()=>r()))}:void 0};return W$({...a,...o})}function q$(e,t=`_`){let[n,r]=e.replace(t,` `).split(` `);return{fnKey:r,fnName:`${n}.${r}`,parentName:n}}function J$(e,t,n){for(let[r,{fn:i,memoDeps:a}]of Object.entries(n)){let{fnKey:n,fnName:o}=q$(r);t[n]=a?K$({memoDeps:a,fn:i,fnName:o,table:t,feature:e}):i}}function Y$(e,t,n,r){for(let[i,{fn:a,memoDeps:o}]of Object.entries(r)){let{fnKey:r,fnName:s}=q$(i);if(o){let i=`_memo_${r}`;t[r]=function(...t){if(!this[i]){let t=this;this[i]=K$({memoDeps:e=>o(t,e),fn:(...e)=>a(t,...e),fnName:s,objectId:t.id,table:n,feature:e})}return this[i](...t)}}else t[r]=function(...e){return a(this,...e)}}}function X$(e,t,n,...r){return e[t]?.(...r)??n(e,...r)}function Z$(e){return e.row.getValue(e.column.id)}function Q$(e){return e.getValue()??e.table.options.renderFallbackValue}function $$(e){return{table:e.table,column:e.column,row:e.row,cell:e,getValue:()=>e.getValue(),renderValue:()=>e.renderValue()}}var e1={assignCellPrototype:(e,t)=>{Y$(`coreCellsFeature`,e,t,{cell_getValue:{fn:e=>Z$(e)},cell_renderValue:{fn:e=>Q$(e)},cell_getContext:{fn:e=>$$(e),memoDeps:e=>[e]}})}};function t1(e){if(!e._columnPrototype){e._columnPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignColumnPrototype?.(e._columnPrototype,e)}return e._columnPrototype}function n1(e,t,n,r){let i={...e.getDefaultColumnDef(),...t},a=i.accessorKey,o=a===void 0?void 0:String(a),s=i.id??o?.replaceAll(`.`,`_`)??(typeof i.header==`string`?i.header:void 0),c;if(i.accessorFn)c=i.accessorFn;else if(a!==void 0){if(typeof a==`string`&&a.includes(`.`)){let e=a.split(`.`);c=t=>{let n=t;for(let t=0;t<e.length;t++){let r=e[t];n=n?.[r]}return n}}else c=e=>e[i.accessorKey]}if(!s)throw Error();let l=t1(e),u=Object.create(l);u.accessorFn=c,u.columnDef=i,u.columns=[],u.depth=n,u.id=`${String(s)}`,u.parent=r;let d=e._columnInstanceInitFns;for(let e=0;e<d.length;e++)d[e](u);return u}function r1(e){return e.getIsVisible?.()??!0}function i1(e){return e.getVisibleLeafColumns?.()??e.getAllLeafColumns()}function a1(e,t){let n=e,r=t;return n.getOrderColumnsFn?.()(r)??n._orderGroupedColumns?.(r)??t}function o1(e,t,n,r){return e._orderByColumnPinning?.(t,n,r)??t}function s1(e,t){return e.getPinnedVisibleLeafColumns?.(t)??(t&&t!==`center`?[]:i1(e))}function c1(e){return e.getGlobalFilterFn?.()}function l1(e){return e.getCanGlobalFilter?.()??!1}function u1(e,t){return e._expandRows?.(t)??t}function d1(e){e.autoResetExpanded?.()}function f1(e){e.autoResetPageIndex?.()}function p1(e){e.autoResetSorting?.()}function m1(e){e.autoResetCellSelection?.()}function h1(e){return[e,...e.columns.flatMap(e=>e.getFlatColumns())]}function g1(e){if(e.columns.length){let t=e.columns.flatMap(e=>e.getLeafColumns());return a1(e.table,t)}return[e]}function _1(e){return{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>e.renderValue()?.toString?.()??null,...Object.values(e._features).reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef?.()),{}),...e.options.defaultColumn}}function v1(e,t,n,r=0){let i=Array(t.length);for(let a=0;a<t.length;a++){if(!(a in t))continue;let o=t[a],s=n1(e,o,r,n),c=o;s.columns=c.columns?v1(e,c.columns,s,r+1):[],i[a]=s}return i}function y1(e){return v1(e,e.options.columns)}function b1(e){return e.getAllColumns().flatMap(e=>e.getFlatColumns())}function x1(e){let t=N$(),n=e.getAllFlatColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t}function S1(e){return a1(e,e.getAllColumns().flatMap(e=>e.getLeafColumns()))}function C1(e){let t=N$(),n=e.getAllLeafColumns();for(let e=0;e<n.length;e++){let r=n[e];t[r.id]=r}return t}function w1(e,t){return e.getAllFlatColumnsById()[t]}var T1={assignColumnPrototype:(e,t)=>{Y$(`coreColumnsFeature`,e,t,{column_getFlatColumns:{fn:e=>h1(e),memoDeps:e=>[e.table.options.columns]},column_getLeafColumns:{fn:e=>g1(e),memoDeps:e=>[e.table.atoms.columnOrder?.get(),e.table.atoms.grouping?.get(),e.table.options.columns,e.table.options.groupedColumnMode]}})},constructTableAPIs:e=>{J$(`coreColumnsFeature`,e,{table_getDefaultColumnDef:{fn:()=>_1(e),memoDeps:()=>[e.options.defaultColumn]},table_getAllColumns:{fn:()=>y1(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumns:{fn:()=>b1(e),memoDeps:()=>[e.options.columns]},table_getAllFlatColumnsById:{fn:()=>x1(e),memoDeps:()=>[e.options.columns]},table_getAllLeafColumns:{fn:()=>S1(e),memoDeps:()=>[e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getAllLeafColumnsById:{fn:()=>C1(e),memoDeps:()=>[e.getAllLeafColumns()]},table_getColumn:{fn:t=>w1(e,t)}})}};function E1(e){if(!e._headerPrototype){e._headerPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignHeaderPrototype?.(e._headerPrototype,e)}return e._headerPrototype}function D1(e,t,n){let r=E1(e),i=Object.create(r);i.colSpan=0,i.column=t,i.depth=n.depth,i.headerGroup=null,i.id=n.id??t.id,i.index=n.index,i.isPlaceholder=!!n.isPlaceholder,i.placeholderId=n.placeholderId,i.rowSpan=0,i.subHeaders=[];let a=e._headerInstanceInitFns;for(let e=0;e<a.length;e++)a[e](i);return i}function O1(e,t=1){let n=t;for(let r=0;r<e.length;r++){let i=e[r];r1(i)&&i.columns.length&&(n=Math.max(n,O1(i.columns,t+1)))}return n}function k1(e,t){return e?`${e}_${t}`:String(t)}function A1(e,t,n,r){let i=e??``;return t&&(i=i?`${i}_${t}`:String(t)),n&&(i=i?`${i}_${n}`:n),r&&(i=i?`${i}_${r}`:r),i}function j1(e,t){let n=0;for(let r=0;r<e.length;r++)e[r].column===t&&n++;return n}function M1(e,t,n,r,i,a){let o={depth:t,id:k1(r,t),headers:[]},s=[];for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i],c=s[s.length-1],l=a.column.depth===o.depth,u,d=!1;if(l&&a.column.parent?u=a.column.parent:(u=a.column,d=!0),c&&c.column===u)c.subHeaders.push(a);else{let e=D1(n,u,{id:A1(r,t,u.id,a.id),isPlaceholder:d,placeholderId:d?String(j1(s,u)):void 0,depth:t,index:s.length});e.subHeaders.push(a),s.push(e)}o.headers.push(a),a.headerGroup=o}for(let e=0;e<a.length;e++)a[e](o);i.push(o),t>0&&M1(s,t-1,n,r,i,a)}function N1(e){for(let t=0;t<e.length;t++){let n=e[t];if(!r1(n.column))continue;let r=0;if(n.subHeaders.length){N1(n.subHeaders);for(let e=0;e<n.subHeaders.length;e++){let t=n.subHeaders[e];r1(t.column)&&(r+=t.colSpan)}}else r=1;if(n.colSpan=r,n.isPlaceholder&&n.subHeaders.length===1&&n.subHeaders[0].column===n.column){let e=1,t=n.subHeaders[0];for(;t;)t.rowSpan=0,e++,t=t.subHeaders.length===1&&t.subHeaders[0].column===n.column?t.subHeaders[0]:void 0;n.rowSpan=e}else n.rowSpan=1}}function P1(e,t,n,r){let i=O1(e),a=[],o=n._headerGroupInstanceInitFns,s=Array(t.length);for(let e=0;e<t.length;e++)e in t&&(s[e]=D1(n,t[e],{depth:i,index:e}));return M1(s,i-1,n,r,a,o),a.reverse(),N1(a[0]?.headers??[]),a}function F1(e,t){for(let n=0;n<e.subHeaders.length;n++)F1(e.subHeaders[n],t);t.push(e)}function I1(e){let t=[];return F1(e,t),t}function L1(e){return{column:e.column,header:e,table:e.column.table}}function R1(e){return P1(e.getAllColumns(),o1(e,i1(e),e=>e.id),e)}function z1(e){return[...e.getHeaderGroups()].reverse()}function B1(e){let t=e.getHeaderGroups(),n=[];for(let e=0;e<t.length;e++){let r=t[e].headers;for(let e=0;e<r.length;e++)n.push(r[e])}return n}function V1(e){let t=e.getHeaderGroups()[0]?.headers??[],n=[];for(let e=0;e<t.length;e++){let r=t[e].getLeafHeaders();for(let e=0;e<r.length;e++)n.push(r[e])}return n}var H1={assignHeaderPrototype:(e,t)=>{Y$(`coreHeadersFeature`,e,t,{header_getLeafHeaders:{fn:e=>I1(e),memoDeps:e=>[e.column.table.options.columns]},header_getContext:{fn:e=>L1(e),memoDeps:e=>[e.column.table.options.columns]}})},constructTableAPIs:e=>{J$(`coreHeadersFeature`,e,{table_getHeaderGroups:{fn:()=>R1(e),memoDeps:()=>[e.options.columns,e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.options.groupedColumnMode]},table_getFooterGroups:{fn:()=>z1(e),memoDeps:()=>[e.getHeaderGroups()]},table_getFlatHeaders:{fn:()=>B1(e),memoDeps:()=>[e.getHeaderGroups()]},table_getLeafHeaders:{fn:()=>V1(e),memoDeps:()=>[e.getHeaderGroups()]}})}};function U1(e){if(!e._rowPrototype){e._rowPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignRowPrototype?.(e._rowPrototype,e)}return e._rowPrototype}var W1=(e,t,n,r,i,a,o)=>{let s=U1(e),c=Object.create(s);c._displayIndexCache=-1,c._uniqueValuesCache=N$(),c._valuesCache=N$(),c.depth=i,c.id=t,c.index=r,c.original=n,c.parentId=o,c.subRows=a??[];let l=e._rowInstanceInitFns;for(let e=0;e<l.length;e++)l[e](c);return c};function G1(){return e=>K$({feature:`coreRowModelsFeature`,table:e,fnName:`table.getCoreRowModel`,memoDeps:()=>[e.options.data],fn:()=>q1(e,e.options.data),onAfterUpdate:G$(()=>{d1(e),f1(e),p1(e),m1(e)})})}function K1(e,t,n,r=0,i){let a=[];for(let o=0;o<n.length;o++){let s=n[o],c=W1(e,e.getRowId(s,o,i),s,o,r,void 0,i?.id);t.flatRows.push(c),t.rowsById[c.id]=c,a.push(c),e.options.getSubRows&&(c.originalSubRows=e.options.getSubRows(s,o),c.originalSubRows?.length&&(c.subRows=K1(e,t,c.originalSubRows,r+1,c)))}return a}function q1(e,t){let n={rows:[],flatRows:[],rowsById:N$()};return n.rows=K1(e,n,t),n}function J1(e){return e._rowModels.coreRowModel||(e._rowModels.coreRowModel=e.options.features.coreRowModel?.(e)??G1()(e)),e._rowModels.coreRowModel()}function Y1(e){return e.getCoreRowModel()}function X1(e){return e._rowModels.filteredRowModel||(e._rowModels.filteredRowModel=e.options.features.filteredRowModel?.(e)),e.options.manualFiltering||!e._rowModels.filteredRowModel?e.getPreFilteredRowModel():e._rowModels.filteredRowModel()}function Z1(e){return e.getFilteredRowModel()}function Q1(e){return e._rowModels.groupedRowModel||(e._rowModels.groupedRowModel=e.options.features.groupedRowModel?.(e)),e.options.manualGrouping||!e._rowModels.groupedRowModel?e.getPreGroupedRowModel():e._rowModels.groupedRowModel()}function $1(e){return e.getGroupedRowModel()}function e0(e){return e._rowModels.sortedRowModel||(e._rowModels.sortedRowModel=e.options.features.sortedRowModel?.(e)),e.options.manualSorting||!e._rowModels.sortedRowModel?e.getPreSortedRowModel():e._rowModels.sortedRowModel()}function t0(e){return e.getSortedRowModel()}function n0(e){return e._rowModels.expandedRowModel||(e._rowModels.expandedRowModel=e.options.features.expandedRowModel?.(e)),e.options.manualExpanding||!e._rowModels.expandedRowModel?e.getPreExpandedRowModel():e._rowModels.expandedRowModel()}function r0(e){return e.getExpandedRowModel()}function i0(e){return e._rowModels.paginatedRowModel||(e._rowModels.paginatedRowModel=e.options.features.paginatedRowModel?.(e)),e.options.manualPagination||!e._rowModels.paginatedRowModel?e.getPrePaginatedRowModel():e._rowModels.paginatedRowModel()}function a0(e){return e.getPaginatedRowModel()}var o0={constructTableAPIs:e=>{J$(`coreRowModelsFeature`,e,{table_getCoreRowModel:{fn:()=>J1(e)},table_getPreFilteredRowModel:{fn:()=>Y1(e)},table_getFilteredRowModel:{fn:()=>X1(e)},table_getPreGroupedRowModel:{fn:()=>Z1(e)},table_getGroupedRowModel:{fn:()=>Q1(e)},table_getPreSortedRowModel:{fn:()=>$1(e)},table_getSortedRowModel:{fn:()=>e0(e)},table_getPreExpandedRowModel:{fn:()=>t0(e)},table_getExpandedRowModel:{fn:()=>n0(e)},table_getPrePaginatedRowModel:{fn:()=>r0(e)},table_getPaginatedRowModel:{fn:()=>i0(e)},table_getRowModel:{fn:()=>a0(e)}})}};function s0(e){if(!e._cellPrototype){e._cellPrototype={table:e};let t=Object.values(e._features);for(let n=0;n<t.length;n++)t[n].assignCellPrototype?.(e._cellPrototype,e)}return e._cellPrototype}function c0(e,t,n){let r=s0(n),i=Object.create(r);i.column=e,i.id=`${t.id}_${e.id}`,i.row=t;let a=n._cellInstanceInitFns;for(let e=0;e<a.length;e++)a[e](i);return i}function l0(e){let t=e.table.getRowsInDisplayOrder(),n=e._displayIndexCache;return t[n]===e?n:-1}function u0(e){let t=e.getPrePaginatedRowModel(),n=e.options.paginateExpandedRows===!1?u1(e,t).rows:t.rows;for(let e=0;e<n.length;e++)n[e]._displayIndexCache=e;return n}function d0(e,t){if(P$(e._valuesCache,t))return e._valuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return e._valuesCache[t]=n.accessorFn(e.original,e.index),e._valuesCache[t]}function f0(e,t){if(P$(e._uniqueValuesCache,t))return e._uniqueValuesCache[t];let n=e.table.getColumn(t);if(n?.accessorFn)return n.columnDef.getUniqueValues?(e._uniqueValuesCache[t]=n.columnDef.getUniqueValues(e.original,e.index),e._uniqueValuesCache[t]):(e._uniqueValuesCache[t]=[e.getValue(t)],e._uniqueValuesCache[t])}function p0(e,t){return e.getValue(t)??e.table.options.renderFallbackValue}function m0(e){return U$(e.subRows,e=>e.subRows)}function h0(e){let t=e.getCoreRowModel().flatRows,n=0;for(let e=0;e<t.length;e++)n=Math.max(n,t[e].depth);return n}function g0(e){if(e.parentId)return e.table.getCoreRowModel().rowsById[e.parentId]??e.table.getRow(e.parentId,!0)}function _0(e){let t=[],n=e;for(;;){let e=n.getParentRow();if(!e)break;t.push(e),n=e}return t.reverse()}function v0(e){let t=e.table.getAllLeafColumns(),n=e._cellsCache;n||=e._cellsCache=new WeakMap;let r=Array(t.length);for(let i=0;i<t.length;i++){let a=t[i],o=n.get(a);o||(o=c0(a,e,e.table),n.set(a,o)),r[i]=o}return r}function y0(e){let t=N$(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];t[r.column.id]=r}return t}function b0(e,t,n,r){return t.options.getRowId?.(e,n,r)??(r?`${r.id}.${n}`:String(n))}function x0(e,t,n){let r=(n?e.getPrePaginatedRowModel():e.getRowModel()).rowsById[t];if(!r&&(r=e.getCoreRowModel().rowsById[t],!r))throw Error();return r}var S0={assignRowPrototype:(e,t)=>{Y$(`coreRowsFeature`,e,t,{row_getDisplayIndex:{fn:e=>l0(e)},row_getAllCellsByColumnId:{fn:e=>y0(e),memoDeps:e=>[e.getAllCells()]},row_getAllCells:{fn:e=>v0(e),memoDeps:e=>[e.table.getAllLeafColumns()]},row_getLeafRows:{fn:e=>m0(e),memoDeps:e=>[e.subRows]},row_getParentRow:{fn:e=>g0(e)},row_getParentRows:{fn:e=>_0(e)},row_getUniqueValues:{fn:(e,t)=>f0(e,t)},row_getValue:{fn:(e,t)=>d0(e,t)},row_renderValue:{fn:(e,t)=>p0(e,t)}})},constructTableAPIs:e=>{J$(`coreRowsFeature`,e,{table_getRowsInDisplayOrder:{fn:()=>u0(e),memoDeps:()=>[e.getPrePaginatedRowModel().rows,e.options.paginateExpandedRows,e.options.paginateExpandedRows===!1?e.atoms.expanded?.get():void 0]},table_getRowId:{fn:(t,n,r)=>b0(t,e,n,r)},table_getRow:{fn:(t,n)=>x0(e,t,n)},table_getMaxSubRowDepth:{fn:()=>h0(e),memoDeps:()=>[e.getCoreRowModel()]}})}};function C0(e,t,n=(e,t)=>e===t){let r=t===void 0?e.options.state:t;e._reactivity.batch(()=>{if(r)for(let t in r){let i=e.baseAtoms[t];if(!i)continue;let a=r[t],o=a===void 0?e.initialState[t]:a;n(e._reactivity.untrack(()=>i.get()),o)||i.set(()=>o)}})}function w0(e,t,n=(e,t)=>e===t){e._reactivity.batch(()=>{C0(e,t,n),e._reactivity.commit?.()})}function T0(e){let t=j$(e.initialState);e._reactivity.batch(()=>{let n=Object.keys(t);for(let r=0;r<n.length;r++){let i=n[r];e.baseAtoms[i].set(t[i])}});let n=Object.values(e._features);for(let t=0;t<n.length;t++)n[t].resetTableInstanceData?.(e)}function E0(e,t){let{features:n,atoms:r,initialState:i}=e.options;if(!e.options.mergeOptions)return{...e.options,...t,features:n,atoms:r,initialState:i};let a=e.options.mergeOptions(e.options,t),o={...Object.getOwnPropertyDescriptors(a)};return Object.defineProperties(Object.create(Object.getPrototypeOf(a)),{...o,features:{value:n,enumerable:!0,configurable:!0,writable:!0},atoms:{value:r,enumerable:!0,configurable:!0,writable:!0},initialState:{value:i,enumerable:!0,configurable:!0,writable:!0}})}function D0(e,t,n){let r=E0(e,A$(t,e.options));e.optionsStore?e.optionsStore.set(()=>r):e.options=r,n?.syncExternalState!==!1&&w0(e,r.state??null)}var O0={coreCellsFeature:e1,coreColumnsFeature:T1,coreHeadersFeature:H1,coreRowModelsFeature:o0,coreRowsFeature:S0,coreTablesFeature:{constructTableAPIs:e=>{J$(`coreTablesFeature`,e,{table_reset:{fn:()=>T0(e)},table_setOptions:{fn:t=>D0(e,t)}})}}};function k0(e){return e}function A0(e,t={}){return Object.values(e).forEach(e=>{t=e.getInitialState?.(t)??t}),j$(t)}function j0(e){let t=e.features.coreReactivityFeature,{aggregationFns:n,columnMeta:r,coreRowModel:i,expandedRowModel:a,facetedMinMaxValues:o,facetedRowModel:s,facetedUniqueValues:c,filterFns:l,filterMeta:u,filteredRowModel:d,groupedRowModel:f,paginatedRowModel:p,sortFns:m,sortedRowModel:h,tableMeta:g,..._}=e.features,v={_cellInstanceInitFns:[],_columnInstanceInitFns:[],_features:{...O0,..._},_headerGroupInstanceInitFns:[],_headerInstanceInitFns:[],_reactivity:t,_rowInstanceInitFns:[],_rowModelFns:{aggregationFns:n,filterFns:l,sortFns:m},_rowModels:{},atoms:{},baseAtoms:{}},y=Object.values(v._features),b={...y.reduce((e,t)=>Object.assign(e,t.getDefaultTableOptions?.(v)),{}),...e};if(t.wrapExternalAtoms&&b.atoms)for(let[e,n]of Object.entries(b.atoms)){let r=n,i=t.createWritableAtom(r.get(),{debugName:`externalAtom/${e}`});b.atoms[e]=i;let a=!1,o=r.subscribe(e=>{a||i.set(e)}),s=i.subscribe(e=>{a=!0,r.set(e),a=!1});t.addSubscription(o),t.addSubscription(s)}t.createOptionsStore?(v.optionsStore=t.createWritableAtom(b,{debugName:`table/optionsStore`}),Object.defineProperty(v,"options",{configurable:!0,enumerable:!0,get(){return v.optionsStore.get()},set(e){v.optionsStore.set(()=>e)}})):v.options=b,v.initialState=A0(v._features,v.options.initialState);let x=Object.keys(v.initialState);for(let e=0;e<x.length;e++){let n=x[e];v.baseAtoms[n]=t.createWritableAtom(v.initialState[n],{debugName:`table/baseAtoms/${n}`}),v.atoms[n]=t.createReadonlyAtom(()=>{let e=v.options,t=e.atoms?.[n],r=t?t.get():v.baseAtoms[n].get();if(t)return r;let i=e.state;if(i&&P$(i,n)){let e=i[n];return e===void 0?v.initialState[n]:e}return r},{debugName:`table/atoms/${n}`})}C0(v),v.store=E$(t.createReadonlyAtom(()=>{let e={};for(let t=0;t<x.length;t++){let n=x[t];e[n]=v.atoms[n].get()}return e},{compare:_$,debugName:`table/store`}));for(let e=0;e<y.length;e++){let t=y[e];t.initTableInstanceData?.(v),t.initCellInstanceData&&v._cellInstanceInitFns.push(t.initCellInstanceData.bind(t)),t.initColumnInstanceData&&v._columnInstanceInitFns.push(t.initColumnInstanceData.bind(t)),t.initHeaderGroupInstanceData&&v._headerGroupInstanceInitFns.push(t.initHeaderGroupInstanceData.bind(t)),t.initHeaderInstanceData&&v._headerInstanceInitFns.push(t.initHeaderInstanceData.bind(t)),t.initRowInstanceData&&v._rowInstanceInitFns.push(t.initRowInstanceData.bind(t)),t.constructTableAPIs?.(v)}return v}function M0(e,t){let n=t._rowModels.facetedMinMaxValues??=N$(),r=n[e.id];return r||=n[e.id]=t.options.features.facetedMinMaxValues?.(t,e.id)??(()=>void 0),r()}function N0(e,t){let n=e?.id??``,r=t._rowModels.facetedRowModels??=N$(),i=r[n];return i||=r[n]=t.options.features.facetedRowModel?.(t,n)??(()=>t.getPreFilteredRowModel()),i()}function P0(e,t){let n=t._rowModels.facetedUniqueValues??=N$(),r=n[e.id];return r||=n[e.id]=t.options.features.facetedUniqueValues?.(t,e.id)??F0(),r()}function F0(){let e=new Map;return()=>e}function I0(e){e._rowModels.globalFacetedMinMaxValues||(e._rowModels.globalFacetedMinMaxValues=e.options.features.facetedMinMaxValues?.(e,`__global__`)??(()=>void 0));let t=e._rowModels.globalFacetedMinMaxValues;return t()}function L0(e){e._rowModels.globalFacetedRowModel||(e._rowModels.globalFacetedRowModel=e.options.features.facetedRowModel?.(e,`__global__`)??(()=>e.getPreFilteredRowModel()));let t=e._rowModels.globalFacetedRowModel;return t()}function R0(e){e._rowModels.globalFacetedUniqueValues||(e._rowModels.globalFacetedUniqueValues=e.options.features.facetedUniqueValues?.(e,`__global__`)??F0());let t=e._rowModels.globalFacetedUniqueValues;return t()}var z0={assignColumnPrototype:(e,t)=>{Y$(`columnFacetingFeature`,e,t,{column_getFacetedRowModel:{fn:e=>N0(e,e.table)},column_getFacetedMinMaxValues:{fn:e=>M0(e,e.table)},column_getFacetedUniqueValues:{fn:e=>P0(e,e.table)}})},constructTableAPIs:e=>{J$(`columnFacetingFeature`,e,{table_getGlobalFacetedRowModel:{fn:()=>L0(e)},table_getGlobalFacetedMinMaxValues:{fn:()=>I0(e)},table_getGlobalFacetedUniqueValues:{fn:()=>R0(e)}})}};function B0(){return[]}function V0(e){let t=e.table._rowModelFns.filterFns,n=e.table.getCoreRowModel().flatRows,r;for(let t=0;t<n.length;t++){let i=n[t].getValue(e.id);if(i!=null){r=i;break}}let i;return i=typeof r==`string`?`includesString`:typeof r==`number`?`inNumberRange`:typeof r==`boolean`?`equals`:Array.isArray(r)?`arrIncludes`:Object.prototype.toString.call(r)===`[object Date]`?`inDateRange`:typeof r==`object`&&r?`equals`:`weakEquals`,t?.[i]}function H0(e){let t=null,n=e.table._rowModelFns.filterFns;return t=H$(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn===`auto`?V0(e):n?.[e.columnDef.filterFn],t??void 0}function U0(e){return(e.columnDef.enableColumnFilter??!0)&&(e.table.options.enableColumnFilters??!0)&&(e.table.options.enableFilters??!0)&&!!e.accessorFn}function W0(e){return K0(e)>-1}function G0(e){return e.table.atoms.columnFilters?.get()?.find(t=>t.id===e.id)?.value}function K0(e){return e.table.atoms.columnFilters?.get()?.findIndex(t=>t.id===e.id)??-1}function q0(e,t){J0(e.table,n=>{let r=H0(e),i=n.find(t=>t.id===e.id),a=A$(t,i?i.value:void 0);if(X0(r,a,e))return n.filter(t=>t.id!==e.id);let o={id:e.id,value:a};return i?n.map(t=>t.id===e.id?o:t):n.length?[...n,o]:[o]})}function J0(e,t){let n=e.getAllLeafColumnsById();V$(e,`columnFilters`,e=>A$(t,e).filter(e=>{let t=n[e.id];return!(t&&X0(H0(t),e.value,t))}))}function Y0(e,t){J0(e,t?[]:j$(e.initialState.columnFilters??[]))}function X0(e,t,n){return t===void 0?!0:e?.autoRemove?!!e.autoRemove(t,n):typeof t==`string`&&!t}var Z0={getInitialState:e=>({columnFilters:B0(),...e}),getDefaultColumnDef:()=>({filterFn:`auto`}),getDefaultTableOptions:e=>({onColumnFiltersChange:F$(`columnFilters`,e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),assignColumnPrototype:(e,t)=>{Y$(`columnFilteringFeature`,e,t,{column_getAutoFilterFn:{fn:e=>V0(e)},column_getFilterFn:{fn:e=>H0(e)},column_getCanFilter:{fn:e=>U0(e)},column_getIsFiltered:{fn:e=>W0(e)},column_getFilterValue:{fn:e=>G0(e)},column_getFilterIndex:{fn:e=>K0(e)},column_setFilterValue:{fn:(e,t)=>q0(e,t)}})},initRowInstanceData:e=>{e.columnFilters=N$(),e.columnFiltersMeta=N$()},constructTableAPIs:e=>{J$(`columnFilteringFeature`,e,{table_setColumnFilters:{fn:t=>J0(e,t)},table_resetColumnFilters:{fn:t=>Y0(e,t)}})}};function Q0(){return N$()}function $0(){return{size:150,minSize:20,maxSize:2**53-1}}function e2(e){let t=$0(),n=e.table.atoms.columnSizing?.get(),r=n&&P$(n,e.id)?n[e.id]:void 0;return Math.min(Math.max(e.columnDef.minSize??t.minSize,r??e.columnDef.size??t.size),e.columnDef.maxSize??t.maxSize)}function t2(e){let t=N$(),n=N$(),r=Array(e.length),i=0;for(let n=0;n<e.length;n++){let a=e[n],o=X$(a,`getSize`,e2);r[n]=o,t[a.id]=i,i+=o}let a=0;for(let t=e.length-1;t>=0;t--)n[e[t].id]=a,a+=r[t];return{starts:t,afters:n}}function n2(e){return{all:t2(s1(e)),center:t2(s1(e,`center`)),start:t2(s1(e,`start`)),end:t2(s1(e,`end`))}}function r2(e){return e===`start`?`start`:e===`end`?`end`:e===`center`?`center`:`all`}function i2(e,t){return X$(e.table,`getColumnOffsets`,n2)[r2(t)].starts[e.id]??0}function a2(e,t){return X$(e.table,`getColumnOffsets`,n2)[r2(t)].afters[e.id]??0}function o2(e){u2(e.table,t=>{let n=N$(),r=Object.keys(t);for(let i=0;i<r.length;i++){let a=r[i];a!==e.id&&(n[a]=t[a])}return n})}function s2(e){if(!e.subHeaders.length)return e2(e.column);let t=0;for(let n=0;n<e.subHeaders.length;n++)t+=s2(e.subHeaders[n]);return t}function c2(e){return s2(e)}function l2(e){if(e.index>0){let t=e.headerGroup?.headers[e.index-1];if(t)return X$(t,`getStart`,l2)+X$(t,`getSize`,c2)}return 0}function u2(e,t){e.options.onColumnSizingChange?.(t)}function d2(e,t){u2(e,t?N$():Object.assign(N$(),j$(e.initialState.columnSizing??{})))}function f2(e){let t=0;for(let n=0;n<e.length;n++)t+=X$(e[n],`getSize`,e2);return t}function p2(e){return e.getHeaderGroups()[0]?.headers.reduce((e,t)=>e+c2(t),0)??0}function m2(e){return f2(s1(e,`start`))}function h2(e){return f2(s1(e,`center`))}function g2(e){return f2(s1(e,`end`))}function _2(){return{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}}function v2(e){return(e.columnDef.enableResizing??!0)&&(e.table.options.enableColumnResizing??!0)}function y2(e){return e.table.atoms.columnResizing?.get()?.isResizingColumn===e.id}function b2(e,t){let n=e.table.getColumn(e.column.id),r=v2(n);return i=>{if(!r||T2(i)&&i.touches.length>1)return;let a=c2(e),o=e.getLeafHeaders().map(e=>[e.column.id,e2(e.column)]),s=T2(i)?Math.round(i.touches[0].clientX):i.clientX,c=N$(),l=(e,t)=>{if(typeof t!=`number`)return;let r=n.table,i=r.options.columnResizeMode===`onChange`||e===`end`;r._reactivity.batch(()=>{x2(r,e=>{let n=r.options.columnResizeDirection===`rtl`?-1:1,a=(t-(e.startOffset??0))*n,o=e.startSize??0,s=Math.max(o>0?a/o:0,-.999999);if(i){let t=e.columnSizingStart;for(let e=0;e<t.length;e++){let n=t[e],r=n[1];c[n[0]]=Math.round(Math.max(r>0?r+r*s:a/t.length,0)*100)/100}}return{...e,deltaOffset:a,deltaPercentage:s}}),i&&u2(r,e=>Object.assign(N$(),e,c))})},u=null,d=!1,f,p=()=>{d?(d=!1,l(`move`,f),u=requestAnimationFrame(p)):u=null},m=e=>{f=e,typeof requestAnimationFrame==`function`?u===null?(l(`move`,e),u=requestAnimationFrame(p)):d=!0:l(`move`,e)},h=e=>{u!==null&&(cancelAnimationFrame(u),u=null,d=!1),n.table._reactivity.batch(()=>{l(`end`,e??f),x2(n.table,e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))})},g=t||(typeof document<`u`?document:null),_={moveHandler:e=>m(e.clientX),upHandler:e=>{g?.removeEventListener(`mousemove`,_.moveHandler),g?.removeEventListener(`mouseup`,_.upHandler),h(e.clientX)}},v={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),m(e.touches[0].clientX),!1),upHandler:e=>{y(),e.cancelable&&(e.preventDefault(),e.stopPropagation()),h(e.touches[0]?.clientX)},cancelHandler:()=>{y(),h()}},y=()=>{g?.removeEventListener(`touchmove`,v.moveHandler),g?.removeEventListener(`touchend`,v.upHandler),g?.removeEventListener(`touchcancel`,v.cancelHandler)},b=w2()?{passive:!1}:!1;T2(i)?(g?.addEventListener(`touchmove`,v.moveHandler,b),g?.addEventListener(`touchend`,v.upHandler,b),g?.addEventListener(`touchcancel`,v.cancelHandler,b)):(g?.addEventListener(`mousemove`,_.moveHandler,b),g?.addEventListener(`mouseup`,_.upHandler,b)),x2(n.table,e=>({...e,startOffset:s,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:o,isResizingColumn:n.id}))}}function x2(e,t){e.options.onColumnResizingChange?.(t)}function S2(e,t){x2(e,t?_2():j$(e.initialState.columnResizing??_2()))}var C2=null;function w2(){if(typeof C2==`boolean`)return C2;let e=!1;try{let t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener(`test`,n,t),window.removeEventListener(`test`,n)}catch{e=!1}return C2=e,C2}function T2(e){return e.type===`touchstart`}var E2={getInitialState:e=>({columnResizing:_2(),...e}),getDefaultTableOptions:e=>({columnResizeMode:`onEnd`,columnResizeDirection:`ltr`,onColumnResizingChange:F$(`columnResizing`,e)}),assignColumnPrototype:(e,t)=>{Y$(`columnResizingFeature`,e,t,{column_getCanResize:{fn:e=>v2(e)},column_getIsResizing:{fn:e=>y2(e)}})},assignHeaderPrototype:(e,t)=>{Y$(`columnResizingFeature`,e,t,{header_getResizeHandler:{fn:(e,t)=>b2(e,t)}})},constructTableAPIs:e=>{J$(`columnResizingFeature`,e,{table_setColumnResizing:{fn:t=>x2(e,t)},table_resetHeaderSizeInfo:{fn:t=>S2(e,t)}})}},D2={getInitialState:e=>({columnSizing:Q0(),...e}),getDefaultColumnDef:()=>$0(),getDefaultTableOptions:e=>({onColumnSizingChange:F$(`columnSizing`,e)}),assignColumnPrototype:(e,t)=>{Y$(`columnSizingFeature`,e,t,{column_getSize:{fn:e=>e2(e),memoDeps:e=>[t.options.columns,t.atoms.columnSizing?.get()?.[e.id]]},column_getStart:{fn:(e,t)=>i2(e,t)},column_getAfter:{fn:(e,t)=>a2(e,t)},column_resetSize:{fn:e=>o2(e)}})},assignHeaderPrototype:(e,t)=>{Y$(`columnSizingFeature`,e,t,{header_getSize:{fn:e=>c2(e),memoDeps:e=>[t.options.columns,e.column.columns.length>0?t.atoms.columnSizing?.get():t.atoms.columnSizing?.get()?.[e.column.id]]},header_getStart:{fn:e=>l2(e),memoDeps:()=>[t.options.columns,t.atoms.columnSizing?.get(),t.atoms.columnOrder?.get(),t.atoms.columnPinning?.get(),t.atoms.columnVisibility?.get(),t.atoms.grouping?.get(),t.options.groupedColumnMode]}})},constructTableAPIs:e=>{J$(`columnSizingFeature`,e,{table_getColumnOffsets:{fn:()=>n2(e),memoDeps:()=>[e.options.columns,e.atoms.columnSizing?.get(),e.atoms.columnOrder?.get(),e.atoms.columnPinning?.get(),e.atoms.columnVisibility?.get(),e.atoms.grouping?.get(),e.options.groupedColumnMode]},table_setColumnSizing:{fn:t=>u2(e,t)},table_resetColumnSizing:{fn:t=>d2(e,t)},table_getTotalSize:{fn:()=>p2(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getStartTotalSize:{fn:()=>m2(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getCenterTotalSize:{fn:()=>h2(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]},table_getEndTotalSize:{fn:()=>g2(e),memoDeps:()=>[e.atoms.columnSizing?.get(),e.getHeaderGroups()]}})}};function O2(){return N$()}function k2(e,t){j2(e)&&L2(e.table,n=>{let r=Object.assign(N$(),n),i=t??!X$(e,`getIsVisible`,A2),a=e.getLeafColumns();for(let e=0;e<a.length;e++){let t=a[e];j2(t)&&(r[t.id]=i)}return r})}function A2(e){let t=e.table.atoms.columnVisibility?.get();if(!t)return!0;let n=e.columns;return n.length?n.some(e=>X$(e,`getIsVisible`,A2)):(P$(t,e.id)?t[e.id]:void 0)??!0}function j2(e){return(e.columnDef.enableHiding??!0)&&(e.table.options.enableHiding??!0)}function M2(e){return t=>{k2(e,t.target.checked)}}function N2(e){let t=e.getAllCells(),n=[];for(let e=0;e<t.length;e++){let r=t[e];X$(r.column,`getIsVisible`,A2)&&n.push(r)}return o1(e.table,n,e=>e.column.id,()=>X$(e,`getVisibleCellsByColumnId`,P2))}function P2(e){let t=N$(),n=e.getAllCells();for(let e=0;e<n.length;e++){let r=n[e];X$(r.column,`getIsVisible`,A2)&&(t[r.column.id]=r)}return t}function F2(e){return e.getAllFlatColumns().filter(e=>X$(e,`getIsVisible`,A2))}function I2(e){return e.getAllLeafColumns().filter(e=>X$(e,`getIsVisible`,A2))}function L2(e,t){V$(e,`columnVisibility`,t)}function R2(e,t){L2(e,t?N$():Object.assign(N$(),j$(e.initialState.columnVisibility??{})))}function z2(e,t){t??=!B2(e);let n=N$(),r=e.getAllLeafColumns();for(let e=0;e<r.length;e++){let i=r[e];n[i.id]=t||!j2(i)}L2(e,n)}function B2(e){return!e.getAllLeafColumns().some(e=>!X$(e,`getIsVisible`,A2))}function V2(e){return e.getAllLeafColumns().some(e=>X$(e,`getIsVisible`,A2))}function H2(e){return t=>{z2(e,t.target.checked)}}var U2={getInitialState:e=>({columnVisibility:O2(),...e}),getDefaultTableOptions:e=>({onColumnVisibilityChange:F$(`columnVisibility`,e)}),assignColumnPrototype:(e,t)=>{Y$(`columnVisibilityFeature`,e,t,{column_getIsVisible:{fn:e=>A2(e),memoDeps:e=>[t.options.columns,t.atoms.columnVisibility?.get(),e.columns]},column_getCanHide:{fn:e=>j2(e)},column_getToggleVisibilityHandler:{fn:e=>M2(e)},column_toggleVisibility:{fn:(e,t)=>k2(e,t)}})},assignRowPrototype:(e,t)=>{Y$(`columnVisibilityFeature`,e,t,{row_getVisibleCells:{fn:e=>N2(e),memoDeps:e=>[e.getAllCells(),t.atoms.columnPinning?.get(),t.atoms.columnVisibility?.get()]},row_getVisibleCellsByColumnId:{fn:e=>P2(e),memoDeps:e=>[e.getAllCells(),t.atoms.columnVisibility?.get()]}})},constructTableAPIs:e=>{J$(`columnVisibilityFeature`,e,{table_getVisibleFlatColumns:{fn:()=>F2(e),memoDeps:()=>[e.atoms.columnVisibility?.get(),e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_getVisibleLeafColumns:{fn:()=>I2(e),memoDeps:()=>[e.atoms.columnVisibility?.get(),e.atoms.columnOrder?.get(),e.atoms.grouping?.get(),e.options.columns,e.options.groupedColumnMode]},table_setColumnVisibility:{fn:t=>L2(e,t)},table_resetColumnVisibility:{fn:t=>R2(e,t)},table_toggleAllColumnsVisible:{fn:t=>z2(e,t)},table_getIsAllColumnsVisible:{fn:()=>B2(e)},table_getIsSomeColumnsVisible:{fn:()=>V2(e)},table_getToggleAllColumnsVisibilityHandler:{fn:()=>H2(e)}})}};function W2(e){let t=Object.assign((e,n,r,i)=>{let a=e.getValue(n),o=t.resolveDataValue?t.resolveDataValue(a):a;return t.filter(o,r,e,n,i)},e);return t}var G2=W2({filter:(e,t)=>!!e?.includes(t),autoRemove:e=>K2(e),resolveFilterValue:e=>String(e).toLowerCase(),resolveDataValue:e=>e==null?void 0:String(e).toLowerCase()});function K2(e){return e==null||e===``}function q2(e){return(e.columnDef.enableGlobalFilter??!0)&&(e.table.options.enableGlobalFilter??!0)&&(e.table.options.enableFilters??!0)&&(e.table.options.getColumnCanGlobalFilter?.(e)??!0)&&!!e.accessorFn}function J2(){return G2}function Y2(e){let{globalFilterFn:t}=e.options,n=e._rowModelFns.filterFns;return H$(t)?t:t===`auto`?J2():n?.[t]}function X2(e,t){e.options.onGlobalFilterChange?.(t)}function Z2(e,t){X2(e,t?void 0:j$(e.initialState.globalFilter))}var Q2={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultTableOptions:e=>({onGlobalFilterChange:F$(`globalFilter`,e),globalFilterFn:`auto`,getColumnCanGlobalFilter:t=>{if(`enableGlobalFilter`in t.columnDef&&t.columnDef.enableGlobalFilter===!0)return!0;let n=e.getCoreRowModel().flatRows.find(e=>e.getAllCellsByColumnId()[t.id]?.getValue()!=null)?.getAllCellsByColumnId()[t.id]?.getValue();return typeof n==`string`||typeof n==`number`}}),assignColumnPrototype:(e,t)=>{Y$(`globalFilteringFeature`,e,t,{column_getCanGlobalFilter:{fn:e=>q2(e)}})},constructTableAPIs:e=>{J$(`globalFilteringFeature`,e,{table_getGlobalAutoFilterFn:{fn:()=>J2()},table_getGlobalFilterFn:{fn:()=>Y2(e)},table_setGlobalFilter:{fn:t=>X2(e,t)},table_resetGlobalFilter:{fn:t=>Z2(e,t)}})}},$2=0,e4=10;function t4(){return{pageIndex:$2,pageSize:e4}}function n4(e){if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if((e.atoms.pagination?.get()?.pageIndex??$2)===$2)return;o4(e,!0)}}function r4(e,t){V$(e,`pagination`,t)}function i4(e,t){r4(e,t?t4():j$(e.initialState.pagination??t4()))}function a4(e,t){r4(e,n=>{let r=A$(t,n.pageIndex),i=e.options.pageCount===void 0||e.options.pageCount===-1?2**53-1:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})}function o4(e,t){a4(e,t?$2:e.initialState.pagination?.pageIndex??$2)}function s4(e,t){c4(e,t?e4:e.initialState.pagination?.pageSize??e4)}function c4(e,t){r4(e,e=>{let n=Math.max(1,A$(t,e.pageSize)),r=e.pageSize===1/0?0:e.pageSize*e.pageIndex,i=n===1/0?0:Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})}function l4(e){let t=_4(e),n=[];return t&&t>0&&(n=[...Array(t)].fill(null).map((e,t)=>t)),n}function u4(e){return(e.atoms.pagination?.get()?.pageIndex??0)>0}function d4(e){let t=e.atoms.pagination?.get()?.pageIndex??$2,n=_4(e);return n===-1||n!==0&&t<n-1}function f4(e){let t=e.atoms.pagination?.get()?.pageIndex??$2,n=_4(e);return Number.isFinite(n)&&n>0&&t<n-1}function p4(e){return a4(e,e=>e-1)}function m4(e){return a4(e,e=>e+1)}function h4(e){return a4(e,0)}function g4(e){let t=_4(e);if(!(!Number.isFinite(t)||t<=0))return a4(e,t-1)}function _4(e){let t=e.options.pageCount;if(t!=null)return t;let n=v4(e),r=e.atoms.pagination?.get()?.pageSize??e4;return r===1/0&&Number.isFinite(n)&&n>0?1:Math.ceil(n/r)}function v4(e){return e.options.rowCount??e.getPrePaginatedRowModel().rows.length}var y4={getInitialState:e=>({...e,pagination:{...t4(),...e.pagination}}),getDefaultTableOptions:e=>({onPaginationChange:F$(`pagination`,e)}),constructTableAPIs:e=>{J$(`rowPaginationFeature`,e,{table_autoResetPageIndex:{fn:()=>n4(e)},table_setPagination:{fn:t=>r4(e,t)},table_resetPagination:{fn:t=>i4(e,t)},table_setPageIndex:{fn:t=>a4(e,t)},table_resetPageIndex:{fn:t=>o4(e,t)},table_setPageSize:{fn:t=>c4(e,t)},table_getPageCount:{fn:()=>_4(e)},table_resetPageSize:{fn:t=>s4(e,t)},table_getPageOptions:{fn:()=>l4(e)},table_getCanPreviousPage:{fn:()=>u4(e)},table_getCanNextPage:{fn:()=>d4(e)},table_getCanLastPage:{fn:()=>f4(e)},table_previousPage:{fn:()=>p4(e)},table_nextPage:{fn:()=>m4(e)},table_firstPage:{fn:()=>h4(e)},table_lastPage:{fn:()=>g4(e)},table_getRowCount:{fn:()=>v4(e)}})}};function b4(){return N$()}function x4(e,t){e.options.onRowSelectionChange?.(t)}function S4(e,t){e._lastSelectedRowId=null,x4(e,t?N$():Object.assign(N$(),j$(e.initialState.rowSelection??{})))}function C4(e,t,n){e._lastSelectedRowId=null,x4(e,r=>{if(t=t===void 0?!X$(e,`getIsAllRowsSelected`,A4):t,n?.deselectAll&&!t)return N$();let i=Object.assign(N$(),r),a=e.getPreGroupedRowModel().flatRows;if(t){let e=new Map;a.forEach(t=>{K4(t,e)&&(i[t.id]=!0)})}else a.forEach(e=>{B4(e)&&delete i[e.id]});return i})}function w4(e,t,n){e._lastSelectedRowId=null,x4(e,r=>{let i=t===void 0?!X$(e,`getIsAllPageRowsSelected`,j4):t;if(n?.deselectAll&&!i)return N$();let a=Object.assign(N$(),r);return e.getRowModel().rows.forEach(t=>{G4(a,t.id,i,!0,e,!0)}),a})}function T4(e){return e.getCoreRowModel()}function E4(e){let t=e.getCoreRowModel();return X$(e,`getIsSomeRowsSelected`,M4)?Y4(t,e):{rows:[],flatRows:[],rowsById:N$()}}function D4(e){let t=e.getFilteredRowModel();return X$(e,`getIsSomeRowsSelected`,M4)?Y4(t,e):{rows:[],flatRows:[],rowsById:N$()}}function O4(e){let t=e.getSortedRowModel();return X$(e,`getIsSomeRowsSelected`,M4)?Y4(t,e):{rows:[],flatRows:[],rowsById:N$()}}function k4(e){return Object.keys(e.atoms.rowSelection?.get()??{})}function A4(e){let t=e.getFilteredRowModel().flatRows,n=e.atoms.rowSelection?.get()??{},r=!!(t.length&&Object.keys(n).length);if(r){let e=new Map;t.some(t=>!X4(t,n)&&K4(t,e))&&(r=!1)}return r}function j4(e){let t=e.getPaginatedRowModel().flatRows,n=e.atoms.rowSelection?.get()??{},r=new Map,i=!1;for(let e=0;e<t.length;e++){let a=t[e];if(X4(a,n))!i&&K4(a,r)&&(i=!0);else if(K4(a,r))return!1}return i}function M4(e){return X$(e,`getSelectedRowIds`,k4).length>0}function N4(e){return e.getPaginatedRowModel().flatRows.filter(e=>B4(e)).some(e=>L4(e)||X$(e,`getIsSomeSelected`,R4))}function P4(e){return t=>{C4(e,t.target.checked)}}function F4(e){return t=>{w4(e,t.target.checked)}}function I4(e,t,n){let r=L4(e);x4(e.table,i=>{t=t===void 0?!r:t;let a=Object.assign(N$(),i);return G4(a,e.id,t,(n?.selectChildren??!0)&&H4(e),e.table),!t&&n?.deselectParents&&q4(a,e),a})}function L4(e){return X4(e,e.table.atoms.rowSelection?.get()??{})}function R4(e){return Z4(e)===`some`}function z4(e){return Z4(e)===`all`}function B4(e){let t=e.table.options;return typeof t.enableRowSelection==`function`?t.enableRowSelection(e):t.enableRowSelection??!0}function V4(e){let t=e.table.options;return typeof t.enableSubRowSelection==`function`?t.enableSubRowSelection(e):t.enableSubRowSelection??!0}function H4(e){let t=e.table.options;return typeof t.enableMultiRowSelection==`function`?t.enableMultiRowSelection(e):t.enableMultiRowSelection??!0}function U4(e,t){let n=B4(e);return r=>{if(!n)return;let i=r,a=e.table,o=i.target.checked,s=a._lastSelectedRowId;a.options.enableRowRangeSelection!==!1&&s!==null&&H4(e)&&(a.options.isRowRangeSelectionEvent?.(r)??!1)&&W4(e,s,o,t)||I4(e,o,t),a._lastSelectedRowId=e.id}}function W4(e,t,n,r){let i=r?.selectChildren??!0,a=e.table,o=a.getRowsInDisplayOrder(),s=a.getPrePaginatedRowModel().rowsById[t]??a.getCoreRowModel().rowsById[t];if(!s)return!1;let c=s.getDisplayIndex(),l=e.getDisplayIndex(),u=o[c],d=o[l];if(c<0||l<0||c>=o.length||l>=o.length||u?.id!==s.id||d?.id!==e.id||!H4(s)||!H4(e))return!1;let f=Math.min(c,l),p=Math.max(c,l);return x4(a,e=>{let t=Object.assign(N$(),e);for(let e=f;e<=p;e++){let s=o[e];B4(s)&&H4(s)&&(G4(t,s.id,n,i,a),!n&&r?.deselectParents&&q4(t,s))}return t}),!0}function G4(e,t,n,r,i,a){let o=i.getRow(t,!0);n?(H4(o)||Object.keys(e).forEach(t=>delete e[t]),B4(o)&&(e[t]=!0)):(!a||B4(o))&&delete e[t],r&&o.subRows.length&&V4(o)&&o.subRows.forEach(t=>G4(e,t.id,n,r,i,a))}function K4(e,t){if(!B4(e))return!1;let n=e.table;if(n.options.enableSubRowSelection===!0)return!0;let r=e.parentId;if(r===void 0)return!0;let i=t.get(r);if(i!==void 0)return i;let a=n.getCoreRowModel().rowsById,o=[],s=!0,c=r;for(;c!==void 0;){let e=t.get(c);if(e!==void 0){s=e;break}o.push(c);let r=a[c]??n.getRow(c,!0);if(!V4(r)){s=!1;break}c=r.parentId}return o.forEach(e=>t.set(e,s)),s}function q4(e,t){let n=t.table.getCoreRowModel().rowsById,r=t.parentId;for(;r!==void 0;)delete e[r],r=(n[r]??t.table.getRow(r,!0)).parentId}function J4(e,t,n,r){let i=[];for(let a=0;a<e.length;a++){let o=e[a],s=X4(o,t);if(s&&(n.push(o),r[o.id]=o),o.subRows.length){let e=J4(o.subRows,t,n,r);if(s){let t=Object.create(Object.getPrototypeOf(o));M$(t,o),t.subRows=e,i.push(t)}}else s&&i.push(o)}return i}function Y4(e,t){let n=[],r=N$(),i=t.atoms.rowSelection?.get()??{};return{rows:J4(e.rows,i,n,r),flatRows:n,rowsById:r}}function X4(e,t){return!!(P$(t,e.id)&&t[e.id])}function Z4(e){if(!e.subRows.length)return!1;let t=e.table.atoms.rowSelection?.get()??{},n=!1,r=!0,i=!1;for(let a=0;a<e.subRows.length;a++){let o=e.subRows[a];if(n&&!r)break;if(B4(o)&&(i=!0,X4(o,t)?n=!0:r=!1),o.subRows.length){let e=Z4(o);e===`all`?(n=!0,i=!0):e===`some`?(n=!0,r=!1,i=!0):r=!1}}return i?r?`all`:n?`some`:!1:!1}var Q4={initTableInstanceData:e=>{e._lastSelectedRowId=null},resetTableInstanceData:e=>{e._lastSelectedRowId=null},getInitialState:e=>({rowSelection:b4(),...e}),getDefaultTableOptions:e=>({onRowSelectionChange:F$(`rowSelection`,e),enableRowSelection:!0,enableMultiRowSelection:!0,enableRowRangeSelection:!0,enableSubRowSelection:!0,isRowRangeSelectionEvent:e=>{let t=e;return!!(t.shiftKey||t.nativeEvent?.shiftKey)}}),assignRowPrototype:(e,t)=>{Y$(`rowSelectionFeature`,e,t,{row_toggleSelected:{fn:(e,t,n)=>I4(e,t,n)},row_getIsSelected:{fn:e=>L4(e)},row_getIsSomeSelected:{fn:e=>R4(e),memoDeps:e=>[e.subRows,e.table.atoms.rowSelection?.get(),e.table.options.enableRowSelection]},row_getIsAllSubRowsSelected:{fn:e=>z4(e),memoDeps:e=>[e.subRows,e.table.atoms.rowSelection?.get(),e.table.options.enableRowSelection]},row_getCanSelect:{fn:e=>B4(e)},row_getCanSelectSubRows:{fn:e=>V4(e)},row_getCanMultiSelect:{fn:e=>H4(e)},row_getToggleSelectedHandler:{fn:(e,t)=>U4(e,t)}})},constructTableAPIs:e=>{J$(`rowSelectionFeature`,e,{table_setRowSelection:{fn:t=>x4(e,t)},table_resetRowSelection:{fn:t=>S4(e,t)},table_toggleAllRowsSelected:{fn:(t,n)=>C4(e,t,n)},table_toggleAllPageRowsSelected:{fn:(t,n)=>w4(e,t,n)},table_getPreSelectedRowModel:{fn:()=>T4(e)},table_getSelectedRowModel:{fn:()=>E4(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getCoreRowModel()]},table_getFilteredSelectedRowModel:{fn:()=>D4(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getFilteredRowModel()]},table_getGroupedSelectedRowModel:{fn:()=>O4(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getSortedRowModel()]},table_getSelectedRowIds:{fn:()=>k4(e),memoDeps:()=>[e.atoms.rowSelection?.get()]},table_getIsAllRowsSelected:{fn:()=>A4(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getFilteredRowModel(),e.options.enableRowSelection,e.options.enableSubRowSelection]},table_getIsAllPageRowsSelected:{fn:()=>j4(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getPaginatedRowModel(),e.options.enableRowSelection,e.options.enableSubRowSelection]},table_getIsSomeRowsSelected:{fn:()=>M4(e),memoDeps:()=>[e.atoms.rowSelection?.get()]},table_getIsSomePageRowsSelected:{fn:()=>N4(e),memoDeps:()=>[e.atoms.rowSelection?.get(),e.getPaginatedRowModel(),e.options.enableRowSelection]},table_getToggleAllRowsSelectedHandler:{fn:()=>P4(e)},table_getToggleAllPageRowsSelectedHandler:{fn:()=>F4(e)}})}},$4=/([0-9]+)/gm;function e3(e){let t=Object.assign((e,n,r)=>{let i=e.getValue(r),a=n.getValue(r),o=t.resolveDataValue;return o&&(i=o(i),a=o(a)),t.sort(i,a,e,n,r)},e);return t}var t3=e3({resolveDataValue:e=>s3(e).toLowerCase(),sort:(e,t)=>c3(e,t)}),n3=e3({resolveDataValue:e=>s3(e).toLowerCase(),sort:(e,t)=>a3(e,t)}),r3=e3({resolveDataValue:e=>o3(e),sort:(e,t)=>e>t?1:e<t?-1:0}),i3=e3({sort:(e,t)=>a3(e,t)});function a3(e,t){return e===t?0:e>t?1:-1}function o3(e){return e instanceof Date?e.getTime():e}function s3(e){return typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?``:String(e):typeof e==`string`?e:``}function c3(e,t){let n=0,r=0,i=e.length,a=t.length;for(;n<i&&r<a;){let i=l3(e.charCodeAt(n)),a=l3(t.charCodeAt(r)),o=u3(e,n,i),s=u3(t,r,a);if(!i&&!a){let i=d3(e,n,o,t,r,s);if(i)return i;n=o,r=s;continue}if(i!==a)return i?1:-1;let c=f3(e,n,o,t,r,s);if(c)return c;n=o,r=s}return m3(e,n)-m3(t,r)}function l3(e){return e>=48&&e<=57}function u3(e,t,n){let r=t+1;for(;r<e.length&&l3(e.charCodeAt(r))===n;)r++;return r}function d3(e,t,n,r,i,a){let o=n-t,s=a-i,c=o<s?o:s;for(let n=0;n<c;n++){let a=e.charCodeAt(t+n),o=r.charCodeAt(i+n);if(a>o)return 1;if(o>a)return-1}return o>s?1:s>o?-1:0}function f3(e,t,n,r,i,a){let o=t;for(;o<n&&e.charCodeAt(o)===48;)o++;let s=i;for(;s<a&&r.charCodeAt(s)===48;)s++;let c=n-o,l=a-s;if(c===0&&l===0)return 0;if(c<=15&&l<=15){let t=p3(e,o,n),i=p3(r,s,a);return t>i?1:i>t?-1:0}let u=parseInt(e.slice(t,n),10),d=parseInt(r.slice(i,a),10);return u>d?1:d>u?-1:0}function p3(e,t,n){let r=0;for(let i=t;i<n;i++)r=r*10+e.charCodeAt(i)-48;return r}function m3(e,t){let n=0,r=t;for(;r<e.length;)n++,r=u3(e,r,l3(e.charCodeAt(r)));return n}function h3(){return[]}function g3(e,t){V$(e,`sorting`,t)}function _3(e,t){g3(e,t?[]:j$(e.initialState.sorting??[]))}function v3(e){e.atoms.sorting&&(e.options.autoResetAll??e.options.autoResetSorting??!1)&&_3(e)}function y3(e){let t=e.table._rowModelFns.sortFns,n=e.table.getFilteredRowModel().flatRows.slice(0,10),r,i=!1;for(let t=0;t<n.length;t++){let a=n[t].getValue(e.id);if(Object.prototype.toString.call(a)===`[object Date]`){r=`datetime`;break}if(typeof a==`string`&&(i=!0,a.split($4).length>1)){r=`alphanumeric`;break}}if(!r&&i&&(r=`text`),r){let e=t?.[r];if(e||r===`alphanumeric`&&(e=t?.text),e)return e}return i3}function b3(e){let t=e.table.getFilteredRowModel().flatRows.slice(0,10);for(let n=0;n<t.length;n++){let r=t[n].getValue(e.id);if(r!=null)return typeof r==`string`?`asc`:`desc`}return`desc`}function x3(e){let t=e.table._rowModelFns.sortFns;return H$(e.columnDef.sortFn)?e.columnDef.sortFn:e.columnDef.sortFn===`auto`?y3(e):t?.[e.columnDef.sortFn]??i3}function S3(e,t,n){let r=w3(e,n&&E3(e)),i=t!==void 0;g3(e.table,a=>{let o=a.findIndex(t=>t.id===e.id),s=o===-1?void 0:a[o],c=[],l,u=i?t:r===`desc`,d=!!(a.length&&E3(e)&&n);return l=d?s?`toggle`:`add`:s?`toggle`:`replace`,l===`toggle`&&(i||r||(l=`remove`)),l===`add`?(c=[...a,{id:e.id,desc:u}],c.splice(0,c.length-(e.table.options.maxMultiSortColCount??2**53-1))):c=l===`toggle`?d?a.map(t=>t.id===e.id?{...t,desc:u}:t):[{id:e.id,desc:u}]:l===`remove`?d?a.filter(t=>t.id!==e.id):[]:[{id:e.id,desc:u}],c})}function C3(e){return e.columnDef.sortDescFirst??e.table.options.sortDescFirst??b3(e)===`desc`?`desc`:`asc`}function w3(e,t){let n=C3(e),r=D3(e);return r?r!==n&&(e.table.options.enableSortingRemoval??!0)&&(!t||(e.table.options.enableMultiRemove??!0))?!1:r===`desc`?`asc`:`desc`:n}function T3(e){return(e.columnDef.enableSorting??!0)&&(e.table.options.enableSorting??!0)&&!!e.accessorFn}function E3(e){return e.columnDef.enableMultiSort??e.table.options.enableMultiSort??!!e.accessorFn}function D3(e){let t=e.table.atoms.sorting?.get()?.find(t=>t.id===e.id);return t?t.desc?`desc`:`asc`:!1}function O3(e){return e.table.atoms.sorting?.get()?.findIndex(t=>t.id===e.id)??-1}function k3(e){g3(e.table,t=>t.length?t.filter(t=>t.id!==e.id):[])}function A3(e){let t=T3(e);return n=>{t&&S3(e,void 0,E3(e)?e.table.options.isMultiSortEvent?.(n):!1)}}var j3={getInitialState(e){return{sorting:h3(),...e}},getDefaultColumnDef(){return{sortFn:`auto`,sortUndefined:1}},getDefaultTableOptions(e){return{autoResetSorting:!1,onSortingChange:F$(`sorting`,e),isMultiSortEvent:e=>e.shiftKey}},assignColumnPrototype(e,t){Y$(`rowSortingFeature`,e,t,{column_getAutoSortFn:{fn:e=>y3(e)},column_getAutoSortDir:{fn:e=>b3(e)},column_getSortFn:{fn:e=>x3(e)},column_toggleSorting:{fn:(e,t,n)=>S3(e,t,n)},column_getFirstSortDir:{fn:e=>C3(e)},column_getNextSortingOrder:{fn:(e,t)=>w3(e,t)},column_getCanSort:{fn:e=>T3(e)},column_getCanMultiSort:{fn:e=>E3(e)},column_getIsSorted:{fn:e=>D3(e)},column_getSortIndex:{fn:e=>O3(e)},column_clearSorting:{fn:e=>k3(e)},column_getToggleSortingHandler:{fn:e=>A3(e)}})},constructTableAPIs(e){J$(`rowSortingFeature`,e,{table_autoResetSorting:{fn:()=>v3(e)},table_setSorting:{fn:t=>g3(e,t)},table_resetSorting:{fn:t=>_3(e,t)}})}};function M3(e,t,n){return n.options.filterFromLeafRows?N3(e,t,n):P3(e,t,n)}function N3(e,t,n){let r=[],i=N$(),a=n.options.maxLeafRowFilterDepth??100,o=(e,r=0)=>{let i=[];for(let s of e){let e=W1(n,s.id,s.original,s.index,s.depth,void 0,s.parentId);e.columnFilters=s.columnFilters,e.columnFiltersMeta=s.columnFiltersMeta,s.subRows.length&&r<a?(e.subRows=o(s.subRows,r+1),(e.subRows.length||t(e))&&i.push(e)):t(e)&&(e.subRows=s.subRows,i.push(e))}return i},s=o(e);return F3(s,r,i),{rows:s,flatRows:r,rowsById:i}}function P3(e,t,n){let r=[],i=N$(),a=n.options.maxLeafRowFilterDepth??100,o=(e,s=0)=>{let c=[];for(let l of e)if(t(l)){if(l.subRows.length&&s<a){let e=W1(n,l.id,l.original,l.index,l.depth,void 0,l.parentId),t=l;e.columnFilters=t.columnFilters,e.columnFiltersMeta=t.columnFiltersMeta,c.push(e),r.push(e),i[e.id]=e,e.subRows=o(l.subRows,s+1)}else c.push(l),r.push(l),i[l.id]=l,l.subRows.length&&s>=a&&F3(l.subRows,r,i)}return c};return{rows:o(e),flatRows:r,rowsById:i}}function F3(e,t,n){for(let r of e)t.push(r),n[r.id]=r,r.subRows.length&&F3(r.subRows,t,n)}function I3(){return(e,t)=>{let n=e;return K$({feature:`columnFacetingFeature`,table:n,fnName:`createFacetedRowModel`,memoDeps:()=>[n.getPreFilteredRowModel(),n.atoms.columnFilters?.get(),n.atoms.globalFilter?.get(),n.getFilteredRowModel()],fn:(e,r,i)=>L3(n,t,e,r,i)})}}function L3(e,t,n,r,i){let a=i!=null&&i!==``;if(!n.rows.length||!r?.length&&!a)return n;let o=[];if(r)for(let e=0;e<r.length;e++){let n=r[e].id;n!==t&&o.push(n)}return a&&t!==`__global__`&&o.push(`__global__`),o.length?M3(n.rows,e=>{for(let t=0;t<o.length;t++)if(e.columnFilters?.[o[t]]===!1)return!1;return!0},e):n}function R3(){return(e,t)=>{let n=e;return K$({feature:`columnFacetingFeature`,table:n,fnName:`table.getFacetedUniqueValues`,memoDeps:()=>{if(t===`__global__`)return[X$(n,`getGlobalFacetedRowModel`,L0).flatRows];let e=n.getColumn(t);return e?[X$(e,`getFacetedRowModel`,N0,n).flatRows]:[n.getPreFilteredRowModel().flatRows]},fn:e=>z3(n,t,e)})}}function z3(e,t,n){let r=t===`__global__`?e.getAllLeafColumns().filter(e=>l1(e)).map(e=>e.id):[t],i=new Map;for(let e=0;e<n.length;e++)for(let t=0;t<r.length;t++){let a=n[e].getUniqueValues(r[t]);if(a)for(let e=0;e<a.length;e++){let t=a[e],n=i.get(t);i.set(t,n===void 0?1:n+1)}}return i}function B3(){return e=>{let t=e;return K$({feature:`columnFilteringFeature`,table:t,fnName:`table.getFilteredRowModel`,memoDeps:()=>[t.getPreFilteredRowModel(),t.atoms.columnFilters?.get(),t.atoms.globalFilter?.get()],fn:()=>V3(t),onAfterUpdate:G$(()=>f1(t))})}}function V3(e){let t=e.getPreFilteredRowModel(),n=e.atoms.columnFilters?.get(),r=e.atoms.globalFilter?.get(),i=r!=null&&r!==``;if(!t.rows.length||!n?.length&&!i){let e=t.flatRows;for(let t=0;t<e.length;t++){let n=e[t];n.columnFilters=N$(),n.columnFiltersMeta=N$()}return t}let a=[],o=[];n?.forEach(t=>{let n=w1(e,t.id);if(!n)return;let r=H0(n);r&&a.push({id:t.id,filterFn:r,resolvedValue:r.resolveFilterValue?.(t.value)??t.value})});let s=n?.map(e=>e.id)??[];if(i){let t=c1(e),n=t?e.getAllLeafColumns().filter(l1):[];t&&n.length&&(s.push(`__global__`),n.forEach(e=>{o.push({id:e.id,filterFn:t,resolvedValue:t.resolveFilterValue?.(r)??r})}))}let c=t.flatRows;for(let e=0;e<c.length;e++){let t=c[e];if(t.columnFilters=N$(),t.columnFiltersMeta=N$(),a.length)for(let e=0;e<a.length;e++){let n=a[e],r=n.id;t.columnFilters[r]=n.filterFn(t,r,n.resolvedValue,e=>{t.columnFiltersMeta||=N$(),t.columnFiltersMeta[r]=e})}if(o.length){for(let e=0;e<o.length;e++){let n=o[e],r=n.id;if(n.filterFn(t,r,n.resolvedValue,e=>{t.columnFiltersMeta||=N$(),t.columnFiltersMeta[r]=e})){t.columnFilters.__global__=!0;break}}t.columnFilters.__global__!==!0&&(t.columnFilters.__global__=!1)}}return M3(t.rows,e=>{for(let t=0;t<s.length;t++)if(e.columnFilters[s[t]]===!1)return!1;return!0},e)}function H3(){return e=>{let t=e;return K$({feature:`rowPaginationFeature`,table:t,fnName:`table.getPaginatedRowModel`,memoDeps:()=>[t.getPrePaginatedRowModel(),t.atoms.pagination?.get(),t.options.paginateExpandedRows?void 0:t.atoms.expanded?.get()],fn:()=>U3(t)})}}function U3(e){let t=e.getPrePaginatedRowModel(),n=e.atoms.pagination?.get();if(!t.rows.length)return t;let{pageSize:r,pageIndex:i}=n??t4(),{rows:a,flatRows:o,rowsById:s}=t,c=a;if(r!==1/0||i!==0){let e=r*i,t=e+r;c=a.slice(e,t)}let l;l=e.options.paginateExpandedRows?{rows:c,flatRows:o,rowsById:s}:u1(e,{rows:c,flatRows:o,rowsById:s}),l.flatRows=[];let u=new Set,d=e=>{u.has(e.id)||(u.add(e.id),l.flatRows.push(e),e.subRows.length&&e.subRows.forEach(d))};return l.rows.forEach(d),l}function W3(){return e=>{let t=e;return K$({feature:`rowSortingFeature`,table:t,fnName:`table.getSortedRowModel`,memoDeps:()=>[t.atoms.sorting?.get(),t.getPreSortedRowModel()],fn:()=>G3(t),onAfterUpdate:G$(()=>f1(t))})}}function G3(e){let t=e.getPreSortedRowModel(),n=e.atoms.sorting?.get();if(!t.rows.length||!n?.length)return t;let r=[],i=n.filter(t=>{let n=e.getColumn(t.id);return n?T3(n):!1});if(!i.length)return t;let a=[];for(let t=0;t<i.length;t++){let n=i[t],r=e.getColumn(n.id);r&&a.push({id:n.id,desc:n.desc,sortUndefined:r.columnDef.sortUndefined,invertSorting:r.columnDef.invertSorting,sortFn:x3(r)})}let o=(e,t)=>{for(let n=0;n<a.length;n++){let r=a[n],i=r.sortUndefined,o=r.desc,s=0;if(i){let n=e.getValue(r.id),a=t.getValue(r.id),o=n===void 0,c=a===void 0;if(o&&c)continue;if(o||c){if(i===`first`)return o?-1:1;if(i===`last`)return o?1:-1;s=o?i:-i}}if(s===0&&(s=r.sortFn(e,t,r.id)),s!==0)return o&&(s*=-1),r.invertSorting&&(s*=-1),s}return e.index-t.index},s=e=>{let t=e.slice();t.sort(o);let n=!1;for(let i=0;i<t.length;i++){let a=t[i];a!==e[i]&&(n=!0);let o=r.length;if(r.push(a),a.subRows.length){let e=s(a.subRows);if(e.changed){let s=Object.create(Object.getPrototypeOf(a));M$(s,a),s.subRows=e.rows,t[i]=s,r[o]=s,n=!0}}}return{rows:t,changed:n}};return{rows:s(t.rows).rows,flatRows:r,rowsById:t.rowsById}}var K3=typeof window>`u`?C.useEffect:C.useLayoutEffect;function q3(e,t){let[{table:n,rootSource:r}]=(0,C.useState)(()=>{let t=j0({...e,features:{coreReactivityFeature:k$(),...e.features}});return t.Subscribe=(e=>T$({...e,source:e.source??t.store})),t.FlexRender=QQ,{table:t,rootSource:O$(t.store,_$)}}),i=n;D0(i,t=>({...t,...e}),{syncExternalState:!1});let a=i.options.state,o=r.get(),s=w$(r,t,{compare:_$});return K3(()=>{r.markCommitted(o),w0(i,a??null,_$)}),(0,C.useMemo)(()=>({...n,options:e,state:s}),[n,e,s])}var J3=e=>Gx(e)&&typeof e.id==`string`&&typeof e.desc==`boolean`,Y3=e=>Gx(e)&&typeof e.id==`string`&&`value`in e,X3=e=>Number.isInteger(e)&&typeof e==`number`&&e>=0,Z3=e=>Number.isInteger(e)&&typeof e==`number`&&e>0;function Q3(e){if(!Gx(e))return null;let t={};return Array.isArray(e.sorting)&&(t.sorting=eE(e.sorting,J3)),Array.isArray(e.columnFilters)&&(t.columnFilters=eE(e.columnFilters,Y3)),nE(e.globalFilter)&&(t.globalFilter=e.globalFilter),Gx(e.columnVisibility)&&(t.columnVisibility=$T(e.columnVisibility,rE)),Gx(e.columnSizing)&&(t.columnSizing=$T(e.columnSizing,iE)),X3(e.pageIndex)&&(t.pageIndex=e.pageIndex),Z3(e.pageSize)&&(t.pageSize=e.pageSize),t}var $3={first:`Première page`,previous:`Page précédente`,next:`Page suivante`,last:`Dernière page`},e6=`nf.datagrid:`,t6=e=>e6+e.key;function n6(e){return e?Q3(oE(e.storage??`session`,t6(e))):null}var r6=k0({columnFilteringFeature:Z0,globalFilteringFeature:Q2,rowSortingFeature:j3,rowPaginationFeature:y4,columnVisibilityFeature:U2,columnSizingFeature:D2,columnResizingFeature:E2,rowSelectionFeature:Q4,columnFacetingFeature:z0,filteredRowModel:B3(),sortedRowModel:W3(),paginatedRowModel:H3(),facetedRowModel:I3(),facetedUniqueValues:R3(),sortFns:{alphanumeric:t3,text:n3,datetime:r3,basic:i3},filterFns:{includesString:G2}}),i6=[{value:`contains`,label:`contient`},{value:`equals`,label:`égal à`},{value:`startsWith`,label:`commence par`},{value:`endsWith`,label:`finit par`},{value:`isEmpty`,label:`est vide`},{value:`notEmpty`,label:`non vide`}],a6=[{value:`=`,label:`=`},{value:`!=`,label:`≠`},{value:`>`,label:`>`},{value:`>=`,label:`≥`},{value:`<`,label:`<`},{value:`<=`,label:`≤`}],o6=[{value:`equals`,label:`est`}],s6=[{value:`in`,label:`est l'un de`}],c6=new Set([`isEmpty`,`notEmpty`]);function l6(e){return e===`number`?a6:e===`select`?o6:e===`multiselect`?s6:i6}var u6=e=>e.split(`,`).map(e=>e.trim()).filter(e=>e!==``),d6=new Set([`=`,`!=`,`>`,`>=`,`<`,`<=`]);function f6(e,t){let n=xL(e),r=t.value;if(!c6.has(t.op)&&r===``||d6.has(t.op)&&Number.isNaN(Number(r)))return!0;switch(t.op){case`contains`:return n.toLowerCase().includes(r.toLowerCase());case`equals`:return n===r;case`in`:{let e=u6(r);return e.length===0||u6(n).some(t=>e.includes(t))}case`startsWith`:return n.toLowerCase().startsWith(r.toLowerCase());case`endsWith`:return n.toLowerCase().endsWith(r.toLowerCase());case`isEmpty`:return n===``;case`notEmpty`:return n!==``;case`=`:return Number(e)===Number(r);case`!=`:return Number(e)!==Number(r);case`>`:return Number(e)>Number(r);case`>=`:return Number(e)>=Number(r);case`<`:return Number(e)<Number(r);case`<=`:return Number(e)<=Number(r);default:return!0}}var p6=(e,t,n)=>{let r=n;return!r||f6(e.getValue(t),r)};function m6(){OL(`data-nf-datagrid-resizer`,`
|
|
311
|
+
.nf-dg-resizer{position:absolute;top:0;right:0;height:100%;width:11px;
|
|
312
|
+
display:flex;align-items:center;justify-content:flex-end;
|
|
313
|
+
cursor:col-resize;user-select:none;touch-action:none;z-index:2;
|
|
314
|
+
background:transparent;}
|
|
315
|
+
.nf-dg-resizer::before{content:"";width:2px;height:55%;border-radius:2px;
|
|
316
|
+
background:var(--mantine-color-default-border);opacity:.35;
|
|
317
|
+
transition:opacity 120ms ease,height 120ms ease,background-color 120ms ease;}
|
|
318
|
+
.nf-dg-resizer:hover::before{opacity:1;height:70%;}
|
|
319
|
+
.nf-dg-resizer:focus-visible{outline:2px solid var(--mantine-primary-color-filled);outline-offset:-2px;}
|
|
320
|
+
.nf-dg-resizer:focus-visible::before{opacity:1;height:100%;background:var(--mantine-primary-color-filled);}
|
|
321
|
+
.nf-dg-resizer[data-resizing="true"]::before{opacity:1;height:100%;
|
|
322
|
+
background:var(--mantine-primary-color-filled);}
|
|
323
|
+
`)}function h6({column:e,isServer:t}){let n=e.columnDef.meta,r=n?.filterType??`text`,i=l6(r),a=e.getFilterValue(),o=a?.op??i[0].value,s=a?.value??``,c=c6.has(o),l=String(e.columnDef.header??e.id);if(r===`multiselect`){let r=t?n?.filterOptions??[]:[...new Set([...e.getFacetedUniqueValues().keys()].flatMap(e=>u6(String(e))))].sort();return(0,Y.jsx)(Eh,{size:`xs`,placeholder:`filtrer`,data:r,value:u6(s),clearable:!0,searchable:!0,hidePickedOptions:!0,comboboxProps:{withinPortal:!0},onChange:t=>e.setFilterValue(t.length?{op:`in`,value:t.join(`,`)}:void 0),"aria-label":`filtrer ${l}`})}if(r===`select`){let r=t?n?.filterOptions??[]:[...e.getFacetedUniqueValues().keys()].map(e=>String(e)).filter(e=>e.length>0).sort();return(0,Y.jsx)(P_,{size:`xs`,placeholder:`filtrer`,data:r,value:s||null,clearable:!0,searchable:!0,comboboxProps:{withinPortal:!0},onChange:t=>e.setFilterValue(t?{op:`equals`,value:t}:void 0),"aria-label":`filtrer ${l}`})}return(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,children:[(0,Y.jsx)(P_,{size:`xs`,w:r===`number`?64:96,data:i,value:o,comboboxProps:{withinPortal:!0},"aria-label":`opérateur ${l}`,onChange:t=>{if(!t)return;let n=t;c6.has(n)?e.setFilterValue({op:n,value:``}):e.setFilterValue(s===``?void 0:{op:n,value:s})}}),!c&&(0,Y.jsx)(xv,{size:`xs`,type:r===`number`?`number`:`text`,placeholder:`valeur`,value:s,"aria-label":`valeur ${l}`,onChange:t=>{let n=t.currentTarget.value;e.setFilterValue(n===``?void 0:{op:o,value:n})}})]})}function g6(e){let{columns:t,getRowId:n,onRowClick:r,dimRow:i,pageSizeOptions:a=[10,25,50,100],emptyMessage:o=`Aucune donnée.`,height:s=`auto`,initialSort:c}=e,l=e.mode===`server`,u=c?[{id:c.key,desc:c.dir===`desc`}]:[],[d]=(0,C.useState)(()=>n6(e.persist)),[f,p]=(0,C.useState)(()=>d?.sorting??u),[m,h]=(0,C.useState)(()=>d?.columnFilters??[]),[g,_]=(0,C.useState)(()=>d?.globalFilter??``),[v,y]=(0,C.useState)(()=>({pageIndex:d?.pageIndex??0,pageSize:d?.pageSize??e.pageSize??25})),[b,x]=(0,C.useState)(()=>d?.columnVisibility??{}),[S,w]=(0,C.useState)(()=>d?.columnSizing??{}),[T,E]=(0,C.useState)(()=>(d?.columnFilters?.length??0)>0),[D,O]=(0,C.useState)({}),k=()=>O({});(0,C.useEffect)(m6,[]);let A=e.searchable??!0,j=l?e.loader:null,[M,N]=(0,C.useState)([]),[P,F]=(0,C.useState)(0),[I,L]=(0,C.useState)(!1),[R,z]=(0,C.useState)(!1),[B,V]=(0,C.useState)(null),H=e.refreshSignal,ee=(0,C.useRef)(H);(0,C.useEffect)(()=>{if(!j)return;let e=!1,t=ee.current!==H;ee.current=H,t||z(!0);let n=f[0]?{key:f[0].id,dir:f[0].desc?`desc`:`asc`}:null,r=m.map(e=>{let t=e.value;return{key:e.id,op:t.op,value:t.value}});return j({page:v.pageIndex+1,pageSize:v.pageSize,sort:n,search:A?g:``,columnFilters:r}).then(t=>{e||(N(t.rows),F(t.total),L(t.totalIsLowerBound===!0),V(null))}).catch(t=>{e||V(t instanceof Error?t.message:`chargement échoué`)}).finally(()=>{e||z(!1)}),()=>{e=!0}},[j,A,f,m,g,v.pageIndex,v.pageSize,H]),(0,C.useEffect)(()=>{if(!e.persist)return;let t=aE(e.persist.storage??`session`);if(!t)return;let n={sorting:f,columnFilters:m,globalFilter:g,columnVisibility:b,columnSizing:S,pageIndex:v.pageIndex,pageSize:v.pageSize};try{t.setItem(t6(e.persist),JSON.stringify(n))}catch{}},[e.persist,f,m,g,b,S,v]),(0,C.useEffect)(()=>{y(e=>e.pageIndex===0?e:{...e,pageIndex:0})},[f,m,g]);let{onSearchChange:U}=e;(0,C.useEffect)(()=>{U?.(A?g:``)},[U,A,g]);let W=(0,C.useRef)(!0);(0,C.useEffect)(()=>{W.current?W.current=!1:(y(e=>e.pageIndex===0?e:{...e,pageIndex:0}),N([]),F(0))},[e.resetPageSignal]);let G=q3({features:r6,data:l?M:e.data,columns:(0,C.useMemo)(()=>t.map(e=>({id:e.key,accessorFn:t=>e.value?e.value(t):``,header:e.header,enableSorting:e.sortable??!1,enableColumnFilter:e.filterable??!1,...e.size!==void 0&&{size:e.size},filterFn:p6,cell:t=>e.render?e.render(t.row.original):xL(t.getValue()),meta:{align:e.align,filterType:e.filterType,filterOptions:e.filterOptions,hint:e.hint}})),[t]),state:{sorting:f,columnFilters:m,globalFilter:g,pagination:v,columnVisibility:b,columnSizing:S,rowSelection:D},onSortingChange:p,onColumnFiltersChange:h,onGlobalFilterChange:_,onPaginationChange:y,onColumnVisibilityChange:x,onColumnSizingChange:w,onRowSelectionChange:O,enableRowSelection:e.selectable??!1,enableColumnResizing:!0,columnResizeMode:`onChange`,getRowId:e=>n(e),globalFilterFn:`includesString`,manualPagination:l,manualSorting:l,manualFiltering:l,...l&&{rowCount:P}}),te=l?R:e.loading??!1,ne=l?B:e.error??null,K=G.getRowModel().rows,re=l?P:G.getFilteredRowModel().rows.length,q=l?Math.max(1,Math.ceil(P/v.pageSize)):Math.max(1,G.getPageCount()),ie=re===0?0:v.pageIndex*v.pageSize+1,ae=Math.min((v.pageIndex+1)*v.pageSize,re),oe=t.some(e=>e.filterable),J=m.length,se=g.trim().length>0||J>0,ce=[];g.trim().length>0&&ce.push(`recherche « ${g.trim()} »`);for(let e of m){let n=t.find(t=>t.key===e.id),r=e.value,i=l6(n?.filterType).find(e=>e.value===r?.op)?.label??r?.op??``,a=r?.value??``;ce.push(`${n?.header??e.id} ${i}${a?` « ${a} »`:``}`.trim())}let le=()=>{_(``),h([]),y(e=>({...e,pageIndex:0}))},ue=()=>{e.persist&&aE(e.persist.storage??`session`)?.removeItem(t6(e.persist)),p(u),h([]),_(``),x({}),w({}),y({pageIndex:0,pageSize:e.pageSize??25}),E(!1)},de=e.selectable??!1,{renderRowDetail:fe,rowHasDetail:pe}=e,me=fe!==void 0,[he,ge]=(0,C.useState)(null),_e=(0,C.useCallback)(e=>{ge(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})},[]),ve=+!!de+ +!!me,ye=de?G.getSelectedRowModel().rows.map(e=>e.original):[],be=de&&!!e.renderBulkActions&&ye.length>0,xe=e=>e===!1?(0,Y.jsx)(YT,{size:13,style:{opacity:.4}}):e===`asc`?(0,Y.jsx)(DT,{size:13}):(0,Y.jsx)(TT,{size:13});return(0,Y.jsxs)(R_,{gap:`xs`,style:{height:s===`auto`?void 0:s,display:`flex`,flexDirection:`column`},children:[(0,Y.jsxs)(wl,{gap:`xs`,wrap:`nowrap`,children:[A&&(0,Y.jsx)(xv,{size:`xs`,leftSection:(0,Y.jsx)(JT,{size:14}),placeholder:e.searchPlaceholder??`Rechercher…`,value:g,onChange:e=>_(e.currentTarget.value),style:{flex:1,minWidth:200},"aria-label":`recherche dans le tableau`}),!A&&(0,Y.jsx)(`div`,{style:{flex:1}}),oe&&(0,Y.jsxs)(dp,{size:`xs`,variant:T?`light`:`subtle`,color:J>0?`brand`:`gray`,leftSection:(0,Y.jsx)(RT,{size:14}),onClick:()=>E(e=>!e),"aria-expanded":T,children:[`Filtres`,J>0?` (${J})`:``]}),se&&(0,Y.jsxs)(dp,{size:`xs`,variant:`light`,color:`red`,leftSection:(0,Y.jsx)(LT,{size:14}),onClick:le,"aria-label":`effacer recherche et filtres`,children:[`Effacer`,J>0?` (${J})`:``]}),(0,Y.jsxs)(Gm,{shadow:`md`,position:`bottom-end`,withinPortal:!0,closeOnItemClick:!1,children:[(0,Y.jsx)(Gm.Target,{children:(0,Y.jsx)(dp,{size:`xs`,variant:`subtle`,color:`gray`,leftSection:(0,Y.jsx)(jT,{size:14}),children:`Colonnes`})}),(0,Y.jsxs)(Gm.Dropdown,{children:[(0,Y.jsx)(Gm.Label,{children:`Afficher les colonnes`}),(0,Y.jsx)(R_,{gap:6,px:`sm`,py:4,children:G.getAllLeafColumns().map(e=>(0,Y.jsx)(Vf,{size:`xs`,checked:e.getIsVisible(),onChange:()=>e.toggleVisibility(),label:String(e.columnDef.header??e.id)},e.id))}),e.persist&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(Gm.Divider,{}),(0,Y.jsx)(Gm.Item,{color:`red`,leftSection:(0,Y.jsx)(ZT,{size:14}),onClick:ue,children:`Effacer la sauvegarde`})]})]})]})]}),be&&(0,Y.jsx)(lc,{withBorder:!0,p:`xs`,role:`region`,"aria-label":`Actions groupées`,children:(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`nowrap`,gap:`xs`,children:[(0,Y.jsxs)(wl,{gap:`sm`,wrap:`nowrap`,children:[(0,Y.jsxs)(Fd,{size:`sm`,fw:600,children:[ye.length,` sélectionné`,ye.length>1?`s`:``]}),(0,Y.jsx)(dp,{size:`xs`,variant:`subtle`,color:`gray`,onClick:k,children:`Tout désélectionner`})]}),(0,Y.jsx)(wl,{gap:`xs`,wrap:`nowrap`,children:e.renderBulkActions?.(ye,k)})]})}),(0,Y.jsxs)(`div`,{style:{position:`relative`,flex:s===`auto`?`0 0 auto`:1,minHeight:0,display:`flex`},children:[(0,Y.jsx)(om,{visible:te,zIndex:3,overlayProps:{backgroundOpacity:.35},loaderProps:{children:(0,Y.jsxs)(R_,{align:`center`,gap:6,children:[(0,Y.jsx)(ol,{size:`sm`}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,children:e.loadingMessage??`Chargement…`})]})}}),(0,Y.jsx)(ec,{style:{flex:1,minHeight:0,width:`100%`},type:s===`auto`?`never`:`auto`,offsetScrollbars:`y`,children:(0,Y.jsx)(WE,{loading:!1,error:ne,children:(0,Y.jsxs)(uv,{stickyHeader:s!==`auto`,striped:!0,highlightOnHover:!0,style:{tableLayout:`fixed`,width:G.getCenterTotalSize(),minWidth:`100%`},children:[(0,Y.jsxs)(uv.Thead,{children:[G.getHeaderGroups().map(e=>(0,Y.jsxs)(uv.Tr,{children:[me&&(0,Y.jsx)(uv.Th,{style:{width:32},children:(0,Y.jsx)(oc,{children:`Détail`})}),de&&(0,Y.jsx)(uv.Th,{style:{width:36,textAlign:`center`},onClick:e=>e.stopPropagation(),children:(0,Y.jsx)(Vf,{size:`xs`,"aria-label":`Tout sélectionner`,checked:G.getIsAllPageRowsSelected(),indeterminate:G.getIsSomePageRowsSelected()&&!G.getIsAllPageRowsSelected(),onChange:G.getToggleAllPageRowsSelectedHandler()})}),e.headers.map(e=>{let t=e.column.columnDef.meta?.align??`left`,n=e.column.columnDef.meta?.hint;return(0,Y.jsxs)(uv.Th,{style:{textAlign:t,width:e.getSize(),position:`relative`},children:[(0,Y.jsxs)(wl,{gap:4,wrap:`nowrap`,justify:t===`right`?`flex-end`:`flex-start`,children:[e.column.getCanSort()?(0,Y.jsxs)(ic,{onClick:e.column.getToggleSortingHandler(),"aria-label":`trier par ${String(e.column.columnDef.header)}`,style:{display:`inline-flex`,alignItems:`center`,gap:4},children:[(0,Y.jsx)(Fd,{size:`sm`,fw:600,children:ZQ(e.column.columnDef.header,e.getContext())}),xe(e.column.getIsSorted())]}):(0,Y.jsx)(Fd,{size:`sm`,fw:600,children:ZQ(e.column.columnDef.header,e.getContext())}),n?(0,Y.jsx)(tD,{text:n}):null]}),e.column.getCanResize()&&(0,Y.jsx)(`div`,{className:`nf-dg-resizer`,"data-resizing":e.column.getIsResizing()?`true`:void 0,onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),onClick:e=>e.stopPropagation(),onDoubleClick:()=>e.column.resetSize(),tabIndex:0,onKeyDown:t=>{if(t.key===`Home`){t.preventDefault(),e.column.resetSize();return}let n=t.key===`ArrowRight`?1:t.key===`ArrowLeft`?-1:0;if(n===0)return;t.preventDefault();let r=e.column.id,i=e.column.columnDef.minSize??20,a=Math.max(i,e.getSize()+n*(t.shiftKey?50:10));w(e=>({...e,[r]:a}))},role:`separator`,"aria-orientation":`vertical`,"aria-valuenow":e.getSize(),"aria-valuemin":e.column.columnDef.minSize??20,"aria-label":`redimensionner ${String(e.column.columnDef.header)}`,title:`Glisser pour redimensionner · double-clic pour réinitialiser · au clavier : flèches`})]},e.id)})]},e.id)),T&&(0,Y.jsxs)(uv.Tr,{children:[de&&(0,Y.jsx)(uv.Th,{style:{width:36}}),G.getHeaderGroups()[0]?.headers.map(e=>(0,Y.jsx)(uv.Th,{style:{paddingTop:4,paddingBottom:8,width:e.getSize()},children:e.column.getCanFilter()?(0,Y.jsx)(h6,{column:e.column,isServer:l}):null},`f-${e.id}`))]})]}),(0,Y.jsxs)(uv.Tbody,{children:[K.length===0&&!te&&(0,Y.jsx)(uv.Tr,{children:(0,Y.jsx)(uv.Td,{colSpan:G.getVisibleLeafColumns().length+ve,style:{textAlign:`center`,padding:24},children:se?(0,Y.jsxs)(R_,{gap:8,align:`center`,children:[(0,Y.jsx)(Fd,{size:`sm`,children:`Aucun résultat pour les critères actifs.`}),(0,Y.jsx)(Fd,{size:`xs`,c:`dimmed`,children:ce.join(` · `)}),(0,Y.jsx)(dp,{size:`xs`,variant:`light`,leftSection:(0,Y.jsx)(LT,{size:14}),onClick:le,children:`Effacer les critères`})]}):(0,Y.jsx)(Fd,{size:`sm`,c:`dimmed`,children:o})})}),K.map(e=>{let t=me&&(pe?.(e.original)??!0),n=t&&he?.has(e.id)===!0;return(0,Y.jsxs)(C.Fragment,{children:[(0,Y.jsxs)(uv.Tr,{onClick:r?()=>r(e.original):void 0,onKeyDown:r?t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),r(e.original))}:void 0,tabIndex:r?0:void 0,style:{...r?{cursor:`pointer`}:null,...i?.(e.original)?{opacity:.5}:null},children:[me&&(0,Y.jsx)(uv.Td,{style:{width:32,textAlign:`center`},onClick:e=>e.stopPropagation(),children:t&&(0,Y.jsx)(ml,{size:`sm`,variant:`subtle`,color:`gray`,"aria-expanded":n,"aria-label":n?`Masquer le détail`:`Afficher le détail`,onClick:()=>_e(e.id),children:n?(0,Y.jsx)(TT,{size:14}):(0,Y.jsx)(ET,{size:14})})}),de&&(0,Y.jsx)(uv.Td,{style:{width:36,textAlign:`center`},onClick:e=>e.stopPropagation(),children:(0,Y.jsx)(Vf,{size:`xs`,"aria-label":`Sélectionner la ligne`,checked:e.getIsSelected(),onChange:e.getToggleSelectedHandler()})}),e.getVisibleCells().map(e=>(0,Y.jsx)(uv.Td,{style:{textAlign:e.column.columnDef.meta?.align??`left`,width:e.column.getSize(),overflow:`hidden`,textOverflow:`ellipsis`},children:ZQ(e.column.columnDef.cell,e.getContext())},e.id))]}),n&&(0,Y.jsx)(uv.Tr,{children:(0,Y.jsx)(uv.Td,{colSpan:G.getVisibleLeafColumns().length+ve,style:{padding:0},children:fe(e.original)})})]},e.id)})]})]})})})]}),(0,Y.jsxs)(wl,{justify:`space-between`,wrap:`nowrap`,gap:`xs`,style:s===`auto`?{position:`sticky`,bottom:`calc(-1 * var(--mantine-spacing-md))`,zIndex:1,background:`var(--mantine-color-body)`,borderTop:`1px solid var(--mantine-color-default-border)`,paddingBlock:`var(--mantine-spacing-xs)`}:void 0,children:[(0,Y.jsxs)(Fd,{size:`xs`,c:`dimmed`,children:[ie,`–`,ae,` sur `,l&&I?`au moins `:``,re]}),(0,Y.jsxs)(wl,{gap:`xs`,wrap:`nowrap`,children:[(0,Y.jsx)(P_,{data:a.map(e=>String(e)),value:String(v.pageSize),onChange:e=>e&&G.setPageSize(Number(e)),size:`xs`,w:92,"aria-label":`lignes par page`,comboboxProps:{withinPortal:!0}}),(0,Y.jsx)(m_,{total:q,value:v.pageIndex+1,onChange:e=>G.setPageIndex(e-1),size:`sm`,withEdges:!0,getControlProps:e=>({"aria-label":$3[e],...e===`last`&&l&&I?{disabled:!0,title:`Fin inconnue : ce stockage ne compte pas la liste`}:{}})})]})]})]})}var _6=``;function v6({spec:e,value:t,onChange:n,labels:r,omit:i,debounceMs:a=400}){let o=e?Object.entries(e).filter(([e])=>!i?.includes(e)):[];if(o.length===0)return null;let s=(e,r)=>{let i={...t};r===``?delete i[e]:i[e]=r,n(i)},c=Object.keys(t).length;return(0,Y.jsxs)(wl,{gap:`lg`,align:`flex-end`,wrap:`wrap`,children:[o.map(([e,n])=>(0,Y.jsx)(y6,{name:e,nature:n,value:t[e]??``,onChange:t=>s(e,t),label:r?.[e],debounceMs:a},e)),c>0&&(0,Y.jsxs)(dp,{variant:`subtle`,size:`xs`,color:`gray`,leftSection:(0,Y.jsx)(LT,{size:14}),onClick:()=>n({}),children:[`Effacer `,c,` filtre`,c>1?`s`:``]})]})}function y6({name:e,nature:t,value:n,onChange:r,label:i,debounceMs:a}){let o=i?.label??e,s=(0,Y.jsxs)(wl,{gap:4,align:`center`,wrap:`nowrap`,children:[(0,Y.jsx)(Fd,{size:`xs`,fw:600,c:`dimmed`,children:o}),i?.hint&&(0,Y.jsx)(tD,{text:i.hint})]});return Array.isArray(t)?(0,Y.jsxs)(R_,{gap:4,children:[s,(0,Y.jsx)(P_,{size:`xs`,w:170,clearable:!0,placeholder:`Tous`,"aria-label":o,data:t.map(e=>({value:e,label:i?.values?.[e]??e})),value:n===``?null:n,onChange:e=>r(e??``)})]}):t===`boolean`?(0,Y.jsxs)(R_,{gap:4,children:[s,(0,Y.jsx)(M_,{size:`xs`,"aria-label":o,value:n===``?_6:n,onChange:e=>r(e===_6?``:e),data:[{value:_6,label:`Tous`},{value:`true`,label:i?.values?.true??`Oui`},{value:`false`,label:i?.values?.false??`Non`}]})]}):t===`string`||t===`int`?(0,Y.jsxs)(R_,{gap:4,children:[s,(0,Y.jsx)(b6,{numeric:t===`int`,value:n,onChange:r,placeholder:i?.placeholder??`Valeur exacte`,ariaLabel:o,delay:a})]}):null}function b6({numeric:e,value:t,onChange:n,placeholder:r,ariaLabel:i,delay:a}){let[o,s]=(0,C.useState)(t),[c]=Se(o,a);(0,C.useEffect)(()=>s(t),[t]);let l=(0,C.useEffectEvent)(e=>{e!==t&&n(e)});return(0,C.useEffect)(()=>{l(c)},[c]),e?(0,Y.jsx)(Hg,{size:`xs`,w:140,"aria-label":i,placeholder:r,value:o===``?``:Number(o),onChange:e=>s(e===``?``:String(e))}):(0,Y.jsx)(xv,{size:`xs`,w:180,"aria-label":i,placeholder:r,value:o,onChange:e=>s(e.currentTarget.value)})}export{QE as $,Te as $i,xv as $n,Pc as $r,IT as $t,yR as A,nn as Ai,$x as An,Vd as Ar,cE as At,pL as B,Ut as Bi,Zb as Bn,Ju as Br,nE as Bt,zG as C,S as Ca,gn as Ci,qw as Cn,Qf as Cr,SE as Ct,$G as D,mn as Di,Qx as Dn,kf as Dr,sE as Dt,SW as E,on as Ei,ES as En,Vf as Er,LE as Et,CL as F,Jt as Fi,Yx as Fn,Dd as Fr,oE as Ft,iD as G,st as Gi,Py as Gn,Bu as Gr,JT as Gt,iL as H,At as Hi,Hy as Hn,Uu as Hr,QT as Ht,wL as I,qt as Ii,Kx as In,xd as Ir,eE as It,nD as J,tt as Ji,vy as Jn,wl as Jr,GT as Jt,rD as K,rt as Ki,Fy as Kn,Lu as Kr,qT as Kt,EL as L,Kt as Li,Gx as Ln,vd as Lr,rE as Lt,XL as M,tn as Mi,Zx as Mn,Rd as Mr,BE as Mt,KL as N,en as Ni,Jx as Nn,Fd as Nr,vE as Nt,AG as O,pn as Oi,eS as On,yf as Or,xE as Ot,OL as P,Zt as Pi,Xx as Pn,Ad as Pr,aE as Pt,YE as Q,Ze as Qi,wv as Qn,Qc as Qr,LT as Qt,xL as R,Gt as Ri,Rx as Rn,ed as Rr,iE as Rt,jG as S,w as Sa,vn as Si,tT as Sn,$f as Sr,CE as St,NU as T,an as Ti,tC as Tn,Hf as Tr,PE as Tt,aL as U,Ot as Ui,By as Un,Hu as Ur,ZT as Ut,cL as V,Ft as Vi,Xb as Vn,Ku as Vr,$T as Vt,oL as W,xt as Wi,Sy as Wn,Vu as Wr,XT as Wt,ZE as X,$e as Xi,Bv as Xn,ml as Xr,BT as Xt,XE as Y,nt as Yi,oy as Yn,yl as Yr,WT as Yt,JE as Z,Qe as Zi,jv as Zn,ol as Zr,RT as Zt,aQ as _,F as _a,jn as _i,hT as _n,xp as _r,bE as _t,GQ as a,ce as aa,Lr as ai,OT as an,M_ as ar,EE as at,BZ as b,A as ba,kn as bi,uT as bn,dp as br,OE as bt,yQ as c,ae as ca,Z as ci,wT as cn,bh as cr,dE as ct,gQ as d,re as da,Cr as di,xT as dn,Gm as dr,IE as dt,Ce as ea,Oc as ei,FT as en,bv as er,$E as et,pQ as f,G as fa,Sr as fi,bT as fn,nm as fr,ME as ft,sQ as g,L as ga,Kn as gi,gT as gn,wp as gr,lE as gt,uQ as h,R as ha,Zn as hi,_T as hn,Ep as hr,jE as ht,qQ as i,le as ia,ec as ii,kT as in,P_ as ir,VE as it,$L as j,$t as ji,sS as jn,Bd as jr,uE as jt,vR as k,cn as ki,uS as kn,gf as kr,yE as kt,vQ as l,q as la,Or as li,CT as ln,hh as lr,RE as lt,dQ as m,z as ma,$n as mi,vT as mn,Ap as mr,FE as mt,g6 as n,fe as na,oc as ni,MT as nn,G_ as nr,HE as nt,zQ as o,se as oa,Q as oi,ET as on,O_ as or,DE as ot,fQ as p,U as pa,er as pi,yT as pn,Wp as pr,NE as pt,tD as q,et as qi,_y as qn,Iu as qr,KT as qt,KQ as r,de as ra,ic as ri,AT as rn,R_ as rr,UE as rt,NQ as s,ie as sa,kr as si,TT as sn,Eh as sr,fE as st,v6 as t,xe as ta,lc as ti,NT as tn,uv as tr,WE as tt,_Q as u,K as ua,wr as ui,ST as un,sh as ur,zE as ut,iQ as v,P as va,X as vi,mT as vn,yp as vr,kE as vt,kG as w,b as wa,rn as wi,oC as wn,Jf as wr,wE as wt,vK as x,E as xa,xn as xi,sT as xn,np as xr,TE as xt,qZ as y,N as ya,An as yi,dT as yn,vp as yr,AE as yt,mL as z,Wt as zi,Jb as zn,Yu as zr,tE as zt};
|