@riddix/hamh 2.1.0-alpha.428 → 2.1.0-alpha.430
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.
|
@@ -160,7 +160,7 @@ export default theme;`}function MN(e){return typeof e=="number"?`${(e*100).toFix
|
|
|
160
160
|
.cls-3 {\r
|
|
161
161
|
clip-path: url(#clippath);\r
|
|
162
162
|
}\r
|
|
163
|
-
`),_.createElement("clipPath",{id:"clippath"},_.createElement("path",{className:"cls-1",d:"M152.8,32.08h-6.03V12.37c0-.27-.22-.49-.49-.49h-9.76c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49h5.28v15.63h-6.03c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49h17.02c.27,0,.49-.22.49-.49v-3.59c0-.27-.22-.49-.49-.49ZM119.4,11.55c-2.76,0-5.17,1.2-6.76,3.04v-2.22c0-.27-.22-.49-.49-.49h-3.99c-.27,0-.49.22-.49.49v23.79c0,.27.22.49.49.49h3.99c.27,0,.49-.22.49-.49v-13.83c0-3.47,2.43-6.2,5.75-6.2,2.96,0,4.81,1.77,5.33,4.08.13.6.21,1.5.21,2.24v13.72c0,.27.22.49.49.49h3.99c.27,0,.49-.22.49-.49v-12.78c0-1.99-.09-2.88-.23-3.9-.67-4.51-4.29-7.93-9.26-7.93ZM24.16,15.84c2.71,0,4.28,1.34,4.7,3.59.05.28.29.48.57.48h4.08c.29,0,.52-.26.48-.55-.63-5.02-4.72-7.97-9.72-7.97-4.7,0-9.24,2.57-9.24,7.68,0,4.22,3.14,6.1,6.72,6.96l3.95.92c2.01.48,3.32,1.34,3.32,2.83,0,2.04-2.09,2.85-4.33,2.85-2.92,0-4.6-1.29-5.02-3.69-.05-.29-.3-.5-.59-.5h-4.05c-.29,0-.52.25-.48.54.65,5.4,5.16,8.14,9.96,8.14,4.69,0,9.66-2.41,9.66-7.88,0-3.59-2.32-5.74-6.77-6.78l-3.83-.89c-1.46-.33-3.42-1.01-3.42-2.88,0-1.8,1.64-2.85,4.02-2.85ZM48.68,24.28c0,13.74-10.55,24.16-24.34,24.16S0,38.01,0,24.28C0,11.45,9.22,1.37,21.88,0c.29-.03.54.19.54.48v3.67c0,.29-.22.54-.51.58C11.97,6.03,4.87,14.14,4.87,24.32c0,11.05,8.36,19.53,19.47,19.53,11.11,0,19.47-8.48,19.47-19.53,0-10.18-7.13-18.3-17.04-19.59-.29-.04-.51-.28-.51-.58V.49c0-.29.25-.51.54-.48,12.66,1.37,21.88,11.44,21.88,24.27ZM155.55,16.45h5.07v19.71c0,.27.22.49.49.49h3.99c.27,0,.49-.22.49-.49v-19.71h7.39c.27,0,.49-.22.49-.49v-3.59c0-.27-.22-.49-.49-.49h-7.39v-3.22c0-2.47,1.59-3.65,3.61-3.65,1.52,0,3.03.58,4.28,1.48.31.22.73,0,.73-.38v-3.62c0-.27-.14-.52-.37-.66-1.45-.89-3.19-1.41-5.17-1.41-4.65,0-8.04,3.09-8.04,8.25v3.22h-5.07c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49ZM62.17,8.47c2.04,0,3.71-1.67,3.71-3.76,0-2.07-1.67-3.71-3.71-3.71s-3.71,1.64-3.71,3.71c0,2.09,1.67,3.76,3.71,3.76ZM143.95,8.47c2.04,0,3.71-1.67,3.71-3.76s-1.67-3.71-3.71-3.71-3.71,1.64-3.71,3.71c0,2.09,1.67,3.76,3.71,3.76ZM71.02,32.08h-6.03V12.37c0-.27-.22-.49-.49-.49h-9.76c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49h5.28v15.63h-6.03c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49h17.02c.27,0,.49-.22.49-.49v-3.59c0-.27-.22-.49-.49-.49ZM185.95,35.65l-1.51,3.8c-.79,2-1.95,2.91-3.31,2.91-1.07,0-2.39-.44-3.52-1.46-.28-.26-.73-.06-.73.32v4.21c.02.27.16.53.39.67,1.21.72,2.51,1.12,4.03,1.12,3.85,0,6.35-2.38,8.25-7.36l10.41-27.32c.12-.32-.11-.66-.45-.66h-4.14c-.33,0-.62.2-.73.51l-6.21,17.07-6.7-17.09c-.12-.3-.4-.49-.72-.49h-4.23c-.35,0-.58.35-.45.67l9.62,23.09ZM98.39,11.88h-3.9c-.27,0-.49.22-.49.49v2.08c-1.13-1.31-2.65-2.25-4.66-2.65-.27-.05-.52.15-.52.43v3.81c0,.27.17.5.43.58,3.09.95,4.87,3.87,4.87,7.52,0,4.52-2.66,7.88-7.01,7.88-3.99,0-7.06-3.36-7.06-7.91,0-3.42,1.76-6.36,4.56-7.43.23-.09.39-.32.39-.57v-3.87c0-.28-.26-.49-.53-.43-5.61,1.28-9.45,6.17-9.45,12.41,0,7.17,4.76,12.37,11.46,12.37,3.35,0,5.79-1.3,7.44-3.33v3.21c0,1.09-.13,1.95-.35,2.7-.67,2.27-2.67,3.78-5.67,3.78-2.98,0-5.1-1.41-5.69-4.01-.06-.24-.28-.41-.52-.41h-3.99c-.29,0-.52.26-.48.55.84,5.76,5.31,8.48,10.6,8.48,5.08,0,9.42-2.56,10.64-7.34.29-1.12.44-2.96.44-4.29V12.37c0-.27-.22-.49-.49-.49Z"})),_.createElement("linearGradient",{id:"Naamloos_verloop_7","data-name":"Naamloos verloop 7",x1:-48.59,y1:128.26,x2:186.52,y2:-36.37,gradientUnits:"userSpaceOnUse"},_.createElement("stop",{offset:.5,stopColor:"#00e487"}),_.createElement("stop",{offset:1,stopColor:"#1ecbd0"}))),_.createElement("g",{className:"cls-3"},_.createElement("rect",{className:"cls-2",width:200,height:48.44}))),T7=e=>_.createElement("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("title",null,"TP-Link"),_.createElement("path",{d:"M15.185 0C10.218 0 6.25 3.984 6.25 8.903V10.8h4.99V8.903c0-2.135 1.736-3.863 3.946-3.863 2.187 0 3.708 1.536 3.708 3.815 0 2.257-1.64 3.912-3.827 3.912h-1.878v5.039h1.878c4.874 0 8.819-4.007 8.819-8.952C23.885 3.72 20.2 0 15.185 0zM.115 12.6v4.103c0 .624.523 1.248 1.236 1.248h4.753v4.801c0 .624.523 1.248 1.236 1.248h4.065V12.6Z"})),Nk=e=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2000.000000pt",height:"1000.000000pt",viewBox:"0 0 2000.000000 1000.000000",preserveAspectRatio:"xMidYMid meet",...e},_.createElement("g",{transform:"translate(0.000000,1000.000000) scale(0.100000,-0.100000)",fill:"#000000",stroke:"none"},_.createElement("path",{d:"M214 9972 c-78 -27 -142 -88 -182 -172 -16 -33 -17 -289 -20 -3655 -2 -2604 0 -3659 8 -3760 34 -430 121 -759 286 -1083 332 -650 912 -1075 1680 -1231 328 -66 -433 -61 9102 -61 7915 0 8652 1 8696 16 60 21 147 100 177 161 l24 48 0 3700 c0 3520 -1 3707 -18 3840 -55 422 -181 789 -380 1112 -173 279 -448 550 -728 718 -317 189 -636 299 -1059 362 -108 16 -626 18 -8825 20 -8317 2 -8712 2 -8761 -15z m17121 -1089 c446 -67 853 -276 1161 -595 290 -300 477 -684 541 -1106 19 -129 22 -413 5 -526 -20 -133 -77 -212 -192 -264 -147 -68 -330 2 -406 156 -17 33 -19 58 -16 222 3 201 -8 331 -39 453 -67 265 -191 479 -385 666 -199 192 -424 309 -692 361 -275 53 -508 30 -791 -80 -108 -41 -142 -50 -194 -50 -172 0 -294 117 -305 291 -8 129 40 223 143 283 164 97 481 186 735 206 121 10 306 3 435 -17z m-135 -1188 c354 -86 627 -356 727 -720 24 -87 27 -118 28 -245 0 -139 -1 -148 -29 -207 -55 -121 -157 -187 -286 -188 -95 0 -168 33 -234 106 -60 66 -76 119 -76 244 0 194 -68 309 -224 381 -83 38 -164 41 -261 10 -132 -42 -168 -47 -227 -35 -105 23 -182 83 -226 179 -74 159 -6 336 161 418 180 88 427 110 647 57z m-14089 -45 c139 -26 263 -123 327 -257 l37 -78 -2 -265 c-1 -146 -4 -311 -8 -367 l-6 -103 689 0 c649 0 694 -1 751 -19 149 -46 267 -168 305 -316 59 -223 -53 -454 -270 -562 l-78 -38 -712 -3 -712 -3 -6 -72 c-10 -121 -31 -773 -30 -927 0 -114 5 -164 22 -233 81 -326 319 -564 643 -643 61 -15 136 -19 444 -24 398 -7 402 -7 500 -64 62 -37 142 -128 178 -203 30 -65 32 -74 32 -188 0 -118 -1 -121 -37 -198 -53 -110 -128 -186 -237 -240 l-85 -42 -425 0 c-443 0 -462 1 -646 47 -193 47 -383 132 -562 250 -151 101 -362 312 -462 462 -160 241 -254 484 -296 764 -17 112 -19 386 -5 722 5 124 12 307 16 407 l7 182 -290 3 -289 3 -75 37 c-331 164 -350 616 -35 820 110 71 151 78 457 78 l269 0 0 113 c0 247 20 550 40 617 70 234 314 384 551 340z m12624 -1019 c66 -12 172 -37 235 -57 145 -44 388 -164 503 -247 371 -268 618 -648 719 -1108 21 -96 23 -128 23 -429 0 -380 -31 -1310 -46 -1390 -38 -193 -216 -363 -409 -389 -246 -33 -474 128 -520 367 -7 37 -5 170 5 440 43 1141 43 1136 -9 1290 -61 178 -189 347 -341 452 -62 43 -196 104 -270 125 -81 22 -290 31 -384 16 -381 -60 -704 -368 -782 -746 -93 -452 149 -890 574 -1036 81 -28 210 -49 297 -49 149 0 297 -83 381 -212 82 -128 93 -302 26 -442 -59 -125 -156 -214 -284 -262 -66 -25 -74 -26 -238 -21 -479 13 -917 207 -1243 552 -121 128 -209 256 -291 420 -104 210 -154 378 -181 610 -61 539 142 1121 534 1532 324 339 732 545 1196 602 117 15 368 6 505 -18z m-9341 -130 c98 -48 177 -126 223 -218 25 -52 28 -71 32 -174 1 -64 -7 -409 -19 -765 -29 -839 -25 -945 45 -1130 80 -213 222 -352 430 -421 71 -23 96 -26 220 -27 149 0 180 5 305 55 235 93 407 336 465 654 14 79 31 428 59 1261 13 371 17 416 36 474 93 276 404 416 656 296 130 -62 224 -178 256 -316 12 -52 11 -76 -23 -1015 -26 -740 -37 -854 -109 -1123 -92 -344 -272 -646 -509 -855 -306 -269 -757 -406 -1244 -376 -461 28 -806 171 -1083 447 -230 229 -375 533 -446 937 -21 118 -23 158 -22 440 1 171 6 425 12 565 7 140 16 399 22 575 6 176 15 345 21 375 23 118 121 255 227 317 93 55 167 74 270 70 85 -4 100 -8 176 -46z m3885 30 c148 -46 263 -164 307 -316 13 -47 15 -82 10 -175 -3 -63 -15 -281 -26 -485 -46 -866 -51 -980 -40 -1082 22 -207 90 -383 192 -498 212 -237 608 -284 907 -106 154 91 270 247 341 459 54 162 60 225 95 912 32 647 46 877 55 923 22 108 110 232 214 301 29 19 89 47 132 62 69 23 90 26 166 21 74 -4 99 -10 163 -41 146 -69 242 -204 252 -355 5 -74 -7 -402 -27 -726 -5 -82 -21 -377 -35 -655 -14 -278 -32 -622 -40 -765 -8 -143 -21 -402 -30 -575 -8 -173 -20 -366 -25 -429 -26 -290 -125 -564 -288 -801 -79 -115 -274 -311 -390 -394 -266 -188 -597 -320 -932 -371 -152 -23 -384 -31 -461 -16 -227 45 -387 273 -352 502 38 240 249 428 483 429 186 1 410 45 547 110 212 99 339 236 409 442 23 70 43 178 31 178 -3 0 -24 -16 -46 -35 -113 -94 -281 -175 -419 -201 -392 -75 -837 8 -1157 217 -298 193 -520 491 -639 854 -96 294 -113 528 -80 1090 17 293 31 571 44 850 13 279 20 320 66 413 105 213 358 330 573 263z"}))),_Z=e=>_.createElement("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("title",null,"Xiaomi"),_.createElement("path",{d:"M12 0C8.016 0 4.756.255 2.493 2.516.23 4.776 0 8.033 0 12.012c0 3.98.23 7.235 2.494 9.497C4.757 23.77 8.017 24 12 24c3.983 0 7.243-.23 9.506-2.491C23.77 19.247 24 15.99 24 12.012c0-3.984-.233-7.243-2.502-9.504C19.234.252 15.978 0 12 0zM4.906 7.405h5.624c1.47 0 3.007.068 3.764.827.746.746.827 2.233.83 3.676v4.54a.15.15 0 0 1-.152.147h-1.947a.15.15 0 0 1-.152-.148V11.83c-.002-.806-.048-1.634-.464-2.051-.358-.36-1.026-.441-1.72-.458H7.158a.15.15 0 0 0-.151.147v6.98a.15.15 0 0 1-.152.148H4.906a.15.15 0 0 1-.15-.148V7.554a.15.15 0 0 1 .15-.149zm12.131 0h1.949a.15.15 0 0 1 .15.15v8.892a.15.15 0 0 1-.15.148h-1.949a.15.15 0 0 1-.151-.148V7.554a.15.15 0 0 1 .151-.149zM8.92 10.948h2.046c.083 0 .15.066.15.147v5.352a.15.15 0 0 1-.15.148H8.92a.15.15 0 0 1-.152-.148v-5.352a.15.15 0 0 1 .152-.147Z"})),I3e=e=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",...e},_.createElement("path",{d:"M129.5 512V345.9L18.5 48h55.8l81.8 229.7L250.2 0h51.3L180.8 347.8V512h-51.3z"})),P3e={1:"Panasonic",4107:"Signify",4125:"Fortune Brands",4129:"Legrand",4142:"LG Electronics",4151:"NXP Semiconductors",4161:"STMicroelectronics",4169:"Silicon Labs",4190:"Schneider Electric",4216:"ntve home",4240:"Green Energy Options",4251:"Leviton",4304:"Qorvo",4321:"Samsung",4334:"UEI",4338:"ubisys",4362:"Samsung SmartThings",4381:"Comcast",4388:"Jasco Products",4405:"dresden elektronik",4417:"Tuya",4442:"LG ThinQ",4447:"Aqara",4448:"Amazon Alexa",4454:"Innr",4456:"Leedarson",4469:"D-Link",4472:"WNC Corporation",4474:"Insta GmbH",4476:"IKEA",4478:"Feibit",4488:"TP-Link",4489:"LEDVANCE",4492:"Midea",4501:"CommScope",4614:"EME Americas",4617:"Bosch",4619:"HEIMAN",4631:"Amazon Alexa",4633:"ORVIBO",4644:"Sunricher",4653:"AduroSmart",4662:"Allegion",4673:"Samjin",4689:"Neonlite",4701:"Tuya",4711:"ARC Technology",4718:"Xiaomi",4724:"Trust International",4735:"Nordic Semiconductor",4736:"Siterwell",4738:"SEI Robotics",4741:"Hager",4742:"CoolKit",4745:"Lidl",4746:"Changhong Network",4751:"EGLO",4757:"AVM",4762:"Delta Dore Rademacher",4767:"Level Home",4874:"Eve",4876:"EVVR",4877:"BouffaloLab",4882:"Yeelight",4886:"Realtek",4889:"Mitsubishi Electric",4890:"Resideo",4891:"Espressif",4892:"HELLA",4894:"CAME",4895:"Longan.link",4897:"SONOFF",4903:"Mill International",4910:"Energetic",4911:"Yandex",4915:"Becker Antriebe",4916:"TCL",4917:"Dexatek",4921:"GE Lighting",4923:"WAREMA",4927:"ASR",4930:"Beken",4932:"Eltako",4933:"Meross",4934:"Rafael",4937:"Apple Home",4938:"Rollease Acmeda",4939:"Home Assistant",4940:"Simon",4942:"tado°",4943:"mediola",4945:"HooRii Technology",4946:"Häfele",4950:"Lennox",4952:"TPV",4953:"GOQUAL",4954:"SIEGENIA",4957:"Nuki",4961:"Inovelli",4962:"deveritec",4965:"Dooya",4969:"BHtronics",4972:"Onewish",4974:"Ambi Labs",4977:"Tridonic",4978:"innovation matters",4987:"Amazon Basics",4991:"NEO",4993:"Amazon Prime Video",4994:"ION INDUSTRIES",4996:"Apple (iCloud Keychain)",4998:"Skylux",4999:"Govee",5e3:"Infineon",5002:"Nature",5003:"ULTRON",5004:"Hisense",5006:"Twinkly",5009:"Kasa",5010:"Tapo",5014:"AiDot",5015:"SwitchBot",5019:"ITIUS",5020:"Zemismart",5022:"Dyson",5023:"Razer",5120:"Uascent",5123:"Grid Connect",5124:"Phaten",5125:"Ecovacs",5127:"ThirdReality",5128:"VELUX",5131:"70mai",5136:"Quectel",5137:"Freedompro",5138:"SMARTWIZ",5139:"1Home",5141:"Nanoleaf (Caveman)",5142:"Nanoleaf (Umbra)",5143:"Konnected",5144:"Klite",5145:"Lorex",5147:"Rang Dong",5149:"Secuyou",5150:"arre home",5151:"Ductech",5152:"EcoFlow",5153:"Kwikset",5155:"Feit Electric",5158:"ELEGRP",5159:"Hama",5161:"Albrecht Jung",5163:"LETIANPAI",5165:"QIHANG",5167:"QIACHIP",5168:"L-TRADE",5170:"ELKO EP",5171:"MOMAX",5174:"SinuxSoft",5175:"ACCEL LAB",5176:"Topstar Lighting",5181:"Onvis",5184:"VerLuce",5185:"Snowball",5186:"REHAU",5187:"Goods iQ",5189:"Finesse Decor",5190:"TAKE AS GLOBAL",5192:"LivingStyle",5193:"Lloyd's",5196:"TrustAsia",5197:"Atios",5199:"Yale",5202:"Big Ass Fans",5205:"MagentaHome",5207:"Wistar",5212:"Lockly",5213:"Hosiden",5215:"Good Way Technology",5216:"lipro",5217:"Xinda",5218:"Energy Magic Cube",5219:"Eberle",5221:"Hunter Douglas",5222:"Hemos Lighting",5224:"Anona Security",5226:"Intecular",5229:"Polyaire",5230:"SMART",5231:"SmartWings",5232:"HOPERF",5234:"Jiecang",5235:"Lelight",5239:"Multi IR",5240:"APYNOV",5242:"Realwe",5243:"LUMIFLOW",5244:"SHENAN YANGGUANG",5245:"Morning Electronics",5246:"MIWA LOCK",5247:"U-tec",5248:"Roborock",5249:"Xenon Industrial",5250:"Lengceoi",5251:"jhome",5254:"Infibrite",5256:"Flic",5258:"Occhio",5259:"Samraj",5261:"EME",5262:"Binthen",5264:"Shelly",5266:"xxter",5267:"NIE-TECH",5268:"Martin Renz",5269:"Pacific Hogar",5270:"InnoPhase IOT",5271:"DMA",5273:"CLIO",5274:"Guangdong A-OK",5275:"AIGOSTAR",5276:"Launray",5279:"Deyi Smart",5282:"Brennenstuhl",5293:"Raex",5376:"SmartWave",5379:"Ronco",5380:"Mango Network",5382:"SAFEMO",5383:"Bweetech",5384:"Rui Teng",5385:"SmartSetup",5387:"Technology Nexus",5388:"Nexxt Solutions",5389:"Huayu Lian",5391:"in-lite",5393:"Saishigao",5394:"Yourlite",5395:"Alpha Tubular Motors",5396:"Chuan Dian",5398:"iRobot",5399:"Huacheng Network",5401:"i3 Engineering",5402:"Leviosa",5403:"Sunfree Motor",5404:"Schoenberger",5405:"Dendo Systems",5406:"Kudelski IoT",5407:"Apporo",5408:"Rachio",5409:"NEWLAB",5410:"Zimi",5411:"Yooksmart",5412:"BofuSmart",5415:"habi",5416:"ntve home",5418:"BSH Home Appliances",5419:"Kumho Electric",5420:"Dreame",5421:"Neo Smart Blinds",5424:"Taiwan Fu Hsing",5425:"Solity",5426:"Arpobot",5427:"Anker",5428:"WAGO",5430:"DomoPlus",5431:"PEARL",5432:"Beca",5433:"WISeKey",5435:"Griesser",5436:"alre",5437:"Amlogic",5438:"ART DOM",5439:"Brel",5441:"Kärcher",5442:"Lanbon",5447:"MACO",5450:"Sciener",5451:"SkyAngle",5452:"VIZO Technology",5456:"AvatarControls",5457:"Kaijet",5458:"DEWENWILS",5459:"SuperBrightLEDS",5461:"MIUC Technology",5464:"Ai-Thinker",5465:"tink",5467:"MinebeaMitsumi",5468:"Feierge",5470:"Sandstrom",5472:"SIXWGH",5474:"Renesas",5475:"StrongKey",5476:"NEXTY ELECTRONICS",5478:"ODELIC",5479:"Haier",5480:"Econet",5481:"Feller",5482:"xCREAS",5483:"ShinDong-A ES",5484:"Motionblinds",5486:"BrizLabs",5489:"Eurotronic",5490:"Babai",5491:"SELVE",5493:"Xizhen Electronics",5494:"Enlight",5496:"WINTEC KOREA",5497:"Hinkley",5498:"SMARTSPEC",5500:"L&S Lighting",5502:"APICAL",5506:"KEGU",5507:"MAMABA",5510:"Megaman",5512:"Atouch Winwel",5513:"Warmup",5514:"Flipper",5515:"Deasino",5516:"ZFL SMART",5518:"A solution",5519:"Bold Smart Lock",5520:"GL.iNet",5521:"ZH Currtain",5522:"MEAN WELL",5525:"Kotonic",5526:"Sensereo",5529:"Huarui",5530:"HAOJAI",5533:"wibutler",5534:"UIOT",5535:"Ltech",5537:"Delta Dore",5539:"Intermatic",5540:"Mikrotik",5541:"Laticrete",5543:"Hunter Fan",5544:"LOCKIN",5546:"GLEDOPTO",5547:"Accurate Lock & Hardware",5548:"SWAN Lite",5549:"AnablepSecurity",5551:"Corston",5552:"JustPlus",5553:"INSIIDA",5555:"MiBoxer",5557:"Brighter Lighting",5564:"Lysome",5565:"TBS",5566:"Easfina",5567:"Korrus",5568:"DIANXIAOKU",5570:"Kaadas",5572:"FAST ČR",5574:"Wozart",5575:"Homewell",5576:"Maktar",5577:"Ci Global",5580:"Schüco",5582:"MAKEGOOD",5583:"Globe Electric",5584:"Vantiva",5586:"Desjoyaux",5591:"Boldr",5594:"JEM Accessories",5597:"SG Armaturen",5598:"VoxAura",5599:"Vitrumshade",5600:"Leaguer MicroElectronics",5601:"NOVO",5603:"YCZNWL",5607:"Fresh Electric",5608:"Doorma",5609:"Sukces",5614:"moorgen",5615:"KASTA",5618:"Viomi",5620:"Tedee",5621:"Bouygues Telecom",5623:"AC Infinity",5625:"Narwal",5627:"nomos system",5630:"Senscomm",5637:"Remac Smart",5645:"SUFN",5646:"LLW",5647:"POYAL",5648:"Zhuhai Shengchang",5651:"Calex",5653:"Rayrun",5655:"Jianbian",5656:"Matterize Labs",5661:"ACME",5663:"Fatboy",5668:"Zhenghui",5669:"United Electric",5695:"ADT",24582:"Google Home"};function Zy(e){return P3e[e]??`Vendor ${e}`}const j3e={Alexa:v0,Amazon:v0,Apple:Lk,Google:SZ,SmartThings:AZ,Samsung:EZ,IKEA:wZ,Tuya:Nk,Xiaomi:_Z,Aqara:xZ,Shelly:kZ,Meross:CZ},$3e={1:O3e,4107:R3e,4142:k3e,4321:EZ,4362:AZ,4417:Nk,4447:xZ,4448:v0,4469:C3e,4476:wZ,4488:T7,4631:v0,4701:Nk,4718:_Z,4745:_3e,4757:w3e,4911:I3e,4933:CZ,4937:Lk,4957:D3e,4987:v0,4993:v0,4996:Lk,5009:T7,5010:T7,5023:T3e,5248:M3e,5264:kZ,5420:E3e,5398:A3e,5427:S3e,24582:SZ};function L3e(e){const t=$3e[e.rootVendorId];return t||Object.entries(j3e).find(([n])=>e.label.toUpperCase().includes(n.toUpperCase()))?.[1]}const DZ=({fabric:e})=>{const t=_.useMemo(()=>L3e(e),[e]);return m.jsx(cn,{title:`${e.label||Zy(e.rootVendorId)} (0x${e.rootVendorId.toString(16).toUpperCase().padStart(4,"0")})`,arrow:!0,children:m.jsx(ce,{component:"span",sx:{fill:n=>n.palette.text.primary},children:t?m.jsx(t,{style:{height:"1.4em",width:"auto",maxWidth:"3em",display:"block"}}):m.jsx(x3e,{})})})},N3e=e=>m.jsx(m.Fragment,{children:e.fabrics.map(t=>m.jsxs(ce,{display:"flex",alignItems:"center",gap:1.5,py:.5,children:[m.jsx(DZ,{fabric:t}),m.jsx(ie,{variant:"body2",children:t.label||Zy(t.rootVendorId)})]},t.fabricId))});function Tu(){return{show:_.useContext(bX).show}}const F3e=({bridge:e})=>m.jsxs(dt,{container:!0,spacing:2,children:[e.featureFlags?.serverMode&&e.featureFlags?.vacuumOnOff===!1&&m.jsx(dt,{size:{xs:12},children:m.jsxs(vn,{severity:"warning",icon:m.jsx(Yd,{}),children:[m.jsx(q4,{children:"Vacuum OnOff Disabled (Alexa incompatible)"}),"Alexa ",m.jsx("strong",{children:"requires"})," the OnOff cluster (PowerController) for robotic vacuums. With OnOff disabled, the vacuum commissions but never appears in the Alexa app. Only disable this if you exclusively use ",m.jsx("strong",{children:"Apple Home"}),"."]})}),!e.featureFlags?.serverMode&&e.featureFlags?.vacuumOnOff&&m.jsx(dt,{size:{xs:12},children:m.jsxs(vn,{severity:"info",icon:m.jsx(Yd,{}),children:[m.jsx(q4,{children:"Vacuum OnOff Cluster Enabled (Alexa)"}),"OnOff cluster is active for Alexa PowerController compatibility. This may cause issues with ",m.jsx("strong",{children:"Apple Home"})," and"," ",m.jsx("strong",{children:"Google Home"}),"."]})}),m.jsx(dt,{size:{xs:12,md:4},children:m.jsx(B3e,{bridge:e})}),m.jsx(dt,{size:{xs:12,md:4},children:m.jsx(z3e,{bridge:e})}),m.jsx(dt,{size:{xs:12,md:4},children:m.jsx(H3e,{bridge:e})}),m.jsx(dt,{size:{xs:12},children:m.jsx(U3e,{bridge:e})}),m.jsx(dt,{size:{xs:12},children:m.jsx(W3e,{bridge:e})})]}),B3e=({bridge:e})=>{const[t,n]=_.useState(!1),[r,i]=_.useState(!1),o=Tu(),s=async()=>{i(!0);try{await C2e(e.id),n(!0)}catch(l){o.show({message:`Failed to open commissioning window: ${l instanceof Error?l.message:String(l)}`,severity:"error"})}finally{i(!1)}};if(!e.commissioning)return m.jsx(tr,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"grey.500"},children:m.jsx(F5,{})}),m.jsx(ie,{variant:"h6",children:"Pairing"})]}),m.jsx(ie,{color:"text.secondary",children:"Bridge is not running. Start the bridge to see pairing information."})]})});const a=l=>{navigator.clipboard.writeText(l)};return m.jsxs(m.Fragment,{children:[m.jsx(tr,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"primary.main"},children:m.jsx(F5,{})}),m.jsx(ie,{variant:"h6",children:"Pairing"})]}),m.jsxs(ce,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,children:[m.jsxs(ce,{position:"relative",children:[e.commissioning.isCommissioned&&m.jsx(ce,{position:"absolute",top:"50%",left:"50%",sx:{transform:"translate(-50%, -50%) rotate(-45deg)",zIndex:1},children:m.jsx(Et,{label:"Commissioned",color:"success",size:"small"})}),m.jsx(ce,{sx:{background:"white",padding:1,borderRadius:1,opacity:e.commissioning.isCommissioned?.5:1},children:m.jsx(JO,{value:e.commissioning.qrPairingCode,size:120})})]}),m.jsx(zt,{spacing:1,width:"100%",children:m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Manual Code:"}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:.5,children:[m.jsx(ie,{variant:"body2",fontFamily:"monospace",children:e.commissioning.manualPairingCode}),m.jsx(_n,{size:"small",onClick:()=>a(e.commissioning.manualPairingCode),children:m.jsx(Ah,{fontSize:"small"})})]})]})}),e.commissioning.isCommissioned&&m.jsx(kt,{variant:"outlined",size:"small",startIcon:r?m.jsx(zr,{size:16}):m.jsx(F5,{}),onClick:s,disabled:r,fullWidth:!0,children:r?"Opening Commissioning Window...":"Add Another Controller"})]})]})}),m.jsx(V3e,{bridge:e,open:t,onClose:()=>n(!1)})]})},z3e=({bridge:e})=>m.jsx(tr,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"info.main"},children:m.jsx(YO,{})}),m.jsx(ie,{variant:"h6",children:"Bridge Info"})]}),m.jsxs(zt,{spacing:1.5,children:[m.jsxs(ce,{children:[m.jsx(ie,{variant:"caption",color:"text.secondary",children:"Bridge ID"}),m.jsx(ie,{variant:"body2",fontFamily:"monospace",noWrap:!0,children:e.id})]}),m.jsx(gi,{}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Port"}),m.jsx(ie,{variant:"body2",fontWeight:"medium",children:e.port})]}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Devices"}),m.jsx(Et,{icon:m.jsx(Fs,{}),label:e.deviceCount,size:"small",color:"primary",variant:"outlined"})]}),e.commissioning&&m.jsxs(m.Fragment,{children:[m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Passcode"}),m.jsx(ie,{variant:"body2",fontFamily:"monospace",children:e.commissioning.passcode})]}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Discriminator"}),m.jsx(ie,{variant:"body2",fontFamily:"monospace",children:e.commissioning.discriminator})]})]})]})]})}),H3e=({bridge:e})=>{const t=e.commissioning?.fabrics??[],[n,r]=_.useState(!1),i=Tu(),o=async()=>{r(!0);try{const s=await LX(e.id);i.show({message:`Synced ${s.syncedCount} devices to controllers`,severity:"success"})}catch(s){i.show({message:`Force sync failed: ${s instanceof Error?s.message:String(s)}`,severity:"error"})}finally{r(!1)}};return m.jsx(tr,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:t.length>0?"success.main":"grey.500"},children:m.jsx(sZ,{})}),m.jsxs(ie,{variant:"h6",children:["Connected Fabrics (",t.length,")"]})]}),t.length===0?m.jsx(ie,{color:"text.secondary",children:"No controllers connected yet. Scan the QR code with your Matter controller to pair this bridge."}):m.jsxs(zt,{spacing:2,children:[m.jsx(N3e,{fabrics:t}),m.jsx(cn,{title:"Push all current device states to connected controllers",children:m.jsx(kt,{variant:"outlined",size:"small",startIcon:n?m.jsx(zr,{size:16}):m.jsx(dw,{}),onClick:o,disabled:n,fullWidth:!0,children:n?"Syncing...":"Force Sync"})})]})]})})},U3e=({bridge:e})=>{const t=hf(),n=e.filter.include.length>0||e.filter.exclude.length>0;return m.jsx(tr,{children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"warning.main"},children:m.jsx(uw,{})}),m.jsx(ie,{variant:"h6",sx:{flexGrow:1},children:"Entity Filters"}),m.jsx(cn,{title:n?"Edit Filters":"Add Filters",children:m.jsx(_n,{size:"small",onClick:()=>t(Pt.editBridge(e.id)),children:n?m.jsx(cw,{}):m.jsx(fc,{})})})]}),n?m.jsxs(zt,{direction:"row",spacing:1,flexWrap:"wrap",useFlexGap:!0,children:[e.filter.include.map(r=>m.jsx(Et,{size:"small",icon:m.jsx(fc,{}),label:m.jsxs("span",{children:[m.jsx("strong",{children:r.type}),": ",r.value]}),color:"success",variant:"outlined"},`include-${r.type}-${r.value}`)),e.filter.exclude.map(r=>m.jsx(Et,{size:"small",icon:m.jsx(oZ,{}),label:m.jsxs("span",{children:[m.jsx("strong",{children:r.type}),": ",r.value]}),color:"error",variant:"outlined"},`exclude-${r.type}-${r.value}`))]}):m.jsx(ie,{variant:"body2",color:"text.secondary",children:"No filters configured. All supported entities will be exposed."})]})})},V3e=({bridge:e,open:t,onClose:n})=>{if(!e.commissioning)return null;const r=i=>{navigator.clipboard.writeText(i)};return m.jsxs(vu,{open:t,onClose:n,maxWidth:"sm",fullWidth:!0,children:[m.jsx(Su,{children:m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,children:[m.jsx(F5,{}),"Add Another Controller"]})}),m.jsxs(xu,{children:[m.jsx(ie,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:"Scan this QR code with your Matter controller (Apple Home, Google Home, Alexa, etc.) to add this bridge to another ecosystem."}),m.jsx(ce,{display:"flex",justifyContent:"center",my:3,children:m.jsx(ce,{sx:{background:"white",padding:2,borderRadius:1},children:m.jsx(JO,{value:e.commissioning.qrPairingCode,size:200})})}),m.jsxs(zt,{spacing:1,children:[m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(ie,{variant:"body2",children:[m.jsx("strong",{children:"Manual Code:"})," ",e.commissioning.manualPairingCode]}),m.jsx(cn,{title:"Copy",children:m.jsx(_n,{size:"small",onClick:()=>r(e.commissioning.manualPairingCode),children:m.jsx(Ah,{fontSize:"small"})})})]}),m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(ie,{variant:"body2",children:[m.jsx("strong",{children:"Passcode:"})," ",e.commissioning.passcode]}),m.jsx(cn,{title:"Copy",children:m.jsx(_n,{size:"small",onClick:()=>r(e.commissioning.passcode.toString()),children:m.jsx(Ah,{fontSize:"small"})})})]}),m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(ie,{variant:"body2",children:[m.jsx("strong",{children:"Discriminator:"})," ",e.commissioning.discriminator]}),m.jsx(cn,{title:"Copy",children:m.jsx(_n,{size:"small",onClick:()=>r(e.commissioning.discriminator.toString()),children:m.jsx(Ah,{fontSize:"small"})})})]})]}),m.jsx(vn,{severity:"info",sx:{mt:2},children:m.jsx(ie,{variant:"body2",children:"Matter supports connecting the same bridge to multiple controllers simultaneously. Each controller will have independent control."})})]}),m.jsx(Xd,{children:m.jsx(kt,{onClick:n,children:"Close"})})]})},W3e=({bridge:e})=>{const t=e.failedEntities;return!t||t.length===0?null:m.jsx(tr,{children:m.jsx(gr,{children:m.jsxs(vn,{severity:"warning",icon:m.jsx(KO,{}),children:[m.jsxs(q4,{children:["Failed Entities (",t.length,")"]}),m.jsx(ie,{variant:"body2",component:"div",children:"The following entities could not be added to the bridge:"}),m.jsx(ce,{sx:{mt:1,maxHeight:200,overflow:"auto"},children:t.map(n=>m.jsxs(ce,{sx:{mb:.5},children:[m.jsx(ie,{variant:"body2",component:"span",fontWeight:"bold",children:n.entityId}),m.jsxs(ie,{variant:"body2",component:"span",color:"text.secondary",children:[" — ",n.reason]})]},n.entityId))})]})})})};var Vl;(function(e){e.Starting="starting",e.Running="running",e.Stopped="stopped",e.Failed="failed"})(Vl||(Vl={}));var Ar;(function(e){e.Pattern="pattern",e.Regex="regex",e.Domain="domain",e.Platform="platform",e.Label="label",e.EntityLabel="entity_label",e.DeviceLabel="device_label",e.Area="area",e.EntityCategory="entity_category",e.DeviceName="device_name",e.ProductName="product_name",e.DeviceClass="device_class"})(Ar||(Ar={}));const OZ=[{id:"all_lights",name:"All Lights",description:"Expose all light entities. Ideal for controlling lights via Apple Home, Google Home, or Alexa.",icon:"light",filter:{include:[{type:Ar.Domain,value:"light"}],exclude:[]},featureFlags:{autoBatteryMapping:!0},tags:["lights","popular"]},{id:"all_switches",name:"All Switches & Plugs",description:"Expose all switch entities including smart plugs. Includes power and energy monitoring.",icon:"switch",filter:{include:[{type:Ar.Domain,value:"switch"}],exclude:[]},featureFlags:{},tags:["switches","plugs"]},{id:"sensors_only",name:"All Sensors",description:"Expose temperature, humidity, pressure, and other sensors. Auto-combines related sensors from the same device.",icon:"sensor",filter:{include:[{type:Ar.Domain,value:"sensor"},{type:Ar.Domain,value:"binary_sensor"}],exclude:[]},featureFlags:{autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0},tags:["sensors","temperature","humidity"]},{id:"climate_control",name:"Climate & Covers",description:"Expose thermostats, fans, covers, and humidifiers for climate control.",icon:"climate",filter:{include:[{type:Ar.Domain,value:"climate"},{type:Ar.Domain,value:"fan"},{type:Ar.Domain,value:"cover"},{type:Ar.Domain,value:"humidifier"}],exclude:[]},featureFlags:{autoBatteryMapping:!0},tags:["climate","thermostat","covers"]},{id:"security",name:"Security & Locks",description:"Expose locks, alarm panels, and security-related binary sensors (motion, door, window).",icon:"lock",filter:{include:[{type:Ar.Domain,value:"lock"},{type:Ar.Domain,value:"alarm_control_panel"},{type:Ar.DeviceClass,value:"motion"},{type:Ar.DeviceClass,value:"door"},{type:Ar.DeviceClass,value:"window"}],exclude:[],includeMode:"any"},featureFlags:{autoBatteryMapping:!0},tags:["security","locks","alarm"]},{id:"robot_vacuum",name:"Robot Vacuum (Server Mode)",description:"Single vacuum bridge with Server Mode enabled. Required for Apple Home Siri commands and proper Alexa discovery. Add only ONE vacuum to this bridge.",icon:"vacuum",filter:{include:[{type:Ar.Domain,value:"vacuum"}],exclude:[]},featureFlags:{serverMode:!0},tags:["vacuum","server-mode","apple-home"]},{id:"media_players",name:"Media Players & Speakers",description:"Expose media players, speakers, and TVs for volume and playback control.",icon:"media_player",filter:{include:[{type:Ar.Domain,value:"media_player"}],exclude:[]},featureFlags:{},tags:["media","speakers","tv"]},{id:"google_home_optimized",name:"Google Home Optimized",description:"All devices with Auto Force Sync enabled. Prevents Google Home from showing devices as offline after a few hours.",icon:"default",filter:{include:[{type:Ar.Pattern,value:"*"}],exclude:[]},featureFlags:{autoForceSync:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0},tags:["google-home","all-devices"]},{id:"alexa_covers",name:"Alexa-Optimized Covers",description:"Covers with Alexa-friendly percentage display. Displayed percentage matches Home Assistant values.",icon:"cover",filter:{include:[{type:Ar.Domain,value:"cover"}],exclude:[]},featureFlags:{coverUseHomeAssistantPercentage:!0,autoBatteryMapping:!0},tags:["alexa","covers"]},{id:"automations_scripts",name:"Automations & Scripts",description:"Expose Home Assistant automations, scripts, and scenes as Matter switches.",icon:"remote",filter:{include:[{type:Ar.Domain,value:"automation"},{type:Ar.Domain,value:"script"},{type:Ar.Domain,value:"scene"}],exclude:[]},featureFlags:{},tags:["automations","scripts","scenes"]}];var CF;(function(e){e[e.locked=1]="locked",e[e.unlocked=2]="unlocked"})(CF||(CF={}));var EF;(function(e){e[e.Off=0]="Off",e[e.Low=1]="Low",e[e.Medium=2]="Medium",e[e.High=3]="High",e[e.On=4]="On",e[e.Auto=5]="Auto",e[e.Smart=6]="Smart"})(EF||(EF={}));var AF;(function(e){e[e.Forward=0]="Forward",e[e.Reverse=1]="Reverse"})(AF||(AF={}));var kF;(function(e){e[e.OffLowMedHigh=0]="OffLowMedHigh",e[e.OffLowHigh=1]="OffLowHigh",e[e.OffLowMedHighAuto=2]="OffLowMedHighAuto",e[e.OffLowHighAuto=3]="OffLowHighAuto",e[e.OffHighAuto=4]="OffHighAuto",e[e.OffHigh=5]="OffHigh"})(kF||(kF={}));var _F;(function(e){e[e.Stopped=0]="Stopped",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Error=3]="Error",e[e.SeekingCharger=64]="SeekingCharger",e[e.Charging=65]="Charging",e[e.Docked=66]="Docked"})(_F||(_F={}));var DF;(function(e){e[e.Off=0]="Off",e[e.Auto=1]="Auto",e[e.Cool=3]="Cool",e[e.Heat=4]="Heat",e[e.EmergencyHeat=5]="EmergencyHeat",e[e.Precooling=6]="Precooling",e[e.FanOnly=7]="FanOnly",e[e.Dry=8]="Dry",e[e.Sleep=9]="Sleep"})(DF||(DF={}));var Fk;(function(e){e.homeAssistantEntity="homeAssistantEntity",e.identify="identify",e.groups="groups",e.scenesManagement="scenesManagement",e.bridgedDeviceBasicInformation="bridgedDeviceBasicInformation",e.airQuality="airQuality",e.booleanState="booleanState",e.colorControl="colorControl",e.doorLock="doorLock",e.flowMeasurement="flowMeasurement",e.levelControl="levelControl",e.fanControl="fanControl",e.illuminanceMeasurement="illuminanceMeasurement",e.occupancySensing="occupancySensing",e.onOff="onOff",e.powerSource="powerSource",e.pressureMeasurement="pressureMeasurement",e.relativeHumidityMeasurement="relativeHumidityMeasurement",e.smokeCoAlarm="smokeCoAlarm",e.temperatureMeasurement="temperatureMeasurement",e.thermostat="thermostat",e.thermostatUserInterfaceConfiguration="thermostatUserInterfaceConfiguration",e.valveConfigurationAndControl="valveConfigurationAndControl",e.windowCovering="windowCovering",e.mediaInput="mediaInput",e.rvcCleanMode="rvcCleanMode",e.rvcRunMode="rvcRunMode",e.rvcOperationalState="rvcOperationalState",e.serviceArea="serviceArea",e.switch="switch",e.modeSelect="modeSelect"})(Fk||(Fk={}));var OF;(function(e){e.Battery="battery",e.BatteryCharging="battery_charging",e.CarbonMonoxide="carbon_monoxide",e.Cold="cold",e.Connectivity="connectivity",e.Door="door",e.GarageDoor="garage_door",e.Gas="gas",e.Heat="heat",e.Light="light",e.Lock="lock",e.Moisture="moisture",e.Motion="motion",e.Moving="moving",e.Occupancy="occupancy",e.Opening="opening",e.Plug="plug",e.Power="power",e.Presence="presence",e.Problem="problem",e.Running="running",e.Safety="safety",e.Smoke="smoke",e.Sound="sound",e.Tamper="tamper",e.Update="update",e.Vibration="vibration",e.Window="window"})(OF||(OF={}));var TF;(function(e){e.off="off",e.heat="heat",e.cool="cool",e.heat_cool="heat_cool",e.auto="auto",e.dry="dry",e.fan_only="fan_only"})(TF||(TF={}));var MF;(function(e){e.off="off",e.preheating="preheating",e.heating="heating",e.cooling="cooling",e.drying="drying",e.fan="fan",e.idle="idle",e.defrosting="defrosting"})(MF||(MF={}));var RF;(function(e){e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",e[e.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",e[e.FAN_MODE=8]="FAN_MODE",e[e.PRESET_MODE=16]="PRESET_MODE",e[e.SWING_MODE=32]="SWING_MODE",e[e.AUX_HEAT=64]="AUX_HEAT",e[e.TURN_OFF=128]="TURN_OFF",e[e.TURN_ON=256]="TURN_ON",e[e.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE"})(RF||(RF={}));var IF;(function(e){e.closed="closed",e.open="open",e.closing="closing",e.opening="opening"})(IF||(IF={}));var PF;(function(e){e.button="button",e.doorbell="doorbell",e.motion="motion"})(PF||(PF={}));var jF;(function(e){e.FORWARD="forward",e.REVERSE="reverse"})(jF||(jF={}));var $F;(function(e){e[e.SET_SPEED=1]="SET_SPEED",e[e.OSCILLATE=2]="OSCILLATE",e[e.DIRECTION=4]="DIRECTION",e[e.PRESET_MODE=8]="PRESET_MODE",e[e.TURN_OFF=16]="TURN_OFF",e[e.TURN_ON=32]="TURN_ON"})($F||($F={}));var LF;(function(e){e.UNKNOWN="unknown",e.ONOFF="onoff",e.BRIGHTNESS="brightness",e.COLOR_TEMP="color_temp",e.HS="hs",e.XY="xy",e.RGB="rgb",e.RGBW="rgbw",e.RGBWW="rgbww",e.WHITE="white"})(LF||(LF={}));var NF;(function(e){e.Tv="tv",e.Speaker="speaker",e.Receiver="receiver"})(NF||(NF={}));var FF;(function(e){e[e.PAUSE=1]="PAUSE",e[e.SEEK=2]="SEEK",e[e.VOLUME_SET=4]="VOLUME_SET",e[e.VOLUME_MUTE=8]="VOLUME_MUTE",e[e.PREVIOUS_TRACK=16]="PREVIOUS_TRACK",e[e.NEXT_TRACK=32]="NEXT_TRACK",e[e.TURN_ON=128]="TURN_ON",e[e.TURN_OFF=256]="TURN_OFF",e[e.PLAY_MEDIA=512]="PLAY_MEDIA",e[e.VOLUME_STEP=1024]="VOLUME_STEP",e[e.SELECT_SOURCE=2048]="SELECT_SOURCE",e[e.STOP=4096]="STOP",e[e.CLEAR_PLAYLIST=8192]="CLEAR_PLAYLIST",e[e.PLAY=16384]="PLAY",e[e.SHUFFLE_SET=32768]="SHUFFLE_SET",e[e.SELECT_SOUND_MODE=65536]="SELECT_SOUND_MODE",e[e.BROWSE_MEDIA=131072]="BROWSE_MEDIA",e[e.REPEAT_SET=262144]="REPEAT_SET",e[e.GROUPING=524288]="GROUPING",e[e.MEDIA_ANNOUNCE=1048576]="MEDIA_ANNOUNCE",e[e.MEDIA_ENQUEUE=2097152]="MEDIA_ENQUEUE"})(FF||(FF={}));var BF;(function(e){e.None="None",e.apparent_power="apparent_power",e.aqi="aqi",e.atmospheric_pressure="atmospheric_pressure",e.battery="battery",e.carbon_dioxide="carbon_dioxide",e.carbon_monoxide="carbon_monoxide",e.current="current",e.data_rate="data_rate",e.data_size="data_size",e.date="date",e.distance="distance",e.duration="duration",e.energy="energy",e.energy_storage="energy_storage",e.enum="enum",e.frequency="frequency",e.gas="gas",e.humidity="humidity",e.illuminance="illuminance",e.irradiance="irradiance",e.moisture="moisture",e.monetary="monetary",e.nitrogen_dioxide="nitrogen_dioxide",e.nitrogen_monoxide="nitrogen_monoxide",e.nitrous_oxide="nitrous_oxide",e.ozone="ozone",e.ph="ph",e.pm1="pm1",e.pm25="pm25",e.pm10="pm10",e.power_factor="power_factor",e.power="power",e.precipitation="precipitation",e.precipitation_intensity="precipitation_intensity",e.pressure="pressure",e.reactive_power="reactive_power",e.signal_strength="signal_strength",e.sound_pressure="sound_pressure",e.speed="speed",e.sulphur_dioxide="sulphur_dioxide",e.temperature="temperature",e.timestamp="timestamp",e.volatile_organic_compounds="volatile_organic_compounds",e.volatile_organic_compounds_parts="volatile_organic_compounds_parts",e.voltage="voltage",e.volume="volume",e.volume_flow_rate="volume_flow_rate",e.volume_storage="volume_storage",e.water="water",e.weight="weight",e.wind_speed="wind_speed"})(BF||(BF={}));var zF;(function(e){e.cleaning="cleaning",e.docked="docked",e.returning="returning",e.error="error",e.idle="idle",e.paused="paused",e.segment_cleaning="segment_cleaning",e.zone_cleaning="zone_cleaning",e.spot_cleaning="spot_cleaning",e.mop_cleaning="mop_cleaning"})(zF||(zF={}));var HF;(function(e){e[e.TURN_ON=1]="TURN_ON",e[e.TURN_OFF=2]="TURN_OFF",e[e.PAUSE=4]="PAUSE",e[e.STOP=8]="STOP",e[e.RETURN_HOME=16]="RETURN_HOME",e[e.FAN_SPEED=32]="FAN_SPEED",e[e.BATTERY=64]="BATTERY",e[e.STATUS=128]="STATUS",e[e.SEND_COMMAND=256]="SEND_COMMAND",e[e.LOCATE=512]="LOCATE",e[e.CLEAN_SPOT=1024]="CLEAN_SPOT",e[e.MAP=2048]="MAP",e[e.STATE=4096]="STATE",e[e.START=8192]="START"})(HF||(HF={}));var UF;(function(e){e.off="off",e.low="low",e.medium="medium",e.high="high",e.turbo="turbo",e.auto="auto",e.max="max"})(UF||(UF={}));var VF;(function(e){e.off="off",e.eco="eco",e.electric="electric",e.gas="gas",e.heat_pump="heat_pump",e.high_demand="high_demand",e.performance="performance"})(VF||(VF={}));var WF;(function(e){e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.OPERATION_MODE=2]="OPERATION_MODE",e[e.AWAY_MODE=4]="AWAY_MODE",e[e.ON_OFF=8]="ON_OFF"})(WF||(WF={}));const qF={air_purifier:"Air Purifier",air_quality_sensor:"Air Quality Sensor",basic_video_player:"Basic Video Player (TV)",battery_storage:"Battery Sensor",color_dimmer_switch:"Color Dimmer Switch",color_temperature_light:"Color Temperature Light",contact_sensor:"Contact Sensor",dimmable_light:"Dimmable Light",dimmable_plugin_unit:"Dimmable Plug-in Unit",dimmer_switch:"Dimmer Switch",door_lock:"Door Lock",extended_color_light:"Extended Color Light",fan:"Fan",flow_sensor:"Flow Sensor",generic_switch:"Generic Switch (Button)",humidifier_dehumidifier:"Humidifier/Dehumidifier",humidity_sensor:"Humidity Sensor",light_sensor:"Light Sensor",mode_select:"Mode Select",occupancy_sensor:"Occupancy Sensor",on_off_light:"On/Off Light",on_off_plugin_unit:"On/Off Plug-in Unit",on_off_switch:"On/Off Switch",pressure_sensor:"Pressure Sensor",pump:"Pump",robot_vacuum_cleaner:"Robot Vacuum Cleaner",smoke_co_alarm:"Smoke/CO Alarm",speaker:"Speaker",temperature_sensor:"Temperature Sensor",thermostat:"Thermostat",tvoc_sensor:"TVOC / VOC Index Sensor",water_heater:"Water Heater",water_freeze_detector:"Water Freeze Detector",water_leak_detector:"Water Leak Detector",water_valve:"Water Valve",window_covering:"Window Covering"},f1={Auto:0,Quick:1,Quiet:2,LowNoise:3,LowEnergy:4,Vacation:5,Min:6,Max:7,Night:8,Day:9,DeepClean:16384,Vacuum:16385,Mop:16386,VacuumThenMop:16387},q3e={alarm_control_panel:["mode_select","on_off_plugin_unit"],automation:["on_off_switch"],binary_sensor:["contact_sensor","occupancy_sensor","smoke_co_alarm","water_freeze_detector","water_leak_detector"],button:["generic_switch"],climate:["thermostat"],cover:["window_covering"],event:["generic_switch"],fan:["air_purifier","fan"],humidifier:["humidifier_dehumidifier"],input_boolean:["on_off_plugin_unit","on_off_switch"],input_select:["mode_select"],input_button:["generic_switch"],light:["color_temperature_light","dimmable_light","extended_color_light","on_off_light"],lock:["door_lock"],media_player:["basic_video_player","on_off_switch","speaker"],scene:["on_off_switch"],script:["on_off_switch"],sensor:["air_quality_sensor","battery_storage","humidity_sensor","light_sensor","pressure_sensor","temperature_sensor","tvoc_sensor"],select:["mode_select"],switch:["on_off_plugin_unit","on_off_switch","pump","water_valve"],vacuum:["robot_vacuum_cleaner"],valve:["water_valve","on_off_plugin_unit"],water_heater:["water_heater","thermostat"]};var GF;(function(e){e.alarm_control_panel="alarm_control_panel",e.automation="automation",e.button="button",e.binary_sensor="binary_sensor",e.climate="climate",e.cover="cover",e.event="event",e.fan="fan",e.humidifier="humidifier",e.input_boolean="input_boolean",e.input_button="input_button",e.input_select="input_select",e.light="light",e.lock="lock",e.media_player="media_player",e.remote="remote",e.scene="scene",e.select="select",e.script="script",e.sensor="sensor",e.switch="switch",e.vacuum="vacuum",e.valve="valve",e.water_heater="water_heater"})(GF||(GF={}));const KF={type:"object",default:{type:"",value:""},properties:{type:{title:"Type",type:"string",oneOf:[{const:"pattern",title:"pattern",description:"Wildcard pattern matching entity IDs. Use * as wildcard. Example: 'light.living_room_*' matches all lights in the living room."},{const:"regex",title:"regex",description:"Full regular expression matching entity IDs. Use ^ and $ for anchors. Example: '^(light|switch)\\.kitchen_.*' matches all kitchen lights and switches."},{const:"domain",title:"domain",description:"Match entities by their domain (the part before the dot). Example: 'light', 'switch', 'sensor'."},{const:"platform",title:"platform",description:"Match entities by their integration/platform. Example: 'hue', 'zwave', 'mqtt'."},{const:"entity_label",title:"entity_label",description:"Matches only entities that have this label assigned directly. Other entities of the same device are NOT included."},{const:"device_label",title:"device_label",description:"Matches ALL entities of a device if the device has this label. Use this to include a complete device with all its entities."},{const:"area",title:"area",description:"Match entities by their area slug. Example: 'living_room', 'bedroom'."},{const:"entity_category",title:"entity_category",description:"Match entities by their category. Example: 'config', 'diagnostic' to exclude configuration entities."},{const:"device_name",title:"device_name",description:"Match entities by their device name. Supports wildcards. Example: '*Philips*' matches all Philips devices."},{const:"product_name",title:"product_name",description:"Match entities by their product/model name. Supports wildcards. Example: 'Hue*Bulb'."},{const:"device_class",title:"device_class",description:"Match entities by their device class attribute. Example: 'temperature', 'motion', 'door', 'window'."}]},value:{title:"Value",description:"For labels, use the display name or the label_id (slug). You can look up both on the Labels page in the sidebar.",type:"string",minLength:1}},required:["type","value"],additionalProperties:!1},G3e={title:"Include or exclude entities",type:"object",properties:{include:{title:"Include",type:"array",items:KF},exclude:{title:"Exclude",type:"array",items:KF},includeMode:{title:"Include Mode",type:"string",description:"How to combine include rules: 'any' matches if ANY rule matches (OR), 'all' matches only if ALL rules match (AND). Default: 'any'",enum:["any","all"],default:"any"}},required:["include","exclude"],additionalProperties:!1},K3e={title:"Feature Flags",type:"object",properties:{coverDoNotInvertPercentage:{title:"Do not invert Percentages for Covers",description:"Do not invert the percentage of covers to match Home Assistant (not Matter compliant)",type:"boolean",default:!1},coverUseHomeAssistantPercentage:{title:"Use Home Assistant Percentage for Covers (Alexa-friendly)",description:"Display cover percentages matching Home Assistant values in Matter controllers like Alexa. This makes the displayed percentage match what you see in Home Assistant, but the semantic meaning differs: in HA, higher percentage = more open; in Alexa, higher percentage is typically interpreted as more closed. Open/Close commands will still work correctly.",type:"boolean",default:!1},coverSwapOpenClose:{title:"Swap Open/Close for Covers",description:"Swap open/close commands and invert position reporting for covers. Enable this if Alexa voice commands are reversed (saying 'close' opens the blinds and vice versa).",type:"boolean",default:!1},includeHiddenEntities:{title:"Include Hidden Entities",description:"Include entities that are marked as hidden in Home Assistant",type:"boolean",default:!1},alexaPreserveBrightnessOnTurnOn:{title:"Alexa: Preserve Brightness on Turn-On (Deprecated)",description:"This workaround is now always active and this setting has no effect. The bridge automatically ignores brightness commands that set lights to 100% immediately after a turn-on command.",type:"boolean",default:!0},serverMode:{title:"Server Mode (for Robot Vacuums)",description:"Expose the device as a standalone Matter device instead of a bridged device. This is required for Apple Home to properly support Siri voice commands for Robot Vacuums. IMPORTANT: Only ONE device should be in this bridge when server mode is enabled.",type:"boolean",default:!1},autoBatteryMapping:{title:"Auto Battery Mapping",description:"Automatically assign battery sensors from the same Home Assistant device to the main entity. When enabled, battery sensors will be merged into their parent devices instead of appearing as separate devices.",type:"boolean",default:!1},autoHumidityMapping:{title:"Auto Humidity Mapping",description:"Automatically combine humidity sensors with temperature sensors from the same Home Assistant device. When enabled, humidity sensors will be merged into temperature sensors to create combined TemperatureHumiditySensor devices.",type:"boolean",default:!0},autoPressureMapping:{title:"Auto Pressure Mapping",description:"Automatically combine pressure sensors with temperature sensors from the same Home Assistant device. When enabled, pressure sensors will be merged into temperature sensors to create combined sensor devices.",type:"boolean",default:!0},autoComposedDevices:{title:"Auto Composed Devices",description:"Master toggle: automatically combine related entities from the same Home Assistant device into single Matter endpoints. Enables battery, humidity, pressure, power, and energy auto-mapping at once. This provides a cleaner device experience in Matter controllers (e.g., a Shelly Plug appears as one device with power monitoring).",type:"boolean",default:!1},autoForceSync:{title:"Auto Force Sync",description:"Periodically compare and push all device states to connected controllers every 90 seconds. Enable this if devices get out of sync after extended periods. Health checks for dead sessions always run regardless of this setting.",type:"boolean",default:!1},vacuumOnOff:{title:"Vacuum: Include OnOff Cluster (Alexa)",description:"Add an OnOff cluster to robot vacuum endpoints. Alexa REQUIRES this (PowerController) to show robotic vacuums in the app. Without it, Alexa commissions the device but never displays it. In Server Mode this is enabled automatically — only check this for bridge mode. WARNING: OnOff is NOT part of the Matter RVC device type specification. Enabling this may break Apple Home (shows 'Updating') and Google Home.",type:"boolean"},vacuumMinimalClusters:{title:"Vacuum: Minimal Clusters (Alexa troubleshooting)",description:"Strip the vacuum endpoint to only the clusters required by the Matter RVC spec. Removes PowerSource (battery) and the default ServiceArea placeholder. Enable this if Alexa commissions the vacuum but the device never appears in the app. Trade-off: battery percentage will not be reported to Matter controllers.",type:"boolean",default:!1}},additionalProperties:!1},cy={type:"object",title:"Bridge Config",properties:{name:{title:"Name",type:"string",minLength:1,maxLength:32},port:{title:"Port",type:"number",minimum:1},icon:{title:"Icon",type:"string",description:"Icon to display for this bridge in the UI",enum:["light","switch","climate","cover","fan","lock","sensor","media_player","vacuum","remote","humidifier","speaker","garage","door","window","motion","battery","power","camera","default"]},countryCode:{title:"Country Code",type:"string",description:"An ISO 3166-1 alpha-2 code to represent the country in which the Node is located. Only needed if the commissioning fails due to missing country code.",minLength:2,maxLength:3},priority:{title:"Startup Priority",type:"number",description:"Startup order priority. Lower values start first. Default is 100.",default:100,minimum:1,maximum:999},filter:G3e,featureFlags:K3e},required:["name","port","filter"],additionalProperties:!1};({...cy,properties:{...cy.properties},required:[...cy?.required??[]]});const Y3e={[Vl.Failed]:"error",[Vl.Stopped]:"warning",[Vl.Starting]:"info",[Vl.Running]:"success"},X3e=({status:e,reason:t})=>{if(t)return m.jsx(vn,{severity:Y3e[e],variant:"outlined",children:t})},Mu=_e(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),vf=_e(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),Z3e=_e(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 14H9V8h2zm4 0h-2V8h2z"})),J3e={[Vl.Starting]:{label:"Starting",color:"info",icon:m.jsx(dw,{fontSize:"small"})},[Vl.Running]:{label:"Running",color:"success",icon:m.jsx(Mu,{fontSize:"small"})},[Vl.Stopped]:{label:"Stopped",color:"warning",icon:m.jsx(Z3e,{fontSize:"small"})},[Vl.Failed]:{label:"Failed",color:"error",icon:m.jsx(vf,{fontSize:"small"})}},TZ=({status:e,reason:t})=>{const n=J3e[e],r=m.jsx(Et,{icon:n.icon,label:n.label,size:"small",color:n.color,variant:"filled",sx:{fontWeight:500}});return t?m.jsx(cn,{title:t,children:r}):r},MZ=_e(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4M13 18h-2v-2h2zm0-4h-2V9h2z"})),RZ=_e(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4M11 20v-5.5H9L13 7v5.5h2z"})),Bk=_e(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4"})),Jy=_e(m.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"})),QO=_e([m.jsx("path",{d:"M15.11 12.45 14 10.24l-3.11 6.21c-.16.34-.51.55-.89.55s-.73-.21-.89-.55L7.38 13H2v5c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-5h-6c-.38 0-.73-.21-.89-.55"},"0"),m.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v5h6c.38 0 .73.21.89.55L10 13.76l3.11-6.21c.34-.68 1.45-.68 1.79 0L16.62 11H22V6c0-1.1-.9-2-2-2"},"1")]);function Q3e(e){return Qe("MuiLinearProgress",e)}tt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const zk=4,Hk=pf`
|
|
163
|
+
`),_.createElement("clipPath",{id:"clippath"},_.createElement("path",{className:"cls-1",d:"M152.8,32.08h-6.03V12.37c0-.27-.22-.49-.49-.49h-9.76c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49h5.28v15.63h-6.03c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49h17.02c.27,0,.49-.22.49-.49v-3.59c0-.27-.22-.49-.49-.49ZM119.4,11.55c-2.76,0-5.17,1.2-6.76,3.04v-2.22c0-.27-.22-.49-.49-.49h-3.99c-.27,0-.49.22-.49.49v23.79c0,.27.22.49.49.49h3.99c.27,0,.49-.22.49-.49v-13.83c0-3.47,2.43-6.2,5.75-6.2,2.96,0,4.81,1.77,5.33,4.08.13.6.21,1.5.21,2.24v13.72c0,.27.22.49.49.49h3.99c.27,0,.49-.22.49-.49v-12.78c0-1.99-.09-2.88-.23-3.9-.67-4.51-4.29-7.93-9.26-7.93ZM24.16,15.84c2.71,0,4.28,1.34,4.7,3.59.05.28.29.48.57.48h4.08c.29,0,.52-.26.48-.55-.63-5.02-4.72-7.97-9.72-7.97-4.7,0-9.24,2.57-9.24,7.68,0,4.22,3.14,6.1,6.72,6.96l3.95.92c2.01.48,3.32,1.34,3.32,2.83,0,2.04-2.09,2.85-4.33,2.85-2.92,0-4.6-1.29-5.02-3.69-.05-.29-.3-.5-.59-.5h-4.05c-.29,0-.52.25-.48.54.65,5.4,5.16,8.14,9.96,8.14,4.69,0,9.66-2.41,9.66-7.88,0-3.59-2.32-5.74-6.77-6.78l-3.83-.89c-1.46-.33-3.42-1.01-3.42-2.88,0-1.8,1.64-2.85,4.02-2.85ZM48.68,24.28c0,13.74-10.55,24.16-24.34,24.16S0,38.01,0,24.28C0,11.45,9.22,1.37,21.88,0c.29-.03.54.19.54.48v3.67c0,.29-.22.54-.51.58C11.97,6.03,4.87,14.14,4.87,24.32c0,11.05,8.36,19.53,19.47,19.53,11.11,0,19.47-8.48,19.47-19.53,0-10.18-7.13-18.3-17.04-19.59-.29-.04-.51-.28-.51-.58V.49c0-.29.25-.51.54-.48,12.66,1.37,21.88,11.44,21.88,24.27ZM155.55,16.45h5.07v19.71c0,.27.22.49.49.49h3.99c.27,0,.49-.22.49-.49v-19.71h7.39c.27,0,.49-.22.49-.49v-3.59c0-.27-.22-.49-.49-.49h-7.39v-3.22c0-2.47,1.59-3.65,3.61-3.65,1.52,0,3.03.58,4.28,1.48.31.22.73,0,.73-.38v-3.62c0-.27-.14-.52-.37-.66-1.45-.89-3.19-1.41-5.17-1.41-4.65,0-8.04,3.09-8.04,8.25v3.22h-5.07c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49ZM62.17,8.47c2.04,0,3.71-1.67,3.71-3.76,0-2.07-1.67-3.71-3.71-3.71s-3.71,1.64-3.71,3.71c0,2.09,1.67,3.76,3.71,3.76ZM143.95,8.47c2.04,0,3.71-1.67,3.71-3.76s-1.67-3.71-3.71-3.71-3.71,1.64-3.71,3.71c0,2.09,1.67,3.76,3.71,3.76ZM71.02,32.08h-6.03V12.37c0-.27-.22-.49-.49-.49h-9.76c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49h5.28v15.63h-6.03c-.27,0-.49.22-.49.49v3.59c0,.27.22.49.49.49h17.02c.27,0,.49-.22.49-.49v-3.59c0-.27-.22-.49-.49-.49ZM185.95,35.65l-1.51,3.8c-.79,2-1.95,2.91-3.31,2.91-1.07,0-2.39-.44-3.52-1.46-.28-.26-.73-.06-.73.32v4.21c.02.27.16.53.39.67,1.21.72,2.51,1.12,4.03,1.12,3.85,0,6.35-2.38,8.25-7.36l10.41-27.32c.12-.32-.11-.66-.45-.66h-4.14c-.33,0-.62.2-.73.51l-6.21,17.07-6.7-17.09c-.12-.3-.4-.49-.72-.49h-4.23c-.35,0-.58.35-.45.67l9.62,23.09ZM98.39,11.88h-3.9c-.27,0-.49.22-.49.49v2.08c-1.13-1.31-2.65-2.25-4.66-2.65-.27-.05-.52.15-.52.43v3.81c0,.27.17.5.43.58,3.09.95,4.87,3.87,4.87,7.52,0,4.52-2.66,7.88-7.01,7.88-3.99,0-7.06-3.36-7.06-7.91,0-3.42,1.76-6.36,4.56-7.43.23-.09.39-.32.39-.57v-3.87c0-.28-.26-.49-.53-.43-5.61,1.28-9.45,6.17-9.45,12.41,0,7.17,4.76,12.37,11.46,12.37,3.35,0,5.79-1.3,7.44-3.33v3.21c0,1.09-.13,1.95-.35,2.7-.67,2.27-2.67,3.78-5.67,3.78-2.98,0-5.1-1.41-5.69-4.01-.06-.24-.28-.41-.52-.41h-3.99c-.29,0-.52.26-.48.55.84,5.76,5.31,8.48,10.6,8.48,5.08,0,9.42-2.56,10.64-7.34.29-1.12.44-2.96.44-4.29V12.37c0-.27-.22-.49-.49-.49Z"})),_.createElement("linearGradient",{id:"Naamloos_verloop_7","data-name":"Naamloos verloop 7",x1:-48.59,y1:128.26,x2:186.52,y2:-36.37,gradientUnits:"userSpaceOnUse"},_.createElement("stop",{offset:.5,stopColor:"#00e487"}),_.createElement("stop",{offset:1,stopColor:"#1ecbd0"}))),_.createElement("g",{className:"cls-3"},_.createElement("rect",{className:"cls-2",width:200,height:48.44}))),T7=e=>_.createElement("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("title",null,"TP-Link"),_.createElement("path",{d:"M15.185 0C10.218 0 6.25 3.984 6.25 8.903V10.8h4.99V8.903c0-2.135 1.736-3.863 3.946-3.863 2.187 0 3.708 1.536 3.708 3.815 0 2.257-1.64 3.912-3.827 3.912h-1.878v5.039h1.878c4.874 0 8.819-4.007 8.819-8.952C23.885 3.72 20.2 0 15.185 0zM.115 12.6v4.103c0 .624.523 1.248 1.236 1.248h4.753v4.801c0 .624.523 1.248 1.236 1.248h4.065V12.6Z"})),Nk=e=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2000.000000pt",height:"1000.000000pt",viewBox:"0 0 2000.000000 1000.000000",preserveAspectRatio:"xMidYMid meet",...e},_.createElement("g",{transform:"translate(0.000000,1000.000000) scale(0.100000,-0.100000)",fill:"#000000",stroke:"none"},_.createElement("path",{d:"M214 9972 c-78 -27 -142 -88 -182 -172 -16 -33 -17 -289 -20 -3655 -2 -2604 0 -3659 8 -3760 34 -430 121 -759 286 -1083 332 -650 912 -1075 1680 -1231 328 -66 -433 -61 9102 -61 7915 0 8652 1 8696 16 60 21 147 100 177 161 l24 48 0 3700 c0 3520 -1 3707 -18 3840 -55 422 -181 789 -380 1112 -173 279 -448 550 -728 718 -317 189 -636 299 -1059 362 -108 16 -626 18 -8825 20 -8317 2 -8712 2 -8761 -15z m17121 -1089 c446 -67 853 -276 1161 -595 290 -300 477 -684 541 -1106 19 -129 22 -413 5 -526 -20 -133 -77 -212 -192 -264 -147 -68 -330 2 -406 156 -17 33 -19 58 -16 222 3 201 -8 331 -39 453 -67 265 -191 479 -385 666 -199 192 -424 309 -692 361 -275 53 -508 30 -791 -80 -108 -41 -142 -50 -194 -50 -172 0 -294 117 -305 291 -8 129 40 223 143 283 164 97 481 186 735 206 121 10 306 3 435 -17z m-135 -1188 c354 -86 627 -356 727 -720 24 -87 27 -118 28 -245 0 -139 -1 -148 -29 -207 -55 -121 -157 -187 -286 -188 -95 0 -168 33 -234 106 -60 66 -76 119 -76 244 0 194 -68 309 -224 381 -83 38 -164 41 -261 10 -132 -42 -168 -47 -227 -35 -105 23 -182 83 -226 179 -74 159 -6 336 161 418 180 88 427 110 647 57z m-14089 -45 c139 -26 263 -123 327 -257 l37 -78 -2 -265 c-1 -146 -4 -311 -8 -367 l-6 -103 689 0 c649 0 694 -1 751 -19 149 -46 267 -168 305 -316 59 -223 -53 -454 -270 -562 l-78 -38 -712 -3 -712 -3 -6 -72 c-10 -121 -31 -773 -30 -927 0 -114 5 -164 22 -233 81 -326 319 -564 643 -643 61 -15 136 -19 444 -24 398 -7 402 -7 500 -64 62 -37 142 -128 178 -203 30 -65 32 -74 32 -188 0 -118 -1 -121 -37 -198 -53 -110 -128 -186 -237 -240 l-85 -42 -425 0 c-443 0 -462 1 -646 47 -193 47 -383 132 -562 250 -151 101 -362 312 -462 462 -160 241 -254 484 -296 764 -17 112 -19 386 -5 722 5 124 12 307 16 407 l7 182 -290 3 -289 3 -75 37 c-331 164 -350 616 -35 820 110 71 151 78 457 78 l269 0 0 113 c0 247 20 550 40 617 70 234 314 384 551 340z m12624 -1019 c66 -12 172 -37 235 -57 145 -44 388 -164 503 -247 371 -268 618 -648 719 -1108 21 -96 23 -128 23 -429 0 -380 -31 -1310 -46 -1390 -38 -193 -216 -363 -409 -389 -246 -33 -474 128 -520 367 -7 37 -5 170 5 440 43 1141 43 1136 -9 1290 -61 178 -189 347 -341 452 -62 43 -196 104 -270 125 -81 22 -290 31 -384 16 -381 -60 -704 -368 -782 -746 -93 -452 149 -890 574 -1036 81 -28 210 -49 297 -49 149 0 297 -83 381 -212 82 -128 93 -302 26 -442 -59 -125 -156 -214 -284 -262 -66 -25 -74 -26 -238 -21 -479 13 -917 207 -1243 552 -121 128 -209 256 -291 420 -104 210 -154 378 -181 610 -61 539 142 1121 534 1532 324 339 732 545 1196 602 117 15 368 6 505 -18z m-9341 -130 c98 -48 177 -126 223 -218 25 -52 28 -71 32 -174 1 -64 -7 -409 -19 -765 -29 -839 -25 -945 45 -1130 80 -213 222 -352 430 -421 71 -23 96 -26 220 -27 149 0 180 5 305 55 235 93 407 336 465 654 14 79 31 428 59 1261 13 371 17 416 36 474 93 276 404 416 656 296 130 -62 224 -178 256 -316 12 -52 11 -76 -23 -1015 -26 -740 -37 -854 -109 -1123 -92 -344 -272 -646 -509 -855 -306 -269 -757 -406 -1244 -376 -461 28 -806 171 -1083 447 -230 229 -375 533 -446 937 -21 118 -23 158 -22 440 1 171 6 425 12 565 7 140 16 399 22 575 6 176 15 345 21 375 23 118 121 255 227 317 93 55 167 74 270 70 85 -4 100 -8 176 -46z m3885 30 c148 -46 263 -164 307 -316 13 -47 15 -82 10 -175 -3 -63 -15 -281 -26 -485 -46 -866 -51 -980 -40 -1082 22 -207 90 -383 192 -498 212 -237 608 -284 907 -106 154 91 270 247 341 459 54 162 60 225 95 912 32 647 46 877 55 923 22 108 110 232 214 301 29 19 89 47 132 62 69 23 90 26 166 21 74 -4 99 -10 163 -41 146 -69 242 -204 252 -355 5 -74 -7 -402 -27 -726 -5 -82 -21 -377 -35 -655 -14 -278 -32 -622 -40 -765 -8 -143 -21 -402 -30 -575 -8 -173 -20 -366 -25 -429 -26 -290 -125 -564 -288 -801 -79 -115 -274 -311 -390 -394 -266 -188 -597 -320 -932 -371 -152 -23 -384 -31 -461 -16 -227 45 -387 273 -352 502 38 240 249 428 483 429 186 1 410 45 547 110 212 99 339 236 409 442 23 70 43 178 31 178 -3 0 -24 -16 -46 -35 -113 -94 -281 -175 -419 -201 -392 -75 -837 8 -1157 217 -298 193 -520 491 -639 854 -96 294 -113 528 -80 1090 17 293 31 571 44 850 13 279 20 320 66 413 105 213 358 330 573 263z"}))),_Z=e=>_.createElement("svg",{role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("title",null,"Xiaomi"),_.createElement("path",{d:"M12 0C8.016 0 4.756.255 2.493 2.516.23 4.776 0 8.033 0 12.012c0 3.98.23 7.235 2.494 9.497C4.757 23.77 8.017 24 12 24c3.983 0 7.243-.23 9.506-2.491C23.77 19.247 24 15.99 24 12.012c0-3.984-.233-7.243-2.502-9.504C19.234.252 15.978 0 12 0zM4.906 7.405h5.624c1.47 0 3.007.068 3.764.827.746.746.827 2.233.83 3.676v4.54a.15.15 0 0 1-.152.147h-1.947a.15.15 0 0 1-.152-.148V11.83c-.002-.806-.048-1.634-.464-2.051-.358-.36-1.026-.441-1.72-.458H7.158a.15.15 0 0 0-.151.147v6.98a.15.15 0 0 1-.152.148H4.906a.15.15 0 0 1-.15-.148V7.554a.15.15 0 0 1 .15-.149zm12.131 0h1.949a.15.15 0 0 1 .15.15v8.892a.15.15 0 0 1-.15.148h-1.949a.15.15 0 0 1-.151-.148V7.554a.15.15 0 0 1 .151-.149zM8.92 10.948h2.046c.083 0 .15.066.15.147v5.352a.15.15 0 0 1-.15.148H8.92a.15.15 0 0 1-.152-.148v-5.352a.15.15 0 0 1 .152-.147Z"})),I3e=e=>_.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 320 512",...e},_.createElement("path",{d:"M129.5 512V345.9L18.5 48h55.8l81.8 229.7L250.2 0h51.3L180.8 347.8V512h-51.3z"})),P3e={1:"Panasonic",4107:"Signify",4125:"Fortune Brands",4129:"Legrand",4142:"LG Electronics",4151:"NXP Semiconductors",4161:"STMicroelectronics",4169:"Silicon Labs",4190:"Schneider Electric",4216:"ntve home",4240:"Green Energy Options",4251:"Leviton",4304:"Qorvo",4321:"Samsung",4334:"UEI",4338:"ubisys",4362:"Samsung SmartThings",4381:"Comcast",4388:"Jasco Products",4405:"dresden elektronik",4417:"Tuya",4442:"LG ThinQ",4447:"Aqara",4448:"Amazon Alexa",4454:"Innr",4456:"Leedarson",4469:"D-Link",4472:"WNC Corporation",4474:"Insta GmbH",4476:"IKEA",4478:"Feibit",4488:"TP-Link",4489:"LEDVANCE",4492:"Midea",4501:"CommScope",4614:"EME Americas",4617:"Bosch",4619:"HEIMAN",4631:"Amazon Alexa",4633:"ORVIBO",4644:"Sunricher",4653:"AduroSmart",4662:"Allegion",4673:"Samjin",4689:"Neonlite",4701:"Tuya",4711:"ARC Technology",4718:"Xiaomi",4724:"Trust International",4735:"Nordic Semiconductor",4736:"Siterwell",4738:"SEI Robotics",4741:"Hager",4742:"CoolKit",4745:"Lidl",4746:"Changhong Network",4751:"EGLO",4757:"AVM",4762:"Delta Dore Rademacher",4767:"Level Home",4874:"Eve",4876:"EVVR",4877:"BouffaloLab",4882:"Yeelight",4886:"Realtek",4889:"Mitsubishi Electric",4890:"Resideo",4891:"Espressif",4892:"HELLA",4894:"CAME",4895:"Longan.link",4897:"SONOFF",4903:"Mill International",4910:"Energetic",4911:"Yandex",4915:"Becker Antriebe",4916:"TCL",4917:"Dexatek",4921:"GE Lighting",4923:"WAREMA",4927:"ASR",4930:"Beken",4932:"Eltako",4933:"Meross",4934:"Rafael",4937:"Apple Home",4938:"Rollease Acmeda",4939:"Home Assistant",4940:"Simon",4942:"tado°",4943:"mediola",4945:"HooRii Technology",4946:"Häfele",4950:"Lennox",4952:"TPV",4953:"GOQUAL",4954:"SIEGENIA",4957:"Nuki",4961:"Inovelli",4962:"deveritec",4965:"Dooya",4969:"BHtronics",4972:"Onewish",4974:"Ambi Labs",4977:"Tridonic",4978:"innovation matters",4987:"Amazon Basics",4991:"NEO",4993:"Amazon Prime Video",4994:"ION INDUSTRIES",4996:"Apple (iCloud Keychain)",4998:"Skylux",4999:"Govee",5e3:"Infineon",5002:"Nature",5003:"ULTRON",5004:"Hisense",5006:"Twinkly",5009:"Kasa",5010:"Tapo",5014:"AiDot",5015:"SwitchBot",5019:"ITIUS",5020:"Zemismart",5022:"Dyson",5023:"Razer",5120:"Uascent",5123:"Grid Connect",5124:"Phaten",5125:"Ecovacs",5127:"ThirdReality",5128:"VELUX",5131:"70mai",5136:"Quectel",5137:"Freedompro",5138:"SMARTWIZ",5139:"1Home",5141:"Nanoleaf (Caveman)",5142:"Nanoleaf (Umbra)",5143:"Konnected",5144:"Klite",5145:"Lorex",5147:"Rang Dong",5149:"Secuyou",5150:"arre home",5151:"Ductech",5152:"EcoFlow",5153:"Kwikset",5155:"Feit Electric",5158:"ELEGRP",5159:"Hama",5161:"Albrecht Jung",5163:"LETIANPAI",5165:"QIHANG",5167:"QIACHIP",5168:"L-TRADE",5170:"ELKO EP",5171:"MOMAX",5174:"SinuxSoft",5175:"ACCEL LAB",5176:"Topstar Lighting",5181:"Onvis",5184:"VerLuce",5185:"Snowball",5186:"REHAU",5187:"Goods iQ",5189:"Finesse Decor",5190:"TAKE AS GLOBAL",5192:"LivingStyle",5193:"Lloyd's",5196:"TrustAsia",5197:"Atios",5199:"Yale",5202:"Big Ass Fans",5205:"MagentaHome",5207:"Wistar",5212:"Lockly",5213:"Hosiden",5215:"Good Way Technology",5216:"lipro",5217:"Xinda",5218:"Energy Magic Cube",5219:"Eberle",5221:"Hunter Douglas",5222:"Hemos Lighting",5224:"Anona Security",5226:"Intecular",5229:"Polyaire",5230:"SMART",5231:"SmartWings",5232:"HOPERF",5234:"Jiecang",5235:"Lelight",5239:"Multi IR",5240:"APYNOV",5242:"Realwe",5243:"LUMIFLOW",5244:"SHENAN YANGGUANG",5245:"Morning Electronics",5246:"MIWA LOCK",5247:"U-tec",5248:"Roborock",5249:"Xenon Industrial",5250:"Lengceoi",5251:"jhome",5254:"Infibrite",5256:"Flic",5258:"Occhio",5259:"Samraj",5261:"EME",5262:"Binthen",5264:"Shelly",5266:"xxter",5267:"NIE-TECH",5268:"Martin Renz",5269:"Pacific Hogar",5270:"InnoPhase IOT",5271:"DMA",5273:"CLIO",5274:"Guangdong A-OK",5275:"AIGOSTAR",5276:"Launray",5279:"Deyi Smart",5282:"Brennenstuhl",5293:"Raex",5376:"SmartWave",5379:"Ronco",5380:"Mango Network",5382:"SAFEMO",5383:"Bweetech",5384:"Rui Teng",5385:"SmartSetup",5387:"Technology Nexus",5388:"Nexxt Solutions",5389:"Huayu Lian",5391:"in-lite",5393:"Saishigao",5394:"Yourlite",5395:"Alpha Tubular Motors",5396:"Chuan Dian",5398:"iRobot",5399:"Huacheng Network",5401:"i3 Engineering",5402:"Leviosa",5403:"Sunfree Motor",5404:"Schoenberger",5405:"Dendo Systems",5406:"Kudelski IoT",5407:"Apporo",5408:"Rachio",5409:"NEWLAB",5410:"Zimi",5411:"Yooksmart",5412:"BofuSmart",5415:"habi",5416:"ntve home",5418:"BSH Home Appliances",5419:"Kumho Electric",5420:"Dreame",5421:"Neo Smart Blinds",5424:"Taiwan Fu Hsing",5425:"Solity",5426:"Arpobot",5427:"Anker",5428:"WAGO",5430:"DomoPlus",5431:"PEARL",5432:"Beca",5433:"WISeKey",5435:"Griesser",5436:"alre",5437:"Amlogic",5438:"ART DOM",5439:"Brel",5441:"Kärcher",5442:"Lanbon",5447:"MACO",5450:"Sciener",5451:"SkyAngle",5452:"VIZO Technology",5456:"AvatarControls",5457:"Kaijet",5458:"DEWENWILS",5459:"SuperBrightLEDS",5461:"MIUC Technology",5464:"Ai-Thinker",5465:"tink",5467:"MinebeaMitsumi",5468:"Feierge",5470:"Sandstrom",5472:"SIXWGH",5474:"Renesas",5475:"StrongKey",5476:"NEXTY ELECTRONICS",5478:"ODELIC",5479:"Haier",5480:"Econet",5481:"Feller",5482:"xCREAS",5483:"ShinDong-A ES",5484:"Motionblinds",5486:"BrizLabs",5489:"Eurotronic",5490:"Babai",5491:"SELVE",5493:"Xizhen Electronics",5494:"Enlight",5496:"WINTEC KOREA",5497:"Hinkley",5498:"SMARTSPEC",5500:"L&S Lighting",5502:"APICAL",5506:"KEGU",5507:"MAMABA",5510:"Megaman",5512:"Atouch Winwel",5513:"Warmup",5514:"Flipper",5515:"Deasino",5516:"ZFL SMART",5518:"A solution",5519:"Bold Smart Lock",5520:"GL.iNet",5521:"ZH Currtain",5522:"MEAN WELL",5525:"Kotonic",5526:"Sensereo",5529:"Huarui",5530:"HAOJAI",5533:"wibutler",5534:"UIOT",5535:"Ltech",5537:"Delta Dore",5539:"Intermatic",5540:"Mikrotik",5541:"Laticrete",5543:"Hunter Fan",5544:"LOCKIN",5546:"GLEDOPTO",5547:"Accurate Lock & Hardware",5548:"SWAN Lite",5549:"AnablepSecurity",5551:"Corston",5552:"JustPlus",5553:"INSIIDA",5555:"MiBoxer",5557:"Brighter Lighting",5564:"Lysome",5565:"TBS",5566:"Easfina",5567:"Korrus",5568:"DIANXIAOKU",5570:"Kaadas",5572:"FAST ČR",5574:"Wozart",5575:"Homewell",5576:"Maktar",5577:"Ci Global",5580:"Schüco",5582:"MAKEGOOD",5583:"Globe Electric",5584:"Vantiva",5586:"Desjoyaux",5591:"Boldr",5594:"JEM Accessories",5597:"SG Armaturen",5598:"VoxAura",5599:"Vitrumshade",5600:"Leaguer MicroElectronics",5601:"NOVO",5603:"YCZNWL",5607:"Fresh Electric",5608:"Doorma",5609:"Sukces",5614:"moorgen",5615:"KASTA",5618:"Viomi",5620:"Tedee",5621:"Bouygues Telecom",5623:"AC Infinity",5625:"Narwal",5627:"nomos system",5630:"Senscomm",5637:"Remac Smart",5645:"SUFN",5646:"LLW",5647:"POYAL",5648:"Zhuhai Shengchang",5651:"Calex",5653:"Rayrun",5655:"Jianbian",5656:"Matterize Labs",5661:"ACME",5663:"Fatboy",5668:"Zhenghui",5669:"United Electric",5695:"ADT",24582:"Google Home"};function Zy(e){return P3e[e]??`Vendor ${e}`}const j3e={Alexa:v0,Amazon:v0,Apple:Lk,Google:SZ,SmartThings:AZ,Samsung:EZ,IKEA:wZ,Tuya:Nk,Xiaomi:_Z,Aqara:xZ,Shelly:kZ,Meross:CZ},$3e={1:O3e,4107:R3e,4142:k3e,4321:EZ,4362:AZ,4417:Nk,4447:xZ,4448:v0,4469:C3e,4476:wZ,4488:T7,4631:v0,4701:Nk,4718:_Z,4745:_3e,4757:w3e,4911:I3e,4933:CZ,4937:Lk,4957:D3e,4987:v0,4993:v0,4996:Lk,5009:T7,5010:T7,5023:T3e,5248:M3e,5264:kZ,5420:E3e,5398:A3e,5427:S3e,24582:SZ};function L3e(e){const t=$3e[e.rootVendorId];return t||Object.entries(j3e).find(([n])=>e.label.toUpperCase().includes(n.toUpperCase()))?.[1]}const DZ=({fabric:e})=>{const t=_.useMemo(()=>L3e(e),[e]);return m.jsx(cn,{title:`${e.label||Zy(e.rootVendorId)} (0x${e.rootVendorId.toString(16).toUpperCase().padStart(4,"0")})`,arrow:!0,children:m.jsx(ce,{component:"span",sx:{fill:n=>n.palette.text.primary},children:t?m.jsx(t,{style:{height:"1.4em",width:"auto",maxWidth:"3em",display:"block"}}):m.jsx(x3e,{})})})},N3e=e=>m.jsx(m.Fragment,{children:e.fabrics.map(t=>m.jsxs(ce,{display:"flex",alignItems:"center",gap:1.5,py:.5,children:[m.jsx(DZ,{fabric:t}),m.jsx(ie,{variant:"body2",children:t.label||Zy(t.rootVendorId)})]},t.fabricId))});function Tu(){return{show:_.useContext(bX).show}}const F3e=({bridge:e})=>m.jsxs(dt,{container:!0,spacing:2,children:[e.featureFlags?.serverMode&&e.featureFlags?.vacuumOnOff===!1&&m.jsx(dt,{size:{xs:12},children:m.jsxs(vn,{severity:"warning",icon:m.jsx(Yd,{}),children:[m.jsx(q4,{children:"Vacuum OnOff Disabled (Alexa incompatible)"}),"Alexa ",m.jsx("strong",{children:"requires"})," the OnOff cluster (PowerController) for robotic vacuums. With OnOff disabled, the vacuum commissions but never appears in the Alexa app. Only disable this if you exclusively use ",m.jsx("strong",{children:"Apple Home"}),"."]})}),!e.featureFlags?.serverMode&&e.featureFlags?.vacuumOnOff&&m.jsx(dt,{size:{xs:12},children:m.jsxs(vn,{severity:"info",icon:m.jsx(Yd,{}),children:[m.jsx(q4,{children:"Vacuum OnOff Cluster Enabled (Alexa)"}),"OnOff cluster is active for Alexa PowerController compatibility. This may cause issues with ",m.jsx("strong",{children:"Apple Home"})," and"," ",m.jsx("strong",{children:"Google Home"}),"."]})}),m.jsx(dt,{size:{xs:12,md:4},children:m.jsx(B3e,{bridge:e})}),m.jsx(dt,{size:{xs:12,md:4},children:m.jsx(z3e,{bridge:e})}),m.jsx(dt,{size:{xs:12,md:4},children:m.jsx(H3e,{bridge:e})}),m.jsx(dt,{size:{xs:12},children:m.jsx(U3e,{bridge:e})}),m.jsx(dt,{size:{xs:12},children:m.jsx(W3e,{bridge:e})})]}),B3e=({bridge:e})=>{const[t,n]=_.useState(!1),[r,i]=_.useState(!1),o=Tu(),s=async()=>{i(!0);try{await C2e(e.id),n(!0)}catch(l){o.show({message:`Failed to open commissioning window: ${l instanceof Error?l.message:String(l)}`,severity:"error"})}finally{i(!1)}};if(!e.commissioning)return m.jsx(tr,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"grey.500"},children:m.jsx(F5,{})}),m.jsx(ie,{variant:"h6",children:"Pairing"})]}),m.jsx(ie,{color:"text.secondary",children:"Bridge is not running. Start the bridge to see pairing information."})]})});const a=l=>{navigator.clipboard.writeText(l)};return m.jsxs(m.Fragment,{children:[m.jsx(tr,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"primary.main"},children:m.jsx(F5,{})}),m.jsx(ie,{variant:"h6",children:"Pairing"})]}),m.jsxs(ce,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,children:[m.jsxs(ce,{position:"relative",children:[e.commissioning.isCommissioned&&m.jsx(ce,{position:"absolute",top:"50%",left:"50%",sx:{transform:"translate(-50%, -50%) rotate(-45deg)",zIndex:1},children:m.jsx(Et,{label:"Commissioned",color:"success",size:"small"})}),m.jsx(ce,{sx:{background:"white",padding:1,borderRadius:1,opacity:e.commissioning.isCommissioned?.5:1},children:m.jsx(JO,{value:e.commissioning.qrPairingCode,size:120})})]}),m.jsx(zt,{spacing:1,width:"100%",children:m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Manual Code:"}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:.5,children:[m.jsx(ie,{variant:"body2",fontFamily:"monospace",children:e.commissioning.manualPairingCode}),m.jsx(_n,{size:"small",onClick:()=>a(e.commissioning.manualPairingCode),children:m.jsx(Ah,{fontSize:"small"})})]})]})}),e.commissioning.isCommissioned&&m.jsx(kt,{variant:"outlined",size:"small",startIcon:r?m.jsx(zr,{size:16}):m.jsx(F5,{}),onClick:s,disabled:r,fullWidth:!0,children:r?"Opening Commissioning Window...":"Add Another Controller"})]})]})}),m.jsx(V3e,{bridge:e,open:t,onClose:()=>n(!1)})]})},z3e=({bridge:e})=>m.jsx(tr,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"info.main"},children:m.jsx(YO,{})}),m.jsx(ie,{variant:"h6",children:"Bridge Info"})]}),m.jsxs(zt,{spacing:1.5,children:[m.jsxs(ce,{children:[m.jsx(ie,{variant:"caption",color:"text.secondary",children:"Bridge ID"}),m.jsx(ie,{variant:"body2",fontFamily:"monospace",noWrap:!0,children:e.id})]}),m.jsx(gi,{}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Port"}),m.jsx(ie,{variant:"body2",fontWeight:"medium",children:e.port})]}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Devices"}),m.jsx(Et,{icon:m.jsx(Fs,{}),label:e.deviceCount,size:"small",color:"primary",variant:"outlined"})]}),e.commissioning&&m.jsxs(m.Fragment,{children:[m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Passcode"}),m.jsx(ie,{variant:"body2",fontFamily:"monospace",children:e.commissioning.passcode})]}),m.jsxs(ce,{display:"flex",justifyContent:"space-between",children:[m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Discriminator"}),m.jsx(ie,{variant:"body2",fontFamily:"monospace",children:e.commissioning.discriminator})]})]})]})]})}),H3e=({bridge:e})=>{const t=e.commissioning?.fabrics??[],[n,r]=_.useState(!1),i=Tu(),o=async()=>{r(!0);try{const s=await LX(e.id);i.show({message:`Synced ${s.syncedCount} devices to controllers`,severity:"success"})}catch(s){i.show({message:`Force sync failed: ${s instanceof Error?s.message:String(s)}`,severity:"error"})}finally{r(!1)}};return m.jsx(tr,{sx:{height:"100%"},children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:t.length>0?"success.main":"grey.500"},children:m.jsx(sZ,{})}),m.jsxs(ie,{variant:"h6",children:["Connected Fabrics (",t.length,")"]})]}),t.length===0?m.jsx(ie,{color:"text.secondary",children:"No controllers connected yet. Scan the QR code with your Matter controller to pair this bridge."}):m.jsxs(zt,{spacing:2,children:[m.jsx(N3e,{fabrics:t}),m.jsx(cn,{title:"Push all current device states to connected controllers",children:m.jsx(kt,{variant:"outlined",size:"small",startIcon:n?m.jsx(zr,{size:16}):m.jsx(dw,{}),onClick:o,disabled:n,fullWidth:!0,children:n?"Syncing...":"Force Sync"})})]})]})})},U3e=({bridge:e})=>{const t=hf(),n=e.filter.include.length>0||e.filter.exclude.length>0;return m.jsx(tr,{children:m.jsxs(gr,{children:[m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,mb:2,children:[m.jsx(rl,{sx:{bgcolor:"warning.main"},children:m.jsx(uw,{})}),m.jsx(ie,{variant:"h6",sx:{flexGrow:1},children:"Entity Filters"}),m.jsx(cn,{title:n?"Edit Filters":"Add Filters",children:m.jsx(_n,{size:"small",onClick:()=>t(Pt.editBridge(e.id)),children:n?m.jsx(cw,{}):m.jsx(fc,{})})})]}),n?m.jsxs(zt,{direction:"row",spacing:1,flexWrap:"wrap",useFlexGap:!0,children:[e.filter.include.map(r=>m.jsx(Et,{size:"small",icon:m.jsx(fc,{}),label:m.jsxs("span",{children:[m.jsx("strong",{children:r.type}),": ",r.value]}),color:"success",variant:"outlined"},`include-${r.type}-${r.value}`)),e.filter.exclude.map(r=>m.jsx(Et,{size:"small",icon:m.jsx(oZ,{}),label:m.jsxs("span",{children:[m.jsx("strong",{children:r.type}),": ",r.value]}),color:"error",variant:"outlined"},`exclude-${r.type}-${r.value}`))]}):m.jsx(ie,{variant:"body2",color:"text.secondary",children:"No filters configured. All supported entities will be exposed."})]})})},V3e=({bridge:e,open:t,onClose:n})=>{if(!e.commissioning)return null;const r=i=>{navigator.clipboard.writeText(i)};return m.jsxs(vu,{open:t,onClose:n,maxWidth:"sm",fullWidth:!0,children:[m.jsx(Su,{children:m.jsxs(ce,{display:"flex",alignItems:"center",gap:1,children:[m.jsx(F5,{}),"Add Another Controller"]})}),m.jsxs(xu,{children:[m.jsx(ie,{variant:"body2",color:"text.secondary",gutterBottom:!0,children:"Scan this QR code with your Matter controller (Apple Home, Google Home, Alexa, etc.) to add this bridge to another ecosystem."}),m.jsx(ce,{display:"flex",justifyContent:"center",my:3,children:m.jsx(ce,{sx:{background:"white",padding:2,borderRadius:1},children:m.jsx(JO,{value:e.commissioning.qrPairingCode,size:200})})}),m.jsxs(zt,{spacing:1,children:[m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(ie,{variant:"body2",children:[m.jsx("strong",{children:"Manual Code:"})," ",e.commissioning.manualPairingCode]}),m.jsx(cn,{title:"Copy",children:m.jsx(_n,{size:"small",onClick:()=>r(e.commissioning.manualPairingCode),children:m.jsx(Ah,{fontSize:"small"})})})]}),m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(ie,{variant:"body2",children:[m.jsx("strong",{children:"Passcode:"})," ",e.commissioning.passcode]}),m.jsx(cn,{title:"Copy",children:m.jsx(_n,{size:"small",onClick:()=>r(e.commissioning.passcode.toString()),children:m.jsx(Ah,{fontSize:"small"})})})]}),m.jsxs(ce,{display:"flex",alignItems:"center",justifyContent:"space-between",children:[m.jsxs(ie,{variant:"body2",children:[m.jsx("strong",{children:"Discriminator:"})," ",e.commissioning.discriminator]}),m.jsx(cn,{title:"Copy",children:m.jsx(_n,{size:"small",onClick:()=>r(e.commissioning.discriminator.toString()),children:m.jsx(Ah,{fontSize:"small"})})})]})]}),m.jsx(vn,{severity:"info",sx:{mt:2},children:m.jsx(ie,{variant:"body2",children:"Matter supports connecting the same bridge to multiple controllers simultaneously. Each controller will have independent control."})})]}),m.jsx(Xd,{children:m.jsx(kt,{onClick:n,children:"Close"})})]})},W3e=({bridge:e})=>{const t=e.failedEntities;return!t||t.length===0?null:m.jsx(tr,{children:m.jsx(gr,{children:m.jsxs(vn,{severity:"warning",icon:m.jsx(KO,{}),children:[m.jsxs(q4,{children:["Failed Entities (",t.length,")"]}),m.jsx(ie,{variant:"body2",component:"div",children:"The following entities could not be added to the bridge:"}),m.jsx(ce,{sx:{mt:1,maxHeight:200,overflow:"auto"},children:t.map(n=>m.jsxs(ce,{sx:{mb:.5},children:[m.jsx(ie,{variant:"body2",component:"span",fontWeight:"bold",children:n.entityId}),m.jsxs(ie,{variant:"body2",component:"span",color:"text.secondary",children:[" — ",n.reason]})]},n.entityId))})]})})})};var Vl;(function(e){e.Starting="starting",e.Running="running",e.Stopped="stopped",e.Failed="failed"})(Vl||(Vl={}));var Ar;(function(e){e.Pattern="pattern",e.Regex="regex",e.Domain="domain",e.Platform="platform",e.Label="label",e.EntityLabel="entity_label",e.DeviceLabel="device_label",e.Area="area",e.EntityCategory="entity_category",e.DeviceName="device_name",e.ProductName="product_name",e.DeviceClass="device_class"})(Ar||(Ar={}));const OZ=[{id:"all_lights",name:"All Lights",description:"Expose all light entities. Ideal for controlling lights via Apple Home, Google Home, or Alexa.",icon:"light",filter:{include:[{type:Ar.Domain,value:"light"}],exclude:[]},featureFlags:{autoBatteryMapping:!0},tags:["lights","popular"]},{id:"all_switches",name:"All Switches & Plugs",description:"Expose all switch entities including smart plugs. Includes power and energy monitoring.",icon:"switch",filter:{include:[{type:Ar.Domain,value:"switch"}],exclude:[]},featureFlags:{},tags:["switches","plugs"]},{id:"sensors_only",name:"All Sensors",description:"Expose temperature, humidity, pressure, and other sensors. Auto-combines related sensors from the same device.",icon:"sensor",filter:{include:[{type:Ar.Domain,value:"sensor"},{type:Ar.Domain,value:"binary_sensor"}],exclude:[]},featureFlags:{autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0},tags:["sensors","temperature","humidity"]},{id:"climate_control",name:"Climate & Covers",description:"Expose thermostats, fans, covers, and humidifiers for climate control.",icon:"climate",filter:{include:[{type:Ar.Domain,value:"climate"},{type:Ar.Domain,value:"fan"},{type:Ar.Domain,value:"cover"},{type:Ar.Domain,value:"humidifier"}],exclude:[]},featureFlags:{autoBatteryMapping:!0},tags:["climate","thermostat","covers"]},{id:"security",name:"Security & Locks",description:"Expose locks, alarm panels, and security-related binary sensors (motion, door, window).",icon:"lock",filter:{include:[{type:Ar.Domain,value:"lock"},{type:Ar.Domain,value:"alarm_control_panel"},{type:Ar.DeviceClass,value:"motion"},{type:Ar.DeviceClass,value:"door"},{type:Ar.DeviceClass,value:"window"}],exclude:[],includeMode:"any"},featureFlags:{autoBatteryMapping:!0},tags:["security","locks","alarm"]},{id:"robot_vacuum",name:"Robot Vacuum (Server Mode)",description:"Single vacuum bridge with Server Mode enabled. Required for Apple Home Siri commands and proper Alexa discovery. Add only ONE vacuum to this bridge.",icon:"vacuum",filter:{include:[{type:Ar.Domain,value:"vacuum"}],exclude:[]},featureFlags:{serverMode:!0},tags:["vacuum","server-mode","apple-home"]},{id:"media_players",name:"Media Players & Speakers",description:"Expose media players, speakers, and TVs for volume and playback control.",icon:"media_player",filter:{include:[{type:Ar.Domain,value:"media_player"}],exclude:[]},featureFlags:{},tags:["media","speakers","tv"]},{id:"google_home_optimized",name:"Google Home Optimized",description:"All devices with Auto Force Sync enabled. Prevents Google Home from showing devices as offline after a few hours.",icon:"default",filter:{include:[{type:Ar.Pattern,value:"*"}],exclude:[]},featureFlags:{autoForceSync:!0,autoBatteryMapping:!0,autoHumidityMapping:!0,autoPressureMapping:!0},tags:["google-home","all-devices"]},{id:"alexa_covers",name:"Alexa-Optimized Covers",description:"Covers with Alexa-friendly percentage display. Displayed percentage matches Home Assistant values.",icon:"cover",filter:{include:[{type:Ar.Domain,value:"cover"}],exclude:[]},featureFlags:{coverUseHomeAssistantPercentage:!0,autoBatteryMapping:!0},tags:["alexa","covers"]},{id:"automations_scripts",name:"Automations & Scripts",description:"Expose Home Assistant automations, scripts, and scenes as Matter switches.",icon:"remote",filter:{include:[{type:Ar.Domain,value:"automation"},{type:Ar.Domain,value:"script"},{type:Ar.Domain,value:"scene"}],exclude:[]},featureFlags:{},tags:["automations","scripts","scenes"]}];var CF;(function(e){e[e.locked=1]="locked",e[e.unlocked=2]="unlocked"})(CF||(CF={}));var EF;(function(e){e[e.Off=0]="Off",e[e.Low=1]="Low",e[e.Medium=2]="Medium",e[e.High=3]="High",e[e.On=4]="On",e[e.Auto=5]="Auto",e[e.Smart=6]="Smart"})(EF||(EF={}));var AF;(function(e){e[e.Forward=0]="Forward",e[e.Reverse=1]="Reverse"})(AF||(AF={}));var kF;(function(e){e[e.OffLowMedHigh=0]="OffLowMedHigh",e[e.OffLowHigh=1]="OffLowHigh",e[e.OffLowMedHighAuto=2]="OffLowMedHighAuto",e[e.OffLowHighAuto=3]="OffLowHighAuto",e[e.OffHighAuto=4]="OffHighAuto",e[e.OffHigh=5]="OffHigh"})(kF||(kF={}));var _F;(function(e){e[e.Stopped=0]="Stopped",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Error=3]="Error",e[e.SeekingCharger=64]="SeekingCharger",e[e.Charging=65]="Charging",e[e.Docked=66]="Docked"})(_F||(_F={}));var DF;(function(e){e[e.Off=0]="Off",e[e.Auto=1]="Auto",e[e.Cool=3]="Cool",e[e.Heat=4]="Heat",e[e.EmergencyHeat=5]="EmergencyHeat",e[e.Precooling=6]="Precooling",e[e.FanOnly=7]="FanOnly",e[e.Dry=8]="Dry",e[e.Sleep=9]="Sleep"})(DF||(DF={}));var Fk;(function(e){e.homeAssistantEntity="homeAssistantEntity",e.identify="identify",e.groups="groups",e.scenesManagement="scenesManagement",e.bridgedDeviceBasicInformation="bridgedDeviceBasicInformation",e.airQuality="airQuality",e.booleanState="booleanState",e.colorControl="colorControl",e.doorLock="doorLock",e.flowMeasurement="flowMeasurement",e.levelControl="levelControl",e.fanControl="fanControl",e.illuminanceMeasurement="illuminanceMeasurement",e.occupancySensing="occupancySensing",e.onOff="onOff",e.powerSource="powerSource",e.pressureMeasurement="pressureMeasurement",e.relativeHumidityMeasurement="relativeHumidityMeasurement",e.smokeCoAlarm="smokeCoAlarm",e.temperatureMeasurement="temperatureMeasurement",e.thermostat="thermostat",e.thermostatUserInterfaceConfiguration="thermostatUserInterfaceConfiguration",e.valveConfigurationAndControl="valveConfigurationAndControl",e.windowCovering="windowCovering",e.mediaInput="mediaInput",e.rvcCleanMode="rvcCleanMode",e.rvcRunMode="rvcRunMode",e.rvcOperationalState="rvcOperationalState",e.serviceArea="serviceArea",e.switch="switch",e.modeSelect="modeSelect"})(Fk||(Fk={}));var OF;(function(e){e.Battery="battery",e.BatteryCharging="battery_charging",e.CarbonMonoxide="carbon_monoxide",e.Cold="cold",e.Connectivity="connectivity",e.Door="door",e.GarageDoor="garage_door",e.Gas="gas",e.Heat="heat",e.Light="light",e.Lock="lock",e.Moisture="moisture",e.Motion="motion",e.Moving="moving",e.Occupancy="occupancy",e.Opening="opening",e.Plug="plug",e.Power="power",e.Presence="presence",e.Problem="problem",e.Running="running",e.Safety="safety",e.Smoke="smoke",e.Sound="sound",e.Tamper="tamper",e.Update="update",e.Vibration="vibration",e.Window="window"})(OF||(OF={}));var TF;(function(e){e.off="off",e.heat="heat",e.cool="cool",e.heat_cool="heat_cool",e.auto="auto",e.dry="dry",e.fan_only="fan_only"})(TF||(TF={}));var MF;(function(e){e.off="off",e.preheating="preheating",e.heating="heating",e.cooling="cooling",e.drying="drying",e.fan="fan",e.idle="idle",e.defrosting="defrosting"})(MF||(MF={}));var RF;(function(e){e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.TARGET_TEMPERATURE_RANGE=2]="TARGET_TEMPERATURE_RANGE",e[e.TARGET_HUMIDITY=4]="TARGET_HUMIDITY",e[e.FAN_MODE=8]="FAN_MODE",e[e.PRESET_MODE=16]="PRESET_MODE",e[e.SWING_MODE=32]="SWING_MODE",e[e.AUX_HEAT=64]="AUX_HEAT",e[e.TURN_OFF=128]="TURN_OFF",e[e.TURN_ON=256]="TURN_ON",e[e.SWING_HORIZONTAL_MODE=512]="SWING_HORIZONTAL_MODE"})(RF||(RF={}));var IF;(function(e){e.closed="closed",e.open="open",e.closing="closing",e.opening="opening"})(IF||(IF={}));var PF;(function(e){e.button="button",e.doorbell="doorbell",e.motion="motion"})(PF||(PF={}));var jF;(function(e){e.FORWARD="forward",e.REVERSE="reverse"})(jF||(jF={}));var $F;(function(e){e[e.SET_SPEED=1]="SET_SPEED",e[e.OSCILLATE=2]="OSCILLATE",e[e.DIRECTION=4]="DIRECTION",e[e.PRESET_MODE=8]="PRESET_MODE",e[e.TURN_ON=16]="TURN_ON",e[e.TURN_OFF=32]="TURN_OFF"})($F||($F={}));var LF;(function(e){e.UNKNOWN="unknown",e.ONOFF="onoff",e.BRIGHTNESS="brightness",e.COLOR_TEMP="color_temp",e.HS="hs",e.XY="xy",e.RGB="rgb",e.RGBW="rgbw",e.RGBWW="rgbww",e.WHITE="white"})(LF||(LF={}));var NF;(function(e){e.Tv="tv",e.Speaker="speaker",e.Receiver="receiver"})(NF||(NF={}));var FF;(function(e){e[e.PAUSE=1]="PAUSE",e[e.SEEK=2]="SEEK",e[e.VOLUME_SET=4]="VOLUME_SET",e[e.VOLUME_MUTE=8]="VOLUME_MUTE",e[e.PREVIOUS_TRACK=16]="PREVIOUS_TRACK",e[e.NEXT_TRACK=32]="NEXT_TRACK",e[e.TURN_ON=128]="TURN_ON",e[e.TURN_OFF=256]="TURN_OFF",e[e.PLAY_MEDIA=512]="PLAY_MEDIA",e[e.VOLUME_STEP=1024]="VOLUME_STEP",e[e.SELECT_SOURCE=2048]="SELECT_SOURCE",e[e.STOP=4096]="STOP",e[e.CLEAR_PLAYLIST=8192]="CLEAR_PLAYLIST",e[e.PLAY=16384]="PLAY",e[e.SHUFFLE_SET=32768]="SHUFFLE_SET",e[e.SELECT_SOUND_MODE=65536]="SELECT_SOUND_MODE",e[e.BROWSE_MEDIA=131072]="BROWSE_MEDIA",e[e.REPEAT_SET=262144]="REPEAT_SET",e[e.GROUPING=524288]="GROUPING",e[e.MEDIA_ANNOUNCE=1048576]="MEDIA_ANNOUNCE",e[e.MEDIA_ENQUEUE=2097152]="MEDIA_ENQUEUE"})(FF||(FF={}));var BF;(function(e){e.None="None",e.apparent_power="apparent_power",e.aqi="aqi",e.atmospheric_pressure="atmospheric_pressure",e.battery="battery",e.carbon_dioxide="carbon_dioxide",e.carbon_monoxide="carbon_monoxide",e.current="current",e.data_rate="data_rate",e.data_size="data_size",e.date="date",e.distance="distance",e.duration="duration",e.energy="energy",e.energy_storage="energy_storage",e.enum="enum",e.frequency="frequency",e.gas="gas",e.humidity="humidity",e.illuminance="illuminance",e.irradiance="irradiance",e.moisture="moisture",e.monetary="monetary",e.nitrogen_dioxide="nitrogen_dioxide",e.nitrogen_monoxide="nitrogen_monoxide",e.nitrous_oxide="nitrous_oxide",e.ozone="ozone",e.ph="ph",e.pm1="pm1",e.pm25="pm25",e.pm10="pm10",e.power_factor="power_factor",e.power="power",e.precipitation="precipitation",e.precipitation_intensity="precipitation_intensity",e.pressure="pressure",e.reactive_power="reactive_power",e.signal_strength="signal_strength",e.sound_pressure="sound_pressure",e.speed="speed",e.sulphur_dioxide="sulphur_dioxide",e.temperature="temperature",e.timestamp="timestamp",e.volatile_organic_compounds="volatile_organic_compounds",e.volatile_organic_compounds_parts="volatile_organic_compounds_parts",e.voltage="voltage",e.volume="volume",e.volume_flow_rate="volume_flow_rate",e.volume_storage="volume_storage",e.water="water",e.weight="weight",e.wind_speed="wind_speed"})(BF||(BF={}));var zF;(function(e){e.cleaning="cleaning",e.docked="docked",e.returning="returning",e.error="error",e.idle="idle",e.paused="paused",e.segment_cleaning="segment_cleaning",e.zone_cleaning="zone_cleaning",e.spot_cleaning="spot_cleaning",e.mop_cleaning="mop_cleaning"})(zF||(zF={}));var HF;(function(e){e[e.TURN_ON=1]="TURN_ON",e[e.TURN_OFF=2]="TURN_OFF",e[e.PAUSE=4]="PAUSE",e[e.STOP=8]="STOP",e[e.RETURN_HOME=16]="RETURN_HOME",e[e.FAN_SPEED=32]="FAN_SPEED",e[e.BATTERY=64]="BATTERY",e[e.STATUS=128]="STATUS",e[e.SEND_COMMAND=256]="SEND_COMMAND",e[e.LOCATE=512]="LOCATE",e[e.CLEAN_SPOT=1024]="CLEAN_SPOT",e[e.MAP=2048]="MAP",e[e.STATE=4096]="STATE",e[e.START=8192]="START"})(HF||(HF={}));var UF;(function(e){e.off="off",e.low="low",e.medium="medium",e.high="high",e.turbo="turbo",e.auto="auto",e.max="max"})(UF||(UF={}));var VF;(function(e){e.off="off",e.eco="eco",e.electric="electric",e.gas="gas",e.heat_pump="heat_pump",e.high_demand="high_demand",e.performance="performance"})(VF||(VF={}));var WF;(function(e){e[e.TARGET_TEMPERATURE=1]="TARGET_TEMPERATURE",e[e.OPERATION_MODE=2]="OPERATION_MODE",e[e.AWAY_MODE=4]="AWAY_MODE",e[e.ON_OFF=8]="ON_OFF"})(WF||(WF={}));const qF={air_purifier:"Air Purifier",air_quality_sensor:"Air Quality Sensor",basic_video_player:"Basic Video Player (TV)",battery_storage:"Battery Sensor",color_dimmer_switch:"Color Dimmer Switch",color_temperature_light:"Color Temperature Light",contact_sensor:"Contact Sensor",dimmable_light:"Dimmable Light",dimmable_plugin_unit:"Dimmable Plug-in Unit",dimmer_switch:"Dimmer Switch",door_lock:"Door Lock",extended_color_light:"Extended Color Light",fan:"Fan",flow_sensor:"Flow Sensor",generic_switch:"Generic Switch (Button)",humidifier_dehumidifier:"Humidifier/Dehumidifier",humidity_sensor:"Humidity Sensor",light_sensor:"Light Sensor",mode_select:"Mode Select",occupancy_sensor:"Occupancy Sensor",on_off_light:"On/Off Light",on_off_plugin_unit:"On/Off Plug-in Unit",on_off_switch:"On/Off Switch",pressure_sensor:"Pressure Sensor",pump:"Pump",robot_vacuum_cleaner:"Robot Vacuum Cleaner",smoke_co_alarm:"Smoke/CO Alarm",speaker:"Speaker",temperature_sensor:"Temperature Sensor",thermostat:"Thermostat",tvoc_sensor:"TVOC / VOC Index Sensor",water_heater:"Water Heater",water_freeze_detector:"Water Freeze Detector",water_leak_detector:"Water Leak Detector",water_valve:"Water Valve",window_covering:"Window Covering"},f1={Auto:0,Quick:1,Quiet:2,LowNoise:3,LowEnergy:4,Vacation:5,Min:6,Max:7,Night:8,Day:9,DeepClean:16384,Vacuum:16385,Mop:16386,VacuumThenMop:16387},q3e={alarm_control_panel:["mode_select","on_off_plugin_unit"],automation:["on_off_switch"],binary_sensor:["contact_sensor","occupancy_sensor","smoke_co_alarm","water_freeze_detector","water_leak_detector"],button:["generic_switch"],climate:["thermostat"],cover:["window_covering"],event:["generic_switch"],fan:["air_purifier","fan"],humidifier:["humidifier_dehumidifier"],input_boolean:["on_off_plugin_unit","on_off_switch"],input_select:["mode_select"],input_button:["generic_switch"],light:["color_temperature_light","dimmable_light","extended_color_light","on_off_light"],lock:["door_lock"],media_player:["basic_video_player","on_off_switch","speaker"],scene:["on_off_switch"],script:["on_off_switch"],sensor:["air_quality_sensor","battery_storage","humidity_sensor","light_sensor","pressure_sensor","temperature_sensor","tvoc_sensor"],select:["mode_select"],switch:["on_off_plugin_unit","on_off_switch","pump","water_valve"],vacuum:["robot_vacuum_cleaner"],valve:["water_valve","on_off_plugin_unit"],water_heater:["water_heater","thermostat"]};var GF;(function(e){e.alarm_control_panel="alarm_control_panel",e.automation="automation",e.button="button",e.binary_sensor="binary_sensor",e.climate="climate",e.cover="cover",e.event="event",e.fan="fan",e.humidifier="humidifier",e.input_boolean="input_boolean",e.input_button="input_button",e.input_select="input_select",e.light="light",e.lock="lock",e.media_player="media_player",e.remote="remote",e.scene="scene",e.select="select",e.script="script",e.sensor="sensor",e.switch="switch",e.vacuum="vacuum",e.valve="valve",e.water_heater="water_heater"})(GF||(GF={}));const KF={type:"object",default:{type:"",value:""},properties:{type:{title:"Type",type:"string",oneOf:[{const:"pattern",title:"pattern",description:"Wildcard pattern matching entity IDs. Use * as wildcard. Example: 'light.living_room_*' matches all lights in the living room."},{const:"regex",title:"regex",description:"Full regular expression matching entity IDs. Use ^ and $ for anchors. Example: '^(light|switch)\\.kitchen_.*' matches all kitchen lights and switches."},{const:"domain",title:"domain",description:"Match entities by their domain (the part before the dot). Example: 'light', 'switch', 'sensor'."},{const:"platform",title:"platform",description:"Match entities by their integration/platform. Example: 'hue', 'zwave', 'mqtt'."},{const:"entity_label",title:"entity_label",description:"Matches only entities that have this label assigned directly. Other entities of the same device are NOT included."},{const:"device_label",title:"device_label",description:"Matches ALL entities of a device if the device has this label. Use this to include a complete device with all its entities."},{const:"area",title:"area",description:"Match entities by their area slug. Example: 'living_room', 'bedroom'."},{const:"entity_category",title:"entity_category",description:"Match entities by their category. Example: 'config', 'diagnostic' to exclude configuration entities."},{const:"device_name",title:"device_name",description:"Match entities by their device name. Supports wildcards. Example: '*Philips*' matches all Philips devices."},{const:"product_name",title:"product_name",description:"Match entities by their product/model name. Supports wildcards. Example: 'Hue*Bulb'."},{const:"device_class",title:"device_class",description:"Match entities by their device class attribute. Example: 'temperature', 'motion', 'door', 'window'."}]},value:{title:"Value",description:"For labels, use the display name or the label_id (slug). You can look up both on the Labels page in the sidebar.",type:"string",minLength:1}},required:["type","value"],additionalProperties:!1},G3e={title:"Include or exclude entities",type:"object",properties:{include:{title:"Include",type:"array",items:KF},exclude:{title:"Exclude",type:"array",items:KF},includeMode:{title:"Include Mode",type:"string",description:"How to combine include rules: 'any' matches if ANY rule matches (OR), 'all' matches only if ALL rules match (AND). Default: 'any'",enum:["any","all"],default:"any"}},required:["include","exclude"],additionalProperties:!1},K3e={title:"Feature Flags",type:"object",properties:{coverDoNotInvertPercentage:{title:"Do not invert Percentages for Covers",description:"Do not invert the percentage of covers to match Home Assistant (not Matter compliant)",type:"boolean",default:!1},coverUseHomeAssistantPercentage:{title:"Use Home Assistant Percentage for Covers (Alexa-friendly)",description:"Display cover percentages matching Home Assistant values in Matter controllers like Alexa. This makes the displayed percentage match what you see in Home Assistant, but the semantic meaning differs: in HA, higher percentage = more open; in Alexa, higher percentage is typically interpreted as more closed. Open/Close commands will still work correctly.",type:"boolean",default:!1},coverSwapOpenClose:{title:"Swap Open/Close for Covers",description:"Swap open/close commands and invert position reporting for covers. Enable this if Alexa voice commands are reversed (saying 'close' opens the blinds and vice versa).",type:"boolean",default:!1},includeHiddenEntities:{title:"Include Hidden Entities",description:"Include entities that are marked as hidden in Home Assistant",type:"boolean",default:!1},alexaPreserveBrightnessOnTurnOn:{title:"Alexa: Preserve Brightness on Turn-On (Deprecated)",description:"This workaround is now always active and this setting has no effect. The bridge automatically ignores brightness commands that set lights to 100% immediately after a turn-on command.",type:"boolean",default:!0},serverMode:{title:"Server Mode (for Robot Vacuums)",description:"Expose the device as a standalone Matter device instead of a bridged device. This is required for Apple Home to properly support Siri voice commands for Robot Vacuums. IMPORTANT: Only ONE device should be in this bridge when server mode is enabled.",type:"boolean",default:!1},autoBatteryMapping:{title:"Auto Battery Mapping",description:"Automatically assign battery sensors from the same Home Assistant device to the main entity. When enabled, battery sensors will be merged into their parent devices instead of appearing as separate devices.",type:"boolean",default:!1},autoHumidityMapping:{title:"Auto Humidity Mapping",description:"Automatically combine humidity sensors with temperature sensors from the same Home Assistant device. When enabled, humidity sensors will be merged into temperature sensors to create combined TemperatureHumiditySensor devices.",type:"boolean",default:!0},autoPressureMapping:{title:"Auto Pressure Mapping",description:"Automatically combine pressure sensors with temperature sensors from the same Home Assistant device. When enabled, pressure sensors will be merged into temperature sensors to create combined sensor devices.",type:"boolean",default:!0},autoComposedDevices:{title:"Auto Composed Devices",description:"Master toggle: automatically combine related entities from the same Home Assistant device into single Matter endpoints. Enables battery, humidity, pressure, power, and energy auto-mapping at once. This provides a cleaner device experience in Matter controllers (e.g., a Shelly Plug appears as one device with power monitoring).",type:"boolean",default:!1},autoForceSync:{title:"Auto Force Sync",description:"Periodically compare and push all device states to connected controllers every 90 seconds. Enable this if devices get out of sync after extended periods. Health checks for dead sessions always run regardless of this setting.",type:"boolean",default:!1},vacuumOnOff:{title:"Vacuum: Include OnOff Cluster (Alexa)",description:"Add an OnOff cluster to robot vacuum endpoints. Alexa REQUIRES this (PowerController) to show robotic vacuums in the app. Without it, Alexa commissions the device but never displays it. In Server Mode this is enabled automatically — only check this for bridge mode. WARNING: OnOff is NOT part of the Matter RVC device type specification. Enabling this may break Apple Home (shows 'Updating') and Google Home.",type:"boolean"},vacuumMinimalClusters:{title:"Vacuum: Minimal Clusters (Alexa troubleshooting)",description:"Strip the vacuum endpoint to only the clusters required by the Matter RVC spec. Removes PowerSource (battery) and the default ServiceArea placeholder. Enable this if Alexa commissions the vacuum but the device never appears in the app. Trade-off: battery percentage will not be reported to Matter controllers.",type:"boolean",default:!1}},additionalProperties:!1},cy={type:"object",title:"Bridge Config",properties:{name:{title:"Name",type:"string",minLength:1,maxLength:32},port:{title:"Port",type:"number",minimum:1},icon:{title:"Icon",type:"string",description:"Icon to display for this bridge in the UI",enum:["light","switch","climate","cover","fan","lock","sensor","media_player","vacuum","remote","humidifier","speaker","garage","door","window","motion","battery","power","camera","default"]},countryCode:{title:"Country Code",type:"string",description:"An ISO 3166-1 alpha-2 code to represent the country in which the Node is located. Only needed if the commissioning fails due to missing country code.",minLength:2,maxLength:3},priority:{title:"Startup Priority",type:"number",description:"Startup order priority. Lower values start first. Default is 100.",default:100,minimum:1,maximum:999},filter:G3e,featureFlags:K3e},required:["name","port","filter"],additionalProperties:!1};({...cy,properties:{...cy.properties},required:[...cy?.required??[]]});const Y3e={[Vl.Failed]:"error",[Vl.Stopped]:"warning",[Vl.Starting]:"info",[Vl.Running]:"success"},X3e=({status:e,reason:t})=>{if(t)return m.jsx(vn,{severity:Y3e[e],variant:"outlined",children:t})},Mu=_e(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"})),vf=_e(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"})),Z3e=_e(m.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-1 14H9V8h2zm4 0h-2V8h2z"})),J3e={[Vl.Starting]:{label:"Starting",color:"info",icon:m.jsx(dw,{fontSize:"small"})},[Vl.Running]:{label:"Running",color:"success",icon:m.jsx(Mu,{fontSize:"small"})},[Vl.Stopped]:{label:"Stopped",color:"warning",icon:m.jsx(Z3e,{fontSize:"small"})},[Vl.Failed]:{label:"Failed",color:"error",icon:m.jsx(vf,{fontSize:"small"})}},TZ=({status:e,reason:t})=>{const n=J3e[e],r=m.jsx(Et,{icon:n.icon,label:n.label,size:"small",color:n.color,variant:"filled",sx:{fontWeight:500}});return t?m.jsx(cn,{title:t,children:r}):r},MZ=_e(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4M13 18h-2v-2h2zm0-4h-2V9h2z"})),RZ=_e(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4M11 20v-5.5H9L13 7v5.5h2z"})),Bk=_e(m.jsx("path",{d:"M15.67 4H14V2h-4v2H8.33C7.6 4 7 4.6 7 5.33v15.33C7 21.4 7.6 22 8.33 22h7.33c.74 0 1.34-.6 1.34-1.33V5.33C17 4.6 16.4 4 15.67 4"})),Jy=_e(m.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"})),QO=_e([m.jsx("path",{d:"M15.11 12.45 14 10.24l-3.11 6.21c-.16.34-.51.55-.89.55s-.73-.21-.89-.55L7.38 13H2v5c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-5h-6c-.38 0-.73-.21-.89-.55"},"0"),m.jsx("path",{d:"M20 4H4c-1.1 0-2 .9-2 2v5h6c.38 0 .73.21.89.55L10 13.76l3.11-6.21c.34-.68 1.45-.68 1.79 0L16.62 11H22V6c0-1.1-.9-2-2-2"},"1")]);function Q3e(e){return Qe("MuiLinearProgress",e)}tt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","bar1","bar2","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const zk=4,Hk=pf`
|
|
164
164
|
0% {
|
|
165
165
|
left: -35%;
|
|
166
166
|
right: 100%;
|
|
@@ -496,4 +496,4 @@ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.pus
|
|
|
496
496
|
To pick up a draggable item, press the space bar.
|
|
497
497
|
While dragging, use the arrow keys to move the item.
|
|
498
498
|
Press space again to drop the item in its new position, or press escape to cancel.
|
|
499
|
-
`},Gat={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Kat(e){let{announcements:t=Gat,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=qat}=e;const{announce:o,announcement:s}=Uat(),a=av("DndLiveRegion"),[l,c]=_.useState(!1);if(_.useEffect(()=>{c(!0)},[]),Vat(_.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:g}=f;t.onDragMove&&o(t.onDragMove({active:h,over:g}))},onDragOver(f){let{active:h,over:g}=f;o(t.onDragOver({active:h,over:g}))},onDragEnd(f){let{active:h,over:g}=f;o(t.onDragEnd({active:h,over:g}))},onDragCancel(f){let{active:h,over:g}=f;o(t.onDragCancel({active:h,over:g}))}}),[o,t])),!l)return null;const u=qt.createElement(qt.Fragment,null,qt.createElement(zat,{id:r,value:i.draggable}),qt.createElement(Hat,{id:a,announcement:s}));return n?Dd.createPortal(u,n):u}var Li;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Li||(Li={}));function CS(){}function kK(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Yat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const sl=Object.freeze({x:0,y:0});function Cle(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ele(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Xat(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function _K(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Ale(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function DK(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Zat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=DK(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=Cle(DK(l),i);o.push({id:a,data:{droppableContainer:s,value:c}})}}return o.sort(Ele)},Jat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=_K(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=_K(l),u=i.reduce((h,g,y)=>h+Cle(c[y],g),0),f=Number((u/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:f}})}}return o.sort(Ele)};function Qat(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,u=s*a,f=u/(l+c-u);return Number(f.toFixed(4))}return 0}const elt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const l=Qat(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(Xat)};function tlt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function kle(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:sl}function nlt(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const rlt=nlt(1);function ilt(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function olt(e,t,n){const r=ilt(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const slt={ignoreTransform:!1};function pg(e,t){t===void 0&&(t=slt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=fs(e).getComputedStyle(e);c&&(n=olt(n,c,u))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function OK(e){return pg(e,{ignoreTransform:!0})}function alt(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function llt(e,t){return t===void 0&&(t=fs(e).getComputedStyle(e)),t.position==="fixed"}function clt(e,t){t===void 0&&(t=fs(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function qC(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(xI(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ov(i)||xle(i)||n.includes(i))return n;const o=fs(e).getComputedStyle(i);return i!==e&&clt(i,o)&&n.push(i),llt(i,o)?n:r(i.parentNode)}return e?r(e):n}function _le(e){const[t]=qC(e,1);return t??null}function XA(e){return!WC||!e?null:fg(e)?e:vI(e)?xI(e)||e===hg(e).scrollingElement?window:ov(e)?e:null:null}function Dle(e){return fg(e)?e.scrollX:e.scrollLeft}function Ole(e){return fg(e)?e.scrollY:e.scrollTop}function XD(e){return{x:Dle(e),y:Ole(e)}}var Xi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Xi||(Xi={}));function Tle(e){return!WC||!e?!1:e===document.scrollingElement}function Mle(e){const t={x:0,y:0},n=Tle(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const ult={x:.2,y:.2};function dlt(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=ult);const{isTop:c,isBottom:u,isLeft:f,isRight:h}=Mle(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+b.height?(g.y=Xi.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!u&&l>=t.bottom-b.height&&(g.y=Xi.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!h&&a>=t.right-b.width?(g.x=Xi.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!f&&s<=t.left+b.width&&(g.x=Xi.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function flt(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Rle(e){return e.reduce((t,n)=>nm(t,XD(n)),sl)}function hlt(e){return e.reduce((t,n)=>t+Dle(n),0)}function plt(e){return e.reduce((t,n)=>t+Ole(n),0)}function mlt(e,t){if(t===void 0&&(t=pg),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);_le(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const glt=[["x",["left","right"],hlt],["y",["top","bottom"],plt]];class CI{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=qC(n),i=Rle(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of glt)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=i[o]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Iy{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function ylt(e){const{EventTarget:t}=fs(e);return e instanceof t?e:hg(e)}function ZA(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var na;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(na||(na={}));function TK(e){e.preventDefault()}function blt(e){e.stopPropagation()}var Ln;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ln||(Ln={}));const Ile={start:[Ln.Space,Ln.Enter],cancel:[Ln.Esc],end:[Ln.Space,Ln.Enter,Ln.Tab]},vlt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ln.Right:return{...n,x:n.x+25};case Ln.Left:return{...n,x:n.x-25};case Ln.Down:return{...n,y:n.y+25};case Ln.Up:return{...n,y:n.y-25}}};class EI{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Iy(hg(n)),this.windowListeners=new Iy(fs(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(na.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&mlt(r),n(sl)}handleKeyDown(t){if(wI(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Ile,coordinateGetter:s=vlt,scrollBehavior:a="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:sl;this.referenceCoordinates||(this.referenceCoordinates=u);const f=s(t,{active:n,context:r.current,currentCoordinates:u});if(f){const h=nb(f,u),g={x:0,y:0},{scrollableAncestors:y}=r.current;for(const b of y){const v=t.code,{isTop:S,isRight:C,isLeft:w,isBottom:A,maxScroll:E,minScroll:D}=Mle(b),O=flt(b),T={x:Math.min(v===Ln.Right?O.right-O.width/2:O.right,Math.max(v===Ln.Right?O.left:O.left+O.width/2,f.x)),y:Math.min(v===Ln.Down?O.bottom-O.height/2:O.bottom,Math.max(v===Ln.Down?O.top:O.top+O.height/2,f.y))},I=v===Ln.Right&&!C||v===Ln.Left&&!w,N=v===Ln.Down&&!A||v===Ln.Up&&!S;if(I&&T.x!==f.x){const $=b.scrollLeft+h.x,R=v===Ln.Right&&$<=E.x||v===Ln.Left&&$>=D.x;if(R&&!h.y){b.scrollTo({left:$,behavior:a});return}R?g.x=b.scrollLeft-$:g.x=v===Ln.Right?b.scrollLeft-E.x:b.scrollLeft-D.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(N&&T.y!==f.y){const $=b.scrollTop+h.y,R=v===Ln.Down&&$<=E.y||v===Ln.Up&&$>=D.y;if(R&&!h.x){b.scrollTo({top:$,behavior:a});return}R?g.y=b.scrollTop-$:g.y=v===Ln.Down?b.scrollTop-E.y:b.scrollTop-D.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,nm(nb(f,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}EI.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ile,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function MK(e){return!!(e&&"distance"in e)}function RK(e){return!!(e&&"delay"in e)}class AI{constructor(t,n,r){var i;r===void 0&&(r=ylt(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=hg(s),this.documentListeners=new Iy(this.document),this.listeners=new Iy(r),this.windowListeners=new Iy(fs(s)),this.initialCoordinates=(i=YD(o))!=null?i:sl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.DragStart,TK),this.windowListeners.add(na.VisibilityChange,this.handleCancel),this.windowListeners.add(na.ContextMenu,TK),this.documentListeners.add(na.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(RK(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(MK(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(na.Click,blt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(na.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(n=YD(t))!=null?n:sl,c=nb(i,l);if(!r&&a){if(MK(a)){if(a.tolerance!=null&&ZA(c,a.tolerance))return this.handleCancel();if(ZA(c,a.distance))return this.handleStart()}if(RK(a)&&ZA(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ln.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const xlt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class kI extends AI{constructor(t){const{event:n}=t,r=hg(n.target);super(t,xlt,r)}}kI.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Slt={move:{name:"mousemove"},end:{name:"mouseup"}};var ZD;(function(e){e[e.RightClick=2]="RightClick"})(ZD||(ZD={}));class wlt extends AI{constructor(t){super(t,Slt,hg(t.event.target))}}wlt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ZD.RightClick?!1:(r?.({event:n}),!0)}}];const JA={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Clt extends AI{constructor(t){super(t,JA)}static setup(){return window.addEventListener(JA.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(JA.move.name,t)};function t(){}}}Clt.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Py;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Py||(Py={}));var ES;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ES||(ES={}));function Elt(e){let{acceleration:t,activator:n=Py.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=ES.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:f,threshold:h}=e;const g=klt({delta:f,disabled:!o}),[y,b]=$at(),v=_.useRef({x:0,y:0}),S=_.useRef({x:0,y:0}),C=_.useMemo(()=>{switch(n){case Py.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Py.DraggableRect:return i}},[n,i,l]),w=_.useRef(null),A=_.useCallback(()=>{const D=w.current;if(!D)return;const O=v.current.x*S.current.x,T=v.current.y*S.current.y;D.scrollBy(O,T)},[]),E=_.useMemo(()=>a===ES.TreeOrder?[...c].reverse():c,[a,c]);_.useEffect(()=>{if(!o||!c.length||!C){b();return}for(const D of E){if(r?.(D)===!1)continue;const O=c.indexOf(D),T=u[O];if(!T)continue;const{direction:I,speed:N}=dlt(D,T,C,t,h);for(const $ of["x","y"])g[$][I[$]]||(N[$]=0,I[$]=0);if(N.x>0||N.y>0){b(),w.current=D,y(A,s),v.current=N,S.current=I;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,A,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,c,E,u,JSON.stringify(h)])}const Alt={x:{[Xi.Backward]:!1,[Xi.Forward]:!1},y:{[Xi.Backward]:!1,[Xi.Forward]:!1}};function klt(e){let{delta:t,disabled:n}=e;const r=KD(t);return sv(i=>{if(n||!r||!i)return Alt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Xi.Backward]:i.x[Xi.Backward]||o.x===-1,[Xi.Forward]:i.x[Xi.Forward]||o.x===1},y:{[Xi.Backward]:i.y[Xi.Backward]||o.y===-1,[Xi.Forward]:i.y[Xi.Forward]||o.y===1}}},[n,t,r])}function _lt(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return sv(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function Dlt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var ib;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ib||(ib={}));var JD;(function(e){e.Optimized="optimized"})(JD||(JD={}));const IK=new Map;function Olt(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=_.useState(null),{frequency:a,measure:l,strategy:c}=i,u=_.useRef(e),f=v(),h=tb(f),g=_.useCallback(function(S){S===void 0&&(S=[]),!h.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[h]),y=_.useRef(null),b=sv(S=>{if(f&&!n)return IK;if(!S||S===IK||u.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const A=w.node.current,E=A?new CI(l(A),A):null;w.rect.current=E,E&&C.set(w.id,E)}return C}return S},[e,o,n,f,l]);return _.useEffect(()=>{u.current=e},[e]),_.useEffect(()=>{f||g()},[n,f]),_.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),_.useEffect(()=>{f||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,f,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(c){case ib.Always:return!1;case ib.BeforeDragging:return n;default:return!n}}}function Ple(e,t){return sv(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Tlt(e,t){return Ple(e,t)}function Mlt(e){let{callback:t,disabled:n}=e;const r=SI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function GC(e){let{callback:t,disabled:n}=e;const r=SI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function Rlt(e){return new CI(pg(e),e)}function PK(e,t,n){t===void 0&&(t=Rlt);const[r,i]=_.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=Mlt({callback(l){if(e)for(const c of l){const{type:u,target:f}=c;if(u==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=GC({callback:o});return yc(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function Ilt(e){const t=Ple(e);return kle(e,t)}const jK=[];function Plt(e){const t=_.useRef(e),n=sv(r=>e?r&&r!==jK&&e&&t.current&&e.parentNode===t.current.parentNode?r:qC(e):jK,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function jlt(e){const[t,n]=_.useState(null),r=_.useRef(e),i=_.useCallback(o=>{const s=XA(o.target);s&&n(a=>a?(a.set(s,XD(s)),new Map(a)):null)},[]);return _.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const c=XA(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,XD(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const c=XA(l);c?.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>nm(o,s),sl):Rle(e):sl,[e,t])}function $K(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const r=e!==sl;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?nb(e,n.current):sl}function $lt(e){_.useEffect(()=>{if(!WC)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function Llt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function jle(e){return _.useMemo(()=>e?alt(e):null,[e])}const LK=[];function Nlt(e,t){t===void 0&&(t=pg);const[n]=e,r=jle(n?fs(n):null),[i,o]=_.useState(LK);function s(){o(()=>e.length?e.map(l=>Tle(l)?r:new CI(t(l),l)):LK)}const a=GC({callback:s});return yc(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function Flt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ov(t)?t:e}function Blt(e){let{measure:t}=e;const[n,r]=_.useState(null),i=_.useCallback(c=>{for(const{target:u}of c)if(ov(u)){r(f=>{const h=t(u);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=GC({callback:i}),s=_.useCallback(c=>{const u=Flt(c);o?.disconnect(),u&&o?.observe(u),r(u?t(u):null)},[t,o]),[a,l]=wS(s);return _.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const zlt=[{sensor:kI,options:{}},{sensor:EI,options:{}}],Hlt={current:{}},k4={draggable:{measure:OK},droppable:{measure:OK,strategy:ib.WhileDragging,frequency:JD.Optimized},dragOverlay:{measure:pg}};class jy extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Ult={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jy,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:CS},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:k4,measureDroppableContainers:CS,windowRect:null,measuringScheduled:!1},Vlt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:CS,draggableNodes:new Map,over:null,measureDroppableContainers:CS},KC=_.createContext(Vlt),$le=_.createContext(Ult);function Wlt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jy}}}function qlt(e,t){switch(t.type){case Li.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Li.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Li.DragEnd:case Li.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Li.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new jy(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Li.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new jy(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Li.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new jy(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Glt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=_.useContext(KC),o=KD(r),s=KD(n?.id);return _.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!wI(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const f=Fat(u);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function Klt(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function Ylt(e){return _.useMemo(()=>({draggable:{...k4.draggable,...e?.draggable},droppable:{...k4.droppable,...e?.droppable},dragOverlay:{...k4.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Xlt(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=_.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;yc(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),f=kle(u,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=_le(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const Lle=_.createContext({...sl,scaleX:1,scaleY:1});var xd;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(xd||(xd={}));const Zlt=_.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=zlt,collisionDetection:f=elt,measuring:h,modifiers:g,...y}=t;const b=_.useReducer(qlt,void 0,Wlt),[v,S]=b,[C,w]=Wat(),[A,E]=_.useState(xd.Uninitialized),D=A===xd.Initialized,{draggable:{active:O,nodes:T,translate:I},droppable:{containers:N}}=v,$=O!=null?T.get(O):null,R=_.useRef({initial:null,translated:null}),F=_.useMemo(()=>{var Dt;return O!=null?{id:O,data:(Dt=$?.data)!=null?Dt:Hlt,rect:R}:null},[O,$]),j=_.useRef(null),[z,L]=_.useState(null),[q,V]=_.useState(null),U=tb(y,Object.values(y)),K=av("DndDescribedBy",s),B=_.useMemo(()=>N.getEnabled(),[N]),W=Ylt(h),{droppableRects:X,measureDroppableContainers:H,measuringScheduled:Y}=Olt(B,{dragging:D,dependencies:[I.x,I.y],config:W.droppable}),J=_lt(T,O),ne=_.useMemo(()=>q?YD(q):null,[q]),ee=yr(),se=Tlt(J,W.draggable.measure);Xlt({activeNode:O!=null?T.get(O):null,config:ee.layoutShiftCompensation,initialRect:se,measure:W.draggable.measure});const ue=PK(J,W.draggable.measure,se),te=PK(J?J.parentElement:null),Z=_.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=N.getNodeFor((n=Z.current.over)==null?void 0:n.id),oe=Blt({measure:W.dragOverlay.measure}),fe=(r=oe.nodeRef.current)!=null?r:J,be=D?(i=oe.rect)!=null?i:ue:null,De=!!(oe.nodeRef.current&&oe.rect),Oe=Ilt(De?null:ue),Ke=jle(fe?fs(fe):null),xe=Plt(D?re??J:null),Le=Nlt(xe),Me=Klt(g,{transform:{x:I.x-Oe.x,y:I.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:q,active:F,activeNodeRect:ue,containerNodeRect:te,draggingNodeRect:be,over:Z.current.over,overlayNodeRect:oe.rect,scrollableAncestors:xe,scrollableAncestorRects:Le,windowRect:Ke}),ht=ne?nm(ne,I):null,mt=jlt(xe),ze=$K(mt),Pe=$K(mt,[ue]),He=nm(Me,ze),Je=be?rlt(be,Me):null,nt=F&&Je?f({active:F,collisionRect:Je,droppableRects:X,droppableContainers:B,pointerCoordinates:ht}):null,ot=Ale(nt,"id"),[Xe,Lt]=_.useState(null),Nt=De?Me:nm(Me,Pe),Ot=tlt(Nt,(o=Xe?.rect)!=null?o:null,ue),Xn=_.useRef(null),rn=_.useCallback((Dt,jt)=>{let{sensor:Jt,options:jn}=jt;if(j.current==null)return;const on=T.get(j.current);if(!on)return;const St=Dt.nativeEvent,mn=new Jt({active:j.current,activeNode:on,event:St,options:jn,context:Z,onAbort(br){if(!T.get(br))return;const{onDragAbort:le}=U.current,pe={id:br};le?.(pe),C({type:"onDragAbort",event:pe})},onPending(br,ei,le,pe){if(!T.get(br))return;const{onDragPending:Fe}=U.current,Ue={id:br,constraint:ei,initialCoordinates:le,offset:pe};Fe?.(Ue),C({type:"onDragPending",event:Ue})},onStart(br){const ei=j.current;if(ei==null)return;const le=T.get(ei);if(!le)return;const{onDragStart:pe}=U.current,Se={activatorEvent:St,active:{id:ei,data:le.data,rect:R}};Dd.unstable_batchedUpdates(()=>{pe?.(Se),E(xd.Initializing),S({type:Li.DragStart,initialCoordinates:br,active:ei}),C({type:"onDragStart",event:Se}),L(Xn.current),V(St)})},onMove(br){S({type:Li.DragMove,coordinates:br})},onEnd:Qr(Li.DragEnd),onCancel:Qr(Li.DragCancel)});Xn.current=mn;function Qr(br){return async function(){const{active:le,collisions:pe,over:Se,scrollAdjustedTranslate:Fe}=Z.current;let Ue=null;if(le&&Fe){const{cancelDrop:yt}=U.current;Ue={activatorEvent:St,active:le,collisions:pe,delta:Fe,over:Se},br===Li.DragEnd&&typeof yt=="function"&&await Promise.resolve(yt(Ue))&&(br=Li.DragCancel)}j.current=null,Dd.unstable_batchedUpdates(()=>{S({type:br}),E(xd.Uninitialized),Lt(null),L(null),V(null),Xn.current=null;const yt=br===Li.DragEnd?"onDragEnd":"onDragCancel";if(Ue){const rt=U.current[yt];rt?.(Ue),C({type:yt,event:Ue})}})}}},[T]),at=_.useCallback((Dt,jt)=>(Jt,jn)=>{const on=Jt.nativeEvent,St=T.get(jn);if(j.current!==null||!St||on.dndKit||on.defaultPrevented)return;const mn={active:St};Dt(Jt,jt.options,mn)===!0&&(on.dndKit={capturedBy:jt.sensor},j.current=jn,rn(Jt,jt))},[T,rn]),Ht=Dlt(u,at);$lt(u),yc(()=>{ue&&A===xd.Initializing&&E(xd.Initialized)},[ue,A]),_.useEffect(()=>{const{onDragMove:Dt}=U.current,{active:jt,activatorEvent:Jt,collisions:jn,over:on}=Z.current;if(!jt||!Jt)return;const St={active:jt,activatorEvent:Jt,collisions:jn,delta:{x:He.x,y:He.y},over:on};Dd.unstable_batchedUpdates(()=>{Dt?.(St),C({type:"onDragMove",event:St})})},[He.x,He.y]),_.useEffect(()=>{const{active:Dt,activatorEvent:jt,collisions:Jt,droppableContainers:jn,scrollAdjustedTranslate:on}=Z.current;if(!Dt||j.current==null||!jt||!on)return;const{onDragOver:St}=U.current,mn=jn.get(ot),Qr=mn&&mn.rect.current?{id:mn.id,rect:mn.rect.current,data:mn.data,disabled:mn.disabled}:null,br={active:Dt,activatorEvent:jt,collisions:Jt,delta:{x:on.x,y:on.y},over:Qr};Dd.unstable_batchedUpdates(()=>{Lt(Qr),St?.(br),C({type:"onDragOver",event:br})})},[ot]),yc(()=>{Z.current={activatorEvent:q,active:F,activeNode:J,collisionRect:Je,collisions:nt,droppableRects:X,draggableNodes:T,draggingNode:fe,draggingNodeRect:be,droppableContainers:N,over:Xe,scrollableAncestors:xe,scrollAdjustedTranslate:He},R.current={initial:be,translated:Je}},[F,J,nt,Je,T,fe,be,X,N,Xe,xe,He]),Elt({...ee,delta:I,draggingRect:Je,pointerCoordinates:ht,scrollableAncestors:xe,scrollableAncestorRects:Le});const Dn=_.useMemo(()=>({active:F,activeNode:J,activeNodeRect:ue,activatorEvent:q,collisions:nt,containerNodeRect:te,dragOverlay:oe,draggableNodes:T,droppableContainers:N,droppableRects:X,over:Xe,measureDroppableContainers:H,scrollableAncestors:xe,scrollableAncestorRects:Le,measuringConfiguration:W,measuringScheduled:Y,windowRect:Ke}),[F,J,ue,q,nt,te,oe,T,N,X,Xe,H,xe,Le,W,Y,Ke]),Gn=_.useMemo(()=>({activatorEvent:q,activators:Ht,active:F,activeNodeRect:ue,ariaDescribedById:{draggable:K},dispatch:S,draggableNodes:T,over:Xe,measureDroppableContainers:H}),[q,Ht,F,ue,S,K,T,Xe,H]);return qt.createElement(wle.Provider,{value:w},qt.createElement(KC.Provider,{value:Gn},qt.createElement($le.Provider,{value:Dn},qt.createElement(Lle.Provider,{value:Ot},c)),qt.createElement(Glt,{disabled:a?.restoreFocus===!1})),qt.createElement(Kat,{...a,hiddenTextDescribedById:K}));function yr(){const Dt=z?.autoScrollEnabled===!1,jt=typeof l=="object"?l.enabled===!1:l===!1,Jt=D&&!Dt&&!jt;return typeof l=="object"?{...l,enabled:Jt}:{enabled:Jt}}}),Jlt=_.createContext(null),NK="button",Qlt="Draggable";function ect(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=av(Qlt),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:f,over:h}=_.useContext(KC),{role:g=NK,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=_.useContext(v?Lle:Jlt),[C,w]=wS(),[A,E]=wS(),D=Llt(s,t),O=tb(n);yc(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:A,data:O}),()=>{const I=f.get(t);I&&I.key===o&&f.delete(t)}),[f,t]);const T=_.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===NK?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[r,g,b,v,y,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:T,isDragging:v,listeners:r?void 0:D,node:C,over:h,setNodeRef:w,setActivatorNodeRef:E,transform:S}}function tct(){return _.useContext($le)}const nct="Droppable",rct={timeout:25};function ict(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=av(nct),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=_.useContext(KC),u=_.useRef({disabled:n}),f=_.useRef(!1),h=_.useRef(null),g=_.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...rct,...i},S=tb(b??r),C=_.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=GC({callback:C,disabled:y||!s}),A=_.useCallback((T,I)=>{w&&(I&&(w.unobserve(I),f.current=!1),T&&w.observe(T))},[w]),[E,D]=wS(A),O=tb(t);return _.useEffect(()=>{!w||!E.current||(w.disconnect(),f.current=!1,w.observe(E.current))},[E,w]),_.useEffect(()=>(a({type:Li.RegisterDroppable,element:{id:r,key:o,disabled:n,node:E,rect:h,data:O}}),()=>a({type:Li.UnregisterDroppable,key:o,id:r})),[r]),_.useEffect(()=>{n!==u.current.disabled&&(a({type:Li.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,a]),{active:s,rect:h,isOver:l?.id===r,node:E,over:l,setNodeRef:D}}function _I(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function oct(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function A5(e){return e!==null&&e>=0}function sct(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function act(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Nle=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=_I(t,r,n),s=t[i],a=o[i];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},k5={scaleX:1,scaleY:1},lct=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(i===n){const c=o[s];return c?{x:0,y:n<s?c.top+c.height-(a.top+a.height):c.top-a.top,...k5}:null}const l=cct(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...k5}:i<n&&i>=s?{x:0,y:a.height+l,...k5}:{x:0,y:0,...k5}};function cct(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Fle="Sortable",Ble=qt.createContext({activeIndex:-1,containerId:Fle,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Nle,disabled:{draggable:!1,droppable:!1}});function uct(e){let{children:t,id:n,items:r,strategy:i=Nle,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=tct(),f=av(Fle,n),h=a.rect!==null,g=_.useMemo(()=>r.map(D=>typeof D=="object"&&"id"in D?D.id:D),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=c?g.indexOf(c.id):-1,S=_.useRef(g),C=!sct(g,S.current),w=v!==-1&&b===-1||C,A=act(o);yc(()=>{C&&y&&u(g)},[C,g,y,u]),_.useEffect(()=>{S.current=g},[g]);const E=_.useMemo(()=>({activeIndex:b,containerId:f,disabled:A,disableTransforms:w,items:g,overIndex:v,useDragOverlay:h,sortedRects:oct(g,l),strategy:i}),[b,f,A.draggable,A.droppable,w,g,v,l,h,i]);return qt.createElement(Ble.Provider,{value:E},t)}const dct=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return _I(n,r,i).indexOf(t)},fct=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},hct={duration:200,easing:"ease"},zle="transform",pct=rb.Transition.toString({property:zle,duration:0,easing:"linear"}),mct={roleDescription:"sortable"};function gct(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=_.useState(null),a=_.useRef(n);return yc(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const c=pg(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,r,i]),_.useEffect(()=>{o&&s(null)},[o]),o}function yct(e){let{animateLayoutChanges:t=fct,attributes:n,disabled:r,data:i,getNewIndex:o=dct,id:s,strategy:a,resizeObserverConfig:l,transition:c=hct}=e;const{items:u,containerId:f,activeIndex:h,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=_.useContext(Ble),w=bct(r,g),A=u.indexOf(s),E=_.useMemo(()=>({sortable:{containerId:f,index:A,items:u},...i}),[f,i,A,u]),D=_.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:O,node:T,isOver:I,setNodeRef:N}=ict({id:s,data:E,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...l}}),{active:$,activatorEvent:R,activeNodeRect:F,attributes:j,setNodeRef:z,listeners:L,isDragging:q,over:V,setActivatorNodeRef:U,transform:K}=ect({id:s,data:E,attributes:{...mct,...n},disabled:w.draggable}),B=jat(N,z),W=!!$,X=W&&!y&&A5(h)&&A5(v),H=!S&&q,Y=H&&X?K:null,ne=X?Y??(a??C)({rects:b,activeNodeRect:F,activeIndex:h,overIndex:v,index:A}):null,ee=A5(h)&&A5(v)?o({id:s,items:u,activeIndex:h,overIndex:v}):A,se=$?.id,ue=_.useRef({activeId:se,items:u,newIndex:ee,containerId:f}),te=u!==ue.current.items,Z=t({active:$,containerId:f,isDragging:q,isSorting:W,id:s,index:A,items:u,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:c,wasDragging:ue.current.activeId!=null}),re=gct({disabled:!Z,index:A,node:T,rect:O});return _.useEffect(()=>{W&&ue.current.newIndex!==ee&&(ue.current.newIndex=ee),f!==ue.current.containerId&&(ue.current.containerId=f),u!==ue.current.items&&(ue.current.items=u)},[W,ee,f,u]),_.useEffect(()=>{if(se===ue.current.activeId)return;if(se!=null&&ue.current.activeId==null){ue.current.activeId=se;return}const fe=setTimeout(()=>{ue.current.activeId=se},50);return()=>clearTimeout(fe)},[se]),{active:$,activeIndex:h,attributes:j,data:E,rect:O,index:A,newIndex:ee,items:u,isOver:I,isSorting:W,isDragging:q,listeners:L,node:T,overIndex:v,over:V,setNodeRef:B,setActivatorNodeRef:U,setDroppableNodeRef:N,setDraggableNodeRef:z,transform:re??ne,transition:oe()};function oe(){if(re||te&&ue.current.newIndex===A)return pct;if(!(H&&!wI(R)||!c)&&(W||Z))return rb.Transition.toString({...c,property:zle})}}function bct(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function AS(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const vct=[Ln.Down,Ln.Right,Ln.Up,Ln.Left],xct=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(vct.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case Ln.Down:r.top<h.top&&l.push(f);break;case Ln.Up:r.top>h.top&&l.push(f);break;case Ln.Left:r.left>h.left&&l.push(f);break;case Ln.Right:r.left<h.left&&l.push(f);break}});const c=Jat({collisionRect:r,droppableRects:i,droppableContainers:l});let u=Ale(c,"id");if(u===s?.id&&c.length>1&&(u=c[1].id),u!=null){const f=o.get(n.id),h=o.get(u),g=h?i.get(h.id):null,y=h?.node.current;if(y&&g&&f&&h){const v=qC(y).some((D,O)=>a[O]!==D),S=Hle(f,h),C=Sct(f,h),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},A={x:g.left,y:g.top};return w.x&&w.y?A:nb(A,w)}}}};function Hle(e,t){return!AS(e)||!AS(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Sct(e,t){return!AS(e)||!AS(t)||!Hle(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const wct=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=yct({id:e.id}),[l,c]=_.useState(!1);_.useEffect(()=>{_w(e.id).then(c)},[e.id]);const u={transform:rb.Transform.toString(o),transition:s,opacity:a?.5:1};return m.jsx(tr,{ref:i,style:u,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:m.jsxs(gr,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[m.jsx(ce,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:m.jsx(QCe,{})}),m.jsx(Et,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?m.jsx(ce,{component:"img",src:t2(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):m.jsx(rl,{sx:{bgcolor:MT(e),width:40,height:40,boxShadow:2},children:(()=>{const f=TT(e);return m.jsx(f,{sx:{fontSize:24}})})()}),m.jsxs(ce,{sx:{flex:1},children:[m.jsx(ie,{variant:"subtitle1",fontWeight:500,children:e.name}),m.jsxs(ie,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," • Priority: ",e.priority??100]})]})]})})},Cct=()=>{const e=Tu(),{content:t,isLoading:n}=Vm(),r=SCe(),[i,o]=_.useState([]),[s,a]=_.useState(!1);_.useEffect(()=>{if(t){const h=[...t].sort((g,y)=>{const b=g.priority??100,v=y.priority??100;return b-v});o(h),a(!1)}},[t]);const l=Yat(kK(kI),kK(EI,{coordinateGetter:xct})),c=_.useCallback(h=>{const{active:g,over:y}=h;y&&g.id!==y.id&&(o(b=>{const v=b.findIndex(C=>C.id===g.id),S=b.findIndex(C=>C.id===y.id);return _I(b,v,S)}),a(!0))},[]),u=_.useCallback(async()=>{const h=i.map((g,y)=>({id:g.id,priority:(y+1)*10}));try{await r(h),e.show({message:"Startup order saved successfully",severity:"success"}),a(!1)}catch(g){e.show({message:g instanceof Error?g.message:"Failed to save startup order",severity:"error"})}},[i,r,e]),f=_.useMemo(()=>i.map(h=>h.id),[i]);return n?m.jsx(ie,{children:"Loading..."}):m.jsxs(zt,{spacing:3,children:[m.jsx(lw,{items:[{name:"Bridges",to:Pt.bridges},{name:"Startup Order",to:Pt.startup}]}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:2,children:[m.jsx(yb,{color:"primary",fontSize:"large"}),m.jsxs(ce,{children:[m.jsx(ie,{variant:"h5",fontWeight:600,children:"Startup Order"}),m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Drag and drop bridges to set the startup order. Lower positions start first."})]})]}),s&&m.jsx(vn,{severity:"info",action:m.jsx(kt,{color:"inherit",size:"small",startIcon:m.jsx(n6,{}),onClick:u,children:"Save Changes"}),children:"You have unsaved changes to the startup order."}),m.jsx(Zlt,{sensors:l,collisionDetection:Zat,onDragEnd:c,children:m.jsx(uct,{items:f,strategy:lct,children:m.jsx(zt,{spacing:1,children:i.map((h,g)=>m.jsx(wct,{bridge:h,index:g},h.id))})})}),i.length===0&&m.jsx(ie,{color:"text.secondary",textAlign:"center",py:4,children:"No bridges configured yet."}),s&&i.length>0&&m.jsx(ce,{display:"flex",justifyContent:"flex-end",children:m.jsx(kt,{variant:"contained",startIcon:m.jsx(n6,{}),onClick:u,children:"Save Startup Order"})})]})},QA="https://riddix.github.io/home-assistant-matter-hub",Pt={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:QA,faq:{multiFabric:`${QA}/connect-multiple-fabrics`,bridgeConfig:`${QA}/bridge-configuration`}},Ect=[{path:"",element:m.jsx(_2e,{}),children:[{path:"",element:m.jsx(u9e,{})},{path:Pt.bridges,element:m.jsx(a9e,{})},{path:Pt.createBridge,element:m.jsx(JQe,{})},{path:Pt.bridge(":bridgeId"),element:m.jsx(ICe,{})},{path:Pt.editBridge(":bridgeId"),element:m.jsx(QQe,{})},{path:Pt.devices,element:m.jsx(D9e,{})},{path:Pt.networkMap,element:m.jsx(Tat,{})},{path:Pt.health,element:m.jsx(aet,{})},{path:Pt.labels,element:m.jsx(fet,{})},{path:Pt.lockCredentials,element:m.jsx(bet,{})},{path:Pt.settings,element:m.jsx(Pat,{})},{path:Pt.startup,element:m.jsx(Cct,{})},{path:"*",element:m.jsx(vet,{})}]}],Act={items:{isInitialized:!1,isLoading:!1}},kct=FO(Act,e=>{e.addCase(Bo.pending,t=>{t.items.isLoading=!0}).addCase(Bo.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(Bo.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(zX.fulfilled,(t,n)=>{t.items.content?.push(n.payload)}).addCase(UX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(VX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(HX.fulfilled,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.meta.arg);r!==-1&&t.items.content.splice(r,1)}}).addCase(WX,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(qX,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.payload.id);r!==-1?t.items.content[r]=n.payload:t.items.content.push(n.payload)}})}),_ct={byBridge:{}},Dct=FO(_ct,e=>{e.addCase(du.pending,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)}).addCase(du.rejected,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)}).addCase(du.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)})}),Oct={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},ek=FO(Oct,e=>{e.addCase(du.pending,t=>{t.isLoading=!0}).addCase(du.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(du.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),Tct=l2e({reducer:{bridges:kct,devices:Dct}}),DI=Wme({createStyledComponent:me("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ye(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>it({props:e,name:"MuiContainer"})});function Mct(e){return Qe("MuiToolbar",e)}tt("MuiToolbar",["root","gutters","regular","dense"]);const Rct=e=>{const{classes:t,disableGutters:n,variant:r}=e;return et({root:["root",!n&&"gutters",r]},Mct,t)},Ict=me("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ge(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Ule=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,c={...r,component:o,disableGutters:s,variant:a},u=Rct(c);return m.jsx(Ict,{as:o,className:Te(u.root,i),ref:n,ownerState:c,...l})});class Pct extends _.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught:",t,n.componentStack)}render(){return this.state.hasError?m.jsxs(ce,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"60vh",gap:2,p:4,children:[m.jsx(KO,{color:"error",sx:{fontSize:64}}),m.jsx(ie,{variant:"h5",fontWeight:600,children:"Something went wrong"}),m.jsx(ie,{variant:"body2",color:"text.secondary",textAlign:"center",maxWidth:480,children:this.state.error?.message??"An unexpected error occurred."}),m.jsx(kt,{variant:"contained",onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},children:"Reload Page"})]}):this.props.children}}const jct=[{name:"GitHub",url:Pt.githubRepository},{name:"Documentation",url:Pt.documentation}],$ct=()=>m.jsxs(DI,{sx:{mt:16,mb:4},children:[m.jsx(gi,{sx:{mt:4,mb:4}}),m.jsx(dt,{container:!0,spacing:2,justifyContent:"center",children:jct.map((e,t)=>m.jsx(dt,{size:{xs:12,sm:"auto"},children:m.jsx(kt,{fullWidth:!0,size:"small",variant:"outlined",component:aw,href:e.url,target:"_blank",children:e.name})},t.toString()))})]});function Lct(e){return Qe("MuiAppBar",e)}tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Nct=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ye(t)}`,`position${ye(n)}`]};return et(i,Lct,r)},FK=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,Fct=me(Ur,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ye(n.position)}`],t[`color${ye(n.color)}`]]}})(Ge(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Fn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?FK(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?FK(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),Bct=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,c={...r,color:o,position:a,enableColorOnDark:s},u=Nct(c);return m.jsx(Fct,{square:!0,component:"header",ownerState:c,elevation:4,className:Te(u.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function zct(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=tl(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function Hct(e){return typeof e=="function"?e():e}function _5(e,t,n){const r=Hct(n),i=zct(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const Uct=_.forwardRef(function(t,n){const r=ro(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:f=i,in:h,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:A=o,TransitionComponent:E=Ta,...D}=t,O=_.useRef(null),T=Tr(gf(l),O,n),I=V=>U=>{V&&(U===void 0?V(O.current):V(O.current,U))},N=I((V,U)=>{_5(u,V,c),IO(V),g&&g(V,U)}),$=I((V,U)=>{const K=Kd({timeout:A,style:w,easing:f},{mode:"enter"});V.style.webkitTransition=r.transitions.create("-webkit-transform",{...K}),V.style.transition=r.transitions.create("transform",{...K}),V.style.webkitTransform="none",V.style.transform="none",b&&b(V,U)}),R=I(y),F=I(C),j=I(V=>{const U=Kd({timeout:A,style:w,easing:f},{mode:"exit"});V.style.webkitTransition=r.transitions.create("-webkit-transform",U),V.style.transition=r.transitions.create("transform",U),_5(u,V,c),v&&v(V)}),z=I(V=>{V.style.webkitTransition="",V.style.transition="",S&&S(V)}),L=V=>{s&&s(O.current,V)},q=_.useCallback(()=>{O.current&&_5(u,O.current,c)},[u,c]);return _.useEffect(()=>{if(h||u==="down"||u==="right")return;const V=OO(()=>{O.current&&_5(u,O.current,c)}),U=tl(O.current);return U.addEventListener("resize",V),()=>{V.clear(),U.removeEventListener("resize",V)}},[u,h,c]),_.useEffect(()=>{h||q()},[h,q]),m.jsx(E,{nodeRef:O,onEnter:N,onEntered:R,onEntering:$,onExit:j,onExited:z,onExiting:F,addEndListener:L,appear:a,in:h,timeout:A,...D,children:(V,{ownerState:U,...K})=>_.cloneElement(l,{ref:T,style:{visibility:V==="exited"&&!h?"hidden":void 0,...w,...l.props.style},...K})})});function Vct(e){return Qe("MuiDrawer",e)}tt("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Vle=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},Wct=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ye(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,r!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return et(i,Vct,t)},qct=me(ZO,{name:"MuiDrawer",slot:"Root",overridesResolver:Vle})(Ge(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),Gct=me("div",{shouldForwardProp:io,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Vle})({flex:"0 0 auto"}),Kct=me(Ur,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(Ge(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Wle={left:"right",right:"left",top:"down",bottom:"up"};function Yct(e){return["left","right"].includes(e)}function Xct({direction:e},t){return e==="rtl"&&Yct(t)?Wle[t]:t}const Zct=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiDrawer"}),i=ro(),o=mf(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:A=s,variant:E="temporary",slots:D={},slotProps:O={},...T}=r,I=_.useRef(!1);_.useEffect(()=>{I.current=!0},[]);const N=Xct({direction:o?"rtl":"ltr"},a),R={...r,anchor:a,elevation:f,open:v,variant:E,...T},F=Wct(R),j={slots:{transition:w,...D},slotProps:{paper:S,transition:C,...O,backdrop:TO(O.backdrop||{...l,...g},{transitionDuration:A})}},[z,L]=lt("root",{ref:n,elementType:qct,className:Te(F.root,F.modal,u),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...j,...T,...y},additionalProps:{open:v,onClose:b,hideBackdrop:h,slots:{backdrop:j.slots.backdrop},slotProps:{backdrop:j.slotProps.backdrop}}}),[q,V]=lt("paper",{elementType:Kct,shouldForwardComponentProp:!0,className:Te(F.paper,S.className),ownerState:R,externalForwardedProps:j,additionalProps:{elevation:E==="temporary"?f:0,square:!0,...E==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[U,K]=lt("docked",{elementType:Gct,ref:n,className:Te(F.root,F.docked,u),ownerState:R,externalForwardedProps:j,additionalProps:T}),[B,W]=lt("transition",{elementType:Uct,ownerState:R,externalForwardedProps:j,additionalProps:{in:v,direction:Wle[N],timeout:A,appear:I.current}}),X=m.jsx(q,{...V,children:c});if(E==="permanent")return m.jsx(U,{...K,children:X});const H=m.jsx(B,{...W,children:X});return E==="persistent"?m.jsx(U,{...K,children:H}):m.jsx(z,{...L,children:H})}),Jct=XY({themeId:da}),Qct={error:vf,warn:iw,info:YO,debug:Aw},eut=({open:e,onClose:t})=>{const n=ro(),r=_.useMemo(()=>({error:n.palette.error.main,warn:n.palette.warning.main,info:n.palette.info.main,debug:n.palette.secondary.main}),[n]),[i,o]=_.useState([]),[s,a]=_.useState(!0),[l,c]=_.useState("error,warn,info".split(",")),[u,f]=_.useState(""),[h,g]=_.useState(!0),y=_.useCallback(async()=>{try{const w=new URLSearchParams({level:l.join(","),limit:"500",...u&&{search:u}}),A=await fetch(`api/logs?${w}`);if(A.ok){const E=await A.json();o(E.entries)}}catch(w){console.error("Failed to fetch logs:",w)}finally{a(!1)}},[l,u]);_.useEffect(()=>{e&&y()},[e,y]),_.useEffect(()=>{if(!h||!e)return;const w=setInterval(y,5e3);return()=>clearInterval(w)},[h,e,y]);const b=w=>{c(Array.isArray(w.target.value)?w.target.value:[w.target.value])},v=w=>{f(w.target.value)},S=async()=>{try{await fetch("api/logs",{method:"DELETE"}),o([])}catch(w){console.error("Failed to clear logs:",w)}},C=w=>{const A=Qct[w]||YO;return m.jsx(A,{sx:{fontSize:16,color:r[w]}})};return m.jsxs(vu,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[m.jsxs(Su,{sx:{display:"flex",alignItems:"center",gap:1},children:[m.jsx(Aw,{}),"System Logs",m.jsx(ce,{sx:{flexGrow:1}}),m.jsx(cn,{title:"Auto Refresh",children:m.jsx(Et,{label:h?"Auto":"Manual",color:h?"success":"default",size:"small",onClick:()=>g(!h),sx:{cursor:"pointer"}})}),m.jsx(_n,{onClick:t,children:m.jsx(qCe,{})})]}),m.jsxs(xu,{children:[m.jsx(zt,{spacing:2,sx:{mb:2},children:m.jsxs(zt,{direction:"row",spacing:2,alignItems:"center",children:[m.jsxs(pa,{size:"small",sx:{minWidth:200},children:[m.jsx(sc,{children:"Log Level"}),m.jsxs(sa,{value:l,label:"Log Level",onChange:b,multiple:!0,renderValue:w=>m.jsx(ce,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(w)?w:[w]).map(A=>m.jsx(Et,{label:A.toUpperCase(),size:"small",sx:{backgroundColor:r[A],color:"white"}},A))}),children:[m.jsx(er,{value:"error",children:"Error"}),m.jsx(er,{value:"warn",children:"Warning"}),m.jsx(er,{value:"info",children:"Info"}),m.jsx(er,{value:"debug",children:"Debug"})]})]}),m.jsx(Lr,{size:"small",placeholder:"Search logs...",value:u,onChange:v,sx:{flexGrow:1}}),m.jsx(kt,{variant:"outlined",onClick:y,children:"Refresh"}),m.jsx(kt,{variant:"outlined",color:"error",onClick:S,children:"Clear"})]})}),m.jsx(ce,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:s?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(ie,{children:"Loading logs..."})}):i.length===0?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(ie,{color:"text.secondary",children:"No logs found"})}):m.jsx(zt,{spacing:1,children:i.map((w,A)=>m.jsxs(ce,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[C(w.level),m.jsx(ie,{variant:"caption",color:"text.secondary",children:new Date(w.timestamp).toLocaleString()}),m.jsx(Et,{label:w.level.toUpperCase(),size:"small",sx:{backgroundColor:r[w.level],color:n.palette.getContrastText(r[w.level]??n.palette.grey[500]),fontSize:"0.7rem",height:20}})]}),m.jsx(ie,{sx:{ml:3},children:w.message}),w.context&&m.jsx(ie,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(w.context,null,2)})]},`${w.timestamp}-${w.level}-${A}`))})})]}),m.jsx(Xd,{children:m.jsx(kt,{onClick:t,children:"Close"})})]})};function BK(){const{isConnected:e}=A2e(),[t,n]=_.useState(null),[r,i]=_.useState(!1);_.useEffect(()=>{const y=async()=>{try{const v=await fetch("api/health");if(v.ok){const S=await v.json();n(S),i(!1)}else i(!0)}catch{i(!0)}};y();const b=setInterval(y,3e4);return()=>clearInterval(b)},[]);const o=y=>{const b=Math.floor(y/3600),v=Math.floor(y%3600/60);return b>0?`${b}h ${v}m`:`${v}m`},s=t?.status==="healthy"&&!r,a=t?.services?.bridges,l=a&&a.total>0&&a.running===a.total,c=a&&a.total===0,u=t?m.jsxs(ce,{sx:{p:.5},children:[m.jsxs("div",{children:[m.jsx("strong",{children:"Version:"})," ",t.version??"Unknown"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"Uptime:"})," ",o(t.uptime??0)]}),t.services?.bridges&&m.jsxs("div",{children:[m.jsx("strong",{children:"Bridges:"})," ",t.services.bridges.running??0,"/",t.services.bridges.total??0," running",(t.services.bridges.stopped??0)>0&&` (${t.services.bridges.stopped} stopped)`]}),t.services?.homeAssistant&&m.jsxs("div",{children:[m.jsx("strong",{children:"Home Assistant:"})," ",t.services.homeAssistant.connected?"Connected":"Disconnected"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"WebSocket:"})," ",e?"Connected":"Disconnected"]})]}):"Loading health status...",f=()=>r||!s?m.jsx(vf,{fontSize:"small"}):l?m.jsx(Mu,{fontSize:"small"}):m.jsx(dw,{fontSize:"small"}),h=()=>r||!s?"error":!l||!e?"warning":"success",g=()=>r?"Error":s?e?c?"No Bridges":l?"Online":"Starting":"Offline":"Unhealthy";return m.jsx(cn,{title:u,arrow:!0,children:m.jsx(Et,{icon:f(),label:g(),color:h(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const tut=e=>_.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{style:{display:"inline"}},_.createElement("path",{style:{fill:"#18bcf2",fillOpacity:1,strokeWidth:.266194},d:"m 49.149143,1.473171 38.513568,38.536435 c 0,0 1.248354,1.186052 2.207681,3.092371 0.959329,1.906323 1.10864,4.600698 1.10864,4.600698 v 36.786372 c 0,0 -0.01549,1.748506 -1.49842,3.050572 -1.482931,1.302064 -3.333077,1.362947 -3.333077,1.362947 l -81.325658,7.7e-5 c 0,0 -1.7523855,-0.0091 -3.17112,-1.352526 C -0.07808495,85.913164 0.05953025,84.487808 0.05953025,84.487808 V 47.704546 c 0,0 -0.0018381,-2.218618 0.95921785,-4.315832 0.9610554,-2.097209 2.3010618,-3.355005 2.3010618,-3.355005 L 41.545959,1.4719546 c 0,0 1.465224,-1.46837077 3.753488,-1.46837077 2.288268,0 3.849696,1.46958717 3.849696,1.46958717 z"}),_.createElement("path",{style:{fill:"#ffffff",fillOpacity:1,strokeWidth:.175841},d:"m 31.689717,32.051124 c 2.813363,2.331095 6.157331,3.89845 9.721813,4.556421 V 17.180647 l 3.873694,-2.282955 3.870527,2.282955 V 36.60772 c 3.565364,-0.658847 6.910387,-2.226204 9.725159,-4.556417 l 7.032345,4.154609 c -11.437354,11.557779 -29.852321,11.557779 -41.290025,0 z m 8.546732,49.60988 C 44.314996,65.760441 35.09933,49.470196 19.574984,45.139543 v 8.312381 c 3.383916,1.32244 6.386113,3.496288 8.728705,6.320026 L 11.83076,69.485301 v 4.56907 l 3.873697,2.270836 16.469936,-9.713534 c 1.224356,3.48294 1.56683,7.225375 0.996449,10.879778 z M 70.977694,45.139543 c -15.515726,4.34014 -24.72189,20.626696 -20.643519,36.521461 l 7.047658,-4.15742 c -0.569325,-3.654411 -0.2265,-7.3965 0.996449,-10.87979 l 16.457611,9.701233 3.870711,-2.283125 v -4.55677 L 62.233673,59.77195 c 2.342772,-2.822684 5.34497,-4.996533 8.728708,-6.320026 z"}))),nut="home-assistant-matter-hub",rut={name:nut};function iut(){const[e,t]=_.useState("2.1.0-alpha.428");return _.useEffect(()=>{fetch("api/health").then(n=>n.ok?n.json():null).then(n=>{n?.version&&t(n.version)}).catch(()=>{})},[]),_.useMemo(()=>({name:rut.name,version:e}),[e])}const out=e=>{const t=iut();return m.jsxs(ce,{component:Du,to:Pt.dashboard,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[m.jsx(tut,{style:{height:"40px"}}),m.jsx(ie,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ye).join("-")}),e.large&&m.jsx(ie,{variant:"caption",component:"span",children:t.version})]})},sut=()=>{const e=Jct("(min-width:600px)"),{mode:t,setMode:n}=KS(),[r,i]=_.useState(!1),[o,s]=_.useState(!1),a=hf(),l=()=>{n(t==="dark"?"light":"dark")},c=[{label:"Dashboard",icon:m.jsx(CT,{}),to:Pt.dashboard},{label:"Bridges",icon:m.jsx(t6,{}),to:Pt.bridges},{label:"All Devices",icon:m.jsx(Fs,{}),to:Pt.devices},{label:"Network Map",icon:m.jsx(bT,{}),to:Pt.networkMap},{label:"Startup Order",icon:m.jsx(yb,{}),to:Pt.startup},{label:"Lock Credentials",icon:m.jsx(uu,{}),to:Pt.lockCredentials},{label:"Filter Reference",icon:m.jsx(ET,{}),to:Pt.labels},{label:"Settings",icon:m.jsx(wb,{}),to:Pt.settings},{label:t==="dark"?"Light Mode":"Dark Mode",icon:t==="dark"?m.jsx(a8e,{}):m.jsx(YCe,{}),onClick:l},{label:"System Logs",icon:m.jsx(Aw,{}),onClick:()=>i(!0)},{label:"Health Dashboard",icon:m.jsx(QO,{}),to:Pt.health}],u=f=>{s(!1),f.onClick?f.onClick():f.to&&a(f.to)};return m.jsxs(ce,{children:[m.jsx(Bct,{sx:{height:"72px"},children:m.jsx(Ule,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:m.jsxs(DI,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsx(out,{large:e}),e?m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.map(f=>f.to?m.jsx(cn,{title:f.label,children:m.jsx(_n,{component:Du,to:f.to,sx:{color:"inherit"},children:f.icon})},f.label):m.jsx(cn,{title:f.label,children:m.jsx(_n,{onClick:f.onClick,sx:{color:"inherit"},children:f.icon})},f.label)),m.jsx(BK,{})]}):m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:.5},children:[m.jsx(BK,{}),m.jsx(_n,{onClick:()=>s(!0),sx:{color:"inherit"},children:m.jsx(l8e,{})})]})]})})}),m.jsx(Zct,{anchor:"right",open:o,onClose:()=>s(!1),children:m.jsx(bc,{sx:{width:250},children:c.map(f=>m.jsxs(obe,{onClick:()=>u(f),children:[m.jsx(Ul,{children:f.icon}),m.jsx(Va,{primary:f.label})]},f.label))})}),m.jsx(eut,{open:r,onClose:()=>i(!1)})]})},aut=()=>m.jsxs(ce,{children:[m.jsx(sut,{}),m.jsx(Ule,{}),m.jsx(DI,{sx:{p:2},children:m.jsx(Pct,{children:m.jsx(yY,{})})}),m.jsx($ct,{})]}),lut=WS({colorSchemes:{light:{palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2"},background:{default:"#f5f5f5",paper:"#ffffff"}}},dark:{palette:{primary:{main:"#90caf9",light:"#e3f2fd",dark:"#42a5f5"},secondary:{main:"#ce93d8",light:"#f3e5f5",dark:"#ab47bc"},background:{default:"#121212",paper:"#1e1e1e"}}}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h1:{fontSize:"2.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h3:{fontSize:"1.75rem",fontWeight:500},h4:{fontSize:"1.5rem",fontWeight:500},h5:{fontSize:"1.25rem",fontWeight:500},h6:{fontSize:"1rem",fontWeight:500}},shape:{borderRadius:8},components:{MuiCard:{styleOverrides:{root:{transition:"transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 20px rgba(0,0,0,0.12)"}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500}}},MuiChip:{styleOverrides:{root:{fontWeight:500}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}}}});let _4=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");_4?.startsWith("http")&&(_4=new URL(_4).pathname);const cut=Hhe([{path:"/",element:m.jsx(aut,{}),children:Ect}],{basename:_4});sde.createRoot(document.getElementById("root")).render(m.jsx(_.StrictMode,{children:m.jsx(Cde,{store:Tct,children:m.jsxs(n1e,{theme:lut,children:[m.jsx(Zge,{}),m.jsx(dX,{styles:{".rjsf-field-array > .MuiFormControl-root > .MuiPaper-root > .MuiBox-root > .MuiGrid-root > .MuiGrid-root:has(> .MuiBox-root > .MuiPaper-root > .MuiBox-root > .rjsf-field)":{overflow:"initial !important",flexGrow:1}}}),m.jsx(k2e,{children:m.jsx(yye,{children:m.jsx(epe,{router:cut})})})]})})}));
|
|
499
|
+
`},Gat={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Kat(e){let{announcements:t=Gat,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=qat}=e;const{announce:o,announcement:s}=Uat(),a=av("DndLiveRegion"),[l,c]=_.useState(!1);if(_.useEffect(()=>{c(!0)},[]),Vat(_.useMemo(()=>({onDragStart(f){let{active:h}=f;o(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:g}=f;t.onDragMove&&o(t.onDragMove({active:h,over:g}))},onDragOver(f){let{active:h,over:g}=f;o(t.onDragOver({active:h,over:g}))},onDragEnd(f){let{active:h,over:g}=f;o(t.onDragEnd({active:h,over:g}))},onDragCancel(f){let{active:h,over:g}=f;o(t.onDragCancel({active:h,over:g}))}}),[o,t])),!l)return null;const u=qt.createElement(qt.Fragment,null,qt.createElement(zat,{id:r,value:i.draggable}),qt.createElement(Hat,{id:a,announcement:s}));return n?Dd.createPortal(u,n):u}var Li;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Li||(Li={}));function CS(){}function kK(e,t){return _.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function Yat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return _.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const sl=Object.freeze({x:0,y:0});function Cle(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function Ele(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function Xat(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function _K(e){let{left:t,top:n,height:r,width:i}=e;return[{x:t,y:n},{x:t+i,y:n},{x:t,y:n+r},{x:t+i,y:n+r}]}function Ale(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function DK(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const Zat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=DK(t,t.left,t.top),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=Cle(DK(l),i);o.push({id:a,data:{droppableContainer:s,value:c}})}}return o.sort(Ele)},Jat=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=_K(t),o=[];for(const s of r){const{id:a}=s,l=n.get(a);if(l){const c=_K(l),u=i.reduce((h,g,y)=>h+Cle(c[y],g),0),f=Number((u/4).toFixed(4));o.push({id:a,data:{droppableContainer:s,value:f}})}}return o.sort(Ele)};function Qat(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),o=Math.min(t.top+t.height,e.top+e.height),s=i-r,a=o-n;if(r<i&&n<o){const l=t.width*t.height,c=e.width*e.height,u=s*a,f=u/(l+c-u);return Number(f.toFixed(4))}return 0}const elt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const i=[];for(const o of r){const{id:s}=o,a=n.get(s);if(a){const l=Qat(a,t);l>0&&i.push({id:s,data:{droppableContainer:o,value:l}})}}return i.sort(Xat)};function tlt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function kle(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:sl}function nlt(e){return function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return i.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...n})}}const rlt=nlt(1);function ilt(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function olt(e,t,n){const r=ilt(t);if(!r)return e;const{scaleX:i,scaleY:o,x:s,y:a}=r,l=e.left-s-(1-i)*parseFloat(n),c=e.top-a-(1-o)*parseFloat(n.slice(n.indexOf(" ")+1)),u=i?e.width/i:e.width,f=o?e.height/o:e.height;return{width:u,height:f,top:c,right:l+u,bottom:c+f,left:l}}const slt={ignoreTransform:!1};function pg(e,t){t===void 0&&(t=slt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:c,transformOrigin:u}=fs(e).getComputedStyle(e);c&&(n=olt(n,c,u))}const{top:r,left:i,width:o,height:s,bottom:a,right:l}=n;return{top:r,left:i,width:o,height:s,bottom:a,right:l}}function OK(e){return pg(e,{ignoreTransform:!0})}function alt(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function llt(e,t){return t===void 0&&(t=fs(e).getComputedStyle(e)),t.position==="fixed"}function clt(e,t){t===void 0&&(t=fs(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const o=t[i];return typeof o=="string"?n.test(o):!1})}function qC(e,t){const n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(xI(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!ov(i)||xle(i)||n.includes(i))return n;const o=fs(e).getComputedStyle(i);return i!==e&&clt(i,o)&&n.push(i),llt(i,o)?n:r(i.parentNode)}return e?r(e):n}function _le(e){const[t]=qC(e,1);return t??null}function XA(e){return!WC||!e?null:fg(e)?e:vI(e)?xI(e)||e===hg(e).scrollingElement?window:ov(e)?e:null:null}function Dle(e){return fg(e)?e.scrollX:e.scrollLeft}function Ole(e){return fg(e)?e.scrollY:e.scrollTop}function XD(e){return{x:Dle(e),y:Ole(e)}}var Xi;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Xi||(Xi={}));function Tle(e){return!WC||!e?!1:e===document.scrollingElement}function Mle(e){const t={x:0,y:0},n=Tle(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},i=e.scrollTop<=t.y,o=e.scrollLeft<=t.x,s=e.scrollTop>=r.y,a=e.scrollLeft>=r.x;return{isTop:i,isLeft:o,isBottom:s,isRight:a,maxScroll:r,minScroll:t}}const ult={x:.2,y:.2};function dlt(e,t,n,r,i){let{top:o,left:s,right:a,bottom:l}=n;r===void 0&&(r=10),i===void 0&&(i=ult);const{isTop:c,isBottom:u,isLeft:f,isRight:h}=Mle(e),g={x:0,y:0},y={x:0,y:0},b={height:t.height*i.y,width:t.width*i.x};return!c&&o<=t.top+b.height?(g.y=Xi.Backward,y.y=r*Math.abs((t.top+b.height-o)/b.height)):!u&&l>=t.bottom-b.height&&(g.y=Xi.Forward,y.y=r*Math.abs((t.bottom-b.height-l)/b.height)),!h&&a>=t.right-b.width?(g.x=Xi.Forward,y.x=r*Math.abs((t.right-b.width-a)/b.width)):!f&&s<=t.left+b.width&&(g.x=Xi.Backward,y.x=r*Math.abs((t.left+b.width-s)/b.width)),{direction:g,speed:y}}function flt(e){if(e===document.scrollingElement){const{innerWidth:o,innerHeight:s}=window;return{top:0,left:0,right:o,bottom:s,width:o,height:s}}const{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Rle(e){return e.reduce((t,n)=>nm(t,XD(n)),sl)}function hlt(e){return e.reduce((t,n)=>t+Dle(n),0)}function plt(e){return e.reduce((t,n)=>t+Ole(n),0)}function mlt(e,t){if(t===void 0&&(t=pg),!e)return;const{top:n,left:r,bottom:i,right:o}=t(e);_le(e)&&(i<=0||o<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const glt=[["x",["left","right"],hlt],["y",["top","bottom"],plt]];class CI{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=qC(n),i=Rle(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[o,s,a]of glt)for(const l of s)Object.defineProperty(this,l,{get:()=>{const c=a(r),u=i[o]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Iy{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var i;(i=this.target)==null||i.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function ylt(e){const{EventTarget:t}=fs(e);return e instanceof t?e:hg(e)}function ZA(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var na;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(na||(na={}));function TK(e){e.preventDefault()}function blt(e){e.stopPropagation()}var Ln;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ln||(Ln={}));const Ile={start:[Ln.Space,Ln.Enter],cancel:[Ln.Esc],end:[Ln.Space,Ln.Enter,Ln.Tab]},vlt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case Ln.Right:return{...n,x:n.x+25};case Ln.Left:return{...n,x:n.x-25};case Ln.Down:return{...n,y:n.y+25};case Ln.Up:return{...n,y:n.y-25}}};class EI{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Iy(hg(n)),this.windowListeners=new Iy(fs(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(na.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&mlt(r),n(sl)}handleKeyDown(t){if(wI(t)){const{active:n,context:r,options:i}=this.props,{keyboardCodes:o=Ile,coordinateGetter:s=vlt,scrollBehavior:a="smooth"}=i,{code:l}=t;if(o.end.includes(l)){this.handleEnd(t);return}if(o.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:sl;this.referenceCoordinates||(this.referenceCoordinates=u);const f=s(t,{active:n,context:r.current,currentCoordinates:u});if(f){const h=nb(f,u),g={x:0,y:0},{scrollableAncestors:y}=r.current;for(const b of y){const v=t.code,{isTop:S,isRight:C,isLeft:w,isBottom:A,maxScroll:E,minScroll:D}=Mle(b),O=flt(b),T={x:Math.min(v===Ln.Right?O.right-O.width/2:O.right,Math.max(v===Ln.Right?O.left:O.left+O.width/2,f.x)),y:Math.min(v===Ln.Down?O.bottom-O.height/2:O.bottom,Math.max(v===Ln.Down?O.top:O.top+O.height/2,f.y))},I=v===Ln.Right&&!C||v===Ln.Left&&!w,N=v===Ln.Down&&!A||v===Ln.Up&&!S;if(I&&T.x!==f.x){const $=b.scrollLeft+h.x,R=v===Ln.Right&&$<=E.x||v===Ln.Left&&$>=D.x;if(R&&!h.y){b.scrollTo({left:$,behavior:a});return}R?g.x=b.scrollLeft-$:g.x=v===Ln.Right?b.scrollLeft-E.x:b.scrollLeft-D.x,g.x&&b.scrollBy({left:-g.x,behavior:a});break}else if(N&&T.y!==f.y){const $=b.scrollTop+h.y,R=v===Ln.Down&&$<=E.y||v===Ln.Up&&$>=D.y;if(R&&!h.x){b.scrollTo({top:$,behavior:a});return}R?g.y=b.scrollTop-$:g.y=v===Ln.Down?b.scrollTop-E.y:b.scrollTop-D.y,g.y&&b.scrollBy({top:-g.y,behavior:a});break}}this.handleMove(t,nm(nb(f,this.referenceCoordinates),g))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}EI.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ile,onActivation:i}=t,{active:o}=n;const{code:s}=e.nativeEvent;if(r.start.includes(s)){const a=o.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function MK(e){return!!(e&&"distance"in e)}function RK(e){return!!(e&&"delay"in e)}class AI{constructor(t,n,r){var i;r===void 0&&(r=ylt(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:o}=t,{target:s}=o;this.props=t,this.events=n,this.document=hg(s),this.documentListeners=new Iy(this.document),this.listeners=new Iy(r),this.windowListeners=new Iy(fs(s)),this.initialCoordinates=(i=YD(o))!=null?i:sl,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(na.Resize,this.handleCancel),this.windowListeners.add(na.DragStart,TK),this.windowListeners.add(na.VisibilityChange,this.handleCancel),this.windowListeners.add(na.ContextMenu,TK),this.documentListeners.add(na.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(RK(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(MK(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:i}=this.props;i(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(na.Click,blt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(na.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:i,props:o}=this,{onMove:s,options:{activationConstraint:a}}=o;if(!i)return;const l=(n=YD(t))!=null?n:sl,c=nb(i,l);if(!r&&a){if(MK(a)){if(a.tolerance!=null&&ZA(c,a.tolerance))return this.handleCancel();if(ZA(c,a.distance))return this.handleStart()}if(RK(a)&&ZA(c,a.tolerance))return this.handleCancel();this.handlePending(a,c);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===Ln.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const xlt={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class kI extends AI{constructor(t){const{event:n}=t,r=hg(n.target);super(t,xlt,r)}}kI.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const Slt={move:{name:"mousemove"},end:{name:"mouseup"}};var ZD;(function(e){e[e.RightClick=2]="RightClick"})(ZD||(ZD={}));class wlt extends AI{constructor(t){super(t,Slt,hg(t.event.target))}}wlt.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ZD.RightClick?!1:(r?.({event:n}),!0)}}];const JA={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Clt extends AI{constructor(t){super(t,JA)}static setup(){return window.addEventListener(JA.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(JA.move.name,t)};function t(){}}}Clt.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var Py;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Py||(Py={}));var ES;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(ES||(ES={}));function Elt(e){let{acceleration:t,activator:n=Py.Pointer,canScroll:r,draggingRect:i,enabled:o,interval:s=5,order:a=ES.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:f,threshold:h}=e;const g=klt({delta:f,disabled:!o}),[y,b]=$at(),v=_.useRef({x:0,y:0}),S=_.useRef({x:0,y:0}),C=_.useMemo(()=>{switch(n){case Py.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Py.DraggableRect:return i}},[n,i,l]),w=_.useRef(null),A=_.useCallback(()=>{const D=w.current;if(!D)return;const O=v.current.x*S.current.x,T=v.current.y*S.current.y;D.scrollBy(O,T)},[]),E=_.useMemo(()=>a===ES.TreeOrder?[...c].reverse():c,[a,c]);_.useEffect(()=>{if(!o||!c.length||!C){b();return}for(const D of E){if(r?.(D)===!1)continue;const O=c.indexOf(D),T=u[O];if(!T)continue;const{direction:I,speed:N}=dlt(D,T,C,t,h);for(const $ of["x","y"])g[$][I[$]]||(N[$]=0,I[$]=0);if(N.x>0||N.y>0){b(),w.current=D,y(A,s),v.current=N,S.current=I;return}}v.current={x:0,y:0},S.current={x:0,y:0},b()},[t,A,r,b,o,s,JSON.stringify(C),JSON.stringify(g),y,c,E,u,JSON.stringify(h)])}const Alt={x:{[Xi.Backward]:!1,[Xi.Forward]:!1},y:{[Xi.Backward]:!1,[Xi.Forward]:!1}};function klt(e){let{delta:t,disabled:n}=e;const r=KD(t);return sv(i=>{if(n||!r||!i)return Alt;const o={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Xi.Backward]:i.x[Xi.Backward]||o.x===-1,[Xi.Forward]:i.x[Xi.Forward]||o.x===1},y:{[Xi.Backward]:i.y[Xi.Backward]||o.y===-1,[Xi.Forward]:i.y[Xi.Forward]||o.y===1}}},[n,t,r])}function _lt(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return sv(i=>{var o;return t==null?null:(o=r??i)!=null?o:null},[r,t])}function Dlt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{const{sensor:i}=r,o=i.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,r)}));return[...n,...o]},[]),[e,t])}var ib;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ib||(ib={}));var JD;(function(e){e.Optimized="optimized"})(JD||(JD={}));const IK=new Map;function Olt(e,t){let{dragging:n,dependencies:r,config:i}=t;const[o,s]=_.useState(null),{frequency:a,measure:l,strategy:c}=i,u=_.useRef(e),f=v(),h=tb(f),g=_.useCallback(function(S){S===void 0&&(S=[]),!h.current&&s(C=>C===null?S:C.concat(S.filter(w=>!C.includes(w))))},[h]),y=_.useRef(null),b=sv(S=>{if(f&&!n)return IK;if(!S||S===IK||u.current!==e||o!=null){const C=new Map;for(let w of e){if(!w)continue;if(o&&o.length>0&&!o.includes(w.id)&&w.rect.current){C.set(w.id,w.rect.current);continue}const A=w.node.current,E=A?new CI(l(A),A):null;w.rect.current=E,E&&C.set(w.id,E)}return C}return S},[e,o,n,f,l]);return _.useEffect(()=>{u.current=e},[e]),_.useEffect(()=>{f||g()},[n,f]),_.useEffect(()=>{o&&o.length>0&&s(null)},[JSON.stringify(o)]),_.useEffect(()=>{f||typeof a!="number"||y.current!==null||(y.current=setTimeout(()=>{g(),y.current=null},a))},[a,f,g,...r]),{droppableRects:b,measureDroppableContainers:g,measuringScheduled:o!=null};function v(){switch(c){case ib.Always:return!1;case ib.BeforeDragging:return n;default:return!n}}}function Ple(e,t){return sv(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Tlt(e,t){return Ple(e,t)}function Mlt(e){let{callback:t,disabled:n}=e;const r=SI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:o}=window;return new o(r)},[r,n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function GC(e){let{callback:t,disabled:n}=e;const r=SI(t),i=_.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:o}=window;return new o(r)},[n]);return _.useEffect(()=>()=>i?.disconnect(),[i]),i}function Rlt(e){return new CI(pg(e),e)}function PK(e,t,n){t===void 0&&(t=Rlt);const[r,i]=_.useState(null);function o(){i(l=>{if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=Mlt({callback(l){if(e)for(const c of l){const{type:u,target:f}=c;if(u==="childList"&&f instanceof HTMLElement&&f.contains(e)){o();break}}}}),a=GC({callback:o});return yc(()=>{o(),e?(a?.observe(e),s?.observe(document.body,{childList:!0,subtree:!0})):(a?.disconnect(),s?.disconnect())},[e]),r}function Ilt(e){const t=Ple(e);return kle(e,t)}const jK=[];function Plt(e){const t=_.useRef(e),n=sv(r=>e?r&&r!==jK&&e&&t.current&&e.parentNode===t.current.parentNode?r:qC(e):jK,[e]);return _.useEffect(()=>{t.current=e},[e]),n}function jlt(e){const[t,n]=_.useState(null),r=_.useRef(e),i=_.useCallback(o=>{const s=XA(o.target);s&&n(a=>a?(a.set(s,XD(s)),new Map(a)):null)},[]);return _.useEffect(()=>{const o=r.current;if(e!==o){s(o);const a=e.map(l=>{const c=XA(l);return c?(c.addEventListener("scroll",i,{passive:!0}),[c,XD(c)]):null}).filter(l=>l!=null);n(a.length?new Map(a):null),r.current=e}return()=>{s(e),s(o)};function s(a){a.forEach(l=>{const c=XA(l);c?.removeEventListener("scroll",i)})}},[i,e]),_.useMemo(()=>e.length?t?Array.from(t.values()).reduce((o,s)=>nm(o,s),sl):Rle(e):sl,[e,t])}function $K(e,t){t===void 0&&(t=[]);const n=_.useRef(null);return _.useEffect(()=>{n.current=null},t),_.useEffect(()=>{const r=e!==sl;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?nb(e,n.current):sl}function $lt(e){_.useEffect(()=>{if(!WC)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function Llt(e,t){return _.useMemo(()=>e.reduce((n,r)=>{let{eventName:i,handler:o}=r;return n[i]=s=>{o(s,t)},n},{}),[e,t])}function jle(e){return _.useMemo(()=>e?alt(e):null,[e])}const LK=[];function Nlt(e,t){t===void 0&&(t=pg);const[n]=e,r=jle(n?fs(n):null),[i,o]=_.useState(LK);function s(){o(()=>e.length?e.map(l=>Tle(l)?r:new CI(t(l),l)):LK)}const a=GC({callback:s});return yc(()=>{a?.disconnect(),s(),e.forEach(l=>a?.observe(l))},[e]),i}function Flt(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ov(t)?t:e}function Blt(e){let{measure:t}=e;const[n,r]=_.useState(null),i=_.useCallback(c=>{for(const{target:u}of c)if(ov(u)){r(f=>{const h=t(u);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),o=GC({callback:i}),s=_.useCallback(c=>{const u=Flt(c);o?.disconnect(),u&&o?.observe(u),r(u?t(u):null)},[t,o]),[a,l]=wS(s);return _.useMemo(()=>({nodeRef:a,rect:n,setRef:l}),[n,a,l])}const zlt=[{sensor:kI,options:{}},{sensor:EI,options:{}}],Hlt={current:{}},k4={draggable:{measure:OK},droppable:{measure:OK,strategy:ib.WhileDragging,frequency:JD.Optimized},dragOverlay:{measure:pg}};class jy extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Ult={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jy,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:CS},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:k4,measureDroppableContainers:CS,windowRect:null,measuringScheduled:!1},Vlt={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:CS,draggableNodes:new Map,over:null,measureDroppableContainers:CS},KC=_.createContext(Vlt),$le=_.createContext(Ult);function Wlt(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jy}}}function qlt(e,t){switch(t.type){case Li.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Li.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Li.DragEnd:case Li.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Li.RegisterDroppable:{const{element:n}=t,{id:r}=n,i=new jy(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case Li.SetDroppableDisabled:{const{id:n,key:r,disabled:i}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new jy(e.droppable.containers);return s.set(n,{...o,disabled:i}),{...e,droppable:{...e.droppable,containers:s}}}case Li.UnregisterDroppable:{const{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;const o=new jy(e.droppable.containers);return o.delete(n),{...e,droppable:{...e.droppable,containers:o}}}default:return e}}function Glt(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:i}=_.useContext(KC),o=KD(r),s=KD(n?.id);return _.useEffect(()=>{if(!t&&!r&&o&&s!=null){if(!wI(o)||document.activeElement===o.target)return;const a=i.get(s);if(!a)return;const{activatorNode:l,node:c}=a;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const f=Fat(u);if(f){f.focus();break}}})}},[r,t,i,s,o]),null}function Klt(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((i,o)=>o({transform:i,...r}),n):n}function Ylt(e){return _.useMemo(()=>({draggable:{...k4.draggable,...e?.draggable},droppable:{...k4.droppable,...e?.droppable},dragOverlay:{...k4.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Xlt(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e;const o=_.useRef(!1),{x:s,y:a}=typeof i=="boolean"?{x:i,y:i}:i;yc(()=>{if(!s&&!a||!t){o.current=!1;return}if(o.current||!r)return;const c=t?.node.current;if(!c||c.isConnected===!1)return;const u=n(c),f=kle(u,r);if(s||(f.x=0),a||(f.y=0),o.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=_le(c);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,r,n])}const Lle=_.createContext({...sl,scaleX:1,scaleY:1});var xd;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(xd||(xd={}));const Zlt=_.memo(function(t){var n,r,i,o;let{id:s,accessibility:a,autoScroll:l=!0,children:c,sensors:u=zlt,collisionDetection:f=elt,measuring:h,modifiers:g,...y}=t;const b=_.useReducer(qlt,void 0,Wlt),[v,S]=b,[C,w]=Wat(),[A,E]=_.useState(xd.Uninitialized),D=A===xd.Initialized,{draggable:{active:O,nodes:T,translate:I},droppable:{containers:N}}=v,$=O!=null?T.get(O):null,R=_.useRef({initial:null,translated:null}),F=_.useMemo(()=>{var Dt;return O!=null?{id:O,data:(Dt=$?.data)!=null?Dt:Hlt,rect:R}:null},[O,$]),j=_.useRef(null),[z,L]=_.useState(null),[q,V]=_.useState(null),U=tb(y,Object.values(y)),K=av("DndDescribedBy",s),B=_.useMemo(()=>N.getEnabled(),[N]),W=Ylt(h),{droppableRects:X,measureDroppableContainers:H,measuringScheduled:Y}=Olt(B,{dragging:D,dependencies:[I.x,I.y],config:W.droppable}),J=_lt(T,O),ne=_.useMemo(()=>q?YD(q):null,[q]),ee=yr(),se=Tlt(J,W.draggable.measure);Xlt({activeNode:O!=null?T.get(O):null,config:ee.layoutShiftCompensation,initialRect:se,measure:W.draggable.measure});const ue=PK(J,W.draggable.measure,se),te=PK(J?J.parentElement:null),Z=_.useRef({activatorEvent:null,active:null,activeNode:J,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:T,draggingNode:null,draggingNodeRect:null,droppableContainers:N,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),re=N.getNodeFor((n=Z.current.over)==null?void 0:n.id),oe=Blt({measure:W.dragOverlay.measure}),fe=(r=oe.nodeRef.current)!=null?r:J,be=D?(i=oe.rect)!=null?i:ue:null,De=!!(oe.nodeRef.current&&oe.rect),Oe=Ilt(De?null:ue),Ke=jle(fe?fs(fe):null),xe=Plt(D?re??J:null),Le=Nlt(xe),Me=Klt(g,{transform:{x:I.x-Oe.x,y:I.y-Oe.y,scaleX:1,scaleY:1},activatorEvent:q,active:F,activeNodeRect:ue,containerNodeRect:te,draggingNodeRect:be,over:Z.current.over,overlayNodeRect:oe.rect,scrollableAncestors:xe,scrollableAncestorRects:Le,windowRect:Ke}),ht=ne?nm(ne,I):null,mt=jlt(xe),ze=$K(mt),Pe=$K(mt,[ue]),He=nm(Me,ze),Je=be?rlt(be,Me):null,nt=F&&Je?f({active:F,collisionRect:Je,droppableRects:X,droppableContainers:B,pointerCoordinates:ht}):null,ot=Ale(nt,"id"),[Xe,Lt]=_.useState(null),Nt=De?Me:nm(Me,Pe),Ot=tlt(Nt,(o=Xe?.rect)!=null?o:null,ue),Xn=_.useRef(null),rn=_.useCallback((Dt,jt)=>{let{sensor:Jt,options:jn}=jt;if(j.current==null)return;const on=T.get(j.current);if(!on)return;const St=Dt.nativeEvent,mn=new Jt({active:j.current,activeNode:on,event:St,options:jn,context:Z,onAbort(br){if(!T.get(br))return;const{onDragAbort:le}=U.current,pe={id:br};le?.(pe),C({type:"onDragAbort",event:pe})},onPending(br,ei,le,pe){if(!T.get(br))return;const{onDragPending:Fe}=U.current,Ue={id:br,constraint:ei,initialCoordinates:le,offset:pe};Fe?.(Ue),C({type:"onDragPending",event:Ue})},onStart(br){const ei=j.current;if(ei==null)return;const le=T.get(ei);if(!le)return;const{onDragStart:pe}=U.current,Se={activatorEvent:St,active:{id:ei,data:le.data,rect:R}};Dd.unstable_batchedUpdates(()=>{pe?.(Se),E(xd.Initializing),S({type:Li.DragStart,initialCoordinates:br,active:ei}),C({type:"onDragStart",event:Se}),L(Xn.current),V(St)})},onMove(br){S({type:Li.DragMove,coordinates:br})},onEnd:Qr(Li.DragEnd),onCancel:Qr(Li.DragCancel)});Xn.current=mn;function Qr(br){return async function(){const{active:le,collisions:pe,over:Se,scrollAdjustedTranslate:Fe}=Z.current;let Ue=null;if(le&&Fe){const{cancelDrop:yt}=U.current;Ue={activatorEvent:St,active:le,collisions:pe,delta:Fe,over:Se},br===Li.DragEnd&&typeof yt=="function"&&await Promise.resolve(yt(Ue))&&(br=Li.DragCancel)}j.current=null,Dd.unstable_batchedUpdates(()=>{S({type:br}),E(xd.Uninitialized),Lt(null),L(null),V(null),Xn.current=null;const yt=br===Li.DragEnd?"onDragEnd":"onDragCancel";if(Ue){const rt=U.current[yt];rt?.(Ue),C({type:yt,event:Ue})}})}}},[T]),at=_.useCallback((Dt,jt)=>(Jt,jn)=>{const on=Jt.nativeEvent,St=T.get(jn);if(j.current!==null||!St||on.dndKit||on.defaultPrevented)return;const mn={active:St};Dt(Jt,jt.options,mn)===!0&&(on.dndKit={capturedBy:jt.sensor},j.current=jn,rn(Jt,jt))},[T,rn]),Ht=Dlt(u,at);$lt(u),yc(()=>{ue&&A===xd.Initializing&&E(xd.Initialized)},[ue,A]),_.useEffect(()=>{const{onDragMove:Dt}=U.current,{active:jt,activatorEvent:Jt,collisions:jn,over:on}=Z.current;if(!jt||!Jt)return;const St={active:jt,activatorEvent:Jt,collisions:jn,delta:{x:He.x,y:He.y},over:on};Dd.unstable_batchedUpdates(()=>{Dt?.(St),C({type:"onDragMove",event:St})})},[He.x,He.y]),_.useEffect(()=>{const{active:Dt,activatorEvent:jt,collisions:Jt,droppableContainers:jn,scrollAdjustedTranslate:on}=Z.current;if(!Dt||j.current==null||!jt||!on)return;const{onDragOver:St}=U.current,mn=jn.get(ot),Qr=mn&&mn.rect.current?{id:mn.id,rect:mn.rect.current,data:mn.data,disabled:mn.disabled}:null,br={active:Dt,activatorEvent:jt,collisions:Jt,delta:{x:on.x,y:on.y},over:Qr};Dd.unstable_batchedUpdates(()=>{Lt(Qr),St?.(br),C({type:"onDragOver",event:br})})},[ot]),yc(()=>{Z.current={activatorEvent:q,active:F,activeNode:J,collisionRect:Je,collisions:nt,droppableRects:X,draggableNodes:T,draggingNode:fe,draggingNodeRect:be,droppableContainers:N,over:Xe,scrollableAncestors:xe,scrollAdjustedTranslate:He},R.current={initial:be,translated:Je}},[F,J,nt,Je,T,fe,be,X,N,Xe,xe,He]),Elt({...ee,delta:I,draggingRect:Je,pointerCoordinates:ht,scrollableAncestors:xe,scrollableAncestorRects:Le});const Dn=_.useMemo(()=>({active:F,activeNode:J,activeNodeRect:ue,activatorEvent:q,collisions:nt,containerNodeRect:te,dragOverlay:oe,draggableNodes:T,droppableContainers:N,droppableRects:X,over:Xe,measureDroppableContainers:H,scrollableAncestors:xe,scrollableAncestorRects:Le,measuringConfiguration:W,measuringScheduled:Y,windowRect:Ke}),[F,J,ue,q,nt,te,oe,T,N,X,Xe,H,xe,Le,W,Y,Ke]),Gn=_.useMemo(()=>({activatorEvent:q,activators:Ht,active:F,activeNodeRect:ue,ariaDescribedById:{draggable:K},dispatch:S,draggableNodes:T,over:Xe,measureDroppableContainers:H}),[q,Ht,F,ue,S,K,T,Xe,H]);return qt.createElement(wle.Provider,{value:w},qt.createElement(KC.Provider,{value:Gn},qt.createElement($le.Provider,{value:Dn},qt.createElement(Lle.Provider,{value:Ot},c)),qt.createElement(Glt,{disabled:a?.restoreFocus===!1})),qt.createElement(Kat,{...a,hiddenTextDescribedById:K}));function yr(){const Dt=z?.autoScrollEnabled===!1,jt=typeof l=="object"?l.enabled===!1:l===!1,Jt=D&&!Dt&&!jt;return typeof l=="object"?{...l,enabled:Jt}:{enabled:Jt}}}),Jlt=_.createContext(null),NK="button",Qlt="Draggable";function ect(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e;const o=av(Qlt),{activators:s,activatorEvent:a,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:f,over:h}=_.useContext(KC),{role:g=NK,roleDescription:y="draggable",tabIndex:b=0}=i??{},v=l?.id===t,S=_.useContext(v?Lle:Jlt),[C,w]=wS(),[A,E]=wS(),D=Llt(s,t),O=tb(n);yc(()=>(f.set(t,{id:t,key:o,node:C,activatorNode:A,data:O}),()=>{const I=f.get(t);I&&I.key===o&&f.delete(t)}),[f,t]);const T=_.useMemo(()=>({role:g,tabIndex:b,"aria-disabled":r,"aria-pressed":v&&g===NK?!0:void 0,"aria-roledescription":y,"aria-describedby":u.draggable}),[r,g,b,v,y,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:c,attributes:T,isDragging:v,listeners:r?void 0:D,node:C,over:h,setNodeRef:w,setActivatorNodeRef:E,transform:S}}function tct(){return _.useContext($le)}const nct="Droppable",rct={timeout:25};function ict(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e;const o=av(nct),{active:s,dispatch:a,over:l,measureDroppableContainers:c}=_.useContext(KC),u=_.useRef({disabled:n}),f=_.useRef(!1),h=_.useRef(null),g=_.useRef(null),{disabled:y,updateMeasurementsFor:b,timeout:v}={...rct,...i},S=tb(b??r),C=_.useCallback(()=>{if(!f.current){f.current=!0;return}g.current!=null&&clearTimeout(g.current),g.current=setTimeout(()=>{c(Array.isArray(S.current)?S.current:[S.current]),g.current=null},v)},[v]),w=GC({callback:C,disabled:y||!s}),A=_.useCallback((T,I)=>{w&&(I&&(w.unobserve(I),f.current=!1),T&&w.observe(T))},[w]),[E,D]=wS(A),O=tb(t);return _.useEffect(()=>{!w||!E.current||(w.disconnect(),f.current=!1,w.observe(E.current))},[E,w]),_.useEffect(()=>(a({type:Li.RegisterDroppable,element:{id:r,key:o,disabled:n,node:E,rect:h,data:O}}),()=>a({type:Li.UnregisterDroppable,key:o,id:r})),[r]),_.useEffect(()=>{n!==u.current.disabled&&(a({type:Li.SetDroppableDisabled,id:r,key:o,disabled:n}),u.current.disabled=n)},[r,o,n,a]),{active:s,rect:h,isOver:l?.id===r,node:E,over:l,setNodeRef:D}}function _I(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function oct(e,t){return e.reduce((n,r,i)=>{const o=t.get(r);return o&&(n[i]=o),n},Array(e.length))}function A5(e){return e!==null&&e>=0}function sct(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function act(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Nle=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e;const o=_I(t,r,n),s=t[i],a=o[i];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},k5={scaleX:1,scaleY:1},lct=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:i,rects:o,overIndex:s}=e;const a=(t=o[n])!=null?t:r;if(!a)return null;if(i===n){const c=o[s];return c?{x:0,y:n<s?c.top+c.height-(a.top+a.height):c.top-a.top,...k5}:null}const l=cct(o,i,n);return i>n&&i<=s?{x:0,y:-a.height-l,...k5}:i<n&&i>=s?{x:0,y:a.height+l,...k5}:{x:0,y:0,...k5}};function cct(e,t,n){const r=e[t],i=e[t-1],o=e[t+1];return r?n<t?i?r.top-(i.top+i.height):o?o.top-(r.top+r.height):0:o?o.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}const Fle="Sortable",Ble=qt.createContext({activeIndex:-1,containerId:Fle,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Nle,disabled:{draggable:!1,droppable:!1}});function uct(e){let{children:t,id:n,items:r,strategy:i=Nle,disabled:o=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:c,measureDroppableContainers:u}=tct(),f=av(Fle,n),h=a.rect!==null,g=_.useMemo(()=>r.map(D=>typeof D=="object"&&"id"in D?D.id:D),[r]),y=s!=null,b=s?g.indexOf(s.id):-1,v=c?g.indexOf(c.id):-1,S=_.useRef(g),C=!sct(g,S.current),w=v!==-1&&b===-1||C,A=act(o);yc(()=>{C&&y&&u(g)},[C,g,y,u]),_.useEffect(()=>{S.current=g},[g]);const E=_.useMemo(()=>({activeIndex:b,containerId:f,disabled:A,disableTransforms:w,items:g,overIndex:v,useDragOverlay:h,sortedRects:oct(g,l),strategy:i}),[b,f,A.draggable,A.droppable,w,g,v,l,h,i]);return qt.createElement(Ble.Provider,{value:E},t)}const dct=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return _I(n,r,i).indexOf(t)},fct=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:o,newIndex:s,previousItems:a,previousContainerId:l,transition:c}=e;return!c||!r||a!==o&&i===s?!1:n?!0:s!==i&&t===l},hct={duration:200,easing:"ease"},zle="transform",pct=rb.Transition.toString({property:zle,duration:0,easing:"linear"}),mct={roleDescription:"sortable"};function gct(e){let{disabled:t,index:n,node:r,rect:i}=e;const[o,s]=_.useState(null),a=_.useRef(n);return yc(()=>{if(!t&&n!==a.current&&r.current){const l=i.current;if(l){const c=pg(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&s(u)}}n!==a.current&&(a.current=n)},[t,n,r,i]),_.useEffect(()=>{o&&s(null)},[o]),o}function yct(e){let{animateLayoutChanges:t=fct,attributes:n,disabled:r,data:i,getNewIndex:o=dct,id:s,strategy:a,resizeObserverConfig:l,transition:c=hct}=e;const{items:u,containerId:f,activeIndex:h,disabled:g,disableTransforms:y,sortedRects:b,overIndex:v,useDragOverlay:S,strategy:C}=_.useContext(Ble),w=bct(r,g),A=u.indexOf(s),E=_.useMemo(()=>({sortable:{containerId:f,index:A,items:u},...i}),[f,i,A,u]),D=_.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:O,node:T,isOver:I,setNodeRef:N}=ict({id:s,data:E,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:D,...l}}),{active:$,activatorEvent:R,activeNodeRect:F,attributes:j,setNodeRef:z,listeners:L,isDragging:q,over:V,setActivatorNodeRef:U,transform:K}=ect({id:s,data:E,attributes:{...mct,...n},disabled:w.draggable}),B=jat(N,z),W=!!$,X=W&&!y&&A5(h)&&A5(v),H=!S&&q,Y=H&&X?K:null,ne=X?Y??(a??C)({rects:b,activeNodeRect:F,activeIndex:h,overIndex:v,index:A}):null,ee=A5(h)&&A5(v)?o({id:s,items:u,activeIndex:h,overIndex:v}):A,se=$?.id,ue=_.useRef({activeId:se,items:u,newIndex:ee,containerId:f}),te=u!==ue.current.items,Z=t({active:$,containerId:f,isDragging:q,isSorting:W,id:s,index:A,items:u,newIndex:ue.current.newIndex,previousItems:ue.current.items,previousContainerId:ue.current.containerId,transition:c,wasDragging:ue.current.activeId!=null}),re=gct({disabled:!Z,index:A,node:T,rect:O});return _.useEffect(()=>{W&&ue.current.newIndex!==ee&&(ue.current.newIndex=ee),f!==ue.current.containerId&&(ue.current.containerId=f),u!==ue.current.items&&(ue.current.items=u)},[W,ee,f,u]),_.useEffect(()=>{if(se===ue.current.activeId)return;if(se!=null&&ue.current.activeId==null){ue.current.activeId=se;return}const fe=setTimeout(()=>{ue.current.activeId=se},50);return()=>clearTimeout(fe)},[se]),{active:$,activeIndex:h,attributes:j,data:E,rect:O,index:A,newIndex:ee,items:u,isOver:I,isSorting:W,isDragging:q,listeners:L,node:T,overIndex:v,over:V,setNodeRef:B,setActivatorNodeRef:U,setDroppableNodeRef:N,setDraggableNodeRef:z,transform:re??ne,transition:oe()};function oe(){if(re||te&&ue.current.newIndex===A)return pct;if(!(H&&!wI(R)||!c)&&(W||Z))return rb.Transition.toString({...c,property:zle})}}function bct(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function AS(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const vct=[Ln.Down,Ln.Right,Ln.Up,Ln.Left],xct=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:i,droppableContainers:o,over:s,scrollableAncestors:a}}=t;if(vct.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];o.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=i.get(f.id);if(h)switch(e.code){case Ln.Down:r.top<h.top&&l.push(f);break;case Ln.Up:r.top>h.top&&l.push(f);break;case Ln.Left:r.left>h.left&&l.push(f);break;case Ln.Right:r.left<h.left&&l.push(f);break}});const c=Jat({collisionRect:r,droppableRects:i,droppableContainers:l});let u=Ale(c,"id");if(u===s?.id&&c.length>1&&(u=c[1].id),u!=null){const f=o.get(n.id),h=o.get(u),g=h?i.get(h.id):null,y=h?.node.current;if(y&&g&&f&&h){const v=qC(y).some((D,O)=>a[O]!==D),S=Hle(f,h),C=Sct(f,h),w=v||!S?{x:0,y:0}:{x:C?r.width-g.width:0,y:C?r.height-g.height:0},A={x:g.left,y:g.top};return w.x&&w.y?A:nb(A,w)}}}};function Hle(e,t){return!AS(e)||!AS(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Sct(e,t){return!AS(e)||!AS(t)||!Hle(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const wct=({bridge:e,index:t})=>{const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:a}=yct({id:e.id}),[l,c]=_.useState(!1);_.useEffect(()=>{_w(e.id).then(c)},[e.id]);const u={transform:rb.Transform.toString(o),transition:s,opacity:a?.5:1};return m.jsx(tr,{ref:i,style:u,variant:"outlined",sx:{cursor:"grab","&:active":{cursor:"grabbing"},bgcolor:a?"action.selected":"background.paper",width:"fit-content"},children:m.jsxs(gr,{sx:{display:"flex",alignItems:"center",gap:1.5,py:1,"&:last-child":{pb:1}},children:[m.jsx(ce,{...n,...r,sx:{display:"flex",alignItems:"center",color:"text.secondary"},children:m.jsx(QCe,{})}),m.jsx(Et,{label:t+1,size:"small",color:"primary",sx:{minWidth:32,fontWeight:"bold"}}),l?m.jsx(ce,{component:"img",src:t2(e.id),alt:e.name,sx:{width:40,height:40,borderRadius:"50%",objectFit:"cover",boxShadow:2}}):m.jsx(rl,{sx:{bgcolor:MT(e),width:40,height:40,boxShadow:2},children:(()=>{const f=TT(e);return m.jsx(f,{sx:{fontSize:24}})})()}),m.jsxs(ce,{sx:{flex:1},children:[m.jsx(ie,{variant:"subtitle1",fontWeight:500,children:e.name}),m.jsxs(ie,{variant:"caption",color:"text.secondary",children:["Port: ",e.port," • Priority: ",e.priority??100]})]})]})})},Cct=()=>{const e=Tu(),{content:t,isLoading:n}=Vm(),r=SCe(),[i,o]=_.useState([]),[s,a]=_.useState(!1);_.useEffect(()=>{if(t){const h=[...t].sort((g,y)=>{const b=g.priority??100,v=y.priority??100;return b-v});o(h),a(!1)}},[t]);const l=Yat(kK(kI),kK(EI,{coordinateGetter:xct})),c=_.useCallback(h=>{const{active:g,over:y}=h;y&&g.id!==y.id&&(o(b=>{const v=b.findIndex(C=>C.id===g.id),S=b.findIndex(C=>C.id===y.id);return _I(b,v,S)}),a(!0))},[]),u=_.useCallback(async()=>{const h=i.map((g,y)=>({id:g.id,priority:(y+1)*10}));try{await r(h),e.show({message:"Startup order saved successfully",severity:"success"}),a(!1)}catch(g){e.show({message:g instanceof Error?g.message:"Failed to save startup order",severity:"error"})}},[i,r,e]),f=_.useMemo(()=>i.map(h=>h.id),[i]);return n?m.jsx(ie,{children:"Loading..."}):m.jsxs(zt,{spacing:3,children:[m.jsx(lw,{items:[{name:"Bridges",to:Pt.bridges},{name:"Startup Order",to:Pt.startup}]}),m.jsxs(ce,{display:"flex",alignItems:"center",gap:2,children:[m.jsx(yb,{color:"primary",fontSize:"large"}),m.jsxs(ce,{children:[m.jsx(ie,{variant:"h5",fontWeight:600,children:"Startup Order"}),m.jsx(ie,{variant:"body2",color:"text.secondary",children:"Drag and drop bridges to set the startup order. Lower positions start first."})]})]}),s&&m.jsx(vn,{severity:"info",action:m.jsx(kt,{color:"inherit",size:"small",startIcon:m.jsx(n6,{}),onClick:u,children:"Save Changes"}),children:"You have unsaved changes to the startup order."}),m.jsx(Zlt,{sensors:l,collisionDetection:Zat,onDragEnd:c,children:m.jsx(uct,{items:f,strategy:lct,children:m.jsx(zt,{spacing:1,children:i.map((h,g)=>m.jsx(wct,{bridge:h,index:g},h.id))})})}),i.length===0&&m.jsx(ie,{color:"text.secondary",textAlign:"center",py:4,children:"No bridges configured yet."}),s&&i.length>0&&m.jsx(ce,{display:"flex",justifyContent:"flex-end",children:m.jsx(kt,{variant:"contained",startIcon:m.jsx(n6,{}),onClick:u,children:"Save Startup Order"})})]})},QA="https://riddix.github.io/home-assistant-matter-hub",Pt={dashboard:"/",bridges:"/bridges",bridge:e=>`/bridges/${e}`,createBridge:"/bridges/create",editBridge:e=>`/bridges/${e}/edit`,devices:"/devices",networkMap:"/network-map",health:"/health",labels:"/labels",lockCredentials:"/lock-credentials",settings:"/settings",startup:"/startup",githubRepository:"https://github.com/riddix/home-assistant-matter-hub/",documentation:QA,faq:{multiFabric:`${QA}/connect-multiple-fabrics`,bridgeConfig:`${QA}/bridge-configuration`}},Ect=[{path:"",element:m.jsx(_2e,{}),children:[{path:"",element:m.jsx(u9e,{})},{path:Pt.bridges,element:m.jsx(a9e,{})},{path:Pt.createBridge,element:m.jsx(JQe,{})},{path:Pt.bridge(":bridgeId"),element:m.jsx(ICe,{})},{path:Pt.editBridge(":bridgeId"),element:m.jsx(QQe,{})},{path:Pt.devices,element:m.jsx(D9e,{})},{path:Pt.networkMap,element:m.jsx(Tat,{})},{path:Pt.health,element:m.jsx(aet,{})},{path:Pt.labels,element:m.jsx(fet,{})},{path:Pt.lockCredentials,element:m.jsx(bet,{})},{path:Pt.settings,element:m.jsx(Pat,{})},{path:Pt.startup,element:m.jsx(Cct,{})},{path:"*",element:m.jsx(vet,{})}]}],Act={items:{isInitialized:!1,isLoading:!1}},kct=FO(Act,e=>{e.addCase(Bo.pending,t=>{t.items.isLoading=!0}).addCase(Bo.rejected,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=void 0,t.items.error=n.error}).addCase(Bo.fulfilled,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(zX.fulfilled,(t,n)=>{t.items.content?.push(n.payload)}).addCase(UX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(VX.fulfilled,(t,n)=>{const r=t.items.content?.findIndex(i=>i.id===n.payload.id)??-1;r!==-1&&(t.items.content[r]=n.payload)}).addCase(HX.fulfilled,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.meta.arg);r!==-1&&t.items.content.splice(r,1)}}).addCase(WX,(t,n)=>{t.items.isInitialized=!0,t.items.isLoading=!1,t.items.content=n.payload,t.items.error=void 0}).addCase(qX,(t,n)=>{if(t.items.content){const r=t.items.content.findIndex(i=>i.id===n.payload.id);r!==-1?t.items.content[r]=n.payload:t.items.content.push(n.payload)}})}),_ct={byBridge:{}},Dct=FO(_ct,e=>{e.addCase(du.pending,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)}).addCase(du.rejected,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)}).addCase(du.fulfilled,(t,n)=>{t.byBridge[n.meta.arg]=ek(t.byBridge[n.meta.arg],n)})}),Oct={isInitialized:!1,isLoading:!1,content:void 0,error:void 0},ek=FO(Oct,e=>{e.addCase(du.pending,t=>{t.isLoading=!0}).addCase(du.rejected,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=void 0,t.error=n.error}).addCase(du.fulfilled,(t,n)=>{t.isInitialized=!0,t.isLoading=!1,t.content=n.payload,t.error=void 0})}),Tct=l2e({reducer:{bridges:kct,devices:Dct}}),DI=Wme({createStyledComponent:me("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${ye(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>it({props:e,name:"MuiContainer"})});function Mct(e){return Qe("MuiToolbar",e)}tt("MuiToolbar",["root","gutters","regular","dense"]);const Rct=e=>{const{classes:t,disableGutters:n,variant:r}=e;return et({root:["root",!n&&"gutters",r]},Mct,t)},Ict=me("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ge(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),Ule=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiToolbar"}),{className:i,component:o="div",disableGutters:s=!1,variant:a="regular",...l}=r,c={...r,component:o,disableGutters:s,variant:a},u=Rct(c);return m.jsx(Ict,{as:o,className:Te(u.root,i),ref:n,ownerState:c,...l})});class Pct extends _.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("ErrorBoundary caught:",t,n.componentStack)}render(){return this.state.hasError?m.jsxs(ce,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"60vh",gap:2,p:4,children:[m.jsx(KO,{color:"error",sx:{fontSize:64}}),m.jsx(ie,{variant:"h5",fontWeight:600,children:"Something went wrong"}),m.jsx(ie,{variant:"body2",color:"text.secondary",textAlign:"center",maxWidth:480,children:this.state.error?.message??"An unexpected error occurred."}),m.jsx(kt,{variant:"contained",onClick:()=>{this.setState({hasError:!1,error:null}),window.location.reload()},children:"Reload Page"})]}):this.props.children}}const jct=[{name:"GitHub",url:Pt.githubRepository},{name:"Documentation",url:Pt.documentation}],$ct=()=>m.jsxs(DI,{sx:{mt:16,mb:4},children:[m.jsx(gi,{sx:{mt:4,mb:4}}),m.jsx(dt,{container:!0,spacing:2,justifyContent:"center",children:jct.map((e,t)=>m.jsx(dt,{size:{xs:12,sm:"auto"},children:m.jsx(kt,{fullWidth:!0,size:"small",variant:"outlined",component:aw,href:e.url,target:"_blank",children:e.name})},t.toString()))})]});function Lct(e){return Qe("MuiAppBar",e)}tt("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const Nct=e=>{const{color:t,position:n,classes:r}=e,i={root:["root",`color${ye(t)}`,`position${ye(n)}`]};return et(i,Lct,r)},FK=(e,t)=>e?`${e.replace(")","")}, ${t})`:t,Fct=me(Ur,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${ye(n.position)}`],t[`color${ye(n.color)}`]]}})(Ge(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit",color:"var(--AppBar-color)"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Fn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?FK(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?FK(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),Bct=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiAppBar"}),{className:i,color:o="primary",enableColorOnDark:s=!1,position:a="fixed",...l}=r,c={...r,color:o,position:a,enableColorOnDark:s},u=Nct(c);return m.jsx(Fct,{square:!0,component:"header",ownerState:c,elevation:4,className:Te(u.root,i,a==="fixed"&&"mui-fixed"),ref:n,...l})});function zct(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=tl(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function Hct(e){return typeof e=="function"?e():e}function _5(e,t,n){const r=Hct(n),i=zct(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const Uct=_.forwardRef(function(t,n){const r=ro(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:f=i,in:h,onEnter:g,onEntered:y,onEntering:b,onExit:v,onExited:S,onExiting:C,style:w,timeout:A=o,TransitionComponent:E=Ta,...D}=t,O=_.useRef(null),T=Tr(gf(l),O,n),I=V=>U=>{V&&(U===void 0?V(O.current):V(O.current,U))},N=I((V,U)=>{_5(u,V,c),IO(V),g&&g(V,U)}),$=I((V,U)=>{const K=Kd({timeout:A,style:w,easing:f},{mode:"enter"});V.style.webkitTransition=r.transitions.create("-webkit-transform",{...K}),V.style.transition=r.transitions.create("transform",{...K}),V.style.webkitTransform="none",V.style.transform="none",b&&b(V,U)}),R=I(y),F=I(C),j=I(V=>{const U=Kd({timeout:A,style:w,easing:f},{mode:"exit"});V.style.webkitTransition=r.transitions.create("-webkit-transform",U),V.style.transition=r.transitions.create("transform",U),_5(u,V,c),v&&v(V)}),z=I(V=>{V.style.webkitTransition="",V.style.transition="",S&&S(V)}),L=V=>{s&&s(O.current,V)},q=_.useCallback(()=>{O.current&&_5(u,O.current,c)},[u,c]);return _.useEffect(()=>{if(h||u==="down"||u==="right")return;const V=OO(()=>{O.current&&_5(u,O.current,c)}),U=tl(O.current);return U.addEventListener("resize",V),()=>{V.clear(),U.removeEventListener("resize",V)}},[u,h,c]),_.useEffect(()=>{h||q()},[h,q]),m.jsx(E,{nodeRef:O,onEnter:N,onEntered:R,onEntering:$,onExit:j,onExited:z,onExiting:F,addEndListener:L,appear:a,in:h,timeout:A,...D,children:(V,{ownerState:U,...K})=>_.cloneElement(l,{ref:T,style:{visibility:V==="exited"&&!h?"hidden":void 0,...w,...l.props.style},...K})})});function Vct(e){return Qe("MuiDrawer",e)}tt("MuiDrawer",["root","docked","paper","anchorLeft","anchorRight","anchorTop","anchorBottom","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const Vle=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,n.variant==="temporary"&&t.modal]},Wct=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root",`anchor${ye(n)}`],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${ye(n)}`,r!=="temporary"&&`paperAnchorDocked${ye(n)}`]};return et(i,Vct,t)},qct=me(ZO,{name:"MuiDrawer",slot:"Root",overridesResolver:Vle})(Ge(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),Gct=me("div",{shouldForwardProp:io,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:Vle})({flex:"0 0 auto"}),Kct=me(Ur,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${ye(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${ye(n.anchor)}`]]}})(Ge(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),Wle={left:"right",right:"left",top:"down",bottom:"up"};function Yct(e){return["left","right"].includes(e)}function Xct({direction:e},t){return e==="rtl"&&Yct(t)?Wle[t]:t}const Zct=_.forwardRef(function(t,n){const r=it({props:t,name:"MuiDrawer"}),i=ro(),o=mf(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:h=!1,ModalProps:{BackdropProps:g,...y}={},onClose:b,open:v=!1,PaperProps:S={},SlideProps:C,TransitionComponent:w,transitionDuration:A=s,variant:E="temporary",slots:D={},slotProps:O={},...T}=r,I=_.useRef(!1);_.useEffect(()=>{I.current=!0},[]);const N=Xct({direction:o?"rtl":"ltr"},a),R={...r,anchor:a,elevation:f,open:v,variant:E,...T},F=Wct(R),j={slots:{transition:w,...D},slotProps:{paper:S,transition:C,...O,backdrop:TO(O.backdrop||{...l,...g},{transitionDuration:A})}},[z,L]=lt("root",{ref:n,elementType:qct,className:Te(F.root,F.modal,u),shouldForwardComponentProp:!0,ownerState:R,externalForwardedProps:{...j,...T,...y},additionalProps:{open:v,onClose:b,hideBackdrop:h,slots:{backdrop:j.slots.backdrop},slotProps:{backdrop:j.slotProps.backdrop}}}),[q,V]=lt("paper",{elementType:Kct,shouldForwardComponentProp:!0,className:Te(F.paper,S.className),ownerState:R,externalForwardedProps:j,additionalProps:{elevation:E==="temporary"?f:0,square:!0,...E==="temporary"&&{role:"dialog","aria-modal":"true"}}}),[U,K]=lt("docked",{elementType:Gct,ref:n,className:Te(F.root,F.docked,u),ownerState:R,externalForwardedProps:j,additionalProps:T}),[B,W]=lt("transition",{elementType:Uct,ownerState:R,externalForwardedProps:j,additionalProps:{in:v,direction:Wle[N],timeout:A,appear:I.current}}),X=m.jsx(q,{...V,children:c});if(E==="permanent")return m.jsx(U,{...K,children:X});const H=m.jsx(B,{...W,children:X});return E==="persistent"?m.jsx(U,{...K,children:H}):m.jsx(z,{...L,children:H})}),Jct=XY({themeId:da}),Qct={error:vf,warn:iw,info:YO,debug:Aw},eut=({open:e,onClose:t})=>{const n=ro(),r=_.useMemo(()=>({error:n.palette.error.main,warn:n.palette.warning.main,info:n.palette.info.main,debug:n.palette.secondary.main}),[n]),[i,o]=_.useState([]),[s,a]=_.useState(!0),[l,c]=_.useState("error,warn,info".split(",")),[u,f]=_.useState(""),[h,g]=_.useState(!0),y=_.useCallback(async()=>{try{const w=new URLSearchParams({level:l.join(","),limit:"500",...u&&{search:u}}),A=await fetch(`api/logs?${w}`);if(A.ok){const E=await A.json();o(E.entries)}}catch(w){console.error("Failed to fetch logs:",w)}finally{a(!1)}},[l,u]);_.useEffect(()=>{e&&y()},[e,y]),_.useEffect(()=>{if(!h||!e)return;const w=setInterval(y,5e3);return()=>clearInterval(w)},[h,e,y]);const b=w=>{c(Array.isArray(w.target.value)?w.target.value:[w.target.value])},v=w=>{f(w.target.value)},S=async()=>{try{await fetch("api/logs",{method:"DELETE"}),o([])}catch(w){console.error("Failed to clear logs:",w)}},C=w=>{const A=Qct[w]||YO;return m.jsx(A,{sx:{fontSize:16,color:r[w]}})};return m.jsxs(vu,{open:e,onClose:t,maxWidth:"lg",fullWidth:!0,children:[m.jsxs(Su,{sx:{display:"flex",alignItems:"center",gap:1},children:[m.jsx(Aw,{}),"System Logs",m.jsx(ce,{sx:{flexGrow:1}}),m.jsx(cn,{title:"Auto Refresh",children:m.jsx(Et,{label:h?"Auto":"Manual",color:h?"success":"default",size:"small",onClick:()=>g(!h),sx:{cursor:"pointer"}})}),m.jsx(_n,{onClick:t,children:m.jsx(qCe,{})})]}),m.jsxs(xu,{children:[m.jsx(zt,{spacing:2,sx:{mb:2},children:m.jsxs(zt,{direction:"row",spacing:2,alignItems:"center",children:[m.jsxs(pa,{size:"small",sx:{minWidth:200},children:[m.jsx(sc,{children:"Log Level"}),m.jsxs(sa,{value:l,label:"Log Level",onChange:b,multiple:!0,renderValue:w=>m.jsx(ce,{sx:{display:"flex",flexWrap:"wrap",gap:.5},children:(Array.isArray(w)?w:[w]).map(A=>m.jsx(Et,{label:A.toUpperCase(),size:"small",sx:{backgroundColor:r[A],color:"white"}},A))}),children:[m.jsx(er,{value:"error",children:"Error"}),m.jsx(er,{value:"warn",children:"Warning"}),m.jsx(er,{value:"info",children:"Info"}),m.jsx(er,{value:"debug",children:"Debug"})]})]}),m.jsx(Lr,{size:"small",placeholder:"Search logs...",value:u,onChange:v,sx:{flexGrow:1}}),m.jsx(kt,{variant:"outlined",onClick:y,children:"Refresh"}),m.jsx(kt,{variant:"outlined",color:"error",onClick:S,children:"Clear"})]})}),m.jsx(ce,{sx:{height:400,overflow:"auto",backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,p:1},children:s?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(ie,{children:"Loading logs..."})}):i.length===0?m.jsx(ce,{sx:{display:"flex",justifyContent:"center",p:4},children:m.jsx(ie,{color:"text.secondary",children:"No logs found"})}):m.jsx(zt,{spacing:1,children:i.map((w,A)=>m.jsxs(ce,{sx:{p:1,borderRadius:1,backgroundColor:"action.hover",fontFamily:"monospace",fontSize:"0.875rem",wordBreak:"break-all"},children:[m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1,mb:.5},children:[C(w.level),m.jsx(ie,{variant:"caption",color:"text.secondary",children:new Date(w.timestamp).toLocaleString()}),m.jsx(Et,{label:w.level.toUpperCase(),size:"small",sx:{backgroundColor:r[w.level],color:n.palette.getContrastText(r[w.level]??n.palette.grey[500]),fontSize:"0.7rem",height:20}})]}),m.jsx(ie,{sx:{ml:3},children:w.message}),w.context&&m.jsx(ie,{sx:{ml:3,color:"text.secondary",fontSize:"0.8rem"},children:JSON.stringify(w.context,null,2)})]},`${w.timestamp}-${w.level}-${A}`))})})]}),m.jsx(Xd,{children:m.jsx(kt,{onClick:t,children:"Close"})})]})};function BK(){const{isConnected:e}=A2e(),[t,n]=_.useState(null),[r,i]=_.useState(!1);_.useEffect(()=>{const y=async()=>{try{const v=await fetch("api/health");if(v.ok){const S=await v.json();n(S),i(!1)}else i(!0)}catch{i(!0)}};y();const b=setInterval(y,3e4);return()=>clearInterval(b)},[]);const o=y=>{const b=Math.floor(y/3600),v=Math.floor(y%3600/60);return b>0?`${b}h ${v}m`:`${v}m`},s=t?.status==="healthy"&&!r,a=t?.services?.bridges,l=a&&a.total>0&&a.running===a.total,c=a&&a.total===0,u=t?m.jsxs(ce,{sx:{p:.5},children:[m.jsxs("div",{children:[m.jsx("strong",{children:"Version:"})," ",t.version??"Unknown"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"Uptime:"})," ",o(t.uptime??0)]}),t.services?.bridges&&m.jsxs("div",{children:[m.jsx("strong",{children:"Bridges:"})," ",t.services.bridges.running??0,"/",t.services.bridges.total??0," running",(t.services.bridges.stopped??0)>0&&` (${t.services.bridges.stopped} stopped)`]}),t.services?.homeAssistant&&m.jsxs("div",{children:[m.jsx("strong",{children:"Home Assistant:"})," ",t.services.homeAssistant.connected?"Connected":"Disconnected"]}),m.jsxs("div",{children:[m.jsx("strong",{children:"WebSocket:"})," ",e?"Connected":"Disconnected"]})]}):"Loading health status...",f=()=>r||!s?m.jsx(vf,{fontSize:"small"}):l?m.jsx(Mu,{fontSize:"small"}):m.jsx(dw,{fontSize:"small"}),h=()=>r||!s?"error":!l||!e?"warning":"success",g=()=>r?"Error":s?e?c?"No Bridges":l?"Online":"Starting":"Offline":"Unhealthy";return m.jsx(cn,{title:u,arrow:!0,children:m.jsx(Et,{icon:f(),label:g(),color:h(),size:"small",variant:"filled",sx:{borderRadius:1,fontWeight:600,"& .MuiChip-icon":{color:"inherit"}}})})}const tut=e=>_.createElement("svg",{viewBox:"0 0 91 89",xmlSpace:"preserve",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{style:{display:"inline"}},_.createElement("path",{style:{fill:"#18bcf2",fillOpacity:1,strokeWidth:.266194},d:"m 49.149143,1.473171 38.513568,38.536435 c 0,0 1.248354,1.186052 2.207681,3.092371 0.959329,1.906323 1.10864,4.600698 1.10864,4.600698 v 36.786372 c 0,0 -0.01549,1.748506 -1.49842,3.050572 -1.482931,1.302064 -3.333077,1.362947 -3.333077,1.362947 l -81.325658,7.7e-5 c 0,0 -1.7523855,-0.0091 -3.17112,-1.352526 C -0.07808495,85.913164 0.05953025,84.487808 0.05953025,84.487808 V 47.704546 c 0,0 -0.0018381,-2.218618 0.95921785,-4.315832 0.9610554,-2.097209 2.3010618,-3.355005 2.3010618,-3.355005 L 41.545959,1.4719546 c 0,0 1.465224,-1.46837077 3.753488,-1.46837077 2.288268,0 3.849696,1.46958717 3.849696,1.46958717 z"}),_.createElement("path",{style:{fill:"#ffffff",fillOpacity:1,strokeWidth:.175841},d:"m 31.689717,32.051124 c 2.813363,2.331095 6.157331,3.89845 9.721813,4.556421 V 17.180647 l 3.873694,-2.282955 3.870527,2.282955 V 36.60772 c 3.565364,-0.658847 6.910387,-2.226204 9.725159,-4.556417 l 7.032345,4.154609 c -11.437354,11.557779 -29.852321,11.557779 -41.290025,0 z m 8.546732,49.60988 C 44.314996,65.760441 35.09933,49.470196 19.574984,45.139543 v 8.312381 c 3.383916,1.32244 6.386113,3.496288 8.728705,6.320026 L 11.83076,69.485301 v 4.56907 l 3.873697,2.270836 16.469936,-9.713534 c 1.224356,3.48294 1.56683,7.225375 0.996449,10.879778 z M 70.977694,45.139543 c -15.515726,4.34014 -24.72189,20.626696 -20.643519,36.521461 l 7.047658,-4.15742 c -0.569325,-3.654411 -0.2265,-7.3965 0.996449,-10.87979 l 16.457611,9.701233 3.870711,-2.283125 v -4.55677 L 62.233673,59.77195 c 2.342772,-2.822684 5.34497,-4.996533 8.728708,-6.320026 z"}))),nut="home-assistant-matter-hub",rut={name:nut};function iut(){const[e,t]=_.useState("2.1.0-alpha.430");return _.useEffect(()=>{fetch("api/health").then(n=>n.ok?n.json():null).then(n=>{n?.version&&t(n.version)}).catch(()=>{})},[]),_.useMemo(()=>({name:rut.name,version:e}),[e])}const out=e=>{const t=iut();return m.jsxs(ce,{component:Du,to:Pt.dashboard,sx:{display:"flex",alignItems:"center",justifyContent:e.large?"flex-start":"center",flexGrow:1,textDecoration:"none",color:"inherit"},children:[m.jsx(tut,{style:{height:"40px"}}),m.jsx(ie,{variant:"inherit",component:"span",sx:{mr:1,ml:1},children:t.name.split("-").map(ye).join("-")}),e.large&&m.jsx(ie,{variant:"caption",component:"span",children:t.version})]})},sut=()=>{const e=Jct("(min-width:600px)"),{mode:t,setMode:n}=KS(),[r,i]=_.useState(!1),[o,s]=_.useState(!1),a=hf(),l=()=>{n(t==="dark"?"light":"dark")},c=[{label:"Dashboard",icon:m.jsx(CT,{}),to:Pt.dashboard},{label:"Bridges",icon:m.jsx(t6,{}),to:Pt.bridges},{label:"All Devices",icon:m.jsx(Fs,{}),to:Pt.devices},{label:"Network Map",icon:m.jsx(bT,{}),to:Pt.networkMap},{label:"Startup Order",icon:m.jsx(yb,{}),to:Pt.startup},{label:"Lock Credentials",icon:m.jsx(uu,{}),to:Pt.lockCredentials},{label:"Filter Reference",icon:m.jsx(ET,{}),to:Pt.labels},{label:"Settings",icon:m.jsx(wb,{}),to:Pt.settings},{label:t==="dark"?"Light Mode":"Dark Mode",icon:t==="dark"?m.jsx(a8e,{}):m.jsx(YCe,{}),onClick:l},{label:"System Logs",icon:m.jsx(Aw,{}),onClick:()=>i(!0)},{label:"Health Dashboard",icon:m.jsx(QO,{}),to:Pt.health}],u=f=>{s(!1),f.onClick?f.onClick():f.to&&a(f.to)};return m.jsxs(ce,{children:[m.jsx(Bct,{sx:{height:"72px"},children:m.jsx(Ule,{sx:{paddingLeft:"0 !important",paddingRight:"0 !important"},children:m.jsxs(DI,{sx:{padding:2,height:"100%",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[m.jsx(out,{large:e}),e?m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:1},children:[c.map(f=>f.to?m.jsx(cn,{title:f.label,children:m.jsx(_n,{component:Du,to:f.to,sx:{color:"inherit"},children:f.icon})},f.label):m.jsx(cn,{title:f.label,children:m.jsx(_n,{onClick:f.onClick,sx:{color:"inherit"},children:f.icon})},f.label)),m.jsx(BK,{})]}):m.jsxs(ce,{sx:{display:"flex",alignItems:"center",gap:.5},children:[m.jsx(BK,{}),m.jsx(_n,{onClick:()=>s(!0),sx:{color:"inherit"},children:m.jsx(l8e,{})})]})]})})}),m.jsx(Zct,{anchor:"right",open:o,onClose:()=>s(!1),children:m.jsx(bc,{sx:{width:250},children:c.map(f=>m.jsxs(obe,{onClick:()=>u(f),children:[m.jsx(Ul,{children:f.icon}),m.jsx(Va,{primary:f.label})]},f.label))})}),m.jsx(eut,{open:r,onClose:()=>i(!1)})]})},aut=()=>m.jsxs(ce,{children:[m.jsx(sut,{}),m.jsx(Ule,{}),m.jsx(DI,{sx:{p:2},children:m.jsx(Pct,{children:m.jsx(yY,{})})}),m.jsx($ct,{})]}),lut=WS({colorSchemes:{light:{palette:{primary:{main:"#1976d2",light:"#42a5f5",dark:"#1565c0"},secondary:{main:"#9c27b0",light:"#ba68c8",dark:"#7b1fa2"},background:{default:"#f5f5f5",paper:"#ffffff"}}},dark:{palette:{primary:{main:"#90caf9",light:"#e3f2fd",dark:"#42a5f5"},secondary:{main:"#ce93d8",light:"#f3e5f5",dark:"#ab47bc"},background:{default:"#121212",paper:"#1e1e1e"}}}},typography:{fontFamily:'"Roboto", "Helvetica", "Arial", sans-serif',h1:{fontSize:"2.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h3:{fontSize:"1.75rem",fontWeight:500},h4:{fontSize:"1.5rem",fontWeight:500},h5:{fontSize:"1.25rem",fontWeight:500},h6:{fontSize:"1rem",fontWeight:500}},shape:{borderRadius:8},components:{MuiCard:{styleOverrides:{root:{transition:"transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out","&:hover":{transform:"translateY(-2px)",boxShadow:"0 4px 20px rgba(0,0,0,0.12)"}}}},MuiButton:{styleOverrides:{root:{textTransform:"none",fontWeight:500}}},MuiChip:{styleOverrides:{root:{fontWeight:500}}},MuiAppBar:{styleOverrides:{root:{backgroundImage:"none"}}}}});let _4=document.getElementsByTagName("base")[0]?.href?.replace(/\/$/,"");_4?.startsWith("http")&&(_4=new URL(_4).pathname);const cut=Hhe([{path:"/",element:m.jsx(aut,{}),children:Ect}],{basename:_4});sde.createRoot(document.getElementById("root")).render(m.jsx(_.StrictMode,{children:m.jsx(Cde,{store:Tct,children:m.jsxs(n1e,{theme:lut,children:[m.jsx(Zge,{}),m.jsx(dX,{styles:{".rjsf-field-array > .MuiFormControl-root > .MuiPaper-root > .MuiBox-root > .MuiGrid-root > .MuiGrid-root:has(> .MuiBox-root > .MuiPaper-root > .MuiBox-root > .rjsf-field)":{overflow:"initial !important",flexGrow:1}}}),m.jsx(k2e,{children:m.jsx(yye,{children:m.jsx(epe,{router:cut})})})]})})}));
|