@nice2dev/ui-iot 1.2.0 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,27 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("react"),ae=(a,r)=>r,re=f.createContext(ae),se=f.createContext("en");function T(){const a=f.useContext(re),r=f.useContext(se);return{t:a,lang:r}}const ie={radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",modalStyle:"default",tableStyle:"default",menuStyle:"default",animation:"normal",density:"normal"};f.createContext({displayStyle:"default",variantConfig:ie,setDisplayStyle:()=>{}});const ce={"chevron-down":"M6 9l6 6 6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","chevron-right":"M9 6l6 6-6 6","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7",close:"M18 6L6 18M6 6l12 12",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",check:"M5 13l4 4L19 7",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 113 3L12 15l-4 1 1-4 9.5-9.5z",trash:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h5M20 20v-5h-5M20.49 9A9 9 0 005.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 013.51 15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z","sort-asc":"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12","sort-desc":"M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4",sort:"M6 10l6-6 6 6M6 14l6 6 6-6",menu:"M4 6h16M4 12h16M4 18h16","more-vertical":"M12 5v.01M12 12v.01M12 19v.01","more-horizontal":"M5 12h.01M12 12h.01M19 12h.01",settings:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",eye:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M15 12a3 3 0 11-6 0 3 3 0 016 0z","eye-off":"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24 M1 1l22 22",lock:"M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zm-3-4a4 4 0 10-8 0v4h8V7z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",help:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",users:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",grip:"M4 6h2m4 0h2m4 0h2M4 12h2m4 0h2m4 0h2M4 18h2m4 0h2m4 0h2",hash:"M4 9h16M4 15h16M10 3L8 21M16 3l-2 18",list:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01",circle:"M12 21a9 9 0 100-18 9 9 0 000 18z",box:"M21 8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16V8z M3.27 6.96L12 12.01l8.73-5.05 M12 22.08V12",tabs:"M3 9h18v10H3z M7 9V5h6v4",columns:"M4 4h7v16H4z M13 4h7v16h-7z",grid:"M3 3h7v7H3z M14 3h7v7h-7z M14 14h7v7h-7z M3 14h7v7H3z",table:"M3 5h18v14H3z M3 10h18M3 15h18M9 5v14M15 5v14",heading:"M6 4v16M18 4v16M6 12h12",type:"M4 7V4h16v3M9 20h6M12 4v16","align-left":"M3 6h18M3 12h12M3 18h15",input:"M4 9h16a1 1 0 011 1v4a1 1 0 01-1 1H4a1 1 0 01-1-1v-4a1 1 0 011-1z M7 12h5",button:"M5 9h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2a2 2 0 012-2z",select:"M4 6h16a1 1 0 011 1v10a1 1 0 01-1 1H4a1 1 0 01-1-1V7a1 1 0 011-1z M15 11l-3 3-3-3","check-square":"M9 11l3 3L22 4 M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11",video:"M23 7l-7 5 7 5V7z M16 5H3a2 2 0 00-2 2v10a2 2 0 002 2h13a2 2 0 002-2V7a2 2 0 00-2-2z",card:"M3 5h18a1 1 0 011 1v12a1 1 0 01-1 1H3a1 1 0 01-1-1V6a1 1 0 011-1z M3 10h18","bar-chart":"M6 20v-6M12 20V4M18 20v-10","line-chart":"M3 3v18h18 M7 15l4-4 3 3 5-6","area-chart":"M3 3v18h18 M7 17v-3l4-4 3 3 5-6v10z","pie-chart":"M21.21 15.89A10 10 0 118 2.83 M22 12A10 10 0 0012 2v10z","donut-chart":"M12 3a9 9 0 100 18 9 9 0 000-18z M12 8a4 4 0 100 8 4 4 0 000-8z","scatter-chart":"M3 3v18h18 M8 16h.01 M11 11h.01 M15 14h.01 M18 8h.01","bars-vertical":"M6 5v14M12 5v14M18 5v14",globe:"M12 3a9 9 0 100 18 9 9 0 000-18z M3 12h18 M12 3a14 14 0 010 18 M12 3a14 14 0 000 18",monitor:"M3 4h18a1 1 0 011 1v11a1 1 0 01-1 1H3a1 1 0 01-1-1V5a1 1 0 011-1z M8 21h8 M12 17v4",camera:"M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h3l2-3h6l2 3h3a2 2 0 012 2z M12 17a4 4 0 100-8 4 4 0 000 8z",plug:"M9 2v5 M15 2v5 M7 7h10v3a5 5 0 01-10 0V7z M12 15v7",save:"M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z M17 21v-8H7v8 M7 3v5h8",tag:"M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z M7 7h.01",palette:"M12 2a10 10 0 000 20 2 2 0 002-2c0-.5-.2-1-.5-1.3a2 2 0 01-.5-1.2 2 2 0 012-2H17a5 5 0 005-5c0-5-4.5-9-10-9z M6.5 11.5h.01 M9.5 7.5h.01 M14.5 7.5h.01",book:"M4 19.5A2.5 2.5 0 016.5 17H20 M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z",cloud:"M18 10h-1.26A8 8 0 109 20h9a5 5 0 000-10z",target:"M12 3a9 9 0 100 18 9 9 0 000-18z M12 7a5 5 0 100 10 5 5 0 000-10z M12 11a1 1 0 100 2 1 1 0 000-2z",message:"M21 11.5a8.5 8.5 0 01-8.5 8.5 8.4 8.4 0 01-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 01-.9-3.8A8.5 8.5 0 0112.5 3 8.5 8.5 0 0121 11.5z",flask:"M9 2h6 M10 2v6.5L4.5 19a1 1 0 00.9 1.5h13.2a1 1 0 00.9-1.5L14 8.5V2 M7 15h10",rocket:"M12 15l-3-3a22 22 0 012-3.95A12.88 12.88 0 0122 2c0 2.72-.78 7.5-6 11a22 22 0 01-3.95 2z M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0 M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5 M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 00-2.91-.09z",music:"M9 18V5l12-2v13 M9 18a3 3 0 11-6 0 3 3 0 016 0z M21 16a3 3 0 11-6 0 3 3 0 016 0z",wifi:"M5 12.55a11 11 0 0114 0 M8.5 16.11a6 6 0 017 0 M12 20h.01 M2 8.82a15 15 0 0120 0",database:"M12 8c4.97 0 9-1.34 9-3s-4.03-3-9-3-9 1.34-9 3 4.03 3 9 3z M21 5v6c0 1.66-4.03 3-9 3s-9-1.34-9-3V5 M21 11v6c0 1.66-4.03 3-9 3s-9-1.34-9-3v-6",slash:"M12 3a9 9 0 100 18 9 9 0 000-18z M5.6 5.6l12.8 12.8",puzzle:"M19.4 13.6a1.6 1.6 0 10.2-3.2H19V7a2 2 0 00-2-2h-3.4v-.4a1.6 1.6 0 10-3.2 0V5H7a2 2 0 00-2 2v3.4h.4a1.6 1.6 0 100 3.2H5V17a2 2 0 002 2h3.4v.4a1.6 1.6 0 103.2 0V19H17a2 2 0 002-2v-3.4z",dollar:"M12 1v22 M17 5H9.5a3.5 3.5 0 000 7h5a3.5 3.5 0 010 7H6",printer:"M6 9V2h12v7 M6 18H4a2 2 0 01-2-2v-5a2 2 0 012-2h16a2 2 0 012 2v5a2 2 0 01-2 2h-2 M6 14h12v8H6z",scale:"M12 3v18 M5 21h14 M5 7l7-2 7 2 M2 13a3 3 0 006 0L5 7zm14 0a3 3 0 006 0L19 7z",accessibility:"M12 3a9 9 0 100 18 9 9 0 000-18z M12 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3z M7.5 10.5l4.5 1 4.5-1 M12 11.5v3.5l-2 3.5 M12 15l2 3.5",window:"M3 4h18a1 1 0 011 1v14a1 1 0 01-1 1H3a1 1 0 01-1-1V5a1 1 0 011-1z M2 9h20 M6 6.5h.01 M9 6.5h.01","map-pin":"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z M12 13a3 3 0 100-6 3 3 0 000 6z",cursor:"M5 3l14 7-6 2-2 6-6-15z",shuffle:"M16 3h5v5 M4 20L21 3 M21 16v5h-5 M15 15l6 6 M4 4l5 5",lightbulb:"M9 18h6 M10 22h4 M12 2a7 7 0 00-4 12.7c.6.5 1 1.3 1 2.1V18h6v-1.2c0-.8.4-1.6 1-2.1A7 7 0 0012 2z",server:"M3 4h18a1 1 0 011 1v4a1 1 0 01-1 1H3a1 1 0 01-1-1V5a1 1 0 011-1z M3 14h18a1 1 0 011 1v4a1 1 0 01-1 1H3a1 1 0 01-1-1v-4a1 1 0 011-1z M7 7h.01 M7 17h.01",terminal:"M4 17l6-6-6-6 M12 19h8","git-branch":"M6 3v12 M18 9a3 3 0 100-6 3 3 0 000 6z M6 21a3 3 0 100-6 3 3 0 000 6z M18 9a9 9 0 01-9 9",send:"M22 2L11 13 M22 2l-7 20-4-9-9-4 20-7z",play:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z M21 12a9 9 0 11-18 0 9 9 0 0118 0z",pause:"M10 9v6m4-6v6m7-3a9 9 0 11-18 0 9 9 0 0118 0z",stop:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z",mic:"M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3zM19 10v2a7 7 0 01-14 0v-2M12 19v4M8 23h8",volume:"M11 5L6 9H2v6h4l5 4V5z M15.54 8.46a5 5 0 010 7.07 M19.07 4.93a10 10 0 010 14.14","volume-off":"M11 5L6 9H2v6h4l5 4V5z M23 9l-6 6 M17 9l6 6","skip-back":"M19 20L9 12l10-8v16z M5 19V5",expand:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4",collapse:"M9 9V5m0 4H5m4 0L4 4m11 5h4m-4 0V5m0 4l5-5M9 15v4m0-4H5m4 0l-5 5m15-5h-4m4 0v4m0-4l-5 5","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",briefcase:"M20 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2zM16 7V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v2M2 12h20",building:"M4 22V4a2 2 0 012-2h12a2 2 0 012 2v18M4 22h16M9 22v-4h6v4M9 6h.01M15 6h.01M9 10h.01M15 10h.01M9 14h.01M15 14h.01",medal:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11M12 15a6 6 0 100-12 6 6 0 000 12z",clipboard:"M9 2h6a1 1 0 011 1v1a1 1 0 01-1 1H9a1 1 0 01-1-1V3a1 1 0 011-1zM16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2","skip-forward":"M5 4l10 8-10 8V4zM19 5v14","at-sign":"M12 16a4 4 0 100-8 4 4 0 000 8zM16 12v1.5a2.5 2.5 0 005 0V12a9 9 0 10-3.5 7.14",gift:"M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z",archive:"M21 8v13H3V8M1 3h22v5H1zM10 12h4",reply:"M9 17l-5-5 5-5M4 12h11a4 4 0 014 4v2",forward:"M15 17l5-5-5-5M20 12H9a4 4 0 00-4 4v2",paperclip:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48",zap:"M13 2L3 14h9l-1 8 10-12h-9l1-8z",square:"M4 4h16v16H4z",triangle:"M12 4L3 20h18z",hexagon:"M7.5 3h9l4.5 9-4.5 9h-9L3 12z",diamond:"M12 2l10 10-10 10L2 12z",line:"M5 19L19 5",pen:"M12 19l7-7 3 3-7 7-3-3z M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z M11 11a2 2 0 100-4 2 2 0 000 4z",brush:"M9.06 11.9l8.07-8.06a2.85 2.85 0 114.03 4.03l-8.06 8.08 M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 00-3-3.02z",droplet:"M12 2.69l5.66 5.66a8 8 0 11-11.31 0z",bucket:"M5 8h14l-1.5 11a2 2 0 01-2 1.8H8.5a2 2 0 01-2-1.8L5 8z M5 8l2-4h10l2 4",scissors:"M6 9a3 3 0 100-6 3 3 0 000 6z M6 21a3 3 0 100-6 3 3 0 000 6z M20 4L8.12 15.88 M14.47 14.48L20 20 M8.12 8.12L12 12",layers:"M12 2l9 5-9 5-9-5 9-5z M3 12l9 5 9-5 M3 17l9 5 9-5",crop:"M6 2v14a2 2 0 002 2h14 M2 6h14a2 2 0 012 2v14",eyedropper:"M2 22l1-1h3l9-9 M3 21v-3l9-9 M15 6l3.5-3.5a2.12 2.12 0 013 3L18 9l-3-3z",ruler:"M21.3 8.7l-6-6a1 1 0 00-1.4 0L2.7 13.9a1 1 0 000 1.4l6 6a1 1 0 001.4 0L21.3 10.1a1 1 0 000-1.4z M7.5 10.5l2 2 M11 7l2 2 M14.5 3.5l2 2",wand:"M15 4V2 M15 16v-2 M8 9h2 M20 9h2 M3 21l9-9 M12.2 6.2L11 5 M17.8 6.2L19 5 M17.8 11.8L19 13",move:"M5 9l-3 3 3 3 M9 5l3-3 3 3 M15 19l-3 3-3-3 M19 9l3 3-3 3 M2 12h20 M12 2v20",gamepad:"M6 12h4 M8 10v4 M15 13h.01 M18 11h.01 M2 12a4 4 0 014-4h12a4 4 0 014 4l-1.5 6a2 2 0 01-2 1.5H5.5a2 2 0 01-2-1.5L2 12z",eraser:"M7 21l-4.3-4.3a1 1 0 010-1.4l9.6-9.6a2 2 0 012.8 0l4.6 4.6a2 2 0 010 2.8L13 21H7z M22 21H7 M5 12l5 5",thermometer:"M14 14.76V3.5a2.5 2.5 0 00-5 0v11.26a4.5 4.5 0 105 0z",door:"M18 20V5a1 1 0 00-1-1H7a1 1 0 00-1 1v15 M3 20h18 M13 11.5h.01",stairs:"M3 20h3v-3h3v-3h3v-3h3v-3h3",elevator:"M5 3h14a1 1 0 011 1v16a1 1 0 01-1 1H5a1 1 0 01-1-1V4a1 1 0 011-1z M9.5 9L12 6.5 14.5 9 M9.5 15l2.5 2.5 2.5-2.5",bed:"M2 4v16 M2 8h18a2 2 0 012 2v10 M22 17H2 M6 8v4 M2 12h4",sofa:"M3 9V7a2 2 0 012-2h14a2 2 0 012 2v2 M21 9a2 2 0 00-2 2v3H5v-3a2 2 0 00-2-2 2 2 0 00-2 2v4a1 1 0 001 1h18a1 1 0 001-1v-4a2 2 0 00-2-2 M5 18v2 M19 18v2",chair:"M6 11V5a2 2 0 012-2h8a2 2 0 012 2v6 M5 11h14 M6 11l-1 8h14l-1-8 M6 19v2 M18 19v2",utensils:"M3 2v7a2 2 0 002 2 2 2 0 002-2V2 M5 2v20 M21 2v9c0 1-1 1.8-2 1.8h-1V20 M18 2v9",mountain:"M8 3l4 8 5-5 5 15H2L8 3z",tree:"M12 2L7 11h10L12 2z M9 11l3 5 3-5 M12 16v6",sun:"M12 17a5 5 0 100-10 5 5 0 000 10z M12 1v2 M12 21v2 M4.22 4.22l1.42 1.42 M18.36 18.36l1.42 1.42 M1 12h2 M21 12h2 M4.22 19.78l1.42-1.42 M18.36 5.64l1.42-1.42",moon:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z","list-ordered":"M10 6h11M10 12h11M10 18h11M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",unlink:"M18.84 12.25l1.72-1.71a5 5 0 0 0-7.07-7.07L11 5.78M3 3l18 18M9 15l3-3M14 11l3 3M14 21l-1.72-1.72a5 5 0 0 1-7.07-7.07L7 10.49",code:"M16 18l6-6-6-6M8 6l-6 6 6 6",quote:"M3 21c3-3 3-9 0-12M21 21c-3-3-3-9 0-12M9 7h6v6H9zM15 7h6v6h-6z",indent:"M3 8l4 4-4 4M7 6h14M7 12h14M3 18h18",outdent:"M7 8l-4 4 4 4M21 6H3M21 12H7M21 18H3","align-center":"M3 6h18M6 12h12M3 18h18","align-right":"M3 6h18M9 12h12M3 18h18","align-justify":"M3 6h18M3 12h18M3 18h18","align-top":"M4 4h16M9 8v12M15 8v7","align-middle":"M4 12h16M9 5v14M15 8v8","align-bottom":"M4 20h16M9 4v12M15 9v7","distribute-h":"M4 4v16M20 4v16M10 7h4v10h-4z","distribute-v":"M4 4h16M4 20h16M7 10h10v4H7z",parallelogram:"M7 5h14l-4 14H3z",barcode:"M4 5v14M6.5 5v14M10 5v14M13 5v14M15.5 5v14M19 5v14M20.5 5v14","qr-code":"M4 4h6v6H4z M14 4h6v6h-6z M4 14h6v6H4z M14 14h2v2h-2z M18 14h2v2h-2z M14 18h2v2h-2z M18 18h2v2h-2z",smile:"M12 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20zM8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01",undo:"M9 14L4 9l5-5M4 9h10.5a5.5 5.5 0 010 11H11",redo:"M15 14l5-5-5-5M20 9H9.5a5.5 5.5 0 000 11H13",unlock:"M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2z M7 11V7a5 5 0 019.9-1",keyboard:"M4 6h16a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V8a2 2 0 012-2z M6 10h.01 M10 10h.01 M14 10h.01 M18 10h.01 M8 14h8","page-break":"M6 3v5h12V3 M6 21v-5h12v5 M2 12h3 M8 12h3 M13 12h3 M19 12h3",shield:"M12 2l8 3v6c0 5-3.4 9.4-8 11-4.6-1.6-8-6-8-11V5z",repeat:"M17 2l4 4-4 4 M3 11V9a4 4 0 014-4h14 M7 22l-4-4 4-4 M21 13v2a4 4 0 01-4 4H3"},ne={xs:12,sm:16,md:20,lg:24,xl:32},oe=f.createContext({});function te({path:a,size:r,className:s,style:i,color:n,title:c,onClick:o}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:n||"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:`nice-icon ${s||""}`,style:i,role:c?"img":"presentation","aria-label":c,"aria-hidden":!c,onClick:o,children:[c&&e.jsx("title",{children:c}),e.jsx("path",{d:a})]})}const p=({name:a,size:r="md",className:s,style:i,color:n,title:c,onClick:o})=>{const{resolver:d}=f.useContext(oe),v=typeof r=="number"?r:ne[r];if(d){const g=d(a,v);if(g)return e.jsx("span",{className:`nice-icon-wrap ${s||""}`,style:i,onClick:o,children:g})}const m=ce[a];return m?e.jsx(te,{path:m,size:v,className:s,style:i,color:n,title:c,onClick:o}):null};f.createContext({direction:"ltr",isRTL:!1,flip:a=>a,flipStyle:(a,r)=>({[a]:r})});f.createContext({permissions:{},getAccessMode:()=>"full"});f.createContext(null);function de(){const a=globalThis.crypto;if(typeof(a==null?void 0:a.randomUUID)=="function")return a.randomUUID();const r=new Uint8Array(16);if(typeof(a==null?void 0:a.getRandomValues)=="function")a.getRandomValues(r);else for(let i=0;i<r.length;i++)r[i]=Math.floor(Math.random()*256);r[6]=r[6]&15|64,r[8]=r[8]&63|128;const s=Array.from(r,i=>i.toString(16).padStart(2,"0")).join("");return`${s.slice(0,8)}-${s.slice(8,12)}-${s.slice(12,16)}-${s.slice(16,20)}-${s.slice(20)}`}f.createContext(null);const G={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},Q={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},J={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},K=a=>({color:a,radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"}),le={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},fe={sm:"0 1px 2px rgba(0,0,0,0.3)",md:"0 4px 6px -1px rgba(0,0,0,0.4)",lg:"0 10px 15px -3px rgba(0,0,0,0.4)",xl:"0 20px 25px -5px rgba(0,0,0,0.4)"};function t(a,r,s,i,n){return{name:a,darkMode:"light",colors:{...r,surface:r.surface??s.primary,surfaceHover:r.surfaceHover??s.secondary},backgrounds:{...s,elevated:s.elevated??s.primary,inset:s.inset??s.tertiary,canvas:s.canvas??s.primary},text:{...i,inverse:i.inverse??"#ffffff"},borders:K(n),shadows:le,spacing:G,typography:Q,transitions:J}}function h(a,r,s,i,n){return{name:a,darkMode:"dark",colors:{...r,surface:r.surface??s.secondary,surfaceHover:r.surfaceHover??s.tertiary},backgrounds:{...s,elevated:s.elevated??s.secondary,inset:s.inset??s.primary,canvas:s.canvas??s.primary},text:{...i,inverse:i.inverse??"#0f172a"},borders:K(n),shadows:fe,spacing:G,typography:Q,transitions:J}}t("Slate",{primary:"#64748b",primaryHover:"#475569",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8"},"#cbd5e1");t("Zinc",{primary:"#71717a",primaryHover:"#52525b",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fafafa",secondary:"#f4f4f5",tertiary:"#e4e4e7",hover:"#e4e4e7"},{primary:"#18181b",secondary:"#3f3f46",muted:"#a1a1aa"},"#d4d4d8");t("Stone",{primary:"#78716c",primaryHover:"#57534e",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#1c1917",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1");t("Cool Gray",{primary:"#6b7280",primaryHover:"#4b5563",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#d1d5db");t("Warm Gray",{primary:"#7c7568",primaryHover:"#5c564c",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf9f7",secondary:"#f5f4f0",tertiary:"#e8e6e1",hover:"#e8e6e1"},{primary:"#1f1d19",secondary:"#4a463d",muted:"#a09888"},"#d4d0c8");t("Silver",{primary:"#94a3b8",primaryHover:"#64748b",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#38bdf8"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#334155",secondary:"#64748b",muted:"#94a3b8"},"#cbd5e1");t("Charcoal",{primary:"#374151",primaryHover:"#1f2937",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#6b7280"},"#d1d5db");t("Ivory",{primary:"#92876d",primaryHover:"#7a6f55",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffef7",secondary:"#faf6eb",tertiary:"#f0ead6",hover:"#f0ead6"},{primary:"#2b2517",secondary:"#5c5340",muted:"#9c9280"},"#ddd8c4");t("Rose",{primary:"#e11d48",primaryHover:"#be123c",success:"#16a34a",warning:"#ea580c",error:"#dc2626",info:"#0891b2"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f43f5e"},"#fda4af");t("Emerald",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#34d399"},"#6ee7b7");t("Amber",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0284c7"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#f59e0b"},"#fcd34d");t("Violet",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#2e1065",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd");t("Teal",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4");t("Indigo",{primary:"#4f46e5",primaryHover:"#4338ca",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#eef2ff",secondary:"#e0e7ff",tertiary:"#c7d2fe",hover:"#e0e7ff"},{primary:"#1e1b4b",secondary:"#312e81",muted:"#818cf8"},"#a5b4fc");t("Cyan",{primary:"#0891b2",primaryHover:"#0e7490",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#0284c7"},{primary:"#ecfeff",secondary:"#cffafe",tertiary:"#a5f3fc",hover:"#cffafe"},{primary:"#164e63",secondary:"#155e75",muted:"#22d3ee"},"#67e8f9");t("Lime",{primary:"#65a30d",primaryHover:"#4d7c0f",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f7fee7",secondary:"#ecfccb",tertiary:"#d9f99d",hover:"#ecfccb"},{primary:"#1a2e05",secondary:"#365314",muted:"#84cc16"},"#bef264");t("Pink",{primary:"#db2777",primaryHover:"#be185d",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#500724",secondary:"#831843",muted:"#f472b6"},"#f9a8d4");t("Orange",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#7c2d12",muted:"#fb923c"},"#fdba74");t("Fuchsia",{primary:"#c026d3",primaryHover:"#a21caf",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf4ff",secondary:"#fae8ff",tertiary:"#f5d0fe",hover:"#fae8ff"},{primary:"#4a044e",secondary:"#701a75",muted:"#d946ef"},"#e879f9");t("Sky",{primary:"#0284c7",primaryHover:"#0369a1",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#075985",muted:"#38bdf8"},"#7dd3fc");t("Ruby",{primary:"#be123c",primaryHover:"#9f1239",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#fb7185"},"#fda4af");t("Coral",{primary:"#f97316",primaryHover:"#ea580c",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#fb923c"},"#fdba74");h("Midnight",{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#020617",secondary:"#0f172a",tertiary:"#1e293b",hover:"#1e293b"},{primary:"#f1f5f9",secondary:"#94a3b8",muted:"#475569"},"#1e293b");h("Obsidian",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#facc15",error:"#fb7185",info:"#38bdf8"},{primary:"#09090b",secondary:"#18181b",tertiary:"#27272a",hover:"#27272a"},{primary:"#fafafa",secondary:"#a1a1aa",muted:"#52525b"},"#3f3f46");h("Eclipse",{primary:"#c084fc",primaryHover:"#a855f7",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#67e8f9"},{primary:"#0c0a1d",secondary:"#1a1533",tertiary:"#2a2248",hover:"#2a2248"},{primary:"#f5f3ff",secondary:"#a78bfa",muted:"#6d5eac"},"#3b3266");h("Onyx",{primary:"#60a5fa",primaryHover:"#3b82f6",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#000000",secondary:"#0a0a0a",tertiary:"#171717",hover:"#171717"},{primary:"#ffffff",secondary:"#a3a3a3",muted:"#525252"},"#262626");h("Carbon",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#67e8f9"},{primary:"#161616",secondary:"#262626",tertiary:"#393939",hover:"#393939"},{primary:"#f4f4f4",secondary:"#c6c6c6",muted:"#6f6f6f"},"#525252");h("Cosmos",{primary:"#6366f1",primaryHover:"#4f46e5",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#030712",secondary:"#111827",tertiary:"#1f2937",hover:"#1f2937"},{primary:"#e5e7eb",secondary:"#9ca3af",muted:"#4b5563",onPrimary:"#ffffff"},"#374151");h("Nebula",{primary:"#e879f9",primaryHover:"#d946ef",success:"#4ade80",warning:"#fbbf24",error:"#fb7185",info:"#67e8f9"},{primary:"#0d0117",secondary:"#1a0533",tertiary:"#2d0a52",hover:"#2d0a52"},{primary:"#fae8ff",secondary:"#d8b4fe",muted:"#7c3aed"},"#581c87");h("Abyss",{primary:"#22d3ee",primaryHover:"#06b6d4",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#001219",secondary:"#002a3a",tertiary:"#003e54",hover:"#003e54"},{primary:"#e0f2fe",secondary:"#7dd3fc",muted:"#0369a1"},"#075985");h("Shadow",{primary:"#a3a3a3",primaryHover:"#737373",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#38bdf8"},{primary:"#171717",secondary:"#1f1f1f",tertiary:"#2a2a2a",hover:"#2a2a2a"},{primary:"#e5e5e5",secondary:"#a3a3a3",muted:"#525252"},"#404040");h("Emerald Dark",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#022c22",secondary:"#064e3b",tertiary:"#065f46",hover:"#065f46"},{primary:"#ecfdf5",secondary:"#6ee7b7",muted:"#047857"},"#047857");t("Forest",{primary:"#166534",primaryHover:"#14532d",success:"#22c55e",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac");t("Ocean",{primary:"#0369a1",primaryHover:"#075985",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#38bdf8"},"#7dd3fc");t("Desert",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#422006",secondary:"#713f12",muted:"#ca8a04"},"#fde047");t("Sunset",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#f97316"},"#fdba74");t("Aurora",{primary:"#0d9488",primaryHover:"#0f766e",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4");t("Lavender",{primary:"#7e22ce",primaryHover:"#6b21a8",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#3b0764",secondary:"#581c87",muted:"#a855f7"},"#d8b4fe");t("Autumn",{primary:"#c2410c",primaryHover:"#9a3412",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#7f1d1d",muted:"#f87171"},"#fca5a5");t("Spring",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#14532d",secondary:"#166534",muted:"#4ade80"},"#86efac");t("Arctic",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd");t("Tropical",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0");t("Pastel Rose",{primary:"#f472b6",primaryHover:"#ec4899",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#f9a8d4");t("Pastel Sky",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#075985",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd");t("Pastel Mint",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#065f46",secondary:"#047857",muted:"#6ee7b7"},"#a7f3d0");t("Pastel Peach",{primary:"#fb923c",primaryHover:"#f97316",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#7c2d12",secondary:"#9a3412",muted:"#fdba74"},"#fed7aa");t("Pastel Lavender",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#4c1d95",secondary:"#5b21b6",muted:"#c4b5fd"},"#ddd6fe");t("Pastel Lemon",{primary:"#facc15",primaryHover:"#eab308",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#713f12",secondary:"#854d0e",muted:"#fde047"},"#fef08a");t("Pastel Sage",{primary:"#86efac",primaryHover:"#4ade80",success:"#22c55e",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#166534",secondary:"#15803d",muted:"#86efac"},"#bbf7d0");t("Pastel Coral",{primary:"#fb7185",primaryHover:"#f43f5e",success:"#4ade80",warning:"#fcd34d",error:"#ef4444",info:"#67e8f9"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#881337",secondary:"#9f1239",muted:"#fda4af"},"#fecdd3");t("Banking",{primary:"#1e3a5f",primaryHover:"#152c4a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#334155",muted:"#94a3b8"},"#cbd5e1");t("Healthcare",{primary:"#0891b2",primaryHover:"#0e7490",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#e0f7fa",tertiary:"#b2ebf2",hover:"#e0f7fa"},{primary:"#134e4a",secondary:"#1a6b6a",muted:"#80cbc4"},"#b2dfdb");t("Legal",{primary:"#1e293b",primaryHover:"#0f172a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#0f172a",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1");t("Tech Startup",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#1e1b4b",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd");t("Enterprise",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#60a5fa"},"#93c5fd");t("Government",{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#1e293b",muted:"#64748b"},"#cbd5e1");t("Education",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#0891b2"},{primary:"#f0fdf9",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0");t("Real Estate",{primary:"#92400e",primaryHover:"#78350f",success:"#059669",warning:"#b45309",error:"#dc2626",info:"#0891b2"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#422006",secondary:"#713f12",muted:"#d97706"},"#fcd34d");t("Nord",{primary:"#5e81ac",primaryHover:"#4c6b90",success:"#a3be8c",warning:"#ebcb8b",error:"#bf616a",info:"#88c0d0"},{primary:"#eceff4",secondary:"#e5e9f0",tertiary:"#d8dee9",hover:"#d8dee9"},{primary:"#2e3440",secondary:"#3b4252",muted:"#4c566a"},"#d8dee9");h("Dracula",{primary:"#bd93f9",primaryHover:"#9d79d9",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#8be9fd"},{primary:"#282a36",secondary:"#343746",tertiary:"#44475a",hover:"#44475a"},{primary:"#f8f8f2",secondary:"#c0c0c0",muted:"#6272a4"},"#44475a");t("Solarized Light",{primary:"#268bd2",primaryHover:"#1a6da0",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#fdf6e3",secondary:"#eee8d5",tertiary:"#e0dbc7",hover:"#eee8d5"},{primary:"#073642",secondary:"#586e75",muted:"#93a1a1"},"#eee8d5");h("Solarized Dark",{primary:"#268bd2",primaryHover:"#3d98db",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#002b36",secondary:"#073642",tertiary:"#0a4858",hover:"#073642"},{primary:"#eee8d5",secondary:"#93a1a1",muted:"#586e75",onError:"#ffffff"},"#073642");h("Monokai",{primary:"#66d9ef",primaryHover:"#45c0d6",success:"#a6e22e",warning:"#e6db74",error:"#f92672",info:"#66d9ef"},{primary:"#272822",secondary:"#34352e",tertiary:"#3e3d32",hover:"#3e3d32"},{primary:"#f8f8f2",secondary:"#cfcfc2",muted:"#75715e"},"#3e3d32");h("One Dark",{primary:"#61afef",primaryHover:"#4b9ee0",success:"#98c379",warning:"#e5c07b",error:"#e06c75",info:"#56b6c2"},{primary:"#282c34",secondary:"#2c313a",tertiary:"#353b45",hover:"#353b45"},{primary:"#abb2bf",secondary:"#828997",muted:"#545862"},"#3e4452");h("Synthwave",{primary:"#ff7edb",primaryHover:"#e660c2",success:"#72f1b8",warning:"#fede5d",error:"#fe4450",info:"#36f9f6"},{primary:"#241b2f",secondary:"#2d2140",tertiary:"#362a50",hover:"#362a50"},{primary:"#f0e4fc",secondary:"#b4a0cc",muted:"#6c5c84"},"#4a3866");t("Vaporwave",{primary:"#ff71ce",primaryHover:"#e655b5",success:"#78dcca",warning:"#ffb86c",error:"#ff5555",info:"#76e8fc"},{primary:"#fce4f7",secondary:"#e8d0f4",tertiary:"#d4bcf0",hover:"#e8d0f4"},{primary:"#4a1a4e",secondary:"#7b3f7d",muted:"#c080c0"},"#d8a8e8");h("Terminal Green",{primary:"#00ff41",primaryHover:"#00cc34",success:"#00ff41",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0a0a0a",secondary:"#0d1a0d",tertiary:"#1a2e1a",hover:"#1a2e1a"},{primary:"#00ff41",secondary:"#00cc33",muted:"#008822"},"#003300");t("Sepia",{primary:"#8b6914",primaryHover:"#704f10",success:"#6b8e23",warning:"#cd853f",error:"#b22222",info:"#5f9ea0"},{primary:"#faf0e6",secondary:"#f5e6d3",tertiary:"#eddcc7",hover:"#f5e6d3"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#d7ccc8");t("Vintage",{primary:"#8d6e63",primaryHover:"#6d4c41",success:"#66bb6a",warning:"#ffb300",error:"#e53935",info:"#29b6f6"},{primary:"#efebe9",secondary:"#d7ccc8",tertiary:"#bcaaa4",hover:"#d7ccc8"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#bcaaa4");h("Cyberpunk",{primary:"#00f0ff",primaryHover:"#00c8d4",success:"#39ff14",warning:"#ffff00",error:"#ff003c",info:"#bf00ff"},{primary:"#0a0e17",secondary:"#131824",tertiary:"#1c2333",hover:"#1c2333"},{primary:"#e0fbfc",secondary:"#80d4dd",muted:"#3a6b72",onInfo:"#ffffff"},"#1c3a44");h("Neon",{primary:"#ff00ff",primaryHover:"#cc00cc",success:"#00ff00",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0d0d0d",secondary:"#1a1a1a",tertiary:"#262626",hover:"#262626"},{primary:"#ffffff",secondary:"#cccccc",muted:"#666666"},"#333333");h("Retrowave",{primary:"#f77fbe",primaryHover:"#e462a3",success:"#72f1b8",warning:"#ffe261",error:"#ff4444",info:"#79e8fb"},{primary:"#1b0a2e",secondary:"#261440",tertiary:"#321e52",hover:"#321e52"},{primary:"#ffe6f7",secondary:"#c9a0c9",muted:"#6b4c7a"},"#4a2d66");t("Christmas",{primary:"#c41e3a",primaryHover:"#a01830",success:"#228b22",warning:"#ffd700",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0");h("Halloween",{primary:"#ff6600",primaryHover:"#e05500",success:"#4ade80",warning:"#fbbf24",error:"#ff0000",info:"#9333ea"},{primary:"#1a0a00",secondary:"#2d1500",tertiary:"#402000",hover:"#402000"},{primary:"#ffedd5",secondary:"#fdba74",muted:"#9a5c28",onInfo:"#ffffff"},"#5c3400");t("Valentine",{primary:"#e11d48",primaryHover:"#be123c",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#ec4899"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f9a8d4"},"#fda4af");t("Easter",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fef9ff",secondary:"#f3e8ff",tertiary:"#e8d5ff",hover:"#f3e8ff"},{primary:"#581c87",secondary:"#6d28d9",muted:"#c4b5fd"},"#ddd6fe");t("Summer Beach",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#fcd34d");t("Winter Frost",{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#93c5fd"},"#bfdbfe");t("Cherry Blossom",{primary:"#ec4899",primaryHover:"#db2777",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#fbcfe8");t("Harvest",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#d97706"},"#fcd34d");t("Japanese Zen",{primary:"#6b7280",primaryHover:"#4b5563",success:"#6b8e23",warning:"#d4a017",error:"#c0392b",info:"#5f9ea0"},{primary:"#faf9f6",secondary:"#f0ece3",tertiary:"#e6e0d4",hover:"#f0ece3"},{primary:"#2c2c2c",secondary:"#5c5c5c",muted:"#a0998a"},"#d5cec0");t("Moroccan",{primary:"#c2410c",primaryHover:"#9a3412",success:"#15803d",warning:"#ca8a04",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbf0",secondary:"#fef3e0",tertiary:"#fde6c4",hover:"#fef3e0"},{primary:"#3a1a00",secondary:"#7c2d12",muted:"#d97706"},"#f5d0a0");t("Scandinavian",{primary:"#4b5563",primaryHover:"#374151",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ffffff",secondary:"#f9fafb",tertiary:"#f3f4f6",hover:"#f3f4f6"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#e5e7eb");t("Mediterranean",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#2563eb",muted:"#93c5fd"},"#bfdbfe");t("Chinese New Year",{primary:"#dc2626",primaryHover:"#b91c1c",success:"#16a34a",warning:"#d4a017",error:"#ef4444",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#991b1b",muted:"#f87171"},"#fca5a5");t("Indian Festive",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#7c3aed"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#92400e",muted:"#f59e0b"},"#fcd34d");t("Brazilian Carnival",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#facc15",error:"#ef4444",info:"#0ea5e9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac");t("African Earth",{primary:"#92400e",primaryHover:"#78350f",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf5f0",secondary:"#f0e6d6",tertiary:"#e6d5bb",hover:"#f0e6d6"},{primary:"#2b1a0e",secondary:"#5c3d1e",muted:"#a08060"},"#d4b896");h("High Contrast Dark",{primary:"#ffff00",primaryHover:"#cccc00",success:"#00ff00",warning:"#ff8c00",error:"#ff0000",info:"#00ffff"},{primary:"#000000",secondary:"#1a1a1a",tertiary:"#333333",hover:"#333333"},{primary:"#ffffff",secondary:"#ffffff",muted:"#cccccc"},"#ffffff");t("Monochrome",{primary:"#404040",primaryHover:"#262626",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fafafa",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0"},{primary:"#1a1a1a",secondary:"#404040",muted:"#808080"},"#c0c0c0");t("Enhanced Contrast",{primary:"#0050b3",primaryHover:"#003d8c",success:"#006400",warning:"#cc7000",error:"#cc0000",info:"#006680"},{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#ebebeb"},{primary:"#000000",secondary:"#1a1a1a",muted:"#595959"},"#8c8c8c");t("Minimalist",{primary:"#18181b",primaryHover:"#27272a",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#3b82f6"},{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f5f5f5"},{primary:"#0a0a0a",secondary:"#404040",muted:"#a3a3a3"},"#e5e5e5");h("Warm Dark",{primary:"#f59e0b",primaryHover:"#d97706",success:"#10b981",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#1c1917",secondary:"#292524",tertiary:"#44403c",hover:"#44403c"},{primary:"#fafaf9",secondary:"#d6d3d1",muted:"#78716c"},"#57534e");h("Soft Dark",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#34d399",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#1e1e2e",secondary:"#262637",tertiary:"#313147",hover:"#313147"},{primary:"#e8e8f0",secondary:"#a0a0b8",muted:"#5c5c74"},"#3e3e58");t("Coffee",{primary:"#6f4e37",primaryHover:"#5c3d28",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf6f1",secondary:"#f0e8dc",tertiary:"#e6d8c6",hover:"#f0e8dc"},{primary:"#2c1a0e",secondary:"#5c3d28",muted:"#a08868"},"#d4c4a8");t("Wine",{primary:"#7f1d1d",primaryHover:"#641717",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0");const me=process.env.NODE_ENV==="development";let X={enabled:me,slowRenderThreshold:16};const Y=[],I=new Map,Z=new Map;function he(){Y.length=0,I.clear(),Z.clear()}function pe(a){const r=X.slowRenderThreshold;return Y.filter(s=>s.actualDuration>r)}function k(a){return a<1?`${(a*1e3).toFixed(0)}μs`:a<1e3?`${a.toFixed(2)}ms`:`${(a/1e3).toFixed(2)}s`}function ye(){const a=Array.from(I.values()),r=pe(),s=a.reduce((c,o)=>c+o.renderCount,0),i=a.length>0?a.reduce((c,o)=>c+o.avgRenderTime,0)/a.length:0,n=Array.from(Z.values());return{stats:a,slowRenders:r,totalRenders:s,avgRenderTime:i,marks:n}}function ue(){const a=ye();console.group("%c[Nice2Dev Performance Report]","color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"),console.log(`Total renders: ${a.totalRenders}`),console.log(`Average render time: ${k(a.avgRenderTime)}`),console.log(`Slow renders: ${a.slowRenders.length}`),console.group("Component Stats"),console.table(a.stats.sort((r,s)=>s.totalRenderTime-r.totalRenderTime).map(r=>({Name:r.componentName,Renders:r.renderCount,"Avg Time":k(r.avgRenderTime),"Max Time":k(r.maxRenderTime),"Total Time":k(r.totalRenderTime),"Slow Renders":r.slowRenderCount}))),console.groupEnd(),a.slowRenders.length>0&&(console.group("Slow Renders (last 10)"),console.table(a.slowRenders.slice(-10).map(r=>({Component:r.componentName,Phase:r.phase,Duration:k(r.actualDuration),Time:new Date(r.timestamp).toLocaleTimeString()}))),console.groupEnd()),a.marks.length>0&&(console.group("Custom Marks"),console.table(a.marks.filter(r=>r.duration).map(r=>({Name:r.name,Duration:k(r.duration)}))),console.groupEnd()),console.groupEnd()}const ve=f.memo(({position:a="bottom-right",defaultCollapsed:r=!0})=>{const[s,i]=f.useState(r),[n,c]=f.useState([]),[o,d]=f.useState({used:0,total:0});if(f.useEffect(()=>{const m=()=>{const M=Array.from(I.values());c(M.sort((u,x)=>x.totalRenderTime-u.totalRenderTime).slice(0,10));const b=window.performance;b.memory&&d({used:b.memory.usedJSHeapSize/1024/1024,total:b.memory.totalJSHeapSize/1024/1024})};m();const g=setInterval(m,2e3);return()=>clearInterval(g)},[]),!X.enabled)return null;const v={position:"fixed",zIndex:99999,...a.includes("top")?{top:8}:{bottom:8},...a.includes("left")?{left:8}:{right:8}};return e.jsxs("div",{style:{...v,background:"var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",color:"var(--nice-color-white, #fff)",borderRadius:8,fontSize:11,fontFamily:"Monaco, Consolas, monospace",padding:s?"4px 8px":8,maxWidth:s?"auto":300,maxHeight:s?"auto":400,overflow:"auto"},children:[e.jsxs("div",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:8},onClick:()=>i(m=>!m),children:[e.jsx("span",{"aria-hidden":"true",style:{width:8,height:8,borderRadius:"50%",background:"var(--nice-color-success, #22c55e)"}}),e.jsx("span",{children:"Profiler"}),o.used>0&&e.jsxs("span",{style:{color:o.used>100?"var(--nice-color-warning, #f59e0b)":"var(--nice-text-muted, #64748b)"},children:[o.used.toFixed(0),"MB"]}),e.jsx("span",{style:{marginLeft:"auto",opacity:.5,display:"inline-flex"},children:e.jsx(p,{name:s?"chevron-down":"chevron-up",size:12})})]}),!s&&e.jsxs("div",{style:{marginTop:8},children:[e.jsx("div",{style:{borderBottom:"1px solid var(--nice-border-color, #333)",paddingBottom:4,marginBottom:8},children:e.jsx("strong",{children:"Top Components"})}),n.map(m=>e.jsxs("div",{style:{marginBottom:4,display:"flex",gap:8},children:[e.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:m.componentName}),e.jsx("span",{style:{color:m.avgRenderTime>16?"var(--nice-color-warning, #f59e0b)":"var(--nice-color-success, #22c55e)"},children:k(m.avgRenderTime)}),e.jsxs("span",{style:{color:"var(--nice-text-muted, #64748b)",minWidth:30,textAlign:"right"},children:["x",m.renderCount]})]},m.componentName)),e.jsxs("div",{style:{marginTop:8,display:"flex",gap:8},children:[e.jsx("button",{onClick:ue,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:"Print Report"}),e.jsx("button",{onClick:he,style:{flex:1,padding:"4px 8px",background:"var(--nice-bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--nice-text-primary, #fff)",cursor:"pointer",fontSize:10},children:"Clear"})]})]})]})});ve.displayName="ProfilerOverlay";process.env.NODE_ENV;f.createContext(null);f.createContext({enabled:!0,active:!1,run:()=>{}});const E="nice-tutorial-button-styles";if(typeof document<"u"&&!document.getElementById(E)){const a=document.createElement("style");a.id=E,a.textContent=`
2
- .nice-tutorial-button {
3
- display: inline-flex;
4
- align-items: center;
5
- justify-content: center;
6
- border: 1px solid var(--nice-border, #cbd5e1);
7
- background: var(--nice-bg, #fff);
8
- color: var(--nice-text-secondary, #475569);
9
- border-radius: var(--nice-radius-full, 9999px);
10
- cursor: help;
11
- font-weight: 700;
12
- line-height: 1;
13
- padding: 0;
14
- transition: background var(--nice-transition, 200ms ease), color var(--nice-transition, 200ms ease), border-color var(--nice-transition, 200ms ease);
15
- }
16
- .nice-tutorial-button:hover {
17
- background: var(--nice-primary, #2563eb);
18
- border-color: var(--nice-primary, #2563eb);
19
- color: var(--nice-text-inverse, #fff);
20
- }
21
- .nice-tutorial-button:focus-visible {
22
- outline: none;
23
- box-shadow: 0 0 0 2px var(--nice-bg, #fff), 0 0 0 4px var(--nice-primary, #2563eb);
24
- }
25
- .nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
26
- .nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
27
- `,document.head.appendChild(a)}f.createContext(null);f.createContext(null);f.createContext(null);f.createContext(null);const $={display:"inline-block",width:10,height:10,borderRadius:"50%",background:"currentColor"},R=[{type:"device-list",label:"Device List",icon:"list"},{type:"device-status",label:"Device Status",icon:"success"},{type:"telemetry-chart",label:"Telemetry Chart",icon:"bar-chart"},{type:"gauge",label:"Gauge",icon:"clock"},{type:"map",label:"Device Map",icon:"map-pin"},{type:"alarms",label:"Alarms",icon:"bell"},{type:"control-panel",label:"Control Panel",icon:"settings"},{type:"topology",label:"Network Topology",icon:"link"},{type:"kpi",label:"KPI Card",icon:"target"},{type:"camera-feed",label:"Camera Feed",icon:"video"}];function be({devices:a=[],widgets:r=[],alarms:s=[],onDeviceSelect:i,onWidgetChange:n,onCommand:c,onAlarmAcknowledge:o,fetchTelemetry:d,className:v=""}){const[m,g]=f.useState(r),[M,b]=f.useState(null),[u,x]=f.useState("dashboard"),[j,H]=f.useState(!1),[_,S]=f.useState(""),y=f.useCallback(l=>{g(w=>{const C=l(w);return n==null||n(C),C})},[n]),N=f.useCallback(l=>{var C;const w={id:de(),type:l,title:((C=R.find(D=>D.type===l))==null?void 0:C.label)||l,position:{x:0,y:ge(m),width:4,height:3},config:{}};y(D=>[...D,w])},[m,y]),A=f.useCallback(l=>{b(l),i==null||i(l)},[i]),P=f.useCallback(l=>{o==null||o(l)},[o]),z=a.filter(l=>!_||l.name.toLowerCase().includes(_.toLowerCase())||l.type.toLowerCase().includes(_.toLowerCase())),L=s.filter(l=>!l.cleared),U=L.filter(l=>l.severity==="critical"||l.severity==="high");return e.jsxs("div",{className:`nice-iot-dashboard ${v}`,children:[e.jsxs("header",{className:"nice-iot-dashboard__header",children:[e.jsx("h1",{children:"IoT Dashboard"}),e.jsxs("div",{className:"nice-iot-dashboard__stats",children:[e.jsxs("span",{className:"nice-iot-dashboard__stat",children:[e.jsx("span",{className:"nice-iot-dashboard__stat-icon",children:e.jsx(p,{name:"wifi",size:14})}),a.length," Devices"]}),e.jsxs("span",{className:"nice-iot-dashboard__stat nice-iot-dashboard__stat--online",children:[e.jsx("span",{className:"nice-iot-dashboard__stat-icon",style:$}),a.filter(l=>l.status==="online").length," Online"]}),e.jsxs("span",{className:"nice-iot-dashboard__stat nice-iot-dashboard__stat--offline",children:[e.jsx("span",{className:"nice-iot-dashboard__stat-icon",style:$}),a.filter(l=>l.status==="offline").length," Offline"]}),U.length>0&&e.jsxs("span",{className:"nice-iot-dashboard__stat nice-iot-dashboard__stat--alarms",children:[e.jsx("span",{className:"nice-iot-dashboard__stat-icon",children:e.jsx(p,{name:"bell",size:14})}),U.length," Alarms"]})]}),e.jsxs("nav",{className:"nice-iot-dashboard__nav",children:[e.jsx("button",{className:u==="dashboard"?"active":"",onClick:()=>x("dashboard"),children:"Dashboard"}),e.jsx("button",{className:u==="devices"?"active":"",onClick:()=>x("devices"),children:"Devices"}),e.jsxs("button",{className:u==="alarms"?"active":"",onClick:()=>x("alarms"),children:["Alarms ",L.length>0&&`(${L.length})`]})]}),e.jsx("div",{className:"nice-iot-dashboard__actions",children:u==="dashboard"&&e.jsxs("button",{onClick:()=>H(!j),children:[e.jsx(p,{name:j?"check":"edit",size:14})," ",j?"Done":"Edit"]})})]}),u==="dashboard"&&e.jsxs("div",{className:"nice-iot-dashboard__main",children:[j&&e.jsxs("aside",{className:"nice-iot-dashboard__palette",children:[e.jsx("h4",{children:"Add Widget"}),R.map(l=>e.jsxs("button",{className:"nice-iot-dashboard__palette-item",onClick:()=>N(l.type),children:[e.jsx(p,{name:l.icon,size:16}),e.jsx("span",{children:l.label})]},l.type))]}),e.jsxs("div",{className:"nice-iot-dashboard__grid",children:[m.map(l=>e.jsx(xe,{widget:l,devices:a,alarms:s,isEditing:j,onCommand:c,onDelete:()=>y(w=>w.filter(C=>C.id!==l.id))},l.id)),m.length===0&&e.jsx("div",{className:"nice-iot-dashboard__empty",children:j?"Add widgets from the palette":"No widgets configured. Click Edit to add widgets."})]})]}),u==="devices"&&e.jsxs("div",{className:"nice-iot-dashboard__devices",children:[e.jsx("div",{className:"nice-iot-dashboard__devices-toolbar",children:e.jsx("input",{type:"search",placeholder:"Search devices...",value:_,onChange:l=>S(l.target.value)})}),e.jsx("div",{className:"nice-iot-dashboard__device-grid",children:z.map(l=>e.jsx(je,{device:l,isSelected:(M==null?void 0:M.id)===l.id,onSelect:()=>A(l)},l.id))}),M&&e.jsx(_e,{device:M,onCommand:c,onClose:()=>b(null)})]}),u==="alarms"&&e.jsx("div",{className:"nice-iot-dashboard__alarms",children:e.jsxs("table",{className:"nice-iot-dashboard__alarm-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Severity"}),e.jsx("th",{children:"Device"}),e.jsx("th",{children:"Message"}),e.jsx("th",{children:"Time"}),e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Actions"})]})}),e.jsx("tbody",{children:L.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"nice-iot-dashboard__no-alarms",children:"No active alarms"})}):L.map(l=>{const w=a.find(C=>C.id===l.deviceId);return e.jsxs("tr",{className:`nice-iot-dashboard__alarm-row nice-iot-dashboard__alarm-row--${l.severity}`,children:[e.jsx("td",{children:e.jsx("span",{className:`nice-iot-dashboard__severity nice-iot-dashboard__severity--${l.severity}`,children:l.severity})}),e.jsx("td",{children:(w==null?void 0:w.name)||l.deviceId}),e.jsx("td",{children:l.message}),e.jsx("td",{children:l.timestamp.toLocaleString()}),e.jsx("td",{children:l.acknowledged?"Acknowledged":"Active"}),e.jsx("td",{children:!l.acknowledged&&e.jsx("button",{onClick:()=>P(l.id),children:"Acknowledge"})})]},l.id)})})]})})]})}function ge(a){return a.length===0?0:Math.max(...a.map(r=>r.position.y+r.position.height))}function V(a){switch(a){case"online":return"var(--nice-success, #28a745)";case"offline":return"var(--nice-text-secondary, #6c757d)";case"warning":return"var(--nice-warning, #ffc107)";case"error":return"var(--nice-danger, #dc3545)";case"maintenance":return"var(--nice-info, #17a2b8)";default:return"var(--nice-text-secondary, #6c757d)"}}function xe({widget:a,devices:r,alarms:s,isEditing:i,onCommand:n,onDelete:c}){const o=R.find(d=>d.type===a.type);return e.jsxs("div",{className:`nice-iot-dashboard__widget nice-iot-dashboard__widget--${a.type}`,style:{gridColumn:`span ${a.position.width}`,gridRow:`span ${a.position.height}`},children:[e.jsxs("div",{className:"nice-iot-dashboard__widget-header",children:[e.jsx("span",{className:"nice-iot-dashboard__widget-icon",children:e.jsx(p,{name:(o==null?void 0:o.icon)??"box",size:14})}),e.jsx("span",{className:"nice-iot-dashboard__widget-title",children:a.title}),i&&e.jsx("button",{className:"nice-iot-dashboard__widget-delete",onClick:c,children:"×"})]}),e.jsx("div",{className:"nice-iot-dashboard__widget-content",children:e.jsx(Me,{widget:a,devices:r,alarms:s,onCommand:n})})]})}function Me({widget:a,devices:r,alarms:s,onCommand:i}){switch(a.type){case"device-list":return e.jsx("div",{className:"nice-iot-dashboard__device-list",children:r.slice(0,10).map(n=>e.jsxs("div",{className:"nice-iot-dashboard__device-list-item",children:[e.jsx("span",{className:"nice-iot-dashboard__device-status",style:{background:V(n.status)}}),e.jsx("span",{children:n.name}),e.jsx("span",{className:"nice-iot-dashboard__device-type",children:n.type})]},n.id))});case"device-status":return e.jsx("div",{className:"nice-iot-dashboard__status-grid",children:["online","offline","warning","error"].map(n=>{const c=r.filter(o=>o.status===n).length;return e.jsxs("div",{className:"nice-iot-dashboard__status-card",children:[e.jsx("span",{className:"nice-iot-dashboard__status-indicator",style:{background:V(n)}}),e.jsx("span",{className:"nice-iot-dashboard__status-count",children:c}),e.jsx("span",{className:"nice-iot-dashboard__status-label",children:n})]},n)})});case"telemetry-chart":return e.jsxs("div",{className:"nice-iot-dashboard__chart-placeholder",children:[e.jsx(p,{name:"bar-chart",size:32}),e.jsx("span",{children:"Telemetry Chart"}),e.jsx("small",{children:"Configure device and capability"})]});case"gauge":return e.jsx("div",{className:"nice-iot-dashboard__gauge",children:e.jsxs("svg",{viewBox:"0 0 100 60",children:[e.jsx("path",{d:"M 10 55 A 40 40 0 0 1 90 55",fill:"none",stroke:"var(--nice-border, #e0e0e0)",strokeWidth:"8"}),e.jsx("path",{d:"M 10 55 A 40 40 0 0 1 90 55",fill:"none",stroke:"var(--nice-primary, #0066cc)",strokeWidth:"8",strokeDasharray:"63 126"}),e.jsx("text",{x:"50",y:"50",textAnchor:"middle",fontSize:"14",fontWeight:"bold",children:"50%"})]})});case"map":return e.jsxs("div",{className:"nice-iot-dashboard__map-placeholder",children:[e.jsx(p,{name:"map-pin",size:32}),e.jsx("span",{children:"Device Map"}),e.jsxs("small",{children:[r.filter(n=>n.location).length," devices with location"]})]});case"alarms":{const n=s.filter(c=>!c.cleared).slice(0,5);return e.jsx("div",{className:"nice-iot-dashboard__alarm-list",children:n.length===0?e.jsx("div",{className:"nice-iot-dashboard__alarm-empty",children:"No active alarms"}):n.map(c=>e.jsxs("div",{className:`nice-iot-dashboard__alarm-item nice-iot-dashboard__alarm-item--${c.severity}`,children:[e.jsx("span",{className:"nice-iot-dashboard__alarm-severity",children:c.severity}),e.jsx("span",{className:"nice-iot-dashboard__alarm-message",children:c.message})]},c.id))})}case"control-panel":return e.jsxs("div",{className:"nice-iot-dashboard__control-placeholder",children:[e.jsx(p,{name:"settings",size:32}),e.jsx("span",{children:"Control Panel"}),e.jsx("small",{children:"Configure device controls"})]});case"kpi":return e.jsxs("div",{className:"nice-iot-dashboard__kpi",children:[e.jsx("div",{className:"nice-iot-dashboard__kpi-value",children:r.length}),e.jsx("div",{className:"nice-iot-dashboard__kpi-label",children:"Total Devices"})]});default:return e.jsx("div",{className:"nice-iot-dashboard__widget-placeholder",children:a.type})}}function je({device:a,isSelected:r,onSelect:s}){return e.jsxs("div",{className:`nice-iot-dashboard__device-card ${r?"nice-iot-dashboard__device-card--selected":""}`,onClick:s,children:[e.jsxs("div",{className:"nice-iot-dashboard__device-card-header",children:[e.jsx("span",{className:"nice-iot-dashboard__device-status",style:{background:V(a.status)}}),e.jsx("span",{className:"nice-iot-dashboard__device-name",children:a.name})]}),e.jsxs("div",{className:"nice-iot-dashboard__device-card-body",children:[e.jsxs("div",{className:"nice-iot-dashboard__device-info",children:[e.jsxs("span",{children:["Type: ",a.type]}),e.jsxs("span",{children:["Protocol: ",a.protocol]})]}),a.lastSeen&&e.jsxs("div",{className:"nice-iot-dashboard__device-lastseen",children:["Last seen: ",a.lastSeen.toLocaleString()]}),e.jsxs("div",{className:"nice-iot-dashboard__device-capabilities",children:[a.capabilities.slice(0,3).map(i=>e.jsx("span",{className:"nice-iot-dashboard__capability-badge",children:i.name},i.id)),a.capabilities.length>3&&e.jsxs("span",{className:"nice-iot-dashboard__capability-more",children:["+",a.capabilities.length-3]})]})]})]})}function _e({device:a,onCommand:r,onClose:s}){return e.jsxs("aside",{className:"nice-iot-dashboard__device-detail",children:[e.jsxs("div",{className:"nice-iot-dashboard__device-detail-header",children:[e.jsx("h3",{children:a.name}),e.jsx("button",{onClick:s,children:"×"})]}),e.jsxs("div",{className:"nice-iot-dashboard__device-detail-content",children:[e.jsxs("section",{children:[e.jsx("h4",{children:"Status"}),e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:"Status:"}),e.jsx("span",{className:"nice-iot-dashboard__status-badge",style:{background:V(a.status)},children:a.status})]}),a.lastSeen&&e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:"Last Seen:"}),e.jsx("span",{children:a.lastSeen.toLocaleString()})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:"Connection"}),e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:"Protocol:"}),e.jsx("span",{children:a.protocol})]}),a.connectionInfo.host&&e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:"Host:"}),e.jsxs("span",{children:[a.connectionInfo.host,":",a.connectionInfo.port]})]})]}),a.metadata&&e.jsxs("section",{children:[e.jsx("h4",{children:"Metadata"}),a.metadata.manufacturer&&e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:"Manufacturer:"}),e.jsx("span",{children:a.metadata.manufacturer})]}),a.metadata.model&&e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:"Model:"}),e.jsx("span",{children:a.metadata.model})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:"Capabilities"}),e.jsx("div",{className:"nice-iot-dashboard__capabilities-list",children:a.capabilities.map(i=>e.jsxs("div",{className:"nice-iot-dashboard__capability-item",children:[e.jsx("span",{className:"nice-iot-dashboard__capability-name",children:i.name}),e.jsx("span",{className:"nice-iot-dashboard__capability-type",children:i.type}),i.writable&&r&&e.jsx("button",{className:"nice-iot-dashboard__capability-control",onClick:()=>r(a.id,i.id,!0),children:"Control"})]},i.id))})]})]})]})}const Ne=[{name:"MQTT Broker",image:"eclipse-mosquitto:latest"},{name:"Node-RED",image:"nodered/node-red:latest"},{name:"InfluxDB",image:"influxdb:latest"},{name:"Grafana",image:"grafana/grafana:latest"},{name:"Telegraf",image:"telegraf:latest"},{name:"Protocol Adapter",image:"nice2dev/protocol-adapter:latest"}];function we({nodes:a=[],modules:r=[],onNodeSelect:s,onModuleDeploy:i,onModuleAction:n,onNodeSync:c,className:o=""}){const[d,v]=f.useState(null),[m,g]=f.useState("nodes"),[M,b]=f.useState(!1),[u,x]=f.useState({name:"",image:"",status:"pending"}),j=f.useCallback(y=>{v(y),s==null||s(y)},[s]),H=f.useCallback(async()=>{!d||!u.name||!u.image||(await(i==null?void 0:i(d.id,u)),b(!1),x({name:"",image:"",status:"pending"}))},[d,u,i]),_=f.useCallback(async(y,N)=>{d&&await(n==null?void 0:n(d.id,y,N))},[d,n]),S=f.useCallback(async()=>{d&&await(c==null?void 0:c(d.id))},[d,c]);return e.jsxs("div",{className:`nice-edge-manager ${o}`,children:[e.jsxs("header",{className:"nice-edge-manager__header",children:[e.jsx("h1",{children:"Edge Manager"}),e.jsxs("nav",{className:"nice-edge-manager__nav",children:[e.jsxs("button",{className:m==="nodes"?"active":"",onClick:()=>g("nodes"),children:["Nodes (",a.length,")"]}),e.jsx("button",{className:m==="modules"?"active":"",onClick:()=>g("modules"),children:"Modules"})]})]}),e.jsxs("div",{className:"nice-edge-manager__main",children:[m==="nodes"&&e.jsx("div",{className:"nice-edge-manager__nodes",children:e.jsxs("div",{className:"nice-edge-manager__node-grid",children:[a.map(y=>e.jsx(He,{node:y,isSelected:(d==null?void 0:d.id)===y.id,onSelect:()=>j(y)},y.id)),a.length===0&&e.jsx("div",{className:"nice-edge-manager__empty",children:"No edge nodes configured"})]})}),m==="modules"&&d&&e.jsxs("div",{className:"nice-edge-manager__modules",children:[e.jsxs("div",{className:"nice-edge-manager__modules-header",children:[e.jsxs("h3",{children:["Modules on ",d.name]}),e.jsx("button",{className:"nice-edge-manager__deploy-btn",onClick:()=>b(!0),children:"+ Deploy Module"})]}),e.jsxs("div",{className:"nice-edge-manager__module-grid",children:[d.deployedModules.map(y=>e.jsx(ze,{module:y,onAction:N=>_(y.id,N)},y.id)),d.deployedModules.length===0&&e.jsx("div",{className:"nice-edge-manager__empty",children:"No modules deployed on this node"})]})]}),m==="modules"&&!d&&e.jsx("div",{className:"nice-edge-manager__no-selection",children:"Select a node from the Nodes tab to manage modules"}),d&&e.jsx(ke,{node:d,onSync:S,onClose:()=>v(null)})]}),M&&e.jsx(Se,{config:u,templates:Ne,onChange:x,onDeploy:H,onClose:()=>b(!1)})]})}function ee(a){switch(a){case"running":return"var(--nice-success, #28a745)";case"stopped":return"var(--nice-text-secondary, #6c757d)";case"updating":return"var(--nice-warning, #ffc107)";case"error":return"var(--nice-danger, #dc3545)";case"unreachable":return"var(--nice-text-secondary, #868e96)";default:return"var(--nice-text-secondary, #6c757d)"}}function F(a){return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(1)} KB`:a<1024*1024*1024?`${(a/1024/1024).toFixed(1)} MB`:`${(a/1024/1024/1024).toFixed(2)} GB`}function Ce(a){const r=Math.floor(a/86400),s=Math.floor(a%86400/3600),i=Math.floor(a%3600/60);return r>0?`${r}d ${s}h`:s>0?`${s}h ${i}m`:`${i}m`}function He({node:a,isSelected:r,onSelect:s}){return e.jsxs("div",{className:`nice-edge-manager__node-card ${r?"nice-edge-manager__node-card--selected":""}`,onClick:s,children:[e.jsxs("div",{className:"nice-edge-manager__node-header",children:[e.jsx("span",{className:"nice-edge-manager__node-status",style:{background:ee(a.status)}}),e.jsx("span",{className:"nice-edge-manager__node-name",children:a.name}),e.jsx("span",{className:"nice-edge-manager__node-type",children:a.type})]}),e.jsxs("div",{className:"nice-edge-manager__node-body",children:[e.jsxs("div",{className:"nice-edge-manager__node-info",children:[e.jsxs("span",{children:[e.jsx(p,{name:"server",size:12})," ",a.hardware.cpu]}),e.jsxs("span",{children:[e.jsx(p,{name:"database",size:12})," ",(a.hardware.memoryMB/1024).toFixed(1)," GB"]})]}),e.jsx("div",{className:"nice-edge-manager__node-metrics",children:a.metrics&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-edge-manager__metric",children:[e.jsx("span",{className:"nice-edge-manager__metric-label",children:"CPU"}),e.jsx("div",{className:"nice-edge-manager__metric-bar",children:e.jsx("div",{className:"nice-edge-manager__metric-fill",style:{width:`${a.metrics.cpuUsage}%`}})}),e.jsxs("span",{className:"nice-edge-manager__metric-value",children:[a.metrics.cpuUsage.toFixed(0),"%"]})]}),e.jsxs("div",{className:"nice-edge-manager__metric",children:[e.jsx("span",{className:"nice-edge-manager__metric-label",children:"MEM"}),e.jsx("div",{className:"nice-edge-manager__metric-bar",children:e.jsx("div",{className:"nice-edge-manager__metric-fill",style:{width:`${a.metrics.memoryUsage}%`}})}),e.jsxs("span",{className:"nice-edge-manager__metric-value",children:[a.metrics.memoryUsage.toFixed(0),"%"]})]})]})}),e.jsxs("div",{className:"nice-edge-manager__node-modules",children:[a.deployedModules.length," modules deployed"]})]})]})}function ze({module:a,onAction:r}){const s={running:"var(--nice-success, #28a745)",stopped:"var(--nice-text-secondary, #6c757d)",error:"var(--nice-danger, #dc3545)",pending:"var(--nice-warning, #ffc107)"};return e.jsxs("div",{className:"nice-edge-manager__module-card",children:[e.jsxs("div",{className:"nice-edge-manager__module-header",children:[e.jsx("span",{className:"nice-edge-manager__module-status",style:{background:s[a.status]||"var(--nice-bg-tertiary, #6c757d)"}}),e.jsx("span",{className:"nice-edge-manager__module-name",children:a.name}),e.jsxs("span",{className:"nice-edge-manager__module-version",children:["v",a.version]})]}),e.jsxs("div",{className:"nice-edge-manager__module-body",children:[e.jsx("div",{className:"nice-edge-manager__module-image",children:a.image}),a.resources&&e.jsxs("div",{className:"nice-edge-manager__module-resources",children:[a.resources.cpuLimit&&e.jsxs("span",{children:["CPU: ",a.resources.cpuLimit]}),a.resources.memoryLimitMB&&e.jsxs("span",{children:["RAM: ",a.resources.memoryLimitMB," MB"]})]}),a.ports&&a.ports.length>0&&e.jsxs("div",{className:"nice-edge-manager__module-ports",children:["Ports: ",a.ports.map(i=>`${i.host}:${i.container}`).join(", ")]})]}),e.jsxs("div",{className:"nice-edge-manager__module-actions",children:[a.status==="running"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>r("stop"),children:"Stop"}),e.jsx("button",{onClick:()=>r("restart"),children:"Restart"})]}),a.status==="stopped"&&e.jsx("button",{onClick:()=>r("start"),children:"Start"}),e.jsx("button",{className:"nice-edge-manager__module-remove",onClick:()=>r("remove"),children:"Remove"})]})]})}function ke({node:a,onSync:r,onClose:s}){return e.jsxs("aside",{className:"nice-edge-manager__detail",children:[e.jsxs("div",{className:"nice-edge-manager__detail-header",children:[e.jsx("h3",{children:a.name}),e.jsxs("div",{className:"nice-edge-manager__detail-actions",children:[e.jsxs("button",{onClick:r,children:[e.jsx(p,{name:"refresh",size:14})," Sync"]}),e.jsx("button",{onClick:s,"aria-label":"Close",children:e.jsx(p,{name:"close",size:14})})]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-content",children:[e.jsxs("section",{children:[e.jsx("h4",{children:"Status"}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Status:"}),e.jsx("span",{className:"nice-edge-manager__status-badge",style:{background:ee(a.status)},children:a.status})]}),a.metrics&&e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Uptime:"}),e.jsx("span",{children:Ce(a.metrics.uptime)})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:"Hardware"}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"CPU:"}),e.jsxs("span",{children:[a.hardware.cpu," (",a.hardware.cores," cores)"]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Memory:"}),e.jsxs("span",{children:[(a.hardware.memoryMB/1024).toFixed(1)," GB"]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Storage:"}),e.jsxs("span",{children:[(a.hardware.storageMB/1024).toFixed(1)," GB"]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Architecture:"}),e.jsx("span",{children:a.hardware.architecture})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:"Software"}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"OS:"}),e.jsxs("span",{children:[a.software.os," ",a.software.osVersion]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Runtime:"}),e.jsxs("span",{children:[a.software.runtime," ",a.software.runtimeVersion]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Agent:"}),e.jsxs("span",{children:[a.software.agent," v",a.software.agentVersion]})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:"Connectivity"}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Cloud:"}),e.jsxs("span",{children:[e.jsx(p,{name:a.connectivity.cloudConnected?"check":"close",size:12})," ",a.connectivity.cloudConnected?"Connected":"Disconnected"]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Network:"}),e.jsx("span",{children:a.connectivity.localNetwork})]}),a.connectivity.publicIP&&e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Public IP:"}),e.jsx("span",{children:a.connectivity.publicIP})]}),a.connectivity.lastSync&&e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:"Last Sync:"}),e.jsx("span",{children:a.connectivity.lastSync.toLocaleString()})]})]}),a.metrics&&e.jsxs("section",{children:[e.jsx("h4",{children:"Resource Usage"}),e.jsxs("div",{className:"nice-edge-manager__resource-chart",children:[e.jsxs("div",{className:"nice-edge-manager__resource-item",children:[e.jsx("span",{children:"CPU"}),e.jsx("div",{className:"nice-edge-manager__resource-bar",children:e.jsx("div",{className:"nice-edge-manager__resource-fill",style:{width:`${a.metrics.cpuUsage}%`}})}),e.jsxs("span",{children:[a.metrics.cpuUsage.toFixed(1),"%"]})]}),e.jsxs("div",{className:"nice-edge-manager__resource-item",children:[e.jsx("span",{children:"Memory"}),e.jsx("div",{className:"nice-edge-manager__resource-bar",children:e.jsx("div",{className:"nice-edge-manager__resource-fill",style:{width:`${a.metrics.memoryUsage}%`}})}),e.jsxs("span",{children:[a.metrics.memoryUsage.toFixed(1),"%"]})]}),e.jsxs("div",{className:"nice-edge-manager__resource-item",children:[e.jsx("span",{children:"Disk"}),e.jsx("div",{className:"nice-edge-manager__resource-bar",children:e.jsx("div",{className:"nice-edge-manager__resource-fill",style:{width:`${a.metrics.diskUsage}%`}})}),e.jsxs("span",{children:[a.metrics.diskUsage.toFixed(1),"%"]})]})]}),e.jsxs("div",{className:"nice-edge-manager__network-stats",children:[e.jsxs("span",{children:["↓ ",F(a.metrics.networkIn)]}),e.jsxs("span",{children:["↑ ",F(a.metrics.networkOut)]})]})]})]})]})}function Se({config:a,templates:r,onChange:s,onDeploy:i,onClose:n}){return e.jsx("div",{className:"nice-edge-manager__dialog-overlay",children:e.jsxs("div",{className:"nice-edge-manager__dialog",children:[e.jsxs("div",{className:"nice-edge-manager__dialog-header",children:[e.jsx("h3",{children:"Deploy Module"}),e.jsx("button",{onClick:n,"aria-label":"Close",children:e.jsx(p,{name:"close",size:14})})]}),e.jsxs("div",{className:"nice-edge-manager__dialog-content",children:[e.jsxs("div",{className:"nice-edge-manager__field",children:[e.jsx("label",{children:"Template (optional)"}),e.jsxs("select",{value:"",onChange:c=>{const o=r.find(d=>d.image===c.target.value);o&&s({...a,name:o.name,image:o.image})},children:[e.jsx("option",{value:"",children:"Select a template..."}),r.map(c=>e.jsx("option",{value:c.image,children:c.name},c.image))]})]}),e.jsxs("div",{className:"nice-edge-manager__field",children:[e.jsx("label",{children:"Module Name"}),e.jsx("input",{type:"text",value:a.name||"",onChange:c=>s({...a,name:c.target.value}),placeholder:"e.g., my-module"})]}),e.jsxs("div",{className:"nice-edge-manager__field",children:[e.jsx("label",{children:"Container Image"}),e.jsx("input",{type:"text",value:a.image||"",onChange:c=>s({...a,image:c.target.value}),placeholder:"e.g., nginx:latest"})]}),e.jsxs("div",{className:"nice-edge-manager__field",children:[e.jsx("label",{children:"Version"}),e.jsx("input",{type:"text",value:a.version||"1.0.0",onChange:c=>s({...a,version:c.target.value})})]})]}),e.jsxs("div",{className:"nice-edge-manager__dialog-footer",children:[e.jsx("button",{onClick:n,children:"Cancel"}),e.jsx("button",{className:"nice-edge-manager__deploy-confirm",onClick:i,children:"Deploy"})]})]})})}const B={broker:"localhost",port:1883,clientId:`nice2dev-${Date.now()}`,useTLS:!1,keepAlive:60,cleanSession:!0,topics:[]},O={host:"localhost",port:5683,useDTLS:!1,resources:[]},q={type:"tcp",host:"localhost",port:502,slaveId:1,timeout:1e3,registers:[]},W={endpointUrl:"opc.tcp://localhost:4840",securityMode:"None",authentication:"anonymous",applicationName:"Nice2Dev IoT Client",nodes:[]};function Le({protocol:a="mqtt",config:r,onSave:s,onTest:i,className:n=""}){const{t:c}=T(),[o,d]=f.useState(a),[v,m]=f.useState((r==null?void 0:r.type)==="mqtt"?{...B,...r.config}:B),[g,M]=f.useState((r==null?void 0:r.type)==="coap"?{...O,...r.config}:O),[b,u]=f.useState((r==null?void 0:r.type)==="modbus"?{...q,...r.config}:q),[x,j]=f.useState((r==null?void 0:r.type)==="opcua"?{...W,...r.config}:W),[H,_]=f.useState(null),[S,y]=f.useState(!1),N=f.useCallback(()=>{switch(o){case"mqtt":return v;case"coap":return g;case"modbus-tcp":case"modbus-rtu":return b;case"opcua":return x;default:return v}},[o,v,g,b,x]),A=f.useCallback(()=>{s==null||s(N())},[N,s]),P=f.useCallback(async()=>{if(i){y(!0),_(null);try{const z=await i(N());_(z)}catch(z){_({success:!1,message:String(z)})}finally{y(!1)}}},[N,i]);return e.jsxs("div",{className:`nice-protocol-config ${n}`,children:[e.jsxs("header",{className:"nice-protocol-config__header",children:[e.jsx("h2",{children:c("protocolConfig.title","Protocol Configuration")}),e.jsxs("div",{className:"nice-protocol-config__protocol-selector",children:[e.jsx("label",{children:c("protocolConfig.protocol","Protocol:")}),e.jsxs("select",{value:o,onChange:z=>d(z.target.value),children:[e.jsx("option",{value:"mqtt",children:c("protocolConfig.mqtt","MQTT")}),e.jsx("option",{value:"coap",children:c("protocolConfig.coap","CoAP")}),e.jsx("option",{value:"modbus-tcp",children:c("protocolConfig.modbusTcp","Modbus TCP")}),e.jsx("option",{value:"modbus-rtu",children:c("protocolConfig.modbusRtu","Modbus RTU")}),e.jsx("option",{value:"opcua",children:c("protocolConfig.opcUa","OPC-UA")})]})]})]}),e.jsxs("div",{className:"nice-protocol-config__content",children:[o==="mqtt"&&e.jsx(Te,{config:v,onChange:m}),o==="coap"&&e.jsx(Ve,{config:g,onChange:M}),(o==="modbus-tcp"||o==="modbus-rtu")&&e.jsx(Ae,{config:b,type:o==="modbus-rtu"?"rtu":"tcp",onChange:u}),o==="opcua"&&e.jsx(Pe,{config:x,onChange:j})]}),H&&e.jsxs("div",{className:`nice-protocol-config__test-result nice-protocol-config__test-result--${H.success?"success":"error"}`,children:[e.jsx(p,{name:H.success?"check":"close",size:14})," ",H.message]}),e.jsxs("footer",{className:"nice-protocol-config__footer",children:[e.jsx("button",{className:"nice-protocol-config__test-btn",onClick:P,disabled:S||!i,children:S?c("protocolConfig.testing","Testing..."):e.jsxs(e.Fragment,{children:[e.jsx(p,{name:"plug",size:14})," ",c("protocolConfig.testConnection","Test Connection")]})}),e.jsxs("button",{className:"nice-protocol-config__save-btn",onClick:A,children:[e.jsx(p,{name:"save",size:14})," ",c("save","Save")]})]})]})}function Te({config:a,onChange:r}){const{t:s}=T();return e.jsxs("div",{className:"nice-protocol-config__section",children:[e.jsx("h3",{children:s("protocolConfig.mqttConfiguration","MQTT Configuration")}),e.jsxs("div",{className:"nice-protocol-config__grid",children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.broker","Broker")}),e.jsx("input",{type:"text",value:a.broker,onChange:i=>r({...a,broker:i.target.value}),placeholder:"localhost"})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.port","Port")}),e.jsx("input",{type:"number",value:a.port,onChange:i=>r({...a,port:parseInt(i.target.value,10)||1883})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.clientId","Client ID")}),e.jsx("input",{type:"text",value:a.clientId,onChange:i=>r({...a,clientId:i.target.value})})]}),e.jsx("div",{className:"nice-protocol-config__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:a.useTLS,onChange:i=>r({...a,useTLS:i.target.checked})}),s("protocolConfig.useTls","Use TLS")]})}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.username","Username")}),e.jsx("input",{type:"text",value:a.username||"",onChange:i=>r({...a,username:i.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.password","Password")}),e.jsx("input",{type:"password",value:a.password||"",onChange:i=>r({...a,password:i.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.keepAlive","Keep Alive (seconds)")}),e.jsx("input",{type:"number",value:a.keepAlive,onChange:i=>r({...a,keepAlive:parseInt(i.target.value,10)||60})})]}),e.jsx("div",{className:"nice-protocol-config__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:a.cleanSession,onChange:i=>r({...a,cleanSession:i.target.checked})}),s("protocolConfig.cleanSession","Clean Session")]})})]}),e.jsx("h4",{children:s("protocolConfig.topics","Topics")}),e.jsxs("div",{className:"nice-protocol-config__topics",children:[a.topics.map((i,n)=>e.jsxs("div",{className:"nice-protocol-config__topic-row",children:[e.jsx("input",{type:"text",value:i.pattern,onChange:c=>{const o=[...a.topics];o[n]={...o[n],pattern:c.target.value},r({...a,topics:o})},placeholder:s("protocolConfig.topicPatternPlaceholder","e.g., sensors/+/data")}),e.jsxs("select",{value:i.qos,onChange:c=>{const o=[...a.topics];o[n]={...o[n],qos:parseInt(c.target.value,10)},r({...a,topics:o})},children:[e.jsx("option",{value:0,children:s("protocolConfig.qos0","QoS 0")}),e.jsx("option",{value:1,children:s("protocolConfig.qos1","QoS 1")}),e.jsx("option",{value:2,children:s("protocolConfig.qos2","QoS 2")})]}),e.jsxs("select",{value:i.direction,onChange:c=>{const o=[...a.topics];o[n]={...o[n],direction:c.target.value},r({...a,topics:o})},children:[e.jsx("option",{value:"subscribe",children:s("protocolConfig.subscribe","Subscribe")}),e.jsx("option",{value:"publish",children:s("protocolConfig.publish","Publish")}),e.jsx("option",{value:"both",children:s("protocolConfig.both","Both")})]}),e.jsx("button",{onClick:()=>{const c=a.topics.filter((o,d)=>d!==n);r({...a,topics:c})},children:"×"})]},n)),e.jsxs("button",{onClick:()=>{r({...a,topics:[...a.topics,{pattern:"",qos:0,direction:"subscribe",payloadFormat:"json"}]})},children:[e.jsx(p,{name:"plus",size:14})," ",s("protocolConfig.addTopic","Add Topic")]})]})]})}function Ve({config:a,onChange:r}){const{t:s}=T();return e.jsxs("div",{className:"nice-protocol-config__section",children:[e.jsx("h3",{children:s("protocolConfig.coapConfiguration","CoAP Configuration")}),e.jsxs("div",{className:"nice-protocol-config__grid",children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.host","Host")}),e.jsx("input",{type:"text",value:a.host,onChange:i=>r({...a,host:i.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.port","Port")}),e.jsx("input",{type:"number",value:a.port,onChange:i=>r({...a,port:parseInt(i.target.value,10)||5683})})]}),e.jsx("div",{className:"nice-protocol-config__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:a.useDTLS,onChange:i=>r({...a,useDTLS:i.target.checked})}),s("protocolConfig.useDtls","Use DTLS")]})}),e.jsx("div",{className:"nice-protocol-config__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:a.observe||!1,onChange:i=>r({...a,observe:i.target.checked})}),s("protocolConfig.enableObserve","Enable Observe")]})})]}),e.jsx("h4",{children:s("protocolConfig.resources","Resources")}),e.jsxs("div",{className:"nice-protocol-config__resources",children:[a.resources.map((i,n)=>e.jsxs("div",{className:"nice-protocol-config__resource-row",children:[e.jsx("input",{type:"text",value:i.path,onChange:c=>{const o=[...a.resources];o[n]={...o[n],path:c.target.value},r({...a,resources:o})},placeholder:"/sensors/temperature"}),e.jsx("button",{onClick:()=>{const c=a.resources.filter((o,d)=>d!==n);r({...a,resources:c})},children:"×"})]},n)),e.jsxs("button",{onClick:()=>{r({...a,resources:[...a.resources,{path:"",methods:["GET"],mediaType:"application/json",observable:!1}]})},children:[e.jsx(p,{name:"plus",size:14})," ",s("protocolConfig.addResource","Add Resource")]})]})]})}function Ae({config:a,type:r,onChange:s}){const{t:i}=T();return e.jsxs("div",{className:"nice-protocol-config__section",children:[e.jsxs("h3",{children:["Modbus ",r.toUpperCase()," Configuration"]}),e.jsxs("div",{className:"nice-protocol-config__grid",children:[r==="tcp"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.host","Host")}),e.jsx("input",{type:"text",value:a.host||"",onChange:n=>s({...a,host:n.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.port","Port")}),e.jsx("input",{type:"number",value:a.port||502,onChange:n=>s({...a,port:parseInt(n.target.value,10)||502})})]})]}),r==="rtu"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.serialPort","Serial Port")}),e.jsx("input",{type:"text",value:a.serialPort||"",onChange:n=>s({...a,serialPort:n.target.value}),placeholder:i("protocolConfig.serialPortPlaceholder","COM1 or /dev/ttyUSB0")})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.baudRate","Baud Rate")}),e.jsxs("select",{value:a.baudRate||9600,onChange:n=>s({...a,baudRate:parseInt(n.target.value,10)}),children:[e.jsx("option",{value:9600,children:"9600"}),e.jsx("option",{value:19200,children:"19200"}),e.jsx("option",{value:38400,children:"38400"}),e.jsx("option",{value:57600,children:"57600"}),e.jsx("option",{value:115200,children:"115200"})]})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.parity","Parity")}),e.jsxs("select",{value:a.parity||"none",onChange:n=>s({...a,parity:n.target.value}),children:[e.jsx("option",{value:"none",children:i("protocolConfig.none","None")}),e.jsx("option",{value:"even",children:i("protocolConfig.even","Even")}),e.jsx("option",{value:"odd",children:i("protocolConfig.odd","Odd")})]})]})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.slaveId","Slave ID")}),e.jsx("input",{type:"number",value:a.slaveId,onChange:n=>s({...a,slaveId:parseInt(n.target.value,10)||1}),min:1,max:247})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.timeoutMs","Timeout (ms)")}),e.jsx("input",{type:"number",value:a.timeout,onChange:n=>s({...a,timeout:parseInt(n.target.value,10)||1e3})})]})]}),e.jsx("h4",{children:i("protocolConfig.registers","Registers")}),e.jsxs("table",{className:"nice-protocol-config__registers-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:i("protocolConfig.name","Name")}),e.jsx("th",{children:i("protocolConfig.address","Address")}),e.jsx("th",{children:i("protocolConfig.type","Type")}),e.jsx("th",{children:i("protocolConfig.dataType","Data Type")}),e.jsx("th",{children:i("protocolConfig.readWrite","R/W")}),e.jsx("th",{})]})}),e.jsx("tbody",{children:a.registers.map((n,c)=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("input",{type:"text",value:n.name,onChange:o=>{const d=[...a.registers];d[c]={...d[c],name:o.target.value},s({...a,registers:d})}})}),e.jsx("td",{children:e.jsx("input",{type:"number",value:n.address,onChange:o=>{const d=[...a.registers];d[c]={...d[c],address:parseInt(o.target.value,10)||0},s({...a,registers:d})}})}),e.jsx("td",{children:e.jsxs("select",{value:n.type,onChange:o=>{const d=[...a.registers];d[c]={...d[c],type:o.target.value},s({...a,registers:d})},children:[e.jsx("option",{value:"coil",children:i("protocolConfig.coil","Coil")}),e.jsx("option",{value:"discrete",children:i("protocolConfig.discrete","Discrete")}),e.jsx("option",{value:"holding",children:i("protocolConfig.holding","Holding")}),e.jsx("option",{value:"input",children:i("protocolConfig.input","Input")})]})}),e.jsx("td",{children:e.jsxs("select",{value:n.dataType,onChange:o=>{const d=[...a.registers];d[c]={...d[c],dataType:o.target.value},s({...a,registers:d})},children:[e.jsx("option",{value:"bool",children:i("protocolConfig.bool","Bool")}),e.jsx("option",{value:"int16",children:i("protocolConfig.int16","Int16")}),e.jsx("option",{value:"uint16",children:i("protocolConfig.uint16","UInt16")}),e.jsx("option",{value:"int32",children:i("protocolConfig.int32","Int32")}),e.jsx("option",{value:"uint32",children:i("protocolConfig.uint32","UInt32")}),e.jsx("option",{value:"float32",children:i("protocolConfig.float32","Float32")})]})}),e.jsxs("td",{children:[e.jsx("input",{type:"checkbox",checked:n.readable,onChange:o=>{const d=[...a.registers];d[c]={...d[c],readable:o.target.checked},s({...a,registers:d})},title:i("protocolConfig.readable","Readable")}),e.jsx("input",{type:"checkbox",checked:n.writable,onChange:o=>{const d=[...a.registers];d[c]={...d[c],writable:o.target.checked},s({...a,registers:d})},title:i("protocolConfig.writable","Writable")})]}),e.jsx("td",{children:e.jsx("button",{onClick:()=>{const o=a.registers.filter((d,v)=>v!==c);s({...a,registers:o})},children:"×"})})]},c))})]}),e.jsxs("button",{onClick:()=>{s({...a,registers:[...a.registers,{name:"",address:0,type:"holding",dataType:"uint16",readable:!0,writable:!1}]})},children:[e.jsx(p,{name:"plus",size:14})," ",i("protocolConfig.addRegister","Add Register")]})]})}function Pe({config:a,onChange:r}){const{t:s}=T();return e.jsxs("div",{className:"nice-protocol-config__section",children:[e.jsx("h3",{children:s("protocolConfig.opcUaConfiguration","OPC-UA Configuration")}),e.jsxs("div",{className:"nice-protocol-config__grid",children:[e.jsxs("div",{className:"nice-protocol-config__field nice-protocol-config__field--full",children:[e.jsx("label",{children:s("protocolConfig.endpointUrl","Endpoint URL")}),e.jsx("input",{type:"text",value:a.endpointUrl,onChange:i=>r({...a,endpointUrl:i.target.value}),placeholder:s("protocolConfig.endpointUrlPlaceholder","opc.tcp://localhost:4840")})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.securityMode","Security Mode")}),e.jsxs("select",{value:a.securityMode,onChange:i=>r({...a,securityMode:i.target.value}),children:[e.jsx("option",{value:"None",children:s("protocolConfig.securityNone","None")}),e.jsx("option",{value:"Sign",children:s("protocolConfig.sign","Sign")}),e.jsx("option",{value:"SignAndEncrypt",children:s("protocolConfig.signAndEncrypt","Sign and Encrypt")})]})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.authentication","Authentication")}),e.jsxs("select",{value:a.authentication,onChange:i=>r({...a,authentication:i.target.value}),children:[e.jsx("option",{value:"anonymous",children:s("protocolConfig.anonymous","Anonymous")}),e.jsx("option",{value:"username",children:s("protocolConfig.usernamePassword","Username/Password")}),e.jsx("option",{value:"certificate",children:s("protocolConfig.certificate","Certificate")})]})]}),a.authentication==="username"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.username","Username")}),e.jsx("input",{type:"text",value:a.username||"",onChange:i=>r({...a,username:i.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.password","Password")}),e.jsx("input",{type:"password",value:a.password||"",onChange:i=>r({...a,password:i.target.value})})]})]}),e.jsxs("div",{className:"nice-protocol-config__field nice-protocol-config__field--full",children:[e.jsx("label",{children:s("protocolConfig.applicationName","Application Name")}),e.jsx("input",{type:"text",value:a.applicationName,onChange:i=>r({...a,applicationName:i.target.value})})]})]}),e.jsx("h4",{children:s("protocolConfig.nodes","Nodes")}),e.jsxs("div",{className:"nice-protocol-config__nodes",children:[a.nodes.map((i,n)=>e.jsxs("div",{className:"nice-protocol-config__node-row",children:[e.jsx("input",{type:"text",value:i.nodeId,onChange:c=>{const o=[...a.nodes];o[n]={...o[n],nodeId:c.target.value},r({...a,nodes:o})},placeholder:s("protocolConfig.nodeIdPlaceholder","ns=2;s=Temperature")}),e.jsx("input",{type:"text",value:i.displayName,onChange:c=>{const o=[...a.nodes];o[n]={...o[n],displayName:c.target.value},r({...a,nodes:o})},placeholder:s("protocolConfig.displayNamePlaceholder","Display Name")}),e.jsx("button",{onClick:()=>{const c=a.nodes.filter((o,d)=>d!==n);r({...a,nodes:c})},children:"×"})]},n)),e.jsxs("button",{onClick:()=>{r({...a,nodes:[...a.nodes,{nodeId:"",displayName:"",dataType:"Double",read:!0}]})},children:[e.jsx(p,{name:"plus",size:14})," ",s("protocolConfig.addNode","Add Node")]})]})]})}exports.NiceEdgeManager=we;exports.NiceIoTDashboard=be;exports.NiceProtocolConfig=Le;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("react"),B=(a,n)=>n,q=h.createContext(B),W=h.createContext("en");function M(){const a=h.useContext(q),n=h.useContext(W);return{t:a,lang:n}}const G={"chevron-down":"M6 9l6 6 6-6","chevron-up":"M18 15l-6-6-6 6","chevron-left":"M15 18l-6-6 6-6","chevron-right":"M9 6l6 6-6 6","arrow-left":"M19 12H5m0 0l7 7m-7-7l7-7","arrow-right":"M5 12h14m0 0l-7-7m7 7l-7 7","arrow-up":"M12 19V5m0 0l-7 7m7-7l7 7","arrow-down":"M12 5v14m0 0l7-7m-7 7l-7-7",close:"M18 6L6 18M6 6l12 12",plus:"M12 5v14m-7-7h14",minus:"M5 12h14",check:"M5 13l4 4L19 7",edit:"M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7M18.5 2.5a2.121 2.121 0 113 3L12 15l-4 1 1-4 9.5-9.5z",trash:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16",copy:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z",download:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4",upload:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12",refresh:"M4 4v5h5M20 20v-5h-5M20.49 9A9 9 0 005.64 5.64L1 10m22 4l-4.64 4.36A9 9 0 013.51 15",search:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z",filter:"M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z","sort-asc":"M3 4h13M3 8h9m-9 4h6m4 0l4-4m0 0l4 4m-4-4v12","sort-desc":"M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4",sort:"M6 10l6-6 6 6M6 14l6 6 6-6",menu:"M4 6h16M4 12h16M4 18h16","more-vertical":"M12 5v.01M12 12v.01M12 19v.01","more-horizontal":"M5 12h.01M12 12h.01M19 12h.01",settings:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z M15 12a3 3 0 11-6 0 3 3 0 016 0z",eye:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z M15 12a3 3 0 11-6 0 3 3 0 016 0z","eye-off":"M17.94 17.94A10.07 10.07 0 0112 20c-7 0-11-8-11-8a18.45 18.45 0 015.06-5.94M9.9 4.24A9.12 9.12 0 0112 4c7 0 11 8 11 8a18.5 18.5 0 01-2.16 3.19m-6.72-1.07a3 3 0 11-4.24-4.24 M1 1l22 22",lock:"M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2zm-3-4a4 4 0 10-8 0v4h8V7z",info:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",warning:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z",error:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z",success:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",help:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",calendar:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z",clock:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z",file:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z",folder:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z",image:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z",link:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1",mail:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z",phone:"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z",smartphone:"M7 2h10a2 2 0 012 2v16a2 2 0 01-2 2H7a2 2 0 01-2-2V4a2 2 0 012-2z M11 18h2",user:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z",users:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",home:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6",star:"M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z",heart:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z",bell:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9",grip:"M4 6h2m4 0h2m4 0h2M4 12h2m4 0h2m4 0h2M4 18h2m4 0h2m4 0h2",hash:"M4 9h16M4 15h16M10 3L8 21M16 3l-2 18",list:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01",circle:"M12 21a9 9 0 100-18 9 9 0 000 18z",box:"M21 8a2 2 0 00-1-1.73l-7-4a2 2 0 00-2 0l-7 4A2 2 0 003 8v8a2 2 0 001 1.73l7 4a2 2 0 002 0l7-4A2 2 0 0021 16V8z M3.27 6.96L12 12.01l8.73-5.05 M12 22.08V12",tabs:"M3 9h18v10H3z M7 9V5h6v4",columns:"M4 4h7v16H4z M13 4h7v16h-7z",grid:"M3 3h7v7H3z M14 3h7v7h-7z M14 14h7v7h-7z M3 14h7v7H3z",table:"M3 5h18v14H3z M3 10h18M3 15h18M9 5v14M15 5v14",heading:"M6 4v16M18 4v16M6 12h12",type:"M4 7V4h16v3M9 20h6M12 4v16","align-left":"M3 6h18M3 12h12M3 18h15",input:"M4 9h16a1 1 0 011 1v4a1 1 0 01-1 1H4a1 1 0 01-1-1v-4a1 1 0 011-1z M7 12h5",button:"M5 9h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2a2 2 0 012-2z",select:"M4 6h16a1 1 0 011 1v10a1 1 0 01-1 1H4a1 1 0 01-1-1V7a1 1 0 011-1z M15 11l-3 3-3-3","check-square":"M9 11l3 3L22 4 M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11",video:"M23 7l-7 5 7 5V7z M16 5H3a2 2 0 00-2 2v10a2 2 0 002 2h13a2 2 0 002-2V7a2 2 0 00-2-2z",card:"M3 5h18a1 1 0 011 1v12a1 1 0 01-1 1H3a1 1 0 01-1-1V6a1 1 0 011-1z M3 10h18","bar-chart":"M6 20v-6M12 20V4M18 20v-10","line-chart":"M3 3v18h18 M7 15l4-4 3 3 5-6","area-chart":"M3 3v18h18 M7 17v-3l4-4 3 3 5-6v10z","pie-chart":"M21.21 15.89A10 10 0 118 2.83 M22 12A10 10 0 0012 2v10z","donut-chart":"M12 3a9 9 0 100 18 9 9 0 000-18z M12 8a4 4 0 100 8 4 4 0 000-8z","scatter-chart":"M3 3v18h18 M8 16h.01 M11 11h.01 M15 14h.01 M18 8h.01","bars-vertical":"M6 5v14M12 5v14M18 5v14",globe:"M12 3a9 9 0 100 18 9 9 0 000-18z M3 12h18 M12 3a14 14 0 010 18 M12 3a14 14 0 000 18",monitor:"M3 4h18a1 1 0 011 1v11a1 1 0 01-1 1H3a1 1 0 01-1-1V5a1 1 0 011-1z M8 21h8 M12 17v4",camera:"M23 19a2 2 0 01-2 2H3a2 2 0 01-2-2V8a2 2 0 012-2h3l2-3h6l2 3h3a2 2 0 012 2z M12 17a4 4 0 100-8 4 4 0 000 8z",plug:"M9 2v5 M15 2v5 M7 7h10v3a5 5 0 01-10 0V7z M12 15v7",save:"M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z M17 21v-8H7v8 M7 3v5h8",tag:"M20.59 13.41l-7.17 7.17a2 2 0 01-2.83 0L2 12V2h10l8.59 8.59a2 2 0 010 2.82z M7 7h.01",palette:"M12 2a10 10 0 000 20 2 2 0 002-2c0-.5-.2-1-.5-1.3a2 2 0 01-.5-1.2 2 2 0 012-2H17a5 5 0 005-5c0-5-4.5-9-10-9z M6.5 11.5h.01 M9.5 7.5h.01 M14.5 7.5h.01",book:"M4 19.5A2.5 2.5 0 016.5 17H20 M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z",cloud:"M18 10h-1.26A8 8 0 109 20h9a5 5 0 000-10z",target:"M12 3a9 9 0 100 18 9 9 0 000-18z M12 7a5 5 0 100 10 5 5 0 000-10z M12 11a1 1 0 100 2 1 1 0 000-2z",message:"M21 11.5a8.5 8.5 0 01-8.5 8.5 8.4 8.4 0 01-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 01-.9-3.8A8.5 8.5 0 0112.5 3 8.5 8.5 0 0121 11.5z",flask:"M9 2h6 M10 2v6.5L4.5 19a1 1 0 00.9 1.5h13.2a1 1 0 00.9-1.5L14 8.5V2 M7 15h10",rocket:"M12 15l-3-3a22 22 0 012-3.95A12.88 12.88 0 0122 2c0 2.72-.78 7.5-6 11a22 22 0 01-3.95 2z M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0 M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5 M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 00-2.91-.09z",music:"M9 18V5l12-2v13 M9 18a3 3 0 11-6 0 3 3 0 016 0z M21 16a3 3 0 11-6 0 3 3 0 016 0z",wifi:"M5 12.55a11 11 0 0114 0 M8.5 16.11a6 6 0 017 0 M12 20h.01 M2 8.82a15 15 0 0120 0",database:"M12 8c4.97 0 9-1.34 9-3s-4.03-3-9-3-9 1.34-9 3 4.03 3 9 3z M21 5v6c0 1.66-4.03 3-9 3s-9-1.34-9-3V5 M21 11v6c0 1.66-4.03 3-9 3s-9-1.34-9-3v-6",slash:"M12 3a9 9 0 100 18 9 9 0 000-18z M5.6 5.6l12.8 12.8",puzzle:"M19.4 13.6a1.6 1.6 0 10.2-3.2H19V7a2 2 0 00-2-2h-3.4v-.4a1.6 1.6 0 10-3.2 0V5H7a2 2 0 00-2 2v3.4h.4a1.6 1.6 0 100 3.2H5V17a2 2 0 002 2h3.4v.4a1.6 1.6 0 103.2 0V19H17a2 2 0 002-2v-3.4z",dollar:"M12 1v22 M17 5H9.5a3.5 3.5 0 000 7h5a3.5 3.5 0 010 7H6",printer:"M6 9V2h12v7 M6 18H4a2 2 0 01-2-2v-5a2 2 0 012-2h16a2 2 0 012 2v5a2 2 0 01-2 2h-2 M6 14h12v8H6z",scale:"M12 3v18 M5 21h14 M5 7l7-2 7 2 M2 13a3 3 0 006 0L5 7zm14 0a3 3 0 006 0L19 7z",accessibility:"M12 3a9 9 0 100 18 9 9 0 000-18z M12 9a1.5 1.5 0 100-3 1.5 1.5 0 000 3z M7.5 10.5l4.5 1 4.5-1 M12 11.5v3.5l-2 3.5 M12 15l2 3.5",window:"M3 4h18a1 1 0 011 1v14a1 1 0 01-1 1H3a1 1 0 01-1-1V5a1 1 0 011-1z M2 9h20 M6 6.5h.01 M9 6.5h.01","map-pin":"M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z M12 13a3 3 0 100-6 3 3 0 000 6z",cursor:"M5 3l14 7-6 2-2 6-6-15z",shuffle:"M16 3h5v5 M4 20L21 3 M21 16v5h-5 M15 15l6 6 M4 4l5 5",lightbulb:"M9 18h6 M10 22h4 M12 2a7 7 0 00-4 12.7c.6.5 1 1.3 1 2.1V18h6v-1.2c0-.8.4-1.6 1-2.1A7 7 0 0012 2z",server:"M3 4h18a1 1 0 011 1v4a1 1 0 01-1 1H3a1 1 0 01-1-1V5a1 1 0 011-1z M3 14h18a1 1 0 011 1v4a1 1 0 01-1 1H3a1 1 0 01-1-1v-4a1 1 0 011-1z M7 7h.01 M7 17h.01",terminal:"M4 17l6-6-6-6 M12 19h8","git-branch":"M6 3v12 M18 9a3 3 0 100-6 3 3 0 000 6z M6 21a3 3 0 100-6 3 3 0 000 6z M18 9a9 9 0 01-9 9",send:"M22 2L11 13 M22 2l-7 20-4-9-9-4 20-7z",play:"M14.752 11.168l-3.197-2.132A1 1 0 0010 9.87v4.263a1 1 0 001.555.832l3.197-2.132a1 1 0 000-1.664z M21 12a9 9 0 11-18 0 9 9 0 0118 0z",pause:"M10 9v6m4-6v6m7-3a9 9 0 11-18 0 9 9 0 0118 0z",stop:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z",mic:"M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3zM19 10v2a7 7 0 01-14 0v-2M12 19v4M8 23h8",volume:"M11 5L6 9H2v6h4l5 4V5z M15.54 8.46a5 5 0 010 7.07 M19.07 4.93a10 10 0 010 14.14","volume-off":"M11 5L6 9H2v6h4l5 4V5z M23 9l-6 6 M17 9l6 6","skip-back":"M19 20L9 12l10-8v16z M5 19V5",expand:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4",collapse:"M9 9V5m0 4H5m4 0L4 4m11 5h4m-4 0V5m0 4l5-5M9 15v4m0-4H5m4 0l-5 5m15-5h-4m4 0v4m0-4l-5 5","external-link":"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14",briefcase:"M20 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2zM16 7V5a2 2 0 00-2-2h-4a2 2 0 00-2 2v2M2 12h20",building:"M4 22V4a2 2 0 012-2h12a2 2 0 012 2v18M4 22h16M9 22v-4h6v4M9 6h.01M15 6h.01M9 10h.01M15 10h.01M9 14h.01M15 14h.01",medal:"M15.477 12.89L17 22l-5-3-5 3 1.523-9.11M12 15a6 6 0 100-12 6 6 0 000 12z",clipboard:"M9 2h6a1 1 0 011 1v1a1 1 0 01-1 1H9a1 1 0 01-1-1V3a1 1 0 011-1zM16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2","skip-forward":"M5 4l10 8-10 8V4zM19 5v14","at-sign":"M12 16a4 4 0 100-8 4 4 0 000 8zM16 12v1.5a2.5 2.5 0 005 0V12a9 9 0 10-3.5 7.14",gift:"M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z",archive:"M21 8v13H3V8M1 3h22v5H1zM10 12h4",reply:"M9 17l-5-5 5-5M4 12h11a4 4 0 014 4v2",forward:"M15 17l5-5-5-5M20 12H9a4 4 0 00-4 4v2",paperclip:"M21.44 11.05l-9.19 9.19a6 6 0 01-8.49-8.49l9.19-9.19a4 4 0 015.66 5.66l-9.2 9.19a2 2 0 01-2.83-2.83l8.49-8.48",zap:"M13 2L3 14h9l-1 8 10-12h-9l1-8z",square:"M4 4h16v16H4z",triangle:"M12 4L3 20h18z",hexagon:"M7.5 3h9l4.5 9-4.5 9h-9L3 12z",diamond:"M12 2l10 10-10 10L2 12z",line:"M5 19L19 5",pen:"M12 19l7-7 3 3-7 7-3-3z M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z M11 11a2 2 0 100-4 2 2 0 000 4z",brush:"M9.06 11.9l8.07-8.06a2.85 2.85 0 114.03 4.03l-8.06 8.08 M7.07 14.94c-1.66 0-3 1.35-3 3.02 0 1.33-2.5 1.52-2 2.02 1.08 1.1 2.49 2.02 4 2.02 2.2 0 4-1.8 4-4.04a3.01 3.01 0 00-3-3.02z",droplet:"M12 2.69l5.66 5.66a8 8 0 11-11.31 0z",bucket:"M5 8h14l-1.5 11a2 2 0 01-2 1.8H8.5a2 2 0 01-2-1.8L5 8z M5 8l2-4h10l2 4",scissors:"M6 9a3 3 0 100-6 3 3 0 000 6z M6 21a3 3 0 100-6 3 3 0 000 6z M20 4L8.12 15.88 M14.47 14.48L20 20 M8.12 8.12L12 12",layers:"M12 2l9 5-9 5-9-5 9-5z M3 12l9 5 9-5 M3 17l9 5 9-5",crop:"M6 2v14a2 2 0 002 2h14 M2 6h14a2 2 0 012 2v14",eyedropper:"M2 22l1-1h3l9-9 M3 21v-3l9-9 M15 6l3.5-3.5a2.12 2.12 0 013 3L18 9l-3-3z",ruler:"M21.3 8.7l-6-6a1 1 0 00-1.4 0L2.7 13.9a1 1 0 000 1.4l6 6a1 1 0 001.4 0L21.3 10.1a1 1 0 000-1.4z M7.5 10.5l2 2 M11 7l2 2 M14.5 3.5l2 2",wand:"M15 4V2 M15 16v-2 M8 9h2 M20 9h2 M3 21l9-9 M12.2 6.2L11 5 M17.8 6.2L19 5 M17.8 11.8L19 13",move:"M5 9l-3 3 3 3 M9 5l3-3 3 3 M15 19l-3 3-3-3 M19 9l3 3-3 3 M2 12h20 M12 2v20",gamepad:"M6 12h4 M8 10v4 M15 13h.01 M18 11h.01 M2 12a4 4 0 014-4h12a4 4 0 014 4l-1.5 6a2 2 0 01-2 1.5H5.5a2 2 0 01-2-1.5L2 12z",eraser:"M7 21l-4.3-4.3a1 1 0 010-1.4l9.6-9.6a2 2 0 012.8 0l4.6 4.6a2 2 0 010 2.8L13 21H7z M22 21H7 M5 12l5 5",thermometer:"M14 14.76V3.5a2.5 2.5 0 00-5 0v11.26a4.5 4.5 0 105 0z",door:"M18 20V5a1 1 0 00-1-1H7a1 1 0 00-1 1v15 M3 20h18 M13 11.5h.01",stairs:"M3 20h3v-3h3v-3h3v-3h3v-3h3",elevator:"M5 3h14a1 1 0 011 1v16a1 1 0 01-1 1H5a1 1 0 01-1-1V4a1 1 0 011-1z M9.5 9L12 6.5 14.5 9 M9.5 15l2.5 2.5 2.5-2.5",bed:"M2 4v16 M2 8h18a2 2 0 012 2v10 M22 17H2 M6 8v4 M2 12h4",sofa:"M3 9V7a2 2 0 012-2h14a2 2 0 012 2v2 M21 9a2 2 0 00-2 2v3H5v-3a2 2 0 00-2-2 2 2 0 00-2 2v4a1 1 0 001 1h18a1 1 0 001-1v-4a2 2 0 00-2-2 M5 18v2 M19 18v2",chair:"M6 11V5a2 2 0 012-2h8a2 2 0 012 2v6 M5 11h14 M6 11l-1 8h14l-1-8 M6 19v2 M18 19v2",utensils:"M3 2v7a2 2 0 002 2 2 2 0 002-2V2 M5 2v20 M21 2v9c0 1-1 1.8-2 1.8h-1V20 M18 2v9",mountain:"M8 3l4 8 5-5 5 15H2L8 3z",tree:"M12 2L7 11h10L12 2z M9 11l3 5 3-5 M12 16v6",sun:"M12 17a5 5 0 100-10 5 5 0 000 10z M12 1v2 M12 21v2 M4.22 4.22l1.42 1.42 M18.36 18.36l1.42 1.42 M1 12h2 M21 12h2 M4.22 19.78l1.42-1.42 M18.36 5.64l1.42-1.42",moon:"M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z","list-ordered":"M10 6h11M10 12h11M10 18h11M4 6h1v4M4 10h2M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",unlink:"M18.84 12.25l1.72-1.71a5 5 0 0 0-7.07-7.07L11 5.78M3 3l18 18M9 15l3-3M14 11l3 3M14 21l-1.72-1.72a5 5 0 0 1-7.07-7.07L7 10.49",code:"M16 18l6-6-6-6M8 6l-6 6 6 6",quote:"M3 21c3-3 3-9 0-12M21 21c-3-3-3-9 0-12M9 7h6v6H9zM15 7h6v6h-6z",indent:"M3 8l4 4-4 4M7 6h14M7 12h14M3 18h18",outdent:"M7 8l-4 4 4 4M21 6H3M21 12H7M21 18H3","align-center":"M3 6h18M6 12h12M3 18h18","align-right":"M3 6h18M9 12h12M3 18h18","align-justify":"M3 6h18M3 12h18M3 18h18","align-top":"M4 4h16M9 8v12M15 8v7","align-middle":"M4 12h16M9 5v14M15 8v8","align-bottom":"M4 20h16M9 4v12M15 9v7","distribute-h":"M4 4v16M20 4v16M10 7h4v10h-4z","distribute-v":"M4 4h16M4 20h16M7 10h10v4H7z",parallelogram:"M7 5h14l-4 14H3z",barcode:"M4 5v14M6.5 5v14M10 5v14M13 5v14M15.5 5v14M19 5v14M20.5 5v14","qr-code":"M4 4h6v6H4z M14 4h6v6h-6z M4 14h6v6H4z M14 14h2v2h-2z M18 14h2v2h-2z M14 18h2v2h-2z M18 18h2v2h-2z",smile:"M12 22a10 10 0 1 1 0-20 10 10 0 0 1 0 20zM8 14s1.5 2 4 2 4-2 4-2M9 9h.01M15 9h.01",undo:"M9 14L4 9l5-5M4 9h10.5a5.5 5.5 0 010 11H11",redo:"M15 14l5-5-5-5M20 9H9.5a5.5 5.5 0 000 11H13",unlock:"M19 11H5a2 2 0 00-2 2v7a2 2 0 002 2h14a2 2 0 002-2v-7a2 2 0 00-2-2z M7 11V7a5 5 0 019.9-1",keyboard:"M4 6h16a2 2 0 012 2v8a2 2 0 01-2 2H4a2 2 0 01-2-2V8a2 2 0 012-2z M6 10h.01 M10 10h.01 M14 10h.01 M18 10h.01 M8 14h8","page-break":"M6 3v5h12V3 M6 21v-5h12v5 M2 12h3 M8 12h3 M13 12h3 M19 12h3",shield:"M12 2l8 3v6c0 5-3.4 9.4-8 11-4.6-1.6-8-6-8-11V5z",repeat:"M17 2l4 4-4 4 M3 11V9a4 4 0 014-4h14 M7 22l-4-4 4-4 M21 13v2a4 4 0 01-4 4H3",pin:"M12 17v5 M5 17h14l-1.5-3V8a2 2 0 00-2-2h-7a2 2 0 00-2 2v6z","mic-off":"M1 1l22 22 M9 9v3a3 3 0 005.12 2.12 M15 9.34V4a3 3 0 00-5.94-.6 M17 16.95A7 7 0 015 12v-2 M19 10v2a7 7 0 01-.11 1.23 M12 19v4 M8 23h8","log-out":"M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4 M16 17l5-5-5-5 M21 12H9","chevrons-left":"M11 17l-5-5 5-5 M18 17l-5-5 5-5","chevrons-right":"M13 17l5-5-5-5 M6 17l5-5-5-5","zoom-in":"M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M11 8v6 M8 11h6","zoom-out":"M11 4a7 7 0 100 14 7 7 0 000-14z M21 21l-4.35-4.35 M8 11h6",navigation:"M12 2l7 19-7-4-7 4z","refresh-ccw":"M1 4v6h6 M23 20v-6h-6 M20.49 9A9 9 0 005.64 5.64L1 10 M3.51 15a9 9 0 0014.85 3.36L23 14",minimize:"M4 14h6v6 M20 10h-6V4 M14 10l7-7 M3 21l7-7",point:"M12 8a4 4 0 1 0 0 8a4 4 0 1 0 0-8z M12 12h.01",segment:"M6.5 17.5L17.5 6.5 M3 19a2 2 0 1 0 4 0a2 2 0 1 0-4 0 M17 5a2 2 0 1 0 4 0a2 2 0 1 0-4 0",perpendicular:"M3 20h18 M12 20V4 M12 15h5v5",parallel:"M4 16L14 6 M10 20L20 10",midpoint:"M3 12h6 M15 12h6 M3 9v6 M21 9v6 M12 9a3 3 0 1 0 0 6a3 3 0 1 0 0-6z","angle-bisector":"M4 20h17 M4 20L16 5 M4 20l14.4-6.9 M10 20a6 6 0 0 0-2.25-4.68",group:"M3 7V3h4 M17 3h4v4 M21 17v4h-4 M7 21H3v-4 M7 7h5v5H7z M12 12h5v5h-5z",ungroup:"M3 3h8v8H3z M13 13h8v8h-8z"},Q={xs:12,sm:16,md:20,lg:24,xl:32},K=h.createContext({});function Y({path:a,size:n,className:i,style:s,color:l,title:r,onClick:t}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:n,height:n,viewBox:"0 0 24 24",fill:"none",stroke:l||"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:`nice-icon ${i||""}`,style:s,role:r?"img":"presentation","aria-label":r,"aria-hidden":!r,onClick:t,children:[r&&e.jsx("title",{children:r}),e.jsx("path",{d:a})]})}const p=({name:a,size:n="md",className:i,style:s,color:l,title:r,onClick:t})=>{const{resolver:o}=h.useContext(K),d=typeof n=="number"?n:Q[n];if(o){const v=o(a,d);if(v)return e.jsx("span",{className:`nice-icon-wrap ${i||""}`,style:s,onClick:t,children:v})}const m=G[a];return m?e.jsx(Y,{path:m,size:d,className:i,style:s,color:l,title:r,onClick:t}):null};process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;function J(){const a=globalThis.crypto;if(typeof(a==null?void 0:a.randomUUID)=="function")return a.randomUUID();const n=new Uint8Array(16);if(typeof(a==null?void 0:a.getRandomValues)=="function")a.getRandomValues(n);else for(let s=0;s<n.length;s++)n[s]=Math.floor(Math.random()*256);n[6]=n[6]&15|64,n[8]=n[8]&63|128;const i=Array.from(n,s=>s.toString(16).padStart(2,"0")).join("");return`${i.slice(0,8)}-${i.slice(8,12)}-${i.slice(12,16)}-${i.slice(16,20)}-${i.slice(20)}`}process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;process.env.NODE_ENV;const P={display:"inline-block",width:10,height:10,borderRadius:"50%",background:"currentColor"},S=[{type:"device-list",label:"Device List",icon:"list"},{type:"device-status",label:"Device Status",icon:"success"},{type:"telemetry-chart",label:"Telemetry Chart",icon:"bar-chart"},{type:"gauge",label:"Gauge",icon:"clock"},{type:"map",label:"Device Map",icon:"map-pin"},{type:"alarms",label:"Alarms",icon:"bell"},{type:"control-panel",label:"Control Panel",icon:"settings"},{type:"topology",label:"Network Topology",icon:"link"},{type:"kpi",label:"KPI Card",icon:"target"},{type:"camera-feed",label:"Camera Feed",icon:"video"}];function X({devices:a=[],widgets:n=[],alarms:i=[],onDeviceSelect:s,onWidgetChange:l,onCommand:r,onAlarmAcknowledge:t,fetchTelemetry:o,className:d=""}){const{t:m}=M(),[v,w]=h.useState(n),[j,f]=h.useState(null),[g,y]=h.useState("dashboard"),[x,C]=h.useState(!1),[_,T]=h.useState(""),u=h.useCallback(c=>{w(b=>{const N=c(b);return l==null||l(N),N})},[l]),z=h.useCallback(c=>{var N;const b={id:J(),type:c,title:((N=S.find(H=>H.type===c))==null?void 0:N.label)||c,position:{x:0,y:Z(v),width:4,height:3},config:{}};u(H=>[...H,b])},[v,u]),V=h.useCallback(c=>{f(c),s==null||s(c)},[s]),k=h.useCallback(c=>{t==null||t(c)},[t]),F=a.filter(c=>!_||c.name.toLowerCase().includes(_.toLowerCase())||c.type.toLowerCase().includes(_.toLowerCase())),D=i.filter(c=>!c.cleared),A=D.filter(c=>c.severity==="critical"||c.severity==="high");return e.jsxs("div",{className:`nice-iot-dashboard ${d}`,children:[e.jsxs("header",{className:"nice-iot-dashboard__header",children:[e.jsx("h1",{children:m("ioTDashboard.iotDashboard","IoT Dashboard")}),e.jsxs("div",{className:"nice-iot-dashboard__stats",children:[e.jsxs("span",{className:"nice-iot-dashboard__stat",children:[e.jsx("span",{className:"nice-iot-dashboard__stat-icon",children:e.jsx(p,{name:"wifi",size:14})}),m("ioTDashboard.devices","{devices} Devices").replace("{devices}",String(a.length))]}),e.jsxs("span",{className:"nice-iot-dashboard__stat nice-iot-dashboard__stat--online",children:[e.jsx("span",{className:"nice-iot-dashboard__stat-icon",style:P}),m("ioTDashboard.online","{online} Online").replace("{online}",String(a.filter(c=>c.status==="online").length))]}),e.jsxs("span",{className:"nice-iot-dashboard__stat nice-iot-dashboard__stat--offline",children:[e.jsx("span",{className:"nice-iot-dashboard__stat-icon",style:P}),m("ioTDashboard.offline","{offline} Offline").replace("{offline}",String(a.filter(c=>c.status==="offline").length))]}),A.length>0&&e.jsxs("span",{className:"nice-iot-dashboard__stat nice-iot-dashboard__stat--alarms",children:[e.jsx("span",{className:"nice-iot-dashboard__stat-icon",children:e.jsx(p,{name:"bell",size:14})}),m("ioTDashboard.alarms","{criticalAlarms} Alarms").replace("{criticalAlarms}",String(A.length))]})]}),e.jsxs("nav",{className:"nice-iot-dashboard__nav",children:[e.jsx("button",{className:`nice-iot-dashboard__nav-button ${g==="dashboard"?"nice-iot-dashboard__nav-button--active":""}`,onClick:()=>y("dashboard"),children:m("ioTDashboard.dashboard","Dashboard")}),e.jsx("button",{className:`nice-iot-dashboard__nav-button ${g==="devices"?"nice-iot-dashboard__nav-button--active":""}`,onClick:()=>y("devices"),children:m("ioTDashboard.devices2","Devices")}),e.jsxs("button",{className:`nice-iot-dashboard__nav-button ${g==="alarms"?"nice-iot-dashboard__nav-button--active":""}`,onClick:()=>y("alarms"),children:[m("ioTDashboard.alarms2","Alarms")," ",D.length>0&&`(${D.length})`]})]}),e.jsx("div",{className:"nice-iot-dashboard__actions",children:g==="dashboard"&&e.jsxs("button",{onClick:()=>C(!x),children:[e.jsx(p,{name:x?"check":"edit",size:14})," ",x?m("ioTDashboard.done","Done"):m("ioTDashboard.edit","Edit")]})})]}),g==="dashboard"&&e.jsxs("div",{className:"nice-iot-dashboard__main",children:[x&&e.jsxs("aside",{className:"nice-iot-dashboard__palette",children:[e.jsx("h4",{children:m("ioTDashboard.addWidget","Add Widget")}),S.map(c=>e.jsxs("button",{className:"nice-iot-dashboard__palette-item",onClick:()=>z(c.type),children:[e.jsx(p,{name:c.icon,size:16}),e.jsx("span",{children:c.label})]},c.type))]}),e.jsxs("div",{className:"nice-iot-dashboard__grid",children:[v.map(c=>e.jsx(ee,{widget:c,devices:a,alarms:i,isEditing:x,onCommand:r,onDelete:()=>u(b=>b.filter(N=>N.id!==c.id))},c.id)),v.length===0&&e.jsx("div",{className:"nice-iot-dashboard__empty",children:x?m("ioTDashboard.addWidgetsFromThePalette","Add widgets from the palette"):m("ioTDashboard.noWidgetsConfiguredClickEdit","No widgets configured. Click Edit to add widgets.")})]})]}),g==="devices"&&e.jsxs("div",{className:"nice-iot-dashboard__devices",children:[e.jsx("div",{className:"nice-iot-dashboard__devices-toolbar",children:e.jsx("input",{type:"search",placeholder:m("ioTDashboard.searchDevices","Search devices..."),value:_,onChange:c=>T(c.target.value)})}),e.jsx("div",{className:"nice-iot-dashboard__device-grid",children:F.map(c=>e.jsx(se,{device:c,isSelected:(j==null?void 0:j.id)===c.id,onSelect:()=>V(c)},c.id))}),j&&e.jsx(ie,{device:j,onCommand:r,onClose:()=>f(null)})]}),g==="alarms"&&e.jsx("div",{className:"nice-iot-dashboard__alarms",children:e.jsxs("table",{className:"nice-iot-dashboard__alarm-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:m("ioTDashboard.severity","Severity")}),e.jsx("th",{children:m("ioTDashboard.device","Device")}),e.jsx("th",{children:m("ioTDashboard.message","Message")}),e.jsx("th",{children:m("ioTDashboard.time","Time")}),e.jsx("th",{children:m("ioTDashboard.status","Status")}),e.jsx("th",{children:m("ioTDashboard.actions","Actions")})]})}),e.jsx("tbody",{children:D.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:6,className:"nice-iot-dashboard__no-alarms",children:m("ioTDashboard.noActiveAlarms","No active alarms")})}):D.map(c=>{const b=a.find(N=>N.id===c.deviceId);return e.jsxs("tr",{className:`nice-iot-dashboard__alarm-row nice-iot-dashboard__alarm-row--${c.severity}`,children:[e.jsx("td",{children:e.jsx("span",{className:`nice-iot-dashboard__severity nice-iot-dashboard__severity--${c.severity}`,children:c.severity})}),e.jsx("td",{children:(b==null?void 0:b.name)||c.deviceId}),e.jsx("td",{children:c.message}),e.jsx("td",{children:c.timestamp.toLocaleString()}),e.jsx("td",{children:c.acknowledged?m("ioTDashboard.acknowledged","Acknowledged"):m("ioTDashboard.active","Active")}),e.jsx("td",{children:!c.acknowledged&&e.jsx("button",{onClick:()=>k(c.id),children:m("ioTDashboard.acknowledge","Acknowledge")})})]},c.id)})})]})})]})}function Z(a){return a.length===0?0:Math.max(...a.map(n=>n.position.y+n.position.height))}function L(a){switch(a){case"online":return"var(--nice-success, #28a745)";case"offline":return"var(--nice-text-secondary, #6c757d)";case"warning":return"var(--nice-warning, #ffc107)";case"error":return"var(--nice-danger, #dc3545)";case"maintenance":return"var(--nice-info, #17a2b8)";default:return"var(--nice-text-secondary, #6c757d)"}}function ee({widget:a,devices:n,alarms:i,isEditing:s,onCommand:l,onDelete:r}){const{t}=M(),o=S.find(d=>d.type===a.type);return e.jsxs("div",{className:`nice-iot-dashboard__widget nice-iot-dashboard__widget--${a.type}`,style:{gridColumn:`span ${a.position.width}`,gridRow:`span ${a.position.height}`},children:[e.jsxs("div",{className:"nice-iot-dashboard__widget-header",children:[e.jsx("span",{className:"nice-iot-dashboard__widget-icon",children:e.jsx(p,{name:(o==null?void 0:o.icon)??"box",size:14})}),e.jsx("span",{className:"nice-iot-dashboard__widget-title",children:a.title}),s&&e.jsx("button",{"aria-label":t("ioTDashboard.close","Close"),className:"nice-iot-dashboard__widget-delete",onClick:r,children:e.jsx(p,{name:"close",size:14})})]}),e.jsx("div",{className:"nice-iot-dashboard__widget-content",children:e.jsx(ae,{widget:a,devices:n,alarms:i,onCommand:l})})]})}function ae({widget:a,devices:n,alarms:i,onCommand:s}){const{t:l}=M();switch(a.type){case"device-list":return e.jsx("div",{className:"nice-iot-dashboard__device-list",children:n.slice(0,10).map(r=>e.jsxs("div",{className:"nice-iot-dashboard__device-list-item",children:[e.jsx("span",{className:"nice-iot-dashboard__device-status",style:{background:L(r.status)}}),e.jsx("span",{children:r.name}),e.jsx("span",{className:"nice-iot-dashboard__device-type",children:r.type})]},r.id))});case"device-status":return e.jsx("div",{className:"nice-iot-dashboard__status-grid",children:["online","offline","warning","error"].map(r=>{const t=n.filter(o=>o.status===r).length;return e.jsxs("div",{className:"nice-iot-dashboard__status-card",children:[e.jsx("span",{className:"nice-iot-dashboard__status-indicator",style:{background:L(r)}}),e.jsx("span",{className:"nice-iot-dashboard__status-count",children:t}),e.jsx("span",{className:"nice-iot-dashboard__status-label",children:r})]},r)})});case"telemetry-chart":return e.jsxs("div",{className:"nice-iot-dashboard__chart-placeholder",children:[e.jsx(p,{name:"bar-chart",size:32}),e.jsx("span",{children:l("ioTDashboard.telemetryChart","Telemetry Chart")}),e.jsx("small",{children:l("ioTDashboard.configureDeviceAndCapability","Configure device and capability")})]});case"gauge":return e.jsx("div",{className:"nice-iot-dashboard__gauge",children:e.jsxs("svg",{viewBox:"0 0 100 60",children:[e.jsx("path",{d:"M 10 55 A 40 40 0 0 1 90 55",fill:"none",stroke:"var(--nice-border, #e0e0e0)",strokeWidth:"8"}),e.jsx("path",{d:"M 10 55 A 40 40 0 0 1 90 55",fill:"none",stroke:"var(--nice-primary, #0066cc)",strokeWidth:"8",strokeDasharray:"63 126"}),e.jsx("text",{x:"50",y:"50",textAnchor:"middle",fontSize:"14",fontWeight:"bold",children:"50%"})]})});case"map":return e.jsxs("div",{className:"nice-iot-dashboard__map-placeholder",children:[e.jsx(p,{name:"map-pin",size:32}),e.jsx("span",{children:l("ioTDashboard.deviceMap","Device Map")}),e.jsx("small",{children:l("ioTDashboard.devicesWithLocation","{devices} devices with location").replace("{devices}",String(n.filter(r=>r.location).length))})]});case"alarms":{const r=i.filter(t=>!t.cleared).slice(0,5);return e.jsx("div",{className:"nice-iot-dashboard__alarm-list",children:r.length===0?e.jsx("div",{className:"nice-iot-dashboard__alarm-empty",children:l("ioTDashboard.noActiveAlarms","No active alarms")}):r.map(t=>e.jsxs("div",{className:`nice-iot-dashboard__alarm-item nice-iot-dashboard__alarm-item--${t.severity}`,children:[e.jsx("span",{className:"nice-iot-dashboard__alarm-severity",children:t.severity}),e.jsx("span",{className:"nice-iot-dashboard__alarm-message",children:t.message})]},t.id))})}case"control-panel":return e.jsxs("div",{className:"nice-iot-dashboard__control-placeholder",children:[e.jsx(p,{name:"settings",size:32}),e.jsx("span",{children:l("ioTDashboard.controlPanel","Control Panel")}),e.jsx("small",{children:l("ioTDashboard.configureDeviceControls","Configure device controls")})]});case"kpi":return e.jsxs("div",{className:"nice-iot-dashboard__kpi",children:[e.jsx("div",{className:"nice-iot-dashboard__kpi-value",children:n.length}),e.jsx("div",{className:"nice-iot-dashboard__kpi-label",children:l("ioTDashboard.totalDevices","Total Devices")})]});default:return e.jsx("div",{className:"nice-iot-dashboard__widget-placeholder",children:a.type})}}function se({device:a,isSelected:n,onSelect:i}){const{t:s}=M();return e.jsxs("div",{className:`nice-iot-dashboard__device-card ${n?"nice-iot-dashboard__device-card--selected":""}`,onClick:i,children:[e.jsxs("div",{className:"nice-iot-dashboard__device-card-header",children:[e.jsx("span",{className:"nice-iot-dashboard__device-status",style:{background:L(a.status)}}),e.jsx("span",{className:"nice-iot-dashboard__device-name",children:a.name})]}),e.jsxs("div",{className:"nice-iot-dashboard__device-card-body",children:[e.jsxs("div",{className:"nice-iot-dashboard__device-info",children:[e.jsx("span",{children:s("ioTDashboard.type","Type: {type}").replace("{type}",String(a.type))}),e.jsx("span",{children:s("ioTDashboard.protocol","Protocol: {protocol}").replace("{protocol}",String(a.protocol))})]}),a.lastSeen&&e.jsx("div",{className:"nice-iot-dashboard__device-lastseen",children:s("ioTDashboard.lastSeen","Last seen: {lastSeen}").replace("{lastSeen}",String(a.lastSeen.toLocaleString()))}),e.jsxs("div",{className:"nice-iot-dashboard__device-capabilities",children:[a.capabilities.slice(0,3).map(l=>e.jsx("span",{className:"nice-iot-dashboard__capability-badge",children:l.name},l.id)),a.capabilities.length>3&&e.jsxs("span",{className:"nice-iot-dashboard__capability-more",children:["+",a.capabilities.length-3]})]})]})]})}function ie({device:a,onCommand:n,onClose:i}){const{t:s}=M();return e.jsxs("aside",{className:"nice-iot-dashboard__device-detail",children:[e.jsxs("div",{className:"nice-iot-dashboard__device-detail-header",children:[e.jsx("h3",{children:a.name}),e.jsx("button",{"aria-label":s("ioTDashboard.close","Close"),onClick:i,children:e.jsx(p,{name:"close",size:14})})]}),e.jsxs("div",{className:"nice-iot-dashboard__device-detail-content",children:[e.jsxs("section",{children:[e.jsx("h4",{children:s("ioTDashboard.status","Status")}),e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:s("ioTDashboard.status2","Status:")}),e.jsx("span",{className:"nice-iot-dashboard__status-badge",style:{background:L(a.status)},children:a.status})]}),a.lastSeen&&e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:s("ioTDashboard.lastSeen2","Last Seen:")}),e.jsx("span",{children:a.lastSeen.toLocaleString()})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:s("ioTDashboard.connection","Connection")}),e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:s("ioTDashboard.protocol2","Protocol:")}),e.jsx("span",{children:a.protocol})]}),a.connectionInfo.host&&e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:s("ioTDashboard.host","Host:")}),e.jsxs("span",{children:[a.connectionInfo.host,":",a.connectionInfo.port]})]})]}),a.metadata&&e.jsxs("section",{children:[e.jsx("h4",{children:s("ioTDashboard.metadata","Metadata")}),a.metadata.manufacturer&&e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:s("ioTDashboard.manufacturer","Manufacturer:")}),e.jsx("span",{children:a.metadata.manufacturer})]}),a.metadata.model&&e.jsxs("div",{className:"nice-iot-dashboard__detail-row",children:[e.jsx("span",{children:s("ioTDashboard.model","Model:")}),e.jsx("span",{children:a.metadata.model})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:s("ioTDashboard.capabilities","Capabilities")}),e.jsx("div",{className:"nice-iot-dashboard__capabilities-list",children:a.capabilities.map(l=>e.jsxs("div",{className:"nice-iot-dashboard__capability-item",children:[e.jsx("span",{className:"nice-iot-dashboard__capability-name",children:l.name}),e.jsx("span",{className:"nice-iot-dashboard__capability-type",children:l.type}),l.writable&&n&&e.jsx("button",{className:"nice-iot-dashboard__capability-control",onClick:()=>n(a.id,l.id,!0),children:s("ioTDashboard.control","Control")})]},l.id))})]})]})]})}const ne=[{name:"MQTT Broker",image:"eclipse-mosquitto:latest"},{name:"Node-RED",image:"nodered/node-red:latest"},{name:"InfluxDB",image:"influxdb:latest"},{name:"Grafana",image:"grafana/grafana:latest"},{name:"Telegraf",image:"telegraf:latest"},{name:"Protocol Adapter",image:"nice2dev/protocol-adapter:latest"}];function re({nodes:a=[],modules:n=[],onNodeSelect:i,onModuleDeploy:s,onModuleAction:l,onNodeSync:r,className:t=""}){const{t:o}=M(),[d,m]=h.useState(null),[v,w]=h.useState("nodes"),[j,f]=h.useState(!1),[g,y]=h.useState({name:"",image:"",status:"pending"}),x=h.useCallback(u=>{m(u),i==null||i(u)},[i]),C=h.useCallback(async()=>{!d||!g.name||!g.image||(await(s==null?void 0:s(d.id,g)),f(!1),y({name:"",image:"",status:"pending"}))},[d,g,s]),_=h.useCallback(async(u,z)=>{d&&await(l==null?void 0:l(d.id,u,z))},[d,l]),T=h.useCallback(async()=>{d&&await(r==null?void 0:r(d.id))},[d,r]);return e.jsxs("div",{className:`nice-edge-manager ${t}`,children:[e.jsxs("header",{className:"nice-edge-manager__header",children:[e.jsx("h1",{children:o("edgeManager.edgeManager","Edge Manager")}),e.jsxs("nav",{className:"nice-edge-manager__nav",children:[e.jsx("button",{className:`nice-edge-manager__nav-button ${v==="nodes"?"nice-edge-manager__nav-button--active":""}`,onClick:()=>w("nodes"),children:o("edgeManager.nodes","Nodes ({nodes})").replace("{nodes}",String(a.length))}),e.jsx("button",{className:`nice-edge-manager__nav-button ${v==="modules"?"nice-edge-manager__nav-button--active":""}`,onClick:()=>w("modules"),children:o("edgeManager.modules","Modules")})]})]}),e.jsxs("div",{className:"nice-edge-manager__main",children:[v==="nodes"&&e.jsx("div",{className:"nice-edge-manager__nodes",children:e.jsxs("div",{className:"nice-edge-manager__node-grid",children:[a.map(u=>e.jsx(le,{node:u,isSelected:(d==null?void 0:d.id)===u.id,onSelect:()=>x(u)},u.id)),a.length===0&&e.jsx("div",{className:"nice-edge-manager__empty",children:o("edgeManager.noEdgeNodesConfigured","No edge nodes configured")})]})}),v==="modules"&&d&&e.jsxs("div",{className:"nice-edge-manager__modules",children:[e.jsxs("div",{className:"nice-edge-manager__modules-header",children:[e.jsx("h3",{children:o("edgeManager.modulesOn","Modules on {name}").replace("{name}",String(d.name))}),e.jsx("button",{className:"nice-edge-manager__deploy-btn",onClick:()=>f(!0),children:o("edgeManager.deployModule2","+ Deploy Module")})]}),e.jsxs("div",{className:"nice-edge-manager__module-grid",children:[d.deployedModules.map(u=>e.jsx(oe,{module:u,onAction:z=>_(u.id,z)},u.id)),d.deployedModules.length===0&&e.jsx("div",{className:"nice-edge-manager__empty",children:o("edgeManager.noModulesDeployedOnThis","No modules deployed on this node")})]})]}),v==="modules"&&!d&&e.jsx("div",{className:"nice-edge-manager__no-selection",children:o("edgeManager.selectANodeFromThe","Select a node from the Nodes tab to manage modules")}),d&&e.jsx(ce,{node:d,onSync:T,onClose:()=>m(null)})]}),j&&e.jsx(de,{config:g,templates:ne,onChange:y,onDeploy:C,onClose:()=>f(!1)})]})}function R(a){switch(a){case"running":return"var(--nice-success, #28a745)";case"stopped":return"var(--nice-text-secondary, #6c757d)";case"updating":return"var(--nice-warning, #ffc107)";case"error":return"var(--nice-danger, #dc3545)";case"unreachable":return"var(--nice-text-secondary, #868e96)";default:return"var(--nice-text-secondary, #6c757d)"}}function E(a){return a<1024?`${a} B`:a<1024*1024?`${(a/1024).toFixed(1)} KB`:a<1024*1024*1024?`${(a/1024/1024).toFixed(1)} MB`:`${(a/1024/1024/1024).toFixed(2)} GB`}function te(a){const n=Math.floor(a/86400),i=Math.floor(a%86400/3600),s=Math.floor(a%3600/60);return n>0?`${n}d ${i}h`:i>0?`${i}h ${s}m`:`${s}m`}function le({node:a,isSelected:n,onSelect:i}){const{t:s}=M();return e.jsxs("div",{className:`nice-edge-manager__node-card ${n?"nice-edge-manager__node-card--selected":""}`,onClick:i,children:[e.jsxs("div",{className:"nice-edge-manager__node-header",children:[e.jsx("span",{className:"nice-edge-manager__node-status",style:{background:R(a.status)}}),e.jsx("span",{className:"nice-edge-manager__node-name",children:a.name}),e.jsx("span",{className:"nice-edge-manager__node-type",children:a.type})]}),e.jsxs("div",{className:"nice-edge-manager__node-body",children:[e.jsxs("div",{className:"nice-edge-manager__node-info",children:[e.jsxs("span",{children:[e.jsx(p,{name:"server",size:12})," ",a.hardware.cpu]}),e.jsxs("span",{children:[e.jsx(p,{name:"database",size:12})," ",(a.hardware.memoryMB/1024).toFixed(1)," GB"]})]}),e.jsx("div",{className:"nice-edge-manager__node-metrics",children:a.metrics&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-edge-manager__metric",children:[e.jsx("span",{className:"nice-edge-manager__metric-label",children:"CPU"}),e.jsx("div",{className:"nice-edge-manager__metric-bar",children:e.jsx("div",{className:"nice-edge-manager__metric-fill",style:{width:`${a.metrics.cpuUsage}%`}})}),e.jsxs("span",{className:"nice-edge-manager__metric-value",children:[a.metrics.cpuUsage.toFixed(0),"%"]})]}),e.jsxs("div",{className:"nice-edge-manager__metric",children:[e.jsx("span",{className:"nice-edge-manager__metric-label",children:s("edgeManager.mem","MEM")}),e.jsx("div",{className:"nice-edge-manager__metric-bar",children:e.jsx("div",{className:"nice-edge-manager__metric-fill",style:{width:`${a.metrics.memoryUsage}%`}})}),e.jsxs("span",{className:"nice-edge-manager__metric-value",children:[a.metrics.memoryUsage.toFixed(0),"%"]})]})]})}),e.jsx("div",{className:"nice-edge-manager__node-modules",children:s("edgeManager.modulesDeployed","{deployedModules} modules deployed").replace("{deployedModules}",String(a.deployedModules.length))})]})]})}function oe({module:a,onAction:n}){const{t:i}=M(),s={running:"var(--nice-success, #28a745)",stopped:"var(--nice-text-secondary, #6c757d)",error:"var(--nice-danger, #dc3545)",pending:"var(--nice-warning, #ffc107)"};return e.jsxs("div",{className:"nice-edge-manager__module-card",children:[e.jsxs("div",{className:"nice-edge-manager__module-header",children:[e.jsx("span",{className:"nice-edge-manager__module-status",style:{background:s[a.status]||"var(--nice-bg-tertiary, #6c757d)"}}),e.jsx("span",{className:"nice-edge-manager__module-name",children:a.name}),e.jsxs("span",{className:"nice-edge-manager__module-version",children:["v",a.version]})]}),e.jsxs("div",{className:"nice-edge-manager__module-body",children:[e.jsx("div",{className:"nice-edge-manager__module-image",children:a.image}),a.resources&&e.jsxs("div",{className:"nice-edge-manager__module-resources",children:[a.resources.cpuLimit&&e.jsx("span",{children:i("edgeManager.cpu","CPU: {cpuLimit}").replace("{cpuLimit}",String(a.resources.cpuLimit))}),a.resources.memoryLimitMB&&e.jsx("span",{children:i("edgeManager.ramMb","RAM: {memoryLimitMB} MB").replace("{memoryLimitMB}",String(a.resources.memoryLimitMB))})]}),a.ports&&a.ports.length>0&&e.jsx("div",{className:"nice-edge-manager__module-ports",children:i("edgeManager.ports","Ports: {ports}").replace("{ports}",String(a.ports.map(l=>`${l.host}:${l.container}`).join(", ")))})]}),e.jsxs("div",{className:"nice-edge-manager__module-actions",children:[a.status==="running"&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>n("stop"),children:i("edgeManager.stop","Stop")}),e.jsx("button",{onClick:()=>n("restart"),children:i("edgeManager.restart","Restart")})]}),a.status==="stopped"&&e.jsx("button",{onClick:()=>n("start"),children:i("edgeManager.start","Start")}),e.jsx("button",{className:"nice-edge-manager__module-remove",onClick:()=>n("remove"),children:i("edgeManager.remove","Remove")})]})]})}function ce({node:a,onSync:n,onClose:i}){const{t:s}=M();return e.jsxs("aside",{className:"nice-edge-manager__detail",children:[e.jsxs("div",{className:"nice-edge-manager__detail-header",children:[e.jsx("h3",{children:a.name}),e.jsxs("div",{className:"nice-edge-manager__detail-actions",children:[e.jsxs("button",{onClick:n,children:[e.jsx(p,{name:"refresh",size:14})," ",s("edgeManager.sync","Sync")]}),e.jsx("button",{onClick:i,"aria-label":s("edgeManager.close","Close"),children:e.jsx(p,{name:"close",size:14})})]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-content",children:[e.jsxs("section",{children:[e.jsx("h4",{children:s("edgeManager.status","Status")}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.status2","Status:")}),e.jsx("span",{className:"nice-edge-manager__status-badge",style:{background:R(a.status)},children:a.status})]}),a.metrics&&e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.uptime","Uptime:")}),e.jsx("span",{children:te(a.metrics.uptime)})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:s("edgeManager.hardware","Hardware")}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.cpu2","CPU:")}),e.jsx("span",{children:s("edgeManager.cores","{cpu} ({cores} cores)").replace("{cpu}",String(a.hardware.cpu)).replace("{cores}",String(a.hardware.cores))})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.memory2","Memory:")}),e.jsxs("span",{children:[(a.hardware.memoryMB/1024).toFixed(1)," GB"]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.storage","Storage:")}),e.jsxs("span",{children:[(a.hardware.storageMB/1024).toFixed(1)," GB"]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.architecture","Architecture:")}),e.jsx("span",{children:a.hardware.architecture})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:s("edgeManager.software","Software")}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.os","OS:")}),e.jsxs("span",{children:[a.software.os," ",a.software.osVersion]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.runtime","Runtime:")}),e.jsxs("span",{children:[a.software.runtime," ",a.software.runtimeVersion]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.agent","Agent:")}),e.jsxs("span",{children:[a.software.agent," v",a.software.agentVersion]})]})]}),e.jsxs("section",{children:[e.jsx("h4",{children:s("edgeManager.connectivity","Connectivity")}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.cloud","Cloud:")}),e.jsxs("span",{children:[e.jsx(p,{name:a.connectivity.cloudConnected?"check":"close",size:12})," ",a.connectivity.cloudConnected?s("edgeManager.connected","Connected"):s("edgeManager.disconnected","Disconnected")]})]}),e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.network","Network:")}),e.jsx("span",{children:a.connectivity.localNetwork})]}),a.connectivity.publicIP&&e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.publicIp","Public IP:")}),e.jsx("span",{children:a.connectivity.publicIP})]}),a.connectivity.lastSync&&e.jsxs("div",{className:"nice-edge-manager__detail-row",children:[e.jsx("span",{children:s("edgeManager.lastSync","Last Sync:")}),e.jsx("span",{children:a.connectivity.lastSync.toLocaleString()})]})]}),a.metrics&&e.jsxs("section",{children:[e.jsx("h4",{children:s("edgeManager.resourceUsage","Resource Usage")}),e.jsxs("div",{className:"nice-edge-manager__resource-chart",children:[e.jsxs("div",{className:"nice-edge-manager__resource-item",children:[e.jsx("span",{children:"CPU"}),e.jsx("div",{className:"nice-edge-manager__resource-bar",children:e.jsx("div",{className:"nice-edge-manager__resource-fill",style:{width:`${a.metrics.cpuUsage}%`}})}),e.jsxs("span",{children:[a.metrics.cpuUsage.toFixed(1),"%"]})]}),e.jsxs("div",{className:"nice-edge-manager__resource-item",children:[e.jsx("span",{children:s("edgeManager.memory","Memory")}),e.jsx("div",{className:"nice-edge-manager__resource-bar",children:e.jsx("div",{className:"nice-edge-manager__resource-fill",style:{width:`${a.metrics.memoryUsage}%`}})}),e.jsxs("span",{children:[a.metrics.memoryUsage.toFixed(1),"%"]})]}),e.jsxs("div",{className:"nice-edge-manager__resource-item",children:[e.jsx("span",{children:s("edgeManager.disk","Disk")}),e.jsx("div",{className:"nice-edge-manager__resource-bar",children:e.jsx("div",{className:"nice-edge-manager__resource-fill",style:{width:`${a.metrics.diskUsage}%`}})}),e.jsxs("span",{children:[a.metrics.diskUsage.toFixed(1),"%"]})]})]}),e.jsxs("div",{className:"nice-edge-manager__network-stats",children:[e.jsxs("span",{children:[e.jsx(p,{name:"arrow-down",size:12})," ",E(a.metrics.networkIn)]}),e.jsxs("span",{children:[e.jsx(p,{name:"arrow-up",size:12})," ",E(a.metrics.networkOut)]})]})]})]})]})}function de({config:a,templates:n,onChange:i,onDeploy:s,onClose:l}){const{t:r}=M();return e.jsx("div",{className:"nice-edge-manager__dialog-overlay",children:e.jsxs("div",{className:"nice-edge-manager__dialog",children:[e.jsxs("div",{className:"nice-edge-manager__dialog-header",children:[e.jsx("h3",{children:r("edgeManager.deployModule","Deploy Module")}),e.jsx("button",{onClick:l,"aria-label":r("edgeManager.close","Close"),children:e.jsx(p,{name:"close",size:14})})]}),e.jsxs("div",{className:"nice-edge-manager__dialog-content",children:[e.jsxs("div",{className:"nice-edge-manager__field",children:[e.jsx("label",{children:r("edgeManager.templateOptional","Template (optional)")}),e.jsxs("select",{value:"",onChange:t=>{const o=n.find(d=>d.image===t.target.value);o&&i({...a,name:o.name,image:o.image})},children:[e.jsx("option",{value:"",children:r("edgeManager.selectATemplate","Select a template...")}),n.map(t=>e.jsx("option",{value:t.image,children:t.name},t.image))]})]}),e.jsxs("div",{className:"nice-edge-manager__field",children:[e.jsx("label",{children:r("edgeManager.moduleName","Module Name")}),e.jsx("input",{type:"text",value:a.name||"",onChange:t=>i({...a,name:t.target.value}),placeholder:r("edgeManager.eGMyModule","e.g., my-module")})]}),e.jsxs("div",{className:"nice-edge-manager__field",children:[e.jsx("label",{children:r("edgeManager.containerImage","Container Image")}),e.jsx("input",{type:"text",value:a.image||"",onChange:t=>i({...a,image:t.target.value}),placeholder:r("edgeManager.eGNginxLatest","e.g., nginx:latest")})]}),e.jsxs("div",{className:"nice-edge-manager__field",children:[e.jsx("label",{children:r("edgeManager.version","Version")}),e.jsx("input",{type:"text",value:a.version||"1.0.0",onChange:t=>i({...a,version:t.target.value})})]})]}),e.jsxs("div",{className:"nice-edge-manager__dialog-footer",children:[e.jsx("button",{onClick:l,children:r("edgeManager.cancel","Cancel")}),e.jsx("button",{className:"nice-edge-manager__deploy-confirm",onClick:s,children:r("edgeManager.deploy","Deploy")})]})]})})}const I={broker:"localhost",port:1883,clientId:`nice2dev-${Date.now()}`,useTLS:!1,keepAlive:60,cleanSession:!0,topics:[]},U={host:"localhost",port:5683,useDTLS:!1,resources:[]},$={type:"tcp",host:"localhost",port:502,slaveId:1,timeout:1e3,registers:[]},O={endpointUrl:"opc.tcp://localhost:4840",securityMode:"None",authentication:"anonymous",applicationName:"Nice2Dev IoT Client",nodes:[]};function he({protocol:a="mqtt",config:n,onSave:i,onTest:s,className:l=""}){const{t:r}=M(),[t,o]=h.useState(a),[d,m]=h.useState((n==null?void 0:n.type)==="mqtt"?{...I,...n.config}:I),[v,w]=h.useState((n==null?void 0:n.type)==="coap"?{...U,...n.config}:U),[j,f]=h.useState((n==null?void 0:n.type)==="modbus"?{...$,...n.config}:$),[g,y]=h.useState((n==null?void 0:n.type)==="opcua"?{...O,...n.config}:O),[x,C]=h.useState(null),[_,T]=h.useState(!1),u=h.useCallback(()=>{switch(t){case"mqtt":return d;case"coap":return v;case"modbus-tcp":case"modbus-rtu":return j;case"opcua":return g;default:return d}},[t,d,v,j,g]),z=h.useCallback(()=>{i==null||i(u())},[u,i]),V=h.useCallback(async()=>{if(s){T(!0),C(null);try{const k=await s(u());C(k)}catch(k){C({success:!1,message:String(k)})}finally{T(!1)}}},[u,s]);return e.jsxs("div",{className:`nice-protocol-config ${l}`,children:[e.jsxs("header",{className:"nice-protocol-config__header",children:[e.jsx("h2",{children:r("protocolConfig.title","Protocol Configuration")}),e.jsxs("div",{className:"nice-protocol-config__protocol-selector",children:[e.jsx("label",{children:r("protocolConfig.protocol","Protocol:")}),e.jsxs("select",{value:t,onChange:k=>o(k.target.value),children:[e.jsx("option",{value:"mqtt",children:r("protocolConfig.mqtt","MQTT")}),e.jsx("option",{value:"coap",children:r("protocolConfig.coap","CoAP")}),e.jsx("option",{value:"modbus-tcp",children:r("protocolConfig.modbusTcp","Modbus TCP")}),e.jsx("option",{value:"modbus-rtu",children:r("protocolConfig.modbusRtu","Modbus RTU")}),e.jsx("option",{value:"opcua",children:r("protocolConfig.opcUa","OPC-UA")})]})]})]}),e.jsxs("div",{className:"nice-protocol-config__content",children:[t==="mqtt"&&e.jsx(me,{config:d,onChange:m}),t==="coap"&&e.jsx(pe,{config:v,onChange:w}),(t==="modbus-tcp"||t==="modbus-rtu")&&e.jsx(ue,{config:j,type:t==="modbus-rtu"?"rtu":"tcp",onChange:f}),t==="opcua"&&e.jsx(ve,{config:g,onChange:y})]}),x&&e.jsxs("div",{className:`nice-protocol-config__test-result nice-protocol-config__test-result--${x.success?"success":"error"}`,children:[e.jsx(p,{name:x.success?"check":"close",size:14})," ",x.message]}),e.jsxs("footer",{className:"nice-protocol-config__footer",children:[e.jsx("button",{className:"nice-protocol-config__test-btn",onClick:V,disabled:_||!s,children:_?r("protocolConfig.testing","Testing..."):e.jsxs(e.Fragment,{children:[e.jsx(p,{name:"plug",size:14})," ",r("protocolConfig.testConnection","Test Connection")]})}),e.jsxs("button",{className:"nice-protocol-config__save-btn",onClick:z,children:[e.jsx(p,{name:"save",size:14})," ",r("save","Save")]})]})]})}function me({config:a,onChange:n}){const{t:i}=M();return e.jsxs("div",{className:"nice-protocol-config__section",children:[e.jsx("h3",{children:i("protocolConfig.mqttConfiguration","MQTT Configuration")}),e.jsxs("div",{className:"nice-protocol-config__grid",children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.broker","Broker")}),e.jsx("input",{type:"text",value:a.broker,onChange:s=>n({...a,broker:s.target.value}),placeholder:"localhost"})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.port","Port")}),e.jsx("input",{type:"number",value:a.port,onChange:s=>n({...a,port:parseInt(s.target.value,10)||1883})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.clientId","Client ID")}),e.jsx("input",{type:"text",value:a.clientId,onChange:s=>n({...a,clientId:s.target.value})})]}),e.jsx("div",{className:"nice-protocol-config__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:a.useTLS,onChange:s=>n({...a,useTLS:s.target.checked})}),i("protocolConfig.useTls","Use TLS")]})}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.username","Username")}),e.jsx("input",{type:"text",value:a.username||"",onChange:s=>n({...a,username:s.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.password","Password")}),e.jsx("input",{type:"password",value:a.password||"",onChange:s=>n({...a,password:s.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.keepAlive","Keep Alive (seconds)")}),e.jsx("input",{type:"number",value:a.keepAlive,onChange:s=>n({...a,keepAlive:parseInt(s.target.value,10)||60})})]}),e.jsx("div",{className:"nice-protocol-config__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:a.cleanSession,onChange:s=>n({...a,cleanSession:s.target.checked})}),i("protocolConfig.cleanSession","Clean Session")]})})]}),e.jsx("h4",{children:i("protocolConfig.topics","Topics")}),e.jsxs("div",{className:"nice-protocol-config__topics",children:[a.topics.map((s,l)=>e.jsxs("div",{className:"nice-protocol-config__topic-row",children:[e.jsx("input",{type:"text",value:s.pattern,onChange:r=>{const t=[...a.topics];t[l]={...t[l],pattern:r.target.value},n({...a,topics:t})},placeholder:i("protocolConfig.topicPatternPlaceholder","e.g., sensors/+/data")}),e.jsxs("select",{value:s.qos,onChange:r=>{const t=[...a.topics];t[l]={...t[l],qos:parseInt(r.target.value,10)},n({...a,topics:t})},children:[e.jsx("option",{value:0,children:i("protocolConfig.qos0","QoS 0")}),e.jsx("option",{value:1,children:i("protocolConfig.qos1","QoS 1")}),e.jsx("option",{value:2,children:i("protocolConfig.qos2","QoS 2")})]}),e.jsxs("select",{value:s.direction,onChange:r=>{const t=[...a.topics];t[l]={...t[l],direction:r.target.value},n({...a,topics:t})},children:[e.jsx("option",{value:"subscribe",children:i("protocolConfig.subscribe","Subscribe")}),e.jsx("option",{value:"publish",children:i("protocolConfig.publish","Publish")}),e.jsx("option",{value:"both",children:i("protocolConfig.both","Both")})]}),e.jsx("button",{"aria-label":i("protocolConfig.close","Close"),onClick:()=>{const r=a.topics.filter((t,o)=>o!==l);n({...a,topics:r})},children:e.jsx(p,{name:"close",size:14})})]},l)),e.jsxs("button",{onClick:()=>{n({...a,topics:[...a.topics,{pattern:"",qos:0,direction:"subscribe",payloadFormat:"json"}]})},children:[e.jsx(p,{name:"plus",size:14})," ",i("protocolConfig.addTopic","Add Topic")]})]})]})}function pe({config:a,onChange:n}){const{t:i}=M();return e.jsxs("div",{className:"nice-protocol-config__section",children:[e.jsx("h3",{children:i("protocolConfig.coapConfiguration","CoAP Configuration")}),e.jsxs("div",{className:"nice-protocol-config__grid",children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.host","Host")}),e.jsx("input",{type:"text",value:a.host,onChange:s=>n({...a,host:s.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.port","Port")}),e.jsx("input",{type:"number",value:a.port,onChange:s=>n({...a,port:parseInt(s.target.value,10)||5683})})]}),e.jsx("div",{className:"nice-protocol-config__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:a.useDTLS,onChange:s=>n({...a,useDTLS:s.target.checked})}),i("protocolConfig.useDtls","Use DTLS")]})}),e.jsx("div",{className:"nice-protocol-config__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:a.observe||!1,onChange:s=>n({...a,observe:s.target.checked})}),i("protocolConfig.enableObserve","Enable Observe")]})})]}),e.jsx("h4",{children:i("protocolConfig.resources","Resources")}),e.jsxs("div",{className:"nice-protocol-config__resources",children:[a.resources.map((s,l)=>e.jsxs("div",{className:"nice-protocol-config__resource-row",children:[e.jsx("input",{type:"text",value:s.path,onChange:r=>{const t=[...a.resources];t[l]={...t[l],path:r.target.value},n({...a,resources:t})},placeholder:"/sensors/temperature"}),e.jsx("button",{"aria-label":i("protocolConfig.close","Close"),onClick:()=>{const r=a.resources.filter((t,o)=>o!==l);n({...a,resources:r})},children:e.jsx(p,{name:"close",size:14})})]},l)),e.jsxs("button",{onClick:()=>{n({...a,resources:[...a.resources,{path:"",methods:["GET"],mediaType:"application/json",observable:!1}]})},children:[e.jsx(p,{name:"plus",size:14})," ",i("protocolConfig.addResource","Add Resource")]})]})]})}function ue({config:a,type:n,onChange:i}){const{t:s}=M();return e.jsxs("div",{className:"nice-protocol-config__section",children:[e.jsx("h3",{children:s("protocolConfig.modbusConfiguration","Modbus {type} Configuration").replace("{type}",String(n.toUpperCase()))}),e.jsxs("div",{className:"nice-protocol-config__grid",children:[n==="tcp"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.host","Host")}),e.jsx("input",{type:"text",value:a.host||"",onChange:l=>i({...a,host:l.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.port","Port")}),e.jsx("input",{type:"number",value:a.port||502,onChange:l=>i({...a,port:parseInt(l.target.value,10)||502})})]})]}),n==="rtu"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.serialPort","Serial Port")}),e.jsx("input",{type:"text",value:a.serialPort||"",onChange:l=>i({...a,serialPort:l.target.value}),placeholder:s("protocolConfig.serialPortPlaceholder","COM1 or /dev/ttyUSB0")})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.baudRate","Baud Rate")}),e.jsxs("select",{value:a.baudRate||9600,onChange:l=>i({...a,baudRate:parseInt(l.target.value,10)}),children:[e.jsx("option",{value:9600,children:"9600"}),e.jsx("option",{value:19200,children:"19200"}),e.jsx("option",{value:38400,children:"38400"}),e.jsx("option",{value:57600,children:"57600"}),e.jsx("option",{value:115200,children:"115200"})]})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.parity","Parity")}),e.jsxs("select",{value:a.parity||"none",onChange:l=>i({...a,parity:l.target.value}),children:[e.jsx("option",{value:"none",children:s("protocolConfig.none","None")}),e.jsx("option",{value:"even",children:s("protocolConfig.even","Even")}),e.jsx("option",{value:"odd",children:s("protocolConfig.odd","Odd")})]})]})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.slaveId","Slave ID")}),e.jsx("input",{type:"number",value:a.slaveId,onChange:l=>i({...a,slaveId:parseInt(l.target.value,10)||1}),min:1,max:247})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:s("protocolConfig.timeoutMs","Timeout (ms)")}),e.jsx("input",{type:"number",value:a.timeout,onChange:l=>i({...a,timeout:parseInt(l.target.value,10)||1e3})})]})]}),e.jsx("h4",{children:s("protocolConfig.registers","Registers")}),e.jsxs("table",{className:"nice-protocol-config__registers-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:s("protocolConfig.name","Name")}),e.jsx("th",{children:s("protocolConfig.address","Address")}),e.jsx("th",{children:s("protocolConfig.type","Type")}),e.jsx("th",{children:s("protocolConfig.dataType","Data Type")}),e.jsx("th",{children:s("protocolConfig.readWrite","R/W")}),e.jsx("th",{})]})}),e.jsx("tbody",{children:a.registers.map((l,r)=>e.jsxs("tr",{children:[e.jsx("td",{children:e.jsx("input",{type:"text",value:l.name,onChange:t=>{const o=[...a.registers];o[r]={...o[r],name:t.target.value},i({...a,registers:o})}})}),e.jsx("td",{children:e.jsx("input",{type:"number",value:l.address,onChange:t=>{const o=[...a.registers];o[r]={...o[r],address:parseInt(t.target.value,10)||0},i({...a,registers:o})}})}),e.jsx("td",{children:e.jsxs("select",{value:l.type,onChange:t=>{const o=[...a.registers];o[r]={...o[r],type:t.target.value},i({...a,registers:o})},children:[e.jsx("option",{value:"coil",children:s("protocolConfig.coil","Coil")}),e.jsx("option",{value:"discrete",children:s("protocolConfig.discrete","Discrete")}),e.jsx("option",{value:"holding",children:s("protocolConfig.holding","Holding")}),e.jsx("option",{value:"input",children:s("protocolConfig.input","Input")})]})}),e.jsx("td",{children:e.jsxs("select",{value:l.dataType,onChange:t=>{const o=[...a.registers];o[r]={...o[r],dataType:t.target.value},i({...a,registers:o})},children:[e.jsx("option",{value:"bool",children:s("protocolConfig.bool","Bool")}),e.jsx("option",{value:"int16",children:s("protocolConfig.int16","Int16")}),e.jsx("option",{value:"uint16",children:s("protocolConfig.uint16","UInt16")}),e.jsx("option",{value:"int32",children:s("protocolConfig.int32","Int32")}),e.jsx("option",{value:"uint32",children:s("protocolConfig.uint32","UInt32")}),e.jsx("option",{value:"float32",children:s("protocolConfig.float32","Float32")})]})}),e.jsxs("td",{children:[e.jsx("input",{type:"checkbox",checked:l.readable,onChange:t=>{const o=[...a.registers];o[r]={...o[r],readable:t.target.checked},i({...a,registers:o})},title:s("protocolConfig.readable","Readable")}),e.jsx("input",{type:"checkbox",checked:l.writable,onChange:t=>{const o=[...a.registers];o[r]={...o[r],writable:t.target.checked},i({...a,registers:o})},title:s("protocolConfig.writable","Writable")})]}),e.jsx("td",{children:e.jsx("button",{"aria-label":s("protocolConfig.close","Close"),onClick:()=>{const t=a.registers.filter((o,d)=>d!==r);i({...a,registers:t})},children:e.jsx(p,{name:"close",size:14})})})]},r))})]}),e.jsxs("button",{onClick:()=>{i({...a,registers:[...a.registers,{name:"",address:0,type:"holding",dataType:"uint16",readable:!0,writable:!1}]})},children:[e.jsx(p,{name:"plus",size:14})," ",s("protocolConfig.addRegister","Add Register")]})]})}function ve({config:a,onChange:n}){const{t:i}=M();return e.jsxs("div",{className:"nice-protocol-config__section",children:[e.jsx("h3",{children:i("protocolConfig.opcUaConfiguration","OPC-UA Configuration")}),e.jsxs("div",{className:"nice-protocol-config__grid",children:[e.jsxs("div",{className:"nice-protocol-config__field nice-protocol-config__field--full",children:[e.jsx("label",{children:i("protocolConfig.endpointUrl","Endpoint URL")}),e.jsx("input",{type:"text",value:a.endpointUrl,onChange:s=>n({...a,endpointUrl:s.target.value}),placeholder:i("protocolConfig.endpointUrlPlaceholder","opc.tcp://localhost:4840")})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.securityMode","Security Mode")}),e.jsxs("select",{value:a.securityMode,onChange:s=>n({...a,securityMode:s.target.value}),children:[e.jsx("option",{value:"None",children:i("protocolConfig.securityNone","None")}),e.jsx("option",{value:"Sign",children:i("protocolConfig.sign","Sign")}),e.jsx("option",{value:"SignAndEncrypt",children:i("protocolConfig.signAndEncrypt","Sign and Encrypt")})]})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.authentication","Authentication")}),e.jsxs("select",{value:a.authentication,onChange:s=>n({...a,authentication:s.target.value}),children:[e.jsx("option",{value:"anonymous",children:i("protocolConfig.anonymous","Anonymous")}),e.jsx("option",{value:"username",children:i("protocolConfig.usernamePassword","Username/Password")}),e.jsx("option",{value:"certificate",children:i("protocolConfig.certificate","Certificate")})]})]}),a.authentication==="username"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.username","Username")}),e.jsx("input",{type:"text",value:a.username||"",onChange:s=>n({...a,username:s.target.value})})]}),e.jsxs("div",{className:"nice-protocol-config__field",children:[e.jsx("label",{children:i("protocolConfig.password","Password")}),e.jsx("input",{type:"password",value:a.password||"",onChange:s=>n({...a,password:s.target.value})})]})]}),e.jsxs("div",{className:"nice-protocol-config__field nice-protocol-config__field--full",children:[e.jsx("label",{children:i("protocolConfig.applicationName","Application Name")}),e.jsx("input",{type:"text",value:a.applicationName,onChange:s=>n({...a,applicationName:s.target.value})})]})]}),e.jsx("h4",{children:i("protocolConfig.nodes","Nodes")}),e.jsxs("div",{className:"nice-protocol-config__nodes",children:[a.nodes.map((s,l)=>e.jsxs("div",{className:"nice-protocol-config__node-row",children:[e.jsx("input",{type:"text",value:s.nodeId,onChange:r=>{const t=[...a.nodes];t[l]={...t[l],nodeId:r.target.value},n({...a,nodes:t})},placeholder:i("protocolConfig.nodeIdPlaceholder","ns=2;s=Temperature")}),e.jsx("input",{type:"text",value:s.displayName,onChange:r=>{const t=[...a.nodes];t[l]={...t[l],displayName:r.target.value},n({...a,nodes:t})},placeholder:i("protocolConfig.displayNamePlaceholder","Display Name")}),e.jsx("button",{"aria-label":i("protocolConfig.close","Close"),onClick:()=>{const r=a.nodes.filter((t,o)=>o!==l);n({...a,nodes:r})},children:e.jsx(p,{name:"close",size:14})})]},l)),e.jsxs("button",{onClick:()=>{n({...a,nodes:[...a.nodes,{nodeId:"",displayName:"",dataType:"Double",read:!0}]})},children:[e.jsx(p,{name:"plus",size:14})," ",i("protocolConfig.addNode","Add Node")]})]})]})}exports.NiceEdgeManager=re;exports.NiceIoTDashboard=X;exports.NiceProtocolConfig=he;