(window.webpackJsonpunifiNetworkUi=window.webpackJsonpunifiNetworkUi||[]).push([[2],{1016:function(e,t,a){"use strict";a.d(t,"b",function(){return n.b}),a.d(t,"e",function(){return m}),a.d(t,"c",function(){return d}),a.d(t,"d",function(){return _}),a.d(t,"f",function(){return u}),a.d(t,"a",function(){return b});var n=a(1170),l=a(9),i=a(2719),r=a(27),c=a(16),o=a(6),s=a(8);const E=Object(s.z)(Object(n.a)()),m=Object(l.a)(E,r.c),d=Object(l.a)(m,e=>Object(i.a)(e,({report_timestamp:e})=>-e)[0]),_=e=>Object(l.a)(m,t=>t.find(t=>t.id===e)),u=(Object(l.a)(o.selectIsUbiOS,e=>e),Object(l.a)(c.selectMgmtSettings,o.selectIsUbiOS,(e,t)=>(null==e?void 0:e.wifiman_enabled)&&t));var b;!function(e){e.INTERNET="INTERNET",e.LOCAL_DEVICE="LOCAL_DEVICE",e.LOCAL_CLIENT="LOCAL_CLIENT"}(b||(b={})),a(1171)},1017:function(e,t,a){"use strict";a.d(t,"a",function(){return o}),a.d(t,"b",function(){return s});var n=a(0),l=a(3),i=a(4),r=a(165);const c=e=>Object(r.a)(e,"shared.bodyStyle"),o={overflow:l.a`
  overflow: hidden;
`};function s(){const e=Object(i.useSelector)(c),t=Object.keys(e),[a,l]=Object(n.useState)(e);function r(e){Object.values(e).forEach(e=>document.body.classList.remove(e.style))}return Object(n.useEffect)(()=>{const n={};return t.forEach(t=>{const a=e[t];a&&(document.body.classList.contains(a.style)||document.body.classList.add(a.style),n[t]=a)}),r(a),l(n),()=>r(a)},[t.join()]),null}},1032:function(e,t,a){"use strict";var n;a.d(t,"a",function(){return n}),function(e){e.TIMELINE="timeline",e.MAP="map",e.INSIGHTS="insights"}(n||(n={}))},1039:function(e,t,a){"use strict";a.d(t,"a",function(){return c});var n=a(0),l=a.n(n),i=a(47),r=a(423);const c=({startTimestamp:e,size:t="body",color:a="inherit"})=>{const c=Object(n.useRef)(null),o=Object(n.useRef)(null),s=Object(n.useCallback)(()=>{c.current&&(c.current.innerText=e?Object(r.a)(Math.floor(Date.now()/1e3)-e).join(" "):"-",o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{s()},1e3))},[e]);return Object(n.useEffect)(()=>(e&&s(),()=>{o.current&&clearTimeout(o.current)}),[]),l.a.createElement(i.a,{size:t,color:a},l.a.createElement("span",{ref:c}))}},1041:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(4),r=a(3),c=a(481),o=a(25),s=a(57),E=a(6),m=a(15),d=a(107),_=a(1),u=a(47),b=a(851),p=a(124),O=a(131),I=a(46);const g=Object(r.c)("div")`
  display: table;
`,C=Object(r.c)("div")`
  display: table-row;

  > * {
    font-size: 11px;
    display: table-cell;
    white-space: nowrap;

    &:last-of-type {
      padding-left: 10px;
    }
  }
`;var h=Object(_.e)(function({deviceData:e,intl:t,portData:a,portData:{ifname:n,port_idx:r,portName:c,tx_bytes:o,rx_bytes:m,sfp_txfault:d,sfp_rxfault:h,sfp_vendor:T,sfp_serial:v,sfp_part:f,sfp_rev:R,sfp_compliance:D,sfp_voltage:S,sfp_current:y,sfp_txpower:P,sfp_rxpower:A,sfp_temperature:N}}){const j=Object(i.useSelector)(O.selectPortConf),x=Object(s.yb)(a,t,j),L=Object(i.useSelector)(p.u),V=Object(s.mb)(a,e,L),M=Object(s.Db)(a,e,L),w=a&&E.SFP_MEDIA_TYPES.includes(a.media)&&a.sfp_found,F=Object(s.Bb)(a,t),U=Object(s.wb)(a),k=[];return w&&(d&&k.push(t.formatMessage({id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_TX_FAULT"})),h&&k.push(t.formatMessage({id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_RX_FAULT"}))),l.a.createElement(g,null,!a.masked&&(r||n)&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_PORT"})),l.a.createElement(u.a,null,Object(s.pb)(a))),c&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_NAME"})),l.a.createElement(u.a,null,c)),(F||k.length>0)&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_STATUS"})),l.a.createElement(u.a,null,F,k.length>0&&r%2==0&&l.a.createElement(u.a,{color:"danger"},k.join(", ")))),o>0&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_TX"})),l.a.createElement(b.a,{type:"bytes",input:o})),m>0&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_RX"})),l.a.createElement(b.a,{type:"bytes",input:m})),U&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"COMMON_DEVICE_POE_MODE_POE"})),l.a.createElement(u.a,null,U)),x&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_PROFILE"})),l.a.createElement(u.a,null,x)),V&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_DOWNLINK"})),l.a.createElement(u.a,null,Object(I.c)(V))),M&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_UPLINK"})),l.a.createElement(u.a,null,Object(I.c)(M))),w&&l.a.createElement(l.a.Fragment,null,T&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_VENDOR"})),l.a.createElement(u.a,null,T)),v&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_SERIAL"})),l.a.createElement(u.a,null,v)),f&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_PART_NUMBER"})),l.a.createElement(u.a,null,f)),R&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_REV"})),l.a.createElement(u.a,null,R)),D&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_COMPLIANCE"})),l.a.createElement(u.a,null,D)),S&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_VOLTAGE"})),l.a.createElement(u.a,null,l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_VALUES_VOLTAGE",values:{voltage:S}}))),y&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_CURRENT"})),l.a.createElement(u.a,null,l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_VALUES_CURRENT",values:{current:y}}))),N&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_LABEL"})),l.a.createElement(u.a,null,l.a.createElement(_.b,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_VALUE",values:{temperature:Number(N).toFixed(1)}}))),P&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_OUTPUT_POWER"})),l.a.createElement(u.a,null,l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_VALUES_IO_POWER",values:{power:P}}))),A&&l.a.createElement(C,null,l.a.createElement(u.a,{color:"secondary"},l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_INPUT_POWER"})),l.a.createElement(u.a,null,l.a.createElement(_.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_VALUES_IO_POWER",values:{power:A}})))))}),T=a(908),v=a(1657);const f=Object(r.c)(c.a,{shouldForwardProp:e=>!["color","portSize","portSizeOverride","isDisabled"].includes(e)})`
  height: ${({portSizeOverride:e,portSize:t})=>e||(null==t?void 0:t.size)||T.a.large.size};
  width: ${({portSizeOverride:e,portSize:t})=>e||(null==t?void 0:t.size)||T.a.large.size};
  align-items: center;
  background-color: ${({theme:e,color:t,isDisabled:a})=>a?"transparent":e.motifPalette[t]};
  ${({isDisabled:e,theme:t})=>e&&`border: ${t.motifPalette[E.SWITCH_PORT_SPEED_COLORS.DEFAULT]} 1px solid;`}
  border-radius: 2px;
  color: #fff;
  justify-content: center;
  display: flex;
  position: relative;
  pointer-events: auto;

  &:not(:first-child) {
    margin-left: ${({portSize:e})=>(null==e?void 0:e.spacing)||T.a.large.spacing};
  }
`,R=Object(r.c)("div",{shouldForwardProp:e=>!["portSize","portSizeOverride"].includes(e)})`
  width: ${({portSizeOverride:e,portSize:t})=>e||(null==t?void 0:t.size)||T.a.large.size};
  &:not(:first-child) {
    margin-left: ${({portSize:e})=>(null==e?void 0:e.spacing)||T.a.large.spacing};
  }
`,D=({tooltipOffset:e}=T.a.large)=>r.a`
  margin-left: ${e};
`;t.a=(({cellData:e,deviceData:t,keyValue:a,portSize:n,portSizeOverride:r,...c})=>{const _=Object(s.xc)(Object(i.useSelector)(E.selectDevicesData),t),u=Object(s.ob)(e,t,Object(i.useSelector)(m.selectNetworkGroups),_),b=Object(s.lb)(t,e),p=e||{},O=Object(o.k)(),{path:I}=Object(o.n)(),{site:g,page:C,id:T,panel:S}=Object(o.m)();if(!e)return Object(E.isUdmBase)(t)||Object(E.isUdr)(t)?null:l.a.createElement(R,{key:a,portSize:n,portSizeOverride:r});const y=e=>Object(o.i)(I,{site:g,page:C,id:T,panel:S,subPanel:"ports",subPanelId:e});return l.a.createElement(f,Object.assign({color:b,portSize:n,portSizeOverride:r,isDisabled:!e.enable,message:l.a.createElement(h,{deviceData:t,portData:p}),position:"bottomRight",tooltipClassName:D(n),onClick:a=>!e.masked&&(e=>{var a,n;return null===(a=null==e?void 0:e.preventDefault)||void 0===a||a.call(e),null===(n=null==e?void 0:e.stopPropagation)||void 0===n||n.call(e),Object(s.He)(t)||Object(s.Ae)(t)?O.push(y(null==p?void 0:p.ifname)):"wan"===(null==p?void 0:p.network_name)||"wan2"===(null==p?void 0:p.network_name)?O.push(y(d.b.WAN)):(null==p?void 0:p.dns)?O.push(y(d.b.ALL)):O.push(y("aggregate"===p.op_mode?p.portIdx||p.port_idx||p.ifname:Object(s.pb)(p)))})(a),portal:!0,key:a},c),l.a.createElement(v.a,{icons:u}))})},1042:function(e,t,a){"use strict";var n=a(1653);a.d(t,"dismissUnifiCareActivation",function(){return n.a}),a.d(t,"fetchUnifiCareDetails",function(){return n.b}),a(854);var l=a(2612);a.d(t,"selectUnifiCareDetails",function(){return l.a}),a(2613)},1169:function(e,t,a){"use strict";a.d(t,"a",function(){return _}),a.d(t,"b",function(){return u});var n=a(865),l=a(9),i=a(20),r=a(1654),c=a(16),o=a(423),s=a(99),E=a(75),m=a(736),d=a(549);const _=(e,t,a=[])=>Object(l.a)(Object(r.b)(e,t),i.J,c.selectLocaleSettings,E.d,i.E,(e,t,n,l,i)=>{const{data:r,...c}=e,E=Object(s.d)(t,n,l);return{...c,data:r.map(({assoc_time:e,duration:t,_id:n,mac:l,satisfaction:r,name:c="",hostname:m=""})=>({id:n,date:Object(s.e)(1e3*e,E,d.a),start:Object(s.e)(1e3*e,E,i),duration:Object(o.c)(t,!0),experience:r,mac:l,hostname:m,name:c,client:a.find(e=>"mac"in e&&e.mac===l)}))}}),u=e=>Object(l.a)(t=>{var a,n,l,i;return null===(i=null===(l=null===(n=null===(a=t.models)||void 0===a?void 0:a[m.MODEL])||void 0===n?void 0:n.byId)||void 0===l?void 0:l[e])||void 0===i?void 0:i.record},i.J,c.selectLocaleSettings,E.d,i.E,(e,t,a,l,i)=>{if(!Object(n.a)(e)){const n=Object(s.d)(t,a,l),{assoc_time:r,duration:c,sw_port:E,mac:m,ip:_,satisfaction:u,hostname:b="",is_wired:p,name:O,_id:I}=e;return{id:I,date:r?Object(s.e)(1e3*r,n,d.a):"",duration:c?Object(o.c)(c,!0):"",start:r?Object(s.e)(1e3*r,n,i):"",end:r?Object(s.e)(1e3*r+1e3*c,n,i):"",mac:m,ip:_,port:E,experience:u,hostname:b,is_wired:p,name:O}}return e})},1170:function(e,t,a){"use strict";a.d(t,"a",function(){return i}),a.d(t,"b",function(){return r});var n=a(8),l=a(1171);const i=(e,t)=>Object(n.p)(l.b,l.c,e,{idField:l.a,...t}),r=i(void 0,{crudCacheStrategy:{type:n.a.COMBINED,interval:5e3}})},1171:function(e,t,a){"use strict";a.d(t,"a",function(){return n}),a.d(t,"b",function(){return l}),a.d(t,"c",function(){return i});const n="id",l="wifiman",i="/v2/api/site/{site}/wifiman"},1172:function(e,t,a){"use strict";a.d(t,"b",function(){return n}),a.d(t,"c",function(){return l}),a.d(t,"a",function(){return i});const n="session",l="/api/s/{site}/stat/session",i="_id"},1183:function(e,t,a){"use strict";var n=a(1655);a.d(t,"fetchTraffic",function(){return n.a});var l=a(755);a.d(t,"DPI_CONVERTER_LIMIT",function(){return l.a}),a.d(t,"UNKNOWN_APP_ID",function(){return l.f});var i=a(2619);a.d(t,"selectFormattedStaDpiData",function(){return i.a}),a(2615),a(1194)},1185:function(e,t,a){"use strict";a.d(t,"a",function(){return n}),a.d(t,"b",function(){return l});const n=[{activity:7,activityPercent:80,color:"#006fff",experience:90,id:15,os_class:15,rx_bytes:52542977751,tx_bytes:32459332908,type:"Apple iOS",value:95},{activity:205,activityPercent:40,color:"#57a0ff",experience:97,id:29,os_class:72,rx_bytes:7582614554,tx_bytes:2673839659,type:"macOS",value:14},{activity:0,activityPercent:55,color:"#003c9e",experience:83,id:5,os_class:5,rx_bytes:424505,tx_bytes:499984,type:"Android",value:6},{activity:7,activityPercent:55,color:"#0056c7",experience:84,id:1,os_class:1,rx_bytes:52542977751,tx_bytes:32459332908,type:"Others",value:4}],l=e=>[{compoundAppId:4,name:e.formatMessage({id:"DPI_CATEGORIES_STREAMING_MEDIA"}),color:"#003C9E",rx_bytes:7e7,tx_bytes:7e7,traffic:14e9},{name:e.formatMessage({id:"DPI_CATEGORIES_NETWORK_PROTOCOLS"}),color:"#006FFF",compoundAppId:18,rx_bytes:7e7,tx_bytes:7e7,traffic:14e9},{name:e.formatMessage({id:"DPI_CATEGORIES_WEB"}),color:"#46C7FD",compoundAppId:13,rx_bytes:7e7,tx_bytes:7e7,traffic:14e9},{name:e.formatMessage({id:"DPI_CATEGORIES_SOCIAL_NETWORK"}),color:"#39CC64",compoundAppId:24,rx_bytes:7e7,tx_bytes:7e7,traffic:14e9},{name:e.formatMessage({id:"DPI_CATEGORIES_BYPASS_PROXIES_AND_TUNNELS"}),color:"#BFE041",compoundAppId:11,rx_bytes:7e7,tx_bytes:7e7,traffic:14e9},{color:"#EDEDF0",compoundAppId:6,rx_bytes:7e7,tx_bytes:7e7,traffic:14e9},{color:"#EDEDF0",compoundAppId:7,rx_bytes:7e7,tx_bytes:7e7,traffic:14e9},{color:"#EDEDF0",compoundAppId:8,rx_bytes:7e7,tx_bytes:7e7,traffic:14e9},{color:"#EDEDF0",compoundAppId:9,rx_bytes:7e7,tx_bytes:7e7,traffic:14e9},{color:"#EDEDF0",compoundAppId:19,rx_bytes:7e7,tx_bytes:7e7,traffic:14e9}]},1193:function(e,t,a){"use strict";a.d(t,"a",function(){return c}),a.d(t,"c",function(){return o}),a.d(t,"b",function(){return s});var n=a(194),l=a(285),i=a(123),r=a(1676);const c={[r.b.EXPERIENCE]:Object.values(r.a)},o=Object(l.b)(n.a.WIFI_MAN,i.a.WIFI_MAN,c),s=Object(l.a)(n.a.WIFI_MAN)},1194:function(e,t,a){"use strict";a.d(t,"b",function(){return l}),a.d(t,"a",function(){return i});const n=a(84).dpi.ruleMap,l=(e,t)=>+t+(+e<<16),i=e=>{const t=(a=e,n.applications[a]);var a;return t?t.name:void 0}},1197:function(e,t,a){"use strict";a.d(t,"a",function(){return s}),a.d(t,"b",function(){return E}),a.d(t,"c",function(){return m});var n=a(237),l=a.n(n),i=a(0);let r,c,o="";function s(e,t){return o=t,(a,n=!0,l=!0)=>{const i=localStorage&&localStorage.getItem("app.invocationTrigger");localStorage.removeItem("app.invocationTrigger"),n&&window.location&&i&&(r=a({name:"Network -- Uncategorized",op:null!=i?i:"pageload",tags:{"routing.instrumentation":"network-controller-react-router"}})),l&&e.listen&&(c=e.listen((e,n)=>{if(n&&("PUSH"===n||"POP"===n)){r&&r.finish();const n={"routing.instrumentation":"network-controller-react-router"};r=a({name:`${t}${e.pathname}`,op:"navigation",tags:n})}}))}}function E(e){return()=>{c&&c(),r.endTimestamp||r.finish(),e.close()}}function m(e){const t=e.displayName||e.name,a=t=>(r&&t&&t.computedMatch&&t.computedMatch.isExact&&r.setName(`${o}${t.computedMatch.path}`),i.createElement(e,Object.assign({},t)));return a.displayName=`sentryRoute(${t})`,l()(a,e),a}},1201:function(e,t,a){"use strict";t.a={op_mode:"switch",dot1x_ctrl:"force_authorized",autoneg:!0,dot1x_idle_timeout:300,full_duplex:void 0,speed:void 0,lldpmed_enabled:!0,stp_port_mode:!0,stp_bpdu_guard:!1,stp_loopback_detection:!1,stp_root_guard:!1,egress_rate_limit_kbps_enabled:!1,port_security_enabled:!1,port_security_mac_address:[],linkNegotiationOptions:{autoneg:{id:"autoneg",label:"DEVICE_PROPERTIES_LINK_NEGOTIATION_AUTO",autoneg:!0,speed:void 0,full_duplex:void 0},"10000 FDX":{id:"10000 FDX",label:"DEVICE_STATE_FLAG_WIRED_FULL_DUPLEX",autoneg:!1,speed:1e4,full_duplex:!0},"2500 FDX":{id:"2500 FDX",label:"DEVICE_STATE_FLAG_WIRED_FULL_DUPLEX",autoneg:!1,speed:2500,full_duplex:!0},"1000 FDX":{id:"1000 FDX",label:"DEVICE_STATE_FLAG_WIRED_FULL_DUPLEX",autoneg:!1,speed:1e3,full_duplex:!0},"100 FDX":{id:"100 FDX",label:"DEVICE_STATE_FLAG_WIRED_FULL_DUPLEX",autoneg:!1,speed:100,full_duplex:!0},"100 HDX":{id:"100 HDX",label:"DEVICE_STATE_FLAG_WIRED_HALF_DUPLEX",autoneg:!1,speed:100,full_duplex:!1},"10 FDX":{id:"10 FDX",label:"DEVICE_STATE_FLAG_WIRED_FULL_DUPLEX",autoneg:!1,speed:10,full_duplex:!0},"10 HDX":{id:"10 HDX",label:"DEVICE_STATE_FLAG_WIRED_HALF_DUPLEX",autoneg:!1,speed:10,full_duplex:!1}}}},1205:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(1),r=a(3),c=a(1154),o=a(48),s=a(481),E=a(47),m=a(851),d=a(985),_=a(1670),u=a(5),b=a(34),p=a(82),O=a(746),I=a(1566);const g=Object(r.c)(c.a)`
  margin-right: 16px;
  height: 6px;
  border-radius: 2px;
  overflow: hidden;

  > div {
    background: linear-gradient(270deg, ${o.a["blue-light-7"]} 0%, ${o.a["blue-3"]} 100%) !important;
  }

  @media ${b.a.VIEWPORT_XXL_DOWN} {
    height: 4px;
  }
  @media ${b.a.VIEWPORT_XL_DOWN} {
    height: 3px;
  }
`,C=Object(r.c)(s.a)`
  width: 100% !important;
`,h=Object(r.c)(u.a)`
  color: ${({theme:e})=>e.motifPalette.text01};
  min-width: 120px;
`,T=Object(r.c)(E.a)`
  margin-right: ${({theme:e})=>e.spacing["spacing-s"]};
`,v=Object(r.c)(m.a,{shouldForwardProp:e=>"direction"!==e})`
  color: ${({theme:e,direction:t})=>e.motifPalette["up"===t?"purple06":"uBlue06"]} !important;
`,f=[{id:"type",label:l.a.createElement(p.b,{styleNumber:10},l.a.createElement(i.b,{id:"DASHBOARD_MODULE_CLIENTS_TABLE_TYPE"})),minWidth:100,growthFactor:1,renderCell:({type:e,color:t,os_class:a})=>l.a.createElement(l.a.Fragment,null,l.a.createElement(O.a,{customColor:t}),l.a.createElement(I.a,{os_class:a}),l.a.createElement(p.b,{styleNumber:18,truncate:!0},e))},{id:"activityInfo",label:l.a.createElement(p.b,{styleNumber:10},l.a.createElement(i.b,{id:"DASHBOARD_MODULE_CLIENTS_TABLE_ACTIVITY"})),minWidth:80,growthFactor:1,renderCell:({activityPercent:e,rx_bytes:t,tx_bytes:a})=>l.a.createElement(C,{message:l.a.createElement(u.a,{flexDirection:"column"},l.a.createElement(h,{justifyContent:"space-between"},l.a.createElement("div",null,l.a.createElement(T,null,l.a.createElement(i.b,{id:"COMMON_WORD_DOWN"}))),l.a.createElement(v,{type:"bytes",input:t,direction:"down"})),l.a.createElement(h,{justifyContent:"space-between"},l.a.createElement("div",null,l.a.createElement(T,null,l.a.createElement(i.b,{id:"COMMON_WORD_UP"}))),l.a.createElement(v,{type:"bytes",input:a,direction:"up"}))),portal:!0},l.a.createElement(g,{value:e,variant:"primary"}))},{id:"experienceInfo",minWidth:60,growthFactor:1,label:l.a.createElement(p.b,{styleNumber:10},l.a.createElement(i.b,{id:"COMMON_EXP"})),renderCell:({experience:e})=>l.a.createElement(p.b,{styleNumber:19,colorOverride:d.a.getGradientColor(Math.round(e)/100)},Math.round(e),"%")},{id:"value",minWidth:40,growthFactor:1,label:l.a.createElement(p.b,{styleNumber:10},l.a.createElement(i.b,{id:"COMMON_TOTAL"})),renderCell:({value:e})=>l.a.createElement(p.b,{styleNumber:18},e)}];t.a=(({tableItems:e})=>l.a.createElement(O.b,null,l.a.createElement(_.a,{disableColumnFilters:!0,width:"100%",columns:f,items:e,renderPlaceholder:()=>l.a.createElement(p.b,{styleNumber:2},l.a.createElement(i.b,{id:"DASHBOARD_MODULE_CLIENTS_EMPTY"}))})))},1566:function(e,t,a){"use strict";a.d(t,"a",function(){return y});var n=a(0),l=a.n(n),i=a(3),r=a(1),c=a(47),o=a(851),s=a(985),E=a(55),m=a(2764),d=a(2678),_=a.n(d),u=a(10),b=a(34),p=a(86),O=a(5),I=a(794),g=a(183),C=a(82),h=a(802),T=a(217);const v=Object(i.c)(O.a,{shouldForwardProp:e=>"loadingBackgroundColor"!==e&&"customBorder"!==e})`
  border: ${({customBorder:e})=>e}px solid
    ${({theme:e,loadingBackgroundColor:t})=>t||e.motifPalette.neutral02};
  border-radius: 100%;

  @media ${b.a.VIEWPORT_XS_UP} {
    margin-top: 12px;
  }
  @media ${b.a.VIEWPORT_XXL_UP} {
    margin-right: 36px;
  }

  circle {
    stroke: ${({loadingBackgroundColor:e})=>e};
  }
  & * > text:first-of-type {
    font-size: 28px;

    @media ${b.a.VIEWPORT_XXL_DOWN} {
      font-size: 20px;
    }
    @media ${b.a.VIEWPORT_XL_DOWN} {
      font-size: 18px;
    }
    @media ${b.a.VIEWPORT_S_DOWN} {
      font-size: 20px;
    }
  }
  & * > text:last-of-type {
    font-size: 20px;

    @media ${b.a.VIEWPORT_XXL_DOWN} {
      font-size: 14px;
    }
    @media ${b.a.VIEWPORT_XL_DOWN} {
      font-size: 10px;
    }
  }
  .titleClassName {
    ${C.c.style11};
    transform: translateY(18px);
    @media ${b.a.VIEWPORT_XXL_DOWN} {
      transform: translateY(12px);
    }
    @media ${b.a.VIEWPORT_XL_DOWN} {
      transform: translateY(10px);
    }
  }
  .descriptionClassName {
    ${C.c.style17};
    transform: translateY(-38px);
    @media ${b.a.VIEWPORT_XXL_DOWN} {
      transform: translateY(-34px);
    }
    @media ${b.a.VIEWPORT_XL_DOWN} {
      transform: translateY(-31px);
    }
  }
`,f=Object(i.c)(c.a,{shouldForwardProp:e=>"colorOverride"!==e})`
  color: ${({colorOverride:e})=>e} !important;
`,R=Object(i.c)(o.a,{shouldForwardProp:e=>"direction"!==e})`
  color: ${({theme:e,direction:t})=>e.motifPalette["up"===t?"purple06":"uBlue06"]} !important;
`,D=Object(i.c)(_.a)`
  display: none;
  width: 14px;
  height: auto;
  margin-right: 8px;
  color: ${({theme:e})=>e.motifPalette.neutral11};
  @media ${b.a.VIEWPORT_S_UP} {
    display: inline-block;
  }
`,S=Object(i.c)(u.Eb)`
  display: none;
  margin-right: 8px;
  margin-left: -1px;
  color: ${({theme:e})=>e.motifPalette.neutral11};
  @media ${b.a.VIEWPORT_S_UP} {
    display: block;
  }
`,y=({os_class:e})=>l.a.createElement(O.a,{alignItems:"center",justifyContent:"center"},e>1?l.a.createElement(D,{src:`${I.e}/${e}.svg`}):l.a.createElement(S,{variant:"fill",height:17,width:17})),P=({id:e,os_class:t,type:a,rx_bytes:n,tx_bytes:i,traffic:o,experience:E,value:m})=>0!==e?l.a.createElement(O.a,{flexDirection:"column"},l.a.createElement(O.a,{width:"100%",marginBottom:12,paddingBottom:12},l.a.createElement(y,{os_class:t}),l.a.createElement(c.a,{size:"body",weight:"bold"},a||l.a.createElement(r.b,{id:"COMMON_UNKNOWN"}))),l.a.createElement(O.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(r.b,{id:"COMMON_WORD_DOWN"}),l.a.createElement(R,{type:"bytes",input:n,direction:"down"})),l.a.createElement(O.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(r.b,{id:"COMMON_WORD_UP"}),l.a.createElement(R,{type:"bytes",input:i,direction:"up"})),l.a.createElement(O.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(r.b,{id:"COMMON_TRAFFIC"}),l.a.createElement(c.a,null,Object(g.a)(o))),l.a.createElement(O.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(r.b,{id:"COMMON_EXP"}),l.a.createElement(f,{colorOverride:s.a.getGradientColor(Math.round(E)/100)},Math.round(E),"%")),l.a.createElement(O.a,{justifyContent:"space-between"},l.a.createElement(r.b,{id:"COMMON_TOTAL"}),l.a.createElement(c.a,null,m))):null;t.b=Object(r.e)(({isLoaded:e,clients:t,intl:a,placeholderActiveClients:n})=>{const i=Object(h.b)(h.a.DASHBOARD),{motif:r}=Object(E.a)();return l.a.createElement(v,{justifyContent:"center",alignItems:"center",alignSelf:"center",loadingBackgroundColor:!e&&(r===T.a.DARK?p.b:p.c),customBorder:i.border},l.a.createElement(m.a,{items:t,renderTooltipMessage:P,tooltipProps:{position:"right",width:252},title:e&&""+(n||(null==t?void 0:t.reduce((e,t)=>e+(null==t?void 0:t.value)||0,0))),description:e&&a.formatMessage({id:"COMMON_TOTAL_CLIENTS"}),titleClassName:"titleClassName",descriptionClassName:"descriptionClassName",spacer:.4,thickness:3,size:i.diameter}))})},1653:function(e,t,a){"use strict";a.d(t,"b",function(){return c}),a.d(t,"a",function(){return o});var n=a(24),l=a(8),i=a(465),r=a(854);const c=()=>Object(l.s)(r.c,r.d,r.e),o=e=>t=>t(Object(l.b)(n.API_CALL,r.f.DISMISS_UNIFI_CARE_ACTIVATION_SUCCESS,r.f.DISMISS_UNIFI_CARE_ACTIVATION_ERROR,r.a,Object(i.a)(r.b,{mac:e})))},1654:function(e,t,a){"use strict";a.d(t,"a",function(){return r}),a.d(t,"b",function(){return c});var n=a(8),l=a(1172);const i={method:"post",fetchConfig:{getAllPostData:!0},idField:l.a},r=(e,t)=>Object(n.p)(l.b,l.c,((e,t)=>({data:{[t?"ap_mac":"mac"]:e,_limit:t?20:5,_sort:"-assoc_time"}}))(e,t),i),c=(e,t)=>Object(n.z)(r(e,t))},1655:function(e,t,a){"use strict";a.d(t,"a",function(){return i}),a.d(t,"b",function(){return r});var n=a(8),l=a(755);const i=(e,t)=>Object(n.s)(l.c,l.d,l.e,e,{...t,idField:"mac"}),r=(e,t)=>Object(n.z)(i(e,t))},1656:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(435),r=a(830);t.a=(({signal:e})=>{return e?l.a.createElement(i.l,{height:4,items:[(t=Object(r.a)(e),{variant:t>=80?"success":t>=60?"warning":"danger",value:t})]}):null;var t})},1657:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3),r=a(10),c=a(303),o=a(1658);const s=i.e`
  0% { opacity: 0; }
  40% { opacity: 1; }
  100% { opacity: 0; }
`,E=i.a`
  &:nth-child(1) {
    animation: ${s} 2s 0s infinite ease-in-out;
  }

  &:nth-child(2) {
    animation: ${s} 2s -1s infinite ease-in-out;
  }
`,m=i.e`
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  33%  { opacity: 1; }
  53%  { opacity: 0; }
  100% { opacity: 0; }
`,d=i.a`
  &:nth-child(1) {
    animation: ${m} 3s -1s infinite ease-in-out;
  }

  &:nth-child(2) {
    animation: ${m} 3s -2s infinite ease-in-out;
  }

  &:nth-child(3) {
    animation: ${m} 3s 0s infinite ease-in-out;
  }
`,_=Object(i.c)("div",{shouldForwardProp:e=>"iconsLength"!==e})`
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  svg {
    max-width: 80%;
    max-height: 80%;
  }
  ${({iconsLength:e})=>2===e&&`\n  &:nth-child(1) {\n    animation: ${s} 2s 0s infinite ease-in-out;\n  }\n\n  &:nth-child(2) {\n    animation: ${s} 2s -1s infinite ease-in-out;\n  }`}

  ${({iconsLength:e})=>3===e&&`&:nth-child(1) {\n    animation: ${m} 3s -1s infinite ease-in-out;\n  }\n\n  &:nth-child(2) {\n    animation: ${m} 3s -2s infinite ease-in-out;\n  }\n\n  &:nth-child(3) {\n    animation: ${m} 3s 0s infinite ease-in-out;\n  }`}
`,u=Object(i.c)(r.X)`
  padding: 2px;
`;function b({icon:e}){const t={[c.a.DISCARDING]:r.u,[c.a.WAN]:u,[c.a.AGGREGATED]:o.a,[c.a.MIRROR]:r.K,[c.a.NETWORK]:r.Vc,[c.a.POE]:r.Tb,[c.a.POE_PLUS]:r.Pb,[c.a.POE_PLUS_PLUS]:r.Qb,[c.a.POWER_DELIVERING]:r.Tb,[c.a.HIGH_PRIORITY]:r.Ub,[c.a.SHIELD]:r.gc,[c.a.UPLINK]:r.k,[c.a.WAN_POE]:r.Mc,[c.a.WARNING]:r.a}[e];return t?l.a.createElement(t,{size:"original"}):null}t.a=(({icons:e,...t})=>{let a="";return 2===e.length?a=E:3===e.length&&(a=d),l.a.createElement(l.a.Fragment,null,e.map(n=>n&&l.a.createElement(_,Object.assign({},t,{className:a,iconsLength:e.length,key:n}),l.a.createElement(b,{icon:n}))))})},1658:function(e,t,a){"use strict";a.d(t,"a",function(){return i});var n=a(0),l=a.n(n);function i({width:e=18,height:t=18}){return l.a.createElement("svg",{width:e,height:t,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.a.createElement("path",{d:"M5.40001 4.8001C5.0688 4.8001 4.8 5.0689 4.8 5.4001C4.8 5.7313 5.0688 6.0001 5.40001 6.0001C5.7312 6.0001 6 5.7313 6 5.4001C6 5.0689 5.7312 4.8001 5.40001 4.8001ZM5.40001 3.6001C6.39361 3.6001 7.20001 4.4065 7.20001 5.4001C7.20001 6.3937 6.39361 7.2001 5.40001 7.2001C4.4064 7.2001 3.6 6.3937 3.6 5.4001C3.6 4.4065 4.4064 3.6001 5.40001 3.6001ZM5.40001 18.0001C5.0688 18.0001 4.8 18.2689 4.8 18.6001C4.8 18.9313 5.0688 19.2001 5.40001 19.2001C5.7312 19.2001 6 18.9313 6 18.6001C6 18.2689 5.7312 18.0001 5.40001 18.0001ZM5.40001 16.8001C6.39361 16.8001 7.20001 17.6065 7.20001 18.6001C7.20001 19.5937 6.39361 20.4001 5.40001 20.4001C4.4064 20.4001 3.6 19.5937 3.6 18.6001C3.6 17.6065 4.4064 16.8001 5.40001 16.8001ZM8.98595 6.0165H9.28595C10.4439 6.0165 11.3859 7.0173 11.3859 8.2449V15.7881C11.3859 17.0169 10.4439 18.0165 9.28595 18.0165H8.98595C8.65475 18.0165 8.38595 18.2853 8.38595 18.6165C8.38595 18.9477 8.65475 19.2165 8.98595 19.2165H9.28595C11.1051 19.2165 12.5859 17.6781 12.5859 15.7881V12.6005H19.6108L18.0167 14.1946C17.7823 14.4289 17.7823 14.8088 18.0167 15.0431C18.251 15.2775 18.6309 15.2775 18.8652 15.0431L21.4836 12.4248C21.7179 12.1905 21.7179 11.8106 21.4836 11.5762L18.8652 8.95787C18.6309 8.72355 18.251 8.72355 18.0167 8.95787C17.7823 9.19218 17.7823 9.57208 18.0167 9.80639L19.6104 11.4001H12.5859V8.2449C12.5859 6.3549 11.1051 4.8165 9.28595 4.8165H8.98595C8.65475 4.8165 8.38595 5.0853 8.38595 5.4165C8.38595 5.7477 8.65475 6.0165 8.98595 6.0165Z",fill:"currentColor"}))}},1659:function(e,t,a){"use strict";var n=a(0),l=a.n(n);t.a=(({strength:e,color:t,inactiveColor:a="currentColor",width:n,height:i})=>l.a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 27 26",width:n,height:i},l.a.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},l.a.createElement("rect",{fill:e>=1?t:a,x:"0",y:"16",width:"3",height:"10"}),l.a.createElement("rect",{fill:e>=2?t:a,x:"6",y:"12",width:"3",height:"14"}),l.a.createElement("rect",{fill:e>=3?t:a,x:"12",y:"8",width:"3",height:"18"}),l.a.createElement("rect",{fill:e>=4?t:a,x:"18",y:"4",width:"3",height:"22"}),l.a.createElement("rect",{fill:e>=5?t:a,x:"24",y:"0",width:"3",height:"26"}))))},1660:function(e,t,a){"use strict";a.d(t,"a",function(){return c});var n=a(750),l=a(1209),i=a(48);const r=[i.a["blue-1"],i.a["blue-2"],i.a["blue-3"],i.a["blue-light-3"],i.a["blue-light-4"],i.a["purple-2"],i.a["blue-light-2"],i.a["blue-light-5"]],c=(Object(l.b)().range(Object(n.a)(1,9).map(e=>i.a["scale-"+e])),(e=r)=>Object(l.b)(e))},1661:function(e,t,a){"use strict";a.d(t,"a",function(){return c});var n,l,i,r=a(8);!function(e){e.KEY="KEY",e.TIMESTAMP="TIMESTAMP",e.STATUS="STATUS"}(n||(n={})),function(e){e.ASCENDING="ASCENDING",e.DESCENDING="DESCENDING"}(l||(l={})),function(e){e.total_element_count="total_element_count",e.total_page_count="total_page_count",e.page_number="page_number"}(i||(i={}));const c=(e={},t={},a={})=>Object(r.p)("alerts","/v2/api/site/{site}/alert",{queryParams:{timestampFrom:e.timestampFrom,timestampTo:e.timestampTo,pageSize:250,pageNumber:0,sortByField:n.TIMESTAMP,sortDirection:(null==e?void 0:e.isAscending)?l.ASCENDING:l.DESCENDING,...e},...t},{idField:"id",additionalPayloadSelector:[i.total_element_count,i.total_page_count,i.page_number],extend:!0,compareFunction:(e,t)=>{var a,n,l,i;return(null===(a=e.queryParams)||void 0===a?void 0:a.timestampFrom)===(null===(n=t.queryParams)||void 0===n?void 0:n.timestampFrom)&&(null===(l=e.queryParams)||void 0===l?void 0:l.timestampTo)===(null===(i=t.queryParams)||void 0===i?void 0:i.timestampTo)},...a})},1662:function(e,t,a){"use strict";a.d(t,"c",function(){return c}),a.d(t,"b",function(){return o}),a.d(t,"a",function(){return s});var n=a(865),l=a(135),i=a(104),r=a(2609);const c=(e,t)=>t.has(e.id),o=(e,t)=>!Object(n.a)(t)&&Object.keys(t).every(a=>{switch(a){case"experience":return!t.experience.length||t.experience.some(t=>{const a=r.b[t];return Object(i.f)(a,e.client_wifi_experience)});default:return Object(l.a)(t[a])?t[a].includes(e[a]):void 0===e[a]||e[a]===t[a]}}),s=(e,t)=>!t||(Date.now()/1e3-e.report_timestamp)/3600<=t},1663:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(1),r=a(4),c=a(173),o=a(101),s=a(75),E=a(200),m=a(82);t.a=(({useResponsiveStyling:e=!1,useLinkWrapper:t=!1})=>{const a=Object(r.useSelector)(s.e),d=Object(n.useMemo)(()=>e?m.a:c.a,[e]),_=Object(n.useMemo)(()=>t?E.h:n.Fragment,[t]);return l.a.createElement(_,null,l.a.createElement(d,Object.assign({},e&&{styleNumber:4},{variant:"inline",href:`${o.a.releaseNotes}/${a}`,target:"_blank",rel:"noopener noreferrer"}),l.a.createElement(i.b,{id:"SHARED_RELEASE_NOTES"})))})},1664:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(1),r=a(4),c=a(173),o=a(62),s=a(82),E=a(200);t.a=(({useResponsiveStyling:e=!1,useLinkWrapper:t=!1})=>{const a=Object(r.useSelector)(o.g),m=Object(n.useCallback)(()=>{a({appId:"network"})},[a]),d=Object(n.useMemo)(()=>e?s.a:c.a,[e]),_=Object(n.useMemo)(()=>t?E.h:n.Fragment,[t]);return a?l.a.createElement(_,null,l.a.createElement(d,Object.assign({},e&&{styleNumber:4},{variant:"inline",onClick:m}),l.a.createElement(i.b,{id:"SHARED_SUBMIT_SUPPORT_TICKET"}))):null})},1672:function(e,t,a){"use strict";a.d(t,"a",function(){return g}),a.d(t,"e",function(){return C}),a.d(t,"f",function(){return h}),a.d(t,"d",function(){return T}),a.d(t,"g",function(){return f}),a.d(t,"c",function(){return R}),a.d(t,"b",function(){return D});var n=a(0),l=a.n(n),i=a(1),r=a(47),c=a(474),o=a(3),s=a(10),E=a(169),m=a(168),d=a(5),_=a(363),u=a(183),b=a(99),p=(a(428),a(1032));a(4),a(89),a(891);const O=Object(o.c)(_.a)`
  margin-right: 6px;
`,I=Object(o.c)(s.hb)`
  margin-left: 4px;
  margin-right: 10px;
`,g=1230,C=(E.a["24_HOURS"],{[p.a.TIMELINE]:"",[p.a.MAP]:p.a.MAP,[p.a.INSIGHTS]:p.a.INSIGHTS}),h=[{id:p.a.TIMELINE,label:l.a.createElement(i.b,{id:"TM_EVENT_TIMELINE"})},{id:p.a.MAP,label:l.a.createElement(i.b,{id:"TM_EVENT_MAP"})}],T={client:"",traffic:!0,threats:!0,severity:[!1,!0,!0,!0,!0],transferSizeEnabled:!1,transferSizeMin:1e6,transferSizeMax:1e9},v=(Object(o.c)(r.a,{shouldForwardProp:e=>"margin"!==e})`
  ${({margin:e})=>e?`margin: ${e};`:""}
`,Object(o.c)(c.a,{shouldForwardProp:e=>"customColor"!==e&&"noRightMargin"!==e})`
  background-color: ${({customColor:e})=>e};
  margin-right: ${({noRightMargin:e})=>e?"":"8px"};
  margin-left: 8px;
  margn-right: 4px;
`),f=[{id:"column-date",label:l.a.createElement(r.a,{color:"inherit",size:"body",weight:"bold"},l.a.createElement(i.b,{id:"COMMON_DATE_TIME"})),renderCell:({dateTime:e})=>l.a.createElement(r.a,{size:"body",color:"secondary"},e),minWidth:140},{id:"column-service",label:l.a.createElement(r.a,{color:"inherit",size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_SERVICE"})),renderCell:({service:e})=>l.a.createElement(r.a,{size:"body",color:"secondary"},e),minWidth:150},{id:"column-data-usage",label:l.a.createElement(r.a,{color:"inherit",size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_DATA_USAGE"})),renderCell:({dataUsage:e})=>l.a.createElement(r.a,{size:"body",color:"secondary"},e),minWidth:110},{id:"column-packets",label:l.a.createElement(r.a,{color:"inherit",size:"body",weight:"bold"},l.a.createElement(i.b,{id:"COMMON_WORD_PACKETS"})),renderCell:({packets:e})=>l.a.createElement(r.a,{size:"body",color:"secondary"},e),minWidth:110},{id:"column-down",label:l.a.createElement(r.a,{color:"inherit",size:"body",weight:"bold"},l.a.createElement(i.b,{id:"COMMON_WORD_DOWN"})),renderCell:({down:e})=>l.a.createElement(r.a,{size:"body",color:"secondary"},e),minWidth:110},{id:"column-up",label:l.a.createElement(r.a,{color:"inherit",size:"body",weight:"bold"},l.a.createElement(i.b,{id:"COMMON_WORD_UP"})),renderCell:({up:e})=>l.a.createElement(r.a,{size:"body",color:"secondary"},e),minWidth:110}],R=(e,t,a)=>[{id:"column-severity",renderLabel:()=>null,renderCell:({timestamp:e,inner_alert_severity:t,type:a})=>{const n=1e3*e>=(new Date).getTime()-6e4;return l.a.createElement(v,{noRightMargin:!0,variant:"honeypot"===a?"warning":m.m[t],pulsating:n})},minWidth:36},{id:"column-date",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"COMMON_DATE_TIME"})),renderCell:({timestamp:n})=>{const c=1e3*n>=(new Date).getTime()-6e4;return l.a.createElement(r.a,{size:"body",color:"secondary"},c?l.a.createElement(i.b,{id:"COMMON_NOW"}):Object(b.e)(new Date(1e3*n),e,`${t} ${a}`))},minWidth:140},{id:"column-origin",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_SOURCE_LOCATION"})),renderCell:({srcipGeo:e,usgipGeo:t,src_ip:a,type:n})=>{if("honeypot"===n)return l.a.createElement(d.a,{alignItems:"center"},!!a&&l.a.createElement(I,null),l.a.createElement(r.a,{size:"body",color:"secondary"},a||l.a.createElement(i.b,{id:"COMMON_HYPHEN"})));const c=[(null==e?void 0:e.country_name)?null==e?void 0:e.city:null==t?void 0:t.city,(null==e?void 0:e.country_name)||(null==t?void 0:t.country_name)].filter(e=>!!e).join(", ");return c?l.a.createElement(d.a,{alignItems:"center"},l.a.createElement(O,{countryCode:(null==e?void 0:e.country_code)||(null==t?void 0:t.country_code),width:24,height:24,style:{borderRadius:"50%",objectFit:"cover"}}),l.a.createElement(r.a,{size:"body",color:"secondary"},c)):l.a.createElement(r.a,{size:"body",color:"secondary"},l.a.createElement(i.b,{id:"COMMON_HYPHEN"}))},minWidth:215},{id:"column-destination",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_DESTINATION_LOCATION"})),renderCell:({dstipGeo:e,usgipGeo:t,type:a})=>{const n=[(null==e?void 0:e.country_name)?null==e?void 0:e.city:null==t?void 0:t.city,(null==e?void 0:e.country_name)||(null==t?void 0:t.country_name)].filter(e=>!!e).join(", ");return n?l.a.createElement(d.a,{alignItems:"center"},l.a.createElement(O,{countryCode:(null==e?void 0:e.country_code)||(null==t?void 0:t.country_code),width:24,height:24,style:{borderRadius:"50%",objectFit:"cover"}}),l.a.createElement(r.a,{size:"body",color:"secondary"},n)):l.a.createElement(r.a,{size:"body",color:"secondary"},l.a.createElement(i.b,{id:"COMMON_HYPHEN"}))},minWidth:215},{id:"column-service",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_SERVICE"})),renderCell:({inner_alert_signature:e,http:t,type:a,servicename:n})=>{var c;return l.a.createElement(r.a,{size:"body",color:"secondary"},"honeypot"===a?(null===(c=null==n?void 0:n.toUpperCase)||void 0===c?void 0:c.call(n))||l.a.createElement(i.b,{id:"COMMON_HYPHEN"}):(null==t?void 0:t.hostname)||e||l.a.createElement(i.b,{id:"COMMON_HYPHEN"}))},minWidth:150},{id:"column-category",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_CATEGORY"})),renderCell:({catname:e,type:t})=>l.a.createElement(r.a,{size:"body",color:"secondary"},l.a.createElement(i.b,{id:"honeypot"===t?"TM_IPS_HONEYPOT":(null===m.a||void 0===m.a?void 0:m.a[e])||"COMMON_HYPHEN"})),minWidth:140},{id:"column-activity",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_ACTIVITY"})),renderCell:({inner_alert_category:e,type:t,service:a,servicename:n=""})=>{var c;return l.a.createElement(r.a,{size:"body",color:"secondary"},"honeypot"===t?l.a.createElement(i.b,{id:"TM_IPS_HONEYPOT_ACTIVITY",values:{service:(null===(c=null==n?void 0:n.toUpperCase)||void 0===c?void 0:c.call(n))||"PORT "+a}}):e||l.a.createElement(i.b,{id:"COMMON_HYPHEN"}))},minWidth:300},{id:"column-data-usage",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_DATA_USAGE"})),renderCell:({flow:e,type:t})=>{var a,n;return l.a.createElement(r.a,{size:"body",color:"secondary"},"honeypot"===t?l.a.createElement(i.b,{id:"COMMON_HYPHEN"}):Object(u.a)((null!==(a=null==e?void 0:e.bytes_toclient)&&void 0!==a?a:0)+(null!==(n=null==e?void 0:e.bytes_toserver)&&void 0!==n?n:0)))},minWidth:110}],D=(e,t,a)=>[{id:"column-severity",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_DESTINATION_LOCATION"})),renderCell:({time:e,inner_alert_severity:t,dstipGeo:a,parent:n})=>{const c=e>=(new Date).getTime()-6e4;return n?l.a.createElement(d.a,{alignItems:"center"},(null==a?void 0:a.country_code)?l.a.createElement(O,{countryCode:a.country_code,width:24,height:24,style:{borderRadius:"50%",objectFit:"cover"}}):null,l.a.createElement(r.a,{size:"body",color:"secondary"},null==a?void 0:a.country_name)):l.a.createElement(d.a,{alignItems:"center"},l.a.createElement(v,{variant:m.m[t],pulsating:c}),l.a.createElement(r.a,{size:"body",color:"secondary"},(null==a?void 0:a.city)||l.a.createElement(i.b,{id:"COMMON_HYPHEN"})))},minWidth:215},{id:"column-date",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"COMMON_DATE_TIME"})),renderCell:({time:n,parent:c})=>{const o=n>=(new Date).getTime()-6e4;return c?null:l.a.createElement(r.a,{size:"body",color:"secondary"},o?l.a.createElement(i.b,{id:"COMMON_NOW"}):Object(b.e)(new Date(n),e,`${t} ${a}`))},minWidth:140},{id:"column-source",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_SOURCE_LOCATION"})),renderCell:({time:e,inner_alert_severity:t,srcipGeo:a,usgipGeo:n,parent:c})=>{const o=[(null==a?void 0:a.country_name)?null==a?void 0:a.city:null==n?void 0:n.city,(null==a?void 0:a.country_name)||(null==n?void 0:n.country_name)].filter(e=>!!e).join(", ");return c?null:o?l.a.createElement(d.a,{alignItems:"center"},l.a.createElement(d.a,{alignItems:"center"},l.a.createElement(O,{countryCode:(null==a?void 0:a.country_code)||(null==n?void 0:n.country_code),width:24,height:24,style:{borderRadius:"50%",objectFit:"cover"}}),l.a.createElement(r.a,{size:"body",color:"secondary"},o))):l.a.createElement(d.a,{alignItems:"center"},l.a.createElement(r.a,{size:"body",color:"secondary"},l.a.createElement(i.b,{id:"COMMON_HYPHEN"})))},minWidth:215},{id:"column-service",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_SERVICE"})),renderCell:({inner_alert_signature:e,http:t,parent:a,totalServices:n})=>a?l.a.createElement(r.a,{size:"body",color:"secondary"},n):l.a.createElement(r.a,{size:"body",color:"secondary"},(null==t?void 0:t.hostname)||e||l.a.createElement(i.b,{id:"COMMON_HYPHEN"})),minWidth:150},{id:"column-category",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_CATEGORY"})),renderCell:({catname:e,parent:t,totalCategories:a})=>t?l.a.createElement(r.a,{size:"body",color:"secondary"},a):l.a.createElement(r.a,{size:"body",color:"secondary"},l.a.createElement(i.b,{id:(null===m.a||void 0===m.a?void 0:m.a[e])||"COMMON_HYPHEN"})),minWidth:140},{id:"column-activity",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_ACTIVITY"})),renderCell:({inner_alert_category:e,parent:t})=>t?null:l.a.createElement(r.a,{size:"body",color:"secondary"},e),minWidth:300},{id:"column-data-usage",label:l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_DATA_USAGE"})),renderCell:({flow:e,parent:t,totalActivity:a})=>{var n,i;return l.a.createElement(r.a,{size:"body",color:"secondary"},Object(u.a)(t?a:(null!==(n=null==e?void 0:e.bytes_toclient)&&void 0!==n?n:0)+(null!==(i=null==e?void 0:e.bytes_toserver)&&void 0!==i?i:0)))},minWidth:110}];l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_EVENTS"})),l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_DOMAIN"})),l.a.createElement(r.a,{size:"body",weight:"bold"},l.a.createElement(i.b,{id:"TM_REQUESTS"}))},1675:function(e,t,a){"use strict";a.d(t,"a",function(){return c}),a.d(t,"b",function(){return o}),a.d(t,"c",function(){return s});var n=a(0),l=a.n(n),i=a(10),r=(a(507),a(31));const c=e=>Object.values(e).map(e=>{var t;return{mac:(null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.src_mac)||"",count:e.length,activity:e.reduce((e,{flow:t})=>{var a,n;return e+(null!==(a=null==t?void 0:t.bytes_toclient)&&void 0!==a?a:0)+(null!==(n=null==t?void 0:t.bytes_toserver)&&void 0!==n?n:0)},0)}}),o=e=>Object.values(e).map(e=>{var t,a;return{domain:(null===(a=null===(t=null==e?void 0:e[0])||void 0===t?void 0:t.http)||void 0===a?void 0:a.hostname)||"Unknown",count:e.length}}),s=(e,t)=>[{value:"",label:t.formatMessage({id:"TM_ALL_CLIENTS"}),caption:(null==e?void 0:e.length)?t.formatMessage({id:"TM_TOTAL_CLIENTS"},{count:e.length}):void 0,image:l.a.createElement(r.f,{height:38,minWidth:38,maxWidth:38,justifyContent:"center",alignItems:"center"},l.a.createElement(i.wb,{width:"24px",height:"24px"}))},...e.map(e=>({value:e.mac,label:e.name,caption:e.ip,image:l.a.createElement(r.f,{height:38,minWidth:38,maxWidth:38,justifyContent:"center",alignItems:"center"},l.a.createElement(r.c,{client:e,alt:e.name}))}))]},1676:function(e,t,a){"use strict";var n,l;a.d(t,"b",function(){return n}),a.d(t,"a",function(){return l}),function(e){e.WLAN_ESSID="wlan_essid",e.DEVICE_NAME="device_name",e.EXPERIENCE="experience"}(n||(n={})),function(e){e.DANGER="danger",e.SUCCESS="success",e.WARNING="warning"}(l||(l={}))},1677:function(e,t,a){"use strict";a.d(t,"c",function(){return i}),a.d(t,"e",function(){return r}),a.d(t,"b",function(){return s}),a.d(t,"a",function(){return E}),a.d(t,"d",function(){return m});const n="#B8CBE6",l="rgba(0,0,0,0)",i={STYLE_URL:"mapbox://styles/mapbox/light-v9",STYLE_URL_DARK:"mapbox://styles/mapbox/dark-v10",POLYGON_SOURCE_LAYER:"ne_10m_admin_0_countries-1e3h4p",POLYGON_SOURCE_URL:"mapbox://scheinerbock.9qrc7it7",GLYPH_URL:"mapbox://fonts/scheinerbock/{fontstack}/{range}.pbf"},r={blockFills:"block-fill-polygons",blockOutlines:"block-outline-polygons",countryOutlines:"country-outline-polygons",clickFills:"click-fill-polygons",clickOutlines:"click-outline-polygons"},c={type:"vector",url:i.POLYGON_SOURCE_URL};function o(e,t){return{id:e,type:"fill",source:e,"source-layer":i.POLYGON_SOURCE_LAYER,paint:t}}const s={[r.blockFills]:c,[r.blockOutlines]:c,[r.countryOutlines]:c,[r.clickFills]:c,[r.clickOutlines]:c},E=[o(r.blockFills,{"fill-opacity":["case",["==",["feature-state","blocked"],!0],1,0],"fill-pattern":"pattern"}),o(r.clickFills,{"fill-opacity":["case",["==",["feature-state","clicked"],!0],.2,0],"fill-color":"#005fdc"}),o(r.blockOutlines,{"fill-opacity":["case",["==",["feature-state","blocked"],!0],1,0],"fill-outline-color":n,"fill-color":l}),o(r.clickOutlines,{"fill-opacity":["case",["==",["feature-state","clicked"],!0],1,0],"fill-outline-color":n,"fill-color":l}),o(r.countryOutlines,{"fill-opacity":1,"fill-outline-color":"#B8CBE6","fill-color":l})],m={France:"FR",Norway:"NO","S. Sudan":"SD",Somaliland:"SO",Baikonur:"KZ","Siachen Glacier":"IN",Akrotiri:"CY","Cyprus U.N. Buffer Zone":"CY","N. Cyprus":"CY",Dhekelia:"CY"}},1684:function(e,t,a){"use strict";a.d(t,"a",function(){return r});var n=a(0),l=a.n(n),i=a(269);const r=Object(i.a)(()=>Promise.all([a.e(0),a.e(21)]).then(a.bind(null,2776)));t.b=(()=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(r,null)))},1687:function(e,t,a){"use strict";a.d(t,"b",function(){return o}),a.d(t,"c",function(){return s}),a.d(t,"a",function(){return E});var n=a(622),l=a(6),i=a(641),r=a(226);const c={[r.d.ALERT_TYPE]:{[r.a.INFO]:e=>(null==e?void 0:e.severity)===n.d.INFO,[r.a.WARNING]:e=>(null==e?void 0:e.severity)===n.d.WARNING},[r.d.CATEGORY_TYPE]:{[r.b.PERFORMANCE]:e=>(null==e?void 0:e.category)===n.b.PERFORMANCE,[r.b.SOFTWARE_UPDATE]:e=>(null==e?void 0:e.category)===n.b.SOFTWARE_UPDATE,[r.b.SYSTEM]:e=>(null==e?void 0:e.category)===n.b.SYSTEM,[r.b.TOPOLOGY]:e=>(null==e?void 0:e.category)===n.b.TOPOLOGY},[r.d.DEVICE_TYPE]:{[r.c.GATEWAY]:e=>Object(l.isGateway)(e),[r.c.SWITCH]:e=>Object(l.isSwitch)(e)&&!Object(l.isSmartPower)(e),[r.c.ACCESS_POINT]:e=>Object(l.isAp)(e)&&!Object(l.isSmartPower)(e)&&!Object(l.isUlte)(e),[r.c.SMART_POWER]:e=>Object(l.isSmartPower)(e),[r.c.BUILDING_BRIDGE]:e=>Object(l.isUBB)(e),[r.c.ULTE]:e=>Object(l.isUlte)(e)}},o=(e,t)=>{const a={};return Object.entries(e).forEach(([e,n])=>{var l;a[e]=null===(l=null==n?void 0:n.some)||void 0===l?void 0:l.call(n,a=>{var n,l,i;return null!==(i=null===(l=null===(n=c[e])||void 0===n?void 0:n[a])||void 0===l?void 0:l.call(n,t))&&void 0!==i&&i})}),Object.values(a)},s=(e,t)=>{const a=Object(i.b)(e);return!Object.values(a).length||!o(a,t).every(Boolean)},E=(e,t)=>({id:e.id,search_category:((e,t)=>{switch(!0){case c[r.d.CATEGORY_TYPE][r.b.PERFORMANCE](e):return t.formatMessage({id:"NOTIFICATIONS_TABLE_CATEGORY_PERFORMANCE"});case c[r.d.CATEGORY_TYPE][r.b.SOFTWARE_UPDATE](e):return t.formatMessage({id:"NOTIFICATIONS_TABLE_CATEGORY_SOFTWARE_UPDATE"});case c[r.d.CATEGORY_TYPE][r.b.SYSTEM](e):return t.formatMessage({id:"NOTIFICATIONS_TABLE_CATEGORY_SYSTEM"});case c[r.d.CATEGORY_TYPE][r.b.TOPOLOGY](e):return t.formatMessage({id:"NOTIFICATIONS_TABLE_CATEGORY_TOPOLOGY"});default:return""}})(e,t),search_device:((e,t)=>{switch(!0){case c[r.d.DEVICE_TYPE][r.c.GATEWAY](e):return t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_GATEWAY"});case c[r.d.DEVICE_TYPE][r.c.SWITCH](e):return t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_SWITCH"});case c[r.d.DEVICE_TYPE][r.c.ACCESS_POINT](e):return t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_ACCESS_POINT"});case c[r.d.DEVICE_TYPE][r.c.SMART_POWER](e):return t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_SMART_POWER"});case c[r.d.DEVICE_TYPE][r.c.BUILDING_BRIDGE](e):return t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_BUILDING_BRIDGE"});case c[r.d.DEVICE_TYPE][r.c.ULTE](e):return t.formatMessage({id:"NOTIFICATIONS_FILTER_DEVICE_TYPE_ULTE"});default:return""}})(e,t),search_severity:((e,t)=>{switch(!0){case c[r.d.ALERT_TYPE][r.a.INFO](e):return t.formatMessage({id:"NOTIFICATIONS_FILTER_NOTIFICATION_TYPE_INFO"});case c[r.d.ALERT_TYPE][r.a.WARNING](e):return t.formatMessage({id:"NOTIFICATIONS_FILTER_NOTIFICATION_TYPE_WARNING"});default:return""}})(e,t),search_event_text:e.event_text})},1688:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3),r=a(10),c=a(48),o=a(34),s=a(2666),E=a(651),m=a(5),d=a(47);const _=Object(i.c)(m.a)`
  min-height: 55px;
  ${({onClick:e})=>e&&"\n    &:hover {\n      cursor: pointer;\n    }\n  "}
`,u=Object(i.c)(m.a)`
  padding: 0 ${({theme:e})=>e.spacing["spacing-xs"]};
  margin-left: ${({theme:e})=>e.spacing["spacing-s"]};
  overflow: hidden;
`;var b=({children:e,device:t,displaySubtitleForSelected:a,displayInfoForSelected:n,ignoreResponsiveText:i,...r})=>{const{image:c,title:o,subtitle:s,info:E}=t;let b;n&&E?b=E:a&&s&&(b=s);const p=i?d.a:I,g=i?d.a:O;return l.a.createElement(_,Object.assign({alignItems:"center"},r),l.a.createElement(m.a,{alignItems:"center",justifyContent:"center"},c),l.a.createElement(u,{flexDirection:"column",flex:1},l.a.createElement(p,{color:"primary",weight:"bold",truncate:!0,size:"caption"},o),b&&l.a.createElement(g,{color:"tertiary",truncate:!0,size:"caption"},b)),e)};const p=Object(i.c)(m.a)`
  padding: 0 ${({theme:e})=>e.spacing["spacing-l"]};
  min-height: 55px;
  &:hover {
    background: ${({theme:e})=>e.colors.dashboardHoverBackground};
    cursor: pointer;
  }
`,O=Object(i.c)(d.a)`
  font-size: ${({theme:e})=>e.fontSize["font-size-m"]} !important;
  @media ${o.a.VIEWPORT_S_DOWN}, ${o.a.VIEWPORT_XL_UP} {
    font-size: 16px !important;
  }
`,I=Object(i.c)(d.a)`
  font-size: ${({theme:e})=>e.fontSize["font-size-m"]} !important;
  @media ${o.a.VIEWPORT_S_DOWN}, ${o.a.VIEWPORT_XL_UP} {
    font-size: 18px !important;
  }
`;var g=({device:e,selected:t,onClick:a,ignoreResponsiveText:n,...i})=>{const{image:r,title:c,subtitle:o,info:s}=e,E=n?d.a:I,_=n?d.a:O;return l.a.createElement(p,Object.assign({alignItems:"center",onClick:a},i),l.a.createElement(m.a,{alignItems:"center",justifyContent:"center"},r),l.a.createElement(u,{flexDirection:"column",flex:1},l.a.createElement(E,{color:t?"primary":"secondary",weight:"bold",truncate:!0,size:"caption"},c),!!o&&l.a.createElement(_,{color:"tertiary",truncate:!0,size:"caption"},o)),!!s&&s)};const C=Object(i.c)("div")`
  position: relative;
  width: 100%;
  user-select: none;

  @media ${o.a.VIEWPORT_M} {
    overflow: visible;
  }
`,h=Object(i.c)(m.a,{shouldForwardProp:e=>"isDropdownOpen"!==e})`
  display: ${({isDropdownOpen:e})=>e?"initial":"none"};
  border: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  border-top: 1px solid ${({theme:e})=>e.motifPalette.ui06};
  background: ${({theme:e})=>e.motifPalette.ui07};
  position: absolute;
  bottom: 0;
  width: fit-content;
  max-width: 280px;
  max-height: 200px;
  overflow-y: auto;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 15px 45px 0 rgba(21, 23, 37, 0.2);
  transform: translateY(100%);
  z-index: 10;
  &::-webkit-scrollbar {
    width: 6px;
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: ${c.a["white-7"]};
    &:hover {
      background: ${c.a["white-7"]};
    }
  }
`,T=Object(i.c)(r.f)`
  margin-left: ${({theme:e})=>e.spacing["spacing-l"]};
  color: ${({theme:e})=>e.motifPalette.icon01} !important;
  transform: rotate(${({isActive:e})=>e?90:-90}deg);
  transition: transform 200ms cubic-bezier(0.4, 0, 0, 1.3);
`;t.a=(({devices:e,selectedDevice:t,setSelectedDevice:a,displaySubtitleForSelected:i,displayInfoForSelected:r,ignoreResponsiveText:c})=>{const[o,m]=Object(n.useState)(!1),d=Object(n.useRef)(null),_=e.find(({id:e})=>e===t)||e[0];return Object(E.a)(()=>m(!1)),Object(s.a)(d,()=>m(!1)),l.a.createElement(C,{innerRef:d},l.a.createElement(b,{device:_,onClick:()=>m(!o),displaySubtitleForSelected:i,displayInfoForSelected:r,ignoreResponsiveText:c},l.a.createElement(T,{width:"12",height:"12",isActive:o})),l.a.createElement(h,{flexDirection:"column",isDropdownOpen:o},e.map(e=>l.a.createElement(g,{key:e.id,selected:e.id===t,onClick:()=>{a(e.id),m(!o)},device:e,ignoreResponsiveText:c}))))})},200:function(e,t,a){"use strict";a.d(t,"a",function(){return o}),a.d(t,"j",function(){return s}),a.d(t,"i",function(){return E}),a.d(t,"k",function(){return m}),a.d(t,"h",function(){return d}),a.d(t,"m",function(){return _}),a.d(t,"l",function(){return u}),a.d(t,"c",function(){return b}),a.d(t,"f",function(){return p}),a.d(t,"e",function(){return O}),a.d(t,"b",function(){return I}),a.d(t,"d",function(){return g}),a.d(t,"g",function(){return C});var n=a(3),l=a(10),i=a(2770),r=a(34),c=a(5);const o=Object(n.c)(c.a)`
  flex: 1;
  align-items: center;
  align-self: center;
  svg {
    height: 100%;
    padding: 12px 0 24px 0;
  }
`,s=Object(n.c)(c.a)`
  cursor: pointer;
  overflow: hidden;
  height: 200px;
  @media ${r.a.VIEWPORT_S_DOWN}, ${r.a.VIEWPORT_XL_UP} {
    height: 280px;
  }
`,E=Object(n.c)(c.a)`
  text-align: center;
`,m=Object(n.c)(l.a)`
  display: block;
  margin-bottom: 15px;
`,d=Object(n.c)(c.a)`
  line-height: 20px;
  &:not(:last-child):after {
    content: '|';
    color: ${({theme:{motifPalette:{neutral04:e}}})=>e};
    margin: 0 8px;
  }
`,_=Object(n.c)("img")`
  width: 100%;
`,u=Object(n.c)(i.a,{shouldForwardProp:e=>"isClickable"!==e})`
  height: 100%;
  margin: 0 48px;
  @media ${r.a.VIEWPORT_XS_UP} {
    margin: 0 24px;
  }
  @media ${r.a.VIEWPORT_S_UP} {
    margin: 0 32px 0 8px;
  }
  @media ${r.a.VIEWPORT_M_UP} {
    margin: 0 24px;
  }

  ${({isClickable:e})=>e&&"\n    cursor: pointer;\n  "}
`,b=Object(n.c)(c.a)`
  @media ${r.a.VIEWPORT_M_UP} {
    padding: 0 24px;
  }
  @media ${r.a.VIEWPORT_L_UP} {
    font-size: ${({theme:e})=>e.fontSize["font-size-body"]};
  }
`,p=Object(n.c)(c.a)`
  margin-top: 12px;
`,O=Object(n.c)(b)`
  margin-bottom: 4px;
  @media ${r.a.VIEWPORT_XS_UP} {
    margin-bottom: 8px;
  }
  @media ${r.a.VIEWPORT_S_UP} {
    margin-bottom: 2px;
  }
  @media ${r.a.VIEWPORT_M_UP} {
    margin-bottom: 4px;
  }
  @media ${r.a.VIEWPORT_XXXL_UP} {
    margin-bottom: 8px;
  }
`,I=Object(n.c)(c.a)`
  padding: 0 16px 16px;
  @media ${r.a.VIEWPORT_XS_UP} {
    padding: 0 24px 24px;
  }
  @media ${r.a.VIEWPORT_S_UP} {
    padding: 0 0 16px 0;
  }
  @media ${r.a.VIEWPORT_L_UP} {
    padding: 0 0 24px 0;
  }
`,g=Object(n.c)(c.a)`
  @media ${r.a.VIEWPORT_S_UP} {
    flex-direction: row;
  }
  @media ${r.a.VIEWPORT_M_UP} {
    flex-direction: column;
  }
`,C=Object(n.c)(c.a)`
  margin-bottom: 4px;
  @media ${r.a.VIEWPORT_XXL_UP} {
    margin-bottom: 8px;
  }
`},208:function(e,t,a){"use strict";var n=a(3),l=a(0),i=a.n(l),r=a(173),c=a(185);const o=Object(n.c)("footer",{shouldForwardProp:e=>"hasFormResetButton"!==e})`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: 30px;
`,s=Object(n.c)(r.a)`
  font-weight: normal;
`;t.a=(({allowCancel:e,isDirty:t,isInvalid:a,onFormSubmit:n,onFormReset:l,onFormCancel:r,className:E,submitButtonText:m})=>i.a.createElement(o,{className:E,hasFormResetButton:!!l},i.a.createElement(s,{name:"cancel",variant:"tertiary",type:"button",onClick:r,disabled:!e&&!t},i.a.createElement(c.a,{message:"COMMON_ACTION_CANCEL"})),l&&i.a.createElement(s,{name:"reset",variant:"tertiary",type:"button",pill:!1,onClick:l,disabled:!t},i.a.createElement(c.a,{message:"COMMON_ACTION_RESET_TO_DEFAULTS"})),i.a.createElement(s,{name:"submit",variant:"primary",type:"submit",pill:!1,onClick:n,disabled:!t||a},i.a.createElement(c.a,{message:m||"COMMON_ACTION_APPLY_CHANGES"}))))},226:function(e,t,a){"use strict";var n,l,i,r;a.d(t,"d",function(){return n}),a.d(t,"a",function(){return l}),a.d(t,"b",function(){return i}),a.d(t,"c",function(){return r}),function(e){e.ALERT_TYPE="alert_type",e.CATEGORY_TYPE="category_type",e.DEVICE_TYPE="device_type"}(n||(n={})),function(e){e.INFO="info",e.WARNING="warning"}(l||(l={})),function(e){e.SYSTEM="SYSTEM",e.PERFORMANCE="PERFORMANCE",e.SOFTWARE_UPDATE="SOFTWARE_UPDATE",e.TOPOLOGY="TOPOLOGY"}(i||(i={})),function(e){e.GATEWAY="gateway",e.SWITCH="switch",e.ACCESS_POINT="access_point",e.SMART_POWER="smart_power",e.BUILDING_BRIDGE="building_bridge",e.ULTE="ulte"}(r||(r={}))},235:function(e,t,a){"use strict";var n,l,i;a.d(t,"c",function(){return n}),a.d(t,"a",function(){return l}),a.d(t,"b",function(){return i}),function(e){e.ELEMENTS="elements",e.STATUS="status"}(n||(n={})),function(e){e.GATEWAY="gateway",e.SWITCH="switch",e.ACCESS_POINT="access_point",e.SMART_POWER="smart_power",e.BUILDING_BRIDGE="building_bridge",e.ULTE="ulte"}(l||(l={})),function(e){e.ONLINE="online",e.OFFLINE="offline",e.ISOLATED="isolated",e.PENDING_ADOPTION="pending_adoption",e.MANAGED_BY_ANOTHER_CONSOLE="managed_by_another_console"}(i||(i={}))},2603:function(e,t,a){"use strict";a.d(t,"a",function(){return c}),a.d(t,"c",function(){return o}),a.d(t,"b",function(){return s});var n=a(194),l=a(285),i=a(123),r=a(66);const c={[a(2633).a.RADIO]:[r.b.RADIO_NA,r.b.RADIO_NG]},o=Object(l.b)(n.a.WIFI_SCANNER,i.a.WIFI_SCANNER,c),s=Object(l.a)(n.a.WIFI_SCANNER)},2604:function(e,t,a){"use strict";var n=a(25),l=a(0),i=a.n(l),r=a(3),c=a(2769),o=a(4),s=a(1018),E=a(362),m=a(651),d=a(62),_=a(84),u=a(92),b=a(57),p=a(59);const O=(e,t)=>{if(!e)return null;if(t===u.c.DEVICE)return Object(b.De)(e)?u.b.USPP:Object(b.Ee)(e)?u.b.USPS:Object(b.re)(e)?u.b.LTE:Object(b.Be)(e)?u.b.USPPDUP:Object(b.He)(e)?u.b.UXG:Object(b.ne)(e)||Object(b.oe)(e)?u.b.UDMPRO:Object(b.ze)(e)?u.b.USAGGPRO:Object(b.T)(e)?u.b.UAP_IW:Object(b.db)(e)?u.b.USL8MP:Object(b.Yd)(e)?u.b.UAP6MP:Object(b.eb)(e)?u.b.USPRPS:Object(b.Ce)(e)?u.b.USPRPSP:Object(b.ge)(e)?u.b.UBBXG:Object(b.qe)(e)?u.b.UDW:(e=>(_.deviceModels[e.model]||{hybrid:void 0}).hybrid||e.type)(e);if(t===u.c.CLIENT)switch(e.type){case p.c.WIRED:case p.c.WIRELESS:return u.a.CLIENT;case p.c.TELEPORT:return u.a.TELEPORT;default:return null}return t};var I=a(866),g=a(491),C=a(76),h=a(227),T=a(256),v=a(47),f=a(10),R=a(1),D=a(29),S=a(5),y=a(108),P=a(218),A=a(737),N=a(891),j=({data:{client_icon_device_id:e,client_icon_engine_id:t,client_name:a},name:n,withName:l=!1,width:r,height:c})=>{const o=l?N.a:P.a;return i.a.createElement(o,{client:{fingerprint:{dev_id:e,computed_engine:t},name:n||a,is_wired:!1},alt:n,width:r,height:c,topology:!0})},x=a(162),L=a(46),V=a(126),M=a(49),w=a(2621);const F=Object(r.c)("div")`
  margin-left: 8px;
`,U=Object(r.c)(v.a)`
  max-width: 200px;
`,k=Object(r.c)(v.a)`
  margin-left: 8px;
`,W=Object(r.c)(v.a)`
  margin-left: 8px;
`,B=Object(r.c)(S.a)`
  height: 25px;
  width: 25px;
  justify-content: center;
  align-items: center;
  position: relative;
`,z=Object(r.c)(A.a)`
  margin-right: 8px;
`,H=Object(r.c)(f.Rc)`
  margin-left: 8px;
`,G=({activeItem:{data:e}})=>{const t=Object(x.f)(e);return i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(B,null,(()=>{switch(e.type){case p.c.TELEPORT:return i.a.createElement(w.a,{type:"teleport"});case p.c.WIRED:case p.c.WIRELESS:default:return i.a.createElement(P.a,{client:e,alt:e.name})}})()),i.a.createElement(F,null,i.a.createElement(U,{size:"body",weight:"bold",truncate:!0},t)))},$=i.a.memo(({activeItem:e})=>{var t,a;return i.a.createElement(S.a,{alignItems:"center"},Object(b.Ec)(e.data)&&i.a.createElement(z,{width:30,height:30}),i.a.createElement(B,null,i.a.createElement(y.c,{device:e.data})),i.a.createElement(F,null,i.a.createElement(U,{size:"body",weight:"bold",truncate:!0},Object(L.d)(e.data))),(null===(t=e.data)||void 0===t?void 0:t.model_in_eol)&&i.a.createElement(k,{color:"danger",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_LABEL_EOL"})),(null===(a=e.data)||void 0===a?void 0:a.model_in_lts)&&i.a.createElement(k,{color:"warning",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_LABEL_LTS"})),Object(b.Pd)(e.data)&&i.a.createElement(H,{size:"medium",isActive:!0}))},(e,t)=>{var a,n,l,i;return(null===(a=e.activeItem.data)||void 0===a?void 0:a.mac)===(null===(n=t.activeItem.data)||void 0===n?void 0:n.mac)&&(null===(l=e.activeItem.data)||void 0===l?void 0:l.name)===(null===(i=t.activeItem.data)||void 0===i?void 0:i.name)}),Y=({activeItem:{data:e,data:{client_name:t}}})=>i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(B,null,i.a.createElement(j,{data:e,width:25,height:25})),i.a.createElement(F,null,i.a.createElement(U,{size:"body",weight:"bold",truncate:!0},t))),X=()=>{const e=Object(o.useSelector)(V.a);return i.a.createElement(S.a,{alignItems:"center"},i.a.createElement("img",{alt:"IPS Event",src:e+"/ipsEvent.png"}),i.a.createElement(W,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"TM_IPS_IDS_ALERT"})))},K=({activeItem:{data:e}})=>{const t=Object(o.useSelector)(M.y);return i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(W,{weight:"bold",size:"body"},i.a.createElement(R.a,{id:"TM_TRAFFIC_FROM_TO",values:{formattedDate:`${Object(D.format)(e.start_timestamp,t)} - ${Object(D.format)(e.end_timestamp,t)}`}})))},Z=()=>i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(f.ib,null),i.a.createElement(W,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"TM_HONEYPOT_ALERT"})));var q=({activeItem:e})=>{switch(e.type){case u.c.CLIENT:case u.c.UNIFI_DEVICE_CLIENT:return i.a.createElement(G,{activeItem:e});case u.c.DEVICE:return i.a.createElement($,{activeItem:e});case u.c.WIFI_MAN:return i.a.createElement(Y,{activeItem:e});case u.c.ISP_DETAILS:return i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(f.H,{width:25.25,height:25.25}),i.a.createElement(W,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_INTERNET"})));case u.c.THREAT_EVENT:return i.a.createElement(X,null);case u.c.TRAFFIC_STATS:return i.a.createElement(K,{activeItem:e});case u.c.HONEYPOT_ALERT:return i.a.createElement(Z,null);default:return null}},J=a(2803);const Q=Object(r.c)("div")`
  position: relative;
`;var ee=({history:e,match:{params:{site:t,id:a,panel:n,page:l,subPage:r,subPageId:c,subSubPageId:s}},tabs:E})=>{const m=Object(o.useSelector)(Object(d.j)(t));return(null==E?void 0:E.length)?i.a.createElement(Q,null,i.a.createElement(J.a,{tabs:E,selectedTab:n,onSelectTab:t=>e.push(`${m}/${l}/${r?r+"/":""}${c?c+"/":""}${s?s+"/":""}properties/${a}/${t.id}`)})):null},te=a(115),ae=a(1659),ne=a(206),le=a(31);const ie=Object(r.c)(le.f)`
  background-color: ${te.o.success};
  color: ${te.f};
  font-size: 11px;
`,re=Object(r.c)("div")`
  font-weight: bold;
  margin-bottom: 4px;
`;var ce=({activeItem:e})=>{if("model"in e&&!(e=>"product_line"in e&&e.product_line!==ne.c.NETWORK)(e)&&Object(b.re)(e)&&Object(b.ve)(e)){const t=Object(b.rc)(e);return i.a.createElement(ie,{flex:"none",height:"50px",minHeight:"50px",padding:"8px 32px",position:"relative"},i.a.createElement(le.f,{alignItems:"center",justifyContent:"center",marginRight:16},i.a.createElement(ae.a,{width:18,height:18,strength:t,color:"currentColor",inactiveColor:te.e})),i.a.createElement(le.f,{flexDirection:"column",justifyContent:"center",flex:"1"},i.a.createElement(re,null,i.a.createElement(R.b,{id:"DEVICE_ULTE_IS_ACTIVE_TITLE"})),i.a.createElement(R.b,{id:"DEVICE_ULTE_IS_ACTIVE_DETAILS"})))}return null},oe=a(173),se=a(158),Ee=a(56),me=a(8),de=a(27);const _e="/api/s/{site}/cmd/stamgr",ue=(e,t,a={})=>Object(me.o)(Ee.a.KICK_STA,_e,{mac:e},{...Object(de.a)("CLIENT_ACTIONS_RECONNECT_ERROR","CLIENT_ACTIONS_RECONNECT_NOTICE",{clientName:t}),...a});var be=a(79),pe=a(35);const Oe=Object(r.c)(le.f)`
  padding: 24px 32px 0;
`,Ie=Object(r.c)("div")`
  margin-bottom: 16px;
  button {
    font-size: ${({theme:e})=>e.fontSize["font-size-body"]};
    font-weight: 700;
  }
`;var ge=({activeItem:e,dispatch:t})=>{var a,n;const r=null!==(n=null===(a=Object(o.useSelector)(M.C))||void 0===a?void 0:a.offlineClientTimeframe)&&void 0!==n?n:p.d.DAY,c=e.connected&&e.type===p.c.WIRELESS,s=e.connected&&Object(x.q)(e),E="authorized"in e&&e.authorized,m=s&&!1===E,d=s&&E,_=Object(l.useCallback)(e=>{const{connected:a}=e,n=Object(x.f)(e),l=["mac"in e&&e.mac];l&&t(Object(be.a)({title:"CLIENT_ACTIONS_FORGET_CONFIRM_TITLE",titleValues:{clientName:n},message:"CLIENT_ACTIONS_FORGET_CONFIRM_MESSAGE",messageValues:{clientName:n},onConfirm:()=>{t(((e,t,a={})=>Object(me.o)(Ee.a.FORGET_STA,_e,{macs:e},{...Object(de.a)("CLIENT_ACTIONS_FORGET_ERROR","CLIENT_ACTIONS_FORGET_NOTICE",{clientName:t}),...a}))(l,n)).then(()=>t(Object(pe.e)())).then(()=>t(Object(se.c)(l[0],a?p.a.ACTIVE:p.a.OFFLINE)))}}))},[t]),u=Object(l.useCallback)(e=>{const{connected:a}=e,n="mac"in e&&e.mac,l=Object(x.f)(e);n&&t(Object(be.a)({title:"CLIENT_ACTIONS_BLOCK_CONFIRM_TITLE",titleValues:{clientName:l},message:"CLIENT_ACTIONS_BLOCK_CONFIRM_MESSAGE",messageValues:{clientName:l},onConfirm:()=>{t(((e,t,a={})=>Object(me.o)(Ee.a.BLOCK_STA,_e,{mac:e},{...Object(de.a)("CLIENT_ACTIONS_BLOCK_ERROR","CLIENT_ACTIONS_BLOCK_NOTICE",{clientName:t}),...a}))(n,l)).then(()=>t(Object(pe.e)())).then(()=>{t(Object(se.c)(n,a?p.a.ACTIVE:p.a.OFFLINE)),t(Object(se.e)()),t(Object(se.h)({queryParams:{withinHours:r}}))})}}))},[t,r]),b=Object(l.useCallback)(e=>{const a="mac"in e&&e.mac,n=Object(x.f)(e);t(Object(be.a)({title:"CLIENT_ACTIONS_UNBLOCK_CONFIRM_TITLE",titleValues:{clientName:n},message:"CLIENT_ACTIONS_UNBLOCK_CONFIRM_MESSAGE",messageValues:{clientName:n},onConfirm:()=>{t(((e,t,a={})=>Object(me.o)(Ee.a.UNBLOCK_STA,_e,{mac:e},{...Object(de.a)("CLIENT_ACTIONS_UNBLOCK_ERROR","CLIENT_ACTIONS_UNBLOCK_NOTICE",{clientName:t}),...a}))(a,n)).then(()=>t(Object(pe.e)())).then(()=>{t(Object(se.c)(a,p.a.BLOCKED)),t(Object(se.h)({queryParams:{withinHours:r}})),t(Object(se.e)())})}}))},[t,r]),O=Object(l.useCallback)(e=>{const a=Object(x.f)(e),n="mac"in e&&e.mac;t(ue(n,a))},[t]),I=Object(l.useCallback)(e=>{const a=Object(x.f)(e),n="mac"in e&&e.mac;t(((e,t,a={})=>Object(me.o)(Ee.a.AUTHORIZE_GUEST,_e,{mac:e},{...Object(de.a)("CLIENT_ACTIONS_AUTHORIZE_ERROR","CLIENT_ACTIONS_AUTHORIZE_NOTICE",{clientName:t}),...a}))(n,a))},[t]),g=Object(l.useCallback)(e=>{const a=Object(x.f)(e),n="mac"in e&&e.mac;t(((e,t,a={})=>Object(me.o)(Ee.a.UNAUTHORIZE_GUEST,_e,{mac:e},{...Object(de.a)("CLIENT_ACTIONS_UNAUTHORIZE_ERROR","CLIENT_ACTIONS_UNAUTHORIZE_NOTICE",{clientName:t}),...a}))(n,a))},[t]);return i.a.createElement(le.a,null,i.a.createElement(Oe,{flexDirection:"column"},c&&i.a.createElement(Ie,null,i.a.createElement(oe.a,{variant:"inline",onClick:()=>O(e)},i.a.createElement(v.a,{size:"body",weight:"bold",color:"info"},i.a.createElement(R.b,{id:"COMMON_ACTION_RECONNECT"})))),m&&i.a.createElement(Ie,null,i.a.createElement(oe.a,{variant:"inline",onClick:()=>I(e)},i.a.createElement(v.a,{size:"body",weight:"bold",color:"info"},i.a.createElement(R.b,{id:"COMMON_ACTION_AUTHORIZE"})))),d&&i.a.createElement(Ie,null,i.a.createElement(oe.a,{variant:"inline",onClick:()=>g(e)},i.a.createElement(v.a,{size:"body",weight:"bold",color:"info"},i.a.createElement(R.b,{id:"COMMON_ACTION_UNAUTHORIZE"})))),e.blocked?i.a.createElement(Ie,null,i.a.createElement(oe.a,{variant:"inline",onClick:()=>b(e)},i.a.createElement(v.a,{size:"body",weight:"bold",color:"info"},i.a.createElement(R.b,{id:"COMMON_ACTION_UNBLOCK"})))):i.a.createElement(Ie,null,i.a.createElement(oe.a,{variant:"inline",onClick:()=>u(e)},i.a.createElement(v.a,{size:"body",weight:"bold",color:"danger"},i.a.createElement(R.b,{id:"COMMON_ACTION_BLOCK"})))),i.a.createElement(Ie,null,i.a.createElement(oe.a,{variant:"inline",onClick:()=>_(e)},i.a.createElement(v.a,{size:"body",weight:"bold",color:"danger"},i.a.createElement(R.b,{id:"COMMON_ACTION_FORGET"}))))))},Ce=a(6),he=a(1106),Te=a(625);const ve=Object(r.c)(v.a)`
  line-height: 16px;
`;var fe=({deviceModel:e})=>{const t=Object(o.useDispatch)();return i.a.createElement(oe.a,{variant:"inline",onClick:()=>t(Object(Te.c)(e)),iconPosition:"right"},i.a.createElement(S.a,null,i.a.createElement(ve,{size:"label",weight:"bold",color:"info"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_COMPLIANCE"}))))},Re=a(138),De=a.n(Re),Se=a(1132),ye=a(32),Pe=a(124),Ae=a(271),Ne=a(647),je=a(18),xe=a(246),Le=a(272),Ve=a(251),Me=a(14),we=a(187),Fe=a(23),Ue=a(306),ke=a(20),We=a(85),Be=a(74);const ze=Object(r.c)(Be.a,{shouldForwardProp:e=>"disabled"!==e})`
  padding: 0;
  ${({disabled:e})=>e&&"pointer-events: none;"};
  color: ${({theme:e,disabled:t})=>t?e.motifPalette.red05:e.motifPalette.red06};

  &:hover {
    color: ${({theme:e,disabled:t})=>e.motifPalette.red05};
  }

  &:active {
    color: ${({theme:e,disabled:t})=>t?e.motifPalette.red05:e.motifPalette.red07};
  }
`;var He=Object(n.o)(({device:e,history:t,location:a})=>{const n=Object(o.useDispatch)(),[r,c]=Object(l.useState)(!1),s=Object(o.useSelector)(ke.s),E=Object(l.useCallback)(l=>{l.preventDefault(),l.stopPropagation(),n(Object(Ce.confirmDeviceForget)({name:Object(L.d)(e),onConfirm:async()=>{c(!0);try{await n(Object(Ue.b)(e.mac)),n(Object(We.deleteUnifiDeviceFromStore)(e.mac)),n(Object(Ce.deleteDeviceFromStore)(e.mac)),c(!1),n(Object(C.f)()),t.push(a.pathname.split("/properties")[0])}catch(e){c(!1)}},onCancel:()=>{n(Object(pe.e)()),c(!1)}}))},[e.mac,e.name,n,t,a.pathname]);return i.a.createElement(ze,{disabled:s,variant:"link",onClick:E,loader:r?"spinner":null,type:"button"},i.a.createElement(R.b,{id:"COMMON_ACTION_FORGET"}))}),Ge=a(11),$e=a(325);const Ye=Object(r.c)(v.a)`
  line-height: 20px;
`;var Xe=()=>i.a.createElement($e.a,{level:"danger"},i.a.createElement(Ye,{size:"caption"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_ADOPT_ERROR_CREDENTIALS_MESSAGE"})));const Ke=Object(r.c)("div")`
  margin-bottom: 32px;
`;var Ze=()=>i.a.createElement(Ke,null);const qe=Object(r.c)(v.a)`
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
`,Je=Object(r.c)("div")`
  margin-bottom: ${e=>e.marginBottom||0}px;
`,Qe=Object(r.c)(oe.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  padding: 0 ${({theme:e})=>e.space[3]}px;
  line-height: 14px;
  white-space: nowrap;
`,et={username:"",password:""};var tt=Object(Me.f)({mapPropsToValues:()=>et,validationSchema:Fe.a.object().shape({username:Fe.a.string().label("DEVICE_ADVANCED_ADOPTION_FORM_LABEL_USERNAME").required(),password:Fe.a.string().label("DEVICE_ADVANCED_ADOPTION_FORM_LABEL_PASSWORD").required()}),handleSubmit:(e,{props:{onSubmitAction:t}})=>{t({values:e})}})(({device:e,handleSubmit:t,isValid:a,dirty:n})=>{const r=!!(null==e?void 0:e.adoptable_when_upgraded),{adopt_state:c}=e,s=c===Ce.AdoptState.ADOPT_LOGINFAIL,E=Object(Ce.getDeviceState)(e),m=E===Ce.DeviceState.ADOPTION_FAILED,[d,_]=Object(l.useState)(E===Ce.DeviceState.ADOPTING),u=Object(o.useSelector)(we.f),b=Object(Ce.isUlte)(e),p=Object(Ce.isUBB)(e)&&!Object(Ce.getIsUbbPeerAdoptable)(e),O=d||b&&!u||p;Object(l.useEffect)(()=>{_(E===Ce.DeviceState.ADOPTING)},[E]);const I=()=>{a&&n&&(t(),_(!0))};return i.a.createElement("form",{autoComplete:"off",onSubmit:I},i.a.createElement(qe,{weight:"bold",color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_ADVANCED_ADOPTION_FORM_HEADER"})),s&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Xe,null),i.a.createElement(Ze,null)),i.a.createElement(Je,{marginBottom:24},i.a.createElement(Ge.Field,{name:"username",label:"DEVICE_ADVANCED_ADOPTION_FORM_LABEL_USERNAME",full:!0})),i.a.createElement(Je,{marginBottom:24},i.a.createElement(Ge.Field,{name:"password",type:"password",label:"DEVICE_ADVANCED_ADOPTION_FORM_LABEL_PASSWORD",full:!0})),i.a.createElement(S.a,{justifyContent:m?"space-between":"flex-end"},m&&i.a.createElement(He,{device:e}),i.a.createElement(Qe,{type:"submit",onClick:I,disabled:O||!a||!n,variant:"primary"},i.a.createElement(R.b,{id:r?"DEVICE_ACTIONS_ADOPT_AND_UPGRADE":"DEVICE_ACTIONS_ADOPT"}))))});const at=Object(r.c)(v.a)`
  line-height: 20px;
  margin-bottom: 10px;
`;var nt=()=>i.a.createElement($e.a,{level:"warning"},i.a.createElement(at,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_ACTIONS_ADOPT_WARNING_MESSAGE"})));const lt=Object(r.c)(v.a)`
  line-height: 20px;
`;var it=()=>i.a.createElement($e.a,{level:"info"},i.a.createElement(lt,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_ADVANCED_ADOPTION_MESSAGE_CREDENTIALS_INFO"})));const rt=Object(r.c)(v.a)`
  line-height: 20px;
  vertical-align: top;
`,ct=Object(r.c)("ul")`
  margin: 20px 0;
  padding-left: 18px;
  line-height: 20px;
`;var ot=()=>i.a.createElement($e.a,{level:"info"},i.a.createElement(rt,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_ADVANCED_ADOPTION_MESSAGE_READOPT_INFO_HEADER"})),i.a.createElement(ct,null,i.a.createElement("li",null,i.a.createElement(rt,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_ADVANCED_ADOPTION_MESSAGE_READOPT_INFO_P1"}))),i.a.createElement("li",null,i.a.createElement(rt,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_ADVANCED_ADOPTION_MESSAGE_READOPT_INFO_P2"}))),i.a.createElement("li",null,i.a.createElement(rt,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_ADVANCED_ADOPTION_MESSAGE_READOPT_INFO_P3"})))),i.a.createElement(rt,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_ADVANCED_ADOPTION_MESSAGE_READOPT_INFO_SUMMARY"})));const st=Object(r.c)(v.a)`
  line-height: 16px;
  margin-bottom: 10px;
`;var Et=()=>i.a.createElement($e.a,{level:"warning"},i.a.createElement(st,{size:"caption"},i.a.createElement(R.b,{id:"DEVICE_ULTE_USG_REQUIRED"})));const mt=Object(r.c)(v.a)`
  line-height: 16px;
  margin-bottom: 10px;
`;var dt=()=>i.a.createElement($e.a,{level:"warning"},i.a.createElement(mt,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_UBB_ADOPT_WARNING_MESSAGE"})));const _t=Object(r.c)(oe.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  padding: 0 ${({theme:e})=>e.space[3]}px;
  line-height: 14px;
  white-space: nowrap;
`;var ut=Object(R.e)(({device:e,showForNonAdoptableGateway:t,intl:a,buttonProps:{...r}={}})=>{const c=Object(o.useSelector)(M.q)("API_DEVICE_ADOPT"),s=Object(o.useSelector)(Pe.u),E=Object(o.useSelector)(Ne.e),m=Object(o.useSelector)(V.a),d=Object(o.useDispatch)(),_=Object(n.k)(),u=Object(b.H)(e),p=u===ye.f.ADOPTION_FAILED,O=Object(l.useMemo)(()=>Object(b.Nc)(e),[e]),I=Object(l.useMemo)(()=>Object(b.Mc)(e),[e.mac]),g=Object(l.useMemo)(()=>Object(b.Oc)(e),[e.mac]),C=!!(null==e?void 0:e.adoptable_when_upgraded),h=Object(b.kd)(e)&&!Object(b.ld)(s,e),T=Object(b.re)(e),v=T&&!Object(b.se)(s,e),f=T&&!(null==e?void 0:e.lte_imei),D=!O&&(I||g)&&c&&!(v||h&&!t),[P,A]=Object(l.useState)(u===ye.f.ADOPTING),[N,j]=Object(l.useState)(!1),x=T&&!E,L=Object(b.Td)(e)&&!Object(b.ab)(e),w=Object(xe.a)("wifi/network/form"),F=P||x||L,U=Object(o.useSelector)(Le.b),k=Object(o.useSelector)(Ve.f);Object(l.useEffect)(()=>{A(u===ye.f.ADOPTING)},[u]),Object(l.useEffect)(()=>{j(!1)},[e.mac]);const W=t=>{function n(){T?(d(Object(Te.d)(e.mac,Object(b.we)(e)?"LTE_PRO_ADOPTION":"LTE_ADOPTION")),A(!1)):function(){if(e.discovered_by===Se.a.PROTOCOL_V2_ID)A(!1);else{if(g){const{values:a}=t;d(Object(Ae.b)(e,a)).then(A(!0))}else d(Object(Ae.a)(e)).then(A(!0));if(Object(b.Id)(e)){const t=De()();U||d(Object(je.a)({icon:i.a.createElement("div",null,i.a.createElement(y.b,{deviceType:null==e?void 0:e.type,deviceModel:null==e?void 0:e.model,publicImagePath:m,width:53,height:53})),title:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_TITLE",message:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_MESSAGE",primaryButton:{label:a.formatMessage({id:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_ACTION"}),onClick:()=>{_.push(w),d(Object(je.b)(t))}},translateTitle:!0},t)),k&&d(Object(je.a)({icon:i.a.createElement("div",null,i.a.createElement(y.b,{deviceType:null==e?void 0:e.type,deviceModel:null==e?void 0:e.model,publicImagePath:m,width:53,height:53})),title:a.formatMessage({id:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_AP_GROUP_NOT_DEFAULT_TITLE"},{deviceName:null==e?void 0:e.hostname}),message:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_AP_GROUP_NOT_DEFAULT_MESSAGE",primaryButton:{label:a.formatMessage({id:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_ACTION"}),onClick:()=>{_.push(w),d(Object(je.b)(t))}},translateTitle:!0},t))}}}()}function l(){const{elite:t}=e;if(t&&t.replacement_for_mac){const e=s.find(e=>e.mac===t.replacement_for_mac);d(Object(be.a)({title:"DEVICE_APPLY_CONFIGURATION_HEADER",titleValues:{deviceName:e.name},message:"DEVICE_APPLY_CONFIGURATION_MESSAGE",messageValues:{deviceName:e.name},size:"small",onConfirm:()=>{d(Object(pe.e)())},onCancel:()=>{d(Object(pe.e)()),n()}}))}else n()}C?d(Object(be.a)({title:"DEVICE_ACTIONS_ADOPT_AND_UPGRADE_CONFIRM_TITLE",titleValues:{deviceName:e.name},message:e.upgrade_to_firmware?"DEVICE_ACTIONS_ADOPT_AND_UPGRADE_CONFIRM_VERSION_MESSAGE":"DEVICE_ACTIONS_ADOPT_AND_UPGRADE_CONFIRM_MESSAGE",messageValues:{fromVersion:e.version,toVersion:e.upgrade_to_firmware},size:"small",onConfirm:()=>{d(Object(pe.e)()),l()},onCancel:()=>{d(Object(pe.e)()),A(!1)}})):l()};return!D||f?null:i.a.createElement(S.a,{flexDirection:"column"},x&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Et,null),i.a.createElement(Ze,null)),L&&i.a.createElement(i.a.Fragment,null,i.a.createElement(dt,null),i.a.createElement(Ze,null)),p&&!g&&i.a.createElement(i.a.Fragment,null,i.a.createElement(nt,null),i.a.createElement(Ze,null)),g&&!N&&i.a.createElement(i.a.Fragment,null,i.a.createElement(ot,null),i.a.createElement(Ze,null)),g&&N&&i.a.createElement(i.a.Fragment,null,i.a.createElement(it,null),i.a.createElement(Ze,null),i.a.createElement(tt,{device:e,onSubmitAction:W}),i.a.createElement(Ze,null)),I&&i.a.createElement(S.a,{justifyContent:p?"space-between":"flex-end"},p&&i.a.createElement(He,{device:e}),i.a.createElement(_t,Object.assign({variant:"primary",onClick:e=>{e.preventDefault(),e.stopPropagation(),W()},disabled:F},r),i.a.createElement(R.b,{id:C?"DEVICE_ACTIONS_ADOPT_AND_UPGRADE":"DEVICE_ACTIONS_ADOPT"}))),g&&!N&&i.a.createElement(S.a,{justifyContent:p?"space-between":"flex-end"},p&&i.a.createElement(He,{device:e}),i.a.createElement(_t,{variant:"primary",onClick:()=>j(!0)},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_ADVANCED_ADOPTION"}))))});const bt=Object(r.c)(le.f)`
  padding: 0 32px;
`,pt=Object(r.c)(le.f)`
  margin: 0 32px;
  padding: 14px;
  background: ${({theme:e})=>e.motifPalette.neutral01};
  border-radius: 4px;

  > svg {
    margin-right: 12px !important;
  }
`,Ot=Object(r.c)(le.f)`
  padding: 24px 32px 0;
`,It=Object(r.c)(le.f)`
  margin-bottom: 16px;
`;var gt=({activeItem:e})=>{var t;const a=Object(Ce.isGateway)(e),n=Object(o.useSelector)(Ce.selectSiteGateway),r=Object(Ce.isNonRemovableGateway)(n),c=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]),s=null===(t=_.deviceModels[e.model])||void 0===t?void 0:t.compliance;return c?i.a.createElement(Ot,{flexDirection:"column"},i.a.createElement(It,{justifyContent:"space-between"},i.a.createElement(he.a,{device:e,size:"body"}),s&&i.a.createElement(fe,{deviceModel:e.model}))):i.a.createElement(i.a.Fragment,null,a&&i.a.createElement(pt,null,i.a.createElement(f.cb,{isActive:!0,size:"original",variant:"fill"}),i.a.createElement(v.a,{size:"caption"},i.a.createElement(R.a,{id:r?"DEVICE_ADOPT_SECOND_GATEWAY_WHEN_UDM_USED_INFO":"DEVICE_ADOPT_SECOND_GATEWAY_INFO",values:{gateway:Object(L.d)(n)}}))),i.a.createElement(bt,{justifyContent:"flex-end"},i.a.createElement(ut,{device:e})))},Ct=a(853);const ht=Object(r.c)("div")`
  margin-bottom: 16px;
  button {
    font-size: ${({theme:e})=>e.fontSize["font-size-body"]};
    font-weight: 700;
  }
`,Tt=Object(r.c)(v.a,{shouldForwardProp:e=>"isPending"!==e})`
  ${({isPending:e,theme:t})=>e&&"color: "+t.motifPalette.blueDisabled};
`;var vt;(vt||(vt={})).RECONNECTION="reconnection";const ft=({actionPending:e,onClick:t,label:a})=>i.a.createElement(ht,null,i.a.createElement(oe.a,{variant:"inline",disabled:e,onClick:t},i.a.createElement(Tt,{size:"body",weight:"bold",color:"info",isPending:e},i.a.createElement(R.b,{id:a}))));var Rt,Dt=({activeItem:e,dispatch:t})=>{const[a,n]=Object(l.useReducer)((e,t)=>Object.assign({},e,{[t.type]:t.pending}),{[vt.RECONNECTION]:!1}),r=Object(l.useMemo)(()=>Object(Ct.p)(e.mac,["uptime"]),[e.mac]),c=Object(o.useSelector)(r);return e.type===p.c.WIRELESS&&c?i.a.createElement(le.a,null,i.a.createElement(le.f,{padding:"24px 32px 0"},i.a.createElement(ft,{actionPending:a[vt.RECONNECTION],label:"COMMON_ACTION_RECONNECT",onClick:()=>{t(ue(e.mac,Object(L.d)(e))),n({type:vt.RECONNECTION,pending:!0})}}))):null},St=a(289);!function(e){e.REVOKE="revoke",e.DISCONNECT="disconnect"}(Rt||(Rt={}));var yt=({activeItem:{id:e,connected:t},dispatch:a})=>{const[n,r]=Object(l.useReducer)((e,t)=>Object.assign({},e,{[t.type]:t.disabled}),{[Rt.REVOKE]:!1,[Rt.DISCONNECT]:!1});return i.a.createElement(St.a,null,i.a.createElement(S.a,{flexDirection:"column",padding:"24px 32px 0"},i.a.createElement(S.a,{marginBottom:16},i.a.createElement(oe.a,{disabled:n[Rt.REVOKE],color:"danger",variant:"inline",weight:"bold",size:"medium",onClick:()=>{r({type:Rt.REVOKE,disabled:!0}),a(Object(se.i)(e,t)).finally(()=>r({type:Rt.REVOKE,disabled:!1}))}},i.a.createElement(v.a,{size:"body",weight:"bold",color:"inherit"},i.a.createElement(R.b,{id:"COMMON_ACTION_REVOKE_ACCESS"})))),t?i.a.createElement(S.a,null,i.a.createElement(oe.a,{disabled:n[Rt.DISCONNECT],variant:"inline",weight:"bold",size:"medium",onClick:()=>{r({type:Rt.DISCONNECT,disabled:!0}),a(Object(se.d)(e)).finally(()=>r({type:Rt.DISCONNECT,disabled:!1}))}},i.a.createElement(v.a,{size:"body",weight:"bold",color:"inherit"},i.a.createElement(R.b,{id:"COMMON_ACTION_DISCONNECT"})))):null))};const Pt=Object(r.c)(S.a,{shouldForwardProp:e=>"isDefaultPanel"!==e})`
  ${({isDefaultPanel:e})=>!e&&"height: 100%;"}
  overflow-x: hidden;
  overflow-y: scroll;
  overflow-y: overlay;
`,At=Object(R.e)(e=>{const{match:{path:t,params:a},activeItem:{type:r,data:c},location:o,match:s,history:E,intl:m,content:d,dispatch:_}=e,O=r===u.c.DEVICE&&!Object(b.Nc)(c),{id:I,site:g,panel:C,page:h,subPanel:T,subPage:v}=a,f=C===(null==d?void 0:d.default),R=Object(l.useMemo)(()=>d.singlePanel?null:O?[{id:d.default,label:m.formatMessage({id:d.panels[d.default].title}),icon:d.panels[d.default].icon}]:Object.keys(d.panels).reduce((t,a)=>{const{disabled:n,title:l,icon:i}=d.panels[a];return n&&"function"==typeof n&&n({...e})||t.push({id:a,label:m.formatMessage({id:l}),icon:i}),t},[]),[e,d,O]),D=Object(l.useCallback)(()=>{const l=Object(n.i)(t,{id:I,site:g,page:h,panel:d.default,subPage:v}),r=d.panels[C];if(!r)return i.a.createElement(n.c,{to:l});const{component:o,disabled:s}=r;if(!0===s||"function"==typeof s&&s({...e})||O&&C!==d.default)return i.a.createElement(n.c,{to:l});if(T&&r.subpanel){const{component:e}=r.subpanel;return i.a.createElement(e,{activeItem:c,params:a,path:t,history:E})}return i.a.createElement(o,{activeItem:c,params:a,path:t,history:E,key:`${C}${T&&r.subpanel?"-subpanel":""}`})},[d,c,O,C,a,t,e,T,I,h,g,v]);return i.a.createElement(l.Suspense,{fallback:null},i.a.createElement(S.a,{height:"100%",flexDirection:"column"},!d.singlePanel&&!O&&i.a.createElement(ee,{activeItem:c,tabs:R,history:E,match:s,location:o}),i.a.createElement(ce,{activeItem:c}),i.a.createElement(Pt,{isDefaultPanel:f,flexDirection:"column"},D(),Object(l.useMemo)(()=>{if(f)switch(h){case"clients":switch(c.type){case p.c.WIRED:case p.c.WIRELESS:return i.a.createElement(ge,{activeItem:c,dispatch:_});case p.c.TELEPORT:return i.a.createElement(yt,{activeItem:c,dispatch:_})}break;case"topology":case"devices":switch(r){case u.c.DEVICE:return i.a.createElement(gt,{activeItem:c});case u.c.UNIFI_DEVICE_CLIENT:return i.a.createElement(Dt,{activeItem:c,dispatch:_});default:return null}default:return null}return null},[c,h,r,f]))))});var Nt=i.a.memo(e=>e.match&&i.a.createElement(At,Object.assign({},e)),(e,t)=>null===t.match),jt=a(107),xt=a(89),Lt=a(1671),Vt=a(985),Mt=a(1154),wt=a(104),Ft=a(183),Ut=a(331),kt=a(70);const Wt=Object(r.c)(oe.a)`
  padding: 4px 0;
  margin: 0;
  height: initial;
  font-size: ${({theme:e})=>e.fontSize["font-size-body"]};
  width: auto;
`,Bt=r.a`
  justify-content: flex-start;
`;var zt=({item:e,itemType:t,message:a})=>{const n=Object(o.useDispatch)();return i.a.createElement(Wt,{wrapClassName:Bt,variant:"link",size:"small",onClick:()=>n(Object(pe.g)({modalType:kt.a.REPORT_WIFI_EXPERIENCE,modalProps:{item:e,itemType:t}}))},i.a.createElement(R.b,{id:a||"COMMON_REPORT_WIFI_EXPERIENCE_BUTTON"}))},Ht=a(880),Gt=a(474),$t=a(1039);const Yt=Object(r.c)(S.a)`
  background-color: ${({theme:e})=>e.motifPalette.neutral01};
`,Xt=Object(r.c)(y.c)`
  margin: 0 20px 0 0;
`,Kt=Object(r.c)(Gt.a)`
  margin-right: 8px;
`;var Zt=({client:e,uplinkDevice:t})=>i.a.createElement(Yt,{borderRadius:4,height:64,padding:"10px",alignItems:"center",justifyContent:"space-between",marginTop:20},i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Xt,{device:t,filesMap:"TOPOLOGY",height:34}),i.a.createElement(Kt,{variant:"success"}),i.a.createElement(v.a,{size:"caption",weight:"bold"},Object(L.c)(t))),i.a.createElement(S.a,{alignItems:"center",marginTop:4},i.a.createElement($t.a,{startTimestamp:e.assoc_time,size:"caption",color:"tertiary"})));const qt=Object(r.c)("div")`
  border-top: 1px ${({theme:e})=>e.motifPalette.ui04} solid;
  margin: 8px 0;
`,Jt=Object(r.c)(Lt.a)`
  position: relative;
  margin: 4px 0;
  border-radius: 16px;
  height: 4px;
`;var Qt=({item:e,showGraph:t,headerTitle:a,itemType:n,canReport:r,uplinkDevice:c,padding:s})=>{const E="mac"in e?e.mac:void 0,m="is_wired"in e?e.is_wired:void 0,d="wired_rate_mbps"in e?e.wired_rate_mbps:void 0,_="uplink_mac"in e&&e.uplink_mac,u="sw_port"in e&&e.sw_port,b="eagerly_discovered"in e&&e.eagerly_discovered,p=Object(l.useMemo)(()=>_&&u?Object(Ht.a)(_,u):()=>{},[_,u]),O=Object(o.useSelector)(p),{satisfaction:I,known:g}=((e,t)=>(e=>!("satisfaction"in e))(e)||(e=>!("satisfaction"in e))(e)?Object(x.e)(t,e):(e=>"satisfaction"in e)(e)?{satisfaction:e.satisfaction,known:Object(wt.d)(e.satisfaction)}:null)(e,O),C=Object(wt.c)(I);return i.a.createElement(S.a,{width:"100%",flexDirection:"column",justifyContent:"center",padding:s||"16px 32px 0",flex:"0 0 auto"},i.a.createElement(S.a,{width:"100%",justifyContent:"space-between",alignItems:"baseline"},i.a.createElement(v.a,{size:"header-xs",weight:"bold"},i.a.createElement(R.b,{id:a})),e.uptime?m&&d>0?i.a.createElement(v.a,{size:"header-l",color:"primary"},i.a.createElement("span",{style:{color:Vt.a.getGradientColor(I/100),fontWeight:700}},`${Object(Ft.b)(d)} ${10===d||100===d?`(${d} Mbps)`:""}`)):m||g||!b?i.a.createElement(v.a,{size:"header-l",color:C,weight:"bold"},I,"%"):i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(v.a,{size:"header-xs",weight:"bold",color:"info"},i.a.createElement(R.b,{id:"COMMON_WORD_INITIALIZING"}),"...")):i.a.createElement(v.a,{size:"body",color:"disabled"},i.a.createElement(R.b,{id:"COMMON_HYPHEN"}))),g&&!m?i.a.createElement(Mt.a,{variant:C,value:I,size:"medium"}):m||g||!b?null:i.a.createElement(Jt,{placement:"below",isLoading:!0}),r&&e.uptime&&i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{margin:"8px 0"},i.a.createElement(zt,{item:e,itemType:n})),i.a.createElement(qt,null)),t&&!m&&i.a.createElement(Ut.b,{mac:E,itemType:n}),(n===Ut.a.CLIENT||n===Ut.a.UNIFI_CLIENT)&&!m&&e.uptime&&i.a.createElement(Zt,{uplinkDevice:c,client:e}))},ea=a(109),ta=a(851),aa=a(132),na=a(571),la=({children:e,flexProps:t={}})=>i.a.createElement(S.a,Object.assign({width:"100%",marginBottom:4,justifyContent:"space-between"},t),e),ia=({activeItem:e,fingerprintData:{fingerprint_device_vendor:t,fingerprint_device_os:a}})=>i.a.createElement(S.a,{padding:"26px 32px",flexDirection:"column",height:"100%"},e.ip&&e.connected?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_IP_ADDRESS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.ip)):null,e.mac?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_MAC_ADDRESS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.mac)):null,t||e.oui?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_HEADER_MANUFACTURER"})),i.a.createElement(v.a,{style:{maxWidth:"110px"},color:"secondary",size:"body",truncate:!0},t||e.oui)):null,a?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_HEADER_OS"})),i.a.createElement(v.a,{color:"secondary",size:"body",truncate:!0},a)):null,(()=>{switch(e.type){case p.c.WIRED:return i.a.createElement(i.a.Fragment,null,e.assoc_time?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement($t.a,{startTimestamp:e.assoc_time})):null,i.a.createElement(na.a,{client:e,props:["usage_bytes"]},({usage_bytes:e=null})=>e?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_HEADER_ACTIVITY_24_HRS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(ta.a,{size:"body",type:"bytes",input:e}))):null),i.a.createElement(na.a,{client:e,props:["tx_packets","tx_bytes"]},({tx_packets:e=0,tx_bytes:t=0})=>e&&t?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_DOWN_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null==e?void 0:e.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",size:"body",input:t,color:"secondary"}))):null),i.a.createElement(na.a,{client:e,props:["rx_packets","rx_bytes"]},({rx_packets:e=0,rx_bytes:t=0})=>e&&t?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_UP_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null==e?void 0:e.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",size:"body",input:t,color:"secondary"}))):null));case p.c.WIRELESS:return i.a.createElement(i.a.Fragment,null,e.essid?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_SSID"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.essid)):null,e.radio||e.channel?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_BAND"})," / ",i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.radio?Object(x.E)(e):i.a.createElement(R.b,{id:"COMMON_HYPHEN"}),i.a.createElement(i.a.Fragment,null," / "),e.channel?e.channel:i.a.createElement(R.b,{id:"COMMON_HYPHEN"}))):null,i.a.createElement(na.a,{client:e,props:["signal"]},({signal:e=null})=>e?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_SIGNAL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e," ",i.a.createElement(R.b,{id:"COMMON_UNIT_DBM"}))):null),e.radio_proto?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WIFI_STANDARD"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(x.F)(e))):null,e.mimo?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_MIMO"})," ",i.a.createElement(R.b,{id:"COMMON_CONF"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(x.D)(e))):null,e.assoc_time?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement($t.a,{startTimestamp:e.assoc_time})):null,i.a.createElement(na.a,{client:e,props:["usage_bytes"]},({usage_bytes:e=null})=>e?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_HEADER_ACTIVITY_24_HRS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(ta.a,{size:"body",type:"bytes",input:e}))):null),i.a.createElement(na.a,{client:e,props:["tx_rate"]},({tx_rate:e=0})=>e>0?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_RX_RATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(aa.c)(1e3*e/8,"bitrate","SI"))):null),i.a.createElement(na.a,{client:e,props:["rx_rate"]},({rx_rate:e=0})=>e>0?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_HEADER_TX_RATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(aa.c)(1e3*e/8,"bitrate","SI"))):null),i.a.createElement(na.a,{client:e,props:["tx_packets","tx_bytes"]},({tx_packets:e=0,tx_bytes:t=0})=>e&&t?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_DOWN_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null==e?void 0:e.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",size:"body",input:t,color:"secondary"}))):null),i.a.createElement(na.a,{client:e,props:["rx_packets","rx_bytes"]},({rx_packets:e=0,rx_bytes:t=0})=>e&&t?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_UP_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null==e?void 0:e.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",size:"body",input:t,color:"secondary"}))):null));default:return null}})()),ra=a(533),ca=a(318),oa=a(141),sa=a(1044),Ea=a(17),ma=a(756),da=a(640);const _a=Object(r.c)(v.a)`
  white-space: nowrap;
`,ua=Object(r.c)(v.a)`
  max-width: 150px;
  line-height: 1.6 !important;
  text-align: right;
`,ba=Object(r.c)(oe.a)`
  padding: 0;
  border: 0;
  margin: 0;
  line-height: 1.6;
`;var pa=({activeItem:e,uplinkDevice:t,fingerprintData:a,history:n})=>{const{mac:r,name:c,fingerprint:s,network_name:E}=e,m=Object(x.o)(s),{fingerprint_device_name:d}=a,_=Object(x.J)(e.fingerprint),u=Object(x.I)(e),b=Object(o.useDispatch)(),O=Object(o.useSelector)(oa.b),I=Object(da.a)("/devices/properties/:mac/"+jt.a.OVERVIEW),g=Object(l.useCallback)(()=>{const t=Object(x.f)(e);b(Object(ra.c)(r,O)).then(()=>{let a=p.a.ACTIVE;e.blocked?a=p.a.BLOCKED:e.uptime||(a=p.a.OFFLINE);const n=Object.assign({},"fingerprint"in e?e.fingerprint:{},{dev_id_override:void 0,has_override:!1});b(Object(se.l)(r,{fingerprint:n},a)),b(Object(je.a)({icon:Ea.a.success,message:"REPORT_CLIENT_FINGERPRINT_REVERT_SUCCESS",values:{clientName:t}}))}).catch(()=>{b(Object(je.a)({icon:Ea.a.danger,message:"REPORT_CLIENT_FINGERPRINT_REVERT_ERROR",values:{clientName:t}}))})},[r,e.type,c,s,O]);return Object(h.a)(Number.isInteger(m)?[Object(ca.e)(m)]:()=>Promise.resolve({}),i.a.createElement(S.a,{padding:"24px 32px 0 18px",flexDirection:"column",justifyContent:"space-between"},i.a.createElement(S.a,{flexDirection:"row"},i.a.createElement(S.a,{maxWidth:"33%",minWidth:"33%",margin:"auto 4px auto 0",alignItems:"center",justifyContent:"center"},i.a.createElement(P.a,{client:e,alt:e.name,grid:!0})),i.a.createElement(S.a,{width:"100%",flexDirection:"column"},d&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_MODEL"})),i.a.createElement(ua,{color:"secondary",size:"body",truncate:!0},d)),E&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_NETWORK"})),i.a.createElement(ua,{color:"secondary",size:"body",truncate:!0},E)),(C=Object(x.s)(t,e))&&i.a.createElement(la,null,i.a.createElement(_a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:e.type===p.c.WIRED?"CLIENT_HEADER_WIRED":"CLIENT_HEADER_WIRELESS"})),i.a.createElement(ba,{title:C,variant:"link",size:"medium",weight:"normal",onClick:()=>{(null==t?void 0:t.mac)&&n.push(I.replace(":mac",t.mac))}},Object(ma.a)(C,16))),i.a.createElement(S.a,{marginTop:12},!_&&!u&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary"}),i.a.createElement(ba,{variant:"link",onClick:()=>b(Object(sa.f)(r))},i.a.createElement(R.b,{id:Object(x.H)(e)?"CLIENT_PROPERTIES_VALUES_FINGERPRINT_ACTION_REPORT_WRONG":"CLIENT_PROPERTIES_VALUES_FINGERPRINT_ACTION_REPORT_MISSING"}))),_&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary"}),i.a.createElement(ba,{variant:"link",onClick:g},i.a.createElement(R.b,{id:"CLIENT_PROPERTIES_VALUES_FINGERPRINT_ACTION_REVERT"}))))))));var C},Oa=a(48),Ia=a(2701),ga=a(1169),Ca=a(736),ha=a(186),Ta=a(22),va=a(2629),fa=a(2788),Ra=a(2764),Da=a(1670),Sa=a(1183);const ya=Vt.a.getDiscreteColorScaler(Sa.DPI_CONVERTER_LIMIT),Pa=Object(r.c)(v.a,{shouldForwardProp:e=>"isTotalRow"!==e})`
  ${({isTotalRow:e})=>e&&"font-weight: 700;"}
`,Aa=Object(r.c)(S.a)`
  width: 100%;
  margin-top: 30px;
`,Na=Object(r.c)(Gt.a,{shouldForwardProp:e=>"index"!==e})`
  background-color: ${({index:e})=>ya(e)} !important;
  margin-right: 8px;
`,ja=Object(r.c)(S.a)`
  padding: 10px ${({contentPaddingX:e=30})=>e}px 30px;
  font-size: 24px;

  table {
    color: ${({theme:e})=>e.motifPalette.text02};

    & > tbody > tr:last-child > td {
      border-bottom: 0 !important;
    }
  }
`,xa=Object(r.c)(f.cb)`
  margin-right: ${({theme:e})=>e.spacing["spacing-l"]};
  color: ${({theme:e})=>e.motifPalette.icon01};
`,La=Object(r.c)(S.a)`
  .titleClassName {
    font-weight: bold;
    font-size: 14px;
    transform: translate(8px, 10px);
  }
  .descriptionClassName {
    font-weight: bold;
    transform: translate(0, -34px);
  }
  box-shadow: 0 0 0 7px ${({theme:e})=>e.motifPalette.neutral02};
  border-radius: 100%;
`,Va=Object(r.c)(f.fb)`
  position: absolute;
  top: 52%;
  left: 36px;
  color: ${({theme:e})=>{var t;return null===(t=e.motifPalette)||void 0===t?void 0:t.uBlue06}};
`,Ma=Object(r.c)(f.gb)`
  position: absolute;
  top: 52%;
  left: 36px;
  color: ${({theme:e})=>{var t;return null===(t=e.motifPalette)||void 0===t?void 0:t.purple06}};
`,wa=[{id:"labelInfo",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_TRAFFIC_TAB_USAGE"})),renderCell:({label:e,index:t})=>{const a="COMMON_TOTAL_TRAFFIC"===e;return i.a.createElement(S.a,{alignItems:"center",maxWidth:165},!a&&i.a.createElement(Na,{index:t}),i.a.createElement(Pa,{color:"inherit",truncate:!0,size:"body",isTotalRow:a},a?i.a.createElement(R.b,{id:e}):e))},minWidth:80,maxWidth:179},{id:"bytesParsed",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_TRAFFIC_TAB_BYTES"})),renderCell:({bytesParsed:e,totalBytes:t})=>i.a.createElement(Pa,{color:"inherit",truncate:!0,size:"body",isTotalRow:!!t},t||e),minWidth:50,maxWidth:83},{id:"pkts",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_TRAFFIC_TAB_PACKETS"})),renderCell:({pkts:e,totalPackets:t})=>i.a.createElement(Pa,{color:"inherit",truncate:!0,size:"body",isTotalRow:!!t},t||e),minWidth:50,maxWidth:83}];var Fa=Object(R.e)(({contentPaddingX:e,intl:t,mac:a})=>{const n=Object(o.useDispatch)(),r={data:{macs:[a],type:"by_app"}},c={method:"post",crudCacheStrategy:{interval:3e4,type:me.a.COMBINED}},{data:s}=Object(o.useSelector)(Object(Sa.selectFormattedStaDpiData)(r,c)),E=s.filter(({app:e})=>e!==Sa.UNKNOWN_APP_ID);Object(l.useEffect)(()=>(a&&n(Object(Sa.fetchTraffic)(r,c)),()=>{n(Object(me.c)(Object(Sa.fetchTraffic)(r,c)))}),[a]);const[m,d]=Object(aa.c)(null==E?void 0:E.reduce((e,t)=>e+((null==t?void 0:t.rx_bytes)||0),0)).split(" "),[_,u]=Object(aa.c)(null==E?void 0:E.reduce((e,t)=>e+((null==t?void 0:t.tx_bytes)||0),0)).split(" "),b=Object(fa.a)((s||[]).reduce((e,t)=>e+((null==t?void 0:t.packets)||0),0)),p=Object(aa.c)((s||[]).reduce((e,t)=>e+((null==t?void 0:t.bytes)||0),0)),O=[...E,{id:"COMMON_TOTAL_TRAFFIC",label:"COMMON_TOTAL_TRAFFIC",totalBytes:p,totalPackets:b}];return i.a.createElement(i.a.Fragment,null,E.length?i.a.createElement(i.a.Fragment,null,m&&_&&i.a.createElement(Aa,{alignItems:"center",justifyContent:"space-around"},[{items:E.map(({id:e,index:t,rx_bytes:a})=>({id:e,value:a,color:ya(t)})),title:`${m} ${d}`,Icon:Va},{items:E.map(({id:e,index:t,tx_bytes:a})=>({id:e,value:a,color:ya(t)})),title:`${_} ${u}`,Icon:Ma}].map(({items:e,title:a,Icon:n})=>i.a.createElement(La,{key:`${a}-${e.rx_bytes}-${e.tx_bytes}`,justifyContent:"center",alignItems:"center"},i.a.createElement(S.a,{position:"relative"},i.a.createElement(n,{size:"medium"})),i.a.createElement(Ra.a,{items:e,title:a,description:t.formatMessage({id:"COMMON_IDENTIFIED_TRAFFIC"}),titleClassName:"titleClassName",descriptionClassName:"descriptionClassName",size:140,thickness:3.5,spacer:.5})))),i.a.createElement(ja,{marginTop:36,contentPaddingX:e,justifyContent:"flex-start",alignItems:"center"},i.a.createElement(Da.a,{items:O,disableColumnFilters:!0,columns:wa,rowHeight:32,disableTextPointer:!0,disableSelection:!0,disableHover:!0}))):i.a.createElement(S.a,{padding:"30px",alignItems:"center",justifyContent:"center"},i.a.createElement(xa,null),i.a.createElement(R.b,{id:"CLIENT_PROPERTY_TRAFFIC_TAB_EMPTY"})))});const Ua=Object(r.c)(S.a)`
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  button {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
  }
`,ka=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`,Wa=Object(r.c)(S.a)`
  > {
    &:last-child {
      margin-bottom: 0;
    }
  }
`,Ba=Object(r.c)(f.f)`
  color: ${({theme:e})=>e.motifPalette.neutral08};
`;var za=({activeItem:e})=>{const t=Object(n.k)(),{subPanelId:a,subPanel:r}=Object(n.m)(),c=Object(l.useMemo)(()=>(null==e?void 0:e.uplink_mac)?Object(Ce.selectDeviceRecordProperties)(e.uplink_mac,["ip","name","model","mac"]):()=>{},[null==e?void 0:e.uplink_mac]),s=Object(o.useSelector)(c),E=s&&Object(L.c)(s)||"",m=Object(o.useSelector)(Object(ga.b)(a||r));return Object(Ta.g)([Object(Ca.fetchSession)(e.mac,!1)],i.a.createElement(i.a.Fragment,null,i.a.createElement(Ua,{position:"relative",padding:"12px 0",marginBottom:34,justifyContent:"center",width:"100%"},i.a.createElement(ha.c,{name:"backButton",onClick:()=>t.push("../insights")},i.a.createElement(Ba,{size:"small"})),(null==m?void 0:m.date)&&i.a.createElement(v.a,{size:"body",color:"secondary",weight:"bold"},m.date)),i.a.createElement(S.a,{padding:"0 30px",flexDirection:"column",justifyContent:"flex-start",alignItems:"center"},i.a.createElement(Wa,{width:"100%",flexDirection:"column"},(null==m?void 0:m.start)&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_HISTORY_TAB_START"})),i.a.createElement(v.a,{color:"secondary",size:"body"},m.start)),(null==m?void 0:m.end)&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_HISTORY_TAB_END"})),i.a.createElement(v.a,{color:"secondary",size:"body"},m.end)),(null==m?void 0:m.duration)&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_HISTORY_TAB_DURATION"})),i.a.createElement(v.a,{color:"secondary",size:"body"},m.duration)),(null==s?void 0:s.ip)&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_IP_ADDRESS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},s.ip)),(null==s?void 0:s.mac)&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_HISTORY_TAB_MAC_ADDRESS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},s.mac)),(null==s?void 0:s.mac)&&E&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_HISTORY_TAB_UPLINK"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(va.a,{uplinkMac:s.mac,uplinkName:E}))),(null==m?void 0:m.port)&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_HEADER_PORT"})),i.a.createElement(v.a,{color:"secondary",size:"body"},m.port)),(null==m?void 0:m.experience)>=0&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:(null==m?void 0:m.is_wired)?"CLIENT_PROPERTY_HISTORY_TAB_CLIENT_EXPERIENCE":"COMMON_WIFI_EXP"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement("span",{style:{color:Oa.a["color-"+Object(wt.b)(null==m?void 0:m.experience)]}},null==m?void 0:m.experience,"%"))))),(null==m?void 0:m.mac)&&i.a.createElement(ka,{renderOnlyExpandedContent:!0,variant:"secondary",items:[{id:"dpi",label:i.a.createElement(R.b,{id:"COMMON_TRAFFIC_ID"}),openByDefault:!0,renderContent:()=>i.a.createElement(Fa,{mac:m.mac,contentPaddingX:0})}]})))};const Ha=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`,Ga=Object(r.c)(S.a)`
  table {
    th {
      padding-left: 0;
    }
    tr {
      :hover {
        cursor: pointer;
      }
    }
    td {
      padding-left: 0;
      padding-right: 25px;
    }
  }
`,$a=Object(r.c)("div")`
  padding-top: 20px;
`,Ya=Object(r.c)(f.cb)`
  margin-right: 10px;
`,Xa=Object(r.c)("div")`
  padding-top: 10px;
`,Ka=[{id:"date",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_TABLE_HEADER_DATE"})),renderCell:({date:e})=>i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},e),minWidth:80},{id:"start",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_TABLE_HEADER_START"})),renderCell:({start:e})=>i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},e),minWidth:60},{id:"duration",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_TABLE_HEADER_DURATION"})),renderCell:({duration:e})=>i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},e),minWidth:80}],Za=[{id:"date",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_TABLE_HEADER_DATE"})),renderCell:({date:e})=>i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},e),minWidth:80},{id:"start",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_TABLE_HEADER_START"})),renderCell:({start:e})=>i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},e),minWidth:60},{id:"duration",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_TABLE_HEADER_DURATION"})),renderCell:({duration:e})=>i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},e),minWidth:80},{id:"wifiExperience",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_TABLE_HEADER_WIFI_EXP"})),renderCell:({experience:e})=>i.a.createElement(i.a.Fragment,null,e>=0?i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},i.a.createElement("span",{style:{color:Oa.a["color-"+Object(wt.b)(e)]}},e,"%")):i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},i.a.createElement(R.b,{id:"COMMON_NA"}))),minWidth:80}];var qa=({activeItem:{mac:e,is_wired:t}})=>{const{data:a,isLoading:l,error:r}=Object(o.useSelector)(Object(Ca.selectFormattedSessionData)(e,!1,[])),c=Object(n.k)();return Object(Ta.g)([Object(Ca.fetchSession)(e,!1)],i.a.createElement(i.a.Fragment,null,i.a.createElement(Ha,{variant:"secondary",renderOnlyExpandedContent:!0,multiOpen:!0,items:[{id:"dpi",label:i.a.createElement(R.b,{id:"COMMON_TRAFFIC_ID"}),openByDefault:!0,renderContent:()=>i.a.createElement(Fa,{mac:e,contentPaddingX:0})},{id:"history",label:i.a.createElement(R.b,{id:"CLIENT_ACCORDION_HEADER_HISTORY"}),openByDefault:!0,renderContent:()=>i.a.createElement(Ga,{justifyContent:"flex-start",alignItems:"center"},!l&&a.length>0&&i.a.createElement(Da.a,{items:a,disableColumnFilters:!0,columns:t?Ka:Za,onRowClick:({id:e})=>c.push("insights/"+e),rowHeight:30,renderFooter:()=>i.a.createElement(Xa,null,i.a.createElement(R.b,{id:"CLIENT_PROPERTY_FOOTER_RECORDS",values:{length:a.length}}))}),(!l||r)&&0===a.length&&i.a.createElement($a,null,i.a.createElement(Ya,null),i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HISTORY_TAB_EMPTY"})))}]})))},Ja=function(e){return function(t){return class extends i.a.Component{constructor(){super(...arguments),this.state=e.reduce((e,t)=>({...e,dirty:{...e.dirty,[t]:!1},invalid:{...e.invalid,[t]:!1}}),{dirty:{},invalid:{}}),this.setFormDirty=((e,t)=>{const{dirty:a}=this.state;a[e]!==t&&this.setState({dirty:{...a,[e]:t}})}),this.setFormInvalid=((e,t)=>{const{invalid:a}=this.state;a[e]!==t&&this.setState({invalid:{...a,[e]:t}})})}render(){const{dirty:e,invalid:a}=this.state,n=!!Object.values(e).find(e=>e),l=!!Object.values(a).find(e=>e);return i.a.createElement(t,Object.assign({isDirty:n,isInvalid:l,formStates:e,setFormDirty:this.setFormDirty,setFormInvalid:this.setFormInvalid},this.props))}}}},Qa=a(61),en=a(7),tn=a(250),an=a(15),nn=a(689),ln=a(26),rn=a(481),cn=a(19),on=a(127),sn=a(574),En=a.n(sn),mn=a(9);const dn=Object(mn.b)(mn.c,(e,t)=>En()(e.map(e=>(({name:e,radio_table:t,apGroups:a})=>({name:e,radio_table:t,apGroups:a}))(e)),t.map(e=>(({name:e,radio_table:t,apGroups:a})=>({name:e,radio_table:t,apGroups:a}))(e))))(Object(mn.a)(Ce.selectAdoptedApDevices,on.selectAPGroupsData,(e,t)=>e.map(({name:e,type:a,model:n,mac:l,radio_table:i})=>({name:e,type:a,model:n,mac:l,radio_table:i,apGroups:t.filter(e=>e.device_macs.includes(l)).map(({name:e})=>e)}))),e=>e);var _n=a(1656),un=a(435);const bn=[{id:"AP",minWidth:50,label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_HEADER_AP"})),renderCell:e=>i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(S.a,{marginRight:16,width:25,height:25,alignItems:"center"},i.a.createElement(y.c,{device:e})),i.a.createElement(v.a,{size:"body",color:"inherit"},Object(L.d)(e)))},{id:"channel",minWidth:30,label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),renderCell:({radio_table:e,clientRadio:t})=>{var a;return i.a.createElement(v.a,{color:"inherit",size:"body"},(null===(a=null==e?void 0:e.find(e=>e.radio===t))||void 0===a?void 0:a.channel)||i.a.createElement(R.b,{id:"COMMON_NA"}))}},{id:"signal",minWidth:30,label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_SIGNAL"})),renderCell:({clientSignal:e,clientUplinkMac:t,fixed_ap_mac:a})=>i.a.createElement(S.a,{alignItems:"center",width:"100%",height:"100%"},i.a.createElement(v.a,{color:"inherit",size:"body"},a!==t?null:e," ",i.a.createElement(R.b,{id:"COMMON_UNIT_DBM"})),a!==t?i.a.createElement(un.i,{placement:"below",isLoading:!0}):i.a.createElement(_n.a,{signal:e}))}];var pn=({activeItem:e,setSelectAccessPoint:t})=>{const{setFieldValue:a,values:{fixed_ap_mac:n}}=Object(Me.e)(),r=Object(o.useDispatch)(),c=Object(o.useSelector)(dn),[s,E]=Object(l.useState)(n);return Object(Ta.g)([Object(on.fetchAPGroups)(void 0,{crudCacheStrategy:{type:me.a.CACHE}})],i.a.createElement(S.a,{height:"100%",flexDirection:"column"},i.a.createElement(S.a,{flexDirection:"column",height:"100%"},i.a.createElement(un.k,{width:"100%",height:48,position:"relative",alignItems:"center",justifyContent:"center"},i.a.createElement(ha.c,{name:"goBack",onClick:()=>t(!1)},i.a.createElement(un.a,{size:"medium"})),i.a.createElement(v.a,{size:"body",color:"header"},i.a.createElement(R.b,{id:"CLIENT_LOCK_AP_SELECT_AP"}))),i.a.createElement(S.a,{height:"100%",padding:"24px 32px",flexDirection:"column",justifyContent:"space-between"},i.a.createElement(Da.a,{items:c,columns:(e=>[{id:"AP",minWidth:80,label:i.a.createElement(S.a,{position:"absolute",left:-32},i.a.createElement(v.a,{color:"primary",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_HEADER_AP"}))),renderCell:e=>i.a.createElement(S.a,{alignItems:"center",width:"100%"},i.a.createElement(S.a,{marginRight:12,width:25,height:25,alignItems:"center"},i.a.createElement(y.c,{device:e})),i.a.createElement(v.a,{size:"body",color:"secondary",truncate:!0},Object(L.d)(e)))},{id:"channel",minWidth:50,label:i.a.createElement(v.a,{color:"primary",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),renderCell:({radio_table:t})=>{var a;return i.a.createElement(v.a,{color:"secondary",size:"body"},e.type===xt.ClientType.WIRELESS&&(null===(a=null==t?void 0:t.find(t=>(null==t?void 0:t.radio)===(null==e?void 0:e.radio)))||void 0===a?void 0:a.channel)||i.a.createElement(R.b,{id:"COMMON_NA"}))}},{id:"apGroups",minWidth:60,label:i.a.createElement(v.a,{color:"primary",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"CLIENT_HEADER_AP_GROUP"})),renderCell:({apGroups:e})=>(null==e?void 0:e.length)?i.a.createElement(v.a,{color:"secondary",size:"body"},e.length>1?i.a.createElement(rn.a,{message:i.a.createElement(S.a,{flexDirection:"column"},e.map(e=>i.a.createElement(v.a,null,e))),position:"top",width:146},i.a.createElement(R.b,{id:"CLIENT_LOCK_AP_AP_GROUPS",values:{length:e.length}})):e[0]):i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"COMMON_HYPHEn"}))}])(e),disableColumnFilters:!0,disableSort:!0,hideCellOverflow:!1,idField:"mac",rowHeight:32,multiSelectMode:!0,initialSelectedIds:[n||e.uplink_mac],maximumSelections:1,onChangeSelection:e=>E((null==e?void 0:e[0])||null),renderFooter:()=>i.a.createElement(S.a,{marginTop:16},i.a.createElement(R.b,{id:"CLIENT_LOCK_AP_TABLE_FOOTER",values:{length:c.length}}))}),i.a.createElement(S.a,{justifyContent:"flex-end"},i.a.createElement(oe.a,{onClick:()=>t(!1)},i.a.createElement(R.b,{id:"COMMON_ACTION_CANCEL"})),i.a.createElement(oe.a,{variant:"primary",onClick:()=>{a("fixed_ap_mac",s),t(!1),r(Object(pe.g)({modalType:kt.a.LOCK_CLIENT_TO_THIS_AP,modalProps:{onClose:()=>{a("fixed_ap_mac",n),r(Object(pe.e)())},onContinue:()=>r(Object(pe.e)())}}))},disabled:!s||s===n},i.a.createElement(R.b,{id:"COMMON_ACTION_SAVE_SELECTION"})))))))},On=a(170),In=a(179),gn=Object(R.e)(({activeItem:e,values:t,setSelectAccessPoint:a,intl:n})=>{const r=Object(l.useMemo)(()=>t.fixed_ap_enabled&&(t.fixed_ap_mac||e.uplink_mac)?Object(Ce.selectDeviceRecordProperties)(t.fixed_ap_mac||e.uplink_mac,["name","type","model","mac","radio_table"]):()=>{},[t.fixed_ap_enabled,t.fixed_ap_mac,e.uplink_mac]),c=Object(o.useSelector)(r),s=Object(o.useSelector)(Object(On.f)(On.a.LOCK_AP)),E=Object(o.useSelector)(Object(On.g)(On.a.LOCK_AP,On.b.NOT_ALL_DEVICES_SUPPORT_FEATURE)),m=Object(o.useSelector)(Object(On.g)(On.a.LOCK_AP,On.b.NO_SUPPORTED_DEVICES_IN_SETUP)),d=!s&&!!E,_=s&&!!E,u=!s&&!!m,b=!t.fixed_ap_enabled&&!e.connected,p=Object(l.useMemo)(()=>{var e;return null===(e=null==E?void 0:E.required_versions)||void 0===e?void 0:e.map(({min_firmware_version:e,type:t})=>`${t} ${e} ${n.formatMessage({id:"COMMON_WORD_OR"}).toLowerCase()} ${n.formatMessage({id:"COMMON_WORD_LATER"}).toLowerCase()}`).join(", ")},[null==E?void 0:E.required_versions]);return e.type===xt.ClientType.WIRELESS?i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center",marginTop:8,marginBottom:16},i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"CLIENT_LOCK_AP_LOCK_TO_AP"})),i.a.createElement(S.a,{marginLeft:10},i.a.createElement(rn.a,{message:i.a.createElement(v.a,null,i.a.createElement(R.b,{id:"CLIENT_LOCK_AP_LOCK_TO_AP_TOOLTIP"})),width:208},i.a.createElement(un.h,{isActive:!0}))),_&&i.a.createElement(rn.a,{portal:!0,message:i.a.createElement(v.a,null,i.a.createElement(R.a,{id:"CLIENT_LOCK_AP_ALREADY_CONFIGURED_SYSTEM",values:{unsupportedApList:p}})),width:208},i.a.createElement(un.e,null))),i.a.createElement(In.a,{condition:d||u||b,wrapper:e=>i.a.createElement(rn.a,{portal:!0,width:208,message:i.a.createElement(v.a,null,b?i.a.createElement(R.b,{id:"CLIENT_LOCK_AP_DISCONNECTED"}):i.a.createElement(R.a,{id:"CLIENT_LOCK_AP_FIRST_TIME_CONFIGURATION",values:{unsupportedApList:p}}))},e)},i.a.createElement(cn.a,{type:"checkbox",id:"fixed_ap_enabled",name:"fixed_ap_enabled",disabled:d||u||b}))),t.fixed_ap_enabled&&!d&&!u&&!b&&i.a.createElement(Da.a,{items:[Object.assign({},c,{clientSignal:e.signal,clientRadio:e.radio,clientUplinkMac:e.uplink_mac,fixed_ap_mac:t.fixed_ap_mac})],disableColumnFilters:!0,disableHover:!0,disableSelection:!0,disableTextPointer:!0,disableSort:!0,idField:"mac",columns:bn,rowHeight:32,renderFooter:()=>i.a.createElement(S.a,{marginTop:32},i.a.createElement(un.b,{variant:"inline",onClick:()=>a(!0)},i.a.createElement(R.b,{id:"CLIENT_LOCK_AP_SELECT_DIFF_AP"})))})):null});const Cn=Object(Me.f)({mapPropsToValues:({activeItem:{name:e,hostname:t,usergroup_id:a,use_fixedip:n,network_id:l,fixed_ip:i,ip:r},activeItem:c,defaultNetworkDataId:o,clients:s})=>{var E;return{name:t===e?"":e,usergroup_id:a||"",use_fixedip:!!n,network_id:l||o,fixed_ip:i||r,clients:s,...c.type===xt.ClientType.WIRELESS&&{fixed_ap_enabled:null!==(E=c.fixed_ap_enabled)&&void 0!==E&&E,fixed_ap_mac:c.fixed_ap_mac||c.uplink_mac}}},validationSchema:({networkData:e,activeItem:{user_id:t,type:a}})=>en.a.lazy(({network_id:n,fixed_ip:l,clients:r})=>{var c;const o=(null===(c=null==e?void 0:e.find(e=>(null==e?void 0:e.value)===n))||void 0===c?void 0:c.ipSubnet)||void 0;return en.a.object().shape({name:en.a.string(),usergroup_id:en.a.string(),use_fixedip:en.a.bool(),network_id:en.a.string(),fixed_ip:en.a.string().when("use_fixedip",{is:!0,then:en.a.string().label("COMMON_IP_ADDRESS").matches(ln.j,{message:i.a.createElement(R.b,{id:"COMMON_VALIDATION_VALID_IPV4"})}).unifiIpv4InSubnet(o,i.a.createElement(R.b,{id:"CLIENT_PROPERTY_GENERAL_TAB_INPUT_IP_ADDRESS_VALIDATION",values:{value:l,subnet:o}})).test("isFixedIPUnique",i.a.createElement(R.b,{id:"CLIENT_PROPERTY_GENERAL_TAB_INPUT_IP_ADDRESS_UNIQUE"}),e=>!e||r.filter(e=>"user_id"in e&&e.user_id!==t).every(t=>!("fixed_ip"in t&&t.fixed_ip&&e===t.fixed_ip))).required()}),...a===xt.ClientType.WIRELESS&&{fixed_ap_enabled:en.a.bool(),fixed_ap_mac:en.a.string().when("fixed_ap_enabled",{is:!0,then:en.a.string().matches(ln.s,{message:i.a.createElement(R.b,{id:"COMMON_VALIDATION_VALID_MAC"})}).required()})}})}),handleSubmit:(e,{props:{activeItem:{user_id:t,mac:a,blocked:n,connected:l},createToast:i,updateClient:r,updateClientDataInStore:c},setSubmitting:o,resetForm:s})=>{const E=(({clients:e,...t})=>t.fixed_ap_enabled?t:(({fixed_ap_mac:e,...t})=>t)(t))(e);r(E,a,t).then(t=>{t.data&&i({icon:Ea.a.success,message:"CLIENT_NOTICE_SAVE_SUCCESS"}),s({values:e}),c(a,E,n?xt.ClientModelType.BLOCKED:l?xt.ClientModelType.ACTIVE:xt.ClientModelType.OFFLINE)}).catch(()=>{i({icon:Ea.a.danger,message:"CLIENT_NOTICE_SAVE_ERROR"}),s()}).finally(()=>{o(!1)})}}),hn={createToast:je.a,updateClient:xt.updateClient,fetchNetworks:an.fetchNetworks,tabSubmitFunction:C.j,tabResetFunction:C.i,updateClientDataInStore:xt.updateClientDataInStore};var Tn=Object(Qa.compose)(Object(o.connect)(e=>({userGroups:Object(tn.selectUserGroupOptions)(e),networkData:Object(nn.d)(e),defaultNetworkDataId:Object(nn.c)(e),canAssignFixedIp:Object(nn.a)(e),clients:Object(xt.selectNetworkContainerClientsData)(e)}),hn),R.e,Cn)(({resetForm:e,submitForm:t,setFormDirty:a,dirty:n,isDirty:r,activeItem:c,intl:o,userGroups:s,values:E,canAssignFixedIp:m,networkData:d})=>{const[_,u]=Object(l.useState)(!1);Object(l.useEffect)(()=>{a("clientSettings",n)},[n]);const b=Object(l.useMemo)(()=>[{label:o.formatMessage({id:"CLIENT_MODAL_INPUT_BANDWIDTH_PROFILE_DEFAULT"}),value:""},...s],[s]);return i.a.createElement(S.a,{height:"100%",flexDirection:"column",justifyContent:"space-between"},_?i.a.createElement(pn,{activeItem:c,setSelectAccessPoint:u}):i.a.createElement(S.a,{height:"100%",padding:"24px 32px",flexDirection:"column"},i.a.createElement(un.c,{marginBottom:24},i.a.createElement(un.j,{iconBefore:i.a.createElement(un.d,{size:"original"}),label:"CLIENT_PROPERTY_GENERAL_TAB_DETAILS_NAME",labelClassName:"labelClassName",validationMessageClassName:"validationMessageClassName",name:"name",full:!0,size:"body",disabled:"product_line"in c})),i.a.createElement(un.c,{marginBottom:24},i.a.createElement(un.f,{label:"CLIENT_PROPERTY_GENERAL_TAB_BANDWIDTH_PROFILE",variant:"secondary",name:"usergroup_id",type:"dropdown",full:!0,validated:!0,translateLabel:!0,options:b})),E.usergroup_id&&i.a.createElement(S.a,{marginBottom:16},i.a.createElement(un.h,{isActive:!0}),i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_GENERAL_TAB_BANDWIDTH_PROFILE_INFO"}))),i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center",marginBottom:16},i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_GENERAL_TAB_USE_FIXED_IP"})),i.a.createElement(rn.a,{message:i.a.createElement(R.b,{id:"CLIENT_PROPERTY_GENERAL_TAB_FIXED_IP_TOOLTIP"}),width:200,className:"ml-2",position:"bottom",style:{display:"inline-block"}},i.a.createElement(f.cb,{hidden:m,width:20,height:20,isActive:!0})),i.a.createElement(cn.a,{type:"checkbox",id:"use_fixedip",name:"use_fixedip",disabled:!m})),E.use_fixedip&&i.a.createElement(i.a.Fragment,null,i.a.createElement(un.c,{marginBottom:24},i.a.createElement(cn.a,{type:"dropdown",variant:"secondary",full:!0,validated:!0,name:"network_id",label:o.formatMessage({id:"COMMON_NETWORK"}),options:d,fontSize:"body"})),i.a.createElement(un.c,{marginBottom:16},i.a.createElement(cn.a,{label:"COMMON_IP_ADDRESS",size:"body",full:!0,name:"fixed_ip",variant:"secondary"}))),c.type===xt.ClientType.WIRELESS&&i.a.createElement(gn,{setSelectAccessPoint:u,values:E,activeItem:c})),_?null:i.a.createElement(un.g,{isDirty:r,onFormSubmit:t,onFormCancel:e}))}),vn=Ja(["clientSettings"])(({activeItem:e,isDirty:t,setFormDirty:a})=>i.a.createElement(S.a,{height:"100%",flexDirection:"column",justifyContent:"space-between"},i.a.createElement(Tn,{activeItem:e,isDirty:t,setFormDirty:a}))),fn={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"CLIENT_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:({activeItem:e,...t})=>{const a=Object(l.useMemo)(()=>Object(xt.selectClientFingerprint)(e),[e.fingerprint]),n=Object(o.useSelector)(a),r="uplink_mac"in e?e.uplink_mac:void 0,c="sw_port"in e?e.sw_port:void 0,s=Object(l.useMemo)(()=>r&&c?Object(Ht.a)(r,c):()=>{},[r,c]),E=Object(o.useSelector)(s),m=Object(xt.getClientExperienceFromPort)(E,e),d=Object(l.useMemo)(()=>e.uplink_mac?Object(ea.o)(e.uplink_mac,["type","name","model","mac"]):()=>{},[e.uplink_mac]),_=Object(o.useSelector)(d);return i.a.createElement(i.a.Fragment,null,i.a.createElement(pa,{activeItem:e,fingerprintData:n,uplinkDevice:_,history:t.history}),Object(xt.getIsClientConnected)(e)&&i.a.createElement(Qt,{item:e,clientExperience:m,headerTitle:e.type===xt.ClientType.WIRED?"CLIENT_HEADER_WIRED_EXPERIENCE":"COMMON_WIFI_EXP",showGraph:e.type===xt.ClientType.WIRELESS&&(null==m?void 0:m.known)&&e.connected,itemType:Ut.a.CLIENT,uplinkDevice:_,canReport:!0}),i.a.createElement(ia,{activeItem:e,fingerprintData:n}),!Object(xt.getIsClientConnected)(e)&&e.type===xt.ClientType.WIRELESS&&new Date(1e3*e.last_seen).getTime()>(new Date).getTime()-864e5&&i.a.createElement("div",{style:{padding:"32px 32px 32px 16px"}},i.a.createElement(Ut.b,{mac:e.mac,itemType:Ut.a.CLIENT})))}},insights:{path:"/insights",title:"CLIENT_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:qa,subpanel:{path:"/:subPanel",component:za}},settings:{path:"/settings",title:"CLIENT_PROPERTY_HEADER_SETTINGS",icon:f.S,component:vn}}},Rn=a(549),Dn=a(288),Sn=a(99),yn=a(363);const Pn=Object(r.c)(S.a)`
  margin-bottom: 4px;
  justify-content: space-between;
  padding: 5px 0;

  span:last-child {
    max-width: 220px;
    text-align: right;
  }
`,An=Object(r.c)(yn.a)`
  margin-right: 6px;
`;var Nn={default:jt.a.OVERVIEW,singlePanel:!0,panels:{overview:{path:"/overview",component:({activeItem:e})=>{var t;const{timestamp:a,src_ip:n,service:l,servicename:r}=e,c=Object(o.useSelector)(ke.E),s=Object(o.useSelector)(Dn.c);return i.a.createElement(S.a,{flexDirection:"column",padding:"26px 32px"},i.a.createElement(v.a,{weight:"bold",color:"primary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_OVERVIEW"})),i.a.createElement(Pn,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_DATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(Sn.e)(new Date(1e3*a),s,Rn.a))),i.a.createElement(Pn,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_TIME"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(Sn.e)(new Date(1e3*a),s,c))),i.a.createElement(Pn,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_SOURCE_IP"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(An,null),n))),r?i.a.createElement(Pn,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_SERVICE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null===(t=null==r?void 0:r.toUpperCase)||void 0===t?void 0:t.call(r))):null,l?i.a.createElement(Pn,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_PORT"})),i.a.createElement(v.a,{color:"secondary",size:"body"},l)):null)}}}},jn=a(95),xn=a(101);const Ln=Object(r.c)(S.a)`
  margin-bottom: 4px;
  justify-content: space-between;
`,Vn=Object(r.c)(S.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  margin-top: 7px;
`;var Mn=({activeItem:e})=>{const t=Object(n.k)(),{site:a}=Object(n.m)(),l=Object(o.useSelector)(d.i),{uptime:r,ip:c,port_idx:s,configuration:{wan_provider_capabilities:E,wan_dns1:m,wan_dns2:_},details:{service_provider:u}}=e;return i.a.createElement(S.a,{flexDirection:"column"},(null==u?void 0:u.name)?i.a.createElement(Ln,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_SERVICE_PROVIDER"})),i.a.createElement(v.a,{color:"secondary",size:"body"},u.name)):null,(null==u?void 0:u.city)?i.a.createElement(Ln,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_LABEL_LOCATION"})),i.a.createElement(v.a,{color:"secondary",size:"body"},u.city)):null,i.a.createElement(Ln,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_DOWNLOAD_CAPACITY"})),i.a.createElement(ta.a,{type:"bytes",input:1e3*((null==E?void 0:E.download_kilobits_per_second)||0)/8,options:"bitrate",color:"secondary",size:"body"})),i.a.createElement(Ln,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_UPLOAD_CAPACITY"})),i.a.createElement(ta.a,{type:"bytes",input:1e3*((null==E?void 0:E.upload_kilobits_per_second)||0)/8,options:"bitrate",color:"secondary",size:"body"})),-1!==r?i.a.createElement(Ln,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement(ta.a,{type:"uptime",input:r,color:"secondary",size:"body"})):null,c?i.a.createElement(Ln,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_WAN_IP",values:{port_idx:s}})),i.a.createElement(v.a,{color:"secondary",size:"body"},c)):null,(m||_)&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Ln,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_DNS_SERVER_1"})),i.a.createElement(v.a,{color:"secondary",size:"body"},m)),i.a.createElement(Ln,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_DNS_SERVER_2"})),i.a.createElement(v.a,{color:"secondary",size:"body"},_))),i.a.createElement(Vn,null,i.a.createElement(oe.a,{size:"small",type:"button",variant:"inline",onClick:()=>{const e=Object(n.i)(l,{site:a});t.push(`${e}${xn.a.internetSettings}`)}},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_LINK_INTERNET_SETTINGS"}))))},wn=a(2622);const Fn=Object(r.c)(oe.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  font-weight: normal;
`;var Un=({device:e,...t})=>{const a=Object(o.useSelector)(t=>Object(Ce.getUplink)(Object(Ce.selectDevicesData)(t),e)),l=Object(o.useSelector)(oa.b),r=Object(n.k)(),c=Object(o.useDispatch)(),s=Object(Ce.getUplinkDisplayName)(e,a);return s?i.a.createElement(Fn,Object.assign({noWrap:!0,variant:"link",size:"small",onClick:e=>{e.preventDefault(),e.stopPropagation(),r.push(`/${l}/devices/properties/${a.mac}`),c(Object(C.g)({type:u.c.DEVICE,mac:a.mac}))}},t),s):null};const kn=Object(r.c)(S.a)`
  margin-bottom: 4px;
  justify-content: space-between;
`;var Wn=()=>{const e=Object(o.useSelector)(Ce.selectAvailableUlteDevice);return i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(kn,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_LTE_BACKUP"})),i.a.createElement(wn.b,{mac:e.mac})),i.a.createElement(kn,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_UPLINK"})),i.a.createElement(Un,{device:e})))};const Bn=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`;var zn=a(146),Hn=a(753);const Gn=Object(r.c)("div")`
  padding: 28px 30px;

  table {
    th {
      font-size: ${({theme:e})=>e.fontSizes[1]}px;
    }
  }
`,$n=Object(r.c)(ta.a)`
  color: ${({theme:e})=>e.motifPalette.uBlue06};
`,Yn=Object(r.c)(ta.a)`
  color: ${({theme:e})=>e.motifPalette.purple06};
`,Xn=Object(r.c)(v.a)`
  color: inherit;
`,Kn=Object(r.c)("div")`
  margin: 20px 0;
`,Zn=[{id:"time",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_DATE_TIME"})),renderCell:({time:e})=>i.a.createElement(v.a,{color:"inherit",size:"body"},i.a.createElement(Hn.a,{date:new Date(e)})),minWidth:150},{id:"xput_download",minWidth:100,renderLabel:()=>i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Xn,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_STATUS_DOWNLOAD"}))),renderCell:({xput_download:e})=>i.a.createElement($n,{size:"body",type:"bytes",options:"bitrate",input:1e6*e/8})},{id:"xput_upload",minWidth:100,renderLabel:()=>i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Xn,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_STATUS_UPLOAD"}))),renderCell:({xput_upload:e})=>i.a.createElement(Yn,{size:"body",type:"bytes",options:"bitrate",input:1e6*e/8})}];var qn={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DASHBOARD_ISP_PROPERTY_OVERVIEW",icon:f.Gb,component:({activeItem:e})=>{const t=Object(o.useSelector)(jn.g);return i.a.createElement(Bn,{variant:"secondary",items:[{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(Mn,{activeItem:e})},...t?[{id:"wanFailover",label:i.a.createElement(R.b,{id:"DASHBOARD_ISP_ACCORDION_TITLE_WAN_FAILOVER"}),renderContent:()=>i.a.createElement(Wn,null)}]:[]],multiOpen:!0})}},insights:{path:"/insights",title:"DASHBOARD_ISP_PROPERTY_INSIGHTS",icon:f.nc,component:({activeItem:e})=>{const t=Object(o.useDispatch)(),a=Object(o.useSelector)(zn.selectSpeedTestReportData);return Object(l.useEffect)(()=>{t(Object(zn.fetchSpeedTestReport)())},[e.mac,t]),i.a.createElement(Gn,null,i.a.createElement(Da.a,{idField:"_id",hideCellOverflow:!1,columns:Zn,disableColumnFilters:!0,items:a,renderFooter:()=>a.length>0?i.a.createElement(Kn,null,i.a.createElement(R.b,{id:"COMMON_TABLE_FOOTER",values:{length:a.length}})):i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_TABLE_NO_SPEED_TESTS"})}))}}}},Jn=a(423),Qn=({activeItem:{uptime:e}})=>e>0?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(Jn.a)(e))):null,el=({activeItem:e})=>{var t,a;const n=null!==(t=e.link_capacity)&&void 0!==t?t:Object(Ce.isUBB)(e)&&(null===(a=e.peer_ubb)||void 0===a?void 0:a.link_capacity);return n>0?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_CAPACITY"})),i.a.createElement(ta.a,{size:"body",type:"bytes",color:"secondary",input:1e6*n/8,options:"bitrate"})):null},tl=({activeItem:e})=>{const t=Object(Ce.getDeviceMemoryUsage)(e);return t?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_MEMORY_USAGE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},t,"%")):null};const al=Object(r.c)(rn.a)`
  margin-left: 4px;
  display: inline-block;
  vertical-align: text-bottom;
`,nl=r.a`
  margin-right: -17px;
`,ll=({loadAvg:e})=>i.a.createElement(v.a,{color:"secondary",size:"body"},e);var il=({activeItem:e,flexProps:t,withTooltip:a})=>{const n=(null==e?void 0:e.loadAvg)||Object(Ce.getDeviceLoadAverage)(e);return n?i.a.createElement(la,{flexProps:t},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE"})),a?i.a.createElement("span",null,i.a.createElement(ll,{loadAvg:n}),i.a.createElement(al,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LOAD_AVERAGE_TOOLTIP"}),width:200,position:"bottomRight",tooltipClassName:nl,portal:!0},i.a.createElement(f.cb,{isActive:!0}))):i.a.createElement(ll,{loadAvg:n})):null},rl=({children:e})=>i.a.createElement(S.a,{height:"100%",flexDirection:"column"},e),cl=({activeItem:e})=>i.a.createElement(rl,null,[{C:el,flexProps:{}},{C:Qn},{C:tl},{C:il,flexProps:{}},{C:({activeItem:{lte_ext_ant:e},flexProps:t})=>i.a.createElement(la,{flexProps:t},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_EXTERNAL_ANTENNA"})),!0===e||"enabled"===e?i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_ENABLED"})):i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_DISABLED"}))),flexProps:{}},{C:({activeItem:{lte_poe:e},flexProps:t})=>i.a.createElement(la,{flexProps:t},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_POE_PASSTHROUGH"})),i.a.createElement(v.a,{color:"secondary",size:"body"},!0===e||"enabled"===e?i.a.createElement(R.b,{id:"COMMON_ENABLED"}):i.a.createElement(R.b,{id:"COMMON_DISABLED"}))),flexProps:{}}].map(({C:t,flexProps:a={}})=>i.a.createElement(t,{activeItem:e,flexProps:a,key:t.name}))),ol=a(165),sl=a(304),El=a(156);const ml=Object(r.c)(rn.a)`
  width: fit-content;

  & > div > button > span > div {
    display: flex;

    & > span {
      margin: 0 !important;
    }
  }
`,dl=Object(r.c)(oe.a)`
  display: block;
  white-space: nowrap;
  height: 31px;
  padding: 0;
  color: ${({color:e})=>e};
  line-height: 14px;
`,_l=Object(r.c)(f.b)`
  margin-right: 8px;
  color: ${te.o.warning};
`,ul=Object(r.c)("div")`
  width: 170px;
  line-height: 18px;
`;var bl=({mac:e,isUnreachable:t,isUnavailable:a})=>{const n=Object(o.useDispatch)(),r=t||a,c=t?"LTE_ACTIONS_SUBSCRIPTION_CHECK_UNREACHABLE_TOOLTIP":a?"LTE_ACTIONS_SUBSCRIPTION_CHECK_UNAVAILABLE_TOOLTIP":"LTE_ACTIONS_SUBSCRIPTION_CHECK_TOOLTIP",s=r?"LTE_ACTIONS_SUBSCRIPTION_CHECK_UNAVAILABLE":"LTE_ACTIONS_SUBSCRIPTION_CHECK",E=Object(l.useCallback)(()=>{r||n(Object(Te.f)([e]))},[r]);return i.a.createElement(ml,{position:"topRight",portal:!0,message:i.a.createElement(ul,null,i.a.createElement(R.b,{id:c}))},i.a.createElement(dl,{variant:"inline",onClick:E,disabled:r},i.a.createElement(_l,null),i.a.createElement(v.a,{size:"caption",color:r?"secondary":"info"},i.a.createElement(R.b,{id:s}))))},pl=a(142);const Ol=Object(r.c)("div")`
  text-align: center;
  background: ${({theme:e})=>e.motifPalette.ui12};
  padding: 32px 40px;
`,Il=Object(r.c)(v.a)`
  font-size: 16px;
`,gl=Object(r.c)("div")`
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  // UNCOMMENT THIS WHEN GRAPH IS WORKING
  // margin-bottom: 16px;
`,Cl=Object(r.c)(S.a)`
  margin-bottom: 8px;
  line-height: 1.5;
  text-align: left;
`,hl=Object(r.c)(f.b)`
  margin-right: 8px;
  color: ${te.o.warning};
`,Tl=Object(r.c)("div")`
  width: 16px;
  min-width: 16px;
  margin-right: 8px;
`,vl=Object(r.c)("div")`
  display: inline-block;
`,fl=Object(r.c)("div")`
  margin-top: ${({theme:e})=>e.spacing["spacing-m"]};
`;var Rl=({device:e,params:t,path:a,history:r})=>{const{site:c,page:s,subPage:E}=t,m=Object(Ce.isUltePro)(e),{license_state:d}=e,_=Object(Ce.isAdopted)(e),u=Object(o.useDispatch)(),b=Object(Ce.isUlte)(e)&&Object(ol.a)(e,"lte_subscription_status")===Ce.BILLING_SUBSCRIPTION_STATUS.PAST_DUE,p=Object(Ce.isUlte)(e)&&Object(ol.a)(e,"lte_subscription_status")===Ce.BILLING_SUBSCRIPTION_STATUS.CANCELED,O=Object(o.useSelector)(El.c),I=Object(pl.b)(O),g=`https://${I}/payments`,C=`https://${I}/subscriptions`,h=Object(Ce.calculateUsage)(e),T=te.o[h.state],f="warning"===h.state||"danger"===h.state&&!h.hasOverages,D=h.hasOverages&&!h.isSuspended,S=Object(o.useSelector)(sl.d),y=Object(Ce.isDeviceWithCountryLockedWarning)(S,e),P=Object(Ce.isLicenseWithWarning)(e),A=Object(Ce.isUlteDeviceNotConnectedToUlte)(e),N=Object(Ce.isUlteDeviceNotRegisteredWithUlte)(e),j=Object(o.useSelector)(ke.A),x=Object(o.useSelector)(ke.o),L=Object(o.useSelector)(ke.t),V=Object(l.useMemo)(()=>x||L,[x,L]),M=Object(l.useMemo)(()=>Object(Ce.isSubscriptionCheckRequired)(e),[e]),w=Object(l.useMemo)(()=>Object(Ce.isSubscriptionApiUnreachable)(e),[e]),F=Object(l.useMemo)(()=>Object(Ce.isUlte)(e)&&!!j&&!Object(Ce.isDeviceOwner)(e,j),[e,j]),U=Object(l.useMemo)(()=>_&&V&&(M||w||F),[_,V,M,w,F]);return Object(l.useEffect)(()=>{Object.keys(S).length||u(sl.a)},[S,u]),_&&i.a.createElement(Ol,null,i.a.createElement(gl,null,i.a.createElement(Il,null,i.a.createElement(R.b,{id:"DEVICE_DATA_USAGE_HEADER_LABEL"})),i.a.createElement(v.a,{color:"secondary",size:"header-l"},i.a.createElement(i.a.Fragment,null,i.a.createElement("span",{style:{color:T}},Object(aa.c)(h.usedBytes,"bytes","JEDEC")),i.a.createElement("span",null,e.lte_soft_limit>0&&"/"),i.a.createElement("span",null,e.lte_soft_limit>0&&Object(aa.c)(h.softLimitBytes,"bytes","JEDEC"))))),i.a.createElement(gl,null,e.lte_soft_limit>0&&i.a.createElement(Mt.a,{variant:h.state,value:h.width,size:"medium"})),i.a.createElement(fl,null,f&&i.a.createElement(Cl,null,i.a.createElement(hl,null),i.a.createElement(R.b,{id:"DEVICE_DATA_USAGE_LTE_APPROACHING_LIMIT",values:{amount:h.width+"%"}})),D&&i.a.createElement(Cl,null,i.a.createElement(hl,null),i.a.createElement("div",null,i.a.createElement(R.b,{id:"DEVICE_DATA_USAGE_LTE_OVER_SOFT_LIMIT",values:{softLimit:Object(aa.c)(h.softLimitBytes,"bytes","JEDEC"),hardLimit:Object(aa.c)(h.hardLimitBytes,"bytes","JEDEC")}}))),h.isSuspended&&i.a.createElement(Cl,null,i.a.createElement(hl,null),i.a.createElement(R.b,{id:"DEVICE_DATA_USAGE_LTE_OVER_HARD_LIMIT"})),"success"!==h.state&&i.a.createElement(Cl,null,i.a.createElement(Tl,null),i.a.createElement(vl,null,i.a.createElement(R.b,{id:"DEVICE_DATA_USAGE_LTE_INCREASE_LIMIT"})," ",i.a.createElement(oe.a,{variant:"inline",onClick:t=>{t.preventDefault(),t.stopPropagation();const l=Object(n.i)(a,{id:e.mac,site:c,page:s,panel:"settings",subPage:E});r.push(l)}},i.a.createElement(R.b,{id:"DEVICE_DATA_USAGE_LTE_INCREASE_LIMIT_BUTTON"})))),(b||p)&&i.a.createElement(Cl,null,i.a.createElement(hl,null),i.a.createElement(R.a,{id:p?"DEVICE_DATA_USAGE_LTE_SERVICE_CANCELED":"DEVICE_DATA_USAGE_LTE_PAYMENT_OVERDUE",values:{billingUrl:g}})),y&&i.a.createElement(Cl,null,i.a.createElement(hl,null),i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_NOTICE_COUNTRY_LOCKED_WARNING_BODY"})),P&&i.a.createElement(Cl,null,i.a.createElement(hl,null),i.a.createElement(R.a,{id:`DEVICE_PROPERTIES_NOTICE_LICENSE_${d.toUpperCase()}_BODY`,values:{url:C}})),A&&i.a.createElement(Cl,null,i.a.createElement(hl,null),i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_NOTICE_ULTE_NOT_CONNECTED_WARNING_BODY"})),N&&i.a.createElement(Cl,null,i.a.createElement(hl,null),i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_NOTICE_ULTE_NOT_REGISTERED_WARNING_BODY"})),U&&!m&&i.a.createElement(bl,{mac:e.mac,isApplicable:M,isUnreachable:w,isUnavailable:F})))},Dl=({activeItem:e})=>i.a.createElement(i.a.Fragment,null,i.a.createElement(Nl,{activeItem:e}),i.a.createElement(xl,{activeItem:e}),i.a.createElement(Ul,{activeItem:e,withLink:!0}),i.a.createElement(wl,{activeItem:e,withLink:!0})),Sl=a(862),yl=a(792),Pl=a(75);const Al=Object(r.c)(v.a)`
  line-height: 16px;
  margin-bottom: 10px;
`;var Nl=({activeItem:e})=>{const t=Object(o.useSelector)(Pl.e),a=!!(t&&e.model_eol_version&&Object(yl.a)(t,">= "+e.model_eol_version));return e.model_in_eol?i.a.createElement($e.a,{level:"warning"},a&&i.a.createElement(Al,{size:"caption"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_EOL_WARNING_NO_CONFIGURING",values:{date:i.a.createElement(Sl.b,{date:e.model_eol_date,dateFormat:"MMM D, YYYY"})}})),!a&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Al,{size:"caption"},i.a.createElement(R.b,{id:e.model_eol_date?"DEVICE_PROPERTIES_EOL_WARNING":"DEVICE_PROPERTIES_EOL_WARNING_NO_DATE",values:{date:i.a.createElement(Sl.b,{date:e.model_eol_date,dateFormat:"MMM D, YYYY"})}})),!!e.model_eol_version&&i.a.createElement(Al,{size:"caption",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_EOL_WARNING_CONTROLLER_UPGRADE",values:{controllerVersion:e.model_eol_version}}))),i.a.createElement("a",{href:xn.a.eolLearnMore,target:"_blank",rel:"noopener noreferrer"},i.a.createElement(R.b,{id:"COMMON_LEARN_MORE"}))):null};const jl=Object(r.c)(v.a)`
  line-height: 16px;
  margin-bottom: 10px;
`;var xl=({activeItem:e})=>e.model_in_lts?i.a.createElement($e.a,{level:"info"},i.a.createElement(jl,{size:"caption"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LTS_WARNING",values:{date:i.a.createElement(Sl.b,{date:e.model_eol_date,dateFormat:"MMM D, YYYY"})}})),e.model_eol_version&&i.a.createElement(jl,{size:"caption",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LTS_WARNING_CONTROLLER_UPGRADE",values:{controllerVersion:e.model_eol_version}})),i.a.createElement("a",{href:xn.a.ltsLearnMore,target:"_blank",rel:"noopener noreferrer"},i.a.createElement(R.b,{id:"COMMON_LEARN_MORE"}))):null,Ll=a(892),Vl=a(893);const Ml=Object(r.c)(v.a)`
  line-height: 16px;
  margin-bottom: 10px;
`;var wl=({activeItem:e,withLink:t,standalone:a})=>{const n=Object(o.useSelector)(Vl.b),l=Object(o.useSelector)(d.b),r=Object(o.useSelector)(d.f);return Object(h.a)([...r?[]:[Object(Ll.a)()]],!n&&Object(b.Ec)(e)?i.a.createElement($e.a,{level:"warning",standalone:a},i.a.createElement(Ml,{size:"caption",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_UNIFI_CARE_CLOUD_BACKUP_ENABLE_WARNING"})),t&&i.a.createElement(Ml,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_PROPERTIES_UNIFI_CARE_CLOUD_BACKUP_ENABLE_NAVIGATE",values:{url:l.replace(/\/network\/?/,xn.a.ucoreAdvancedSettings)}}))):null)};const Fl=Object(r.c)(v.a)`
  line-height: 16px;
  margin-bottom: 10px;
`;var Ul=({activeItem:e,withLink:t,standalone:a})=>{const n=Object(o.useSelector)(Vl.a),l=Object(o.useSelector)(d.b),r=Object(o.useSelector)(d.f);return Object(h.a)([...r?[]:[Object(Ll.a)()]],!n&&Object(b.Ec)(e)?i.a.createElement($e.a,{level:"warning",standalone:a},i.a.createElement(Fl,{size:"caption",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_UNIFI_CARE_REMOTE_ACCESS_ENABLE_WARNING"})),t&&i.a.createElement(Fl,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_PROPERTIES_UNIFI_CARE_REMOTE_ACCESS_ENABLE_NAVIGATE",values:{url:l.replace(/\/network\/?/,xn.a.ucoreAdvancedSettings)}}))):null)},kl=a(1638);const Wl=({value:e,valueUnit:t,translationId:a})=>void 0!==e&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:a})),"boolean"==typeof e?i.a.createElement(v.a,{color:"secondary",size:"body"},e?i.a.createElement(R.b,{id:"COMMON_ENABLED"}):i.a.createElement(R.b,{id:"COMMON_DISABLED"})):i.a.createElement(v.a,{color:"secondary",size:"body"},e,t&&" "+t));var Bl=({activeItem:e,isUltePro:t})=>{const{lte_radio_mode:a,lte_rssi:n,lte_ecio:l,lte_io:r,lte_ip:c,lte_sinr:o,lte_rsrq:s,lte_rsrp:E,lte_snr:m,lte_rx_chan:d,lte_tx_chan:_,lte_rscp:u,lte_apn:b,lte_connected:p,lte_pdptype:O,lte_band:I,lte_networkoperator:g,lte_rat:C,lte_state:h,lte_signal:T,lte_imei:v,lte_iccid:f,lte_cell_id:R,lte_hard_limit:D,lte_soft_limit:y,total_tx_bytes:P,total_rx_bytes:A}=e,N=(a||"").toUpperCase(),j=Object(aa.c)(D,"bytes","JEDEC"),x=Object(aa.c)(y,"bytes","JEDEC");return i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(Wl,{value:c,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_IP"}),i.a.createElement(Wl,{value:b,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_APN"}),i.a.createElement(Wl,{value:O,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_PDP_TYPE"}),i.a.createElement(Wl,{value:Object(kl.a)(p),translationId:"DEVICE_PROPERTIES_UNIFI_LTE_CONNECTED"}),i.a.createElement(Wl,{value:I,translationId:"COMMON_BAND"}),i.a.createElement(Wl,{value:R,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_CELL_ID"}),P&&i.a.createElement(Wl,{value:Object(aa.c)(P,"bytes","JEDEC"),translationId:"DEVICE_PROPERTIES_UNIFI_LTE_DATA_TRANSMITTED"}),A&&i.a.createElement(Wl,{value:Object(aa.c)(A,"bytes","JEDEC"),translationId:"DEVICE_PROPERTIES_UNIFI_LTE_DATA_RECEIVED"}),i.a.createElement(Wl,{value:g,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_NETWORK_OPERATOR"}),i.a.createElement(Wl,{value:C,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_RAT"}),i.a.createElement(Wl,{value:Object(kl.a)(h),translationId:"DEVICE_PROPERTIES_UNIFI_LTE_STATUS"}),i.a.createElement(Wl,{value:T,translationId:"COMMON_SIG_STR"}),N===ye.k.Lte&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Wl,{value:n,valueUnit:"dBm",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_RSSI"}),i.a.createElement(Wl,{value:s,valueUnit:"dB",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_RSRQ"}),i.a.createElement(Wl,{value:E,valueUnit:"dBm",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_RSRP"}),i.a.createElement(Wl,{value:m,valueUnit:"dB",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_SNR"}),i.a.createElement(Wl,{value:d,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_RX_CHANNEL"}),i.a.createElement(Wl,{value:_,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_TX_CHANNEL"})),(N===ye.k.Cdma||N===ye.k.Hdr)&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Wl,{value:n,valueUnit:"dBm",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_RSSI"}),i.a.createElement(Wl,{value:l,valueUnit:"dBm",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_ECIO"})),N===ye.k.Hdr&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Wl,{value:r,valueUnit:"dBm",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_IO"}),i.a.createElement(Wl,{value:o,valueUnit:"dB",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_SINR"})),N===ye.k.Gsm&&i.a.createElement(Wl,{value:n,valueUnit:"dBm",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_RSSI"}),N===ye.k.Tdma&&i.a.createElement(Wl,{value:u,valueUnit:"dBm",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_RSCP"}),i.a.createElement(Wl,{value:v,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_IMEI"}),i.a.createElement(Wl,{value:f,translationId:"DEVICE_PROPERTIES_UNIFI_LTE_ICCID"}),Number(j)>0&&i.a.createElement(Wl,{value:j,valueUnit:"GB",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_DATA_LIMIT"}),Number(j)>0&&i.a.createElement(Wl,{value:x,valueUnit:"GB",translationId:"DEVICE_PROPERTIES_UNIFI_LTE_DATA_WARNING"}))},zl=({uplink:e,portSpeed:t})=>{const a=Number(t||(null==e?void 0:e.speed));return a>0?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_SPEED"})),i.a.createElement(v.a,{color:"secondary",size:"body"},`${Object(Ft.b)(a)} ${10===a||100===a?`(${a} Mbps)`:""}`)):null};const Hl=Object(r.c)(oe.a)`
  padding: 0;
  margin: 0;
  height: initial;
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
`;var Gl=function({activeItem:{uplink:{rx_bytes:e,"rx_bytes-r":t,rx_packets:a,speed:l,tx_bytes:r,"tx_bytes-r":c,tx_packets:s}={}},activeItem:E,isUltePro:m,params:d,path:_,history:b}){const{site:p,page:O,subPage:I}=d,g=Object(o.useSelector)(Ce.selectDevicesData),h=t+c,T=Object(o.useSelector)(e=>Object(Ce.getUplink)(Object(Ce.selectDevicesData)(e),E)),f=Object(Ce.getUplinkDisplayName)(E,T),D=Object(o.useDispatch)(),y=Object(Ce.getUplinkRemotePort)(g,E);return i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_UPLINK"})),i.a.createElement(Hl,{variant:"link",onClick:e=>{e.preventDefault(),e.stopPropagation();const t=Object(n.i)(_,{id:T.mac,site:p,page:O,panel:jt.a.OVERVIEW,subPage:I});b.push(t),D(Object(C.g)({type:u.c.DEVICE,mac:T.mac}))}},f)),i.a.createElement(zl,{portSpeed:l}),m&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_POWER"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:(null==y?void 0:y.poe_power)||0}}))),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_DOWN_PKTS_BYTES"})),i.a.createElement(v.a,{size:"body"},a?a.toLocaleString():null,"/",i.a.createElement(ta.a,{type:"bytes",input:e,size:"body"}))),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_UP_PKTS_BYTES"})),i.a.createElement(v.a,{size:"body"},s?s.toLocaleString():null,"/",i.a.createElement(ta.a,{type:"bytes",input:r,size:"body"}))),m&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_ACTIVITY"})),i.a.createElement(ta.a,{type:"bytes",input:h,options:"bitrate",size:"body"})))};const $l=Object(r.c)(S.a)`
  padding: 24px 32px 24px 0 !important;
  flex-shrink: 0;
`,Yl=Object(r.c)(v.a)`
  max-width: 150px;
`,Xl=Object(r.c)(v.a)`
  max-width: 100px;
`;var Kl=i.a.memo(({device:e})=>{const{model:t,mac:a,displayable_version:n,ip:l,type:r,lan_ip:c}=e,o=Object(L.a)(e);return i.a.createElement($l,null,i.a.createElement(S.a,{minWidth:157,maxWidth:157,justifyContent:"center",alignItems:"center"},i.a.createElement(S.a,{minWidth:125,maxWidth:125,height:125,padding:"16px",alignItems:"center",justifyContent:"center"},i.a.createElement(y.c,{device:{model:t,type:r},filesMap:"GRID",width:"100%"}))),i.a.createElement(S.a,{width:211,flexDirection:"column",justifyContent:"center"},o&&i.a.createElement(la,{flexProps:{alignItems:"center"}},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_MODEL"})),i.a.createElement(Yl,{size:"body",truncate:!0},o)),a&&i.a.createElement(la,{flexProps:{alignItems:"center"}},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_MAC_ADDRESS"})),i.a.createElement(v.a,{size:"body"},a)),l&&i.a.createElement(la,{flexProps:{alignItems:"center"}},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_IP_ADDRESS"})),i.a.createElement(v.a,{size:"body"},c||l)),n&&i.a.createElement(la,{flexProps:{alignItems:"center"}},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_FIRMWARE_VERSION"})),i.a.createElement(Xl,{size:"body",truncate:!0},n))))},(e,t)=>e.device.model===t.device.model&&e.device.hostname===t.device.hostname&&e.device.mac===t.device.mac&&e.device.displayable_version===t.device.displayable_version&&e.device.ip===t.device.ip);const Zl=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
  .styledAccordionContent {
    padding: 0;
    margin: 0;
  }
`;var ql=a(281),Jl=a(2601),Ql=a(2596),ei=a(2598),ti=a(436),ai=a(335),ni=a(626);const li=Object(r.c)(v.a)`
  display: block;
  position: relative;
  padding-left: 20px;
  margin-left: 15px;

  ::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 1px;
    width: 12px;
    border-bottom: 1px ${e=>`${e.bordertype} ${e.legendcolor}`};
  }
`,ii=r.a`
  margin-bottom: 32px;
`,ri=Object(ei.a)(6,e=>({value:e,label:e.toString()})).reverse(),ci=(e,t,a,n,l)=>0!==t&&5!==t?null:i.a.createElement("line",{x1:a,x2:n,y1:0,y2:0,className:l}),oi=e=>r.a`
  fill: ${e.motifPalette.text02};
  font-size: 11px;
`;var si=Object(ti.b)(i.a.memo(({gwMac:e,keys:t,pickDatumsWithKey:a,heading:n,forUdm:l,theme:r})=>{const c=Object(o.useSelector)(Object(zn.selectDeviceStatReport)(e,zn.fetchDeviceUsageReport,zn.OBJECT.GW)),s=Object(o.useSelector)(Object(zn.selectDeviceStatReport)(e,zn.fetchDeviceUsageReport)),E=Object(o.useSelector)(ke.H),m="ap"===a?"gradientArea":"line",d=Date.now(),_=Object(D.startOfHour)(Object(D.addHours)(d,1)).getTime(),u=E?"H:ss":"ha",b=Object(ni.b)(_,u);b[b.length-1].label="";const p=b[0].value,O={};let I=0,g=c;l&&(g=s.reduce((e,t)=>{const a={...t};return a.gw?e:a.sw?(e[I].num_sta+=a.num_sta,I+=1,e):(e.push(a),e)},[])),a&&(g=s.filter(e=>e[a])),Object(ql.n)(g.filter(e=>e.time>p).map(e=>({...e,x:e.time})),ai.a.MINUTES.grain).forEach(e=>{t.forEach(t=>{O[t]||(O[t]={key:t,isDashed:"mem"===t,variant:"mem"===t?m:"gradientArea",lineColor:"mem"===t?"purple":"blue",maxY:0,data:[]}),O[t].data.push({x:e.x,y:e[t]})})});const C=t.map(e=>O[e]?O[e].data.map(e=>e.y||0):0),h=Math.max(...C.flat(),4);let T=ri;h>5&&(T=Object(ni.e)(Math.ceil(Math.min(100,h+1/3*h)),6));const f=["solid","dotted"],y=[r.colors.blue,r.colors.purple];let P=0;return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{justifyContent:"space-between",className:ii,marginTop:"10px"},i.a.createElement(v.a,{size:"body",weight:"bold",color:"primary"},i.a.createElement(R.b,{id:n})),t.length>0&&i.a.createElement(S.a,null,t.includes("cpu")&&i.a.createElement(li,{legendcolor:y[P],bordertype:f[P++]},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_CPU"}))),t.includes("mem")&&i.a.createElement(li,{legendcolor:y[P],bordertype:f[P++]},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_MEMORY"}))))),i.a.createElement(Jl.a,{xAxis:b,yAxis:T,width:336,height:120,margin:[0,0,20,30],xLabelsBetween:!0,renderYGridLine:ci,labelClassName:oi(r),renderChartElements:(e,a,n)=>i.a.createElement(i.a.Fragment,null,t.map(t=>O[t]&&O[t].data.length&&i.a.createElement(Ql.a,{key:O[t].key,data:O[t].data,maxY:n,mouseData:a,getCoordinates:e,variant:O[t].variant,lineColor:r.colors[O[t].lineColor],dashed:O[t].isDashed,hideMissingData:!0})))}))},(e,t)=>e.gwMac===t.gwMac)),Ei=({activeItem:e})=>{const t=Object(o.useDispatch)();return Object(l.useEffect)(()=>{t(Object(zn.fetchDeviceUsageReport)(e.mac))},[e.mac,t]),i.a.createElement(si,{gwMac:e.mac,keys:["mem","cpu"],pickDatumsWithKey:"ap",heading:"DEVICE_PROPERTIES_LABEL_USAGE_PERCENT"})};const mi=Object(r.c)(S.a)`
  padding: 16px 32px;
`,di=Object(r.c)("div")`
  margin-bottom: 16px;
`;const _i=e=>{var t,a;return(null===(a=null===(t=null==e?void 0:e.shared)||void 0===t?void 0:t.propertypanel)||void 0===a?void 0:a.tabGetDataFunction)||{}},ui=e=>{var t,a;return(null===(a=null===(t=null==e?void 0:e.shared)||void 0===t?void 0:t.propertypanel)||void 0===a?void 0:a.tabSubmitFunction)||{}},bi=e=>{var t,a;return(null===(a=null===(t=null==e?void 0:e.shared)||void 0===t?void 0:t.propertypanel)||void 0===a?void 0:a.tabResetFunction)||{}},pi=Object(r.c)("div")`
  margin-bottom: 16px;
`,Oi=Object(r.c)(f.cb)`
  margin-right: 5px;
  color: ${({theme:e})=>e.motifPalette.info};
`,Ii=Object(r.c)("div")`
  margin-top: 10px;
  display: flex;
  align-items: center;
`;var gi=Object(Me.f)({mapPropsToValues:({activeItem:{name:e,mac:t}={}})=>({name:e!==t?e:""}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}})(({activeItem:e,setFormDirty:t,setFormInvalid:a,dirty:n,isValid:r,values:c,resetForm:s,formName:E="general"})=>{const m=Object(o.useDispatch)(),_=Object(o.useSelector)(d.b),u=Object(Ce.isUdm)(e);Object(l.useEffect)(()=>(m(Object(C.h)({[E]:()=>u?{}:c})),m(Object(C.j)({[E]:()=>s({values:c})})),m(Object(C.i)({[E]:s})),()=>{m(Object(C.h)({[E]:null})),m(Object(C.j)({[E]:null})),m(Object(C.i)({[E]:null}))}),[m,s,c,u,E]),Object(l.useEffect)(()=>{t(E,n),a(E,!r)},[t,n,a,r,E]);const b=_.replace(/\/network\/?/,xn.a.ucoreSettings);return i.a.createElement(i.a.Fragment,null,i.a.createElement(pi,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_DEVICE_NAME",name:"name",full:!0,disabled:u}),u&&i.a.createElement(Ii,null,i.a.createElement(Oi,null),i.a.createElement(R.a,{id:"DEVICE_PROPERTIES_NAME_LINK_UNIFI_OS",values:{link:b}}))))}),Ci=a(208),hi=a(81);const Ti=[...Array(hi.o.SOFT_LIMIT_MAX_GB)].map((e,t)=>({value:t+1,label:t+1+" GB"})),vi=Object.values(ye.j).map(e=>({label:e,value:e})),fi=Object(r.c)(S.a,{shouldForwardProp:e=>"marginForError"!==e})`
  margin-bottom: ${({theme:e,marginForError:t})=>t?e.spacing["spacing-xxxl"]:e.spacing["spacing-xl"]};
`,Ri=Object(r.c)(v.a)`
  align-items: center;
  justify-content: center;
  margin-bottom: ${({theme:e})=>e.spacing["spacing-m"]};
`,Di=Object(r.c)(f.cb)`
  margin-right: ${({theme:e})=>e.spacing["spacing-s"]};
`,Si=Object(r.c)(v.a)`
  margin-top: ${({theme:e})=>e.spacing["spacing-xs"]};
`,yi=Object(Me.f)({mapPropsToValues:({isUltePro:e,activeItem:{lte_ext_ant:t,lte_poe:a,lte_apn:n,lte_is_sim_pin_required:l,lte_sim_pin_tries_left:i,lte_sim_pin:r,lte_username:c,lte_password:o,lte_auth_type:s,lte_data_limit_enabled:E,lte_soft_limit:m=(e?0:Ti[0].value),lte_data_warning_enabled:d,lte_hard_limit:_=0}})=>({lte_ext_ant:"string"==typeof t?"enabled"===t:t,lte_poe:"string"==typeof a?"enabled"===a:a,lte_apn:n,lte_is_sim_pin_required:l,lte_sim_pin_tries_left:i,lte_sim_pin:r,lte_username:c,lte_password:o,lte_auth_type:s,lte_data_limit_enabled:!e||E,lte_soft_limit:new aa.a(m,"bytes","IEC").value,lte_data_warning_enabled:d,lte_hard_limit:new aa.a(_,"bytes","IEC").value}),validationSchema:({isUltePro:e})=>en.a.lazy(()=>en.a.object().shape({lte_ext_ant:en.a.boolean().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_EXTERNAL_ANTENNA").required(),lte_poe:en.a.boolean().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_POE_PASSTHROUGH").required(),lte_apn:en.a.string().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_APN_ADDRESS").matches(ln.q,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_VALID_APN_ADDRESS"})}).required(),lte_sim_pin:en.a.string().when("lte_is_sim_pin_required",{is:!0,then:en.a.string().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_PIN").matches(ln.r,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_VALID_PIN"})}).required()}),lte_username:en.a.string().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_USERNAME"),lte_password:en.a.string().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_PASSWORD"),lte_auth_type:en.a.string().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_AUTHENTICATION_TYPE").oneOf([ye.j.Pap,ye.j.Chap,ye.j.PapChap,ye.j.None]),lte_data_limit_enabled:en.a.boolean().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_LTE_DATA_LIMIT"),lte_soft_limit:en.a.number().integer(i.a.createElement(R.b,{id:"COMMON_VALIDATION_WHOLE_NUMBER"})).when("lte_data_limit_enabled",{is:!0,then:e?en.a.number().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_DATA_WARNING").min(0).required():en.a.number().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_DATA_WARNING").oneOf(Ti.map(({value:e})=>e)).required()}),lte_data_warning_enabled:en.a.boolean().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_LTE_DATA_WARNING"),lte_hard_limit:en.a.number().when("lte_data_limit_enabled",{is:!0,then:en.a.number().label("DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_DATA_LIMIT").min(0).required().integer(i.a.createElement(R.b,{id:"COMMON_VALIDATION_WHOLE_NUMBER"}))}).when(["lte_soft_limit"],(t,a)=>a.min(e?t>=0&&t:0,i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_DATA_LIMIT_ERROR"})))})),handleSubmit:()=>null});var Pi=Object(Qa.compose)(Object(o.connect)(null,{updateDevice:Ce.updateDevice}),yi)(({activeItem:e,isUltePro:t,values:a,dirty:n,isValid:r,errors:c,touched:s,resetForm:E,setFormDirty:m,setFormInvalid:d,setFieldTouched:_,setFieldValue:u,formName:b="lte"})=>{const p=Object(o.useDispatch)();return Object(l.useEffect)(()=>{p(Object(C.h)({[b]:()=>{const e={...a,lte_soft_limit:Object(Ce.GiBToBytes)(a.lte_soft_limit),lte_hard_limit:t?Object(Ce.GiBToBytes)(a.lte_hard_limit):Object(Ce.GiBToBytes)(a.lte_soft_limit+2),lte_data_warning_enabled:a.lte_data_limit_enabled};return a.lte_data_limit_enabled||(e.lte_soft_limit=0,e.lte_hard_limit=0),e}})),p(Object(C.j)({[b]:()=>E({values:a})})),p(Object(C.i)({[b]:E}))},[p,E,a,e._id]),Object(l.useEffect)(()=>{m(b,n),d(b,!r)},[n,m,d,r]),i.a.createElement(i.a.Fragment,null,i.a.createElement(fi,{justifyContent:"space-between"},i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_EXTERNAL_ANTENNA"})),i.a.createElement(Ge.Field,{type:"checkbox",name:"lte_ext_ant"})),i.a.createElement(fi,{justifyContent:"space-between"},i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_POE_PASSTHROUGH"})),i.a.createElement(Ge.Field,{type:"checkbox",name:"lte_poe"})),t?i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,null,i.a.createElement(Ri,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_SIM_CARD"}))),i.a.createElement(fi,{flexDirection:"column"},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_APN_ADDRESS",name:"lte_apn",full:!0,autocomplete:"off"})),a.lte_is_sim_pin_required&&i.a.createElement(fi,{flexDirection:"column"},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_PIN",name:"lte_sim_pin",type:"password",autoComplete:"new-password",full:!0}),i.a.createElement(S.a,{alignItems:"center",marginTop:(null==s?void 0:s.lte_sim_pin)&&(null==c?void 0:c.lte_sim_pin)?20:4},i.a.createElement(Di,{isActive:!0}),i.a.createElement(v.a,{color:"secondary",size:"caption"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_SIM_CARD_TRIES",values:{count:a.lte_sim_pin_tries_left}})))),i.a.createElement(fi,{flexDirection:"column"},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_USERNAME",name:"lte_username",full:!0})),i.a.createElement(fi,{flexDirection:"column"},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_PASSWORD",name:"lte_password",type:"password",autoComplete:"new-password",passwordToggle:!0,full:!0})),i.a.createElement(fi,{flexDirection:"column"},i.a.createElement(Ge.Field,{name:"lte_auth_type",type:"dropdown",label:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_AUTHENTICATION_TYPE",options:vi,validated:!0,translateLabel:!0,full:!0})),i.a.createElement(fi,{justifyContent:"space-between"},i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_LTE_DATA_LIMIT"})),i.a.createElement(Ge.Field,{type:"checkbox",name:"lte_data_limit_enabled"})),a.lte_data_limit_enabled&&i.a.createElement(i.a.Fragment,null,i.a.createElement(fi,{flexDirection:"column",marginForError:!0},i.a.createElement(Ge.Field,{name:"lte_hard_limit",label:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_DATA_LIMIT",type:"number",full:!0})),i.a.createElement(fi,{justifyContent:"space-between"},i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_LTE_DATA_WARNING"}))),i.a.createElement(fi,{flexDirection:"column",marginForError:!0},i.a.createElement(Ge.Field,{name:"lte_soft_limit",label:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_DATA_WARNING",type:"number",full:!0,onChange:e=>{u("lte_soft_limit",e.target.value),_("lte_hard_limit")}})))):i.a.createElement(i.a.Fragment,null,i.a.createElement(fi,null,i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_LTE_DATA_LIMIT"}))),i.a.createElement(fi,{flexDirection:"column"},i.a.createElement(Ge.Field,{label:"DEVICE_ULTE_SETUP_DATA_LIMIT_VALUE_FIELD",translateLabel:!0,full:!0,validated:!0,options:Ti,type:"dropdown",name:"lte_soft_limit"}),i.a.createElement(Si,{color:"secondary",size:"caption"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CONFIGURE_UNIFI_LTE_DATA_LIMIT_DESCRIPTION"})))))}),Ai=a(69);const Ni=Fe.a.object().shape({type:Fe.a.string(),ip:Fe.a.string().when("type",{is:"static",then:en.b.required(i.a.createElement(R.b,{id:"COMMON_VALIDATION_FIELD_REQUIRED"}))}),netmask:Fe.a.string().when("type",{is:"static",then:en.c.required(i.a.createElement(R.b,{id:"COMMON_VALIDATION_FIELD_REQUIRED"}))}).when("ip",(e,t)=>e?t.test("is-valid-subnet-mask",i.a.createElement(R.b,{id:"COMMON_VALIDATION_VALID_IPV4_MASK"}),t=>Object(Ai.k)(e,t)):t),gateway:Fe.a.string().when("type",{is:"static",then:en.b.required(i.a.createElement(R.b,{id:"COMMON_VALIDATION_FIELD_REQUIRED"}))}),dns1:Fe.a.string().when("type",{is:"static",then:en.b.required(i.a.createElement(R.b,{id:"COMMON_VALIDATION_FIELD_REQUIRED"}))}),dns2:en.b.when("dns1",{is:e=>!!e,then:en.b}),bonding_enabled:Fe.a.boolean(),dnssuffix:Fe.a.string(),mgmt_network_id:Fe.a.string(),snmp_location:Fe.a.string(),snmp_contact:Fe.a.string()}),ji=Object(r.c)("div")`
  margin-bottom: 24px;
`,xi=Object(r.c)("div")`
  flex: 1;
  max-width: calc(50% - 6px);
`,Li=Object(r.c)(v.a)`
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
`;var Vi=Object(Me.f)({isInitialValid:!0,mapPropsToValues:({activeItem:e})=>{Object(Ce.getIsUsl8Mp)(e);const{config_network:t,ip:a,switch_vlan_enabled:n,lte_limit_enabled:l,lte_limit:i}=e,{type:r="dhcp",ip:c=a||"",netmask:o="",gateway:s="",dns1:E="",dns2:m="",dnssuffix:d="",bonding_enabled:_=!1}=t;return{config_network:{type:r,ip:c,netmask:o,gateway:s,dns1:E,dns2:m,dnssuffix:d,bonding_enabled:_},switch_vlan_enabled:n||!1}},handleSubmit:(e,{resetForm:t})=>{t({values:e})},validationSchema:en.a.object().shape({config_network:Ni,lte_limit_enabled:en.a.boolean().label("DEVICE_PROPERTIES_LTE_DATA_LIMIT"),lte_limit:en.a.number().integer().label("DEVICE_ULTE_PRO_SETUP_DATA_LIMIT").when("lte_limit_enabled",{is:!0,then:en.a.number().min(1).required().label("DEVICE_ULTE_PRO_SETUP_DATA_LIMIT")})})})(({setFormDirty:e,setFormInvalid:t,dirty:a,values:n,resetForm:r,isValid:c,initialValues:s,activeItem:E,formName:m="network"})=>{const d=Object(o.useDispatch)(),_=Object(Ce.getIsUapUswHybrid)(E),u=Object(Ce.getIsUsl8Mp)(E);Object(l.useEffect)(()=>{e("network",a),t("network",!c)},[e,t,a,c]);const b=Object(Ce.isGateway)(E),p=Object(l.useMemo)(()=>[{value:"dhcp",label:"DEVICE_PROPERTIES_VALUES_NETWORK_USING_DHCP"},...b?[]:[{value:"static",label:"DEVICE_PROPERTIES_VALUES_NETWORK_STATIC_IP"}]],[b]);return Object(l.useEffect)(()=>(d(Object(C.h)({[m]:()=>{var e;const t={config_network:"static"===n.config_network.type?n.config_network:{type:"dhcp",bonding_enabled:n.config_network.bonding_enabled}};return _&&(t.switch_vlan_enabled=n.switch_vlan_enabled,s.switch_vlan_enabled&&!n.switch_vlan_enabled&&(null===(e=E.port_overrides)||void 0===e?void 0:e.length)&&(t.port_overrides=E.port_overrides.map(({portconf_id:e,...t})=>t))),t}})),d(Object(C.j)({[m]:()=>r({values:n})})),d(Object(C.i)({[m]:r})),()=>{d(Object(C.h)({[m]:null})),d(Object(C.j)({[m]:null})),d(Object(C.i)({[m]:null}))}),[d,r,n,m,E.port_overrides,s.switch_vlan_enabled,_,u]),i.a.createElement(i.a.Fragment,null,i.a.createElement(ji,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_CONFIGURE_IP",name:"config_network.type",type:"dropdown",variant:"secondary",full:!0,translateLabel:!0,translateOptions:!0,options:p})),"static"===n.config_network.type&&i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(xi,null,i.a.createElement(cn.a,{label:"COMMON_IP_ADDRESS",name:"config_network.ip",full:!0})),i.a.createElement(xi,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_PREFERRED_DNS",name:"config_network.dns1",full:!0}))),i.a.createElement(S.a,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(xi,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_SUBNET_MASK",name:"config_network.netmask",full:!0})),i.a.createElement(xi,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_ALTERNATE_DNS",name:"config_network.dns2",full:!0}))),i.a.createElement(S.a,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(xi,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_GATEWAY",name:"config_network.gateway",full:!0})),i.a.createElement(xi,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_DNS_SUFFIX",name:"config_network.dnssuffix",full:!0})))),(Object(Ce.isUapAcHd)(E)||Object(Ce.isUapAcShd)(E)||Object(Ce.isUapXg)(E)||Object(Ce.isUwbXg)(E))&&i.a.createElement(S.a,{marginBottom:16,justifyContent:"space-between"},i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_PORT_AGGREGATION"})),i.a.createElement(cn.a,{name:"config_network.bonding_enabled",type:"checkbox"})),_&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Li,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_VLAN"})),i.a.createElement(S.a,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_PORT_VLAN"})),i.a.createElement(cn.a,{type:"checkbox",name:"switch_vlan_enabled"}))),u&&!1)});const Mi=Object(r.c)(Be.a)`
  padding: 0;
  white-space: nowrap;
`;var wi=({device:e})=>{const{locating:t}=e,a=Object(o.useDispatch)(),n=Object(Ce.getDeviceState)(e);return i.a.createElement(Mi,{variant:"link",onClick:t=>{if(t.preventDefault(),t.stopPropagation(),Object(Ce.isUBB)(e)){const{peer_ubb:t}=e;t&&a(Object(Ce.locateDevice)(t))}a(Object(Ce.locateDevice)(e))},disabled:n!==Ce.DeviceState.CONNECTED},i.a.createElement(R.b,{id:t?"DEVICE_ACTIONS_LOCATE_STOP":"DEVICE_ACTIONS_LOCATE"}))},Fi=a(330);const Ui=Object(r.c)(Be.a)`
  padding: 0;
`;var ki=({device:e})=>{const t=Object(Ce.getDeviceState)(e),a=Object(o.useSelector)(ke.x)("API_DEVICE_RESTART"),n=Object(o.useDispatch)();return a&&i.a.createElement(Ui,{variant:"link",onClick:t=>{t.preventDefault(),t.stopPropagation();const a=Object(Ce.isSwitch)(e)&&Object(Fi.isPoeSupported)(e),l=a||Object(Ce.isGateway)(e),i=!e.bypassConfirmRestart;n(l||i?Object(Ce.confirmDeviceRestart)({name:e.name||e.mac,withHardReboot:a,onConfirm:(t="soft")=>{n(Object(Ce.restartDevice)(e,t))},onCancel:()=>{n(Object(pe.e)())}}):Object(Ce.restartDevice)(e))},disabled:t!==Ce.DeviceState.CONNECTED},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_RESTART"}))};const Wi=Object(r.c)(Be.a)`
  padding: 0;
`;var Bi=({device:e})=>{const t=Object(Ce.getDeviceState)(e),a=Object(o.useDispatch)();return i.a.createElement(Wi,{variant:"link",onClick:t=>{t.preventDefault(),t.stopPropagation(),a(Object(Ce.confirmDeviceProvision)({name:e.name||e.mac,onConfirm:()=>{a(Object(Ce.forceProvisionDevice)(e))},onCancel:()=>{a(Object(pe.e)())}}))},loader:t===Ce.DeviceState.PROVISIONING?"spinner":null,disabled:t!==Ce.DeviceState.CONNECTED},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_PROVISION"}))};const zi=Object(r.c)(oe.a)`
  padding: 0;
  color: ${({theme:e})=>e.motifPalette.red06};

  &:hover {
    color: ${({theme:e})=>e.motifPalette.red05};
  }

  &:active {
    color: ${({theme:e})=>e.motifPalette.red07};
  }
`,Hi=Object(r.c)("div")`
  margin-top: ${({theme:e})=>e.space[4]}px;
  line-height: 1.5;
`,Gi=Object(r.c)(y.b)`
  width: auto !important;
  padding: 0 8px;
`,$i=r.a`
  button {
    border-radius: 0;
    font-size: 12px;
  }
`;var Yi=Object(R.e)(({device:e,showOnlyIfInactive:t,intl:a})=>{const{mac:n,name:r,adopted:c}=e,s=Object(o.useDispatch)(),[E,m]=Object(l.useState)(!1),d=Object(o.useSelector)(El.c),_=Object(o.useSelector)(V.a),u=Object(pl.b)(d),b=Object(Ce.isUlte)(e),p=Object(Ce.isDeactivatedForNonPayment)(e),O=Object(Ce.getDeviceState)(e),I=b&&(!t||[Ce.DeviceState.UNKNOWN,Ce.DeviceState.FIRMWARE_MISMATCH,Ce.DeviceState.ADOPTION_FAILED,Ce.DeviceState.DISCONNECTED].includes(O)),g=Object(l.useCallback)(async()=>{try{await s(Object(Ue.b)(n,{successToast:{icon:Ea.a.success,message:"DEVICE_ULTE_REMOVED_SUCCESS"}})),s(Object(Ce.deleteDeviceFromStore)(n)),s(Object(We.deleteUnifiDeviceFromStore)(n)),s(Object(C.f)()),p||setTimeout(()=>{s(Object(je.a)({duration:0,type:Ea.a.warning,title:a.formatMessage({id:"ON_LOAD_WARNING_SUBSCRIPTION_NEEDS_ATTENTION_TITLE"}),message:"ON_LOAD_WARNING_SUBSCRIPTION_NEEDS_ATTENTION_BODY",icon:i.a.createElement(Gi,{deviceType:ye.g.AP,deviceModel:ye.e.ULTE,publicImagePath:_,filesMap:"SETUP"}),showStatusBall:!0,primaryButton:{label:a.formatMessage({id:"ON_LOAD_WARNING_PAYMENT_ACTION_CANCEL_SUBSCRIPTIONS"}),onClick:()=>window.open(`https://${u}/subscriptions`,"_blank")},className:$i},"LTE_SUBSCRIPTION_NEEDS_ATTENTION"))},10),s(Object(pe.e)())}catch(e){m(!1)}},[n,p]),h=Object(l.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),m(!0);const t={name:r&&r!==n?r:a.formatMessage({id:"DEVICE_TYPE_ULTE"})};p?g():s(Object(be.a)({title:"DEVICE_ULTE_REMOVE_HEADER",titleValues:t,message:"DEVICE_ULTE_REMOVE_DETAILS",messageValues:t,confirmButtonProps:{text:i.a.createElement(R.b,{id:"DEVICE_ACTIONS_REMOVE"}),variant:"primary"},children:i.a.createElement(Hi,null,i.a.createElement(R.b,{id:"DEVICE_ULTE_REMOVE_INFO"})),onConfirm:g,onCancel:()=>{s(Object(pe.e)()),m(!1)}}))},[n,r,p]);return I&&c?i.a.createElement(zi,{variant:"link",onClick:h,loader:E?"spinner":null},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_REMOVE_LABEL"})):null});const Xi=Object(r.c)(Be.a)`
  padding: 0;
`;var Ki=({device:e})=>{const t=Object(o.useDispatch)();return i.a.createElement(Xi,{variant:"link",onClick:a=>{a.preventDefault(),a.stopPropagation(),t(Object(Ce.downloadDeviceInfo)(e))}},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_DOWNLOAD_DEVICE_INFO"}))};const Zi=Object(r.c)(Be.a)`
  padding: 0;
`;var qi=({device:e})=>{const t=Object(o.useDispatch)(),[a,n]=Object(l.useState)(!1),r=Object(Ce.getDeviceState)(e);return i.a.createElement(Zi,{variant:"link",onClick:async()=>{n(!0),await t(Object(Ce.openDeviceDebugTerminal)({device:e})),n(!1)},disabled:a||r!==ye.f.CONNECTED},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_DEBUG_LABEL"}))};const Ji=Object(r.c)(Be.a)`
  padding: 0;
`;var Qi=({device:e})=>{const t=Object(o.useDispatch)(),a=Object(l.useMemo)(()=>Object(Ce.getDeviceState)(e),[e]),[n,r]=Object(l.useState)(!1);return i.a.createElement(Ji,{variant:"link",onClick:a=>{a.preventDefault(),a.stopPropagation(),t(Object(Ce.confirmDeviceUpgrade)({titleValues:{deviceName:e.name},messageValues:{deviceName:e.name,fromVersion:e.version,toVersion:e.upgrade_to_firmware},onConfirm:()=>{r(!0),t(Object(Ce.upgradeDevice)(e,!0)),r(!0)},onCancel:()=>{t(Object(pe.e)()),r(!1)},isDowngrade:!0}))},disabled:n||a!==Ce.DeviceState.CONNECTED},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_DOWNGRADE_DEVICE"}))},er=e=>{const[t,a]=Object(l.useState)(!1);return Object(l.useEffect)(()=>{fetch(e,{mode:"no-cors"}).then(()=>{a(!0)}).catch(()=>a(!1))},[e]),t};const tr=Object(r.c)(Be.a)`
  padding: 0;
`;function ar({device:e}){const{isUbbAlignmentToolModalClosed:t}=Object(o.useSelector)(ke.I),{is_aligning:a}=e,n=Object(o.useDispatch)(),l=Object(Ce.getDeviceState)(e),r=er(xn.a.feStaticAssets+"/videos");return i.a.createElement(tr,{variant:"link",onClick:l=>{l.preventDefault(),l.stopPropagation(),a||t||!r||n(Object(pe.g)({modalType:kt.a.UBB_ALIGNMENT_TOOL,modalProps:{closeModal:()=>{n(Object(ke.h)({isUbbAlignmentToolModalClosed:!0})),n(Object(pe.e)())}}})),n(Object(Ce.alignDevice)(e))},disabled:l!==Ce.DeviceState.CONNECTED},i.a.createElement(R.b,{id:a?"DEVICE_ACTIONS_ALIGNMENT_DISABLE":"DEVICE_ACTIONS_ALIGNMENT_ENABLE"}))}var nr=a(16);const lr=Object(r.c)(Be.a)`
  padding: 0;
`,ir=({device:e})=>{const t=Object(o.useDispatch)(),a=Object(l.useCallback)(a=>{a.preventDefault(),a.stopPropagation(),t(Object(Ce.confirmDeviceEnable)({device:e,onConfirm:()=>{t(Object(Ce.updateDevice)({disabled:!e.disabled},e._id,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"}}))},onCancel:()=>{t(Object(pe.e)())}}))},[]);return i.a.createElement(lr,{variant:"link",onClick:a},i.a.createElement(R.b,{id:e.disabled?"COMMON_ACTION_ENABLE":"COMMON_ACTION_DISABLE"}))},rr=Object(r.c)(S.a)`
  background-color: ${({theme:e})=>e.colors.whiteoutBackground};
  bottom: 0;
  left: 0;
  top: 0;
  opacity: 0.96;
  padding: 0 24px;
  position: absolute;
  right: 0;
  z-index: 1;
`,cr=Object(r.c)(f.tc)`
  width: 50px;
  height: 50px;
  margin-right: 20px;

  path {
    fill: ${te.k};
  }
`;var or=()=>i.a.createElement(rr,null,i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(cr,null),i.a.createElement(R.b,{id:"DEVICE_STATE_UPGRADING_INFO_WARNING"})));const sr=Object(r.c)("div")`
  position: relative;
`,Er=Object(r.c)(Be.a)`
  padding: 0;
`,mr=en.a.object().shape({url:en.a.string().label("COMMON_LABEL_LOCATION_URL").url(i.a.createElement(R.b,{id:"COMMON_VALIDATION_VALID_URL"})).required()});var dr=Object(Qa.compose)(Object(o.connect)(e=>({mgmtSettings:Object(nr.selectMgmtSettings)(e)}),{confirmDeviceCustomUpgrade:Ce.confirmDeviceCustomUpgrade,upgradeExternalDevice:Ce.upgradeExternalDevice,hideModal:pe.e}),Object(Me.f)({validationSchema:mr,handleSubmit:({url:e},{props:{confirmDeviceCustomUpgrade:t,upgradeExternalDevice:a,device:n,hideModal:l}})=>{t({onConfirm:()=>{a(n,e)},onCancel:()=>{l()}})}}))(({handleSubmit:e,whiteOutActive:t,device:a,mgmtSettings:{auto_upgrade:n}})=>{const l=Object(Ce.getDeviceState)(a);return i.a.createElement(sr,null,t&&i.a.createElement(or,null),i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(cn.a,{full:!0,variant:"secondary",name:"url",helperMessage:"DEVICE_ACTIONS_CUSTOM_UPGRADE_PLACEHOLDER",disabled:!!n,type:"input"}),i.a.createElement(S.a,{marginTop:12,justifyContent:"flex-start"},i.a.createElement(Er,{name:"customUpgrade",variant:"link",type:"submit",onClick:e,disabled:!!n||l!==Ce.DeviceState.CONNECTED},i.a.createElement(R.b,{id:"COMMON_ACTION_UPDATE"})))))}),_r=a(613);const ur=Object(r.c)(oe.a)`
  padding: 0;
`;var br=({device:e,sourceDevice:t})=>{const a=Object(o.useDispatch)(),[n,r]=Object(l.useState)(!1);return i.a.createElement(ur,{variant:"link",onClick:n=>{n.preventDefault(),n.stopPropagation(),a(Object(Ce.confirmDeviceCloneConfig)({name:e.name||e.mac,sourceName:t.name||t.mac,onConfirm:async()=>{r(!0),await a(Object(Ce.cloneConfig)(e,t)),r(!1)},onCancel:()=>{r(!1),a(Object(pe.e)())}}))},disabled:n||!t.mac},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_COPY_CONFIGURATION"}))};const pr=r.a`
  min-height: 40px;
`,Or=r.a`
  li {
    div {
      display: block !important;
    }
  }
`,Ir=Object(r.c)(f.cb)`
  color: ${te.n};
  margin: 4px 0 0 0;
`;var gr=Object(R.e)(({intl:e,device:t})=>{const a=Object(o.useSelector)(Ce.selectDevicesData),[n,r]=Object(l.useState)(""),c=a.find(e=>e.mac===n)||{mac:null,name:null},s=a.reduce((e,a)=>(a.adopted&&a.state!==Ce.DEVICE_STATE_IDS.ADOPTING&&a.mac!==t.mac&&a.model===t.model&&e.push({label:a.name||a.mac,value:a.mac}),e),[]);return s.length||s.push({image:Ir,label:i.a.createElement(R.b,{id:"COMMON_DEVICES_NOT_FOUND"}),value:"notFound",disabled:!0}),i.a.createElement("div",null,i.a.createElement(_r.a,{searchable:!0,placeholder:e.formatMessage({id:"DEVICE_ACTIONS_COPY_CONFIGURATION_PLACEHOLDER"}),value:n,onChange:e=>{r(e.value)},variant:"secondary",options:s,width:"100%",className:pr,optionContainerClassName:Or}),i.a.createElement(S.a,{justifyContent:"flex-start",marginTop:"4px"},i.a.createElement(br,{device:t,sourceDevice:c})))});const Cr=Object(r.c)(S.a)`
  ${({theme:e})=>`\n    border-bottom: 1px solid ${e.motifPalette.neutral02};\n    margin-bottom: 24px;\n    padding-bottom: 12px;\n  `};

  .tooltip-position-fixer {
    margin-right: -16px;
  }
`,hr=Object(r.c)(Cr)`
  margin-bottom: 12px;
  padding-bottom: 8px;

  &:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
`,Tr=Object(r.c)(v.a)`
  margin-right: 6px;
`,vr=({messageId:e,tooltipClassName:t})=>i.a.createElement(rn.a,{message:i.a.createElement(R.b,{id:e}),width:210,tooltipClassName:t},i.a.createElement(f.cb,{isActive:!0,omitSvgMargin:!0}));var fr=({activeItem:e,disableLocate:t,disableRestart:a,disableDebug:n,disableForget:r})=>{const c=Object(o.useSelector)(t=>Object(Ce.selectDeviceData)(t,e.mac)),s=Object(o.useSelector)(Object(Ce.selectIsUcoreDevice)(e)),E=Object(Ce.getRawDeviceState)(c)===ye.f.UPGRADING,m=Object(Ce.isUlte)(c),{auto_upgrade:d}=Object(o.useSelector)(nr.selectMgmtSettings),_=Object(Ce.isLteWithSubscription)(c),u=Object(o.useSelector)(ke.x)("API_DEVICE_RESTART"),b=Object(l.useMemo)(()=>Object(Ce.isDeviceDowngradable)(c),[null==c?void 0:c.version,null==c?void 0:c.upgrade_to_firmware]);return i.a.createElement(i.a.Fragment,null,(c.type===ye.g.AP||c.type===ye.g.SWITCH)&&!m&&i.a.createElement(Cr,{flexDirection:"column",marginTop:"5px"},i.a.createElement(S.a,{alignItems:"center",justifyContent:"flex-start",marginBottom:"12px"},i.a.createElement(Tr,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_EXISTING_CONFIG_LABEL"})),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_EXISTING_CONFIG_INFO"})),i.a.createElement(gr,{device:c})),!s&&i.a.createElement(Cr,{flexDirection:"column",marginBottom:"29px"},i.a.createElement(S.a,{alignItems:"center",justifyContent:"flex-start",marginBottom:"12px"},i.a.createElement(Tr,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_CUSTOM_UPGRADE_LABEL"})),i.a.createElement(vr,{messageId:d?"DEVICE_ACTIONS_CUSTOM_UPGRADE_NOT_AVAILABLE":"DEVICE_ACTIONS_CUSTOM_UPGRADE_INFO"})),i.a.createElement(dr,{whiteOutActive:E,device:c})),!t&&i.a.createElement(hr,{flexDirection:"column"},i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(wi,{device:c}),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_LOCATE_DEVICE_DESCRIPTION",tooltipClassName:"tooltip-position-fixer"}))),!a&&u&&i.a.createElement(hr,{flexDirection:"column"},i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(ki,{device:c}),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_RESTART_INFO",tooltipClassName:"tooltip-position-fixer"}))),c.disabled&&i.a.createElement(hr,{flexDirection:"column"},i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(ir,{device:c}),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_ENABLE_INFO",tooltipClassName:"tooltip-position-fixer"}))),c.type===ye.g.UBB&&i.a.createElement(hr,{flexDirection:"column"},i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(ar,{device:c}),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_ALIGNMENT_INFO",tooltipClassName:"tooltip-position-fixer"}))),b&&i.a.createElement(hr,{flexDirection:"column"},i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(Qi,{device:c}),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_DOWNGRADE_DESCRIPTION",tooltipClassName:"tooltip-position-fixer"}))),i.a.createElement(hr,{flexDirection:"column"},i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(Bi,{device:c}),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_PROVISION_INFO",tooltipClassName:"tooltip-position-fixer"}))),i.a.createElement(hr,{flexDirection:"column"},i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(Ki,{device:c}),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_DOWNLOAD_DEVICE_INFO_INFO",tooltipClassName:"tooltip-position-fixer"}))),!n&&i.a.createElement(hr,{flexDirection:"column"},i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(qi,{device:c}),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_DEBUG_INFO",tooltipClassName:"tooltip-position-fixer"}))),!r&&i.a.createElement(hr,{flexDirection:"column",marginTop:"32px"},i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},_?i.a.createElement(Yi,{device:c}):i.a.createElement(He,{device:c}),i.a.createElement(vr,{messageId:"DEVICE_ACTIONS_FORGET_INFO",tooltipClassName:"tooltip-position-fixer"}))))};const Rr=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.spacing["spacing-xxxxl"]};
  > li:last-child {
    border-bottom: 0;
  }
`;var Dr;!function(e){e.NAME="name",e.LTE="lte",e.NETWORK="network",e.MANAGE_DEVICE="manage-device"}(Dr||(Dr={}));var Sr=Object(Qa.compose)(Ja([Dr.NAME,Dr.LTE,Dr.NETWORK,Dr.MANAGE_DEVICE]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r,intl:c})=>{const s=Object(o.useSelector)(ui),E=Object(o.useSelector)(bi),m=Object(o.useSelector)(_i),{_id:d,mac:_}=e,u=Object(o.useDispatch)(),b=Object(l.useMemo)(()=>Object(Ce.isUltePro)(e),[e.type]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{flex:"1"},i.a.createElement(Rr,{variant:"secondary",items:[{id:Dr.NAME,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),openByDefault:!0,renderContent:()=>i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a,formName:Dr.NAME})},{id:Dr.LTE,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_LTE"}),renderContent:()=>i.a.createElement(Pi,{activeItem:e,setFormDirty:t,setFormInvalid:a,isUltePro:b,formName:Dr.LTE})},{id:Dr.NETWORK,label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a,formName:Dr.NETWORK})},{id:Dr.MANAGE_DEVICE,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:n,isInvalid:r,onFormSubmit:()=>{const e=Object.entries(m).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{});u(Object(Ce.updateDeviceWithIdEndpoint)(e,d,_,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(s).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{Object.values(E).forEach(e=>{"function"==typeof e&&e()})}}))}),yr={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:({activeItem:e,...t})=>{var a;const n=Object(Ce.isAdopted)(e),l=Object(Ce.isUltePro)(e);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),n&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Rl,Object.assign({device:e},t)),i.a.createElement(Dl,{activeItem:e}),i.a.createElement(Zl,{variant:"secondary",items:[{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(cl,{activeItem:e})},{id:"lte",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_UNIFI_ACCORDION_HEADER_LTE"}),renderContent:()=>i.a.createElement(Bl,{activeItem:e,isUltePro:l})},...(null===(a=null==e?void 0:e.uplink)||void 0===a?void 0:a.mac)?[{id:"uplink",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_UPLINK_WIRED"}),renderContent:()=>i.a.createElement(Gl,Object.assign({activeItem:e,isUltePro:l},t))}]:[]],contentClassName:"styledAccordionContent",renderOnlyExpandedContent:!0,multiOpen:!0})))}},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:({activeItem:e})=>i.a.createElement(mi,{flexDirection:"column"},i.a.createElement(v.a,{weight:"bold",size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_STATS"})),i.a.createElement(di,null),i.a.createElement(Ei,{activeItem:e}))},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:Sr}}},Pr=a(1153),Ar=a(168),Nr=a(41),jr=({severity:e})=>{const t=["","TM_CONCERNING","TM_UNKNOWN","TM_BLOCKED","TM_KNOWN"][e],a=["secondary","danger","warning","secondary","success"][e];return i.a.createElement(v.a,{color:a,size:"body"},i.a.createElement(R.b,{id:t}))};const xr=Object(r.c)(S.a)`
  margin-bottom: 4px;
  justify-content: space-between;
  padding: 5px 0;

  span:last-child {
    max-width: 220px;
    text-align: right;
  }
`,Lr=Object(r.c)(xr)`
  overflow-wrap: break-word;
`,Vr=Object(r.c)(yn.a)`
  margin-right: 6px;
`;var Mr=({activeItem:e})=>{var t,a,n,r,c,s,E,m,d,_,u;const b=Object(o.useDispatch)(),p=Object(o.useSelector)(I.b),O=Object(o.useSelector)(I.c),g=Object(o.useSelector)(nr.selectIpsSettings),C=Object(o.useSelector)(an.selectNetworksData),h=Object(o.useSelector)(I.h),T=Object(o.useSelector)(Dn.c),f=Object(o.useSelector)(ke.F),D=Object(o.useSelector)(I.o),y=Object(o.useSelector)(ke.s),P=[(null==e?void 0:e.srcipGeo.country_name)?null==e?void 0:e.srcipGeo.city:null==e?void 0:e.usgipGeo.city,(null==e?void 0:e.srcipGeo.country_name)||(null==e?void 0:e.usgipGeo.country_name)],A=[(null==e?void 0:e.dstipGeo.country_name)?null==e?void 0:e.dstipGeo.city:null==e?void 0:e.usgipGeo.city,(null==e?void 0:e.dstipGeo.country_name)||(null==e?void 0:e.usgipGeo.country_name)],N=P.filter(e=>!!e).join(", "),j=A.filter(e=>!!e).join(", "),x=(null!==(a=null===(t=null==e?void 0:e.flow)||void 0===t?void 0:t.bytes_toclient)&&void 0!==a?a:0)+(null!==(r=null===(n=null==e?void 0:e.flow)||void 0===n?void 0:n.bytes_toserver)&&void 0!==r?r:0),L=O.some(({_id:t})=>t===e._id),[V,M]=Object(l.useState)(L),w=Object(l.useCallback)(()=>{M(!0),b(Object(Nr.blockClient)(e.src_ip,e.dest_ip,C))},[b,e.src_ip,null==e?void 0:e.dest_ip,C]),F=p.some(({_id:t})=>t===e._id),[U,k]=Object(l.useState)(F),W=Object(l.useCallback)(()=>{k(!0),b(Object(Nr.blacklistClient)(e.src_ip,C))},[b,e.src_ip,C]),B=h.some(({_id:t})=>t===e._id),[z,H]=Object(l.useState)(B),G=Object(l.useCallback)(()=>{H(!0),b(Object(Nr.suppressSignature)(g,e))},[b,g,e]),$=D.some(({_id:t})=>t===e._id),[Y,X]=Object(l.useState)($),K=Object(l.useCallback)(()=>{X(!0),b(Object(Nr.whiteListClient)(g,e.src_ip))},[b,g,null==e?void 0:e.src_ip]);return i.a.createElement(S.a,{height:"100%",flexDirection:"column",justifyContent:"space-between",key:null==e?void 0:e._id},i.a.createElement(S.a,{flexDirection:"column",padding:"26px 32px"},i.a.createElement(v.a,{weight:"bold",color:"primary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_OVERVIEW"})),i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_DATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(Sn.e)(new Date(e.time),T,Rn.a))),i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_TIME"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(Sn.e)(new Date(e.time),T,f))),N===j?i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_TRAFFIC_LOCATION"})),i.a.createElement(v.a,{color:"secondary",size:"body"},N?i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Vr,{countryCode:(null===(c=null==e?void 0:e.srcipGeo)||void 0===c?void 0:c.country_code)||(null===(s=null==e?void 0:e.usgipGeo)||void 0===s?void 0:s.country_code),width:24,height:24,style:{borderRadius:"50%",objectFit:"cover"}}),N):i.a.createElement(R.b,{id:"COMMON_HYPHEN"}))):i.a.createElement(i.a.Fragment,null,i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_SOURCE_LOCATION"})),i.a.createElement(v.a,{color:"secondary",size:"body"},N?i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Vr,{countryCode:(null===(E=null==e?void 0:e.srcipGeo)||void 0===E?void 0:E.country_code)||(null===(m=null==e?void 0:e.usgipGeo)||void 0===m?void 0:m.country_code),width:24,height:24,style:{borderRadius:"50%",objectFit:"cover"}}),N):i.a.createElement(R.b,{id:"COMMON_HYPHEN"}))),i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_DESTINATION_LOCATION"})),i.a.createElement(v.a,{color:"secondary",size:"body"},j?i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Vr,{countryCode:(null===(d=null==e?void 0:e.dstipGeo)||void 0===d?void 0:d.country_code)||(null===(_=null==e?void 0:e.usgipGeo)||void 0===_?void 0:_.country_code),width:24,height:24,style:{borderRadius:"50%",objectFit:"cover"}}),j):i.a.createElement(R.b,{id:"COMMON_HYPHEN"})))),i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_SERVICE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},(null===(u=null==e?void 0:e.http)||void 0===u?void 0:u.hostname)||(null==e?void 0:e.inner_alert_signature)||i.a.createElement(R.b,{id:"COMMON_HYPHEN"}))),(null==e?void 0:e.catname)&&i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_CATEGORY"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Ar.a[e.catname]?i.a.createElement(R.b,{id:Ar.a[e.catname]}):e.catname)),(null==e?void 0:e.inner_alert_category)&&i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_TYPE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.inner_alert_category)),(null==e?void 0:e.src_ip)&&i.a.createElement(Lr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_SOURCE_IP"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(Ai.b)(e.src_ip,e.src_port))),(null==e?void 0:e.dest_ip)&&i.a.createElement(Lr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_DESTINATION_IP"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(Ai.b)(e.dest_ip,e.dest_port))),e.inner_alert_severity>=0&&i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_SEVERITY"})),i.a.createElement(jr,{severity:e.inner_alert_severity})),x>=0&&i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_ACTIVITY"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(Ft.a)(x))),(null==e?void 0:e.in_iface)&&i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_INTERFACE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.in_iface)),(null==e?void 0:e.proto)&&i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_PROTOCOL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.proto)),(null==e?void 0:e.dstipASN)&&i.a.createElement(xr,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"TM_ASN"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.dstipASN))),i.a.createElement(S.a,{flexDirection:"column",padding:"26px 32px"},i.a.createElement(Pr.a,{vertical:!0},i.a.createElement(oe.a,{variant:"primary",color:"danger",disabled:V||y,onClick:w,full:!0},i.a.createElement(R.b,{id:"COMMON_ACTION_BLOCK"})),i.a.createElement(oe.a,{variant:"primary",color:"danger",disabled:U||y,onClick:W,full:!0},i.a.createElement(R.b,{id:"TM_ACTION_ISOLATE"})),i.a.createElement(oe.a,{variant:"secondary",disabled:z||y,onClick:G,full:!0},i.a.createElement(R.b,{id:"TM_ACTION_ALLOW_ALL_IPS"})),i.a.createElement(oe.a,{variant:"primary",disabled:Y||y,onClick:K,full:!0},i.a.createElement(R.b,{id:"TM_ACTION_ALLOW_THIS_IP"})))))},wr={default:jt.a.OVERVIEW,singlePanel:!0,panels:{details:{path:"/details",component:({activeItem:e})=>i.a.createElement(Mr,{activeItem:e,key:null==e?void 0:e._id})}}},Fr=a(356),Ur=a(149),kr=a(1660),Wr=a(55),Br=a(428);const zr=Object(r.c)(S.a,{shouldForwardProp:e=>"isDarkMode"!==e})`
  max-width: 140px;
  width: 140px;
  flex: 140;
  height: 100%;
  max-height: 140px;
  padding: 26px;
  position: relative;
  &::after {
    position: absolute;
    content: '';
    border: 7px solid ${({theme:e})=>e.motifPalette.neutral02};
    border-radius: 100%;
    width: 172px;
    height: 172px;
    pointer-events: none;
  }

  & * > text:first-of-type {
    font-size: 28px;
  }
  & * > text:last-of-type {
    font-size: 12px;
  }
  .titleClassNameDown {
    transform: translate(8px, 9px);
    fill: ${({theme:e})=>e.motifPalette.uBlue06};
    font-size: 16px !important;
  }
  .titleClassNameUp {
    transform: translate(8px, 9px);
    fill: ${({theme:e})=>e.motifPalette.purple06};
    font-size: 16px !important;
  }
  .descriptionClassName {
    font-weight: bold;
    transform: translateY(-34px);
  }
`,Hr=Object(r.c)(f.fb)`
  position: absolute;
  top: 52%;
  left: 30px;
  color: ${({theme:e})=>{var t;return null===(t=e.motifPalette)||void 0===t?void 0:t.uBlue06}};
`,Gr=Object(r.c)(f.gb)`
  position: absolute;
  top: 52%;
  left: 30px;
  color: ${({theme:e})=>{var t;return null===(t=e.motifPalette)||void 0===t?void 0:t.purple06}};
`,$r=Object(r.c)(v.a)`
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui11};
  width: 100%;
`,Yr=Object(r.c)(S.a)`
  margin-bottom: 8px;
`,Xr=e=>i.a.createElement(i.a.Fragment,null,i.a.createElement($r,{size:"body",weight:"bold"},i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Br.a,{name:e.name,iconFileName:e.iconFileName}),e.name||i.a.createElement(R.b,{id:"COMMON_UNKNOWN"}))),i.a.createElement(Yr,{justifyContent:"space-between"},i.a.createElement(v.a,null,i.a.createElement(R.b,{id:"COMMON_TRAFFIC"})),i.a.createElement(v.a,null,Object(Ft.a)(e.value))));var Kr=Object(R.e)(({data:e,intl:t})=>{const{motif:a}=Object(Wr.a)(),n="dark"===a,[r,c]=Object(l.useMemo)(()=>e.reduce(([e,t],{bytes_received:a,bytes_transmitted:n,application:l,category:i})=>65535===l&&255===i?[e,t]:[e+(null!=a?a:0),t+(null!=n?n:0)],[0,0]),[e]),o=Object(l.useMemo)(()=>r?e.filter(({application:e,category:t})=>65535!==e&&255!==t).map(e=>({...e,id:e.application,value:e.bytes_received})):[{...e[0],name:null,iconFileName:null,id:"empty-download",value:100}],[e,r]),s=Object(l.useMemo)(()=>c?e.filter(({application:e,category:t})=>65535!==e&&255!==t).map(e=>({...e,id:e.application,value:e.bytes_transmitted})):[{...e[0],name:null,iconFileName:null,id:"empty-download",value:100}],[e,c]);return i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(zr,{justifyContent:"center",alignItems:"center",isDarkMode:n},i.a.createElement(S.a,{position:"relative"},i.a.createElement(Hr,{size:"medium"})),i.a.createElement(Ra.a,{items:o,renderTooltipMessage:Xr,tooltipProps:{position:"left"},title:Object(Ft.a)(r),description:t.formatMessage({id:"COMMON_IDENTIFIED_TRAFFIC"}),titleClassName:"titleClassNameDown",descriptionClassName:"descriptionClassName",size:140,thickness:3.5,spacer:.5})),i.a.createElement(zr,{justifyContent:"center",alignItems:"center",isDarkMode:n},i.a.createElement(S.a,{position:"relative"},i.a.createElement(Gr,{size:"medium"})),i.a.createElement(Ra.a,{items:s,renderTooltipMessage:Xr,tooltipProps:{position:"left"},title:Object(Ft.a)(c),description:t.formatMessage({id:"COMMON_IDENTIFIED_TRAFFIC"}),titleClassName:"titleClassNameUp",descriptionClassName:"descriptionClassName",size:140,thickness:3.5,spacer:.5})))});const Zr=Object(r.c)(Gt.a,{shouldForwardProp:e=>"customColor"!==e})`
  background-color: ${({customColor:e})=>e};
  margin-right: 8px;
`,qr=Object(r.c)(v.a)`
  max-width: calc(100% - 18px);
`,Jr=[{id:"name",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"TM_DATA_USAGE"})),sortable:!1,renderCell:({color:e,name:t,iconFileName:a})=>i.a.createElement(i.a.Fragment,null,i.a.createElement(Zr,{customColor:e}),i.a.createElement(qr,{size:"body",truncate:!0},i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Br.a,{name:t,iconFileName:a}),t||i.a.createElement(R.b,{id:"COMMON_UNKNOWN"})))),minWidth:140},{id:"clientsCount",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_WORD_BYTES"})),sortable:!1,renderCell:({bytes_received:e,bytes_transmitted:t})=>i.a.createElement(v.a,{color:"inherit",size:"body"},Object(Ft.a)((null!=e?e:0)+(null!=t?t:0))),minWidth:75},{id:"traffic",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_WORD_PACKETS"})),sortable:!1,renderCell:({totalPkts:e})=>i.a.createElement(v.a,{color:"inherit",size:"body"},Object(fa.a)(e,{spacer:" "})),minWidth:75}],Qr=Object(r.c)("div")`
  margin-top: 36px;
  height: 100%;

  thead tr {
    height: 32px;
  }

  & > div > div > div > div {
    overflow-x: hidden !important;
  }

  & tr {
    background-color: transparent !important;
  }
`,ec=Object(kr.a)();var tc={default:jt.a.OVERVIEW,singlePanel:!0,panels:{overview:{path:"/overview",component:({activeItem:e})=>{const t=Object(l.useMemo)(()=>e.usage_by_app.map(e=>{const t=Object(Fr.getCompoundId)({cat:e.category,app:e.application}),{name:a,iconFileName:n}=Ur.a[t]||{name:null,iconFileName:null};return{...e,name:a,iconFileName:n,color:ec(t.toString()),total:e.bytes_received+e.bytes_transmitted,totalPkts:e.packets_received+e.packets_transmitted}}).sort((e,t)=>t.total-e.total),[e]),[a,n]=Object(l.useMemo)(()=>t.reduce(([e,t],a)=>[e+a.total,t+a.totalPkts],[0,0]),[t]);return i.a.createElement(S.a,{flexDirection:"column",padding:"26px 32px"},i.a.createElement(Kr,{data:t}),i.a.createElement(Qr,null,i.a.createElement(Da.a,{items:t,columns:Jr,idField:"application",disableColumnFilters:!0,rowHeight:32,renderFooter:()=>i.a.createElement(S.a,null,i.a.createElement(S.a,{flexGrow:180},i.a.createElement(v.a,{weight:"bold",size:"body",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_TOTAL_TRAFFIC"}))),i.a.createElement(S.a,{flexGrow:87,alignItems:"center"},i.a.createElement(v.a,{weight:"bold",size:"body",color:"secondary"},Object(aa.c)(a))),i.a.createElement(S.a,{flexGrow:82,alignItems:"center"},i.a.createElement(v.a,{weight:"bold",size:"body",color:"secondary"},Object(fa.a)(n,{spacer:" "}))))})))}}}};const ac=Object(r.c)(S.a)`
  table {
    th {
      padding-left: 0;
    }
    tr {
      :hover {
        cursor: pointer;
      }
    }
    td {
      padding-left: 0;
      padding-right: 25px;
    }
  }
`,nc=Object(r.c)("div")`
  padding-top: 20px;
`,lc=Object(r.c)(f.cb)`
  margin-right: 10px;
`,ic=Object(r.c)(f.g)`
  position: absolute;
  right: 0;
`,rc=Object(r.c)("div")`
  padding-top: 10px;
`,cc=[{id:"hostnameInfo",renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HISTORY_HEADER_NAME"})),renderCell:({client:e,name:t,hostname:a,mac:n})=>i.a.createElement(S.a,{alignItems:"center",justifyContent:"center"},i.a.createElement(S.a,{height:25,minWidth:25,maxWidth:25,justifyContent:"center",alignItems:"center",marginRight:6},e?i.a.createElement(P.a,{client:e}):null),i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body",style:{width:"120px",paddingLeft:"6px",paddingRight:"6px"}},Object(xt.getClientName)(e)||t||a||n||i.a.createElement(R.b,{id:"COMMON_NA"}))),minWidth:140},{id:"date",renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HISTORY_HEADER_DATE"})),renderCell:({date:e})=>i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},e),minWidth:90},{id:"start",renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HISTORY_HEADER_TIME"})),renderCell:({start:e})=>i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},e),minWidth:70},{id:"experienceInfo",renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_EXP"})),renderCell:({experience:e})=>i.a.createElement(i.a.Fragment,null,e>=0?i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},i.a.createElement("span",{style:{color:Oa.a["color-"+Object(wt.c)(e)]}},e,"%")):i.a.createElement(R.b,{id:"COMMON_NA"}),i.a.createElement(ic,{size:"small"})),minWidth:90}];var oc=({activeItem:e})=>{const t=Object(o.useSelector)(xt.selectCombinedClientsData),{data:a,isLoading:r,error:c}=Object(o.useSelector)(Object(Ca.selectFormattedSessionData)(e.mac,!0,t||[])),s=Object(n.k)(),E=Object(l.useCallback)(()=>i.a.createElement(rc,null,a.length>0&&i.a.createElement(R.b,{id:"COMMON_TABLE_FOOTER",values:{length:a.length}})),[a.length]);return Object(Ta.g)([Object(Ca.fetchSession)(e.mac,!0)],i.a.createElement(ac,{justifyContent:"flex-start",alignItems:"center"},!r&&a.length>0&&i.a.createElement(Da.a,{items:a,disableColumnFilters:!0,columns:cc,onRowClick:({id:e})=>s.push("overview/history/"+e),rowHeight:30,renderFooter:E}),(!r||c)&&0===a.length&&i.a.createElement(nc,null,i.a.createElement(lc,null),i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HISTORY_TAB_EMPTY"}))))},sc=({activeItem:e})=>i.a.createElement(i.a.Fragment,null,Object(l.useMemo)(()=>Object(wt.d)(e.satisfaction)&&Object(b.Nc)(e)?i.a.createElement(Qt,{item:e,headerTitle:"DEVICE_HEADER_WIFI_EXPERIENCE",showGraph:!0,itemType:Ut.a.AP,canReport:!0}):null,[e]),i.a.createElement(Dl,{activeItem:e})),Ec=a(807),mc=a(490),dc=a(1045),_c=a(2630),uc=a(42),bc=a(60),pc=a(2631);const Oc=Object(r.c)("div")`
  height: 100%;
`,Ic=r.a`
  th {
    padding-right: 0;
  }
`,gc=r.a`
  :hover {
    cursor: pointer;
  }

  td {
    padding-right: 25px;
  }
`,Cc=Object(r.c)("div")`
  margin: 20px 0;
`,hc=Object(r.c)(Ec.a)`
  justify-content: flex-start;
  margin-top: 8px;

  > div {
    margin: 0;
  }
`;var Tc;!function(e){e.GENERAL="General",e.SIGNAL="Signal"}(Tc||(Tc={}));var vc;!function(e){e.NAME="name",e.CONNECTION="connection",e.EXPERIENCE_INFO="experienceInfo",e.CHANNEL="channel",e.SIGNAL="signal"}(vc||(vc={}));const fc=[{id:vc.NAME,sortable:!0,minWidth:140,label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_DOWNLINKS_TABLE_HEADER_NAME"})),renderCell:e=>i.a.createElement(S.a,{alignItems:"center",justifyContent:"center"},i.a.createElement(S.a,{alignItems:"center",justifyContent:"center",minWidth:25,maxWidth:25,height:25},e?i.a.createElement(P.a,{client:e}):null),i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body",style:{width:"150px",paddingLeft:"6px",paddingRight:"6px"}},Object(x.f)(e))),compare:Object(uc.b)(x.f)},{id:vc.CONNECTION,sortable:!0,minWidth:80,label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_NETWORK"})),renderCell:e=>i.a.createElement(v.a,{size:"body",color:"inherit",truncate:!0},Object(x.i)(e)),compare:Object(uc.b)(x.i)},{id:vc.EXPERIENCE_INFO,label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_EXP"})),renderCell:e=>i.a.createElement(_c.a,{activeItem:e}),minWidth:80,sortable:!0,compare:Object(uc.b)((e,t,a)=>Object(pc.e)(e,a))},{id:vc.CHANNEL,sortable:!0,minWidth:70,label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),renderCell:e=>i.a.createElement(v.a,{size:"body",color:"inherit",truncate:!0},e.type===p.c.WIRELESS&&e.uptime&&e.channel?e.channel:i.a.createElement(R.b,{id:"COMMON_HYPHEN"})),compare:Object(uc.b)((e,t,a)=>e.type===p.c.WIRELESS&&e.uptime&&e.channel?e.channel:Object(bc.b)(a))},{id:vc.SIGNAL,sortable:!0,minWidth:90,label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_SIGNAL"})),renderCell:e=>i.a.createElement(i.a.Fragment,null,e.type===p.c.WIRELESS&&e.uptime?i.a.createElement(na.a,{client:e,props:["signal"]},({signal:e})=>e?i.a.createElement(S.a,{alignItems:"center",width:"100%",height:"100%"},i.a.createElement(v.a,{size:"body",color:"inherit"},e," ",i.a.createElement(R.b,{id:"COMMON_UNIT_DBM"})),i.a.createElement(_n.a,{signal:e})):i.a.createElement(v.a,{size:"body",color:"inherit"},i.a.createElement(R.b,{id:"COMMON_HYPHEN"}))):i.a.createElement(v.a,{size:"body",color:"inherit"},i.a.createElement(R.b,{id:"COMMON_HYPHEN"}))),compare:Object(uc.b)((e,t,a)=>e.type===p.c.WIRELESS?e.signal:Object(bc.b)(a))}];var Rc=Object(Qa.compose)(R.e,Object(o.connect)(e=>({clientsExist:Object(mc.m)(e)}),{fetchClients:se.g}),Object(dc.a)(({clientsExist:e,fetchClients:t})=>e||t()))(({activeItem:e,params:{site:t,page:a},path:r,history:c,intl:s,hideSignalTab:E=!1})=>{const[m,d]=Object(l.useState)(Tc.GENERAL),[_,b]=Object(l.useState)(!1),O=Object(o.useDispatch)(),I=Object(o.useSelector)(Object(mc.k)(e)),g=Object(da.a)("/clients/properties/:mac/"+jt.a.OVERVIEW),h=Object(l.useMemo)(()=>m===Tc.GENERAL?I:I.filter(e=>e.type===p.c.WIRELESS),[I,m]),T=Object(l.useCallback)(e=>{if("mac"in e){const{mac:l,unifi_device:i}=e;i?(c.push(Object(n.i)(r,{id:l,page:a,panel:jt.a.OVERVIEW,section:"properties",site:t})),O(Object(C.g)({type:u.c.UNIFI_DEVICE_CLIENT,mac:l}))):c.push(g.replace(":mac",l))}},[r,a,t]);return i.a.createElement(Oc,null,!E&&i.a.createElement(hc,{tabs:(e=>[{id:Tc.GENERAL,label:e.formatMessage({id:"DEVICE_PROPERTY_HEADER_GENERAL"})},{id:Tc.SIGNAL,label:e.formatMessage({id:"COMMON_SIGNAL"})}])(s),onSelectTab:({id:e})=>d(e),selectedTab:m,variant:"tertiary"}),i.a.createElement(Da.a,{items:h,disableColumnFilters:!0,headerRowClassName:Ic,rowClassName:gc,columns:fc,columnOverride:[vc.NAME,...m===Tc.GENERAL?[vc.CONNECTION,vc.EXPERIENCE_INFO]:[vc.CHANNEL,vc.SIGNAL]],initialSortBy:"name",renderFooter:()=>I.length>0?i.a.createElement(Cc,null,i.a.createElement(R.b,{id:"COMMON_ADV_TABLE_FOOTER",values:{length:h.length>10&&!_?10:h.length,total:h.length}}),h.length>10?i.a.createElement(i.a.Fragment,null," ",i.a.createElement(oe.a,{type:"button",variant:"inline",size:"small",weight:"bold",onClick:()=>b(!_)},i.a.createElement(R.b,{id:"COMMON_SHOW"})," ",i.a.createElement(R.b,{id:_?"COMMON_LESS":"COMMON_ALL"}))):null):i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_DOWNLINKS_TABLE_NO_CLIENTS"}),rowHeight:30,onRowClick:T,rowOffset:0,rowLimit:h.length>10&&!_?10:h.length}))});const Dc=Object(r.c)(v.a)`
  white-space: nowrap;
  margin-right: 12px;
`,Sc=Object(r.c)(v.a)`
  text-align: right;
`;var yc=({condition:e,definition:t,hideOnEmpty:a,placeholder:n="...",value:l})=>Object(Ta.g)(e,l||!a?i.a.createElement(i.a.Fragment,null,i.a.createElement(Dc,{color:"secondary"},t),i.a.createElement(Sc,{color:"secondary"},l)):null,{placeholder:i.a.createElement(i.a.Fragment,null,i.a.createElement(Dc,{color:"secondary"},t),i.a.createElement(Sc,{color:"secondary"},n))}),Pc=a(30);const Ac=Object(mn.a)(on.selectAPGroupsData,Pc.selectWifiNetworksData,g.c,(e,t,a)=>e.filter(e=>e.device_macs.includes(a)).reduce((e,a)=>[...e,...t.filter(e=>e.ap_group_ids.includes(a._id))],[])),Nc=Object(r.c)(v.a)`
  max-width: 200px;
`;const jc=Object(r.c)(v.a)`
  max-width: 200px;
`;const xc=Object(r.c)(v.a)`
  max-width: 200px;
`;var Lc=({activeItem:{"user-num_sta":e,satisfaction:t}})=>Object(wt.d)(t)?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_CLIENTS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e||0)):null,Vc=({activeItem:{"guest-num_sta":e,satisfaction:t}})=>Object(wt.d)(t)?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_GUESTS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e||0)):null,Mc=({activeItem:e})=>i.a.createElement(rl,null,[{C:({activeItem:e,flexProps:t})=>{const a=Object(wt.d)(null==e?void 0:e.satisfaction),{na:n,ng:l,naNumSta:r,ngNumSta:c}=Object(Ce.getSatisfactionByRadio)(e);return a?i.a.createElement(la,{flexProps:{...t,flexDirection:"column",marginBottom:0}},i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_WIFI_EXPERIENCE_2G"})),c&&0!==l?i.a.createElement(ta.a,{size:"body",type:"percent",input:Math.min(l,100)/100,style:{color:Oa.a["color-"+Object(wt.c)(Math.min(l,100))]}}):i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_NA"}))),i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_WIFI_EXPERIENCE_5G"})),r&&0!==n?i.a.createElement(ta.a,{size:"body",type:"percent",input:Math.min(n,100)/100,style:{color:Oa.a["color-"+Object(wt.c)(Math.min(n,100))]}}):i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_NA"})))):null}},{C:Qn},{C:el},{C:tl},{C:il},{C:()=>{const e=Object(o.useSelector)(Ac),t=Object(Pc.getWifiNetworkNames)(e,!1).sort().join(", ");return t?i.a.createElement(la,null,i.a.createElement(yc,{value:i.a.createElement(Nc,{size:"body",truncate:!0},t),condition:[Object(on.fetchAPGroups)(void 0,{crudCacheStrategy:{type:me.a.CACHE}}),Object(Pc.fetchWifiNetworks)(void 0,{crudCacheStrategy:{type:me.a.CACHE}})],definition:i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_MEMBERSHIP_WIFI"}))})):null}},{C:()=>{const e=Object(o.useSelector)(Ac),t=Object(Pc.getWifiNetworkNames)(e,!0).sort().join(", ");return t?i.a.createElement(la,null,i.a.createElement(yc,{value:i.a.createElement(jc,{size:"body",truncate:!0},t),condition:[Object(on.fetchAPGroups)(void 0,{crudCacheStrategy:{type:me.a.CACHE}}),Object(Pc.fetchWifiNetworks)(void 0,{crudCacheStrategy:{type:me.a.CACHE}})],definition:i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_MEMBERSHIP_HOTSPOT"})),hideOnEmpty:!0})):null}},{C:({activeItem:{mac:e},flexProps:t})=>{const a=Object(o.useSelector)(Object(on.selectAPGroupsByDeviceMac)(e)),n=a&&a.map(({name:e})=>e).sort().join(", ");return n?i.a.createElement(la,{flexProps:t},i.a.createElement(yc,{value:i.a.createElement(xc,{size:"body",truncate:!0},n),condition:[Object(on.fetchAPGroups)(void 0,{crudCacheStrategy:{type:me.a.CACHE}})],definition:i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_MEMBERSHIP_AP_GROUP"}))})):null}},{C:Lc},{C:Vc}].map(({C:t})=>i.a.createElement(t,{activeItem:e,key:t.name}))),wc=a(66),Fc=a(570),Uc=Object(R.e)(({activeItem:e,radio:t,intl:a})=>{const n=Object(Ce.getRadioStatsTransmitPowerString)(e,null==e?void 0:e.radio_table_stats.find(e=>e.radio===t),a);return n?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TRANSMIT_POWER"})),i.a.createElement(v.a,{color:"secondary",size:"body"},n)):null});const kc=Object(r.c)(v.a)`
  margin-bottom: ${({theme:e})=>e.spacing["spacing-xs"]};
`,Wc=Object(r.c)("div")`
  &:not(:last-child) {
    margin-bottom: ${({theme:e})=>e.spacing["spacing-xl"]};
  }
`;var Bc=({activeItem:e,radio:t})=>i.a.createElement(Wc,null,i.a.createElement(kc,{weight:"bold",size:"body"},i.a.createElement(R.a,{id:(e=>{switch(t){case wc.b.RADIO_NG:return"DEVICE_HEADER_RADIO2G_SHORT";case wc.b.RADIO_NA:return"DEVICE_HEADER_RADIO5G_SHORT";case wc.b.RADIO_AD:return"DEVICE_HEADER_RADIO60G_SHORT";case wc.b.RADIO_6E:return"DEVICE_HEADER_RADIO6G_SHORT";default:return"COMMON_UNKNOWN"}})()})),i.a.createElement(rl,null,[{C:({activeItem:e,radio:t})=>i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(Fc.a,{device:e,radio:e.radio_table.find(e=>e.radio===t),hidePowerInfo:!0})))},{C:Uc},{C:({activeItem:e,radio:t})=>{const{totalPackets:a,totalBytes:n}=Object(Ce.getApRadioStats)(e,e.radio_table.find(e=>e.radio===t),"tx");return i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},a," / ",n))}},{C:({activeItem:e,radio:t})=>{var a;const{totalPackets:n,totalBytes:l}=Object(Ce.getApRadioStats)(e,null===(a=null==e?void 0:e.radio_table)||void 0===a?void 0:a.find(e=>e.radio===t),"rx");return i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},n," / ",l))}},{C:({activeItem:e,radio:t})=>{const{retryPercentage:a,droppedPercentage:n}=Object(Ce.getApRadioStats)(e,e.radio_table.find(e=>e.radio===t),"tx");return i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED"})),i.a.createElement(v.a,{color:"secondary",size:"body"},a,"% / ",n,"%"))}},{C:({activeItem:e,radio:t})=>{const{retryPercentage:a,droppedPercentage:n}=Object(Ce.getApRadioStats)(e,e.radio_table.find(e=>e.radio===t),"rx");return i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED"})),i.a.createElement(v.a,{color:"secondary",size:"body"},a,"% / ",n,"%"))}},{C:({activeItem:e,radio:t,flexProps:a})=>{var n;const l=Object(Ce.getRadioChannelUtilization)(e,null===(n=null==e?void 0:e.radio_table_stats)||void 0===n?void 0:n.find(e=>e.radio===t));return l?i.a.createElement(la,{flexProps:a},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION"})),i.a.createElement(v.a,{color:"secondary",size:"body"},`${l.total}% / ${l.selfRx}% / ${l.selfTx}%`)):null},flexProps:{}},{C:({activeItem:e,radio:t})=>{var a,n;return i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_CLIENTS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null===(n=null===(a=null==e?void 0:e.radio_table_stats)||void 0===a?void 0:a.find(e=>e.radio===t))||void 0===n?void 0:n["user-num_sta"]))}},{C:({activeItem:e,radio:t})=>{var a,n;return i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_GUESTS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null===(n=null===(a=null==e?void 0:e.radio_table_stats)||void 0===a?void 0:a.find(e=>e.radio===t))||void 0===n?void 0:n["guest-num_sta"]))}}].map(({C:a,flexProps:n={}})=>i.a.createElement(a,{activeItem:e,radio:t,flexProps:n,key:`${a.name}-${t}`})))),zc=a(2767);const Hc=Object(r.c)("div")`
  table {
    thead {
      tr {
        th {
          &:nth-of-type(2) {
            left: -32px;
          }
        }
      }
    }
  }
`,Gc=Object(r.c)(S.a)`
  border-bottom: 1px solid ${({theme:e})=>e.colors.dashboardBorder};
`,$c=Object(r.c)(f.Oc)`
  margin-right: 4px;
  margin-top: 6px;
`;var Yc,Xc;!function(e){e.HIERARCHY="hierarchy",e.RADIO_NAME="radio_name",e.ESSID="essid",e.BSSID="bssid"}(Yc||(Yc={})),function(e){e.RADIO_GROUP="radio_group",e.BSSID_ESSID="bssid/essid",e.BW="bw",e.CHANNEL="channel"}(Xc||(Xc={}));var Kc=({activeItem:e})=>{var t;return(null===(t=null==e?void 0:e.vap_table)||void 0===t?void 0:t.length)?i.a.createElement(Hc,null,i.a.createElement(Da.a,{hideCellOverflow:!1,items:e.vap_table.reduce((e,t)=>{const a=e.findIndex(({channel:e})=>e===t.channel),n={[Yc.HIERARCHY]:!0,[Yc.BSSID]:t.bssid,[Yc.ESSID]:t.essid};return a>=0?(e[a]={...e[a],children:[...e[a].children,{...n}]},e):(e.push({...t,idField:`${t.id}-${t.essid}-${t.bssid}`,children:[{...n}]}),e)},[]),idField:"idField",disableColumnFilters:!0,columns:[{id:Xc.RADIO_GROUP,minWidth:23,renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_RADIOS_TABLE_HEADER_RADIO_GROUP"})),renderCell:({radio:e,channel:t,hierarchy:a,essid:n})=>{var l,r;return a?i.a.createElement(S.a,{width:"100%",alignItems:"center"},i.a.createElement($c,{isActive:!0}),i.a.createElement(v.a,{size:"body",truncate:!0,color:"inherit"},n)):i.a.createElement(S.a,{justifyContent:"space-between",height:"100%",width:"100%",alignItems:"center"},i.a.createElement(S.a,{marginRight:8,alignItems:"center"},i.a.createElement(v.a,{size:"body",color:"inherit"},i.a.createElement(R.a,{id:`DEVICE_HEADER_RADIO${null===(l=Pc.WlanBand[null==e?void 0:e.toUpperCase()])||void 0===l?void 0:l.toUpperCase()}_SHORT`})),(r=[{label:"DEVICE_PROPERTIES_AP_WLANS_LOW_BANDS_LABEL_SHORT",range:[36,64]},{label:"DEVICE_PROPERTIES_AP_WLANS_MID_BANDS_LABEL_SHORT",range:[100,128]},{label:"DEVICE_PROPERTIES_AP_WLANS_HIGH_BANDS_LABEL_SHORT",range:[149,165]}].find(({range:[e,a]})=>Object(zc.a)(t,e,a)))&&i.a.createElement(v.a,{size:"body",color:"inherit",whiteSpacePreWrap:!0},i.a.createElement(R.b,{id:r.label}))),i.a.createElement(rn.a,{message:i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(Gc,{paddingBottom:12},i.a.createElement(v.a,{size:"body",weight:"bold",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_HEADER_CHANNELS"}))),i.a.createElement(S.a,{marginTop:12,flexDirection:"column"},i.a.createElement(S.a,{marginBottom:6,justifyContent:"space-between"},i.a.createElement(v.a,{size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_WLANS_LOW_BANDS_LABEL"})),i.a.createElement(v.a,{size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_WLANS_LOW_BANDS_RANGE"}))),i.a.createElement(S.a,{marginBottom:6,justifyContent:"space-between"},i.a.createElement(v.a,{size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_WLANS_MID_BANDS_LABEL"})),i.a.createElement(v.a,{size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_WLANS_MID_BANDS_RANGE"}))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_WLANS_HIGH_BANDS_LABEL"})),i.a.createElement(v.a,{size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_WLANS_HIGH_BANDS_RANGE"}))))),width:180,position:"top"},i.a.createElement(f.cb,{isActive:!0})))}},{id:Xc.BSSID_ESSID,minWidth:25,renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_RADIOS_TABLE_HEADER_BSSID_ESSID"})),renderCell:({hierarchy:e,bssid:t})=>e&&i.a.createElement(v.a,{size:"body",color:"inherit",truncate:!0},t)},{id:Xc.BW,minWidth:20,renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_RADIOS_TABLE_HEADER_BW"})),renderCell:({bw:e})=>e&&i.a.createElement(v.a,{size:"body",color:"inherit"},e," ",i.a.createElement(R.b,{id:"COMMON_UNIT_MHZ"}))},{id:Xc.CHANNEL,minWidth:15,renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),renderCell:({channel:e})=>i.a.createElement(v.a,{size:"body",color:"inherit"},e)}]})):null};const Zc=Object(r.c)(oe.a)`
  font-weight: normal;
  padding: 0;
  margin: 0;
  height: initial;
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
`,qc=()=>i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_UPLINK"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_HYPHEN"})));var Jc=({uplinkDevice:e,uplinkName:t,params:a,path:r,history:c})=>{const s=Object(o.useDispatch)(),{site:E,page:m,subPage:d}=a,{mac:_}=e,b=Object(l.useCallback)(e=>{e.preventDefault(),e.stopPropagation();const t=Object(n.i)(r,{id:_,site:E,page:m,panel:jt.a.OVERVIEW,subPage:d});c.push(t),s(Object(C.g)({type:u.c.DEVICE,mac:_}))},[]);return i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_UPLINK"})),i.a.createElement(Zc,{variant:"link",onClick:b},t))},Qc=({activeItem:e,flexProps:t})=>{const a=Object(o.useSelector)(Ce.selectDevicesData),n=Object(Ce.getUplinkRemotePort)(a,e);return i.a.createElement(la,{flexProps:t},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_POWER"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:(null==n?void 0:n.poe_power)||0}})))},eo=({uplink:{rx_packets:e,rx_bytes:t}})=>i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_DOWN_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e&&t?i.a.createElement(i.a.Fragment,null,i.a.createElement(ta.a,{size:"body",type:"number",input:e,color:"secondary"})," / ",Object(aa.c)(t)):"- / -")),to=({uplink:{tx_packets:e,tx_bytes:t}})=>i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_UP_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e&&t?i.a.createElement(i.a.Fragment,null,i.a.createElement(ta.a,{size:"body",type:"number",input:e,color:"secondary"})," / ",Object(aa.c)(t)):"- / -")),ao=({uplink:{"rx_bytes-r":e,"tx_bytes-r":t}},a=!0)=>a?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_ACTIVITY"})),i.a.createElement(ta.a,{size:"body",color:"secondary",type:"bytes",input:t+e||0,options:"bitrate"})):i.a.createElement(i.a.Fragment,null,i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_DOWN_ACTIVITY"})),i.a.createElement(ta.a,{size:"body",type:"bytes",input:e||0,options:"bitrate",color:"secondary"})),i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_UP_ACTIVITY"})),i.a.createElement(ta.a,{size:"body",type:"bytes",input:t||0,options:"bitrate",color:"secondary"}))),no=function(e){let t=parseFloat(""+e);return t?""+(0===(t=((t=Math.min(45,Math.max(t,5)))-5)/40*99)?"0":t.toPrecision(2)):""},lo=function(e){return"number"==typeof e?e-95:0},io=({uplink:{rssi:e}})=>i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_SIGNAL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},no(e)," (",lo(e),i.a.createElement(R.b,{id:"COMMON_DEVICE_RADIO_TRANSMIT_POWER_DBM"}),")")),ro=({uplink:{tx_rate:e}})=>i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_DOWNLINKS_TABLE_HEADER_TX_RATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(ta.a,{type:"bytes",input:1e3*e/8,options:"bitrate",color:"secondary"}))),co=({activeItem:e,flexProps:t})=>i.a.createElement(la,{flexProps:t},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_RX_RATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(ta.a,{type:"bytes",input:1e3*e.uplink.rx_rate/8,options:"bitrate",color:"secondary"}))),oo=({activeItem:e,params:t,path:a,history:n})=>{const l=Object(o.useSelector)(t=>Object(Ce.getUplink)(Object(Ce.selectDevicesData)(t),e)),r=Object(Ce.getUplinkDisplayName)(e,l),c=Object(Ce.getUplinkAttrs)(e)||{},s="wire"===e.uplink.type?[(null==l?void 0:l.mac)?{C:Jc,props:{uplinkDevice:l,uplinkName:r,params:t,path:a,history:n}}:{C:qc},{C:zl,props:{uplink:c}},{C:Qc,props:{activeItem:e},flexProps:{}},{C:eo,props:{uplink:c}},{C:to,props:{uplink:c}},{C:ao,props:{uplink:c}}]:[(null==l?void 0:l.mac)?{C:Jc,props:{uplinkDevice:l,uplinkName:r,params:t,path:a,history:n}}:{C:qc},{C:io,props:{uplink:c}},{C:ro,props:{uplink:c}},{C:co,props:{activeItem:e},flexProps:{}},{C:eo,props:{uplink:c}},{C:to,props:{uplink:c}},{C:ao,props:{uplink:c}}];return i.a.createElement(rl,null,s.map(({C:e,props:t,flexProps:a={}})=>i.a.createElement(e,Object.assign({},t,{flexProps:a,key:e.name}))))};const so=Object(r.c)(Ia.a)`
  padding: 10px 30px;
`;var Eo=a(128),mo=a(181),_o=a(94),uo=a(754),bo=a(178),po=a(211);const Oo=Object(r.c)(v.a)`
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
`,Io=Object(r.c)(v.a)`
  flex: 1;
  margin-right: 12px;
`,go=Object(r.c)("div")`
  margin-bottom: ${e=>e.marginBottom||0}px;
`,Co=Object(r.c)(S.a)`
  margin-bottom: ${e=>e.marginBottom||0}px;
  justify-content: space-between;
`,ho=Object(r.c)(oe.a)`
  span {
    margin-left: 3px !important;
  }
`,To=Object(r.c)(Ge.Field)`
  margin-right: 18px;
`,vo=Object(Me.f)({mapPropsToValues:({switchDeviceData:e,nativeNetworks:t,radiusProfiles:a,radiusSettings:n})=>{const{jumboframe_enabled:l=!1,flowctrl_enabled:i=!1,stp_version:r="rstp",stp_priority:c="32768",dot1x_portctrl_enabled:o=!1,radiusprofile_id:s="",dot1x_fallback_networkconf_id:E="",snmp_location:m="",snmp_contact:d="",outdoor_mode_override:_=Ce.OutdoorModeOverride.DEFAULT,power_source_ctrl:u=Ce.POWER_SOURCE_OPTIONS.AUTO,power_source_ctrl_enabled:b=!1}=e;return{mgmt_network_id:Object(Ce.getDeviceNetworkId)(t,e),jumboframe_enabled:l,flowctrl_enabled:i,stp_version:r,stp_priority:c,dot1x_portctrl_enabled:o,radiusprofile_id:s,radiusProfiles:a,radiusSettings:n,dot1x_fallback_networkconf_id:E,snmp_location:m,snmp_contact:d,outdoor_mode_override:_,power_source_ctrl:u,power_source_ctrl_enabled:b}},validationSchema:en.a.object().shape({mgmt_network_id:en.a.string(),flowctrl_enabled:en.a.boolean(),stp_version:en.a.string(),stp_priority:en.a.string(),dot1x_portctrl_enabled:en.a.boolean(),snmp_contact:en.a.string(),snmp_location:en.a.string(),radiusprofile_id:en.a.string().when("dot1x_portctrl_enabled",{is:!0,then:en.a.string().isAllowedDefaultRadiusProfile("COMMON_VALIDATION_VALID_DEFAULT_RADIUS_PROFILE").required("COMMON_VALIDATION_FIELD_REQUIRED")}),radiusProfiles:en.a.array().of(en.a.object()),radiusSettings:en.a.object(),dot1x_fallback_networkconf_id:en.a.string(),outdoor_mode_override:en.a.string(),power_source_ctrl:en.a.string(),power_source_ctrl_enabled:en.a.boolean()}),handleSubmit:()=>null}),fo=[{label:"DEVICE_PROPERTIES_VALUES_SPANNING_TREE_STP",value:"stp"},{label:"DEVICE_PROPERTIES_VALUES_SPANNING_TREE_RSTP",value:"rstp"},{label:"DEVICE_PROPERTIES_VALUES_SPANNING_TREE_DISABLED",value:"disabled"}];var Ro=Object(Qa.compose)(Object(o.connect)((e,{activeItem:t})=>({nativeNetworks:Object(an.selectNativeNetworks)(e),switchDeviceData:Object(Ce.selectDeviceData)(e,t.mac),radiusOptions:Object(bo.selectRadiusOptions)(e),radiusProfiles:Object(bo.selectRadiusProfiles)(e),radiusSettings:Object(nr.selectRadiusSettings)(e)}),{updateDevice:Ce.updateDevice,fetchRadiusProfiles:po.fetchRadiusProfiles}),R.e,vo,Object(uo.b)(({fetchRadiusProfiles:e})=>e()))(({activeItem:e,values:t,errors:a,resetForm:r,dirty:c,setFormDirty:s,setFormInvalid:E,setFieldValue:m,nativeNetworks:_=[],initialValues:u,radiusOptions:b,radiusProfiles:p,isValid:O,hideFlowControl:I,intl:g,formName:h="services"})=>{const T=Object(o.useDispatch)(),D=Object(n.k)(),y=Object(o.useSelector)(oa.b),P=Object(o.useSelector)(d.i),A=Object(n.i)(P,{site:y}),N=Object(_o.x)(e),j=Object(_o.r)(e),x=Object(o.useSelector)(sl.e),L=Object(Ce.getDeviceModelFeature)(e,"outdoorModeSupport")&&x,V=Object(Ce.isGateway)(e),M=Object(_o.w)(e),w=null==p?void 0:p.length;Object(l.useEffect)(()=>{if((!t.radiusProfiles||!t.radiusProfiles.length)&&w){let{radiusprofile_id:e}=t;t.radiusprofile_id||b.find(e=>e.value===t.radiusprofile_id)||(e=b[0].value),r({values:{...u,radiusprofile_id:e,radiusProfiles:p}})}},[p]),Object(l.useEffect)(()=>{s(h,c),E(h,!O)},[E,s,c,O,h]),Object(l.useEffect)(()=>(T(Object(C.h)({[h]:()=>({snmp_contact:t.snmp_contact,snmp_location:t.snmp_location,...!V&&{mgmt_network_id:t.mgmt_network_id},...!I&&{jumboframe_enabled:t.jumboframe_enabled,flowctrl_enabled:t.flowctrl_enabled},...N&&{stp_version:t.stp_version,stp_priority:t.stp_priority},...j&&{dot1x_portctrl_enabled:t.dot1x_portctrl_enabled},...t.dot1x_portctrl_enabled&&j&&{radiusprofile_id:t.radiusprofile_id,dot1x_fallback_networkconf_id:t.dot1x_fallback_networkconf_id},...L&&{outdoor_mode_override:t.outdoor_mode_override},...M&&{power_source_ctrl:t.power_source_ctrl,power_source_ctrl_enabled:t.power_source_ctrl!==Ce.POWER_SOURCE_OPTIONS.AUTO}})})),T(Object(C.j)({[h]:()=>r({values:t})})),T(Object(C.i)({[h]:r})),()=>{T(Object(C.h)({[h]:null})),T(Object(C.j)({[h]:null})),T(Object(C.i)({[h]:null}))}),[e._id,T,r,t,h,j,N,V,I,L,M]);const F=Object(l.useMemo)(()=>_.map(e=>({value:e._id,label:e.name})),[_]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{width:"100%",flexDirection:"column",flex:"1 1 85%"},!V&&i.a.createElement(go,{marginBottom:24},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_LABEL_MGMT_VLAN",name:"mgmt_network_id",type:"dropdown",variant:"secondary",full:!0,validated:!0,options:F,translateLabel:!0})),!I&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Co,{marginBottom:8},i.a.createElement(Io,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_JUMBO_FRAMES"})),i.a.createElement(Ge.Field,{name:"jumboframe_enabled",type:"checkbox"})),i.a.createElement(Co,{marginBottom:16},i.a.createElement(Io,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_FLOW_CONTROL"})),i.a.createElement(Ge.Field,{name:"flowctrl_enabled",type:"checkbox"}))),N&&i.a.createElement(i.a.Fragment,null,i.a.createElement(go,{marginBottom:32},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_LABEL_SPANNING_TREE",name:"stp_version",full:!0,type:"dropdown",variant:"secondary",translateOptions:!0,translateLabel:!0,options:fo})),i.a.createElement(Oo,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_SECURITY"})),"disabled"!==t.stp_version&&i.a.createElement(go,{marginBottom:16},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_LABEL_PRIORITY",name:"stp_priority",type:"dropdown",variant:"secondary",full:!0,validated:!0,options:Ce.SPANNING_TREES.map(e=>({label:e,value:e})),translateLabel:!0}))),j&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Co,{marginBottom:32},i.a.createElement(Io,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_8021X_CONTROL"})),i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_VALUES_ENABLE_8021X_CONTROL",name:"dot1x_portctrl_enabled",type:"checkbox"})),t.dot1x_portctrl_enabled&&i.a.createElement(i.a.Fragment,null,i.a.createElement(go,{marginBottom:16},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_LABEL_RADIUS_PROFILE",name:"radiusprofile_id",type:"dropdown",variant:"secondary",full:!0,options:b,invalid:!!a.radiusprofile_id,translateLabel:!0}),!!a.radiusprofile_id&&i.a.createElement(Ge.ValidationMessage,{align:"left",visible:!0,translation:"COMMON_VALIDATION_VALID_DEFAULT_RADIUS_PROFILE"})),i.a.createElement(Co,{alignSelf:"flex-end"},i.a.createElement(ho,{size:"small",type:"button",variant:"inline",onClick:()=>{D.push(`${A}${xn.a.advancedSettingsRadiusProfileForm}`)}},i.a.createElement(f.p,{height:20,width:20}),i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CREATE_RADIUS_PROFILE"}))),i.a.createElement(go,{marginBottom:16},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_LABEL_FALLBACK_VLAN",name:"dot1x_fallback_networkconf_id",type:"dropdown",variant:"secondary",full:!0,validated:!0,options:[{label:g.formatMessage({id:"COMMON_NONE"}),value:""},...F],translateLabel:!0})),i.a.createElement(Co,{alignSelf:"flex-end"},i.a.createElement(ho,{size:"small",type:"button",variant:"inline",onClick:()=>{D.push(`${A}${xn.a.networkSettingsForm}`)}},i.a.createElement(f.p,{height:20,width:20}),i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_CREATE_FALLBACK_VLAN"}))))),Object(_o.n)(e)&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Oo,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_SNMP"})),i.a.createElement(go,{marginBottom:24},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_LABEL_SNMP_ENTER_LOCATION",name:"snmp_location",full:!0,variant:"secondary"})),i.a.createElement(go,{marginBottom:24},i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_LABEL_SNMP_ENTER_CONTACT",name:"snmp_contact",full:!0,variant:"secondary"}))),M&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Oo,{weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_POWER_SOURCE"})),i.a.createElement(go,{marginBottom:L?24:0},i.a.createElement(To,{type:"radio",name:"power_source_ctrl",value:Ce.POWER_SOURCE_OPTIONS.AUTO},i.a.createElement(v.a,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_POWER_SOURCE_AUTO"}))),i.a.createElement(To,{type:"radio",name:"power_source_ctrl",value:Ce.POWER_SOURCE_OPTIONS.POE_8023AF},i.a.createElement(v.a,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_POWER_SOURCE_POE_8023AF"}))),i.a.createElement(To,{type:"radio",name:"power_source_ctrl",value:Ce.POWER_SOURCE_OPTIONS.POE_INJECTOR},i.a.createElement(v.a,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_POWER_SOURCE_POE_INJECTOR"}))))),L&&i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"flex-start"},i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(Io,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_OUTDOOR_MODE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_OUTDOOR_MODE_DESCRIPTION"}))),i.a.createElement(Ge.Field,{type:"checkbox",name:"outdoor_mode_override",value:t.outdoor_mode_override===Ce.OutdoorModeOverride.ON,afterChange:e=>{m("outdoor_mode_override",e?Ce.OutdoorModeOverride.ON:Ce.OutdoorModeOverride.OFF)}}))))}),Do=a(2760),So=a(2761),yo=a(852);const Po=Object(r.c)(S.a)`
  margin-bottom: 20px;
`,Ao=Object(r.c)(v.a)`
  margin-bottom: 6px;
`,No=Object(Me.f)({isInitialValid:!0,mapPropsToValues:({activeItem:e,formName:t="screen"})=>({[t]:{led_override:e.led_override||Ce.LedOverride.ON,led_override_color_brightness:e.led_override_color_brightness||Ce.DEFAULT_LED_BRIGHTNESS,led_override_color:e.led_override_color||Ce.DEFAULT_LED_COLOR}}),validationSchema:en.a.object().shape({led_override:en.a.string(),led_override_color_brightness:en.a.number(),led_override_color:en.a.string()}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}});var jo=Object(Qa.compose)(R.e,No)(({activeItem:e,setFormDirty:t,values:a,dirty:n,resetForm:r,setFieldValue:c,formName:s="screen",disableLedOverrideField:E,disableLedOverrideColor:m,disableLedBrightnessField:d,intl:_})=>{const u=Object(o.useDispatch)(),b=Object(_o.m)(e);return Object(l.useEffect)(()=>{t(s,n)},[t,n,s]),Object(l.useEffect)(()=>(u(Object(C.h)({[s]:()=>{const e=Object(yo.a)(a,s);return{...a[s],...e}}})),u(Object(C.j)({[s]:()=>{r({values:a})}})),u(Object(C.i)({[s]:r})),()=>{u(Object(C.h)({[s]:null})),u(Object(C.j)({[s]:null})),u(Object(C.i)({[s]:null}))}),[u,s,r,a]),i.a.createElement(i.a.Fragment,null,!E&&i.a.createElement(Po,{justifyContent:"space-between"},i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ENABLE_LED"}))),i.a.createElement(cn.a,{type:"checkbox",name:s+".led_override",value:a[s].led_override===Ce.LedOverride.ON,afterChange:e=>{c(s+".led_override",e?Ce.LedOverride.ON:Ce.LedOverride.OFF)}})),!d&&b&&i.a.createElement(i.a.Fragment,null,i.a.createElement(v.a,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LED_BRIGHTNESS"})),i.a.createElement(Po,null,i.a.createElement(Do.a,{size:"large",value:a[s].led_override_color_brightness,withValueIndicator:!0,valueIndicatorPosition:"right",formatValueIndicatorContent:e=>i.a.createElement(v.a,{color:"secondary",size:"body"},e,"%"),onChange:e=>{c(s+".led_override_color_brightness",+e.target.value)}}))),!m&&b&&i.a.createElement(Po,{justifyContent:"space-between"},i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(Ao,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_COLOR"})),i.a.createElement(So.a,{color:a[s].led_override_color,variant:"block",onChange:e=>{c(s+".led_override_color","hex"in e?e.hex:void 0)},hexLabel:_.formatMessage({id:"DEVICE_PROPERTIES_LABEL_HEX"}),actionButton:i.a.createElement(oe.a,{variant:"inline",onClick:()=>{c(s+".led_override_color",Ce.DEFAULT_LED_COLOR)}},i.a.createElement(R.b,{id:"COMMON_VALUE_REVERT_BUTTON"}))}))))}),xo=a(197);const Lo=(e,t)=>{if(!t)return Object(_o.e)(e,Ce.WIFI_CAPS.HIDE_CH_WIDTH);const a=null==e?void 0:e.hide_ch_width;return!!a&&("all"===a||a===t)};var Vo=a(569);const Mo=Object(r.c)("div")`
  height: 100%;
`,wo=r.a`
  th {
    padding-left: 0;
    padding-right: 0;
  }
`,Fo=r.a`
  :hover {
    cursor: pointer;
  }
  td {
    padding-left: 0;
    padding-right: 25px;
  }
`,Uo=Object(r.c)("div")`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  white-space: pre;
`,ko=Object(r.c)("div")`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  color: ${({theme:e})=>e.colors.primary};
`,Wo=Object(r.c)("div")`
  margin-top: 16px;
`,Bo=({device:e})=>{const t=Object(o.useDispatch)();return i.a.createElement(ko,{onClick:a=>{a.preventDefault(),a.stopPropagation(),t(Object(C.g)({type:u.c.DEVICE,mac:e.mac}))}},i.a.createElement(Vo.a,{device:e}))},zo=[{id:"nameInfo",sortable:!0,minWidth:40,renderLabel:()=>i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_UPLINKS_TABLE_HEADER_AP"})),renderCell:e=>i.a.createElement(Bo,{device:e})},{id:"channel",sortable:!0,minWidth:30,maxWidth:90,renderLabel:()=>i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),renderCell:({channel:e})=>i.a.createElement(v.a,{color:"inherit",size:"body"},e)},{id:"rssiInfo",sortable:!0,minWidth:40,maxWidth:80,renderLabel:()=>i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_SIGNAL"})),renderCell:({rssi:e})=>i.a.createElement(Uo,null,no(e)," (",lo(e),i.a.createElement(R.b,{id:"COMMON_DEVICE_RADIO_TRANSMIT_POWER_DBM"}),")")}];var Ho=function({items:e}){return i.a.createElement(Mo,null,i.a.createElement(Da.a,{items:e,disableColumnFilters:!0,disableSelection:!0,disableTextPointer:!0,headerRowClassName:wo,rowClassName:Fo,columns:zo,idField:"mac",rowHeight:30}),!e.length&&i.a.createElement(Wo,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_UPLINKS_TABLE_EMPTY"}))))};const Go=-67,$o=-77,Yo=-90,Xo=[{value:"auto",label:"COMMON_VALUE_AUTO"},{value:"manual",label:"COMMON_VALUE_MANUAL"}],Ko=[{value:Ce.BandsteeringMode.OFF,label:"DEVICE_PROPERTIES_AP_BAND_STEER_OFF"},{value:Ce.BandsteeringMode.PREFER_5G,label:"DEVICE_PROPERTIES_AP_BAND_STEER_PREFER_5G"},{value:Ce.BandsteeringMode.EQUAL,label:"DEVICE_PROPERTIES_AP_BAND_STEER_BALANCED"}],Zo=Object(r.c)(S.a)`
  margin-bottom: 16px;

  > span {
    text-transform: none;
  }
`,qo=Object(r.c)("div",{shouldForwardProp:e=>!["marginBottom","marginTop"].includes(e)})`
  margin-bottom: ${({marginBottom:e})=>e||0}px;
  margin-top: ${({marginTop:e})=>e||0}px;
`,Jo=Object(r.c)(v.a)`
  flex: 1;
  margin-right: 12px;
`,Qo=Object(r.c)(f.Vb)`
  padding-right: ${({theme:e})=>e.spacing["spacing-xs"]};
  color: ${({theme:e})=>e.motifPalette.aqua08};
`,es=Object(r.c)(f.Wb)`
  padding-right: ${({theme:e})=>e.spacing["spacing-xs"]};
  color: ${({theme:e})=>e.motifPalette.aqua07};
`,ts=Object(r.c)(f.Xb)`
  padding-right: ${({theme:e})=>e.spacing["spacing-xs"]};
  color: ${Oa.a["purple-1"]};
`,as=Object(r.c)(f.cb)`
  margin-left: 4px;
`,ns=Object(r.c)(rn.a)`
  width: 100%;
`,ls=Object(r.c)(S.a)`
  > div {
    display: flex;
    align-items: center;
  }
`,is=[{value:"auto",label:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_AUTO"},{value:"high",label:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_HIGH"},{value:"medium",label:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_MEDIUM"},{value:"low",label:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_LOW"},{value:"custom",label:"DEVICE_PROPERTIES_AP_RADIO_POWER_OPTION_CUSTOM"}],rs=()=>{const e=Object(xe.a)("wifi",!0);return i.a.createElement(Jo,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_RADIO_GLOBAL_AP_SETTINGS_INFO",values:{url:e}}))},cs=()=>{const e=Object(xe.a)("wifi",!0);return i.a.createElement(Jo,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_RADIO_CHANNEL_OPTIMIZATION_SETTINGS_INFO",values:{url:e}}))};const os=e=>({value:"",label:e.formatMessage({id:"COMMON_VALUE_AUTO"})}),ss=(e,t,a,n)=>({priorityUplinkOptions1:[os(e)].concat(...t.filter(e=>!e.value||e.value!==n)),priorityUplinkOptions2:[os(e)].concat(...t.filter(e=>!e.value||e.value!==a))}),Es=(e,t,a,n)=>{var l,i;const{priorityUplinkOptions1:r,priorityUplinkOptions2:c}=ss(e,t,a,n);return{priorityUplink1:a&&(null===(l=r.find(e=>(null==e?void 0:e.value)===a))||void 0===l?void 0:l.value)||"",priorityUplink2:n&&(null===(i=c.find(e=>(null==e?void 0:e.value)===n))||void 0===i?void 0:i.value)||""}},ms=Object(Me.f)({mapPropsToValues:({activeItem:e,intl:t,priorityUplinkOptions:a})=>{var n,l;const{atf_enabled:i,mesh_uplink_1:r,mesh_uplink_2:c,mesh_sta_vap_enabled:o}=e,s=Object(Ce.getRadios)(e),E=null===(l=null===(n=s.find(({radio:e})=>e===xo.a.NA.type))||void 0===n?void 0:n.vwire_enabled)||void 0===l||l,m=null==o||o,d=E||m,{priorityUplink1:_,priorityUplink2:u}=Es(t,a,r,c),b=d&&E!==m||m&&(_||u)?"manual":"auto";return{radios:s.reduce((e,{name:t,radio:a,ht:n,channel:l,tx_power_mode:i,tx_power:r,min_txpower:c,vwire_enabled:o,min_rssi_enabled:s,min_rssi:E,hard_noise_floor_enabled:m})=>(e.push({name:t,type:a,ht:+n||Ce.DEFAULT_HT[a],channel:Number(l)||"auto",tx_power_mode:i||"auto",tx_power:r||c||0,vwire_enabled:null!=o?o:a===xo.a.NA.type,min_rssi_enabled:s||!1,min_rssi:+E||$o,hard_noise_floor_enabled:m||!1}),e),[]),atf_enabled:i||!1,meshingEnabled:d,meshingMode:b,uplinkMeshEnable:m,uplinkPriority1:r||"",uplinkPriority2:c||""}},validate:(e,{activeItem:{radio_table:t},intl:a})=>{const n={};return e.radios.forEach((e,l)=>{const{tx_power_mode:i,tx_power:r,name:c,type:o}=e;if("custom"===i){const e=t.find(e=>e.radio===o&&e.name===c);if(e){const{min_txpower:t,max_txpower:i}=e;(r<t||r>i)&&(n.radios||(n.radios=[]),n.radios[l]={tx_power:a.formatMessage({id:"DEVICE_VALIDATION_HINT_RANGE"},{min:t,max:i})})}}}),n},handleSubmit:()=>{}}),ds={createToast:je.a,tabGetDataFunction:C.h,tabSubmitFunction:C.j,tabResetFunction:C.i,setPriorityUplink:Ce.setPriorityUplink,unsetPriorityUplink:Ce.unsetPriorityUplink};var _s=Object(Qa.compose)(Object(o.connect)((e,{activeItem:t})=>({countryChannels:Object(sl.d)(e),mgmtSettings:Object(nr.selectMgmtSettings)(e),priorityUplinkOptions:Object(g.j)(e),uplinkItems:Object(Ce.selectDeviceEnhancedUplinkTable)(e,t),globalApSettings:Object(nr.selectGlobalApSettings)(e)}),ds),R.e,ms)(class extends l.PureComponent{constructor(e){var t,a,n,l;super(e),this.getRadioSubsection=(e=>"DEVICE_PROPERTIES_SECTION_CONFIGURE_RADIOS_SUBSECTION_"+e.toUpperCase()),this.executePriorityUplinkAction=((e,t,a,n)=>{const{setPriorityUplink:l,unsetPriorityUplink:i}=this.props;return"SET"===e?l(t,a,n):i(t)}),this.updateUplinkPriorities=(e=>{const{resetForm:t,values:a,activeItem:n}=this.props,{meshingEnabled:l,meshingMode:i,uplinkPriority1:r,uplinkPriority2:c}=a,{mesh_uplink_1:o=r,mesh_uplink_2:s=c}=e;if((o||"")===this.state.initialUplinkPriority1&&(s||"")===this.state.initialUplinkPriority2)return;this.setState({initialUplinkPriority1:o||"",initialUplinkPriority2:s||""});const E=l&&"manual"===i&&(o||s)?"SET":"UNSET";this.executePriorityUplinkAction(E,n,o,s).then(()=>{t({values:{...a,meshingMode:i}})})}),this.handlePriorityChange=((e,t)=>{const{values:a,setFieldValue:n}=this.props;let{uplinkPriority1:l,uplinkPriority2:i}=a;if("uplinkPriority1"===e&&!t.value&&i)return l=i,i="",n("uplinkPriority1",l),void n("uplinkPriority2",i);n(e,t.value)}),this.handleEnableMeshingChange=(()=>{const{setValues:e,values:t}=this.props,a=!t.meshingEnabled;e({...t,meshingEnabled:a,uplinkMeshEnable:a,radios:t.radios.map(e=>e.type===xo.a.NA.type?{...e,vwire_enabled:a}:e)})}),this.getSaveData=(()=>{const{intl:e,priorityUplinkOptions:t,values:a,activeItem:n,dirty:l,isGlobalApSettingsEnabled:i,isChannelOptimizationEnabled:r,initialValues:c}=this.props;if(!l)return{};const o=Object(Ce.getRadios)(n),s=Object(Ce.isPureAp)(n),E=Object(Ce.doesOnlySupportWireslessUplink)(n),{mesh_uplink_1:m,mesh_uplink_2:d}=(()=>{if("auto"===a.meshingMode)return{mesh_uplink_1:"",mesh_uplink_2:""};const{priorityUplink1:n,priorityUplink2:l}=Es(e,t,a.uplinkPriority1,a.uplinkPriority2);return{mesh_uplink_1:n,mesh_uplink_2:l}})(),_={atf_enabled:a.atf_enabled||!1,mesh_sta_vap_enabled:s&&a.meshingEnabled&&(E||"auto"===a.meshingMode||a.uplinkMeshEnable),radio_table:o.map(e=>{const{name:t,radio:l,antenna_gain:i,antenna_id:c,sens_level:o,sens_level_enabled:s}=e,E=Lo(n,l),{type:m,...d}=a.radios.find(e=>e.type===l&&e.name===t),_={...d,antenna_gain:i,antenna_id:c,sens_level_enabled:s,sens_level:o,radio:m};if("custom"!==d.tx_power_mode&&delete _.tx_power,_.antenna_id){const e=Object(Ce.getAntennaById)(n,_.antenna_id);e&&(_.antenna_gain=Object(Ce.getAntennaGainForRadioName)(e,t))}else delete _.antenna_id;return Object(Ce.isMinRssiStrictModeSupported)(e)||_.min_rssi_enabled||delete _.hard_noise_floor_enabled,_.min_rssi_enabled||delete _.min_rssi,_.sens_level_enabled||delete _.sens_level,E&&(delete _.channel,delete _.ht),l===xo.a.NA.type&&(_.vwire_enabled=a.meshingEnabled&&("auto"===a.meshingMode||_.vwire_enabled)),r&&delete _.channel,_}),mesh_uplink_1:m,mesh_uplink_2:d};if(i){const e=_.radio_table.reduce((e,t)=>{const a=c.radios.find(e=>e.type===t.radio&&e.name===t.name);if(!a)return e;const n={};return r||a.channel===t.channel||(n.channel=t.channel),a.min_rssi_enabled!==t.min_rssi_enabled&&(n.min_rssi_enabled=t.min_rssi_enabled),t.min_rssi_enabled&&a.min_rssi!==t.min_rssi&&(n.min_rssi_enabled=t.min_rssi_enabled,n.min_rssi=t.min_rssi),Object.keys(n).length&&e.push({radio:t.radio,name:t.name,...n}),e},[]);return e.length?{radio_table:e}:{}}return _}),this.state={initialUplinkPriority1:(null===(a=null===(t=this.props)||void 0===t?void 0:t.activeItem)||void 0===a?void 0:a.mesh_uplink_1)||"",initialUplinkPriority2:(null===(l=null===(n=this.props)||void 0===n?void 0:n.activeItem)||void 0===l?void 0:l.mesh_uplink_2)||""}}componentDidMount(){const{tabGetDataFunction:e,tabSubmitFunction:t,tabResetFunction:a,resetForm:n,priorityUplinkOptions:l,intl:i}=this.props;e({radios:this.getSaveData}),t({radios:e=>{var t,a;if(this.updateUplinkPriorities(e),!(null==e?void 0:e.mac))return;const{atf_enabled:r,mesh_uplink_1:c,mesh_uplink_2:o,mesh_sta_vap_enabled:s}=e,E=Object(Ce.getRadios)(e),m=null===(a=null===(t=E.find(({radio:e})=>e===xo.a.NA.type))||void 0===t?void 0:t.vwire_enabled)||void 0===a||a,d=null==s||s,_=m||d,{priorityUplink1:u,priorityUplink2:b}=Es(i,l,c,o),p=_&&m!==d||d&&(u||b)?"manual":"auto",O={radios:E.reduce((e,{name:t,radio:a,ht:n,channel:l,tx_power_mode:i,min_txpower:r,tx_power:c,vwire_enabled:o,min_rssi_enabled:s,min_rssi:E,hard_noise_floor_enabled:m})=>(e.push({name:t,type:a,ht:n||20,channel:l||"auto",tx_power_mode:i||"auto",tx_power:c||r||0,vwire_enabled:null!=o?o:a===xo.a.NA.type,min_rssi_enabled:s||!1,min_rssi:+E||$o,hard_noise_floor_enabled:m||!1}),e),[]),atf_enabled:r||!1,meshingEnabled:_,meshingMode:p,uplinkMeshEnable:d,uplinkPriority1:c||"",uplinkPriority2:o||""};n({values:O})}}),a({radios:n})}componentDidUpdate(){const{dirty:e,setFormDirty:t,setFormInvalid:a,errors:n}=this.props;t("radios",e),a("radios",!!Object.keys(n).length)}componentWillUnmount(){const{tabGetDataFunction:e,tabSubmitFunction:t,tabResetFunction:a}=this.props;e({radios:null}),t({radios:null}),a({radios:null})}getRadioFields(e,t=!1){const{activeItem:a,countryChannels:n,mgmtSettings:l,intl:r,values:c,setFieldValue:o,isGlobalApSettingsEnabled:s,isChannelOptimizationEnabled:E,globalApSettings:m}=this.props,{name:d,radio:_,min_txpower:u,max_txpower:b}=e,p=c.radios.findIndex(e=>e.type===_&&e.name===d),O=c.radios[p],I=Object(Ce.getRadioHtOptions)(a,e,n,r),g=Lo(a,_),C=l.outdoor_mode_enabled,h=Object(Ce.isMinRssiStrictModeSupported)(e)&&O.min_rssi_enabled,T=_===xo.a.NA.type||_===xo.a["6E"].type,f=Object(_o.f)(a)&&T&&t,D=Object(sl.b)(n,r,a,_,d,O&&O.ht||20,{isOutdoorModeEnabled:C}),y=[{value:"auto",label:r.formatMessage({id:"COMMON_VALUE_AUTO"})},...D];y.some(e=>e.value===O.channel)||o(`radios.${p}.channel`,"auto");const P=s?"custom"===m[_+"_tx_power_mode"]:"custom"===(null==O?void 0:O.tx_power_mode),A=!Object(Ce.isUBB)(a);return i.a.createElement(qo,{key:d,marginBottom:24},i.a.createElement(Zo,{alignItems:"center"},_===xo.a.NG.type&&i.a.createElement(Qo,{height:"20",width:"20"}),_===xo.a.NA.type&&i.a.createElement(es,{height:"20",width:"23"}),_===xo.a.AD.type&&i.a.createElement(ts,{height:"20",width:"20"}),_===xo.a["6E"].type&&i.a.createElement(ts,{height:"20",width:"20"}),i.a.createElement(v.a,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:this.getRadioSubsection(_)}))),!g&&i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(S.a,{width:"50%",marginRight:"8px"},i.a.createElement(In.a,{condition:s,wrapper:e=>i.a.createElement(ns,{position:"top",width:"208px",portal:!0,isInteractive:!0,message:i.a.createElement(rs,null)},e)},i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_CHANNEL_WIDTH",name:`radios.${p}.ht`,value:s&&m[_+"_channel_size"]||c.radios[p].ht,type:"dropdown",variant:"secondary",options:I,translateLabel:!0,validated:!0,full:!0,disabled:s}))),i.a.createElement(S.a,{width:"50%",marginLeft:"8px"},i.a.createElement(In.a,{condition:E,wrapper:e=>i.a.createElement(ns,{position:"top",width:"208px",portal:!0,isInteractive:!0,message:i.a.createElement(cs,null)},e)},i.a.createElement(cn.a,{label:E||"auto"!==c.radios[p].channel?"COMMON_CHANNEL":i.a.createElement("label",{htmlFor:`radios.${p}.channel`},i.a.createElement(ls,{alignItems:"center"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"}),i.a.createElement(rn.a,{width:208,message:i.a.createElement(R.b,{id:"DEVICE_RADIO_CHANNEL_AUTO"}),portal:!0},i.a.createElement(as,{isActive:!0,size:"original"})))),name:`radios.${p}.channel`,type:"dropdown",variant:"secondary",options:y,translateLabel:!0,validated:!0,value:c.radios[p].channel,full:!0,disabled:E}))))),i.a.createElement(In.a,{condition:s,wrapper:e=>i.a.createElement(ns,{position:"top",width:"208px",portal:!0,isInteractive:!0,message:i.a.createElement(rs,null)},e)},i.a.createElement(i.a.Fragment,null,!Object(Ce.isUBB)(a)&&i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(S.a,{width:P?"50%":"100%",marginRight:P?"8px":"0"},i.a.createElement(cn.a,{label:s||"auto"!==c.radios[p].tx_power_mode?"DEVICE_PROPERTIES_LABEL_TRANSMIT_POWER":i.a.createElement("label",{htmlFor:`radios.${p}.tx_power_mode`},i.a.createElement(ls,{alignItems:"center"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TRANSMIT_POWER"}),i.a.createElement(rn.a,{width:208,message:i.a.createElement(R.b,{id:"DEVICE_RADIO_TRANSMIT_POWER_AUTO"}),portal:!0},i.a.createElement(as,{isActive:!0,size:"original"})))),name:`radios.${p}.tx_power_mode`,value:s&&m[_+"_tx_power_mode"]||c.radios[p].tx_power_mode,type:"dropdown",variant:"secondary",options:is,validated:!0,full:!0,translateLabel:!0,translateOptions:!0,disabled:s})),P&&i.a.createElement(S.a,{width:"50%",marginLeft:"8px"},i.a.createElement(cn.a,{label:"COMMON_DEVICE_RADIO_TRANSMIT_POWER_DBM",name:`radios.${p}.tx_power`,value:s?m[_+"_tx_power"]:c.radios[p].tx_power,min:u,max:b,type:"number",variant:"secondary",full:!0,disabled:s})))))),A&&i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{marginBottom:16,justifyContent:"space-between",alignItems:"center"},i.a.createElement(Jo,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ENABLE_MIN_RSSI"})),i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_ENABLE_MIN_RSSI",name:`radios.${p}.min_rssi_enabled`,type:"checkbox"})),O.min_rssi_enabled&&i.a.createElement(qo,{marginBottom:16},i.a.createElement(Jo,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_MIN_RSSI"})),i.a.createElement(Do.a,{min:-Go,max:-Yo,size:"large",value:-O.min_rssi,withValueIndicator:!0,valueIndicatorPosition:"right",formatValueIndicatorContent:e=>i.a.createElement(v.a,{color:"secondary"},"-",e),onChange:e=>{o(`radios.${p}.min_rssi`,-e.target.value)}}))),i.a.createElement(In.a,{condition:s,wrapper:e=>i.a.createElement(ns,{position:"top",width:"208px",portal:!0,isInteractive:!0,message:i.a.createElement(rs,null)},e)},i.a.createElement(i.a.Fragment,null,A&&h&&i.a.createElement(S.a,{marginBottom:16,justifyContent:"space-between",alignItems:"center"},i.a.createElement(Jo,{size:"body",color:s?"disabled":void 0},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_INTERFERENCE_BLOCKER"})),i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_INTERFERENCE_BLOCKER",name:`radios.${p}.hard_noise_floor_enabled`,type:"checkbox",disabled:s})),f&&i.a.createElement(S.a,{marginBottom:16,justifyContent:"space-between",alignItems:"center"},i.a.createElement(Jo,{size:"body",color:s?"disabled":void 0},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_AIRTIME_FAIRNESS"})),i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_AIRTIME_FAIRNESS",name:"atf_enabled",type:"checkbox",disabled:Object(Ce.getDeviceModelFeature)(a,"atfDisabled")||s})))))}renderWirelessUplinkPriorities(e){const{activeItem:t,isWirelessMeshingEnabled:a,intl:n,values:l,setFieldValue:r,uplinkItems:c,priorityUplinkOptions:o,isGlobalApSettingsEnabled:s}=this.props;if(Object(Ce.isGateway)(t)&&Object(Ce.isUBB)(t))return null;const{uplinkPriority1:E,uplinkPriority2:m,meshingMode:d,uplinkMeshEnable:_}=l,u=!Object(Ce.isGateway)(t),b=Object(Ce.isPureAp)(t),p=Object(Ce.doesOnlySupportWireslessUplink)(t),{priorityUplinkOptions1:O,priorityUplinkOptions2:I}=ss(n,o,E,m),{priorityUplink1:g,priorityUplink2:C}=Es(n,o,E,m);return a&&i.a.createElement(In.a,{condition:s,wrapper:e=>i.a.createElement(ns,{position:"top",width:"208px",portal:!0,isInteractive:!0,message:i.a.createElement(rs,null)},e)},i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{marginBottom:16,justifyContent:"space-between",alignItems:"center"},i.a.createElement(Jo,{size:"body",color:s?"disabled":void 0},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ENABLE_MESHING"})),i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_ENABLE_MESHING",name:"meshingEnabled",type:"checkbox",onChange:this.handleEnableMeshingChange,disabled:p||s})),l.meshingEnabled&&u&&i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{marginBottom:12},Xo.map(({label:e,value:t})=>i.a.createElement(cn.a,{name:"meshingMode",key:t,value:t,checked:d===t,type:"radio",onChange:()=>r("meshingMode",t),disabled:s},i.a.createElement(R.b,{id:e})))),"manual"===d&&i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{marginBottom:16,justifyContent:"space-between",alignItems:"center"},i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(v.a,{size:"body",color:s?"disabled":void 0},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ENABLE_MESHING_DOWNLINK"})),i.a.createElement(In.a,{condition:!s,wrapper:e=>i.a.createElement(rn.a,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ENABLE_MESHING_DOWNLINK_DESC"}),width:200,portal:!0},e)},i.a.createElement(as,{isActive:!0,size:"original"}))),i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_ENABLE_MESHING_DOWNLINK",name:`radios.${e}.vwire_enabled`,type:"checkbox",disabled:s})),b&&i.a.createElement(S.a,{marginBottom:16,justifyContent:"space-between",alignItems:"center"},i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(v.a,{size:"body",color:s?"disabled":void 0},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ENABLE_MESHING_UPLINK"})),i.a.createElement(In.a,{condition:!s,wrapper:e=>i.a.createElement(rn.a,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ENABLE_MESHING_UPLINK_DESC"}),width:200,portal:!0},e)},i.a.createElement(as,{isActive:!0,size:"original"}))),i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_ENABLE_MESHING_UPLINK",name:"uplinkMeshEnable",type:"checkbox",disabled:p||s})),b&&_&&i.a.createElement(i.a.Fragment,null,i.a.createElement(qo,{marginBottom:24,marginTop:32},i.a.createElement(cn.a,{full:!0,label:"DEVICE_PROPERTIES_LABEL_PRIORITY_NUMBER",translateLabel:!0,translateLabelValues:{number:1},name:"uplinkPriority1",type:"dropdown",variant:"secondary",options:O,searchable:!0,value:g,onChange:e=>this.handlePriorityChange("uplinkPriority1",e),placeholder:"COMMON_PLACEHOLDER_SELECT_DEVICE",translatePlaceholder:!0,disabled:s})),!!E&&i.a.createElement(qo,{marginBottom:24},i.a.createElement(cn.a,{full:!0,label:"DEVICE_PROPERTIES_LABEL_PRIORITY_NUMBER",translateLabel:!0,translateLabelValues:{number:2},name:"uplinkPriority2",type:"dropdown",options:I,searchable:!0,value:C,onChange:e=>this.handlePriorityChange("uplinkPriority2",e),placeholder:"COMMON_PLACEHOLDER_SELECT_DEVICE",translatePlaceholder:!0,disabled:s})),c.length>0&&i.a.createElement(qo,{marginBottom:24},i.a.createElement(Ho,{items:c})))))))}render(){const{activeItem:e}=this.props,t=Object(Ce.getRadios)(e).sort(Ce.sortRadios).reverse(),a=t.some(e=>"6e"===e.radio),n=t.map(({radio:e})=>a?e===xo.a["6E"].type:e===xo.a.NA.type).lastIndexOf(!0);return t.map((e,t)=>{const a=t===n;return i.a.createElement(i.a.Fragment,null,this.getRadioFields(e,a),a&&this.renderWirelessUplinkPriorities(t))})}});const us=Object(r.c)(S.a)`
  margin-bottom: 16px;
`;var bs=Object(Me.f)({mapPropsToValues:({activeItem:{bandsteering_mode:e}={}})=>({bandsteering_mode:e||ye.c.OFF}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}})(({setFormDirty:e,dirty:t,values:a,resetForm:n,setFieldValue:r})=>{const c=Object(o.useDispatch)();return Object(l.useEffect)(()=>{e("bandSteering",t)},[e,t]),Object(l.useEffect)(()=>(c(Object(C.h)({bandSteering:()=>a})),c(Object(C.j)({bandSteering:()=>n({values:a})})),c(Object(C.i)({bandSteering:n})),()=>{c(Object(C.h)({bandSteering:null})),c(Object(C.j)({bandSteering:null})),c(Object(C.i)({bandSteering:null}))}),[c,n,a]),i.a.createElement(us,null,Ko.map(({value:e,label:t})=>i.a.createElement(cn.a,{name:"bandsteering_mode",key:e,value:e,checked:a.bandsteering_mode===e,type:"radio",onChange:()=>r("bandsteering_mode",e)},i.a.createElement(R.b,{id:t}))))}),ps=a(2600);const Os=Object(r.c)("div")`
  margin-bottom: 16px;
`,Is=Object(r.c)(f.cb)`
  margin-left: 6px;
`;var gs,Cs=({isGlobalApSettingsEnabled:e,isChannelOptimizationEnabled:t,setGlobalApSettingsEnabled:a,setChannelOptimizationEnabled:n,disableChannelOptimization:l})=>{const r=Object(xe.a)("wifi",!0);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Os,null,i.a.createElement(ps.a,{full:!0,checked:e,onChange:e=>a(e.target.checked)},i.a.createElement(S.a,{width:"100%",alignItems:"center"},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_RADIO_GLOBAL_AP_SETTINGS_TOGGLE"}))))),i.a.createElement(Os,null,i.a.createElement(In.a,{condition:l,wrapper:e=>i.a.createElement(rn.a,{width:"208px",message:i.a.createElement(R.a,{id:"DEVICE_RADIO_CHANNEL_OPTIMIZATION_DISABLED",values:{url:r}})},e)},i.a.createElement(ps.a,{full:!0,checked:t,onChange:e=>n(e.target.checked),disabled:l},i.a.createElement(S.a,{width:"100%",alignItems:"center"},i.a.createElement(v.a,Object.assign({size:"body"},l?{color:"disabled"}:{}),i.a.createElement(R.b,{id:"DEVICE_RADIO_CHANNEL_OPTIMIZATION_TOGGLE"})),i.a.createElement(rn.a,{width:208,message:i.a.createElement(R.b,{id:"DEVICE_RADIO_CHANNEL_OPTIMIZATION_TOGGLE_DESC"})},i.a.createElement(Is,{isActive:!0,size:"original"})))))))};!function(e){e.NAME="name",e.LED="led",e.SERVICES="services",e.NETWORK="network",e.MANAGE="manage",e.RADIOS="radios"}(gs||(gs={}));var hs=Ja([gs.NAME,gs.RADIOS,gs.LED,gs.SERVICES,gs.NETWORK,gs.MANAGE])(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r})=>{var c,s,E,m;const d=Object(o.useSelector)(_i),_=Object(o.useSelector)(ui),u=Object(o.useSelector)(bi),b=Object(o.useSelector)(mo.o),p=Object(o.useSelector)(mo.D),O=Object(o.useSelector)(mo.d),{_id:I,mac:g}=e,[C,h]=Object(l.useState)(!(null===(c=b.ap_exclusions)||void 0===c?void 0:c.includes(g))),[T,v]=Object(l.useState)(p.enabled&&!(null===(s=p.exclude_devices)||void 0===s?void 0:s.includes(g))),f=Object(o.useDispatch)(),D=n||C!==!(null===(E=b.ap_exclusions)||void 0===E?void 0:E.includes(e.mac))||T!==(p.enabled&&!(null===(m=p.exclude_devices)||void 0===m?void 0:m.includes(e.mac))),y=Object(l.useCallback)(async()=>{var e,t;try{const a=[];if(C!==!(null===(e=b.ap_exclusions)||void 0===e?void 0:e.includes(g))){const e=b.ap_exclusions.filter(e=>e!==g);C||e.push(g),a.push({...b,ap_exclusions:e})}if(p.enabled&&T!==!(null===(t=p.exclude_devices)||void 0===t?void 0:t.includes(g))){const e=p.exclude_devices.filter(e=>e!==g);T||e.push(g),a.push({...p,exclude_devices:e,settings_preference:"auto"})}a.length&&await f(Object(Eo.k)(a))}catch(e){return void f(Object(je.a)({icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"}))}const a=Object.entries(d).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{}),{led:n,...l}=a;f(Object(Ce.updateDeviceWithIdEndpoint)({...l,...n},I,g,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(({data:e=[a]})=>{Object.values(_).forEach(t=>{"function"==typeof t&&t(e[0])})})},[I,f,d,b,C,T,g,_,p]),P=Object(l.useCallback)(()=>{Object.values(u).forEach(e=>{"function"==typeof e&&e()})},[u]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{flexDirection:"column",flex:"1 1 85%",padding:"20px 32px 0"},i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a,formName:gs.NAME}),i.a.createElement(Cs,{isGlobalApSettingsEnabled:C,setGlobalApSettingsEnabled:h,isChannelOptimizationEnabled:T,setChannelOptimizationEnabled:v,disableChannelOptimization:!p.enabled}),i.a.createElement(Ia.a,{variant:"secondary",items:[{id:gs.RADIOS,label:i.a.createElement(R.b,{id:"COMMON_RADIOS"}),openByDefault:!0,renderContent:()=>i.a.createElement(_s,{activeItem:e,setFormDirty:t,setFormInvalid:a,isWirelessMeshingEnabled:O,isGlobalApSettingsEnabled:C,isChannelOptimizationEnabled:T})},...Object(_o.g)(e)?[{id:"bandsteer",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_BAND_STEERING"}),renderContent:()=>i.a.createElement(bs,{activeItem:e,setFormDirty:t})}]:[],{id:gs.LED,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LED"}),renderContent:()=>i.a.createElement(jo,{activeItem:e,setFormDirty:t,formName:gs.LED})},{id:gs.SERVICES,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Ro,{activeItem:e,setFormDirty:t,setFormInvalid:a,hideFlowControl:!0,formName:gs.SERVICES})},{id:gs.NETWORK,label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a,formName:gs.NETWORK})},{id:gs.MANAGE,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:D,isInvalid:r,onFormSubmit:y,onFormCancel:P}))});const Ts=e=>Object(me.s)("spectrumScan","/api/s/{site}/stat/spectrum-scan/"+e,e,void 0,{idField:"mac"});var vs=a(1048);const fs=[{from:-96,to:-92,color:"#fda839"},{from:-92,to:-88,color:"#fda839"},{from:-88,to:-84,color:"#fda129"},{from:-84,to:-80,color:"#fd9a19"},{from:-80,to:-76,color:"#fd930b"},{from:-76,to:-72,color:"#f87f0c"},{from:-72,to:-68,color:"#f26a13"},{from:-68,to:-64,color:"#f26a13"},{from:-64,to:-60,color:"#ec5619"},{from:-60,to:-56,color:"#d44515"},{from:-56,to:-52,color:"#c64013"},{from:-52,to:0,color:"#bf3d12"}],Rs={ng:16,na:42},Ds={ng:8,na:0},Ss={ng:[{from:2400,to:2500}],na:[{from:5170,to:5330},{from:5490,to:5730},{from:5735,to:5850}]},ys={domain:[0,23.3,35,46.6,58.3,100],values:["#fda93a","#fda93a","#fd9208","#ea4e1a","#bf3d12","#bf3d12"]},Ps={20:{domain:[0,6.2,28.1,49.9,71.9,100],values:ys.values},40:{domain:[0,1.6,24.6,47.4,70.5,100],values:ys.values},80:{domain:[23.3,35,46.6,58.3,100],values:ys.values.slice(1)},160:{domain:[23.3,35,46.6,58.3,100],values:ys.values.slice(1)}},As=Object(r.c)(v.a)`
  margin-bottom: 16px;
  font-weight: bold;
`,Ns=Object(r.c)(S.a)`
  margin-bottom: 56px;
`,js=Object(r.c)("div")`
  padding: 21px 0;
  box-shadow: inset 0 0 0 1px ${({theme:e})=>e.colors.legendText};
  position: relative;
  width: ${({width:e})=>e};
  height: ${({height:e})=>e};
`,xs=Object(r.c)("div")`
  padding: 21px 0;
  width: ${({width:e})=>e};
  height: ${({height:e})=>e};
  opacity: 0;
  visibility: hidden;
`,Ls=(Object(r.c)(S.a)`
  padding: 21px 0;
  box-shadow: inset 0 0 0 1px ${({theme:e})=>e.colors.legendText};
  position: relative;
  width: ${({width:e})=>e};
`,Object(r.c)("div")`
  height: 100%;
  width: 0;
  left: -1px;
  top: 0;
  position: absolute;
  border-left: 1px dashed ${({theme:e})=>e.colors.legendText};
  margin-left: ${({marginLeft:e})=>e}%;
`);var Vs=({count:e,offset:t})=>i.a.createElement(i.a.Fragment,null,[...Array(e)].map((e,a)=>i.a.createElement(Ls,{key:"divider-"+a.toString(),marginLeft:(a+1)*t})));const Ms=Object(r.c)("div")`
  height: 100%;
  width: 0;
  left: 0;
  top: calc(100% + 4px);
  position: absolute;
  margin-left: ${({marginLeft:e})=>e};
  font-size: 10px;
`,ws=Object(r.c)("div")`
  transform: rotate(90deg);
`;var Fs=({count:e,offset:t,start:a,end:n,step:l})=>i.a.createElement(i.a.Fragment,null,i.a.createElement(Ms,{key:"start-legend",marginLeft:"4px"},i.a.createElement(ws,null,a)),[...Array(e)].map((e,n)=>i.a.createElement(Ms,{key:"divider-legend-"+n.toString(),marginLeft:(n+1)*t+"%"},i.a.createElement(ws,null,a+(n+1)*l))),i.a.createElement(Ms,{key:"end-legend",marginLeft:"calc(100% - 4px)"},i.a.createElement(ws,null,n))),Us=a(210),ks=a.n(Us),Ws=a(113);const Bs=Object(r.c)("div")`
  margin: 16px 0;
`,zs=Object(r.c)(S.a)`
  height: 50px;
`,Hs=Object(r.c)("div")`
  margin: 1px 0 4px;
  height: 2px;
`,Gs=Object(r.c)("div")`
  margin: 0 0.5px;
  width: ${({width:e})=>e};
  position: relative;
  background: ${({motif:e})=>Oa.a["dark"===e?"grey-1":"white-3"]};
`,$s=Object(r.c)("div")`
  width: 100%;
  height: ${({height:e})=>e};
  background-color: ${({background:e})=>e};
  position: absolute;
  bottom: 0;
  border-radius: 1px;
`;var Ys=Object(Ws.a)(({data:e,width:t,motif:a})=>{if(!e||!e.length)return null;const n=e.length;return i.a.createElement(Bs,null,i.a.createElement(zs,null,e.map((e,l)=>{const r=l/n*100,c=ks.a.scale(Ps[t].values).domain(Ps[t].domain)(r).css();return i.a.createElement(Gs,{width:n+"%",key:"rssi-bar-"+(l+1),motif:a},i.a.createElement($s,{height:e+"%",background:c}))})),i.a.createElement(Hs,{className:(e=>r.a`
  background: linear-gradient(
    90deg,
    ${Ps[e].values.map((t,a)=>`${t} ${Ps[e].domain[a]}%`).join(",")}
  );
`)(t)}))});const Xs=Object(r.c)(f.mc)`
  margin-top: -4px;
  margin-right: 4px;
`,Ks=Object(r.c)("div")`
  text-transform: uppercase;
  font-size: ${({theme:e})=>e.fontSizes[1]}px;
  font-weight: ${({theme:e})=>e.fontWeights.bold};
  padding: 8px 0;
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};
`,Zs=Object(r.c)("div")`
  text-transform: uppercase;
  margin: 16px 0 8px;
  font-weight: ${({theme:e})=>e.fontWeights.bold};
`,qs=Object(r.c)(S.a)`
  margin-bottom: 4px;
`,Js=Object(r.c)("div")`
  font-size: ${({theme:e})=>e.fontSizes[0]}px;
  color: ${({theme:e})=>e.motifPalette.text02};
  min-width: 50%;
`,Qs=Object(r.c)("div")`
  font-size: ${({theme:e})=>e.fontSizes[0]}px;
  font-weight: ${({theme:e})=>e.fontWeights.bold};
  min-width: 50%;
`;var eE=Object(R.e)(({isAc:e=!1,spectrumEntry:t,data:a,radioType:n,width:l,intl:r})=>{if(!a)return null;const{interference:c,utilization:o,rssi_histogram:s}=t||{},{lowerFrequency:E,upperFrequency:m,subChannels:d,channel:_}=a,u=`${E} - ${m} ${r.formatMessage({id:"COMMON_UNIT_MHZ"})}`,b=`DEVICE_PROPERTIES_SECTION_RADIOS_SUBSECTION_${n.toUpperCase()}${e&&"na"===n?"_AC":""}`;return i.a.createElement("div",null,i.a.createElement(Ks,null,i.a.createElement(Xs,null),i.a.createElement(R.b,{id:"COMMON_CHANNEL"})," ",_),i.a.createElement(Zs,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW"})),i.a.createElement(qs,null,i.a.createElement(Js,null,i.a.createElement(R.b,{id:"COMMON_RADIO"})),i.a.createElement(Qs,null,i.a.createElement(R.b,{id:b}))),i.a.createElement(qs,null,i.a.createElement(Js,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_WIDTH"})),i.a.createElement(Qs,null,l," ",i.a.createElement(R.b,{id:"COMMON_UNIT_MHZ"}))),+l>20&&i.a.createElement(qs,null,i.a.createElement(Js,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_USED_CHANNELS"})),i.a.createElement(Qs,null,d.join(", "))),i.a.createElement(qs,null,i.a.createElement(Js,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_FREQUENCY_RANGE"})),i.a.createElement(Qs,null,u)),!!t&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Zs,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTY_RF_SCAN_DETAILS"})),i.a.createElement(qs,null,i.a.createElement(Js,null,i.a.createElement(R.b,{id:"DEVICE_HEADER_UTILIZATION"})),i.a.createElement(Qs,null,o,"%")),i.a.createElement(qs,null,i.a.createElement(Js,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_INTERFERENCE"})),i.a.createElement(Qs,null,c," ",i.a.createElement(R.b,{id:"COMMON_UNIT_DBM"}))),s&&s.length&&i.a.createElement(Ys,{data:s,width:l})))});const tE=Object(r.c)(rn.a)`
  height: ${({height:e})=>e};
  width: ${({width:e})=>e};
  top: ${({top:e})=>e};
  left: ${({left:e})=>e};
  outline: 1px solid ${({theme:e})=>e.motifPalette.text02};
  border-radius: 3px;
  position: absolute;
  background: ${({theme:e})=>e.motifPalette.hoverUi01};
  z-index: 3;
  overflow: hidden;
`,aE=Object(r.c)("div")`
  position: absolute;
  bottom: 0;
  width: 100%;
  height: ${({height:e})=>e};
  background-color: ${({background:e})=>e};
`,nE=r.a`
  width: 240px !important;
  transform: translateX(18px) !important;
`;var lE=({spectrumData:e,channels:t,channelWidth:a,rowCount:n,lowerFrequency:l,singleFrqeuencyWidth:r,type:c,className:o=null})=>i.a.createElement(i.a.Fragment,null,t.map((t,s)=>{const E=e&&e.spectrum_table&&(e=>{const t=e.length,a=t&&e.reduce((e,t)=>(e.interference+=t.interference,e.utilization+=t.utilization,e.rssi_histogram&&t.rssi_histogram&&(e.rssi_histogram=e.rssi_histogram.map((e,a)=>e+(t.rssi_histogram&&t.rssi_histogram[a]||0))),e));return a&&a.interference&&(a.interference=Math.round(a.interference/t),a.utilization=Math.round(a.utilization/t),a.rssi_histogram=a.rssi_histogram&&a.rssi_histogram.map(e=>Math.round(e/t))),a})(e.spectrum_table.filter(e=>e.width===parseInt(a,10)&&t.subChannels.includes(e.channel))),m=E&&E.utilization||0,d=E&&E.interference||-96,_=e&&(fs.find(e=>Object(zc.a)(d,e.from,e.to))||{}).color||"transparent",u=t.upperFrequency-t.lowerFrequency,b=21+(Rs[c]+Ds[c])*(s%n),p=(t.lowerFrequency-l)*r;return i.a.createElement(tE,{key:`rf-${c}-${a}-channel-${t.subChannels.toString()}`,width:r*u+"%",height:Rs[c]+"px",top:b+"px",left:p+"%",className:o,message:i.a.createElement(eE,{width:a,data:t,spectrumEntry:E,radioType:c}),position:"bottomRight",tooltipClassName:nE,portal:!0},i.a.createElement(aE,{height:m+"%",background:_}))})),iE=i.a.memo(({spectrumScan:e,countryChannels:t,deviceData:a})=>{const n=e.scans&&e.scans.find(e=>e.radio===xo.a.NG.type),l=[20];Object(Ce.isHt40Supported)(t,a,xo.a.NG.type)&&l.push(40);const r=l.reduce((e,n)=>{const l=Object(sl.c)(t,a,xo.a.NG.type,n);return e[n]=Object.entries(Ce.WIFI_CHANNELS.ng[n]).reduce((e,[t,a])=>(a.subChannels.some(e=>l.includes(e))&&e.push({...a,channel:+t}),e),[]),e},{}),c=10*Math.floor(Math.min(r[20][0].lowerFrequency,r[40][0].lowerFrequency)/10),o=10*Math.ceil(Math.max(r[20][r[20].length-1].upperFrequency,r[40][r[40].length-1].upperFrequency)/10),s=o-c,E=s/10-1,m=100/(E+1),d=100/s;return i.a.createElement("div",null,Object.keys(r).map(e=>{const t=r[e],a="20"===e?5:10,l=Math.min(a,t.length)*(Rs.ng+Ds.ng)-Ds.ng+42;return i.a.createElement("div",{key:"channel-width-"+e},i.a.createElement(As,null,i.a.createElement(v.a,{size:"body",color:"primary",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RF_MHZ_CHANNELS",values:{frequency:e}}))),i.a.createElement(Ns,null,Ss.ng.map(r=>i.a.createElement(js,{key:`widths-${r.from}-${r.to}`,width:"100%",height:l+"px"},i.a.createElement(Vs,{count:E,offset:m}),i.a.createElement(Fs,{count:E,offset:m,start:c,end:o,step:10}),i.a.createElement(lE,{spectrumData:n,channels:t,channelWidth:e,rowCount:a,lowerFrequency:c,singleFrqeuencyWidth:d,type:xo.a.NG.type})))))}))},(e,t)=>{var a,n,l,i,r,c,o,s;return(null===(l=null===(n=null===(a=e.spectrumScan)||void 0===a?void 0:a.scans)||void 0===n?void 0:n[0])||void 0===l?void 0:l.spectrum_table)===(null===(c=null===(r=null===(i=t.spectrumScan)||void 0===i?void 0:i.scans)||void 0===r?void 0:r[0])||void 0===c?void 0:c.spectrum_table)&&e.countryChannels===t.countryChannels&&(null===(o=e.deviceData)||void 0===o?void 0:o.radio_table)===(null===(s=t.deviceData)||void 0===s?void 0:s.radio_table)}),rE=a(1651),cE=i.a.memo(({spectrumScan:e,countryChannels:t,deviceData:a,intl:n})=>{const l=e.scans&&e.scans.find(e=>e.radio===xo.a.NA.type),r=[20];Object(Ce.isHt40Supported)(t,a,xo.a.NA.type)&&r.push(40),Object(Ce.isHt80Supported)(t,a)&&r.push(80),Object(Ce.isHt160Supported)(t,n,a,"rai0")&&r.push(160);const c=r.reduce((e,n)=>{const l=Object(sl.c)(t,a,xo.a.NA.type,n);return e[n]=Object.entries(Ce.WIFI_CHANNELS.na[n]).reduce((e,[t,a])=>(a.subChannels.some(e=>l.includes(e))&&e.push({...a,channel:+t}),e),[]),e},{}),o=Object(rE.a)(c[20],e=>Ss.na.findIndex(t=>Object(zc.a)(e.centerFrequency,t.from,t.to))),s=o[1]&&o[1].length,E=o[2]&&o[2].length,m=100/(Object.keys(o).reduce((e,t)=>{const a=Ss.na[t];return e+(a.to-a.from)/20},0)+(s?1:0)+(E?1:0));return i.a.createElement("div",null,Object.keys(c).map(e=>{const t=c[e],a=+e;return i.a.createElement("div",{key:"channel-width-"+e},i.a.createElement(As,null,i.a.createElement(v.a,{size:"body",color:"primary",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RF_MHZ_CHANNELS",values:{frequency:a}}))),i.a.createElement(Ns,{justifyContent:"space-between"},Ss.na.map((a,n)=>{const r=t.filter(({centerFrequency:e})=>Object(zc.a)(e,a.from,a.to)),c=(o[n]&&o[n].length||0)*m,s=100/(a.to-a.from),E=20*s*4,d=Math.floor(((a.to-a.from)/20-1)/4);return r.length?i.a.createElement(js,{key:`widths-${a.from}-${a.to}`,width:c+"%",height:42+Rs.na+"px"},i.a.createElement(Vs,{count:d,offset:E}),i.a.createElement(Fs,{count:d,offset:E,start:a.from,end:a.to,step:80}),i.a.createElement(lE,{spectrumData:l,channels:r,channelWidth:e,rowCount:1,lowerFrequency:a.from,singleFrqeuencyWidth:s,type:xo.a.NA.type})):i.a.createElement(xs,{key:`widths-${a.from}-${a.to}`,width:c+"%",height:42+Rs.na+"px"})})))}))},(e,t)=>{var a,n,l,i,r,c,o,s;return(null===(l=null===(n=null===(a=e.spectrumScan)||void 0===a?void 0:a.scans)||void 0===n?void 0:n[1])||void 0===l?void 0:l.spectrum_table)===(null===(c=null===(r=null===(i=t.spectrumScan)||void 0===i?void 0:i.scans)||void 0===r?void 0:r[1])||void 0===c?void 0:c.spectrum_table)&&e.countryChannels===t.countryChannels&&(null===(o=e.deviceData)||void 0===o?void 0:o.radio_table)===(null===(s=t.deviceData)||void 0===s?void 0:s.radio_table)});const oE=Object(r.c)(_r.a)`
  width: 100% !important;
  margin-bottom: 16px;
`,sE=Object(r.c)(S.a)`
  margin-bottom: 32px;
`,EE=Object(r.c)("div")`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  color: ${({theme:e})=>e.motifPalette.text02};
`,mE=Object(r.c)(Be.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  padding: 0 0 0 8px;
`,dE=Object(r.c)(v.a)`
  padding: 8px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  display: block;
`,_E=Object(r.c)("div")`
  width: ${({width:e})=>e}%;
  background-color: ${({background:e})=>e};
  height: 7px;
`,uE=Object(r.c)("div")`
  position: relative;
  font-size: 10px;
  height: 14px;
`,bE=Object(r.c)(S.a)`
  margin: 4px 0;
`,pE=Object(r.c)("div")`
  padding: 4px 0;
  font-size: 10px;
`,OE=Object(r.c)("div")`
  position: absolute;
  ${({right:e})=>e&&`right: ${e};`}
  ${({left:e})=>e&&`left: ${e};`}
`;var IE=Object(Qa.compose)(Object(o.connect)((e,{activeItem:{mac:t}})=>({spectrumScan:((e,t)=>{var a;return(null===(a=((e,t)=>Object(me.v)(Ts(t),e.models))(e,t))||void 0===a?void 0:a.data)||[]})(e,t)}),{fetchCountryChannels:sl.a,fetchSpectrumScan:Ts,confirm:be.a,scanDeviceRFEnvironments:Ce.scanDeviceRFEnvironments,hideModal:pe.e}),Object(uo.b)(({activeItem:{mac:e},fetchSpectrumScan:t,fetchCountryChannels:a})=>Promise.all([t(e),a(void 0,{crudCacheStrategy:{type:me.a.CACHE}})])),R.e)(({activeItem:e,confirm:t,scanDeviceRFEnvironments:a,hideModal:n,spectrumScan:r,intl:c})=>{const s=Object(o.useDispatch)(),E=Object(l.useMemo)(()=>Object(Ce.getRadios)(e),[e]),m=Object(l.useMemo)(()=>null==E?void 0:E.find(e=>e.radio===xo.a.NG.type),[E]),d=Object(l.useMemo)(()=>null==E?void 0:E.find(e=>e.radio===xo.a.NA.type),[E]),[_,u]=Object(l.useState)(m?xo.a.NG.type:xo.a.NA.type),b=Object(vs.a)(null==e?void 0:e.spectrum_scanning),p=Object(o.useSelector)(sl.d);Object(l.useEffect)(()=>{b&&!(null==e?void 0:e.spectrum_scanning)&&s(Ts(null==e?void 0:e.mac))},[null==e?void 0:e.mac,null==e?void 0:e.spectrum_scanning,b,s]);const O=Object(l.useCallback)((e,t)=>{u(t)},[u]),I=Object(l.useCallback)(()=>{t({message:"DEVICE_PROPERTIES_RF_ENVIRONMENT_START_SCAN_CONFIRM_MESSAGE",title:"DEVICE_PROPERTIES_RF_ENVIRONMENT_START_SCAN_CONFIRM_TITLE",onConfirm:()=>{a(e),n()}})},[e,t,a,n]),g=Object(l.useMemo)(()=>"wire"===Object(ol.a)(e,"uplink.type",""),[e]),C=Object(l.useMemo)(()=>{var e;return null===(e=null==r?void 0:r.scans)||void 0===e?void 0:e.find(({radio:e})=>e===_)},[null==r?void 0:r.scans,_]),h=Object(l.useMemo)(()=>[...m?[{label:c.formatMessage({id:"DEVICE_PROPERTIES_RF_2G_RF_ENV"}),value:xo.a.NG.type}]:[],...d?[{label:c.formatMessage({id:"DEVICE_PROPERTIES_RF_5G_RF_ENV"}),value:xo.a.NA.type}]:[]],[m,d,c]),T=Object(l.useMemo)(()=>(null==e?void 0:e.spectrum_scanning)?i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RF_ENVIRONMENT_SCAN_STATUS_IN_PROGRESS"}):(null==C?void 0:C.spectrum_table_time)?i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RF_ENVIRONMENT_SCAN_STATUS_TIME_AGO",values:{time:Object(D.distanceInWordsToNow)(1e3*C.spectrum_table_time)}}):i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RF_ENVIRONMENT_SCAN_STATUS_NEVER_SCANNED"}),[null==e?void 0:e.spectrum_scanning,null==C?void 0:C.spectrum_table_time]);return g&&(null==h?void 0:h.length)?i.a.createElement(i.a.Fragment,null,i.a.createElement(oE,{id:"rf_type",value:_,options:h,onChange:O,variant:"secondary",inputProps:{full:!0}}),i.a.createElement(sE,{justifyContent:"space-between"},i.a.createElement(EE,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RF_ENVIRONMENT_SCAN_STATUS_LAST_SCAN"})," ",T)),i.a.createElement(mE,{variant:"link",disabled:e.spectrum_scanning,onClick:I},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RF_ENVIRONMENT_ACTION_START_SCAN"}))),_===xo.a.NA.type?i.a.createElement(cE,{deviceData:e,spectrumScan:r,countryChannels:p,intl:c}):i.a.createElement(iE,{deviceData:e,spectrumScan:r,countryChannels:p}),i.a.createElement(dE,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_RF_LEGEND"})),i.a.createElement(uE,null,i.a.createElement(OE,null,"-96"),i.a.createElement(OE,{left:"30%"},"-80"),i.a.createElement(OE,{left:"64%"},"-64"),i.a.createElement(OE,{right:"0"},"-48 ",i.a.createElement(R.b,{id:"COMMON_UNIT_DBM"}))),i.a.createElement(bE,{justifyContent:"space-between"},fs.map(({color:e,from:t,to:a})=>i.a.createElement(_E,{width:7.5,background:e,key:`dbm-${t}-${a}`}))),i.a.createElement(pE,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RF_ENVIRONMENT_LEGEND_UTILIZATION"})))):i.a.createElement(sE,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RF_ENVIRONMENT_DISABLED_MESSAGE"})))}),gE=a(1037);const CE=Object(r.c)("tr")`
  white-space: nowrap;
  font-size: ${({theme:e})=>e.fontSizes[1]}px;
`,hE=Object(r.c)("td")`
  vertical-align: top;
`,TE=Object(r.c)("td")`
  padding-left: 12px;
  padding-bottom: 2px;
  text-align: right;
  vertical-align: top;
`;var vE=({device:e,radio:t,channelUtilization:a})=>{const{totalPackets:n,totalBytes:l,droppedPercentage:r,retryPercentage:c}=Object(Ce.getApRadioStats)(e,t,"rx"),{totalPackets:o,totalBytes:s,droppedPercentage:E,retryPercentage:m}=Object(Ce.getApRadioStats)(e,t,"tx");return i.a.createElement("table",null,i.a.createElement("tbody",null,i.a.createElement(CE,null,i.a.createElement(hE,null,i.a.createElement(v.a,{color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES"}))),i.a.createElement(TE,null,i.a.createElement(v.a,{color:"secondary"},o," / ",s))),i.a.createElement(CE,null,i.a.createElement(hE,null,i.a.createElement(v.a,{color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES"}))),i.a.createElement(TE,null,i.a.createElement(v.a,{color:"secondary"},n," / ",l))),i.a.createElement(CE,null,i.a.createElement(hE,null,i.a.createElement(v.a,{color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED"}))),i.a.createElement(TE,null,i.a.createElement(v.a,{color:"secondary"},m,"% / ",E,"%"))),i.a.createElement(CE,null,i.a.createElement(hE,null,i.a.createElement(v.a,{color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED"}))),i.a.createElement(TE,null,i.a.createElement(v.a,{color:"secondary"},c,"% / ",r,"%"))),a&&i.a.createElement(CE,null,i.a.createElement(hE,null,i.a.createElement(v.a,{color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION"}))),i.a.createElement(TE,null,i.a.createElement(v.a,{color:"secondary"},`${a.total}% / ${a.selfRx}% / ${a.selfTx}%`)))))};const fE=Object(r.c)("div")`
  &:first-child {
    margin-bottom: 24px;
  }
`,RE=Object(r.c)("div")`
  flex: 1;
`,DE=Object(r.c)("span")`
  display: inline-block;
  margin: -2px 6px 0;
  width: 8px;
  height: 1px;
  vertical-align: middle;
  background: ${({theme:e})=>e.motifPalette.text02};
`,SE=Object(r.c)(v.a)`
  margin-left: 4px;
`,yE=Object(r.c)("div")`
  width: 100%;
  margin-bottom: 16px;
`;var PE=e=>((null==e?void 0:e.radio_table)||[]).reduce((t,a)=>{const n=Object(Ce.getRadioChannelUtilization)(e,a);if(n){const{selfRx:l,selfTx:r,interference:c,total:o}=n;t.push(i.a.createElement(fE,{key:a.name},i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(RE,null,i.a.createElement(Fc.a,{device:e,radio:a,hideDfsInfo:!0,hideHtInfo:!0,hidePowerInfo:!0,hideChannelTooltip:!0,textColor:"primary",textSize:"body",textWeight:"bold"}),i.a.createElement(DE,null),i.a.createElement(v.a,{color:"primary",weight:"bold",size:"body"},i.a.createElement(R.b,{id:((e,t)=>{const{radio:a}=t,n="DEVICE_RADIO_PROTOCOL_"+a.toUpperCase();if(a===wc.b.RADIO_NA){if(Object(Ce.isAxRadio)(e,t))return n.concat("_AX");if(Object(Ce.isAcRadio)(e,t))return n.concat("_AC")}return n})(e,a)}))),i.a.createElement(ta.a,{size:"body",color:"secondary",type:"percent",input:Math.min(o,100)/100}),i.a.createElement(SE,{color:"secondary"},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_UTILIZED"})))),i.a.createElement(yE,null,i.a.createElement(rn.a,{message:i.a.createElement(vE,{device:e,radio:a,channelUtilization:n}),portal:!0},i.a.createElement(gE.a,{items:[{color:te.l.blue,value:l},{color:te.h,value:r},{color:te.i,value:c}],height:10})))))}return t},[]);const AE=Object(r.c)(Gt.a)`
  margin-right: 4px;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 0;
`,NE=e=>r.a`
  background-color: ${e};
`;var jE=({ChannelBars:e})=>i.a.createElement(i.a.Fragment,null,e,i.a.createElement(S.a,{justifyContent:"flex-start"},i.a.createElement(S.a,{flex:"0 1 27%"},i.a.createElement(AE,{className:NE(te.l.blue)}),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_RX_FRAMES"}))),i.a.createElement(S.a,{flex:"0 1 27%"},i.a.createElement(AE,{className:NE(te.h)}),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_TX_FRAMES"}))),i.a.createElement(S.a,{flex:"0 1 27%"},i.a.createElement(AE,{className:NE(te.i)}),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_INTERFERENCE"})))));const xE=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`,LE=r.a`
  padding: 0;
  margin: 0;
`;var VE=function({activeItem:e,...t}){const a=PE(e),n=[];return a.length&&n.push({id:"channelUsage",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_HEADER_CHANNEL_USAGE"}),renderContent:()=>i.a.createElement(jE,{ChannelBars:a})}),Object(Ce.isDeviceConnected)(e)&&Object(_o.e)(e,Ce.WIFI_CAPS.RF_SCAN)&&n.push({id:"rfEvironment",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_HEADER_RF_ENVIRONMENT"}),renderContent:()=>i.a.createElement(IE,{activeItem:e})}),Object(Ce.isDeviceConnected)(e)&&n.push({id:"dpi",label:i.a.createElement(R.b,{id:"COMMON_TRAFFIC_ID"}),renderContent:()=>i.a.createElement(Fa,{mac:null==e?void 0:e.mac,contentPaddingX:0})}),i.a.createElement(xE,{variant:"secondary",items:n,contentClassName:LE,multiOpen:!0,renderOnlyExpandedContent:!0})};const ME=Object(r.c)(S.a)`
  button {
    padding: 0;
    position: absolute;
    left: 0;
  }

  span {
    width: 100%;
    padding: 1px 0;
    text-align: center;
  }
`,wE=Object(r.c)(S.a)`
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};
`;var FE=({activeItem:{mac:e}})=>{const t=Object(n.k)(),{subPanelId:a,subPanel:l}=Object(n.m)(),r=Object(o.useSelector)(Object(ga.b)(a||l)),c=Object(ma.a)((null==r?void 0:r.name)||(null==r?void 0:r.hostname)||(null==r?void 0:r.mac),15);return Object(Ta.g)([Object(Ca.fetchSession)(e,!0)],i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{padding:"15px 30px 0",flexDirection:"column",justifyContent:"flex-start",alignItems:"center"},i.a.createElement(ME,{position:"relative",paddingBottom:25,width:"100%"},i.a.createElement(ha.c,{name:"backButton",onClick:()=>t.push("../../overview")},i.a.createElement(f.f,null)),i.a.createElement(v.a,{size:"body",weight:"bold",color:"primary"},c+" | ",null==r?void 0:r.date)),i.a.createElement(wE,{width:"100%",paddingBottom:10,flexDirection:"column"},i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_HISTORY_TAB_START"})),i.a.createElement(v.a,{size:"body"},null==r?void 0:r.start)),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_HISTORY_TAB_END"})),i.a.createElement(v.a,{size:"body"},null==r?void 0:r.end)),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_HISTORY_TAB_DURATION"})),i.a.createElement(v.a,{size:"body"},null==r?void 0:r.duration)),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_IP_ADDRESS"})),i.a.createElement(v.a,{size:"body"},null==r?void 0:r.ip)),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"CLIENT_PROPERTY_HISTORY_TAB_MAC_ADDRESS"})),i.a.createElement(v.a,{size:"body"},null==r?void 0:r.mac)),(null==r?void 0:r.is_wired)&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"CLIENT_HEADER_PORT"})),i.a.createElement(v.a,{size:"body"},null==r?void 0:r.port)),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:(null==r?void 0:r.is_wired)?"CLIENT_PROPERTY_HISTORY_TAB_CLIENT_EXPERIENCE":"COMMON_WIFI_EXP"})),i.a.createElement(v.a,null,(null==r?void 0:r.experience)>=0?i.a.createElement(v.a,{size:"body"},i.a.createElement("span",{style:{color:Oa.a["color-"+((null==r?void 0:r.is_wired)?Object(wt.b)(null==r?void 0:r.experience):Object(wt.c)(null==r?void 0:r.experience))]}},null==r?void 0:r.experience,"%")):i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_NA"})))))),!!(null==r?void 0:r.mac)&&i.a.createElement(Fa,{mac:null==r?void 0:r.mac,key:null==r?void 0:r.mac})))},UE={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:({activeItem:e,params:t,path:a,history:n,...r})=>{var c,o;const s=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(Kl,{device:e}),s&&i.a.createElement(i.a.Fragment,null,i.a.createElement(sc,{activeItem:e}),i.a.createElement(so,{variant:"secondary",items:[{id:"clientsGuests",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_CLIENTS_GUESTS"}),renderContent:()=>i.a.createElement(Rc,{activeItem:e,params:t,path:a,history:n})},...s?[{id:"history",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_HISTORY"}),renderContent:()=>i.a.createElement(oc,Object.assign({activeItem:e},r))}]:[],{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),renderContent:()=>i.a.createElement(Mc,{activeItem:e})},...(null===(c=null==e?void 0:e.uplink)||void 0===c?void 0:c.mac)?[{id:"uplinkWired",label:"wire"===(null===(o=null==e?void 0:e.uplink)||void 0===o?void 0:o.type)?i.a.createElement(R.b,{id:"DEVICE_HEADER_UPLINK_WIRED"}):i.a.createElement(R.b,{id:"DEVICE_HEADER_UPLINK_WIRELESS"}),renderContent:()=>i.a.createElement(oo,{activeItem:e,params:t,path:a,history:n})}]:[],{id:"airStats",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_AIR_STATS"}),renderContent:()=>((null==e?void 0:e.radio_table)||[]).map(({radio:t})=>i.a.createElement(Bc,{activeItem:e,radio:t}))},{id:"wlan",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_WLAN"}),renderContent:()=>i.a.createElement(Kc,{activeItem:e})}],renderOnlyExpandedContent:!0,multiOpen:!0})))},subpanel:{path:"/:subPanel/:subPanelId",component:FE}},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:VE},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:hs}}};const kE=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
  .styledAccordionContent {
    padding: 0;
    margin: 0;
  }
`;var WE=a(553),BE=a(1017),zE=a(2628);function HE({activeItem:e,hideDiagramKeys:t,...a}){const[n]=Object(l.useState)("DevicePorts-"+Date.now()),r=Object(o.useDispatch)();return Object(l.useEffect)(()=>{const e={style:BE.a.overflow,styleName:"overflow",dependant:n};return r(Object(WE.c)(e)),()=>{r(Object(WE.b)(e))}},[]),i.a.createElement(zE.a,Object.assign({deviceData:e},a))}var GE=a(500),$E=a(2623),YE=a(2792),XE=a(1041),KE=a(908);const ZE=Object(r.c)(S.a)`
  font-size: ${({theme:e})=>e.fontSizes[0]}px;
`,qE=({spacing:e})=>r.a`
  &:not(:first-child) {
    margin-top: ${e};
  }
`;var JE=({deviceData:e,portSizeOverride:t,...a})=>{const{diagram:n}=Object(b.G)(e),l=n.length?Object(b.c)(n,e):Object(b.f)(e);if(!l||0===l.length)return i.a.createElement(ZE,null,i.a.createElement(f.cb,{isActive:!0,className:"mr-2"}),i.a.createElement(R.b,{id:"DEVICE_DIAGRAM_MISSING"}));const r=Object(YE.a)(l.map(e=>e.length)),c=Object.values(KE.a).find(e=>r<=e.threshold);return i.a.createElement(i.a.Fragment,null,l.map((n,l)=>i.a.createElement(S.a,{"align-items":"flex-end",key:"PortLayoutRow-"+(l+1),className:qE(c),flex:"1 1 "+(t||c.size)},n.map((n,r)=>{const o=`Port-${l+1}-${r+1}`,s=n&&(null==e?void 0:e.port_table)&&Object(b.u)(n.portNumber,e);return i.a.createElement(XE.a,Object.assign({cellData:s,deviceData:e,key:o,keyValue:o,portSize:c,portSizeOverride:t},a))}))))};const QE=Object(r.c)("div")`
  position: relative;
  padding: 24px 32px;
  display: flex;
  flex: none;
  flex-direction: column;
`,em=Object(r.c)("div")`
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
`,tm=Object(r.c)(S.a)`
  padding: 0 30px;
`,am=Object(r.c)(oe.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
`,nm=Object(r.c)("div")`
  padding: 32px 32px 16px 32px;
`,lm=Object(r.c)(S.a)`
  &:not(:last-child) {
    padding: 8px 0;
  }
`,im=Object(r.c)(f.r)`
  color: ${({theme:e})=>e.motifPalette.success};
  margin-right: 9px;
  width: 17px;
  height: 17px;
`,rm=Object(r.c)(f.a)`
  color: ${({theme:e})=>e.motifPalette.warning};
  margin-right: 9px;
  width: 18px;
  height: 18px;
`,cm=Object(r.c)(oe.a)`
  margin-left: 2px;
`;function om({deviceData:e,hideAnomalies:t,showFullScreenDiagramButton:a,...r}){const c=Object(n.k)(),{portAnomalies:o,totalAnomalies:s}=Object(GE.b)(e.port_table,Ce.switchAnomaliesMap),E=1===s,m=Object(l.useCallback)(e=>c.push("ports/"+e.toString()),[c]),d=Object(Ta.a)("/devices/:mac/ports");return i.a.createElement(i.a.Fragment,null,i.a.createElement(QE,null,i.a.createElement(em,null,i.a.createElement(JE,Object.assign({deviceData:e},r))),i.a.createElement($E.a,{deviceData:e})),!t&&!!s&&i.a.createElement(nm,null,E?i.a.createElement(i.a.Fragment,null,i.a.createElement(lm,{alignItems:"center"},i.a.createElement(rm,null),i.a.createElement(v.a,null,i.a.createElement(R.b,{id:o[0].anomalies[0]+"_PROBLEM"}),i.a.createElement(cm,{variant:"inline",onClick:()=>m(o[0].portNumber)},i.a.createElement(R.b,{id:"COMMON_PORT_NUMBER",values:{portNumber:o[0].portNumber}})))),i.a.createElement(lm,{alignItems:"center"},i.a.createElement(im,null),i.a.createElement(v.a,null,i.a.createElement(R.b,{id:o[0].anomalies[0]+"_SOLUTION"})))):i.a.createElement(lm,{alignItems:"center"},i.a.createElement(rm,null),i.a.createElement(v.a,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_MULTIPLE_ANOMALIES",values:{count:s}}),o.map((e,t)=>i.a.createElement(i.a.Fragment,null,i.a.createElement(cm,{variant:"inline",onClick:()=>m(e.portNumber)},i.a.createElement(R.b,{id:"COMMON_PORT_NUMBER",values:{portNumber:e.portNumber}})),t===o.length-1?".":","))))),a&&i.a.createElement(tm,null,i.a.createElement(am,{size:"small",type:"button",variant:"link",onClick:()=>c.push(d.replace(":mac",e.mac))},i.a.createElement(f.eb,{variant:"twoTone",isActive:!0,height:20,width:20}),i.a.createElement(R.b,{id:"DEVICE_PORT_BUTTON_PORTS_INSIGHTS"}))))}var sm=Object(Qa.compose)(Ja(["general","screen","network","services"]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:r,isInvalid:c})=>{var s,E,m,d;const _=Object(o.useSelector)(_i),u=Object(o.useSelector)(ui),b=Object(o.useSelector)(bi),p=Object(o.useSelector)(nr.selectGlobalApSettings),O=Object(o.useSelector)(nr.selectRadioAiSettings),I=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]),g=Object(o.useSelector)(nr.selectConnectivityMonitorEnabled),{_id:C,mac:h}=e,[T,v]=Object(l.useState)(!(null===(s=p.ap_exclusions)||void 0===s?void 0:s.includes(h))),[f,D]=Object(l.useState)(O.enabled&&!(null===(E=O.exclude_devices)||void 0===E?void 0:E.includes(h))),y=Object(o.useDispatch)(),P=Object(n.k)(),{state:A}=Object(n.l)(),N=null==A?void 0:A.accordion;N&&P.replace({pathname:P.location.pathname,state:Object.assign(P.location.state,{accordion:void 0})});const j=r||T!==!(null===(m=p.ap_exclusions)||void 0===m?void 0:m.includes(e.mac))||f!==(O.enabled&&!(null===(d=O.exclude_devices)||void 0===d?void 0:d.includes(e.mac))),x=Object(l.useCallback)(async()=>{var e,t;try{const a=[];if(T!==!(null===(e=p.ap_exclusions)||void 0===e?void 0:e.includes(h))){const e=p.ap_exclusions.filter(e=>e!==h);T||e.push(h),a.push({...p,ap_exclusions:e})}if(O.enabled&&f!==!(null===(t=O.exclude_devices)||void 0===t?void 0:t.includes(h))){const e=O.exclude_devices.filter(e=>e!==h);f||e.push(h),a.push({...O,exclude_devices:e,settings_preference:"auto"})}a.length&&await y(Object(Eo.k)(a))}catch(e){return void y(Object(je.a)({icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"}))}const a=Object.entries(_).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{});y(Object(Ce.updateDeviceWithIdEndpoint)(a,C,h,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(({data:e=[a]})=>{Object.values(u).forEach(t=>{"function"==typeof t&&t(e[0])})})},[C,y,_,p,T,f,h,u,O]),L=Object(l.useCallback)(()=>{Object.values(b).forEach(e=>{"function"==typeof e&&e()})},[b]);return i.a.createElement(i.a.Fragment,null,I&&i.a.createElement(om,{deviceData:e}),i.a.createElement(S.a,{flexDirection:"column",flex:"1 1 85%",padding:(I?"0":"20px")+" 32px 0"},i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a}),i.a.createElement(Cs,{isGlobalApSettingsEnabled:T,setGlobalApSettingsEnabled:v,isChannelOptimizationEnabled:f,setChannelOptimizationEnabled:D,disableChannelOptimization:!O.enabled}),i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"radios",label:i.a.createElement(R.b,{id:"COMMON_RADIOS"}),openByDefault:!N||"radios"===N,renderContent:()=>i.a.createElement(_s,{activeItem:e,setFormDirty:t,setFormInvalid:a,isWirelessMeshingEnabled:g,isGlobalApSettingsEnabled:T,isChannelOptimizationEnabled:f})},{id:"ports",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_PORTS"}),openByDefault:!1,renderContent:()=>i.a.createElement(HE,{activeItem:e})},{id:"screen",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>i.a.createElement(jo,{activeItem:e,setFormDirty:t})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),openByDefault:"network"===N,renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Ro,{activeItem:e,setFormDirty:t,setFormInvalid:a,hideFlowControl:!0})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:j,isInvalid:c,onFormSubmit:x,onFormCancel:L}))});const Em=Object(r.c)("div")`
  height: 100%;
`,mm=Object(r.c)("div")`
  margin: ${({theme:e})=>e.spacing["spacing-xl"]} 0;
`,dm=[{id:"bssid",sortable:!0,minWidth:45,renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_RADIOS_TABLE_HEADER_BSSID"})),renderCell:e=>i.a.createElement(v.a,{size:"body",truncate:!0,color:"inherit"},e.bssid)},{id:"essid",sortable:!0,minWidth:30,renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_RADIOS_TABLE_HEADER_ESSID"})),renderCell:e=>i.a.createElement(v.a,{size:"body",truncate:!0,color:"inherit"},e.essid)},{id:"channel",sortable:!0,minWidth:20,renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),renderCell:e=>i.a.createElement(v.a,{size:"body",color:"inherit"},e.channel)},{id:"channelWidth",sortable:!0,minWidth:20,renderLabel:()=>i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_RADIOS_TABLE_HEADER_WIDTH"})),renderCell:e=>i.a.createElement(v.a,{size:"body",color:"inherit"},e.bw)}];function _m({activeItem:{vap_table:e}}){return i.a.createElement(Em,null,i.a.createElement(Da.a,{items:e||[],disableColumnFilters:!0,disableTextPointer:!0,disableSelection:!0,columns:dm,renderFooter:()=>e&&e.length?i.a.createElement(mm,null,i.a.createElement(R.b,{id:"COMMON_TABLE_FOOTER",values:{length:e.length}})):i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_RADIOS_TABLE_NO_WLAN"}),rowHeight:30,idField:"name"}))}const um=Object(mn.a)(on.selectAPGroupsData,Pc.selectWifiNetworksData,g.c,(e,t,a)=>e.filter(e=>e.device_macs.includes(a)).map(e=>{const a=[];return((t||[]).filter(t=>{var a;return null===(a=null==t?void 0:t.ap_group_ids)||void 0===a?void 0:a.includes(e._id)})||[]).forEach(t=>{((null==t?void 0:t.wlan_bands)||[]).forEach(n=>{a.push({...t,id:`${t._id}-${e._id}-${n}`,wlan_band:n})}),a.length||a.push({...t,id:t._id+e._id})}),{...e,id:e._id,children:a}})),bm=Object(r.c)(f.Uc)`
  margin-right: 7px;
  margin-bottom: 2px;
`,pm=[{id:"name",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_GROUP_TABLE_HEADER_NAME"})),renderCell:({name:e,attr_no_delete:t,children:a,wlan_band:n})=>a?i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},t?i.a.createElement(i.a.Fragment,null,e," (",i.a.createElement(R.b,{id:"COMMON_WORD_DEFAULT"}),")"):e):i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body"},n===Pc.WlanBand.NG&&i.a.createElement(i.a.Fragment,null,i.a.createElement(bm,{isActive:!0}),e," (",i.a.createElement(R.b,{id:"COMMON_RADIO_BAND_NG"}),")"),n===Pc.WlanBand.NA&&i.a.createElement(i.a.Fragment,null,i.a.createElement(bm,{isActive:!0}),e," (",i.a.createElement(R.b,{id:"COMMON_RADIO_BAND_NA"}),")"),n===Pc.WlanBand.AX&&i.a.createElement(i.a.Fragment,null,i.a.createElement(bm,{isActive:!0}),e," (",i.a.createElement(R.b,{id:"COMMON_RADIO_BAND_6E"}),")"))}];var Om=()=>{const e=Object(o.useSelector)(um);return Object(Ta.g)([Object(on.fetchAPGroups)(void 0,{crudCacheStrategy:{type:me.a.CACHE}})],i.a.createElement(Da.a,{items:e,columns:pm,disableColumnFilters:!0,disableSelection:!0,disableTextPointer:!0}))},Im=a(1107),gm=a(2620);const Cm=Object(r.c)(S.a)`
  th {
    padding-right: 0;

    &:first-child {
      color: ${({theme:e})=>e.motifPalette.text01};
    }
  }
  tr:hover {
    cursor: pointer;
  }
`,hm=[{id:"name",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_DOWNLINK_DEVICE"})),renderCell:e=>i.a.createElement(S.a,{alignItems:"center",justifyContent:"center"},i.a.createElement(S.a,{alignItems:"center",justifyContent:"center",height:"20px",width:"20px"},i.a.createElement(y.c,{device:e.deviceData})),i.a.createElement(v.a,{truncate:!0,color:"inherit",size:"body",style:{width:"120px",paddingLeft:"6px",paddingRight:"6px"}},e.name===e.mac&&e.model?e.model:e.name)),minWidth:100},{id:"port_idx",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_DOWNLINK_PORT"})),minWidth:40,renderCell:e=>i.a.createElement(v.a,{color:"inherit",size:"body"},e.port_idx)},{id:"network",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_NETWORK"})),renderCell:e=>i.a.createElement(v.a,{color:"inherit",size:"body"},(()=>{var t,a,n,l,r;switch(null===(a=null===(t=e.deviceData)||void 0===t?void 0:t.uplink)||void 0===a?void 0:a.type){case"wire":return(null===(n=e.deviceData)||void 0===n?void 0:n.connection_network_name)||i.a.createElement(R.b,{id:"COMMON_HYPHEN"});case"wireless":return(null===(r=null===(l=e.deviceData)||void 0===l?void 0:l.uplink)||void 0===r?void 0:r.essid)||i.a.createElement(R.b,{id:"COMMON_HYPHEN"});default:return i.a.createElement(R.b,{id:"COMMON_HYPHEN"})}})()),minWidth:70},{id:"experinence",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_EXP"})),minWidth:60,renderCell:e=>i.a.createElement(Im.a,{device:e.deviceData,downlink:!0})}];var Tm=({activeItem:{downlink_table:e},params:{site:t,page:a,subPage:r},path:c,history:s})=>{const E=Object(o.useSelector)(gm.c),m=Object(o.useDispatch)(),d=Object(l.useMemo)(()=>{return t=E,(e||[]).map(e=>{const a=t.find(t=>t.mac===(e.mac||e.ap_mac));return a?{...e,id:a._id,name:Object(L.c)(a),deviceData:a,model:Object(L.e)(a.model)}:null}).filter(Boolean);var t},[e,E]);return i.a.createElement(Cm,null,i.a.createElement(Da.a,{items:d,disableColumnFilters:!0,initialSortBy:"port_idx",columns:hm,renderFooter:()=>i.a.createElement("div",null,(null==d?void 0:d.length)>0?i.a.createElement(R.b,{id:"COMMON_TABLE_FOOTER",values:{length:e.length}}):i.a.createElement(R.b,{id:"COMMON_DEVICES_NOT_FOUND"})),rowHeight:30,onRowClick:({mac:e})=>{s.push(Object(n.i)(c,{id:e,site:t,page:a,panel:jt.a.OVERVIEW,subPage:r})),m(Object(C.g)({type:u.c.DEVICE,mac:e}))}}))};const vm=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`;var fm=function({activeItem:e,...t}){var a,n;const r=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]),c=[...null!==(a=null==e?void 0:e.radio_table)&&void 0!==a?a:[]].sort(Ce.sortRadios).reverse();return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),r&&i.a.createElement(i.a.Fragment,null,i.a.createElement(sc,{activeItem:e}),i.a.createElement(vm,{variant:"secondary",items:[{id:"clients",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_HEADER_CLIENTS_AND_GUESTS"}),renderContent:()=>i.a.createElement(Rc,Object.assign({activeItem:e},t))},{id:"history",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_HISTORY"}),renderContent:()=>i.a.createElement(oc,Object.assign({activeItem:e},t))},{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),renderContent:()=>i.a.createElement(Mc,{activeItem:e})},...(null===(n=null==e?void 0:e.uplink)||void 0===n?void 0:n.mac)?[{id:"uplink",label:"wire"===e.uplink.type?i.a.createElement(R.b,{id:"DEVICE_HEADER_UPLINK_WIRED"}):i.a.createElement(R.b,{id:"DEVICE_HEADER_UPLINK_WIRELESS"}),renderContent:()=>i.a.createElement(oo,Object.assign({activeItem:e},t))}]:[],...(null==c?void 0:c.length)?[{id:"airStats",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_AIR_STATS"}),renderContent:()=>((null==e?void 0:e.radio_table)||[]).map(({radio:t})=>i.a.createElement(Bc,{activeItem:e,radio:t,key:t}))}]:[],{id:"downlinks",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_DOWNLINKS"}),renderContent:()=>i.a.createElement(Tm,Object.assign({activeItem:e},t))},{id:"apGroups",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_AP_GROUP"}),renderContent:()=>i.a.createElement(Om,null)},{id:"wlan",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_WLAN"}),renderContent:()=>i.a.createElement(_m,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})))},Rm=a(2768),Dm=a(131),Sm=a(90),ym=a(496),Pm=a(1599),Am=a(391),Nm=a(425),jm=a.n(Nm),xm=a(307),Lm=a(100),Vm=a(2624);const Mm=Object(r.c)(S.a)`
  width: 100%;
`,wm=(e,t,a,n)=>Array.from(e,(e,l)=>({id:"port_security_mac_address-"+l,port_security_mac_address:e,port_security_mac_address_name:Object(Vm.a)(t,a,e,n)})),Fm=[{id:"port_security_mac_address",label:i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_MAC_ADDRESS_LABEL"}),sortable:!1},{id:"port_security_mac_address_name",label:i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_NAME_LABEL"}),sortable:!1}],Um={port_security_mac_addresses:"DEVICE_PORT_FORM_TOPOLOGY_LABEL"};var km=Object(R.e)(({formValues:e,intl:t,setFieldValue:a})=>{const{port_security_mac_address:n}=e,r=Object(o.useSelector)(Ce.selectDevicesData),c=Object(o.useSelector)(xt.selectCombinedClientsData),s=Object(l.useMemo)(()=>({editActive:!1,port_security_mac_address:wm(n,r,c,t)}),[n,r,c,t]),E=Object(l.useMemo)(()=>wm(n,r,c,t),[n,r,c,t]),m=Object(l.useMemo)(()=>[{name:"new_port_security_mac_address",label:"COMMON_LABEL_MAC_ID",placeholder:"",type:"text"}],[]),d=Object(l.useCallback)(e=>{a("port_security_mac_address",e)},[a]),_=Object(l.useCallback)(({port_security_mac_address:e,new_port_security_mac_address:t})=>{t&&d([...e.map(({port_security_mac_address:e})=>e),t])},[d]),u=Object(l.useCallback)(({port_security_mac_address:t})=>{d(e.port_security_mac_address.filter(e=>e!==t))},[e,d]),b=Object(l.useCallback)(e=>{d([...e.map(({port_security_mac_address:e})=>e)])},[d]);return i.a.createElement(Mm,{flexWrap:"wrap"},i.a.createElement(Lm.c,{fieldName:"port_security_mac_address",items:E,columns:Fm,fieldLabels:Um,newFields:m,onAddItem:_,onRemoveItem:u,onEditSubmit:b,initialValues:s,useValuesInSchema:!0,validationSchema:e=>(e=>{const t=()=>Fe.a.string().label("DEVICE_PORT_FORM_MAC_ADDRESS_LABEL").matches(ln.s,{message:i.a.createElement(R.b,{id:"COMMON_VALIDATION_VALID_MAC"})}),a={arrayFieldName:"port_security_mac_address",stringFieldName:"port_security_mac_address",errorMessage:i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_MAC_MUST_BE_UNIQUE"})};return Fe.a.object().shape({editActive:Fe.a.bool(),new_port_security_mac_address:t().isMacUnique({formValues:null,...a}),port_security_mac_address:Fe.a.array().of(Fe.a.object().shape({port_security_mac_address:t().isMacUnique({formValues:e,...a}).required()}))})})(e),addButtonText:"COMMON_ACTION_ADD",fieldVariant:"secondary"}))}),Wm=a(2688),Bm=a(2807),zm=a(2625),Hm=a(616);const Gm=Object(r.c)(S.a)`
  margin-bottom: ${({marginBottom:e})=>e||16}px;
  justify-content: space-between;
  :last-child {
    margin-bottom: 0;
  }
`,$m=Object(r.c)(v.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  display: flex;
  flex: 1;
  margin-right: 12px;
`,Ym=Object(r.c)(f.cb)`
  margin: 0 6px;
`,Xm=r.a`
  margin-left: 11px;
`,Km=Object(r.c)("div")`
  margin-bottom: ${({marginBottom:e})=>e||0}px;
`,Zm=Object(r.c)("div")`
  > div:not(:last-child) {
    margin-bottom: ${({theme:e})=>e.spacing["spacing-xxl"]};
  }
`,qm=Object(r.c)(S.a)`
  width: 100%;
`,Jm=Object(r.c)(Ge.Field)`
  width: unset !important;
  margin-right: ${({theme:e})=>e.spacing["spacing-m"]};
  input {
    width: 100%;
  }
`,Qm=Object(r.c)(Ge.Field)`
  width: 20% !important;
  > div > div {
    width: 100% !important;
  }
`,ed=Object(r.c)("div")`
  flex: 1;
  max-width: calc(50% - 8px);
`,td=Object(r.c)(v.a)`
  margin-bottom: 5px;
`,ad=Object(r.c)("div")`
  padding-bottom: 10px;
  border-bottom: 1px solid ${Oa.a["white-6"]};

  span {
    margin-left: 5px;
  }
`,nd=Object(r.c)(S.a)`
  > * {
    width: 100%;
  }
`;var ld=Object(R.e)(function({activeItem:e,portData:t,formValues:a,setFieldValue:n,setFieldTouched:r,initialValues:c,intl:s}){var E,m,d;const{port_table:_=[]}=e,{lldpmed_enabled:u,stormctrl_enabled:b,op_mode:p,egress_rate_limit_kbps_enabled:O,speed:I}=a,{op_mode:g,port_idx:C,port_poe:h}=t,T=a.poe_mode,D=e.dot1x_portctrl_enabled,y=1===C,P=Object(Ce.hasSwitch)(e)||(Object(Ce.isInWallHd)(e)||Object(Ce.isUaiw6)(e)||Object(Ce.isU6EIW)(e))&&(y||D),A=Object(Ce.isInWallHd)(e),N=Object(Ce.getIsInWallAp)(e),j=Object(Ce.isUdm)(e),x=Object(Ce.isUdr)(e),L=Object(Ce.isSwitch)(e),V=Object(_o.u)(e),M=Object(_o.t)(e),w=Object(_o.s)(e),F=Object(_o.x)(e),U=Object(Ce.getPortPoeAvailability)(t),k=U.isPoePassthroughSupported&&!U.isPoeOffSupported,W="switch"===g&&(h||Object(Ce.isUaiw6)(e)||Object(Ce.isU6EIW)(e))&&P,B=Object(o.useDispatch)(),z=Object(l.useMemo)(()=>{var e;try{return null===(e=JSON.parse(I))||void 0===e?void 0:e.speed}catch(e){return null}},[I]),H=Object(l.useMemo)(()=>Object(Fi.getSupportedSpeeds)(t).map(({autoneg:e,speed:t=0,full_duplex:a=!1})=>{const{value:n,unit:l}=Object(aa.d)(1e6*t/8,"bitrate"),i=`${Object(Wm.a)(n,1)}${l}`;return{full_duplex:a,label:e?"COMMON_DEVICE_AUTONEG_FULL":`COMMON_DEVICE_DUPLEX_${a?"FULL":"HALF"}_STRING`,value:JSON.stringify({speed:t,full_duplex:a}),values:!e&&{speed:i}}}),[t]),G=Object(l.useMemo)(()=>{if(e){const t="mirror"===g;let a=Object(ol.a)(e,"switch_caps.max_mirror_sessions",void 0);if(a||0===a||(a=1),t||e.port_table.filter(e=>"mirror"===e.op_mode).length<a)return!0}return!1},[e,g]),{isAggregateAllowed:$,hasMaxAggregateSessionsReached:Y,aggregatePortOptions:X}=Object(l.useMemo)(()=>{var a;const n=Object(Ce.getPortNumbers)(e),l=Object.keys(n).reduce((e,t)=>n[t].length+e,0)||0,{port_idx:i}=t;let r=null===(a=null==e?void 0:e.switch_caps)||void 0===a?void 0:a.max_aggregate_sessions;r||0===r||(r=4);const c=null==e?void 0:e.port_table.filter(e=>e.aggregate_num_ports>1).length,o=Object(Hm.d)(_,t,zm.a.MAX),s=Object(Hm.b)(i,o),E=s[0],m=s[s.length-1]||E;return{isAggregateAllowed:E<=m&&m<=l,hasMaxAggregateSessionsReached:c>=r,aggregatePortOptions:s.map(e=>({label:"DEVICE_PROPERTIES_PORT_WITH_NUMBER_AND_HYPHEN",value:e,values:{port:e}}))}},[e,t,_]),K=Object(l.useMemo)(()=>{const{isPoeOffSupported:e,isPoePassthroughSupported:t,isPoePassive24Supported:a,isPoeAutoSupported:n,isPoePlusPlusSupported:l,isPoePlusSupported:i}=U,r=[];if(e&&r.push({label:s.formatMessage({id:"COMMON_DEVICE_POE_MODE_OFF"}),value:Sm.d.OFF}),t&&r.push({label:s.formatMessage({id:"COMMON_DEVICE_POE_MODE_PASSTHROUGH"}),value:Sm.d.PASSTHROUGH}),!t&&a&&r.push({label:s.formatMessage({id:"COMMON_DEVICE_POE_MODE_PASSIVE"}),value:Sm.d.PASSIVE_24V}),!t&&n){const e=[];l?e.push(s.formatMessage({id:"COMMON_DEVICE_POE_MODE_POE_PLUS_PLUS"})):i?e.push(s.formatMessage({id:"COMMON_DEVICE_POE_MODE_POE_PLUS"})):e.push(s.formatMessage({id:"COMMON_DEVICE_POE_MODE_POE"})),e.push(s.formatMessage({id:"DEVICE_PORT_FORM_AUTO_DETECT"})),r.push({label:s.formatMessage({id:"COMMON_DEVICE_POE_MODE_AUTO"}),value:Sm.d.AUTO})}return r},[s,U]);return i.a.createElement(i.a.Fragment,null,W&&i.a.createElement(Km,{marginBottom:24},k?i.a.createElement(nd,{alignItems:"center",flexDirection:"column"},i.a.createElement(td,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_POE_MODE_LABEL"})),i.a.createElement(ad,null,i.a.createElement(f.cb,{isActive:!0})," ",i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_NOTICE_POE_PASSTHROUGH_ONLY"}))):i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_POE_MODE_LABEL",name:"poe_mode",type:"dropdown",full:!0,translateLabel:!0,options:K,afterChange:e=>{e!==Sm.d.PASSIVE_24V&&e!==Sm.d.PASSTHROUGH||B(Object(be.a)({message:"DEVICE_ACTIONS_SWITCH_PORT_POE_MODE_CONFIRM_MESSAGE",messageValues:{ports:i.a.createElement("strong",null,C),portsCount:1,poe_mode:i.a.createElement("strong",null,e===Sm.d.PASSIVE_24V?s.formatMessage({id:"COMMON_DEVICE_POE_MODE_PASSIVE"}):e)},title:"DEVICE_ACTIONS_SWITCH_PORT_POE_MODE_CONFIRM_TITLE",useFormattedMessage:!0,onConfirm:()=>{n("poe_mode",e),B(Object(pe.e)())},onCancel:()=>{n("poe_mode",T),B(Object(pe.e)())},size:"medium"}))}})),!j&&!N&&i.a.createElement(Km,{marginBottom:24},i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_OPERATIONS_LABEL",name:"op_mode",type:"dropdown",variant:"secondary",full:!0,translateLabel:!0,translateOptions:!0,options:[{label:"DEVICE_PORT_FORM_SWITCHING_LABEL",value:"switch"},...G?[{label:"DEVICE_PORT_FORM_MIRRORING_LABEL",value:"mirror"}]:[],...$?[{label:"DEVICE_PORT_FORM_AGGREGATE_LABEL",value:"aggregate"}]:[]]})),"mirror"===p&&i.a.createElement(Km,{marginBottom:24},i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_MIRRORING_PORT",full:!0,type:"number",name:"mirror_port_idx"})),"aggregate"===p&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Gm,{marginBottom:24,alignItems:"baseline"},i.a.createElement(ed,null,i.a.createElement(Ge.Field,{full:!0,name:"port_idx",label:"DEVICE_PORT_FORM_AGGREGATE_PORTS_LABEL",value:s.formatMessage({id:"DEVICE_PROPERTIES_PORT_WITH_NUMBER_AND_HYPHEN"},{port:C}),disabled:!0})),i.a.createElement("div",null,"-"),i.a.createElement(ed,null,i.a.createElement(Ge.Field,{full:!0,name:"aggregatePortStop",type:"dropdown",options:X,translateOptions:!0,validated:!0,disabled:Y}))),!Y&&i.a.createElement(Gm,{marginBottom:24,alignItems:"center"},i.a.createElement($e.a,{level:"warning"},i.a.createElement(v.a,{size:"caption"},i.a.createElement(R.a,{id:(null===(E=e.downlink_table)||void 0===E?void 0:E.length)?"DEVICE_PROPERTIES_WARNING_PORT_AGGREGATION_UPLINK":"DEVICE_PROPERTIES_WARNING_PORT_AGGREGATION_DOWNLINK"})))),Y&&i.a.createElement(Gm,{marginBottom:24,alignItems:"center"},i.a.createElement($e.a,{level:"warning"},i.a.createElement(v.a,{size:"caption"},i.a.createElement(R.a,{id:"DEVICE_PROPERTIES_WARNING_PORT_AGGREGATION_MAX_SESSION_WARNING"}))))),e.dot1x_portctrl_enabled&&["mirror","aggregate"].includes(p)&&i.a.createElement(Km,{marginBottom:24}),!N&&t.media&&i.a.createElement(Km,{marginBottom:24},i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_LINK_SPEED_LABEL",name:"speed",type:"dropdown",variant:"secondary",full:!0,translateLabel:!0,translateOptions:!0,options:H})),L&&z===Sm.c.PORTSPEED_FULL_25G.speed&&i.a.createElement(Km,{marginBottom:24},i.a.createElement(Bm.a,{text:s.formatMessage({id:"DEVICE_PORT_FORM_LINK_SPEED_SFP28_ALERT"})})),V&&"aggregate"!==p&&!A&&i.a.createElement(Gm,null,i.a.createElement($m,null,i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_PORT_ISOLATION_LABEL"}),i.a.createElement(rn.a,{portal:!0,tooltipClassName:Xm,position:"topRight",width:230,message:i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_PORT_ISOLATION_NOTIFICATION"})},i.a.createElement(Ym,{isActive:!0}))),i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_PORT_ISOLATION_LABEL",name:"isolation",type:"checkbox"})),"switch"===p&&!N&&!j&&!x&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Gm,{marginBottom:16},i.a.createElement($m,null,i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_STORM_CONTROL_LABEL"})),i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_STORM_CONTROL_LABEL",name:"stormctrl_enabled",afterChange:e=>{n("stormctrl_enabled",e),e||["stormctrl_ucast_rate","stormctrl_mcast_rate","stormctrl_bcast_rate"].forEach(e=>{n(e,c[e]),r(e,!1)})},type:"checkbox"})),b&&i.a.createElement(Zm,null,i.a.createElement(Km,{marginBottom:10},i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_UNKNOWN_UNICAST",placeholder:"COMMON_ENTER_PACKETS_PER_SECOND",full:!0,variant:"secondary",type:"number",min:Sm.e.MIN,max:Sm.e.MAX,name:"stormctrl_ucast_rate"})),i.a.createElement(Km,{marginBottom:10},i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_UNKNOWN_MULTICAST",placeholder:"COMMON_ENTER_PACKETS_PER_SECOND",full:!0,type:"number",variant:"secondary",name:"stormctrl_mcast_rate",min:Sm.e.MIN,max:Sm.e.MAX})),i.a.createElement(Km,{marginBottom:20},i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_UNKNOWN_BROADCAST",placeholder:"COMMON_ENTER_PACKETS_PER_SECOND",full:!0,type:"number",variant:"secondary",name:"stormctrl_bcast_rate",min:Sm.e.MIN,max:Sm.e.MAX})))),M&&"switch"===p&&!A&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Gm,null,i.a.createElement($m,null,i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_LLDP_MED_LABEL"})),i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_LLDP_MED_LABEL",name:"lldpmed_enabled",afterChange:e=>{n("lldpmed_enabled",e),e||n("lldpmed_notify_enabled",c.lldpmed_notify_enabled)},type:"checkbox"})),u&&i.a.createElement(Gm,null,i.a.createElement($m,null,i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_TOPOLOGY_LABEL"})),i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_TOPOLOGY_LABEL",name:"lldpmed_notify_enabled",type:"checkbox"}))),F&&"switch"===p&&!A&&i.a.createElement(Gm,null,i.a.createElement($m,null,i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_STP_LABEL"}),i.a.createElement(rn.a,{portal:!0,tooltipClassName:Xm,position:"topRight",width:230,message:i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_STP_TOOLTIP"})},i.a.createElement(Ym,{isActive:!0}))),i.a.createElement(Ge.Field,{name:"stp_port_mode",type:"checkbox"})),w&&"switch"===p&&!A&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Gm,null,i.a.createElement($m,null,i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_EGRESS_LABEL"})),i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_EGRESS_LABEL",name:"egress_rate_limit_kbps_enabled",afterChange:e=>{n("egress_rate_limit_kbps_enabled",e),e||(n("egress_rate_limit_kbps",c.egress_rate_limit_kbps),r("egress_rate_limit_kbps",!1))},type:"checkbox"})),O&&i.a.createElement(S.a,{flexDirection:"row",alignItems:"flex-end"},i.a.createElement(qm,{flexDirection:"column"},i.a.createElement(Jm,{full:!0,label:"DEVICE_PORT_FORM_RATE_LIMIT_LABEL",type:"number",variant:"secondary",min:null===(m=Sm.b[a.egress_rate_limit_unit])||void 0===m?void 0:m.MIN,max:null===(d=Sm.b[a.egress_rate_limit_unit])||void 0===d?void 0:d.MAX,name:"egress_rate_limit_kbps"})),i.a.createElement(Qm,{type:"dropdown",variant:"secondary",options:ym.a.slice(0,2),name:"egress_rate_limit_unit",translateOptions:!0}))))});const id=Object(r.c)("div")`
  padding: 0 0 48px 0;

  li {
    &[aria-expanded='true'] {
      border-bottom: none;
    }
    > div {
      margin-bottom: 0;
    }
  }
`,rd=Object(r.c)("div")`
  &:not(:first-child) {
    border-top: 1px solid ${({theme:e})=>e.motifPalette.ui04};
    padding-top 8px;
    margin-top: 16px;
  }
`,cd=Object(r.c)(S.a)`
  &:not(:last-child) {
    padding: 8px 0;
  }
`,od=Object(r.c)(f.r)`
  color: ${({theme:e})=>e.motifPalette.success};
  margin-right: 9px;
  width: 17px;
  height: 17px;
`,sd=Object(r.c)(f.c)`
  color: ${({theme:e})=>e.motifPalette.warning};
  margin-right: 9px;
  width: 18px;
  height: 18px;
`,Ed=({anomalies:e})=>e.map(e=>i.a.createElement(rd,{key:e},i.a.createElement(cd,{alignItems:"center"},i.a.createElement(sd,null),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:e+"_PROBLEM"}))),i.a.createElement(cd,{alignItems:"center"},i.a.createElement(od,null),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:e+"_SOLUTION"})))));function md({port:e}){const t=Object(GE.a)(e,Ce.switchAnomaliesMap),a=t.length;return a?i.a.createElement(id,null,a>1?i.a.createElement(Ia.a,{variant:"tertiary",items:[{id:"anomalies",openByDefault:!0,label:i.a.createElement(v.a,{size:"body",color:"primary",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_ERRORS",values:{errorCount:a}})),renderContent:()=>i.a.createElement(Ed,{anomalies:t})}]}):i.a.createElement(Ed,{anomalies:t})):null}const dd=Object(r.c)(S.a)`
  position: relative;
  margin: -18px -30px 25px;
  padding-bottom: 12px;
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};

  svg {
    position: absolute;
    left: 24px;
  }
`,_d=Object(r.c)(v.a)`
  width: 100%;
  text-align: center;
  text-transform: uppercase;
`,ud=Object(r.c)(Ia.a)`
  > li {
    :last-child {
      border-bottom: none;

      > div {
        margin-bottom: 0;
      }
    }
  }
`,bd=Object(r.c)(S.a)`
  width: 100%;
  padding: 30px;
`,pd=Object(r.c)(S.a)`
  margin-bottom: ${({marginBottom:e})=>e||0}px;
`,Od=Object(r.c)("li")`
  ${({isGroup:e})=>e?"\n      pointer-events: none;\n      opacity: 0.4;\n    ":"margin-left: 16px;"}
`,Id=Object(r.c)(S.a)`
  margin-bottom: ${({theme:e})=>e.spacing["spacing-xl"]};
`,gd=Object(r.c)(oe.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  span {
    margin-left: 5px !important;
    svg {
      margin-right: 0 !important;
    }
  }
`,Cd=()=>{const e=i.a.createElement(R.b,{id:"DEVICE_VALIDATION_HINT_RANGE",values:{min:Sm.e.MIN,max:Sm.e.MAX}});return en.a.number().when("stormctrl_enabled",{is:!0,then:en.a.number().label(e).min(Sm.e.MIN,e).max(Sm.e.MAX,e).integer(e)})},hd=Object(Me.f)({mapPropsToValues:({currentPort:e,currentPortOverride:t})=>{const{port_idx:a,poe_mode:n,portconf_id:l,stormctrl_bcast_enabled:i=!1,stormctrl_bcast_rate:r="",stormctrl_mcast_enabled:c=!1,stormctrl_mcast_rate:o="",stormctrl_ucast_enabled:s=!1,stormctrl_ucast_rate:E="",isolation:m=!1,lldpmed_enabled:d,lldpmed_notify_enabled:_=!1,speed:u,full_duplex:b,op_mode:p,mirror_port_idx:O,port_security_mac_address:I=[],egress_rate_limit_kbps_enabled:g=!1,egress_rate_limit_kbps:C="",stp_port_mode:h=!0,nameOverride:T="",aggregate_num_ports:v=null}=e;return{name:T,speed:(null==t?void 0:t.speed)&&(null==t?void 0:t.full_duplex)?JSON.stringify({speed:u,full_duplex:b}):JSON.stringify({speed:0,full_duplex:!1}),lldpmed_enabled:!1!==d,stormctrl_enabled:i||c||s,aggregatePortStop:v?a+v-1:null,port_idx:a,poe_mode:n,portconf_id:l,stormctrl_bcast_enabled:i,stormctrl_bcast_rate:r,stormctrl_mcast_enabled:c,stormctrl_mcast_rate:o,stormctrl_ucast_enabled:s,stormctrl_ucast_rate:E,isolation:m,lldpmed_notify_enabled:_,full_duplex:b,mirror_port_idx:O,op_mode:p,port_security_mac_address:I,egress_rate_limit_kbps:C,egress_rate_limit_unit:ym.a[0].value,egress_rate_limit_kbps_enabled:g,stp_port_mode:h}},validationSchema:({activeItem:e})=>{const t=Object(Ce.getPortNumbers)(e),a=Math.min(t.standard[0]||1,t.sfp[0]||1,t.plus[0]||1),n=Math.max(t.standard[t.standard.length-1]||1,t.sfp[t.sfp.length-1]||1,t.plus[t.plus.length-1]||1),l=i.a.createElement(R.b,{id:"DEVICE_VALIDATION_HINT_RANGE",values:{min:a,max:n}}),r=(e=!1)=>i.a.createElement(R.b,{id:"DEVICE_VALIDATION_HINT_RANGE",values:{min:Sm.b[ym.a[e?1:0].value].MIN,max:Sm.b[ym.a[e?1:0].value].MAX}});return en.a.object().shape({port_idx:en.a.number(),name:en.a.string(),poe_mode:en.a.string(),portconf_id:en.a.string(),stormctrl_enabled:en.a.boolean(),stormctrl_bcast_enabled:en.a.boolean(),stormctrl_bcast_rate:Cd(),stormctrl_mcast_enabled:en.a.boolean(),stormctrl_mcast_rate:Cd(),stormctrl_ucast_enabled:en.a.boolean(),stormctrl_ucast_rate:Cd(),isolation:en.a.boolean(),full_duplex:en.a.boolean(),lldpmed_enabled:en.a.boolean(),lldpmed_notify_enabled:en.a.boolean(),op_mode:en.a.string(),mirror_port_idx:en.a.number().when("op_mode",{is:"mirror",then:en.a.number().required(l).min(a,l).max(n,l)}),aggregatePortStop:en.a.number().nullable().when("op_mode",{is:"aggregate",then:en.a.number().required().label("DEVICE_PORT_FORM_AGGREGATE_PORT_LABEL")}),port_security_mac_address:en.a.array().of(en.a.string()),egress_rate_limit_kbps_enabled:en.a.boolean(),stp_port_mode:en.a.boolean(),egress_rate_limit_kbps:en.a.number().when(["egress_rate_limit_unit","egress_rate_limit_kbps_enabled"],{is:(e,t)=>e===ym.a[0].value&&t,then:en.a.number().required(r()).min(Sm.b.k.MIN,r()).max(Sm.b.k.MAX,r()).integer()}).when(["egress_rate_limit_unit","egress_rate_limit_kbps_enabled"],{is:(e,t)=>e===ym.a[1].value&&t,then:en.a.number().required(r(!0)).min(Sm.b.M.MIN,r(!0)).max(Sm.b.M.MAX,r(!0))})})},handleSubmit:(e,{props:{updateDeviceWithIdEndpoint:t,activeItem:{_id:a,port_overrides:n,mac:l},activeItem:i,currentPort:r,intl:c,history:o}})=>{var s;const E=c.formatMessage({id:"DEVICE_PROPERTY_HEADER_PORTS"}),m=Object(Ce.getIsPortConfDisabled)(i,r),{stormctrl_enabled:d,stormctrl_bcast_rate:_,stormctrl_mcast_rate:u,lldpmed_enabled:b,lldpmed_notify_enabled:p,stormctrl_ucast_rate:O,egress_rate_limit_kbps:I,egress_rate_limit_kbps_enabled:g,op_mode:C,mirror_port_idx:h,stp_port_mode:T,aggregatePortStop:v}=e,{speed:f,full_duplex:R}=JSON.parse(e.speed);let D=null;g&&(D=e.egress_rate_limit_unit===ym.a[1].value?1e3*I:I),delete e.egress_rate_limit_unit;const S={...e,speed:f,full_duplex:R,stp_port_mode:T,autoneg:!f,lldpmed_notify_enabled:!!b&&p,stormctrl_bcast_enabled:!!d&&!!_,stormctrl_bcast_rate:d?_:null,stormctrl_mcast_enabled:!!d&&!!u,stormctrl_mcast_rate:d?u:null,stormctrl_ucast_enabled:!!d&&!!O,stormctrl_ucast_rate:d?O:null,egress_rate_limit_kbps:D,mirror_port_idx:"mirror"===C?h.toString():null,aggregate_num_ports:"aggregate"===C?v-r.port_idx+1:null},y=Object(Rm.a)(S,(e,t)=>"portconf_id"===t?m:"stormctrl_enabled"===t||"op_mode"===t&&"switch"===e||("lldpmed_enabled"===t?e:!("full_duplex"===t&&S.speed||"autoneg"===t||("poe_mode"!==t||"mirror"!==S.op_mode)&&("stp_port_mode"===t?"switch"===S.op_mode&&Object(_o.x)(i)&&!Object(Ce.isInWallHd)(i):"aggregatePortStop"!==t&&e))));y.port_security_enabled=!!(null===(s=y.port_security_mac_address)||void 0===s?void 0:s.length);let P=[y];n&&(P=[y,...n.filter(e=>e.port_idx!==y.port_idx)]),t({port_overrides:P},a,l,{successToast:{icon:Ea.a.success,message:"DEVICE_PORT_FORM_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR",values:{section:E}},mergeAndOverrideKeys:["port_overrides"],extend:!0}).then(()=>{o.goBack()})}}),Td={updateDeviceWithIdEndpoint:Ce.updateDeviceWithIdEndpoint};var vd=Object(Qa.compose)(Object(o.connect)((e,{activeItem:t,params:{subPanel:a,subPanelId:n}})=>({portConfig:Object(Dm.selectPortConf)(e),currentPort:Object(Ce.getCurrentPortData)(n?+n:+a,t),currentPortOverride:Object(Ce.getCurrentPortOverrideData)(n?+n:+a,t)}),Td),R.e,hd)(function({portConfig:e,activeItem:t,history:a,currentPort:r,submitForm:c,resetForm:s,setFieldValue:E,setFieldTouched:m,values:_,values:{name:u,op_mode:b,portconf_id:p},intl:O,dirty:I,initialValues:g,setValues:C}){const h=Object(Ce.getIsInWallAp)(t),T=Object(Ce.getIsSwitchMini)(t),D=Object(Ce.getIsUapUswHybrid)(t),y=Object(_o.v)(t),P=Object(Ce.getHasSwitchFullFeatures)(t,r),A=Object(Ce.getIsPortConfDisabled)(t,r),N=Object(Ce.getPortPoeAvailability)(r),j=Object(Hm.f)(N),x=Object(o.useDispatch)(),L=Object(o.useSelector)(oa.b),V=Object(o.useSelector)(d.i),M=Object(o.useSelector)(ke.s),w=Object(n.i)(V,{site:L}),F="switch"===b&&y&&!h&&!Object(Ce.isUdm)(t),U=Object(Ta.a)("/devices/properties/:mac/settings"),{mac:k}=t,W=h?U.replace(":mac",k):"../services",[B,z]=Object(l.useState)(""),[H,G]=Object(l.useState)(!1),[$,Y]=Object(l.useState)(!1),X=Object(l.useMemo)(()=>{const t=e.map(e=>({...e,groupLabel:Object(Ce.getPortProfileGroup)(e)})),a=Object(rE.a)(t,"groupLabel");return Object.entries(a).reduce((e,[t,a])=>{const n=a.filter(e=>D?e.attr_hidden_id!==Ce.SWITCH_PROFILE.ALL_ID:!T||"DEVICE_PROPERTIES_VALUES_SWITCH_PORT_PROFILE_GROUP_CUSTOM"!==e.groupLabel).map(({name:e,_id:t})=>({label:e,value:t}));return"undefined"===t||T&&"DEVICE_PROPERTIES_VALUES_SWITCH_PORT_PROFILE_GROUP_CUSTOM"===t?(e.push(...n),e):(e.push({groupLabel:O.formatMessage({id:t}),items:n}),e)},[])},[O,e,D]),K=Object(l.useMemo)(()=>Object(Pm.a)(X.map(({groupLabel:e,items:t})=>[{isGroup:!0,label:e,value:e},...t])),[X]),Z=(q=t,Object(Ce.isAp)(q)?"DEVICE_TYPE_ACCESS_POINT":Object(Ce.isUdm)(q)?"DEVICE_TYPE_GATEWAY":"DEVICE_TYPE_SWITCH");var q;const J=Object(l.useCallback)((t,a)=>{const n=j.includes(Sm.d.AUTO)?Sm.d.AUTO:Sm.d.OFF,l=null==e?void 0:e.find(e=>e._id===t),c=Object(Ce.getIsNoEditPortProfile)(l),o=(null==r?void 0:r.portconf_id)===(null==l?void 0:l._id),{speed:m=0,full_duplex:d=0}=l,b={lldpmed_enabled:!0,stormctrl_enabled:!1,aggregatePortStop:null,poe_mode:n,stormctrl_bcast_enabled:!1,stormctrl_bcast_rate:"",stormctrl_mcast_enabled:!1,stormctrl_mcast_rate:"",stormctrl_ucast_enabled:!1,stormctrl_ucast_rate:"",isolation:!1,lldpmed_notify_enabled:!1,op_mode:"switch",port_security_mac_address:[],egress_rate_limit_kbps:"",egress_rate_limit_unit:ym.a[0].value,egress_rate_limit_kbps_enabled:!1,stp_port_mode:!0,full_duplex:!1},p={...b,...null==e?void 0:e.find(e=>e._id===(null==r?void 0:r.portconf_id))},I=(null==p?void 0:p.speed)&&(null==p?void 0:p.full_duplex)?{speed:m,full_duplex:d}:{speed:0,full_duplex:!1},g=["name","speed"],h=[Object.keys(_),Object.keys(p)].reduce((e,t)=>e.filter(e=>t.includes(e))).filter(e=>!g.includes(e)),T=!jm()(Object(Am.a)(p,h),Object(Am.a)(_,h))||!jm()(I,JSON.parse(_.speed));Y(T),o?(s(),E("name",u)):C(c&&!o?{..._,portconf_id:null==l?void 0:l._id,speed:JSON.stringify({speed:0,full_duplex:!1}),...b}:{..._,speed:(null==l?void 0:l.speed)&&(null==l?void 0:l.full_duplex)?JSON.stringify({speed:m,full_duplex:d}):JSON.stringify({speed:0,full_duplex:!1}),lldpmed_enabled:!1!==(null==l?void 0:l.lldpmed_enabled),stormctrl_enabled:(null==l?void 0:l.stormctrl_bcast_enabled)||(null==l?void 0:l.stormctrl_mcast_enabled)||(null==l?void 0:l.stormctrl_ucast_enabled),stormctrl_bcast_enabled:null==l?void 0:l.stormctrl_bcast_enabled,stormctrl_bcast_rate:null==l?void 0:l.stormctrl_bcast_rate,stormctrl_mcast_enabled:null==l?void 0:l.stormctrl_mcast_enabled,stormctrl_mcast_rate:null==l?void 0:l.stormctrl_mcast_rate,stormctrl_ucast_enabled:null==l?void 0:l.stormctrl_ucast_enabled,stormctrl_ucast_rate:null==l?void 0:l.stormctrl_ucast_rate,isolation:null==l?void 0:l.isolation,lldpmed_notify_enabled:null==l?void 0:l.lldpmed_notify_enabled,full_duplex:null==l?void 0:l.full_duplex,op_mode:null==l?void 0:l.op_mode,egress_rate_limit_kbps:null==l?void 0:l.egress_rate_limit_kbps,egress_rate_limit_unit:ym.a[0].value,egress_rate_limit_kbps_enabled:null==l?void 0:l.egress_rate_limit_kbps_enabled,stp_port_mode:null==l?void 0:l.stp_port_mode});const v=(null==l?void 0:l.poe_mode)||n;z(v);const f=j.includes(v);G(f),f?v===Sm.d.PASSIVE_24V||v===Sm.d.PASSTHROUGH?x(Object(be.a)({message:"DEVICE_ACTIONS_SWITCH_PORT_POE_MODE_CONFIRM_MESSAGE",messageValues:{ports:i.a.createElement("strong",null,null==r?void 0:r.port_idx),portsCount:1,poe_mode:i.a.createElement("strong",null,v===Sm.d.PASSIVE_24V?O.formatMessage({id:"COMMON_DEVICE_POE_MODE_PASSIVE"}):v)},title:"DEVICE_ACTIONS_SWITCH_PORT_POE_MODE_CONFIRM_TITLE",useFormattedMessage:!0,onConfirm:()=>{E("poe_mode",v),x(Object(pe.e)()),a()},onCancel:()=>{E("poe_mode",null==r?void 0:r.poe_mode),x(Object(pe.e)())},size:"medium"})):(E("poe_mode",v),a()):a()},[_,null==r?void 0:r.poe_mode,e]),Q=Object(l.useMemo)(()=>i.a.createElement(Ge.Field,{label:P?"DEVICE_PORT_FORM_PORT_PROFILE_LABEL":"DEVICE_PORT_FORM_PORT_NETWORKS_VLAN_LABEL",name:"portconf_id",type:"dropdown",variant:"secondary",full:!0,translateLabel:!0,options:K,renderOption:({id:e,onClick:t,className:a,isSelected:n,option:{isGroup:l=!1,label:r,value:c}})=>i.a.createElement(Od,{key:`${e}-${r}`,id:e,onClick:e=>{J(c,()=>t(e))},className:a,"aria-selected":n,role:"option",isGroup:l},r),disabled:A}),[J,P,A,K]),ee=()=>{s(),a.goBack()};return Object(Ta.g)([Object(Dm.fetchPortConf)()],i.a.createElement(i.a.Fragment,null,i.a.createElement(bd,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(dd,{alignItems:"center"},i.a.createElement(f.f,{onClick:ee,style:{cursor:"pointer"}}),i.a.createElement(_d,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_PORT_WITH_NUMBER",values:{port:Object(Ce.getPortIndex)(r)}}))),i.a.createElement(md,{port:r}),i.a.createElement(pd,{marginBottom:24},i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_NAME_LABEL",variant:"secondary",full:!0,name:"name",placeholder:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_LABEL_PORT"})),i.a.createElement(pd,{marginBottom:24},Q),i.a.createElement(Id,{alignSelf:"flex-end"},i.a.createElement(gd,{size:"small",type:"button",variant:"inline",onClick:()=>{a.push(w+"/settings/profiles")}},i.a.createElement(f.p,{height:20,width:20}),i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_MANAGE_PORT_PROFILES"}))),!!r.portconf_id&&p!==r.portconf_id&&$&&i.a.createElement(pd,{marginBottom:24},i.a.createElement(S.a,null,i.a.createElement($e.a,{level:"warning"},i.a.createElement(v.a,{size:"caption"},i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_NOTICE_OVERRIDE_RESET"}))))),!!r.portconf_id&&p!==r.portconf_id&&!H&&r.port_poe&&$&&i.a.createElement(pd,{marginBottom:24},i.a.createElement(S.a,null,i.a.createElement($e.a,{level:"warning"},i.a.createElement(v.a,{size:"caption"},i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_NOTICE_OVERRIDE_POE_MODE",values:{profile_poe_mode:i.a.createElement("strong",null,B===Sm.d.PASSIVE_24V?O.formatMessage({id:"COMMON_DEVICE_POE_MODE_PASSIVE"}):B===Sm.d.AUTO?O.formatMessage({id:"COMMON_DEVICE_POE_MODE_AUTO"}):B)}}))))),A&&i.a.createElement(pd,{marginBottom:24},i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(Id,null,i.a.createElement(f.cb,{isActive:!0,style:{marginRight:8}}),i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_NOTICE_PORT_CONF_DISABLED"})),i.a.createElement(S.a,{alignSelf:"flex-end"},i.a.createElement(xm.a,{name:"configureLink",variant:"link",size:"small",onClick:()=>a.push(W,{accordion:"network"}),style:{marginTop:5}},i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_BUTTON_PORT_CONF_CONFIGURE"}))))),r.poe_enable&&i.a.createElement(i.a.Fragment,null,i.a.createElement(pd,{flexDirection:"column",marginBottom:12},i.a.createElement(v.a,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_PORT_MANUAL_POWER_CYCLE"})),i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_PORT_MANUAL_POWER_CYCLE_DESCRIPTION",values:{deviceType:i.a.createElement(R.a,{id:Z})}}))),i.a.createElement(Id,{alignSelf:"flex-end",marginBottom:24},i.a.createElement(gd,{size:"small",variant:"inline",onClick:()=>{x(Object(be.a)({message:"DEVICE_ACTIONS_SWITCH_PORT_POWER_CONFIRM_MESSAGE",messageValues:{portName:i.a.createElement("strong",null,r.portName),deviceName:t.name},title:"DEVICE_ACTIONS_SWITCH_PORT_POWER_CONFIRM_TITLE",useFormattedMessage:!0,onConfirm:()=>{x(Object(Ce.powerCyclePort)(t,r.port_idx)),x(Object(pe.e)())}}))},Icon:i.a.createElement(f.Sb,null),disabled:M},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_PORT_POWER_CYCLE"})))),i.a.createElement(ud,{variant:"secondary",multiOpen:!0,items:[...F?[{id:"macFilter",label:i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_MAC_FILTER_LABEL"}),renderContent:()=>i.a.createElement(km,{setFieldValue:E,formValues:_})}]:[],...P?[{id:"advancedPortConfig",label:i.a.createElement(R.b,{id:"DEVICE_PORT_PROFILE_OVERRIDE"}),renderContent:()=>i.a.createElement(ld,{initialValues:g,setFieldValue:E,setFieldTouched:m,portData:r,activeItem:t,formValues:_})}]:[]]})),i.a.createElement(Ci.a,{isDirty:I,onFormSubmit:c,onFormCancel:ee,allowCancel:!0})))}),fd={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:fm,subpanel:{path:"/:subPanel/:subPanelId",component:FE}},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:function({activeItem:e,...t}){const a=PE(e),n=[];return a.length&&n.push({id:"channelUsage",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_HEADER_CHANNEL_USAGE"}),renderContent:()=>i.a.createElement(jE,{ChannelBars:a})}),Object(Ce.isDeviceConnected)(e)&&Object(_o.e)(e,Ce.WIFI_CAPS.RF_SCAN)&&n.push({id:"rfEvironment",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_HEADER_RF_ENVIRONMENT"}),renderContent:()=>i.a.createElement(IE,{activeItem:e})}),i.a.createElement(kE,{variant:"secondary",items:n,contentClassName:"styledAccordionContent",multiOpen:!0,renderOnlyExpandedContent:!0})}},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:sm,subpanel:{path:"/:subPanel/:subPanelId",component:vd}}}};const Rd=Object(r.c)("div")`
  width: 100%;
  margin-bottom: ${e=>e.marginBottom||0}px;

  input {
    width: 100% !important;
  }
`,Dd=Object(r.c)(S.a)`
  margin-bottom: 16px;
  width: 100%;
`,Sd=Object(Me.f)({mapPropsToValues:({activeItem:{led_override:e=Ce.DEFAULT_LED_ENABLED,led_override_color:t=Ce.DEFAULT_LED_COLOR,led_override_color_brightness:a=Ce.DEFAULT_LED_BRIGHTNESS}={}})=>({led_override:e,led_override_color:t,led_override_color_brightness:a}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}});var yd=Object(R.e)(Sd(({activeItem:e,setFormDirty:t,setFormInvalid:a,dirty:n,isValid:r,values:c,resetForm:s,setFieldValue:E,intl:m,formName:d="led"})=>{const _=Object(o.useDispatch)(),{led_override:u}=e,b=Object(o.useSelector)(nr.selectMgmtSettings),p=Object(_o.m)(e),O=(!!b.led_enabled&&u!==Ce.LedOverride.OFF||u===Ce.LedOverride.ON)&&p;Object(l.useEffect)(()=>(_(Object(C.h)({[d]:()=>c})),_(Object(C.j)({[d]:()=>s({values:c})})),_(Object(C.i)({[d]:s})),()=>{_(Object(C.h)({[d]:null})),_(Object(C.j)({[d]:null})),_(Object(C.i)({[d]:null}))}),[_,s,c,d]),Object(l.useEffect)(()=>{t(d,n),a(d,!r)},[t,n,a,r,d]);const I=Object(l.useCallback)(()=>[Ce.LedOverride.ON,Ce.LedOverride.DEFAULT].includes(c.led_override)?E("led_override",Ce.LedOverride.OFF):E("led_override",Ce.LedOverride.ON),[E,c.led_override]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Dd,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_VALUE_LED_ENABLE"})),i.a.createElement(cn.a,{name:"led_override",type:"checkbox",value:[Ce.LedOverride.ON,Ce.LedOverride.DEFAULT].includes(c.led_override),onChange:I})),O&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Rd,{marginBottom:12},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LED_BRIGHTNESS"}))),i.a.createElement(Rd,{marginBottom:12},i.a.createElement(Do.a,{size:"large",value:+c.led_override_color_brightness||100,withValueIndicator:!0,valueIndicatorPosition:"right",formatValueIndicatorContent:e=>i.a.createElement("span",null,e,"%"),onChange:e=>E("led_override_color_brightness",e.target.value)})),i.a.createElement(Rd,{marginBottom:12},i.a.createElement(v.a,{size:"body",color:"primary",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_COLOR"}))),i.a.createElement(Rd,{marginBottom:12},i.a.createElement(So.a,{color:(null==c?void 0:c.led_override_color)||Ce.DEFAULT_LED_COLOR,variant:"block",onChange:e=>{E("led_override_color","hex"in e?e.hex:void 0)},hexLabel:m.formatMessage({id:"DEVICE_PROPERTIES_LABEL_HEX"}),actionButton:i.a.createElement(oe.a,{variant:"inline",onClick:()=>{E("led_override_color",Ce.DEFAULT_LED_COLOR)}},i.a.createElement(R.b,{id:"COMMON_VALUE_REVERT_BUTTON"}))}))))})),Pd=Object(Qa.compose)(Ja(["general","led","services","network"]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r,intl:c})=>{var s,E,m,d;const _=Object(o.useSelector)(_i),u=Object(o.useSelector)(ui),b=Object(o.useSelector)(bi),p=Object(o.useSelector)(mo.o),O=Object(o.useSelector)(mo.D),I=Object(o.useSelector)(mo.d),{_id:g,mac:C}=e,[h,T]=Object(l.useState)(!(null===(s=p.ap_exclusions)||void 0===s?void 0:s.includes(C))),[v,f]=Object(l.useState)(O.enabled&&!(null===(E=O.exclude_devices)||void 0===E?void 0:E.includes(C))),D=Object(o.useDispatch)(),y=n||h!==!(null===(m=p.ap_exclusions)||void 0===m?void 0:m.includes(e.mac))||v!==(O.enabled&&!(null===(d=O.exclude_devices)||void 0===d?void 0:d.includes(e.mac))),P=Object(l.useCallback)(async()=>{var e,t;try{const a=[];if(h!==!(null===(e=p.ap_exclusions)||void 0===e?void 0:e.includes(C))){const e=p.ap_exclusions.filter(e=>e!==C);h||e.push(C),a.push({...p,ap_exclusions:e})}if(O.enabled&&v!==!(null===(t=O.exclude_devices)||void 0===t?void 0:t.includes(C))){const e=O.exclude_devices.filter(e=>e!==C);v||e.push(C),a.push({...O,exclude_devices:e,settings_preference:"auto"})}a.length&&await D(Object(Eo.k)(a))}catch(e){return void D(Object(je.a)({icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"}))}const a=Object.entries(_).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{});D(Object(Ce.updateDeviceWithIdEndpoint)(a,g,C,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(({data:e=[a]})=>{Object.values(u).forEach(t=>{"function"==typeof t&&t(e[0])})})},[g,D,_,p,h,v,C,u,O]),A=Object(l.useCallback)(()=>{Object.values(b).forEach(e=>{"function"==typeof e&&e()})},[b]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{flexDirection:"column",flex:"1 1 85%",padding:"20px 32px 0"},i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a}),i.a.createElement(Cs,{isGlobalApSettingsEnabled:h,setGlobalApSettingsEnabled:T,isChannelOptimizationEnabled:v,setChannelOptimizationEnabled:f,disableChannelOptimization:!O.enabled}),i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"radios",label:i.a.createElement(R.b,{id:"COMMON_RADIOS"}),openByDefault:!0,renderContent:()=>i.a.createElement(_s,{activeItem:e,setFormDirty:t,setFormInvalid:a,isWirelessMeshingEnabled:I,isGlobalApSettingsEnabled:h,isChannelOptimizationEnabled:v})},...Object(_o.g)(e)?[{id:"bandsteer",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_BAND_STEERING"}),renderContent:()=>i.a.createElement(bs,{activeItem:e,setFormDirty:t})}]:[],{id:"led",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LED"}),renderContent:()=>i.a.createElement(yd,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Ro,{activeItem:e,setFormDirty:t,setFormInvalid:a,hideFlowControl:!0})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:y,isInvalid:r,onFormSubmit:P,onFormCancel:A}))}),Ad={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:fm,subpanel:{path:"/:subPanel/:subPanelId",component:FE}},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:VE},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:Pd}}},Nd={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_ABOUT",icon:f.Gb,component:fm}}};const jd=Object(r.c)("div")`
  height: 100%;
`,xd=Object(r.c)("div")`
  display: table;
  width: 100%;
`,Ld=Object(r.c)("div")`
  display: table-row;
`,Vd=Object(r.c)("div")`
  display: table-cell;
  vertical-align: top;
`,Md=Object(r.c)("span")`
  display: table-cell;
  padding-left: 12px;
  padding-bottom: 8px;
  text-align: right;
  vertical-align: top;
`;var wd=Object(R.e)(function({activeItem:e,radioType:t,radioName:a,intl:n,hideChUtil:l=!1}){const{radio_table:r,radio_table_stats:c,type:o}=e,s=r.find(e=>e.radio===t&&(!a||e.name===a)),E=null==c?void 0:c.find(e=>e.radio===t),m=Object(Ce.getRadioChannelUtilization)(e,E),{totalPackets:d,totalBytes:_,droppedPercentage:u,retryPercentage:b}=Object(Ce.getApRadioStats)(e,s,"rx"),{totalPackets:p,totalBytes:O,droppedPercentage:I,retryPercentage:g}=Object(Ce.getApRadioStats)(e,s,"tx"),C=Object(Ce.getRadioStatsTransmitPowerString)(e,E,n);return i.a.createElement(jd,null,i.a.createElement(xd,null,i.a.createElement(Ld,null,i.a.createElement(Vd,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"}))),i.a.createElement(Md,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(Fc.a,{device:e,radio:s,hidePowerInfo:!0,textSize:"body"})))),i.a.createElement(Ld,null,i.a.createElement(Vd,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TRANSMIT_POWER"}))),i.a.createElement(Md,null,C?i.a.createElement(v.a,{size:"body"},C):i.a.createElement(v.a,{size:"body"}," "))),i.a.createElement(Ld,null,i.a.createElement(Vd,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TX_PKTS_BYTES"}))),i.a.createElement(Md,null,i.a.createElement(v.a,{size:"body"},p," / ",O))),i.a.createElement(Ld,null,i.a.createElement(Vd,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_RX_PKTS_BYTES"}))),i.a.createElement(Md,null,i.a.createElement(v.a,{size:"body"},d," / ",_))),i.a.createElement(Ld,null,i.a.createElement(Vd,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TX_RETRY_DROPPED"}))),i.a.createElement(Md,null,i.a.createElement(v.a,{size:"body"},g,"% / ",I,"%"))),i.a.createElement(Ld,null,i.a.createElement(Vd,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_RX_RETRY_DROPPED"}))),i.a.createElement(Md,null,i.a.createElement(v.a,{size:"body"},b,"% / ",u,"%"))),!l&&m&&i.a.createElement(Ld,null,i.a.createElement(Vd,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_CHANNEL_UTILIZATION"}))),i.a.createElement(Md,null,i.a.createElement(v.a,{size:"body"},`${m.total}% / ${m.selfRx}% / ${m.selfTx}%`))),E&&o!==Ce.DeviceType.UBB&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Ld,null,i.a.createElement(Vd,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_CLIENTS"}))),i.a.createElement(Md,null,i.a.createElement(v.a,{size:"body"},E["user-num_sta"]))),i.a.createElement(Ld,null,i.a.createElement(Vd,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_HEADER_GUESTS"}))),i.a.createElement(Md,null,i.a.createElement(v.a,{size:"body"},E["guest-num_sta"]))))))});const Fd=Object(r.c)("div")`
  &:not(:last-child) {
    margin-bottom: ${({theme:e})=>e.spacing["spacing-l"]};
  }
`,Ud=Object(r.c)(v.a)`
  margin-bottom: 4px;
`,kd=Object(r.c)("div")`
  margin-bottom: 16px;
`;function Wd({activeItem:e}){return Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e])?i.a.createElement(Fd,null,i.a.createElement(Ud,{weight:"bold",size:"body"},i.a.createElement(R.a,{id:"DEVICE_HEADER_RADIO5G_SHORT"})),i.a.createElement(wd,{activeItem:e,radioType:wc.b.RADIO_NA}),i.a.createElement(kd,null),i.a.createElement(Ud,{weight:"bold",size:"body"},i.a.createElement(R.a,{id:"DEVICE_HEADER_RADIO60G_SHORT"})),i.a.createElement(wd,{activeItem:e,radioType:wc.b.RADIO_AD})):null}var Bd=({activeItem:e})=>{var t,a;const n=null!==(t=e.distance)&&void 0!==t?t:Object(Ce.isUBB)(e)&&(null===(a=e.peer_ubb)||void 0===a?void 0:a.distance);return void 0!==n?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_DISTANCE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},n," ",i.a.createElement(R.b,{id:"COMMON_UNIT_METERS_SHORT"}))):null},zd=({activeItem:e})=>{var t,a,n,l;const r=null!==(a=null===(t=e.p2p_stats)||void 0===t?void 0:t.throughput)&&void 0!==a?a:Object(Ce.isUBB)(e)&&(null===(l=null===(n=e.peer_ubb)||void 0===n?void 0:n.p2p_stats)||void 0===l?void 0:l.throughput);return r>0?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_SPEED"})),i.a.createElement(ta.a,{size:"body",type:"bytes",color:"secondary",input:r,options:"bitrate"})):null},Hd=({activeItem:e})=>{const t=Object(Ce.getLinkQuality)(e);return t>0?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_QUALITY"})),i.a.createElement(ta.a,{size:"body",type:"percent",input:t/100,style:{color:Vt.a.getGradientColor(t/100)}})):null};function Gd({activeItem:e}){return i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(Qn,{activeItem:e}),i.a.createElement(Bd,{activeItem:e}),i.a.createElement(zd,{activeItem:e}),i.a.createElement(Hd,{activeItem:e}),i.a.createElement(el,{activeItem:e}))}const $d=Object(r.c)(v.a)`
  margin-top: 16px; // 16
  margin-bottom: 4px; // 4
`;var Yd;!function(e){e.STATION="station",e.ACCESS_POINT="access_point"}(Yd||(Yd={}));var Xd=({deviceData:e,ubbDeviceType:t,pendingAdoption:a})=>{const{mac:n,ip:l,link_capacity:r,uptime:c,has_temperature:o,general_temperature:s,uplink:E}=e,{rssi:m,tx_rate:d,tx_packets:_,rx_rate:u,tx_bytes:b,"tx_bytes-r":p,rx_packets:O,rx_bytes:I,"rx_bytes-r":g,speed:C}=E||{},h=g+p;return i.a.createElement(S.a,{flexDirection:"column"},n&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_MAC"})),i.a.createElement(v.a,{color:"secondary",size:"body"},n)),l&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_IP_ADDRESS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},l)),!a&&i.a.createElement(i.a.Fragment,null,r>0&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_CAPACITY"})),i.a.createElement(ta.a,{type:"bytes",color:"secondary",size:"body",input:1e6*r/8,options:"bitrate"})),o&&!!s&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_LABEL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_VALUE",values:{temperature:s}}))),c&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement(ta.a,{type:"uptime",color:"secondary",size:"body",input:c})),i.a.createElement(tl,{activeItem:e}),i.a.createElement(il,{activeItem:e,withTooltip:!0}),!!E&&i.a.createElement(i.a.Fragment,null,i.a.createElement($d,{color:"primary",weight:"bold"},i.a.createElement(R.b,{id:Object(Ce.isDeviceWireless)(e)?"DEVICE_PROPERTY_UPLINK_WIRELESS":"DEVICE_PROPERTY_UPLINK_WIRED"})),t===Yd.STATION&&i.a.createElement(i.a.Fragment,null,m&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_SIGNAL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},no(m)," (",lo(m),i.a.createElement(R.b,{id:"COMMON_DEVICE_RADIO_TRANSMIT_POWER_DBM"}),")")),d&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_TX_RATE"})),i.a.createElement(ta.a,{type:"bytes",color:"secondary",size:"body",input:1e3*d/8,options:"bitrate"})),u&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_RX_RATE"})),i.a.createElement(ta.a,{type:"bytes",color:"secondary",size:"body",input:1e3*u/8,options:"bitrate"}))),t===Yd.ACCESS_POINT&&i.a.createElement(i.a.Fragment,null,i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_SPEED"})),i.a.createElement(v.a,{color:"secondary",size:"body"},C))),i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_DOWN_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},O&&I?i.a.createElement(i.a.Fragment,null,O.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",input:I,color:"secondary",size:"body"})):"0.00 / 0.00")),i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_UP_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},_&&b?i.a.createElement(i.a.Fragment,null,_.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",input:b,color:"secondary",size:"body"})):"0.00 / 0.00")),i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ACTIVITY"})),i.a.createElement(ta.a,{type:"bytes",color:"secondary",size:"body",input:h,options:"bitrate"})))))};const Kd=Object(r.c)(S.a)`
  width: 100%;
  background: ${({theme:e})=>e.motifPalette.ui12};
  padding: 16px; // 16
`,Zd=Object(r.c)(S.a)`
  text-align: center;
  width: 122px;
`,qd=Object(r.c)(S.a)`
  padding-top: 50px;
  width: 100%;
`,Jd=r.e`
  0% {
    width: 5%;
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    width: 100%;
    opacity: 0;
  }  
`,Qd=r.e`
  0% {
    opacity: 1;
  }
  30% {
    opacity: 1;
  }  
  50% {
    opacity: 0;
  }
`,e_=Object(r.c)("div")`
  position: relative;
  width: 100%;
  height: 3px;
  background-color: ${({theme:e})=>e.colors.neutralBackground};
`,t_=Object(r.c)("div")`
  animation: ${Jd} 5s infinite;
  width: 100%;
  opacity: 1;
  height: 5px;
  margin-top: -1px;
  position: absolute;
  background-image: linear-gradient(
    to right,
    ${({linkAnimationColor:e})=>e},
    transparent 30%,
    transparent 70%,
    ${({linkAnimationColor:e})=>e}
  );
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;

  &:after {
    content: '';
    display: block;
    background-color: ${({linkAnimationColor:e})=>e};
    width: 100%;
    position: absolute;
    border-radius: 3px;
    height: 100%;
    opacity: 0;
    animation: ${Qd} 5s infinite;
  }
`,a_=Object(r.c)(S.a)`
  margin-top: auto;
  margin-bottom: 20px;
  text-align: center;
`,n_=Object(r.c)("img")`
  height: 120px;
  transform: scaleX(${({flip:e})=>e?-1:1});
`,l_=Object(r.c)("div")`
  position: absolute;
  ${({left:e})=>e?`left: ${e}px`:""};
  ${({right:e})=>e?`right: ${e}px`:""};
  ${({height:e})=>e?`height: ${e}px`:""};
  width: 3px;
  border-radius: 1px;
  background-image: radial-gradient(transparent 0%, ${({color:e})=>e} 60%, transparent 100%);
  filter: drop-shadow(0px 0px 0.5px ${({color:e})=>e}) opacity(0.6);
`,i_=Object(r.c)(S.a)`
  margin: 0 32px 16px; // 0 32 16 32
  position: relative;
`,r_=Object(r.c)(ta.a)`
  font-size: 34px;
  font-weight: ${({theme:e})=>e.fontWeights.bold};
`,c_=Object(r.c)(v.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px; // 14
  line-height: 17px;
`,o_=Object(r.c)(S.a)`
  border-top: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  padding: 16px 32px 16px 22px;
`,s_=Object(r.c)(f.ab)`
  margin-right: 12px;
`;function E_({activeItem:e,pendingAdoption:t}){var a,n,r,c,s;const{peer_ubb:E={},led_override_color:m}=e,d=Object(b.fb)(e),_=Object(wt.c)(d),u=!t&&Object(b.fe)(e),p=!t&&Object(b.ee)(e),O=Object(l.useMemo)(()=>Object(b.ge)(e),[]),I=null===(s=xo.a[(null!==(c=null!==(n=null===(a=e.uplink)||void 0===a?void 0:a.radio)&&void 0!==n?n:null===(r=null==E?void 0:E.uplink)||void 0===r?void 0:r.radio)&&void 0!==c?c:"").toUpperCase()])||void 0===s?void 0:s.frequency,g=`${Object(o.useSelector)(V.a)}/device/ubb/${e.model}/side.png`;let C;return C=!t&&!u||"danger"===_?Oa.a["color-danger"]:t||"warning"===_?Oa.a["color-warning"]:Oa.a["color-success"],i.a.createElement(i.a.Fragment,null,i.a.createElement(Kd,{justifyContent:"space-between"},i.a.createElement(Zd,{flexDirection:"column"},i.a.createElement(i_,null,i.a.createElement(n_,{src:g}),i.a.createElement(l_,{color:m||Oa.a["blue-0"],left:O?25:23,height:O?105:107})),i.a.createElement(c_,{color:"secondary",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_TYPE_UBB_AP"})),i.a.createElement(c_,{color:"secondary"},I)),i.a.createElement(qd,{flexDirection:"column",alignItems:"center"},i.a.createElement(e_,null,i.a.createElement(t_,{linkAnimationColor:C})),i.a.createElement(a_,{flexDirection:"column"},u&&i.a.createElement(r_,{type:"percent",input:d/100,style:{color:Vt.a.getGradientColor(d/100)}}),i.a.createElement(c_,{color:"primary",weight:"bold"},u&&i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_QUALITY"}),!u&&t&&i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LINK_INACTIVE"}),!u&&!t&&i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_NO_LINK"})))),i.a.createElement(Zd,{flexDirection:"column"},i.a.createElement(i_,null,i.a.createElement(n_,{src:g,flip:!0}),i.a.createElement(l_,{color:E.led_override_color||Oa.a["blue-0"],right:O?25:23,height:O?105:107})),i.a.createElement(c_,{color:"secondary",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_TYPE_UBB_STATION"})),i.a.createElement(c_,{color:"secondary"},I))),(t||p)&&i.a.createElement(o_,{alignItems:"center"},i.a.createElement(s_,{width:24,height:24}),i.a.createElement(v.a,{color:"secondary"},i.a.createElement(R.b,{id:t?"DEVICE_UBB_LINK_INACTIVE_WARNING_MESSAGE":"DEVICE_UBB_LINK_DOWN_WARNING_MESSAGE"}))))}const m_=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`;var d_=a(464);const __=Object(r.c)(v.a)`
  display: block;
  position: relative;
  padding-right: 20px;
  margin-right: 15px;

  ::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 12px;
    border-bottom: 2px solid ${({legendcolor:e})=>e};
  }

  :last-of-type {
    margin-right: 0;
  }
`,u_=Object(r.c)(v.a)`
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  padding-left: 10px;
  padding-top: 10px;
`,b_=Object(r.c)(S.a)`
  margin-bottom: 20px;
`,p_=Object(ei.a)(6,e=>({value:e,label:String(e)})).reverse(),O_=e=>r.a`
  fill: ${e.motifPalette.text02};
  font-size: 11px;
`;var I_=Object(ti.b)(i.a.memo(e=>{const{mac:t,keys:a,heading:n,theme:l,colors:r,noLegend:c=!1,fetchReport:s,legend:E}=e,m=Object(o.useSelector)(Object(zn.selectDeviceStatReport)(t,s,zn.OBJECT.UBB,a)),d=Object(o.useSelector)(ke.H),_={},u=Date.now(),b=Object(D.startOfHour)(Object(D.addHours)(u,1)).getTime(),p=d?"H:ss":"ha",O=Object(ni.b)(b,p),I=O[0].value,g=Object(ql.n)(m.filter(e=>e.time>I).map(e=>({...e,x:e.time})),ai.a.MINUTES.grain);g[0]&&a[0]in g[0]&&g.forEach(e=>{a.forEach((t,a)=>{_[t]||(_[t]={key:t,lineColor:r[a],maxY:0,data:[]}),_[t].data.push({x:e.x,y:e[t]})})});const C=a.map(e=>_[e]?_[e].data.map(e=>e.y||0):0),h=Math.max(...C.flat(),4);let T=p_;return h>5&&(T=Object(ni.e)(h,6)),i.a.createElement(i.a.Fragment,null,!c&&i.a.createElement(b_,{justifyContent:"flex-end"},i.a.createElement(S.a,null,E.map((e,t)=>i.a.createElement(__,{legendcolor:r[t],key:e},i.a.createElement(R.b,{id:e}))))),i.a.createElement(S.a,null,i.a.createElement(u_,{color:"primary"},i.a.createElement(R.b,{id:n})),i.a.createElement(Jl.a,{xAxis:O,yAxis:T,width:305,height:150,margin:[0,0,20,35],labelClassName:O_(l),renderChartElements:(e,t,n)=>i.a.createElement(i.a.Fragment,null,a.map(a=>_[a]&&_[a].data.length&&i.a.createElement(Ql.a,{key:_[a].key,data:_[a].data,maxY:n,mouseData:t,getCoordinates:e,variant:"line",lineColor:_[a].lineColor,dashed:!1,hideMissingData:!0})))})))},(e,t)=>e.mac===t.mac&&Object(d_.a)(e.keys,t.keys)));const g_=Object(r.c)("div")`
  padding: 16px 32px 32px 32px;
`,C_=Object(r.c)("div")`
  margin-top: ${({marginTop:e})=>e||0}px;
  margin-bottom: ${({marginBottom:e})=>e||0}px;
`,h_=[{value:Yd.ACCESS_POINT,label:"DEVICE_TYPE_UBB_AP"},{value:Yd.STATION,label:"DEVICE_TYPE_UBB_STATION"}],T_=Object(Me.f)({mapPropsToValues:()=>({device:Yd.ACCESS_POINT,channel:"wlan0"}),handleSubmit:null});var v_,f_=Object(Qa.compose)(R.e,T_)(({activeItem:e,values:{device:t,channel:a},intl:n})=>{const r=Object(o.useDispatch)(),{mac:c,peer_ubb:s={}}=e,E=t===Yd.ACCESS_POINT?c:s.mac,m=[a+"-rx_dropped",a+"-tx_dropped"],d=[a+"-tx_retries"],_=Object(l.useMemo)(()=>Object(Ce.getRadios)(e).map(e=>({value:e.name,label:`${n.formatMessage({id:"DEVICE_LABEL_RADIO_"+e.radio.toUpperCase()})} (${e.name})`})),[e.radio_table]);return Object(l.useEffect)(()=>{r(Object(zn.fetchDeviceUsageReport)(E,zn.OBJECT.UBB))},[t]),Object(l.useEffect)(()=>{r(Object(zn.fetchDeviceDroppedReport)(E,zn.OBJECT.UBB,m)),r(Object(zn.fetchDeviceRetriesReport)(E,zn.OBJECT.UBB,d))},[a,t]),i.a.createElement(g_,null,i.a.createElement(C_,{marginTop:9,marginBottom:28},i.a.createElement(cn.a,{type:"dropdown",variant:"secondary",name:"device",label:"DEVICE_PROPERTIES_LABEL_SELECT_DEVICE",options:h_,full:!0,translateLabel:!0,translateOptions:!0})),i.a.createElement(I_,{mac:E,keys:["cpu","mem"],colors:[Oa.a["orange-1"],Oa.a["blue-3"]],heading:"DEVICE_PROPERTIES_LABEL_USAGE_PERCENT",fetchReport:zn.fetchDeviceUsageReport,legend:["COMMON_WORD_CPU","COMMON_WORD_MEMORY"]}),i.a.createElement(C_,{marginTop:35,marginBottom:30},i.a.createElement(cn.a,{type:"dropdown",variant:"secondary",full:!0,name:"channel",translateLabel:!0,label:"DEVICE_PROPERTIES_LABEL_SELECT_CHANNEL",options:_})),i.a.createElement(I_,{mac:E,keys:m,colors:[Oa.a["purple-1"],Oa.a["purple-1"]],noLegend:!0,fetchReport:zn.fetchDeviceDroppedReport,heading:"DEVICE_PROPERTIES_LABEL_DROPPED"}),i.a.createElement(C_,{marginBottom:30}),i.a.createElement(I_,{mac:E,keys:d,colors:[Oa.a["purple-1"]],noLegend:!0,fetchReport:zn.fetchDeviceRetriesReport,heading:"DEVICE_PROPERTIES_LABEL_RETRIES"}))}),R_=a(715);!function(e){e.ACCESS_POINT="ap",e.STATION="sta"}(v_||(v_={}));const D_=Object(r.c)("div")`
  margin-bottom: 16px;
`,S_=Object(r.c)("div",{shouldForwardProp:e=>"visible"!==e})`
  ${({visible:e})=>e?"":"display: none;"}
`,y_=Object(r.c)(v.a)`
  margin-left: 10px;
`;var P_=({ap:e,sta:t,formName:a})=>{const[n,r]=Object(l.useState)(v_.ACCESS_POINT),c=e=>r(e);return i.a.createElement(i.a.Fragment,null,i.a.createElement(D_,null,i.a.createElement(S.a,{marginBottom:"12px"},i.a.createElement(v.a,{size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_UBB_CHOOSE_DEVICE"}))),i.a.createElement(S.a,{marginBottom:"16px"},i.a.createElement(S.a,{marginRight:"18px"},i.a.createElement(R_.a,{checked:n===v_.ACCESS_POINT,name:`ubb-device-select-${a}-${v_.ACCESS_POINT}`,id:`ubb-device-select-${a}-${v_.ACCESS_POINT}`,onChange:()=>c(v_.ACCESS_POINT)}),i.a.createElement("label",{htmlFor:`ubb-device-select-${a}-${v_.ACCESS_POINT}`},i.a.createElement(y_,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_TYPE_UBB_AP"})))),i.a.createElement(S.a,null,i.a.createElement(R_.a,{checked:n===v_.STATION,name:`ubb-device-select-${a}-${v_.STATION}`,id:`ubb-device-select-${a}-${v_.STATION}`,onChange:()=>c(v_.STATION)}),i.a.createElement("label",{htmlFor:`ubb-device-select-${a}-${v_.STATION}`},i.a.createElement(y_,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_TYPE_UBB_STATION"})))))),i.a.createElement(S_,{visible:n===v_.ACCESS_POINT},e),i.a.createElement(S_,{visible:n===v_.STATION},t))};const A_=Object(r.c)("div")`
  margin-bottom: 20px;
`,N_=Object(r.c)(S.a)`
  margin-bottom: ${({marginBottom:e})=>e}px;
`,j_=Object(r.c)("div")`
  flex: 1;
  max-width: calc(50% - 6px);
`,x_=[{value:"dhcp",label:"DEVICE_PROPERTIES_VALUES_NETWORK_USING_DHCP"},{value:"static",label:"DEVICE_PROPERTIES_VALUES_NETWORK_STATIC_IP"}];var L_=Object(Me.f)({isInitialValid:!0,mapPropsToValues:({activeItem:e})=>{const{config_network:t,peer_ubb:a,ip:n}=e,{type:l="dhcp",ip:i=n||"",netmask:r="",gateway:c="",dns1:o="",dns2:s="",dnssuffix:E=""}=t,{type:m="dhcp",ip:d=a.ip||"",netmask:_="",gateway:u="",dns1:b="",dns2:p="",dnssuffix:O=""}=a.config_network;return{config_network:{type:l,ip:i,netmask:r,gateway:c,dns1:o,dns2:s,dnssuffix:E},peer_ubb:{config_network:{type:m,ip:d,netmask:_,gateway:u,dns1:b,dns2:p,dnssuffix:O}}}},handleSubmit:(e,{resetForm:t})=>{t({values:e})},validationSchema:en.a.object().shape({config_network:Ni,peer_ubb:en.a.object().shape({config_network:Ni})})})(({setFormDirty:e,setFormInvalid:t,dirty:a,values:n,resetForm:r,isValid:c})=>{const s=Object(o.useDispatch)();return Object(l.useEffect)(()=>(s(Object(C.h)({network:()=>{const{config_network:e,peer_ubb:{config_network:t}}=n,a={config_network:{type:e.type},peer_ubb:{config_network:{type:t.type}}};return"dhcp"!==e.type&&(a.config_network={...e}),"dhcp"!==t.type&&(a.peer_ubb.config_network={...t}),a}})),s(Object(C.j)({network:()=>r({values:n})})),s(Object(C.i)({network:r})),()=>{s(Object(C.h)({network:null})),s(Object(C.j)({network:null})),s(Object(C.i)({network:null}))}),[s,r,n]),Object(l.useEffect)(()=>{e("network",a),t("network",!c)},[e,t,a,c]),i.a.createElement(P_,{formName:"network",sta:i.a.createElement(i.a.Fragment,null,i.a.createElement(A_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_CONFIGURE_IP",name:"config_network.type",type:"dropdown",variant:"secondary",full:!0,translateLabel:!0,translateOptions:!0,options:x_})),"static"===n.config_network.type&&i.a.createElement(i.a.Fragment,null,i.a.createElement(N_,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"COMMON_IP_ADDRESS",name:"config_network.ip",full:!0})),i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_PREFERRED_DNS",name:"config_network.dns1",full:!0}))),i.a.createElement(N_,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_SUBNET_MASK",name:"config_network.netmask",full:!0})),i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_ALTERNATE_DNS",name:"config_network.dns2",full:!0}))),i.a.createElement(N_,{marginBottom:20,justifyContent:"space-between"},i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_GATEWAY",name:"config_network.gateway",full:!0})),i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_DNS_SUFFIX",name:"config_network.dnssuffix",full:!0}))))),ap:i.a.createElement(i.a.Fragment,null,i.a.createElement(A_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_CONFIGURE_IP",name:"peer_ubb.config_network.type",type:"dropdown",variant:"secondary",full:!0,translateLabel:!0,translateOptions:!0,options:x_})),"static"===n.peer_ubb.config_network.type&&i.a.createElement(i.a.Fragment,null,i.a.createElement(N_,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"COMMON_IP_ADDRESS",name:"peer_ubb.config_network.ip",full:!0})),i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_PREFERRED_DNS",name:"peer_ubb.config_network.dns1",full:!0}))),i.a.createElement(N_,{marginBottom:24,justifyContent:"space-between"},i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_SUBNET_MASK",name:"peer_ubb.config_network.netmask",full:!0})),i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_ALTERNATE_DNS",name:"peer_ubb.config_network.dns2",full:!0}))),i.a.createElement(N_,{marginBottom:20,justifyContent:"space-between"},i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_GATEWAY",name:"peer_ubb.config_network.gateway",full:!0})),i.a.createElement(j_,null,i.a.createElement(cn.a,{label:"DEVICE_PROPERTIES_LABEL_DNS_SUFFIX",name:"peer_ubb.config_network.dnssuffix",full:!0})))))})});const V_=Object(Me.f)({mapPropsToValues:({activeItem:e,nativeNetworks:t})=>({mgmt_network_id:Object(Ce.getDeviceNetworkId)(t,e)}),validationSchema:en.a.object().shape({mgmt_network_id:en.a.string()}),handleSubmit:()=>null});var M_=Object(Qa.compose)(Object(o.connect)(e=>({nativeNetworks:Object(an.selectNativeNetworks)(e)}),{}),V_)(({nativeNetworks:e=[],values:t,resetForm:a,dirty:n,setFormDirty:r,setFormInvalid:c,isValid:s})=>{const E=Object(o.useDispatch)();Object(l.useEffect)(()=>(E(Object(C.h)({vlan:()=>t})),E(Object(C.j)({vlan:()=>a({values:t})})),E(Object(C.i)({vlan:a})),()=>{E(Object(C.h)({vlan:null})),E(Object(C.j)({vlan:null})),E(Object(C.i)({vlan:null}))}),[E,a,t.mgmt_network_id]),Object(l.useEffect)(()=>{r("vlan",n),c("vlan",!s)},[r,c,n,s]);const m=e.map(e=>({value:e._id,label:e.name}));return i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_LABEL_MGMT_VLAN",name:"mgmt_network_id",type:"dropdown",variant:"secondary",full:!0,validated:!0,options:m,translateLabel:!0})});const w_=Object(r.c)(S.a)`
  margin-top: -15px;
`,F_=Object(r.c)(oe.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
`,U_=r.a`
  th {
    padding-left: 0;
    padding-right: 10px;
  }
`,k_=r.a`
  text-align: left;
  padding-left: 0;
  padding-right: 10px;
`,W_=r.a`
  padding: 0;
  margin: 0;
  text-align: left;
`;function B_({activeItem:{downlink_table:e}}){const t=Object(o.useSelector)(Ce.selectDevicesData),a=Object(o.useDispatch)(),n=[{id:"mac",sortable:!0,label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_TYPE_UBB_AP_SHORT"})),renderCell:e=>{if(!e)return null;const n=t.find(t=>t.mac===e.mac);return n?i.a.createElement(F_,{name:"propertyPanelButton",onClick:()=>a(Object(C.g)({type:u.c.DEVICE,mac:e.mac})),size:"small",className:W_,variant:"link"},Object(L.c)(n)):e.mac}},{id:"rssi",sortable:!0,label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_SIGNAL"})),renderCell:e=>i.a.createElement(v.a,{color:"inherit",size:"body"},no(e.rssi)," (",lo(e.rssi),i.a.createElement(R.b,{id:"COMMON_DEVICE_RADIO_TRANSMIT_POWER_DBM"}),")")}];return i.a.createElement(w_,null,i.a.createElement(Da.a,{items:e||[],idField:"mac",disableColumnFilters:!0,disableSelection:!0,disableTextPointer:!0,headerRowClassName:U_,cellClassName:k_,columns:n,renderFooter:()=>i.a.createElement("div",null,e&&e.length>0?i.a.createElement(v.a,{color:"inherit",size:"body"},i.a.createElement(R.b,{id:"COMMON_TABLE_FOOTER",values:{length:e.length}})):i.a.createElement(v.a,{color:"inherit",size:"body"},i.a.createElement(R.b,{id:"COMMON_DEVICES_NOT_FOUND"}))),rowHeight:30}))}const z_=Object(r.c)(Ia.a)`
  transition: none;
  flex: 1 1 100%;
`;var H_=Object(Qa.compose)(Ja(["general","tags","screen","peerUbbScreen","network","vlan","radios"]))(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r,formStates:c})=>{const s=Object(Ce.isUbbXg)(e),E=Object(o.useSelector)(_i),m=Object(o.useSelector)(ui),d=Object(o.useSelector)(bi),{_id:_,mac:u}=e,b=Object(o.useDispatch)(),p=Object(l.useCallback)(async()=>{const e=Object.entries(E).reduce((e,[t,a])=>{if("function"==typeof a){const n=a();if("object"==typeof n&&Object.keys(n).length&&c[t])return"peerUbbScreen"===t?{peerUbbScreen:n,...e}:{...e,...n}}return e},{}),t=Object(yo.a)(e,"peerUbbScreen"),a={...t,peer_ubb:{name:e.name,...t.peer_ubb,...e.peerUbbScreen,...t.mgmt_network_id?{mgmt_network_id:t.mgmt_network_id}:{}}};b(Object(Ce.updateDeviceWithIdEndpoint)(a,_,u,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(({data:e})=>{Object.values(m).forEach(t=>{"function"==typeof t&&t(null==e?void 0:e[0])})})},[_,b,c,E,u,m]),O=Object(l.useCallback)(()=>{Object.values(d).forEach(e=>{"function"==typeof e&&e()})},[d]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{flexDirection:"column",flex:"1 1 85%",padding:"20px 32px 0"},i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a}),i.a.createElement(z_,{variant:"secondary",items:[{id:"radios",label:i.a.createElement(R.b,{id:"COMMON_RADIOS"}),openByDefault:!0,renderContent:()=>i.a.createElement(_s,{activeItem:e,setFormDirty:t,setFormInvalid:a,isWirelessMeshingEnabled:!1,isUbbXg:s,isGlobalApSettingsEnabled:!1,isChannelOptimizationEnabled:!1})},{id:"led",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_LED"}),renderContent:()=>i.a.createElement(P_,{formName:"led",ap:i.a.createElement(jo,{activeItem:e,setFormDirty:t}),sta:i.a.createElement(jo,{activeItem:e.peer_ubb,formName:"peerUbbScreen",setFormDirty:t})})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(L_,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"vlan",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_VLAN"}),renderContent:()=>i.a.createElement(M_,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"downlink",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_DOWNLINK"}),renderContent:()=>i.a.createElement(B_,{activeItem:e})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e,disableDebug:s})}],renderOnlyExpandedContent:!0,multiOpen:!0})),i.a.createElement(Ci.a,{isDirty:n,isInvalid:r,onFormSubmit:p,onFormCancel:O}))}),G_={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:({activeItem:e})=>{const{peer_ubb:t}=e,a=Object(Ce.getUplinkAttrs)(e)||{},n=null==t?void 0:t.uplink,r=t&&(!Object(Ce.getIsUbbPeerAdopted)(e)||!Object(Ce.isAdopted)(e)),c=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(E_,{activeItem:e,pendingAdoption:r}),i.a.createElement(Kl,{device:e}),c&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Dl,{activeItem:e}),i.a.createElement(m_,{variant:"secondary",items:[{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(Gd,{activeItem:e})},...t?[{id:"station",label:i.a.createElement(i.a.Fragment,null,i.a.createElement(R.b,{id:"DEVICE_TYPE_UBB_STATION"})," ",!!n&&i.a.createElement(i.a.Fragment,null,"(",i.a.createElement(R.b,{id:Object(Ce.isDeviceWireless)(t)?"DEVICE_CONNECTION_WIRELESS":"DEVICE_CONNECTION_WIRED"}),")")),renderContent:()=>i.a.createElement(Xd,{deviceData:t,ubbDeviceType:Yd.STATION,pendingAdoption:r})}]:[],{id:Object(Ce.isUbbAP)(e)?"accessPoint":"station",label:i.a.createElement(i.a.Fragment,null,i.a.createElement(R.b,{id:Object(Ce.isUbbAP)(e)?"DEVICE_TYPE_UBB_AP":"DEVICE_TYPE_UBB_STATION"})," ",!!a&&i.a.createElement(i.a.Fragment,null,"(",i.a.createElement(R.b,{id:Object(Ce.isDeviceWireless)(e)?"DEVICE_CONNECTION_WIRELESS":"DEVICE_CONNECTION_WIRED"}),")")),renderContent:()=>i.a.createElement(Xd,{deviceData:e,ubbDeviceType:Yd.ACCESS_POINT,pendingAdoption:r})},...r?[]:[{id:"radios",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_AIR_STATS"}),renderContent:()=>i.a.createElement(Wd,{activeItem:e})}]],multiOpen:!0,renderOnlyExpandedContent:!0})))}},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:f_},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:H_}}};const $_=Object(r.c)(S.a)`
  padding: 0px 32px;
`;var Y_=({activeItem:e})=>{const t=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,t&&i.a.createElement(om,{deviceData:e,showFullScreenDiagramButton:!0}),i.a.createElement($_,{flexDirection:"column"},i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"ports",openByDefault:!0,renderLabel:()=>null,renderContent:()=>i.a.createElement(HE,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})))},X_=a(827),K_=a(234),Z_=a(260);const q_=({networkgroup:e,uplinkAttrs:t})=>{var a,n,l,r,c,s,E;const m=null===(a=Object(o.useSelector)(Z_.selectIspInfoItems))||void 0===a?void 0:a.find(t=>t.networkgroup===e),{ip:d,speed:_,rx_packets:u,rx_bytes:b,tx_packets:p,tx_bytes:O,"rx_bytes-r":I,"tx_bytes-r":g}=t;return i.a.createElement(S.a,{height:"100%",flexDirection:"column"},d?i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_IP_ADDRESS"})),i.a.createElement(v.a,{size:"body"},d)):null,i.a.createElement(zl,{portSpeed:_}),(null===(l=null===(n=null==m?void 0:m.details)||void 0===n?void 0:n.service_provider)||void 0===l?void 0:l.name)&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_WAN_ISP"})),i.a.createElement(v.a,{size:"body"},m.details.service_provider.name)),((null===(r=null==m?void 0:m.configuration)||void 0===r?void 0:r.wan_dns1)||(null===(c=null==m?void 0:m.configuration)||void 0===c?void 0:c.wan_dns2))&&i.a.createElement(i.a.Fragment,null,i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_DNS_SERVER_1"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null===(s=null==m?void 0:m.configuration)||void 0===s?void 0:s.wan_dns1)),i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DASHBOARD_ISP_PROPERTY_DNS_SERVER_2"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null===(E=null==m?void 0:m.configuration)||void 0===E?void 0:E.wan_dns2))),u&&b?i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_DOWN_PKTS_BYTES"})),i.a.createElement(v.a,{size:"body"},Object(fa.a)(u,{spacer:" "})," / ",Object(aa.c)(b,"bytes","IEC"))):null,p&&O?i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_UP_PKTS_BYTES"})),i.a.createElement(v.a,{size:"body"},Object(fa.a)(p,{spacer:" "})," / ",Object(aa.c)(O,"bytes","IEC"))):null,i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_DOWN_ACTIVITY"})),i.a.createElement(v.a,{size:"body"},void 0!==I?i.a.createElement(ta.a,{type:"bytes",input:I,options:"bitrate",size:"body"}):"-")),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_UP_ACTIVITY"})),i.a.createElement(v.a,{size:"body"},void 0!==g?i.a.createElement(ta.a,{type:"bytes",input:g,options:"bitrate",size:"body"}):"-")))};var J_=e=>Object.values(X_.a).reduce((t,a)=>{const n=e.port_table&&e.port_table.filter(e=>e.up),l="wan1"===a?"WAN":"WAN2",r="wan1"===a?"WAN":"WAN 2",c=Object(K_.e)(l,e)||"",o=n&&n.find(e=>e.ifname===c),s=Object(b.vc)(e,a);return o&&s&&t.push({id:a,label:i.a.createElement("span",null,r),renderContent:()=>i.a.createElement(q_,{networkgroup:l,uplinkAttrs:s,activeItem:e})}),t},[]),Q_=({activeItem:e,hasApCapabilities:t,forUdmPro:a,disableUsageChart:n=!1})=>{const r=Object(o.useDispatch)();return Object(l.useEffect)(()=>{r(Object(zn.fetchDeviceUsageReport)(e.mac))},[]),i.a.createElement(i.a.Fragment,null,!n&&i.a.createElement(si,{gwMac:e.mac,keys:["mem","cpu"],forUdm:t,pickDatumsWithKey:a?"gw":null,heading:"DEVICE_GATEWAY_USAGE_STAT_CHART_HEADER"}),t&&i.a.createElement(si,{gwMac:e.mac,keys:["num_sta"],forUdm:t,heading:"DEVICE_GATEWAY_CLIENTS_STAT_CHART_HEADER"}))},eu=({activeItem:{ip:e,satisfaction:t,uptime:a,lan_ip:n},activeItem:l})=>{var r,c;const o=Object(Ce.getDeviceIp)(l),{na:s,ng:E,naNumSta:m,ngNumSta:d}=Object(Ce.getSatisfactionByRadio)(l),_=Object(wt.d)(t);return i.a.createElement(S.a,{flexDirection:"column"},_&&i.a.createElement(i.a.Fragment,null,i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_WIFI_EXPERIENCE_2G"})),d&&0!==E?i.a.createElement(ta.a,{size:"body",type:"percent",input:Math.min(E,100)/100,style:{color:Oa.a["color-"+Object(wt.c)(Math.min(E||0,100))]}}):i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_NA"}))),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_WIFI_EXPERIENCE_5G"})),m&&0!==s?i.a.createElement(ta.a,{size:"body",type:"percent",input:Math.min(s,100)/100,style:{color:Oa.a["color-"+Object(wt.c)(Math.min(s||0,100))]}}):i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_NA"})))),Object(Ce.isUdmPro)(l)?i.a.createElement(i.a.Fragment,null,(null===(r=null==l?void 0:l.wan1)||void 0===r?void 0:r.ip)&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS_INDEXED",values:{wanIndex:1}})),i.a.createElement(v.a,{size:"body"},l.wan1.ip)),(null===(c=null==l?void 0:l.wan2)||void 0===c?void 0:c.ip)&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS_INDEXED",values:{wanIndex:2}})),i.a.createElement(v.a,{size:"body"},l.wan2.ip))):i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS"})),i.a.createElement(v.a,{size:"body"},e)),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LAN_IP_ADDRESS"})),i.a.createElement(v.a,{size:"body"},o)),a>0&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement(v.a,{size:"body"},Object(Jn.a)(a))),i.a.createElement(tl,{activeItem:l}),i.a.createElement(il,{activeItem:l}),!Object(Ce.isUdmPro)(l)&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Lc,{activeItem:l}),i.a.createElement(Vc,{activeItem:l})))};const tu=Object(r.c)("div")`
  margin-bottom: 32px;
  th {
    padding-right: 0;

    &:first-child {
      margin-left: 0px;
    }
  }
`,au=Object(r.c)("div")`
  margin-top: 12px;
`,nu=[{id:"name",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_NETWORK"})),minWidth:75,renderCell:({name:e})=>i.a.createElement(v.a,{color:"inherit",size:"body"},e)},{id:"ip",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_WORD_IP"})),minWidth:90,renderCell:({ip:e})=>i.a.createElement(v.a,{color:"inherit",size:"body"},e)},{id:"tx_bytesInfo",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_WORD_SENT"})),renderCell:e=>i.a.createElement(ta.a,{color:"inherit",size:"body",type:"bytes",input:e.tx_bytes}),maxWidth:60},{id:"rx_bytesInfo",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_WORD_RECEIVED"})),renderCell:e=>i.a.createElement(ta.a,{color:"inherit",size:"body",type:"bytes",input:e.rx_bytes}),minWidth:65},{id:"num_sta",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_CLIENTS"})),minWidth:60,renderCell:({num_sta:e})=>i.a.createElement(v.a,{color:"inherit",size:"body"},e)}];var lu=({activeItem:e})=>{const{network_table:t}=e;return i.a.createElement(tu,null,i.a.createElement(Da.a,{items:t,disableColumnFilters:!0,disableTextPointer:!0,disableSelection:!0,idField:"_id",columns:nu,renderFooter:()=>t.length>0?i.a.createElement(au,null,i.a.createElement(R.b,{id:"COMMON_TABLE_FOOTER",values:{length:t.length}})):i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_AP_DOWNLINKS_TABLE_NO_CLIENTS"})}))},iu=a(2793),ru=a(1617),cu=({device:e,isOwner:t,...a})=>{var n,l,r,c;const s=Object(o.useSelector)(El.c),E=null===(n=null==e?void 0:e.unifi_care)||void 0===n?void 0:n.state;let m,d;return E===ye.h.REPLACING?(m=null===(l=null==e?void 0:e.unifi_care)||void 0===l?void 0:l.tracking_url,d=t?"DEVICE_ACTIONS_UNIFI_CARE_TRACK":"DEVICE_ACTIONS_UNIFI_CARE_SHIPPED"):E===ye.h.RMA_IN_PROGRESS?(m=null===(r=null==e?void 0:e.unifi_care)||void 0===r?void 0:r.rma_url,d="DEVICE_ACTIONS_UNIFI_CARE_RMA"):t&&(m=null===(c=null==e?void 0:e.unifi_care)||void 0===c?void 0:c.rma_url,d="DEVICE_ACTIONS_UNIFI_CARE_REPLACE"),t?i.a.createElement(oe.a,Object.assign({size:"small",variant:"link",onClick:e=>{e.preventDefault(),e.stopPropagation(),window.open(m||"https://"+Object(pl.b)(s),"_blank")}},a),i.a.createElement(R.b,{id:d})):d?i.a.createElement(R.b,{id:d}):null},ou=a(1042),su=({device:e,...t})=>{const a=Object(o.useDispatch)(),n=Object(o.useSelector)(El.c),l=Object(o.useSelector)(ou.selectUnifiCareDetails);return Object(Ta.g)(()=>Promise.resolve(a(Object(ou.fetchUnifiCareDetails)())).catch(()=>{}),i.a.createElement(oe.a,Object.assign({size:"small",variant:"link",onClick:e=>{e.preventDefault(),e.stopPropagation(),window.open(Object(ol.a)(l,"links.covered_devices_url")||"https://"+Object(pl.b)(n))}},t),i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE_VIEW"})))},Eu=({device:e,...t})=>{const a=Object(o.useSelector)(El.c);return i.a.createElement(oe.a,Object.assign({size:"small",variant:"link",onClick:t=>{t.preventDefault(),t.stopPropagation();const n=Object(ol.a)(e,"unifi_care.activation_url");window.open(n||"https://"+Object(pl.b)(a))}},t),i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE_ACTIVATE"}))},mu=a(1047),du=a(745);const _u=Object(r.c)("div")`
  margin-top: 8px;
`,uu=Object(r.c)("div")`
  &:not(:empty) {
    padding-bottom: 12px;
  }
`,bu=Object(r.c)(S.a)`
  margin-left: 18px;
`,pu=Object(r.c)(S.a)`
  margin-top: 16px;
  margin-left: -8px;
`,Ou=Object(r.c)(S.a)`
  margin-top: 10px;
  margin-left: -8px;
`,Iu=Object(r.c)(mu.a)`
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid ${({theme:e})=>e.motifPalette.ui04};
`,gu=Object(r.c)(cu)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  font-weight: normal;
  padding: 0 8px;
`,Cu=Object(r.c)(su)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  font-weight: normal;
  padding: 0 8px;
`,hu=Object(r.c)(Eu)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  font-weight: bold;
  padding: 0 8px;
`,Tu=Object(r.c)(iu.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  font-weight: bold;
  padding: 0 8px;
  line-height: 1.15;
`,vu=Object(r.c)(S.a)`
  padding: 17px;
  border: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  border-radius: 8px;
  margin: 16px 32px 24px 32px;
`,fu=Object(r.c)(A.a)`
  margin-right: 17px;
`,Ru=Object(r.c)(S.a)`
  margin-bottom: 15px;
`;var Du=({device:e,hideWarning:t})=>{const a=Object(o.useDispatch)(),n=Object(du.c)(e),r=!n&&Object(du.d)(e),c=Object(du.a)(e),s=null==c?void 0:c.getTime(),E=r&&c||n&&Object(du.b)(e),[m,d]=Object(l.useState)(s-(new Date).getTime()),_=Object(o.useSelector)(ke.z);return Object(l.useEffect)(()=>{let e;return m&&(e=setInterval(()=>{d(s-(new Date).getTime())},200)),()=>e&&clearInterval(e)},[s]),Object(Ta.g)(()=>Promise.resolve(a(Object(ou.fetchUnifiCareDetails)())).catch(()=>{}),i.a.createElement(_u,null,n&&!t&&i.a.createElement(uu,null,i.a.createElement(Ul,{activeItem:e,standalone:!0}),i.a.createElement(wl,{activeItem:e,standalone:!0})),r&&m>0&&i.a.createElement(vu,{flexDirection:"column"},i.a.createElement(Ru,{flexDirection:"row"},i.a.createElement("div",null,i.a.createElement(fu,{width:44,height:48})),i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(v.a,{weight:"bold",size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE_AVAILABLE"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE_OFFER_ENDS",values:{eligibleExpirationTime:Object(ru.a)(Math.floor(m/1e3)).join(" ")}})))),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE_AVAILABLE_INFO"})),i.a.createElement(Ou,{flexDirection:"row",alignItems:"center"},_&&i.a.createElement(hu,{device:e}),i.a.createElement(Tu,{href:xn.a.unifiCare,target:"_blank"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE_LEARN_MORE"})))),n&&i.a.createElement(S.a,{flexDirection:"row",alignItems:"flex-start"},i.a.createElement("div",null,i.a.createElement(A.a,{width:54,height:54})),i.a.createElement(bu,{flexDirection:"column"},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE_ACTIVE_INFO"})),i.a.createElement(pu,{flexDirection:"row",alignItems:"center"},i.a.createElement(Cu,{device:e}),i.a.createElement(gu,{isOwner:_,device:e})),E&&i.a.createElement(Iu,{expires:E})))))};const Su=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`;const yu=Object(r.c)(S.a)`
  margin-bottom: 24px;
`,Pu=Object(r.c)(S.a)`
  margin-bottom: 8px;
`,Au=Object(r.c)(v.a)`
  display: flex;
  flex: 1;
  margin-right: 12px;
`,Nu=r.a`
  margin-left: 11px;
`,ju=Object(r.c)(f.cb)`
  margin: 0 6px;
`,xu=Object(r.c)("div")`
  flex: 1;
  max-width: calc(50% - 8px);
`,Lu=e=>({hour:Number(e.split(":")[0]),min:Number(e.split(":")[1])}),Vu=e=>`${e.hour.toString().padStart(2,"0")}:${e.min.toString().padStart(2,"0")}`,Mu=Object(Me.f)({isInitialValid:!0,mapPropsToValues:({lcmSettings:e,activeItem:{lcm_brightness:t=Ce.DEFAULT_LCM_BRIGHTNESS,lcm_brightness_override:a=!1,lcm_night_mode_begins:n=Ce.DEFAULT_LCM_NIGHT_MODE_BEGINS,lcm_night_mode_ends:l=Ce.DEFAULT_LCM_NIGHT_MODE_ENDS}})=>({lcm:e,lcm_brightness:t,lcm_brightness_override:a,lcm_night_mode_begins:Lu(n),lcm_night_mode_ends:Lu(l)}),validationSchema:Fe.a.object().shape({lcm:Fe.a.object().shape({sync:Fe.a.boolean()}),lcm_brightness_override:Fe.a.boolean(),lcm_brightness:Fe.a.number().label("DEVICE_PROPERTIES_LABEL_SCREEN_BRIGHTNESS").min(0).max(100).required(),lcm_night_mode_begins:Fe.a.object().shape({hour:Fe.a.number(),min:Fe.a.number()}),lcm_night_mode_ends:Fe.a.object().shape({hour:Fe.a.number(),min:Fe.a.number()})}),handleSubmit:()=>null}),wu={saveSettings:nr.saveSettings};var Fu=Object(Qa.compose)(Object(o.connect)(e=>({lcmSettings:Object(nr.selectLcmSettings)(e)}),wu),Mu)(({values:e,setFieldValue:t,resetForm:a,setFormDirty:n,setFormInvalid:r,dirty:c,isValid:s,initialValues:E})=>{const m=Object(o.useDispatch)(),d=Object(o.useSelector)(ke.s);return Object(l.useEffect)(()=>{n("lcmScreen",c),r("lcmScreen",!s)},[n,r,s,c]),Object(l.useEffect)(()=>(m(Object(C.h)({lcmScreen:()=>({...e,lcm_brightness_override:e.lcm_brightness!==Ce.DEFAULT_LCM_BRIGHTNESS,lcm_night_mode_begins:Vu(e.lcm_night_mode_begins),lcm_night_mode_ends:Vu(e.lcm_night_mode_ends)})})),m(Object(C.j)({lcmScreen:()=>{Object(d_.a)(E.lcm,e.lcm)||m(Object(nr.saveSettings)(e.lcm)),a({values:e})}})),m(Object(C.i)({lcmScreen:a})),()=>{m(Object(C.h)({lcmScreen:null})),m(Object(C.j)({lcmScreen:null})),m(Object(C.i)({lcmScreen:null}))}),[m,a,e]),i.a.createElement(i.a.Fragment,null,i.a.createElement(Pu,null,i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_SCREEN_BRIGHTNESS"}))),i.a.createElement(yu,null,i.a.createElement(Do.a,{size:"large",value:e.lcm_brightness||Ce.DEFAULT_LCM_BRIGHTNESS,withValueIndicator:!0,valueIndicatorPosition:"right",formatValueIndicatorContent:e=>i.a.createElement(v.a,{size:"body"},e,"%"),onChange:e=>{t("lcm_brightness",+e.target.value)},disabled:d})),i.a.createElement(yu,{flexDirection:"column"},i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_MODE"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_MODE_DESCRIPTION"}))),i.a.createElement(yu,{justifyContent:"space-between"},i.a.createElement(xu,null,i.a.createElement(Ge.Field,{type:"timeInput",label:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_BEGINS",name:"lcm_night_mode_begins",full:!0})),i.a.createElement(xu,null,i.a.createElement(Ge.Field,{type:"timeInput",label:"DEVICE_PROPERTIES_LABEL_LCM_NIGHT_ENDS",name:"lcm_night_mode_ends",full:!0}))),i.a.createElement(yu,{justifyContent:"space-between"},i.a.createElement(Au,{color:"primary",size:"body"},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_RACK_MULTI_SCREEN_SYNCHRONIZATION"})),i.a.createElement(rn.a,{portal:!0,tooltipClassName:Nu,position:"topRight",width:200,message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_RACK_MULTI_SCREEN_SYNCHRONIZATION_TOOLTIP"})},i.a.createElement(ju,{isActive:!0}))),i.a.createElement(Ge.Field,{type:"checkbox",name:"lcm.sync"})))});const Uu=Object(r.c)(S.a,{shouldForwardProp:e=>!["marginTop","marginBottom"].includes(e)})`
  width: 100%;
  margin-top: ${({marginTop:e})=>e||0}px;
  margin-bottom: ${({marginBottom:e})=>e||0}px;
  justify-content: space-between;
  align-items: center;
`,ku=Object(r.c)(f.cb)`
  margin-right: auto;
  margin-left: 5px;
  height: 14px;
  width: 14px;
`,Wu=Object(r.c)(rn.a)`
  margin-left: 0 !important;
`,Bu=Object(r.c)("div")`
  display: flex;

  > label:not(:first-child) {
    margin-left: 18px;
  }
`,zu=i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_CUSTOM_MSS_CLAMPING_VALIDATION_LABEL",values:{min:nr.USG_DEFAULTS.min_mss_clamp_mss,max:nr.USG_DEFAULTS.mss_clamp_mss}}),Hu=Object(Me.f)({mapPropsToValues:({usgSettings:{mss_clamp_mss:e,mss_clamp:t,arp_cache_timeout:a,arp_cache_base_reachable:n,echo_server:l},activeItem:{jumboframe_enabled:i=!1,flowctrl_enabled:r=!1}})=>({jumboframe_enabled:i,flowctrl_enabled:r,usgSettings:{mss_clamp:t||nr.USG_DEFAULTS.mss_clamp,mss_clamp_mss:e||nr.USG_DEFAULTS.mss_clamp_mss,arp_cache_timeout:a||"normal",arp_cache_base_reachable:n||nr.USG_DEFAULTS.arp_cache_base_reachable,echo_server:l||nr.USG_DEFAULTS.echo_server}}),validationSchema:en.a.object().shape({jumboframe_enabled:en.a.boolean(),flowctrl_enabled:en.a.boolean(),usgSettings:en.a.object().shape({mss_clamp:en.a.string(),mss_clamp_mss:en.a.number().when("mss_clamp",{is:nr.MssClamp.CUSTOM,then:en.a.number().label("DEVICE_PROPERTIES_LABEL_CUSTOM_MSS_CLAMPING").required().min(nr.USG_DEFAULTS.min_mss_clamp_mss,zu).max(nr.USG_DEFAULTS.mss_clamp_mss,zu)}),arp_cache_timeout:en.a.string(),arp_cache_base_reachable:en.a.number().when("arp_cache_timeout",{is:"custom",then:en.a.number().label("DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT").required().min(1).max(nr.USG_DEFAULTS.max_arp_cache_base_reachable)}),echo_server:en.a.string().label("DEVICE_PROPERTIES_VALUES_ECHO_SERVER_IP_OR_HOSTNAME").required().matches(ln.g,{message:i.a.createElement(R.b,{id:"COMMON_VALIDATION_HOSTNAME_OR_IPV4",values:{name:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_IP_OR_HOSTNAME"})}})}).matches(ln.b,{message:i.a.createElement(R.b,{id:"COMMON_VALIDATION_ECHO_SERVER",values:{name:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ECHO_SERVER"})}})})})}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}});var Gu=Object(Qa.compose)(Object(o.connect)(e=>({usgSettings:Object(nr.selectUsgSettings)(e)})),Hu)(({values:e,dirty:t,isValid:a,setFormInvalid:n,resetForm:r,setFormDirty:c,setFieldValue:s,errors:E,activeItem:m})=>{var d;const _=Object(o.useDispatch)(),u=Object(_o.h)(m);Object(l.useEffect)(()=>{const{usgSettings:t,...a}=e;_(Object(C.h)({services:()=>a})),_(Object(C.j)({services:()=>{_(Object(nr.saveSettings)({key:nr.USG_DEFAULTS.key,...t})),r({values:e})}})),_(Object(C.i)({services:r}))},[e]),Object(l.useEffect)(()=>{c("services",t),n("services",!a)},[t,a,c,n]);const b=e=>{e.target.checked&&s("usgSettings.mss_clamp",e.target.name)},p=e=>{e.target.checked&&s("usgSettings.arp_cache_timeout",e.target.name)},O=e=>{e.target.checked&&("echoServerIpOrHostname"===e.target.name?s("usgSettings.echo_server",""):s("usgSettings.echo_server",e.target.name))};return i.a.createElement(i.a.Fragment,null,i.a.createElement(Uu,{marginBottom:10},i.a.createElement(v.a,{weight:"bold",color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_MSS_CLAMPING"}))),i.a.createElement(Uu,{marginBottom:24},i.a.createElement(Bu,null,i.a.createElement(R_.a,{id:"mssClampingAuto",checked:e.usgSettings.mss_clamp===nr.MssClamp.AUTO,name:nr.MssClamp.AUTO,onChange:b},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_VALUE_MSS_CLAMPING_AUTO"})),i.a.createElement(R_.a,{id:"mssClampingCustom",checked:e.usgSettings.mss_clamp===nr.MssClamp.CUSTOM,name:nr.MssClamp.CUSTOM,onChange:b},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_VALUE_MSS_CLAMPING_CUSTOM"})),i.a.createElement(R_.a,{id:"mssClampingDisabled",checked:e.usgSettings.mss_clamp===nr.MssClamp.DISABLED,name:nr.MssClamp.DISABLED,onChange:b},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_VALUE_MSS_CLAMPING_DISABLED"})))),e.usgSettings.mss_clamp===nr.MssClamp.CUSTOM&&i.a.createElement(Uu,{marginBottom:24,alignItems:"flex-start",flexDirection:"column"},i.a.createElement(Ge.Field,{full:!0,variant:"secondary",placeholder:"DEVICE_PROPERTIES_LABEL_CUSTOM_MSS_CLAMPING_PLACEHOLDER",label:"DEVICE_PROPERTIES_LABEL_CUSTOM_MSS_CLAMPING",name:"usgSettings.mss_clamp_mss"})),!!(null===(d=null==E?void 0:E.usgSettings)||void 0===d?void 0:d.mss_clamp_mss)&&i.a.createElement(S.a,{marginBottom:"16px"}),i.a.createElement(Uu,{marginBottom:10},i.a.createElement(v.a,{weight:"bold",color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT"}))),i.a.createElement(Uu,{marginBottom:24},i.a.createElement(Bu,null,i.a.createElement(R_.a,{id:"normal",checked:"normal"===e.usgSettings.arp_cache_timeout,name:"normal",onChange:p},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_NORMAL"})),i.a.createElement(R_.a,{id:"min-dhcp-lease",checked:"min-dhcp-lease"===e.usgSettings.arp_cache_timeout,name:"min-dhcp-lease",onChange:p},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_MIN_DHCP_LEASE"})),i.a.createElement(R_.a,{id:"custom",checked:"custom"===e.usgSettings.arp_cache_timeout,name:"custom",onChange:p},i.a.createElement(R.b,{id:"COMMON_LABEL_CUSTOM"})),i.a.createElement(Wu,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT_CUSTOM_TOOLTIP"}),width:180,position:"left"},i.a.createElement(ku,{isActive:!0})))),"custom"===e.usgSettings.arp_cache_timeout&&i.a.createElement(Uu,{marginBottom:24,alignItems:"flex-start",flexDirection:"column"},i.a.createElement(Ge.Field,{full:!0,variant:"secondary",label:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT_LABEL",placeholder:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT_PLACEHOLDER",name:"usgSettings.arp_cache_base_reachable",type:"number"})),u&&i.a.createElement(Uu,{marginBottom:24},i.a.createElement(v.a,{weight:"bold",color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_JUMBO_FRAME"})),i.a.createElement(Ge.Field,{label:"DEVICE_PROPERTIES_VALUES_ENABLE_JUMBO_FRAME",name:"jumboframe_enabled",type:"checkbox"})),!1,i.a.createElement(Uu,{marginBottom:10},i.a.createElement(v.a,{weight:"bold",color:"primary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ECHO_SERVER"}))),i.a.createElement(Uu,{marginBottom:0},i.a.createElement(Bu,null,i.a.createElement(R_.a,{id:"echoServerDefault",checked:e.usgSettings.echo_server===nr.USG_DEFAULTS.echo_server,name:nr.USG_DEFAULTS.echo_server,onChange:O},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_DEFAULT"})),i.a.createElement(R_.a,{id:"echoServerIpOrHostname",checked:e.usgSettings.echo_server!==nr.USG_DEFAULTS.echo_server,name:"echoServerIpOrHostname",onChange:O},i.a.createElement(R.b,{id:"COMMON_LABEL_CUSTOM"})),i.a.createElement(Wu,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_IP_OR_HOSTNAME_TOOLTIP"}),width:180},i.a.createElement(ku,{isActive:!0})))),e.usgSettings.echo_server!==nr.USG_DEFAULTS.echo_server&&i.a.createElement(Uu,{marginBottom:0,marginTop:24,alignItems:"flex-start",flexDirection:"column"},i.a.createElement(Ge.Field,{full:!0,variant:"secondary",label:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_PLACEHOLDER",name:"usgSettings.echo_server"})))});const $u=Object(r.c)(S.a)`
  padding: 0 32px;
`;var Yu=Object(Qa.compose)(Ja(["general","lcmScreen","services"]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r,intl:c,...s})=>{Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);const E=Object(o.useSelector)(_i),m=Object(o.useSelector)(ui),d=Object(o.useSelector)(bi),{_id:_,mac:u}=e,b=Object(o.useDispatch)(),p=!Object(_o.a)(e,Ce.FIRMWARE_CAPS.UTERM);return i.a.createElement(i.a.Fragment,null,i.a.createElement($u,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),openByDefault:!0,renderContent:()=>i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"lcmScreen",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>i.a.createElement(Fu,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Gu,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e,disableDebug:p,disableForget:!0})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:n,isInvalid:r,onFormSubmit:()=>{const e=Object.entries(E).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{}),{lcm:t,...a}=e;b(Object(Ce.updateDeviceWithIdEndpoint)(a,_,u,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(m).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{Object.values(d).forEach(e=>{"function"==typeof e&&e()})}}))}),Xu=a(734);const Ku=Object(r.c)(f.I)`
  margin: 2px;
`;var Zu={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:({activeItem:e,...t})=>{const a=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]),n=!Object(Ce.hasActiveUnifiCare)(e)&&Object(Ce.isUnifiCareEligible)(e);return i.a.createElement(i.a.Fragment,null,n&&i.a.createElement(Du,{device:e,hideWarning:!0}),i.a.createElement(Kl,{device:e}),a&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Dl,{activeItem:e}),i.a.createElement(Su,{variant:"secondary",items:[{id:"clients",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_HEADER_CLIENTS_AND_GUESTS"}),renderContent:()=>i.a.createElement(Rc,Object.assign({hideSignalTab:!0,activeItem:e},t))},{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),renderContent:()=>i.a.createElement(eu,{activeItem:e})},...J_(e),{id:"downlinks",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_DOWNLINK"}),renderContent:()=>i.a.createElement(Tm,Object.assign({activeItem:e},t))},{id:"networks",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(lu,{activeItem:e})},...Object(Ce.hasActiveUnifiCare)(e)?[{id:"unifiCare",label:i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE"}),renderContent:()=>i.a.createElement(Du,{device:e,hideWarning:!0})}]:[],{id:"statistics",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_STATS"}),renderContent:()=>i.a.createElement(Q_,{activeItem:e,forUdmPro:!0})}],multiOpen:!0,renderOnlyExpandedContent:!0})))}},ports:{path:"/ports",title:"DEVICE_PROPERTY_HEADER_PORTS",icon:()=>i.a.createElement(Ku,null),component:Y_,subpanel:{path:"/:subPanel/:subPanelId",component:({params:e,activeItem:t,...a})=>{switch(e.subPanel){case"ports":return e.subPanelId===jt.b.WAN?i.a.createElement(Xu.a,Object.assign({params:e,activeItem:t},a)):i.a.createElement(vd,Object.assign({params:e,activeItem:t},a));default:return i.a.createElement(i.a.Fragment,null)}}}},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:Yu}}};const qu=Object(r.c)("div")`
  &:not(:last-child) {
    margin-bottom: ${({theme:e})=>e.spacing["spacing-l"]};
  }
`,Ju=Object(r.c)(v.a)`
  margin-bottom: ${({theme:e})=>e.spacing["spacing-s"]};
`,Qu=Object(r.c)("div")`
  margin-bottom: 16px;
`;function eb({activeItem:e}){return i.a.createElement(qu,null,i.a.createElement(Ju,{color:"primary",weight:"bold",size:"body"},i.a.createElement(R.a,{id:"DEVICE_HEADER_RADIO2G_SHORT"})),i.a.createElement(wd,{activeItem:e,radioType:wc.b.RADIO_NG}),i.a.createElement(Qu,null),i.a.createElement(Ju,{color:"primary",weight:"bold",size:"body"},i.a.createElement(R.a,{id:"DEVICE_HEADER_RADIO5G_SHORT"})),i.a.createElement(wd,{activeItem:e,radioType:wc.b.RADIO_NA}))}const tb=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`,ab=r.a`
  padding: 0;
  margin: 0;
`;const nb=r.a`
  padding: 0;
  margin: 0;
`;var lb=Object(Qa.compose)(Ja(["general","screen","services"]),R.e)(function({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r,intl:c,...s}){var E,m,d,_;const u=Object(o.useSelector)(_i),b=Object(o.useSelector)(ui),p=Object(o.useSelector)(bi),O=Object(o.useSelector)(mo.o),I=Object(o.useSelector)(mo.D),g=Object(o.useSelector)(mo.d),{_id:C,mac:h}=e,[T,v]=Object(l.useState)(!(null===(E=O.ap_exclusions)||void 0===E?void 0:E.includes(h))),[f,D]=Object(l.useState)(I.enabled&&!(null===(m=I.exclude_devices)||void 0===m?void 0:m.includes(h))),y=Object(o.useDispatch)(),P=!Object(_o.a)(e,Ce.FIRMWARE_CAPS.UTERM),A=n||T!==!(null===(d=O.ap_exclusions)||void 0===d?void 0:d.includes(e.mac))||f!==(I.enabled&&!(null===(_=I.exclude_devices)||void 0===_?void 0:_.includes(e.mac))),N=Object(l.useCallback)(async()=>{var e,t;try{const a=[];if(T!==!(null===(e=O.ap_exclusions)||void 0===e?void 0:e.includes(h))){const e=O.ap_exclusions.filter(e=>e!==h);T||e.push(h),a.push({...O,ap_exclusions:e})}if(I.enabled&&f!==!(null===(t=I.exclude_devices)||void 0===t?void 0:t.includes(h))){const e=I.exclude_devices.filter(e=>e!==h);f||e.push(h),a.push({...I,exclude_devices:e,settings_preference:"auto"})}a.length&&await y(Object(Eo.k)(a))}catch(e){return void y(Object(je.a)({icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"}))}const a=Object.entries(u).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{});y(Object(Ce.updateDeviceWithIdEndpoint)(a,C,h,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(({data:e=[a]})=>{Object.values(b).forEach(t=>{"function"==typeof t&&t(e[0])})})},[C,y,u,O,T,f,h,b,I]),j=Object(l.useCallback)(()=>{Object.values(p).forEach(e=>{"function"==typeof e&&e()})},[p]),x=[{id:"radios",label:i.a.createElement(R.b,{id:"COMMON_RADIOS"}),renderContent:()=>i.a.createElement(_s,{activeItem:e,setFormDirty:t,setFormInvalid:a,isWirelessMeshingEnabled:g,isGlobalApSettingsEnabled:T,isChannelOptimizationEnabled:f})},{id:"screen",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>i.a.createElement(jo,{activeItem:e,setFormDirty:t})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Gu,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e,disableDebug:P,disableForget:!0})}];return(Object(Ce.hasActiveUnifiCare)(e)||Object(Ce.isUnifiCareEligible)(e))&&(x.forEach(e=>{e.openByDefault=!1}),x.unshift({id:"unifiCare",label:i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE"}),renderContent:()=>i.a.createElement(Du,{device:e}),openByDefault:!0})),Object(_o.g)(e)&&"bandsteer"!==x[2].id&&x.splice(2,0,{id:"bandsteer",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_BAND_STEERING"}),renderContent:()=>i.a.createElement(bs,{activeItem:e,setFormDirty:t})}),i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{flexDirection:"column",flex:"1 1 85%",padding:"20px 32px 0"},i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a}),i.a.createElement(Cs,{isGlobalApSettingsEnabled:T,setGlobalApSettingsEnabled:v,isChannelOptimizationEnabled:f,setChannelOptimizationEnabled:D,disableChannelOptimization:!I.enabled}),i.a.createElement(Ia.a,{variant:"secondary",renderOnlyExpandedContent:!0,items:x,contentClassName:nb,multiOpen:!0})),i.a.createElement(Ci.a,{isDirty:A,isInvalid:r,onFormSubmit:N,onFormCancel:j}))});const ib=Object(r.c)(f.I)`
  margin: 2px;
`;var rb={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:function({activeItem:e,...t}){const a=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]),n=PE(e),r=Object(o.useSelector)(Ce.selectIsUdr),c=[{id:"clients",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_CLIENTS_GUESTS"}),renderContent:()=>i.a.createElement(Rc,Object.assign({activeItem:e},t))},{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(eu,{activeItem:e})},...J_(e),{id:"radios",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_AIR_STATS"}),renderContent:()=>i.a.createElement(eb,{activeItem:e})},{id:"apGroups",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_AP_GROUP"}),renderContent:()=>i.a.createElement(Om,null)},{id:"downlinks",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_DOWNLINK"}),renderContent:()=>i.a.createElement(Tm,Object.assign({activeItem:e},t))},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(lu,Object.assign({activeItem:e},t))}];return n.length&&c.push({id:"channelUsage",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_CHANNEL_USAGE"}),renderContent:()=>i.a.createElement(jE,{ChannelBars:n})}),Object(Ce.isDeviceConnected)(e)&&Object(_o.e)(e,Ce.WIFI_CAPS.RF_SCAN)&&c.push({id:"rfEvironment",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_RF_ENVIRONMENT"}),renderContent:()=>i.a.createElement(IE,{activeItem:e})}),a&&c.push({id:"statistics",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_STATS"}),renderContent:()=>i.a.createElement(Q_,Object.assign({activeItem:e,hasApCapabilities:!0},t,{disableUsageChart:r}))}),i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),a&&i.a.createElement(i.a.Fragment,null,i.a.createElement(sc,{activeItem:e}),i.a.createElement(Dl,{activeItem:e}),i.a.createElement(tb,{variant:"secondary",items:c,contentClassName:ab,multiOpen:!0,renderOnlyExpandedContent:!0})))}},ports:{path:"/ports",title:"DEVICE_PROPERTY_HEADER_PORTS",icon:()=>i.a.createElement(ib,null),component:Y_,subpanel:{path:"/:subPanel/:subPanelId",component:({params:e,activeItem:t,...a})=>{switch(e.subPanel){case"ports":return e.subPanelId===jt.b.WAN?i.a.createElement(Xu.a,Object.assign({params:e,activeItem:t},a)):i.a.createElement(vd,Object.assign({params:e,activeItem:t},a));default:return i.a.createElement(i.a.Fragment,null)}}}},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:lb}}},cb=({activeItem:{ip:e,satisfaction:t,uptime:a,lan_ip:n},activeItem:l})=>{var r,c;const o=Object(Ce.getDeviceIp)(l),{na:s,ng:E,naNumSta:m,ngNumSta:d}=Object(Ce.getSatisfactionByRadio)(l),_=Object(wt.d)(t);return i.a.createElement(S.a,{flexDirection:"column"},_&&i.a.createElement(i.a.Fragment,null,i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_WIFI_EXPERIENCE_2G"})),d&&0!==E?i.a.createElement(ta.a,{size:"body",type:"percent",input:Math.min(E,100)/100,style:{color:Oa.a["color-"+Object(wt.c)(Math.min(E||0,100))]}}):i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_NA"}))),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_WIFI_EXPERIENCE_5G"})),m&&0!==s?i.a.createElement(ta.a,{size:"body",type:"percent",input:Math.min(s,100)/100,style:{color:Oa.a["color-"+Object(wt.c)(Math.min(s||0,100))]}}):i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_NA"})))),(null===(r=null==l?void 0:l.wan1)||void 0===r?void 0:r.ip)&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS_INDEXED",values:{wanIndex:1}})),i.a.createElement(v.a,{size:"body"},l.wan1.ip)),(null===(c=null==l?void 0:l.wan2)||void 0===c?void 0:c.ip)&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS_INDEXED",values:{wanIndex:2}})),i.a.createElement(v.a,{size:"body"},l.wan2.ip)),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LAN_IP_ADDRESS"})),i.a.createElement(v.a,{size:"body"},o)),a>0&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement(v.a,{size:"body"},Object(Jn.a)(a))),i.a.createElement(tl,{activeItem:l}),i.a.createElement(il,{activeItem:l}),i.a.createElement(Lc,{activeItem:l}),i.a.createElement(Vc,{activeItem:l}))},ob=({activeItem:e})=>{const t=Object(Ce.getPsusStatusText)(e).map(({status:e,statusColor:t,source:a,id:n},l)=>i.a.createElement(la,{key:n},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,Object.assign({id:a},"DEVICE_USW_MC_PSU_AC_POWER"===a&&{values:{psuIndex:l+1}}))),i.a.createElement(v.a,{size:"body",color:t},i.a.createElement(R.b,{id:e}))));return i.a.createElement(i.a.Fragment,null,t)},sb=a(332),Eb=a.n(sb);const mb=Object(r.c)("div")`
  margin-right: 14px;

  > * {
    position: relative;

    &:after {
      position: absolute;
      height: 12px;
      top: 5px;
      right: -8px;
      bottom: 2px;
      width: 1px;
      background: ${({theme:e})=>e.motifPalette.neutral04};
      content: '';
    }
  }
`,db=Object(r.c)("div")`
  margin-bottom: 16px;
`;var _b=({psuTable:e})=>{const t=Object(l.useMemo)(()=>e.map(({power:e})=>{const t=Math.ceil(parseFloat(e)/550*100);return{variant:Object(Ce.getPsuUtilizationColorVariant)(t),value:t}}),[e]);return i.a.createElement(S.a,{flexDirection:"column",marginBottom:48},t.map((t,a)=>{var n;const l=Eb()(),r=null===(n=null==e?void 0:e[a])||void 0===n?void 0:n.power;return i.a.createElement(db,{key:l},i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{color:"primary",weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_USW_MC_PSU_AC_POWER",values:{psuIndex:a+1}})),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(mb,null,i.a.createElement(v.a,{color:"primary",size:"body"},i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:Math.ceil(parseFloat(r))+"/550"}}))),i.a.createElement(ta.a,{size:"body",color:e[a].online?t.variant:"disabled",type:"percent",input:t.value/100}))),i.a.createElement(gE.a,{items:[t],height:10}))}))};const ub=Object(r.c)("div")`
  margin-top: ${({theme:e})=>e.spacing["spacing-xxxxxl"]};
`;var bb=function({activeItem:e}){const t=PE(e);return i.a.createElement(i.a.Fragment,null,e.psu_table.length?i.a.createElement(_b,{psuTable:e.psu_table}):null,t.length?i.a.createElement(jE,{ChannelBars:t}):null,Object(Ce.isDeviceConnected)(e)&&Object(_o.e)(e,Ce.WIFI_CAPS.RF_SCAN)?i.a.createElement(ub,null,i.a.createElement(IE,{activeItem:e})):null)};const pb=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`,Ob=r.a`
  padding: 0;
  margin: 0;
`;const Ib=r.a`
  padding: 0;
  margin: 0;
`;var gb=Object(Qa.compose)(Ja(["general","lcmScreen","services"]),R.e)(function({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r,intl:c,...s}){var E,m,d,_;const u=Object(o.useSelector)(_i),b=Object(o.useSelector)(ui),p=Object(o.useSelector)(bi),O=Object(o.useSelector)(mo.o),I=Object(o.useSelector)(mo.D),g=Object(o.useSelector)(mo.d),{_id:C,mac:h}=e,[T,v]=Object(l.useState)(!(null===(E=O.ap_exclusions)||void 0===E?void 0:E.includes(h))),[f,D]=Object(l.useState)(I.enabled&&!(null===(m=I.exclude_devices)||void 0===m?void 0:m.includes(h))),y=Object(o.useDispatch)(),P=!Object(_o.a)(e,Ce.FIRMWARE_CAPS.UTERM),A=n||T!==!(null===(d=O.ap_exclusions)||void 0===d?void 0:d.includes(e.mac))||f!==(I.enabled&&!(null===(_=I.exclude_devices)||void 0===_?void 0:_.includes(e.mac))),N=Object(l.useCallback)(async()=>{var e,t;try{const a=[];if(T!==!(null===(e=O.ap_exclusions)||void 0===e?void 0:e.includes(h))){const e=O.ap_exclusions.filter(e=>e!==h);T||e.push(h),a.push({...O,ap_exclusions:e})}if(I.enabled&&f!==!(null===(t=I.exclude_devices)||void 0===t?void 0:t.includes(h))){const e=I.exclude_devices.filter(e=>e!==h);f||e.push(h),a.push({...I,exclude_devices:e,settings_preference:"auto"})}a.length&&await y(Object(Eo.k)(a))}catch(e){return void y(Object(je.a)({icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"}))}const a=Object.entries(u).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{});y(Object(Ce.updateDeviceWithIdEndpoint)(a,C,h,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(({data:e=[a]})=>{Object.values(b).forEach(t=>{"function"==typeof t&&t(e[0])})})},[C,y,u,O,T,f,h,b,I]),j=Object(l.useCallback)(()=>{Object.values(p).forEach(e=>{"function"==typeof e&&e()})},[p]),x=[{id:"radios",label:i.a.createElement(R.b,{id:"COMMON_RADIOS"}),renderContent:()=>i.a.createElement(_s,{activeItem:e,setFormDirty:t,setFormInvalid:a,isWirelessMeshingEnabled:g,isGlobalApSettingsEnabled:T,isChannelOptimizationEnabled:f})},{id:"lcmScreen",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>i.a.createElement(Fu,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Gu,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e,disableDebug:P,disableForget:!0})}];return Object(_o.g)(e)&&"bandsteer"!==x[2].id&&x.splice(2,0,{id:"bandsteer",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_BAND_STEERING"}),renderContent:()=>i.a.createElement(bs,{activeItem:e,setFormDirty:t})}),i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{flexDirection:"column",flex:"1 1 85%",padding:"20px 32px 0"},i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a}),i.a.createElement(Cs,{isGlobalApSettingsEnabled:T,setGlobalApSettingsEnabled:v,isChannelOptimizationEnabled:f,setChannelOptimizationEnabled:D,disableChannelOptimization:!I.enabled}),i.a.createElement(Ia.a,{variant:"secondary",renderOnlyExpandedContent:!0,items:x,contentClassName:Ib,multiOpen:!0})),i.a.createElement(Ci.a,{isDirty:A,isInvalid:r,onFormSubmit:N,onFormCancel:j}))});const Cb=Object(r.c)("div")`
  padding: 0 32px 40px 32px;
`;var hb={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:function({activeItem:e,...t}){var a;const n=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),n&&i.a.createElement(i.a.Fragment,null,i.a.createElement(sc,{activeItem:e}),i.a.createElement(Dl,{activeItem:e}),i.a.createElement(pb,{variant:"secondary",items:[{id:"clients",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_CLIENTS_GUESTS"}),renderContent:()=>i.a.createElement(Rc,Object.assign({hideSignalTab:!0,activeItem:e},t))},{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(cb,{activeItem:e})},...J_(e),{id:"radios",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_AIR_STATS"}),renderContent:()=>i.a.createElement(eb,{activeItem:e})},{id:"apGroups",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_AP_GROUP"}),renderContent:()=>i.a.createElement(Om,null)},{id:"downlinks",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_DOWNLINK"}),renderContent:()=>i.a.createElement(Tm,Object.assign({activeItem:e},t))},...(null===(a=e.psu_table)||void 0===a?void 0:a.length)>0&&[{id:"powerSource",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POWER_SOURCE"}),renderContent:()=>i.a.createElement(ob,{activeItem:e})}],{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(lu,{activeItem:e})},{id:"insights",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_INSIGHTS"}),renderContent:()=>i.a.createElement(bb,Object.assign({activeItem:e},t))}],contentClassName:Ob,multiOpen:!0,renderOnlyExpandedContent:!0})))}},ports:{path:"/ports",title:"DEVICE_PROPERTY_HEADER_PORTS",icon:f.I,component:({activeItem:e})=>{const t=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,t&&i.a.createElement(om,{deviceData:e}),i.a.createElement(Cb,null,i.a.createElement(HE,{activeItem:e})))},subpanel:{path:"/:subPanel/:subPanelId",component:({params:e,activeItem:t,...a})=>"ports"===e.subPanel&&e.subPanelId===jt.b.WAN?i.a.createElement(Xu.a,Object.assign({params:e,activeItem:t},a)):i.a.createElement(vd,Object.assign({params:e,activeItem:t},a))}},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:gb}}},Tb=({activeItem:{displayable_version:e},flexProps:t})=>e?i.a.createElement(la,{flexProps:t},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_VERSION"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e)):null;const vb=Object(r.c)("div")`
  display: flex;
  height: 100%;
  flex-direction: column;
`;function fb({activeItem:{uptime:e,lan_ip:t,ip:a},activeItem:n}){const l=t||a,r=Object(K_.h)(n);return i.a.createElement(vb,null,i.a.createElement(Tb,{activeItem:n}),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_LAN_IP_ADDRESS"})),i.a.createElement(v.a,{size:"body"},l)),e>0&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement(v.a,{size:"body"},Object(Jn.c)(e,!0))),r.boardPhy&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_GATEWAY_BOARD_PHY"})),i.a.createElement(v.a,{size:"body"},r.boardPhy)),r.boardCpu&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_GATEWAY_BOARD_CPU"})),i.a.createElement(v.a,{size:"body"},r.boardCpu)),r.cpu&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_CPU"})),i.a.createElement(v.a,{size:"body"},r.cpu)),r.phy&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_PHY"})),i.a.createElement(v.a,{size:"body"},r.phy)))}const Rb=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`;function Db({activeItem:e,...t}){const[a]=Object(l.useState)("SwitchPorts-"+Date.now()),n=Object(o.useDispatch)(),r={style:BE.a.overflow,styleName:"overflow",dependant:a};Object(l.useEffect)(()=>(n(Object(WE.c)(r)),()=>{n(Object(WE.b)(r))}),[]);const c=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]),s=Object(Ce.isUxg)(e);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),c&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Dl,{activeItem:e}),i.a.createElement(Rb,{variant:"secondary",items:[...s?[{id:"clients",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_HEADER_CLIENTS_AND_GUESTS"}),renderContent:()=>i.a.createElement(Rc,Object.assign({hideSignalTab:!0,activeItem:e},t))}]:[],{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(fb,{activeItem:e})},...J_(e),...s?[{id:"downlinks",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_DOWNLINK"}),renderContent:()=>i.a.createElement(Tm,Object.assign({activeItem:e},t))}]:[],{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(lu,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})))}var Sb=({activeItem:e})=>{const t=Object(o.useDispatch)();return Object(l.useEffect)(()=>{t(Object(zn.fetchDeviceUsageReport)(e.mac,zn.OBJECT.GW))},[e.mac,t]),i.a.createElement(si,{gwMac:e.mac,keys:["mem","cpu"],heading:"DEVICE_GATEWAY_USAGE_STAT_CHART_HEADER"})};const yb=Object(r.c)(S.a)`
  padding: 16px 32px;
`,Pb=Object(r.c)("div")`
  margin-bottom: 16px;
`;var Ab=({activeItem:e})=>i.a.createElement(yb,{flexDirection:"column"},i.a.createElement(v.a,{weight:"bold",size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_STATS"})),i.a.createElement(Pb,null),i.a.createElement(Sb,{activeItem:e})),Nb=a(865);const jb=Object(r.c)("div")`
  position: relative;
  margin: 0 0 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.neutral02};

  &:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
  }

  .tooltip-position-fixer {
    margin-right: -16px;
  }
`,xb=Object(r.c)(jb)`
  margin: 0 0 12px;
  padding-bottom: 8px;
  width: 100%;
`,Lb=({actionName:e,Button:t,whiteOutActive:a})=>i.a.createElement(xb,null,a&&i.a.createElement(or,null),i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(S.a,{justifyContent:"flex-end"},t),i.a.createElement(rn.a,{message:i.a.createElement(R.b,{id:`DEVICE_ACTIONS_${e}_INFO`}),width:210,tooltipClassName:"tooltip-position-fixer"},i.a.createElement(f.cb,{isActive:!0,omitSvgMargin:!0}))));var Vb=({activeItem:e})=>{const t=Object(o.useSelector)(t=>Object(Ce.selectDeviceData)(t,e.mac)),a=Object(Ce.getRawDeviceState)(t)===Ce.DeviceState.UPGRADING;return i.a.createElement(i.a.Fragment,null,(Object(Ce.hasActiveUnifiCare)(t)||Object(Ce.isUnifiCareEligible)(t))&&i.a.createElement(jb,null,i.a.createElement(R.b,{id:"DEVICE_ACTIONS_UNIFI_CARE"}),i.a.createElement(Du,{device:t})),i.a.createElement(jb,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_CUSTOM_UPGRADE_LABEL"})),i.a.createElement(dr,{device:t,whiteOutActive:a})),i.a.createElement(Lb,{actionName:"LOCATE",Button:i.a.createElement(wi,{device:t})}),i.a.createElement(Lb,{actionName:"RESTART",Button:i.a.createElement(ki,{device:t})}),i.a.createElement(Lb,{actionName:"PROVISION",Button:i.a.createElement(Bi,{device:t}),whiteOutActive:a}),i.a.createElement(S.a,{marginTop:"32px",marginBottom:"-8px"},i.a.createElement(Lb,{actionName:"FORGET",Button:i.a.createElement(He,{device:t})})))},Mb=a(274),wb=a(2611),Fb=a(63);const Ub=Object(r.c)("div")`
  width: 100%;
  margin-top: ${e=>e.marginTop||0}px;
  margin-bottom: ${e=>e.marginBottom||0}px;
  display: flex;
  justify-content: space-between;
  align-items: center;
`,kb=Object(r.c)(Mb.a)`
  color: ${({theme:e})=>e.motifPalette.text02};
  opacity: 0.4;
  margin-right: auto;
`,Wb=Object(r.c)(f.cb)`
  margin-right: auto;
  margin-left: 5px;
  height: 14px;
  width: 14px;
`,Bb=Object(r.c)(rn.a)`
  margin-left: 0 !important;
`,zb=r.a`
  flex-direction: column;
  align-items: flex-start;
`,Hb=Object(r.c)("div")`
  display: flex;

  > label:not(:first-child) {
    margin-left: 18px;
  }
`,Gb=i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_CUSTOM_MSS_CLAMPING_VALIDATION_LABEL",values:{min:nr.USG_DEFAULTS.min_mss_clamp_mss,max:nr.USG_DEFAULTS.mss_clamp_mss}});var $b=Object(Me.f)({isInitialValid:!0,mapPropsToValues:({usgSettings:{key:e,mss_clamp_mss:t,mss_clamp:a,offload_accounting:n,echo_server:l,offload_sch:i,offload_l2_blocking:r,lldp_enable_all:c,arp_cache_timeout:o,arp_cache_base_reachable:s}})=>({key:e,mss_clamp:a||nr.USG_DEFAULTS.mss_clamp,mss_clamp_mss:t||nr.USG_DEFAULTS.mss_clamp_mss,offload_accounting:n||nr.USG_DEFAULTS.offload_accounting,offload_sch:i,offload_l2_blocking:r,echo_server:l||nr.USG_DEFAULTS.echo_server,lldp_enable_all:c,arp_cache_timeout:o||"normal",arp_cache_base_reachable:s||nr.USG_DEFAULTS.arp_cache_base_reachable}),validationSchema:en.a.object().shape({mss_clamp:en.a.string(),mss_clamp_mss:en.a.number().when("mss_clamp",{is:Fb.u.CUSTOM,then:en.a.number().label("DEVICE_PROPERTIES_LABEL_CUSTOM_MSS_CLAMPING").required().min(nr.USG_DEFAULTS.min_mss_clamp_mss,Gb).max(nr.USG_DEFAULTS.mss_clamp_mss,Gb)}),offload_accounting:en.a.boolean(),offload_sch:en.a.boolean(),offload_l2_blocking:en.a.boolean(),arp_cache_timeout:en.a.string(),arp_cache_base_reachable:en.a.number().when("arp_cache_timeout",{is:"custom",then:en.a.number().label("DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT").required().min(1).max(nr.USG_DEFAULTS.max_arp_cache_base_reachable)}),echo_server:en.a.string().label("DEVICE_PROPERTIES_VALUES_ECHO_SERVER_IP_OR_HOSTNAME").required().matches(ln.g,{message:i.a.createElement(R.b,{id:"COMMON_VALIDATION_HOSTNAME_OR_IPV4",values:{name:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_IP_OR_HOSTNAME"})}})}),lldp_enable_all:en.a.boolean()}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}})(e=>{const{values:t,initialValues:a,setFieldValue:n,dirty:r,isValid:c,setFormDirty:s,setFormInvalid:E,resetForm:m,usgSettings:d,activeItem:_,errors:u}=e,b=Object(o.useDispatch)(),p=Object(o.useSelector)(wb.a);Object(l.useEffect)(()=>{b(Object(C.j)({services:()=>{Object(d_.a)(a,t)||b(Object(nr.saveSettings)({key:nr.USG_DEFAULTS.key,...t},_._id,void 0)),m({values:t})}})),b(Object(C.i)({services:m}))},[a,t]),Object(l.useEffect)(()=>{s("services",r),E("services",!c)},[t,d,r,c]);const O=e=>{e.target.checked&&n("mss_clamp",e.target.name)},I=e=>{e.target.checked&&n("arp_cache_timeout",e.target.name)},g=e=>{e.target.checked&&("echoServerIpOrHostname"===e.target.name?n("echo_server",""):n("echo_server",e.target.name))};return i.a.createElement(i.a.Fragment,null,i.a.createElement(Ub,{marginBottom:12},i.a.createElement(v.a,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_MSS_CLAMPING"}))),i.a.createElement(Ub,{marginBottom:16},i.a.createElement(Hb,null,i.a.createElement(R_.a,{id:"mssClampingAuto",checked:t.mss_clamp===Fb.u.AUTO,name:Fb.u.AUTO,onChange:O},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_VALUE_MSS_CLAMPING_AUTO"}))),i.a.createElement(R_.a,{id:"mssClampingCustom",checked:t.mss_clamp===Fb.u.CUSTOM,name:Fb.u.CUSTOM,onChange:O},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_VALUE_MSS_CLAMPING_CUSTOM"}))),i.a.createElement(R_.a,{id:"mssClampingDisabled",checked:t.mss_clamp===Fb.u.DISABLED,name:Fb.u.DISABLED,onChange:O},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_VALUE_MSS_CLAMPING_DISABLED"}))))),t.mss_clamp===Fb.u.CUSTOM&&i.a.createElement(Ub,{marginBottom:12,className:zb},i.a.createElement(kb,{htmlFor:"mss_clamp_mss"},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_CUSTOM_MSS_CLAMPING"}))),i.a.createElement(Ge.Field,{full:!0,placeholder:"DEVICE_PROPERTIES_LABEL_CUSTOM_MSS_CLAMPING_PLACEHOLDER",name:"mss_clamp_mss",id:"mss_clamp_mss"})),!!(null==u?void 0:u.mss_clamp_mss)&&i.a.createElement(S.a,{marginBottom:"24px"}),i.a.createElement(Ub,{marginBottom:12},i.a.createElement(v.a,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_HARDWARE_OFFLOAD"}))),i.a.createElement(Ub,{marginBottom:12},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_HARDWARE_OFFLOAD"})),i.a.createElement(ps.a,{id:"offload_accounting",disabled:!p,onChange:()=>{n("offload_accounting",!t.offload_accounting)},checked:!!p&&t.offload_accounting})),i.a.createElement(Ub,{marginBottom:12},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_HARDWARE_SCHEDULE"})),i.a.createElement(ps.a,{id:"offload_sch",onChange:()=>{n("offload_sch",!t.offload_sch)},checked:t.offload_sch})),i.a.createElement(Ub,{marginBottom:28},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_OFFLOAD_L2_BLOCKING"})),i.a.createElement(ps.a,{id:"offload_l2_blocking",onChange:()=>{n("offload_l2_blocking",!t.offload_l2_blocking)},checked:t.offload_l2_blocking})),i.a.createElement(Ub,{marginBottom:12},i.a.createElement(v.a,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LLDP"}))),i.a.createElement(Ub,{marginBottom:28},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ENABLE_LLDP_ON_ALL_INTERFACES"})),i.a.createElement(ps.a,{id:"lldp_enable_all",onChange:()=>{n("lldp_enable_all",!t.lldp_enable_all)},checked:t.lldp_enable_all})),i.a.createElement(Ub,{marginBottom:12},i.a.createElement(v.a,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT"}))),i.a.createElement(Ub,{marginBottom:24},i.a.createElement(Hb,null,i.a.createElement(R_.a,{id:"normal",checked:"normal"===t.arp_cache_timeout,name:"normal",onChange:I},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_NORMAL"})),i.a.createElement(R_.a,{id:"min-dhcp-lease",checked:"min-dhcp-lease"===t.arp_cache_timeout,name:"min-dhcp-lease",onChange:I},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_MIN_DHCP_LEASE"})),i.a.createElement(R_.a,{id:"custom",checked:"custom"===t.arp_cache_timeout,name:"custom",onChange:I},i.a.createElement(R.b,{id:"COMMON_LABEL_CUSTOM"})),i.a.createElement(Bb,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT_CUSTOM_TOOLTIP"}),width:180,position:"left"},i.a.createElement(Wb,{isActive:!0})))),"custom"===t.arp_cache_timeout&&i.a.createElement(Ub,{marginBottom:24},i.a.createElement(Ge.Field,{full:!0,variant:"secondary",label:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT_LABEL",placeholder:"DEVICE_PROPERTIES_LABEL_ARP_CACHE_TIMEOUT_PLACEHOLDER",name:"arp_cache_base_reachable",type:"number"})),i.a.createElement(Ub,{marginBottom:12},i.a.createElement(v.a,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ECHO_SERVER"}))),i.a.createElement(Ub,{marginBottom:0},i.a.createElement(Hb,null,i.a.createElement(R_.a,{id:"echoServerDefault",checked:t.echo_server===nr.USG_DEFAULTS.echo_server,name:nr.USG_DEFAULTS.echo_server,onChange:g},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_DEFAULT"}))),i.a.createElement(R_.a,{id:"echoServerIpOrHostname",checked:t.echo_server!==nr.USG_DEFAULTS.echo_server,name:"echoServerIpOrHostname",onChange:g},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_IP_OR_HOSTNAME"}))),i.a.createElement(Bb,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_IP_OR_HOSTNAME_TOOLTIP"}),width:180},i.a.createElement(Wb,{isActive:!0})))),t.echo_server!==nr.USG_DEFAULTS.echo_server&&i.a.createElement(Ub,{marginBottom:12,marginTop:14,className:zb},i.a.createElement(kb,{htmlFor:"echo_server"},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_IP_OR_HOSTNAME"}))),i.a.createElement(Ge.Field,{full:!0,placeholder:"DEVICE_PROPERTIES_VALUES_ECHO_SERVER_PLACEHOLDER",name:"echo_server",id:"echo_server"})))});const Yb=Object(r.c)("div")`
  width: 100%;
  margin-bottom: ${e=>e.marginBottom||0}px;

  input {
    width: 100% !important;
  }
`,Xb=Object(r.c)("div")`
  display: flex;

  > label:not(:first-child) {
    margin-left: 18px;
  }
`,Kb=Object(r.c)(S.a)`
  margin-bottom: 16px;
  width: 100%;
`,Zb=Object(Me.f)({mapPropsToValues:({activeItem:{led_override:e,led_override_color:t,led_override_color_brightness:a,lcm_brightness_override:n,lcm_brightness:l,lcm_idle_timeout_override:i,lcm_idle_timeout:r,outdoor_mode_override:c,power_source_ctrl:o}={}})=>({led_override:e!==Ce.LedOverride.OFF,led_override_color:t||Ce.DEFAULT_LED_COLOR,led_override_color_brightness:a>=0?a:Ce.DEFAULT_LED_BRIGHTNESS,lcm_brightness_override:n||!1,lcm_brightness:l>=0?l:100,lcm_idle_timeout_override:i||!1,lcm_idle_timeout:r||0,outdoor_mode_override:c||"default",power_source_ctrl:o||"auto"}),validationSchema:en.a.object().shape({led_override:en.a.string(),led_override_color:en.a.string(),led_override_color_brightness:en.a.number(),lcm_brightness_override:en.a.boolean(),lcm_brightness:en.a.number(),lcm_idle_timeout_override:en.a.boolean(),lcm_idle_timeout:en.a.number(),outdoor_mode_override:en.a.string(),power_source_ctrl:en.a.string()}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}});var qb=Object(Qa.compose)(R.e,Zb)(({activeItem:e,setFormDirty:t,dirty:a,values:n,resetForm:r,setFieldValue:c,disableLedOverrideFields:s,intl:E})=>{var m;const d=Object(o.useDispatch)(),{led_override:_}=e,u=Object(o.useSelector)(nr.selectMgmtSettings),b=Object(_o.l)(e),p=Object(_o.m)(e),O=(null!==(m=null==u?void 0:u.led_enabled)&&void 0!==m&&m&&_!==Ce.LedOverride.OFF||_===Ce.LedOverride.ON)&&p;Object(l.useEffect)(()=>(d(Object(C.h)({screen:()=>{if(!a)return{};const e={...n,led_override:n.led_override?Ce.LedOverride.ON:Ce.LedOverride.OFF,lcm_brightness_override:b&&n.lcm_brightness_override,lcm_idle_timeout_override:b&&n.lcm_idle_timeout_override};return e.lcm_brightness_override||delete e.lcm_brightness,e.lcm_idle_timeout_override||delete e.lcm_idle_timeout,b||(delete e.lcm_brightness_override,delete e.lcm_idle_timeout_override),e}})),d(Object(C.j)({screen:()=>r({values:n})})),d(Object(C.i)({screen:r})),()=>{d(Object(C.h)({screen:null})),d(Object(C.j)({screen:null})),d(Object(C.i)({screen:null}))}),[d,r,n,a,e.mac,b]),Object(l.useEffect)(()=>{t("screen",a)},[t,a]);const I=Object(l.useCallback)((e,t,a)=>{e.target.checked&&c(t,a?"override"===e.target.name:e.target.name)},[c]),g=Object(l.useCallback)(e=>I(e,"lcm_brightness_override",!0),[I]),h=Object(l.useCallback)(e=>I(e,"lcm_idle_timeout_override",!0),[I]);return i.a.createElement(i.a.Fragment,null,!s&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Kb,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LED"})),i.a.createElement(cn.a,{type:"checkbox",name:"led_override"}))),O&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Yb,{marginBottom:12},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LED_BRIGHTNESS"}))),i.a.createElement(Yb,{marginBottom:12},i.a.createElement(Do.a,{size:"large",value:+n.led_override_color_brightness,withValueIndicator:!0,valueIndicatorPosition:"right",formatValueIndicatorContent:e=>i.a.createElement("span",null,e,"%"),onChange:e=>c("led_override_color_brightness",e.target.value)})),i.a.createElement(Yb,{marginBottom:12},i.a.createElement(v.a,{color:"primary",weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_COLOR"}))),i.a.createElement(Yb,{marginBottom:12},i.a.createElement(So.a,{color:n.led_override_color,variant:"block",onChange:e=>{c("led_override_color","hex"in e?e.hex:void 0)},hexLabel:E.formatMessage({id:"DEVICE_PROPERTIES_LABEL_HEX"}),actionButton:i.a.createElement(oe.a,{variant:"inline",onClick:()=>{c("led_override_color",Ce.DEFAULT_LED_COLOR)}},i.a.createElement(R.b,{id:"COMMON_VALUE_REVERT_BUTTON"}))}))),b&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Yb,{marginBottom:12},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LCM_BRIGHTNESS"}))),i.a.createElement(Yb,{marginBottom:16},i.a.createElement(Xb,null,i.a.createElement(R_.a,{id:"lcmBrigthnessDefault",checked:!n.lcm_brightness_override,name:"default",onChange:g},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_VALUE_LED_DEFAULT_SETTINGS"}))),i.a.createElement(R_.a,{id:"lcmBrigthnessOverride",checked:n.lcm_brightness_override,name:"override",onChange:g},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIONS_OVERRIDE"}))))),n.lcm_brightness_override&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Yb,{marginBottom:12},i.a.createElement(Do.a,{size:"large",value:+n.lcm_brightness,withValueIndicator:!0,valueIndicatorPosition:"right",formatValueIndicatorContent:e=>i.a.createElement("span",null,e,"%"),onChange:e=>c("lcm_brightness",e.target.value)}))),i.a.createElement(Yb,{marginBottom:12},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LCM_IDLE_TIMEOUT"}))),i.a.createElement(Yb,{marginBottom:16},i.a.createElement(Xb,null,i.a.createElement(R_.a,{id:"lcmIdleTimeoutDefault",checked:!n.lcm_idle_timeout_override,name:"default",onChange:h},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_VALUE_LED_DEFAULT_SETTINGS"}))),i.a.createElement(R_.a,{id:"lcmIdleTimeoutOverride",checked:n.lcm_idle_timeout_override,name:"override",onChange:h},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIONS_OVERRIDE"})))))))}),Jb=a(495),Qb=a(1201);const ep=Object(r.c)("div")`
  table {
    tr {
      cursor: pointer;
    }
  }
`,tp=Object(r.c)(f.g)`
  position: absolute;
  right: 8px;
  color: inherit;
`,ap=Object(r.c)("div")`
  margin-left: 10px;
`,np=Object(r.c)(oe.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px !important;
  margin-top: 16px;
  justify-content: flex-end;

  svg {
    height: 14px;
    width: 13px;
  }
`,lp=[{id:"portName",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_NAME"})),renderCell:({portName:e})=>i.a.createElement(v.a,{size:"body"},e)},{id:"portStatus",label:i.a.createElement(v.a,{color:"inherit",size:"label",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_STATUS"})),renderCell:({portStatus:e})=>i.a.createElement(i.a.Fragment,null,i.a.createElement(v.a,{color:"inherit",size:"body"},e),i.a.createElement(tp,{size:"small"}))}];var ip=Object(R.e)(({activeItem:e,intl:t})=>{const{ethernet_overrides:a,port_overrides:r,port_table:c=[]}=e,s=Object(o.useSelector)(an.selectNetworkGroups),E=Object(n.k)(),{path:m}=Object(n.n)(),{site:d,page:_,id:u,panel:b}=Object(n.m)(),p=Object(Ce.getDeviceSpecs)(e),O=Object(Ce.getDeviceState)(e),I=[Ce.DeviceState.CONNECTED,Ce.DeviceState.PROVISIONING].includes(O),g=Object(l.useMemo)(()=>{const e=c.map(e=>({port_idx:parseInt(e.ifname.replace("eth",""),10)+1,...e}));return e.length>0?e:Object.keys(p.ports).map(e=>({ifname:e,up:!1,enable:!1,port_idx:parseInt(e.replace("eth",""),10)+1}))},[e,p.ports]),C=Object(l.useMemo)(()=>g.sort((e,t)=>e.port_idx-t.port_idx).map(n=>{var l;const{ifname:c}=n,o=n.port_idx,E=a.find(({ifname:e})=>e===c),m=E&&s.find(e=>e.id===E.networkgroup),{nameOverride:d}=Object(Ce.getCurrentPortData)(o-1,e),_=Object(K_.c)(e,c),u=r&&r.find(({port_idx:e})=>_.portIdx===e),b=Object.values(Qb.a.linkNegotiationOptions).find(({speed:e,full_duplex:t,autoneg:a})=>u&&u.speed&&!u.autoneg?u.speed===e&&u.full_duplex===t:a),{ports:p}=Object(Ce.getDeviceSpecs)(e),O=Object(Ce.isUsg)(e)?p[c]:o,I=Object(Ce.getPortGroupLabel)(e,n,null!==(l=null==m?void 0:m.id)&&void 0!==l?l:t.formatMessage({id:"COMMON_DISABLED"})),g=d||i.a.createElement(R.b,{id:Object(Ce.isUGW3)(e)||Object(Ce.isUGW4)(e)?"DEVICE_PROPERTIES_PORT_WITH_NUMBER_AND_NETWORK_GROUP_SHORT":"DEVICE_PROPERTIES_PORT_WITH_NUMBER_AND_NETWORK_GROUP",values:{port:O,networkGroup:I}}),C={...Object(Jb.a)(n),networkGroup:m?m.id:null,networkGroupLabel:m?m.label:"COMMON_DISABLED",linkNegotiation:b.id,linkNegotiationLabel:b.label,linkNegotiationSpeed:b.speed,portName:g,portStatus:void 0,id:o||c,portIdx:o};return _.supportedValues&&0!==_.supportedValues.length||(C.linkNegotiationLabel="DEVICE_PROPERTIES_LINK_NEGOTIATION_AUTO"),C.portStatus=i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(XE.a,{cellData:C,deviceData:e,style:{minWidth:20}}),i.a.createElement(ap,null,i.a.createElement(R.b,{id:C.networkGroup?C.linkNegotiationLabel:C.networkGroupLabel,values:{speed:Object(aa.c)(1e6*C.linkNegotiationSpeed/8,"bitrate")}}))),C}),[g,e,a,s,r]),h=e=>Object(n.i)(m,{site:d,page:_,id:u,panel:b,subPanel:"ports",subPanelId:e}),T=Object(l.useCallback)(e=>(null==e?void 0:e.dns)?null:E.push(h(e.ifname)),[E]);return i.a.createElement(ep,null,i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(Da.a,{columns:lp,rowHeight:35,disableColumnFilters:!0,items:C,onRowClick:T,hideCellOverflow:!1}),I&&i.a.createElement(np,{variant:"link",onClick:()=>E.push(h(jt.b.ALL)),Icon:i.a.createElement(f.Kb,{isActive:!0})},i.a.createElement(R.b,{id:"DEVICE_PORTS_TABLE_CONFIGURE_INTERFACES"}))))});const rp=Object(r.c)("div")`
  display: flex;
  height: auto;
  width: 100%;
  align-items: center;
  flex-direction: column;
  padding: 0 32px;
  flex: 1 1 85%;
`,cp=Object(r.c)("div")`
  margin-bottom: ${({theme:e})=>e.spacing["spacing-xl"]};
`;var op=Object(Qa.compose)(Ja(["general","screen","services"]))(({activeItem:e,isDirty:t,isInvalid:a,setFormDirty:n,setFormInvalid:r})=>{const{_id:c,mac:s}=e,E=Object(o.useSelector)(ui),m=Object(o.useSelector)(bi),d=Object(o.useSelector)(_i),_=Object(o.useSelector)(nr.selectUsgSettings),u=Object(o.useSelector)(ke.o)&&!e.unsupported,b=Object(o.useDispatch)(),p=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,p&&i.a.createElement(om,{deviceData:e,hideAnomalies:!0}),i.a.createElement(rp,null,u&&i.a.createElement(Ia.a,{variant:"secondary",multiOpen:!0,renderOnlyExpandedContent:!0,items:[{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),openByDefault:!0,renderContent:()=>i.a.createElement(cp,null,i.a.createElement(gi,{activeItem:e,setFormDirty:n,setFormInvalid:r}))},{id:"ports",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_PORTS"}),openByDefault:!1,renderContent:()=>i.a.createElement(ip,{activeItem:e})},{id:"screen",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>i.a.createElement(cp,null,i.a.createElement(qb,{activeItem:e,setFormDirty:n}))},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(cp,null,i.a.createElement($b,{activeItem:e,usgSettings:_,setFormDirty:n,setFormInvalid:r}))},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(Vb,{activeItem:e})}]})),i.a.createElement(Ci.a,{isDirty:t,isInvalid:a,onFormSubmit:()=>{const e=Object.entries(d).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{});(Object(Nb.a)(e)?Promise.resolve():b(Object(Ce.updateDeviceWithIdEndpoint)(e,c,s,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0}))).then(()=>{Object.values(E).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{var e,t,a;null===(e=m.general)||void 0===e||e.call(m),null===(t=m.screen)||void 0===t||t.call(m),null===(a=m.services)||void 0===a||a.call(m)}}))});const sp=Object(r.c)(S.a)`
  position: relative;
  margin: -18px -30px 40px;
  padding-bottom: 12px;
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};

  svg {
    position: absolute;
    left: 24px;
  }
`,Ep=Object(r.c)(v.a)`
  width: 100%;
  text-align: center;
`,mp=Object(r.c)(S.a)`
  width: 100%;
  padding: 30px;
`,dp=Object(r.c)(v.a)`
  margin-bottom: ${({theme:e})=>e.spacing["spacing-s"]};
`,_p=Object(r.c)(S.a)`
  margin-bottom: ${({marginBottom:e})=>e||0}px;
`,up=Object(Me.f)({mapPropsToValues:({port:e})=>{const{nameOverride:t,enable:a}=e;return{name:t,enable:null==a||a}},validationSchema:en.a.object().shape({enable:en.a.boolean(),name:en.a.string()}),handleSubmit:(e,{props:{activeItem:{_id:t,port_overrides:a,mac:n},port:l,intl:i,history:r,updateDeviceWithIdEndpoint:c}})=>{const o=i.formatMessage({id:"DEVICE_PROPERTY_HEADER_PORTS"});c({port_overrides:[...(null==a?void 0:a.filter(({port_idx:e})=>e!==l.portIdx))||[],{port_idx:l.portIdx,...e}]},t,n,{successToast:{icon:Ea.a.success,message:"DEVICE_PORT_FORM_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR",values:{section:o}},mergeAndOverrideKeys:["port_overrides"],extend:!0}).then(()=>{r.goBack()})}});var bp=Object(Qa.compose)(Object(o.connect)((e,{activeItem:t,params:{subPanelId:a}})=>({port:Object(Ce.getCurrentPortData)(+a.replace(/\D/g,""),t)}),{updateDeviceWithIdEndpoint:Ce.updateDeviceWithIdEndpoint}),R.e,up)(function({activeItem:e,port:t,history:a,submitForm:n,resetForm:r,dirty:c}){const s=Object(l.useCallback)(()=>{r(),a.goBack()},[r,a]),E=Object(o.useSelector)(an.selectNetworkGroups),m=Object(K_.g)(t.ifname,e,E),d=Object(Ce.getDeviceModelFeature)(e,"poe");return i.a.createElement(i.a.Fragment,null,i.a.createElement(mp,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(sp,{alignItems:"center"},i.a.createElement(f.f,{onClick:s,style:{cursor:"pointer"}}),i.a.createElement(Ep,{size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_PORT_WITH_NUMBER_AND_NETWORK_GROUP",values:{port:t.portIdx,networkGroup:null==m?void 0:m.label}}))),i.a.createElement(_p,{marginBottom:24},i.a.createElement(Ge.Field,{label:"DEVICE_PORT_FORM_NAME_LABEL",full:!0,name:"name"})),d&&i.a.createElement(_p,{marginBottom:24},i.a.createElement(S.a,{flexDirection:"column",flex:"1"},i.a.createElement(dp,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_PORT_POWER_LABEL"})),i.a.createElement(v.a,{color:"tertiary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PORT_FORM_PORT_POWER_DESCRIPTION"}))),i.a.createElement(Ge.Field,{name:"enable",type:"checkbox"}))),i.a.createElement(Ci.a,{isDirty:c,onFormSubmit:n,onFormCancel:s,allowCancel:!0}))}),pp={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:Db},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:Ab},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:op,subpanel:{path:"/:subPanel/:subPanelId",component:({activeItem:e,params:t,...a})=>t.subPanelId===jt.b.ALL?i.a.createElement(Xu.a,Object.assign({activeItem:e,params:t},a)):i.a.createElement(bp,Object.assign({activeItem:e,params:t},a))}}}},Op=({mac:e,props:t,children:a})=>{const n=Object(l.useMemo)(()=>Object(We.selectUnifiDeviceClientProperties)(e,t),[e,t]);return a(Object(o.useSelector)(n))};const Ip=Object(r.c)("img")`
  width: 40px;
  height: 40px;
`,gp=Object(r.c)(oe.a)`
  padding: 0;
  margin: 0;
  border: 0;
  font-weight: 400;
  line-height: 1.6;
`,Cp=Object(r.c)(oe.a)`
  font-size: ${({theme:e})=>e.fontSize["font-size-caption"]};
`,hp=Object(r.c)(le.f)`
  background-color: ${({theme:e})=>e.motifPalette.neutral02};
  border-radius: 4px;
`,Tp=({activeItem:e})=>i.a.createElement(le.f,{flexDirection:"row",marginBottom:24},i.a.createElement(le.f,{maxWidth:"33%",minWidth:"33%",margin:"auto 16px auto 0",alignItems:"center",justifyContent:"center"},i.a.createElement(le.c,{client:e,grid:!0})),i.a.createElement(le.f,{width:"100%",flexDirection:"column"},e.model&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_MODEL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.model)),e.mac&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"UNIFI_DEVICE_CLIENT_LABEL_MAC"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.mac)),e.displayable_version&&i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"UNIFI_DEVICE_CLIENT_LABEL_VERSION"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.displayable_version)))),vp=({product_line:e})=>{var t,a;const n=Object(o.useSelector)(d.b),l=Object(o.useSelector)(V.a);return e&&e!==We.UnifiDeviceProductLine.NETWORK?i.a.createElement(hp,{padding:"12px",alignItems:"center"},i.a.createElement(le.f,{marginRight:16},i.a.createElement(Ip,{src:(()=>{switch(e){case We.UnifiDeviceProductLine.TALK:return l+"/unifiDevices/unifiTalkDevice.png";case We.UnifiDeviceProductLine.ACCESS:return l+"/unifiDevices/unifiAccessDevice.png";case We.UnifiDeviceProductLine.PROTECT:return l+"/unifiDevices/unifiProtectDevice.png";case We.UnifiDeviceProductLine.CONNECT:return l+"/unifiDevices/unifiConnectDevice.png";default:return null}})()})),i.a.createElement(le.f,null,i.a.createElement(Cp,{variant:"link",onClick:()=>{window.location.href=n.replace("network",e.toLowerCase())}},i.a.createElement(R.b,{id:"UNIFI_DEVICE_CLIENT_LABEL_VIEW_IN",values:{application:(null===(t=null==e?void 0:e.charAt(0))||void 0===t?void 0:t.toUpperCase())+(null===(a=null==e?void 0:e.slice(1))||void 0===a?void 0:a.toLowerCase())}})))):null},fp=({activeItem:e})=>{const t=Object(xt.getWirelessClientExperience)(e),a=Object(l.useMemo)(()=>e.uplink_mac?Object(Ce.selectDeviceRecordProperties)(e.uplink_mac,["type","name","model","mac"]):()=>{},[e.uplink_mac]);return i.a.createElement(Qt,{item:e,clientExperience:t,headerTitle:"COMMON_WIFI_EXP",showGraph:e.connected&&t.known,itemType:Ut.a.UNIFI_CLIENT,canReport:!0,padding:"24px 0 0 0",uplinkDevice:Object(o.useSelector)(a)})},Rp=({activeItem:e,history:t})=>{const{mac:a,ip:n,connected:r,network_name:c,uplink_mac:s,is_wired:E,essid:m}=e,d=Object(Ta.a)("/devices/properties/:mac/"+jt.a.OVERVIEW),_=Object(l.useMemo)(()=>s?Object(Ce.selectDeviceRecordProperties)(s,["type","name","model","mac"]):()=>{},[s]),u=Object(o.useSelector)(_),b=Object(l.useMemo)(()=>Object(xt.getPortName)(u,e),[u,e]),p=Object(l.useMemo)(()=>Object(xt.getPortNumber)(u,e),[u,e]);return i.a.createElement(le.f,{flexDirection:"column",marginTop:24},n&&r?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_IP_ADDRESS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},n)):null,c?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_NETWORK"})),i.a.createElement(v.a,{color:"secondary",size:"body"},c)):null,b?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:E?"UNIFI_DEVICE_CLIENT_LABEL_WIRED":"UNIFI_DEVICE_CLIENT_LABEL_WIRELESS"})),i.a.createElement(gp,{variant:"link",onClick:()=>t.push(d.replace(":mac",s))},b)):null,(()=>{switch(e.type){case xt.ClientType.WIRED:return p?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"UNIFI_DEVICE_CLIENT_LABEL_PORT"})),i.a.createElement(v.a,{color:"secondary",size:"body"},p)):null;case xt.ClientType.WIRELESS:return i.a.createElement(i.a.Fragment,null,m?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_SSID"})),i.a.createElement(v.a,{color:"secondary",size:"body"},m)):null,e.radio?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_BAND"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(xt.getWirelessClientRadioBand)(e))):null,e.channel?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.channel)):null,e.signal?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_SIGNAL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.signal," ",i.a.createElement(R.b,{id:"COMMON_UNIT_DBM"}))):null,e.radio_proto?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WIFI_STANDARD"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(xt.getWirelessClientWifiStandard)(e))):null,e.mimo?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_MIMO"})," ",i.a.createElement(R.b,{id:"COMMON_CONF"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(xt.getWirelessClientMimo)(e))):null,i.a.createElement(Op,{mac:a,props:["tx_rate"]},({tx_rate:e=0})=>e>0?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_RX_RATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(aa.c)(1e3*e/8,"bitrate","SI"))):null),i.a.createElement(Op,{mac:a,props:["rx_rate"]},({rx_rate:e=0})=>e>0?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"CLIENT_HEADER_TX_RATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(aa.c)(1e3*e/8,"bitrate","SI"))):null));default:return null}})(),!E&&m?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WIFI"})),i.a.createElement(v.a,{color:"secondary",size:"body"},m)):null,i.a.createElement(Op,{mac:a,props:["rx_packets","rx_bytes"]},({rx_packets:e=0,rx_bytes:t=0})=>e&&t?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_DOWN_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null==e?void 0:e.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",size:"body",input:t,color:"secondary"}))):null),i.a.createElement(Op,{mac:a,props:["tx_packets","tx_bytes"]},({tx_packets:e=0,tx_bytes:t=0})=>e&&t?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_UP_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null==e?void 0:e.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",size:"body",input:t,color:"secondary"}))):null),i.a.createElement(Op,{mac:a,props:["uptime"]},({uptime:e=null})=>e?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(ru.a)(e))):null),i.a.createElement(Op,{mac:a,props:["usage_bytes"]},({usage_bytes:e=null})=>e?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"UNIFI_DEVICE_CLIENT_LABEL_ACTIVITY_24_HOURS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(ta.a,{size:"body",type:"bytes",input:e}))):null))};var Dp={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"CLIENT_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:({activeItem:e,history:t})=>i.a.createElement(le.f,{padding:"32px 32px 0",flexDirection:"column",justifyContent:"space-between"},i.a.createElement(Tp,{activeItem:e}),i.a.createElement(vp,{product_line:e.product_line}),e.type===xt.ClientType.WIRELESS&&i.a.createElement(fp,{activeItem:e}),i.a.createElement(Rp,{activeItem:e,history:t}))},insights:{path:"/insights",title:"CLIENT_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:qa,subpanel:{path:"/:subPanel",component:za}},settings:{path:"/settings",title:"CLIENT_PROPERTY_HEADER_SETTINGS",icon:f.S,component:vn}}},Sp={default:jt.a.OVERVIEW,singlePanel:!0,panels:{overview:{path:"/overview",component:({activeItem:e})=>i.a.createElement(S.a,{padding:"26px 32px",flexDirection:"column",height:"100%"},e.ip?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_IP_ADDRESS"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.ip)):null,e.assoc_time?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WORD_UPTIME"})),i.a.createElement($t.a,{startTimestamp:e.assoc_time})):null,i.a.createElement(na.a,{client:e,props:["tx_packets","tx_bytes"]},({tx_packets:e=0,tx_bytes:t=0})=>e&&t?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_DOWN_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null==e?void 0:e.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",size:"body",input:t,color:"secondary"}))):null),i.a.createElement(na.a,{client:e,props:["rx_packets","rx_bytes"]},({rx_packets:e=0,rx_bytes:t=0})=>e&&t?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_ACTIVITY_UP_PKTS_BYTES"})),i.a.createElement(v.a,{color:"secondary",size:"body"},null==e?void 0:e.toLocaleString()," / ",i.a.createElement(ta.a,{type:"bytes",size:"body",input:t,color:"secondary"}))):null))}}},yp=({activeItem:{has_temperature:e,overheating:t,general_temperature:a}})=>e?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_LABEL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(i.a.Fragment,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_VALUE",values:{temperature:a}}),t&&i.a.createElement(rn.a,{message:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_TEMPERATURE_OVERHEATING"}),width:180,position:"left",className:"ml-1",style:{display:"inline-block",verticalAlign:"text-bottom"}},i.a.createElement(f.a,{style:{color:Oa.a["color-danger"]}}))))):null,Pp=({activeItem:e})=>{const{has_fan:t,fan_level:a}=e,n=a>=(l=e,"alwayson"===Object(Ce.getDeviceModelFeature)(l,"fan")?0:1);var l;return t&&(e=>"simple"===Object(Ce.getDeviceModelFeature)(e,"fan"))(e)?i.a.createElement(i.a.Fragment,null,i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_FAN_LEVEL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},n?a:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_FAN_OFF"}))),i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_FAN_STATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},n?i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_FAN_ON"}):i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_FAN_OFF"})))):null},Ap=({switchDeviceData:{power_source_voltage:e},switchDeviceData:t})=>{const a=(n=t)&&n.port_table?n.port_table.reduce((e,t)=>e+parseFloat(Object(ol.a)(t,"poe_power","0.0")),0):0;var n;return i.a.createElement(S.a,{height:"100%",flexDirection:"column"},e&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POE_POWER_SOURCE_VOLTAGE_LABEL"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POE_POWER_SOURCE_VOLTAGE_VALUE",values:{voltage:e}}))),i.a.createElement(yp,{activeItem:t}),i.a.createElement(Pp,{activeItem:t}),i.a.createElement(Qn,{activeItem:t}),i.a.createElement(tl,{activeItem:t}),i.a.createElement(il,{activeItem:t}),a>0&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POE_POWER_CONSUMPTION_LABEL"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POE_POWER_CONSUMPTION_VALUE",values:{power:a.toFixed(2)}}))))};const Np=Object(r.c)("div")`
  display: flex;
  height: 100%;
  flex-direction: column;
`,jp=Object(r.c)(oe.a)`
  padding: 0;
  margin: 0;
  height: initial;
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  font-weight: normal;
  line-height: ${({theme:e})=>e.fontSizes[2]}px;
`;function xp({switchDeviceData:e,showSimplifiedActivity:t,params:a,path:l,history:r}){const c=Object(o.useSelector)(Ce.selectDevicesData),{site:s,page:E,subPage:m}=a,{speed:d,rx_packets:_,rx_bytes:b,tx_packets:p,tx_bytes:O,port_idx:I,"rx_bytes-r":g,"tx_bytes-r":h}=Object(Ce.getUplinkAttrs)(e)||{},T=Object(o.useSelector)(t=>Object(Ce.getUplink)(Object(Ce.selectDevicesData)(t),e)),f=Object(Ce.getUplinkRemotePort)(c,e),D=Object(Ce.getUplinkDisplayName)(e,T),S=Object(o.useDispatch)();return i.a.createElement(Np,null,i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_UPLINK"})),(null==T?void 0:T.mac)?i.a.createElement(jp,{variant:"link",onClick:e=>{e.preventDefault(),e.stopPropagation();const t=Object(n.i)(l,{id:T.mac,site:s,page:E,panel:jt.a.OVERVIEW,subPage:m});r.push(t),S(Object(C.g)({type:u.c.DEVICE,mac:T.mac}))}},D):i.a.createElement(R.b,{id:"COMMON_HYPHEN"})),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_PORT"})),i.a.createElement(v.a,{size:"body"},I)),i.a.createElement(zl,{portSpeed:d}),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_POWER"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:(null==f?void 0:f.poe_power)||0}}))),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_DOWN_PKTS_BYTES"})),i.a.createElement(v.a,{size:"body"},_&&b?i.a.createElement(i.a.Fragment,null,i.a.createElement(ta.a,{type:"number",input:_,size:"body"})," / ",Object(aa.c)(b)):"- / -")),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_UP_PKTS_BYTES"})),i.a.createElement(v.a,{size:"body"},p&&O?i.a.createElement(i.a.Fragment,null,i.a.createElement(ta.a,{type:"number",input:p,size:"body"})," / ",Object(aa.c)(O)):"- / -")),t?i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_ACTIVITY"})),i.a.createElement(ta.a,{size:"body",type:"bytes",input:h+g||0,options:"bitrate"})):i.a.createElement(i.a.Fragment,null,i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_DOWN_ACTIVITY"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(ta.a,{type:"bytes",input:g||0,options:"bitrate",size:"body"}))),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_UP_ACTIVITY"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(ta.a,{type:"bytes",input:h||0,options:"bitrate",size:"body"})))))}const Lp=Object(r.c)(v.a)`
  margin-bottom: 8px;
`,Vp=Object(r.c)(v.a)`
  margin-top: 16px;
  margin-bottom: 8px;
`;var Mp=({activeItem:e})=>{const t=Object(Ce.getIsUsl8Mp)(e),a=[Object(Ce.getPsuInternalBattery)(e),Object(Ce.getPsuExternalBattery)(e)];return i.a.createElement(i.a.Fragment,null,a.map(e=>i.a.createElement("div",{key:e.index},Object(Ce.getIsPsuInternalBattery)(e)?i.a.createElement(Lp,{size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_BATTERY_TYPE_INTERNAL"})):i.a.createElement(Vp,{size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_BATTERY_TYPE_EXTERNAL"})),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY_STATUS"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:e.charge_status?"DEVICE_BATTERY_STATE_"+e.charge_status.replace(" ","_").toUpperCase():"DEVICE_STATE_UNKNOWN"}))),e.capacity&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY_CAPACITY"})),i.a.createElement(v.a,{size:"body"},i.a.createElement("span",{style:{color:Vt.a.getGradientColor(e.capacity/100)}},e.capacity,"%"))),!t&&e.technology&&"Unknown"!==e.technology&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY_TYPE"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_USW_MC_PSU_BATTERY_TYPE_"+e.technology.replace("-","_").toUpperCase()}))),(e.energy_full_design||e.charge_full_design)&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY_STORAGE"})),i.a.createElement(v.a,{size:"body"},e.energy_full_design?i.a.createElement(R.b,{id:"COMMON_UNIT_WATT_HOURS",values:{value:e.energy_full_design}}):i.a.createElement(R.b,{id:"COMMON_UNIT_AMPERE_HOURS",values:{value:e.charge_full_design}}))),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_POWER_USAGE"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:Number(e.power).toFixed(1)}}))),!t&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_CURRENT"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:Number(e.current).toFixed(1)}}))),!t&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_VOLTAGE"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:Number(e.voltage).toFixed(1)}}))),!!e.time_to_empty_avg&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY_TIME"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(ta.a,{type:"uptime",size:"body",input:e.time_to_empty_avg}))),e.installation_time&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY_INSTALLATION_DATE"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(ta.a,{type:"uptime",size:"body",input:e.installation_time}))),e.health&&i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY_HEALTH_STATUS"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_USW_MC_PSU_HEALTH_"+e.health.replace(" ","_").toUpperCase()}))))))};const wp=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.spacing["spacing-xxxxl"]};
`;var Fp=i.a.memo(({activeItem:e,...t})=>{var a,n;const r=null===(a=null==e?void 0:e.uplink)||void 0===a?void 0:a.type,c=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]),o=r&&(r===Ce.UplinkType.WIRE?"DEVICE_CONNECTION_WIRED":"DEVICE_CONNECTION_WIRELESS");return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),c&&i.a.createElement(wp,{variant:"secondary",items:[{id:"clients",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_HEADER_CLIENTS_AND_GUESTS"}),renderContent:()=>i.a.createElement(Rc,Object.assign({hideSignalTab:!0,activeItem:e},t))},{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),renderContent:()=>i.a.createElement(Ap,{switchDeviceData:e})},...(null===(n=e.psu_table)||void 0===n?void 0:n.length)?[{id:"powerSource",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POWER_SOURCE"}),renderContent:()=>i.a.createElement(ob,{activeItem:e})},{id:"battery",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_BATTERY"}),renderContent:()=>i.a.createElement(Mp,{activeItem:e})}]:[],{id:"uplink",label:i.a.createElement(i.a.Fragment,null,i.a.createElement(R.b,{id:"DEVICE_HEADER_UPLINK"}),o&&i.a.createElement(i.a.Fragment,null,"(",i.a.createElement(R.b,{id:o}),")")),renderContent:()=>i.a.createElement(xp,Object.assign({switchDeviceData:e,showSimplifiedActivity:!0},t))},{id:"downlink",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_DOWNLINK"}),renderContent:()=>i.a.createElement(Tm,Object.assign({activeItem:e},t))}],multiOpen:!0,renderOnlyExpandedContent:!0}))});const Up=Object(r.c)(S.a)`
  position: relative;
  border-bottom: 4px;
`,kp=Object(r.c)(S.a)`
  margin-bottom: 16px;
  svg g:nth-child(2) {
    transform: translate(58px, 53px) !important;
  }
  g {
    > circle {
      transform: rotateX(180deg) rotateY(180deg);
    }
    text:nth-child(1) {
      font-size: 24px;
    }
    text:nth-child(2) {
      font-weight: 900;
    }
    circle:nth-child(2) {
      stroke: ${({theme:e})=>e.motifPalette.ui03};
    }
  }
`,Wp=Object(r.c)("div")`
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: ${({theme:e})=>e.motifPalette.ui04};
`,Bp=Object(r.c)("div")`
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: ${({theme:e})=>e.motifPalette.ui04};
`,zp=Object(r.c)(v.a)`
  margin: 14px 0px;
`;var Hp=({activeItem:e})=>{const{total:t,outlets:a,internalBattery:n,externalBattery:l}=Object(Ce.getPsuUtilization)(e);return i.a.createElement(Up,{flexFlow:"wrap"},i.a.createElement(Wp,null),i.a.createElement(Bp,null),i.a.createElement(kp,{flexDirection:"column",flex:"1 1 50%",alignItems:"center"},i.a.createElement(zp,{size:"body",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_TOTAL"})),i.a.createElement(Ra.a,{title:t.usedPowerPercentage+"%",description:`${t.usedPower}/${t.maxPower}W`,size:116,items:[{id:"free",color:t.statusColor,value:t.usedPowerPercentage},{id:"used",color:Oa.a["white-6"],value:100-t.usedPowerPercentage}]})),i.a.createElement(kp,{flexDirection:"column",flex:"1 1 50%",alignItems:"center"},i.a.createElement(zp,{size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POWER_UTILIZATION_OUTLETS"})),i.a.createElement(Ra.a,{title:a.usedPowerPercentage+"%",description:`${a.usedPower}/${a.maxPower}W`,size:116,items:[{id:"free",color:a.statusColor,value:a.usedPowerPercentage},{id:"used",color:Oa.a["white-6"],value:100-a.usedPowerPercentage}]})),i.a.createElement(kp,{flexDirection:"column",flex:"1 1 50%",alignItems:"center"},i.a.createElement(zp,{size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_BATTERY_TYPE_INTERNAL"})),i.a.createElement(Ra.a,{title:n.usedPowerPercentage+"%",description:`${n.usedPower}/${n.maxPower}W`,size:116,items:[{id:"used",color:n.statusColor,value:n.usedPowerPercentage},{id:"free",color:Oa.a["white-6"],value:100-n.usedPowerPercentage}]})),i.a.createElement(kp,{flexDirection:"column",flex:"1 1 50%",alignItems:"center"},i.a.createElement(zp,{size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_BATTERY_TYPE_EXTERNAL"})),i.a.createElement(Ra.a,{title:l.usedPowerPercentage+"%",description:`${l.usedPower}/${l.maxPower}W`,size:116,items:[{id:"used",color:l.statusColor,value:l.usedPowerPercentage},{id:"free",color:Oa.a["white-6"],value:100-n.usedPowerPercentage}]})))},Gp=({activeItem:e})=>{const t=Object(o.useDispatch)();return Object(l.useEffect)(()=>{t(Object(zn.fetchDeviceUsageReport)(e.mac))},[e.mac,t]),i.a.createElement(si,{gwMac:e.mac,keys:["mem","cpu"],pickDatumsWithKey:"sw",heading:"DEVICE_GATEWAY_USAGE_STAT_CHART_HEADER"})};const $p=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`;const Yp=Object(r.c)("div")`
  display: grid;
  grid-template-columns: repeat(4, minmax(min-content, 1fr));
  grid-gap: 0 15px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid ${({theme:e})=>e.motifPalette.ui04};
`,Xp=Object(r.c)("div")`
  padding-bottom: 6px;
  padding-top: 6px;
  font-size: 9px;
  color: ${({theme:e})=>e.motifPalette.text02};
  display: flex;
  align-items: center;
  flex: 0 0 25%;
  max-width: 25%;

  > span {
    white-space: nowrap;
    margin-left: 4px;
  }
`,Kp=Object(r.c)(Gt.a,{shouldForwardProp:e=>"background"!==e})`
  background-color: ${e=>e.background};
  border-radius: 1px;
`;var Zp=i.a.memo(({isForDiagram:e,deviceData:t})=>{const a=Object(b.Be)(t),n=Object(b.eb)(t),l=Object(b.Ce)(t),r=Object(Ta.n)();return i.a.createElement(Yp,null,i.a.createElement(Xp,null,i.a.createElement(Kp,{variant:"success"}),i.a.createElement(v.a,{size:"label",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_ENABLED"}))),i.a.createElement(Xp,null,i.a.createElement(Kp,{background:r.motifPalette.neutral04}),i.a.createElement(v.a,{size:"label",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_OUTLET_STATE_DISABLED"}))),(a||l)&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Xp,null,i.a.createElement(Kp,{variant:"warning"}),i.a.createElement(v.a,{size:"label",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PORT_STATE_MBPS",values:{speed:"100/10"}})))),(n||l)&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Xp,null,i.a.createElement(f.Tb,{width:12,height:12}),i.a.createElement(v.a,{size:"label",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_OUTLET_STATE_DELIVERING"}))),i.a.createElement(Xp,null,i.a.createElement(f.a,{width:12,height:12}),i.a.createElement(v.a,{size:"label",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_OUTLET_STATE_WARNING"}))),i.a.createElement(Xp,null,i.a.createElement(Kp,{variant:"danger"}),i.a.createElement(v.a,{size:"label",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_OUTLET_STATE_ERROR"})))),l&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Xp,null,i.a.createElement(f.Ub,{width:16,height:16}),i.a.createElement(v.a,{size:"label",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_OUTLET_STATE_HIGH_PRIORITY"})))),(a||n||l)&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Xp,null,i.a.createElement(Kp,{background:r.motifPalette.neutral07}),i.a.createElement(v.a,{size:"label",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PORT_STATE_DISCONNECTED"})))))});const qp=Object(r.c)(rn.a,{shouldForwardProp:e=>!["cellSize","isEnabled","marginSize"].includes(e)})`
  width: ${({cellSize:e})=>e||"20px"};
  height: ${({cellSize:e})=>e||"20px"};
  align-items: center;
  background-color: ${({isEnabled:e,theme:t})=>e?t.motifPalette.success:Oa.a["grey-4"]};
  border-radius: 2px;
  color: #fff;
  justify-content: center;
  display: flex;
  position: relative;

  &:not(:first-child) {
    margin-left: ${({marginSize:e})=>e||"10px"};
  }

  div:last-child {
    right: -15px;
  }
`,Jp=r.a`
  margin-left: 15px;
`,Qp=Object(r.c)("div",{shouldForwardProp:e=>"rotateIcon"!==e})`
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  svg {
    transform: rotate(${({rotateIcon:e})=>e?"-90deg":0});
    max-width: 70%;
    max-height: 70%;
  }
`,eO=Object(r.c)(f.Gc)`
  max-width: 100% !important;
  max-height: 100% !important;
`,tO=Object(r.c)(v.a)`
  margin-left: 6px;
`;var aO=({cellData:e,marginSize:t,cellSize:a,rotateIcon:l,tooltipPosition:r="bottomRight"})=>{const c=Object(n.k)(),{path:o}=Object(n.n)(),{site:s,page:E,id:m,panel:d}=Object(n.m)(),_=Object(_o.q)(e,"POWER_METER");return i.a.createElement(qp,{isEnabled:e.relay_state,tooltipClassName:Jp,marginSize:t,cellSize:a,onClick:t=>{var a,l;null===(a=null==t?void 0:t.preventDefault)||void 0===a||a.call(t),null===(l=null==t?void 0:t.stopPropagation)||void 0===l||l.call(t),c.push(Object(n.i)(o,{site:s,page:E,id:m,panel:d,subPanel:"outlets",subPanelId:e.index}))},message:_&&e.outletType===Ce.OutletType.STANDARD?i.a.createElement(S.a,{flexDirection:"column",justifyContent:"space-between"},i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},e.index)),i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_NAME"})),i.a.createElement(tO,{size:"caption",color:"secondary",truncate:!0},e.name)),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POWER"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:Number(e.outlet_power||0).toFixed(2)}}))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_ENERGY"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},"0.00 ",i.a.createElement(R.b,{id:"COMMON_UNIT_KWH"}))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_CURRENT"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:Number(e.outlet_current||0).toFixed(2)}}))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_VOLTAGE"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:Number(e.outlet_voltage||0).toFixed(2)}}))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POWER_FACTOR"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},Number(e.outlet_power_factor||0).toFixed(2)))):i.a.createElement(S.a,{flexDirection:"column",justifyContent:"space-between"},i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},e.index)),i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_NAME"})),i.a.createElement(tO,{size:"caption",color:"secondary",truncate:!0},e.name)),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_CTL_POWER_CYCLE_ENABLED"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},e.cycle_enabled?i.a.createElement(f.t,null):i.a.createElement(f.A,null))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_RELAY_STATE"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},e.relay_state?i.a.createElement(f.t,null):i.a.createElement(f.A,null)))),position:r,portal:!0,width:150},i.a.createElement(Qp,{rotateIcon:l},"usb"===e.outletType?i.a.createElement(eO,null):i.a.createElement(f.Fb,null)))};const nO=Object(r.c)(S.a)`
  font-size: ${({theme:e})=>e.fontSizes[0]}px;
`,lO=Object(r.c)(S.a)`
  &:not(:first-child) {
    margin-top: 10px;
  }
`,iO=Object(r.c)(f.cb)`
  margin-right: 12px;
`,rO=Object(r.c)("div")`
  width: 5px;
`;var cO=i.a.memo(({deviceData:e})=>{const{outletsDiagram:t,primaryOutletGroupCount:a}=Object(Ce.getDeviceSpecs)(e),n=Object(Ce.isUspPduPro)(e),l=t.length?Object(Ce.determineRowLayoutsFromOutletDiagramConfig)(t,e):Object(Ce.determineRowLayoutsFromOutletConfig)(a,e),r=Object(YE.a)(l.map(e=>e.length));let c=r>10?"3px":"10px";const o=r>10?"19px":"20px";return l&&0!==l.length?i.a.createElement(i.a.Fragment,null,l.map((t,a)=>i.a.createElement(lO,{"align-items":"flex-end",key:"OutletLayoutRow-"+(a+1)},t.map((t,l)=>{if(!t)return i.a.createElement(rO,{key:`OutletSpacer-${a+1}-${l+1}`});const r=`Outlet-${a+1}-${l+1}`,s=Object(Ce.getActiveOutletInfo)(e,void 0,t.outletNumber),E=t&&s&&{outletType:t.outletType,...s};return n&&1===a&&l>2&&(c="16px"),n&&1===a&&l>3&&(c="54px"),i.a.createElement(aO,{cellData:E,key:r,marginSize:c,cellSize:o,rotateIcon:t.rotateIcon})})))):i.a.createElement(nO,null,i.a.createElement(iO,{isActive:!0}),i.a.createElement(R.b,{id:"DEVICE_DIAGRAM_MISSING"}))},({deviceData:e},{deviceData:t})=>e.model===t.model&&e.outlet_table===t.outlet_table&&e.outlet_overrides===t.outlet_overrides);const oO=Object(r.c)("div")`
  padding: 24px 32px;
  display: flex;
  flex: none;
  flex-direction: column;
`,sO=Object(r.c)("div")`
  margin-top: 1px;
  margin-left: 10px;
`,EO=Object(r.c)("div")`
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid ${({theme:e})=>e.motifPalette.ui04};

  div:first-child {
    margin-bottom: 12px;
  }
`,mO=Object(r.c)(f.a)`
  color: ${({theme:e})=>e.motifPalette.warning};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`,dO=Object(r.c)(f.r)`
  color: ${({theme:e})=>e.motifPalette.success};
  height: 18px;
  width: 18px;
  margin-right: 10px;
`;var _O=({deviceData:e,hidePorts:t})=>{const{usedPower:a,maxPower:l}=Object(Ce.getUspPduOutletUtilization)(e),r=Object(n.k)();return i.a.createElement(oO,null,i.a.createElement(S.a,{justifyContent:"center"},i.a.createElement("div",null,i.a.createElement(cO,{deviceData:e})),e.port_table&&!t&&i.a.createElement(sO,null,i.a.createElement(JE,{deviceData:e,portSizeOverride:"19px",history:r}))),i.a.createElement(Zp,{isForDiagram:!0,deviceData:e}),a>l&&i.a.createElement(EO,null,i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(mO,null),i.a.createElement(v.a,{size:"caption"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_WARNING"}))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(dO,null),i.a.createElement(v.a,{size:"caption"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_POWER_OVERLOAD_INFO"})))))};const uO=Object(r.c)("div")`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  padding-left: 10px;
`,bO=Object(r.c)("div")`
  table {
    tr {
      cursor: pointer;
    }
  }
`,pO=Object(r.c)(f.g)`
  position: absolute;
  right: 8px;
  color: inherit;
`;var OO=i.a.memo(({deviceData:e,deviceData:{outlet_table:t},hidePorts:a})=>{const r=Object(n.k)(),{path:c}=Object(n.n)(),{site:o,page:s,id:E,panel:m}=Object(n.m)(),d=Object(Ce.getOutletNumbers)(e),{outletsDiagram:_,primaryOutletGroupCount:u}=Object(Ce.getDeviceSpecs)(e),b=null==t?void 0:t.some(e=>Object(_o.q)(e,"POWER_METER")),p=Object(l.useMemo)(()=>(e=>[{id:"name",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_NAME"})),renderCell:({name:e})=>i.a.createElement(v.a,{color:"inherit",size:"body",truncate:!0},e)},...e?[{id:"power",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_POWER"})),renderCell:({outlet_power:e})=>i.a.createElement(v.a,{color:"inherit",size:"body"},e?Number(e).toFixed(2):"-")}]:[],{id:"outletStatus",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_STATUS"})),renderCell:e=>i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{alignItems:"center"},e.portStatus?i.a.createElement(v.a,{color:"inherit",size:"body"},e.portStatus):i.a.createElement(i.a.Fragment,null,i.a.createElement(aO,{cellData:e,rotateIcon:e.rotateIcon,tooltipPosition:"topRight"}),i.a.createElement(uO,null,i.a.createElement(R.b,{id:e.relay_state?"DEVICE_OUTLET_STATE_ENABLED":"DEVICE_OUTLET_STATE_DISABLED"})))),i.a.createElement(pO,{size:"small"}))}])(b),[b]),O=_.length?Object(Ce.determineRowLayoutsFromOutletDiagramConfig)(_,e):Object(Ce.determineRowLayoutsFromOutletConfig)(u,e),I=Object(l.useMemo)(()=>Object(Hm.c)(e,[],{position:"topRight"}),[e]),g=Object(l.useMemo)(()=>[...O.flat().filter(e=>!!e).sort(({outletNumber:e},{outletNumber:t})=>e-t),...a?[]:I],[a,I,O]).map((t,a)=>{const n=Object(Ce.getActiveOutletInfo)(e,t.outletNumber-1);return{...t.portStatus?t:n,id:t.portStatus?"port-"+t.id:t.outletNumber+a,outletType:t.portStatus?null:Object(Ce.getOutletTypeByNumber)(d,t.outletNumber),rotateIcon:null==t?void 0:t.rotateIcon}});return i.a.createElement(bO,null,i.a.createElement(Da.a,{columns:p,rowHeight:35,disableColumnFilters:!0,items:g,hideCellOverflow:!1,onRowClick:e=>r.push(Object(n.i)(c,{site:o,page:s,id:E,panel:m,subPanel:e.index?"outlets":"ports",subPanelId:e.index?e.index:e.port_idx}))}))},({deviceData:e},{deviceData:t})=>e.model===t.model&&e.outlet_table===t.outlet_table&&e.outlet_overrides===t.outlet_overrides),IO=({activeItem:e,hidePorts:t,...a})=>i.a.createElement(i.a.Fragment,null,i.a.createElement(OO,Object.assign({deviceData:e,hidePorts:t},a)));const gO=Object(r.c)(S.a)`
  padding: 0 32px;
  li:nth-child(3) {
    > div:last-child {
      margin: 0 -32px; // allow outlet diagram overflow accordion
    }
  }
`,CO=Object(r.c)("div")`
  margin-bottom: 16px;
`,hO=Object(r.c)("div")`
  padding: 0 32px;
  margin-bottom: 32px;
`;var TO=Object(Qa.compose)(Ja(["general","lcmScreen","services","network"]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r,intl:c,...s})=>{const E=Object(o.useSelector)(_i),m=Object(o.useSelector)(ui),d=Object(o.useSelector)(bi),{_id:_,mac:u}=e,b=Object(o.useDispatch)(),p=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,p&&i.a.createElement(om,{deviceData:e}),i.a.createElement(gO,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),openByDefault:!0,renderContent:()=>i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"ports",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_PORTS"}),renderContent:()=>i.a.createElement(HE,{activeItem:e})},{id:"outlets",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_OUTLETS"}),renderContent:()=>i.a.createElement(i.a.Fragment,null,i.a.createElement(CO,null,i.a.createElement(_O,{hidePorts:!0,deviceData:e})),i.a.createElement(hO,null,i.a.createElement(IO,{hidePorts:!0,activeItem:e})))},{id:"lcmScreen",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>i.a.createElement(Fu,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Ro,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:n,isInvalid:r,onFormSubmit:()=>{const e=Object.entries(E).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{}),{lcm:t,...a}=e;b(Object(Ce.updateDeviceWithIdEndpoint)(a,_,u,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(m).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{Object.values(d).forEach(e=>{"function"==typeof e&&e()})}}))});const vO=Object(r.c)(S.a)`
  position: relative;
  margin: -18px -30px 25px;
  padding-bottom: 12px;
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};

  svg {
    position: absolute;
    left: 24px;
  }
`,fO=Object(r.c)(v.a)`
  width: 100%;
  text-align: center;
  padding: 0 50px;
`,RO=Object(r.c)(S.a)`
  padding: 30px;
`,DO=Object(r.c)(S.a)`
  margin-bottom: 24px;
`,SO=Object(r.c)(v.a)`
  display: flex;
`,yO=Object(r.c)(v.a)`
  margin-bottom: 3px;
`,PO=Object(r.c)(rn.a)`
  margin-left: 8px;
  margin-top: -2px;
`,AO=r.a`
  margin-left: 15px;
`,NO=Object(r.c)(oe.a)`
  margin-top: 12px;
  justify-content: flex-end;
`,jO=Object(Me.f)({mapPropsToValues:({outletInfo:{name:e,cycle_enabled:t,relay_state:a}})=>({name:e||"",cycle_enabled:t,relay_state:a}),validationSchema:en.a.object().shape({name:en.a.string().label("DEVICE_PROPERTIES_LABEL_NAME"),cycle_enabled:en.a.boolean(),relay_state:en.a.boolean()}),handleSubmit:(e,{props:{outletInfo:t,updateDeviceWithIdEndpoint:a,history:n,activeItem:l,activeItem:{mac:i,_id:r,outlet_overrides:c}}})=>{const o=Object(Ce.isUspPduPro)(l);a({outlet_overrides:[...c.filter(e=>e.index!==t.index),{index:t.index,...e}].map(a=>t.index===Object(Ce.getTwinOutletIndex)(a,o)?{...a,relay_state:e.relay_state}:a).sort((e,t)=>e.index-t.index)},r,i,{successToast:{icon:Ea.a.success,message:"DEVICE_OUTLET_FORM_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_OUTLET_FORM_SAVE_ERROR"},mergeAndOverrideKeys:["outlet_overrides"],extend:!0}).then(()=>{n.goBack()})}}),xO={updateDeviceWithIdEndpoint:Ce.updateDeviceWithIdEndpoint};var LO=Object(Qa.compose)(Object(o.connect)((e,{activeItem:t,params:{subPanelId:a}})=>({outletInfo:Object(Ce.getActiveOutletInfo)(t,void 0,+a)}),xO),jO)(({dirty:e,submitForm:t,outletInfo:a,resetForm:n,history:l,activeItem:r})=>{const c=Object(o.useDispatch)(),s=()=>{n(),l.goBack()},E=Object(Ce.isUspPduPro)(r),m=Object(Ce.getTwinOutletIndex)(a,E),d=Object(_o.q)(a,"POWER_METER");return i.a.createElement(i.a.Fragment,null,i.a.createElement(RO,{flexDirection:"column",width:"100%",height:"100%"},i.a.createElement(vO,{alignItems:"center"},i.a.createElement(f.f,{onClick:s,style:{cursor:"pointer"}}),i.a.createElement(fO,{color:"primary",size:"body",weight:"bold",truncate:!0},a.name)),i.a.createElement(DO,{flexDirection:"column",justifyContent:"space-between"},i.a.createElement(cn.a,{full:!0,name:"name",label:"DEVICE_PROPERTIES_LABEL_NAME"})),i.a.createElement(DO,{alignItems:"flex-start",justifyContent:"space-between"},i.a.createElement(S.a,{flexDirection:"column",flex:"0 1 65%"},i.a.createElement(SO,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_RELAY_STATE_LABEL"}),m&&i.a.createElement(PO,{position:"topRight",portal:!0,width:150,tooltipClassName:AO,message:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_TOOLTIP_LABEL_TWIN_RELAY_STATE",values:{index:m}})},i.a.createElement(f.cb,{isActive:!0}))),i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_RELAY_STATE_LABEL_DESCRIPTION"}))),i.a.createElement(cn.a,{type:"checkbox",name:"relay_state"})),i.a.createElement(DO,null,d&&i.a.createElement(S.a,{flexDirection:"column",align:"space-around",width:"100%",paddingLeft:"24px",paddingRight:"24px"},a.outlet_power&&i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(yO,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POWER"})),i.a.createElement(v.a,null,i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:Number(a.outlet_power).toFixed(2)}}))),!1,a.outlet_current&&i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(yO,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_CURRENT"})),i.a.createElement(v.a,null,i.a.createElement(R.b,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:Number(a.outlet_current||0).toFixed(2)}}))),a.outlet_voltage&&i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(yO,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_VOLTAGE"})),i.a.createElement(v.a,null,i.a.createElement(R.b,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:Number(a.outlet_voltage).toFixed(2)}}))),a.outlet_power_factor&&i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(yO,null,i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POWER_FACTOR"})),i.a.createElement(v.a,null,Number(a.outlet_power_factor).toFixed(2))))),i.a.createElement(DO,{alignItems:"flex-start",justifyContent:"space-between"},i.a.createElement(S.a,{flexDirection:"column",flex:"0 1 65%"},i.a.createElement(v.a,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_CTL_POWER_CYCLE"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_CTL_POWER_CYCLE_DESCRIPTION"}))),i.a.createElement(cn.a,{type:"checkbox",name:"cycle_enabled"})),i.a.createElement(DO,{flexDirection:"column"},i.a.createElement(v.a,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_MANUAL_POWER_CYCLE"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_MANUAL_POWER_CYCLE_DESCRIPTION"})),i.a.createElement(NO,{variant:"link",onClick:()=>c(Object(Ce.powerCycleOutlet)(r,a)),Icon:i.a.createElement(f.Sb,null)},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_POWER_CYCLE"})))),i.a.createElement(Ci.a,{isDirty:e,onFormSubmit:t,onFormCancel:s,allowCancel:!0}))}),VO={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:Fp},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:function({activeItem:e}){var t;const a=!!(null===(t=e.psu_table)||void 0===t?void 0:t.length);return i.a.createElement($p,{variant:"secondary",items:[...a?[{id:"powerUtilization",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_POWER_UTILIZATION"}),renderContent:()=>i.a.createElement(Hp,{activeItem:e}),openByDefault:a}]:[],{id:"stats",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_STATS"}),renderContent:()=>i.a.createElement(Gp,{activeItem:e}),openByDefault:!a}],multiOpen:!0,renderOnlyExpandedContent:!0})}},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:TO,subpanel:{path:"/:subPanel/:subPanelId",component:({params:e,activeItem:t,...a})=>"ports"===e.subPanel?i.a.createElement(vd,Object.assign({params:e,activeItem:t},a)):i.a.createElement(LO,Object.assign({params:e,activeItem:t},a))}}}};function MO({activeItem:e}){const{usedPower:t,totalCurrent:a}=Object(Ce.getUspPduOutletUtilization)(e),n=[{messageId:"DEVICE_HEADER_POWER_USAGE",value:i.a.createElement(i.a.Fragment,null,i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:t}}))},{messageId:"DEVICE_PROPERTY_OVERVIEW_ENERGY",value:i.a.createElement(i.a.Fragment,null,"0 ",i.a.createElement(R.b,{id:"COMMON_UNIT_KWH"}))},{messageId:"DEVICE_PROPERTY_OVERVIEW_CURRENT",value:i.a.createElement(i.a.Fragment,null,i.a.createElement(R.b,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:a}}))}];return i.a.createElement(S.a,{flexDirection:"column"},[Qn,tl].map(t=>i.a.createElement(t,{key:t.name,activeItem:e})),n.map(({messageId:e,value:t})=>i.a.createElement(la,{key:e},i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:e})),i.a.createElement(v.a,{size:"body"},t))))}const wO=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.spacing["spacing-xxxxl"]};
`;var FO=i.a.memo(({activeItem:e,...t})=>{const a=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),a&&i.a.createElement(wO,{variant:"secondary",items:[{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(MO,{activeItem:e})},{id:"uplink",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_UPLINK"}),renderContent:()=>i.a.createElement(xp,Object.assign({switchDeviceData:e,showSimplifiedActivity:!0},t))}],multiOpen:!0,renderOnlyExpandedContent:!0}))});const UO=Object(r.c)(f.b)`
  color: ${({theme:e})=>e.motifPalette.warning};
  margin-right: ${({theme:e})=>e.spacing["spacing-s"]};
  margin-bottom: 2px;
`;var kO=({activeItem:e})=>{const{usedPower:t,maxPower:a,usedPowerPercentage:n,barVariant:l}=Object(Ce.getUspPduOutletUtilization)(e),r="warning"===l;return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_TOTAL_WATTS"})),i.a.createElement(v.a,{size:"body",color:r?"warning":"secondary"},r&&i.a.createElement(UO,{size:"medium"}),i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_TOTAL_WATTS_VALUE",values:{sum:t,max:a}}))),i.a.createElement(gE.a,{items:[{value:n,variant:l}]}))};const WO=Object(r.c)(S.a)`
  padding: 16px 32px;
`,BO=Object(r.c)("div")`
  margin-bottom: 16px;
`;const zO=Object(r.c)(S.a)`
  padding: 16px 32px;
`;var HO=Object(Qa.compose)(Ja(["general","outlets","lcmScreen","network","services","manage"]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:l,intl:r,...c})=>{const s=Object(o.useSelector)(_i),E=Object(o.useSelector)(ui),m=Object(o.useSelector)(bi),{_id:d,mac:_}=e,u=Object(o.useDispatch)();return i.a.createElement(i.a.Fragment,null,i.a.createElement(_O,{deviceData:e}),i.a.createElement(zO,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),openByDefault:!0,renderContent:()=>i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"outlets",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_OUTLETS"}),renderContent:()=>i.a.createElement(IO,{activeItem:e})},{id:"lcmScreen",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>i.a.createElement(Fu,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Ro,{activeItem:e,setFormDirty:t,setFormInvalid:a,hideFlowControl:!0})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:n,isInvalid:l,onFormSubmit:()=>{const e=Object.entries(s).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{}),{lcm:t,...a}=e;u(Object(Ce.updateDeviceWithIdEndpoint)(a,d,_,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(E).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{Object.values(m).forEach(e=>{"function"==typeof e&&e()})}}))}),GO={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:FO},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:({activeItem:e})=>i.a.createElement(WO,{flexDirection:"column"},i.a.createElement(v.a,{weight:"bold",size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_HEADER_POWER_UTILIZATION"})),i.a.createElement(BO,null),i.a.createElement(kO,{activeItem:e}))},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:HO,subpanel:{path:"/:subPanel/:subPanelId",component:({params:e,...t})=>"ports"===e.subPanel?i.a.createElement(vd,Object.assign({params:e},t)):i.a.createElement(LO,Object.assign({params:e},t))}}}};const $O=Object(r.c)(rn.a,{shouldForwardProp:e=>"itemCount"!==e})`
  > div {
    height: ${({itemCount:e})=>`calc(24px + ${14*e}px)`};
    padding: 8px 0 8px 8px;
    max-height: 108px;
  }
`,YO=Object(r.c)(S.a)`
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  &::-webkit-scrollbar-thumb {
    background-color: ${({theme:e})=>e.motifPalette.ui11};
  }
`;var XO=({wifiNetworkNames:e})=>e.length?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_WIFI_NETWORK"})),i.a.createElement(v.a,{color:"secondary",size:"body"},e.length>1?i.a.createElement($O,{itemCount:e.length,message:i.a.createElement(YO,{flexDirection:"column"},e.map(e=>i.a.createElement(v.a,{key:e},e))),position:"top",width:146,isInteractive:!0},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_WIFI_NETWORK_COUNT",values:{count:e.length}})):e[0])):null;function KO({activeItem:e}){const t=Object(o.useSelector)(Ac),a=Object(Pc.getWifiNetworkNames)(t,!1),n=Object(l.useMemo)(()=>[{Comp:Qn,key:"Uptime"},{Comp:tl,key:"MemoryUsage"},{Comp:XO,props:{wifiNetworkNames:a},key:"WiFiNetwork"}],[a]);return i.a.createElement(S.a,{flexDirection:"column"},n.map(({Comp:t,props:a={},key:n})=>i.a.createElement(t,Object.assign({key:n,activeItem:e},a))))}const ZO=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`;var qO=({activeItem:e})=>{const t=Object(o.useDispatch)();return Object(l.useEffect)(()=>{t(Object(zn.fetchDeviceUsageReport)(e.mac))},[e.mac,t]),i.a.createElement(si,{gwMac:e.mac,keys:["mem"],pickDatumsWithKey:"ap",heading:"DEVICE_GATEWAY_USAGE_STAT_CHART_HEADER"})};const JO=Object(r.c)(S.a)`
  padding: 16px 32px;
`,QO=Object(r.c)("div")`
  margin-bottom: 16px;
`;const eI=Object(r.c)(S.a)`
  margin-bottom: 24px;
  justify-content: space-between;
`,tI=Object(r.c)(oe.a)`
  margin-top: 12px;
  justify-content: flex-end;
`;var aI=Object(Me.f)({mapPropsToValues:({activeItem:{name:e,mac:t,outlet_table:a=[],outlet_overrides:n=[]}})=>({name:e!==t?e:"",outlet_overrides:[{...a[0],...n[0]}]}),handleSubmit:(e,{resetForm:t})=>{t({values:e})}})(({activeItem:e,submitForm:t,values:a,dirty:n,isValid:r,resetForm:c,setFormDirty:s,setFormInvalid:E})=>{const m=Object(o.useDispatch)();return Object(l.useEffect)(()=>{s("general",n),E("general",!r)},[s,E,n,r]),Object(l.useEffect)(()=>(m(Object(C.h)({general:()=>a})),m(Object(C.j)({general:t})),m(Object(C.i)({general:c})),()=>{m(Object(C.h)({general:null})),m(Object(C.j)({general:null})),m(Object(C.i)({general:null}))}),[m,c,t,a]),i.a.createElement(S.a,{flexDirection:"column"},i.a.createElement(eI,{flexDirection:"column"},i.a.createElement(cn.a,{full:!0,name:"name",label:"DEVICE_PROPERTIES_LABEL_DEVICE_NAME"})),i.a.createElement(eI,{alignItems:"flex-start",justifyContent:"space-between"},i.a.createElement(S.a,{flexDirection:"column",flex:"0 1 65%"},i.a.createElement(v.a,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_RELAY_STATE_LABEL"})),i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_RELAY_STATE_LABEL_DESCRIPTION"}))),i.a.createElement(cn.a,{type:"checkbox",name:"outlet_overrides[0].relay_state"})),i.a.createElement(eI,{alignItems:"flex-start",justifyContent:"space-between"},i.a.createElement(S.a,{flexDirection:"column",flex:"0 1 65%"},i.a.createElement(v.a,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_CTL_POWER_CYCLE"})),i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_CTL_POWER_CYCLE_DESCRIPTION"}))),i.a.createElement(cn.a,{type:"checkbox",name:"outlet_overrides[0].cycle_enabled"})),i.a.createElement(eI,{flexDirection:"column"},i.a.createElement(S.a,{flexDirection:"column",width:"65%"},i.a.createElement(v.a,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_MANUAL_POWER_CYCLE"})),i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_MANUAL_POWER_CYCLE_DESCRIPTION"}))),i.a.createElement(tI,{variant:"link",onClick:()=>m(Object(Ce.powerCycleOutlet)(e,a.outlet_overrides[0])),Icon:i.a.createElement(f.Sb,null)},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_POWER_CYCLE"}))))});const nI=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`;var lI=Object(Qa.compose)(Ja(["general","network","screen","manage"]),R.e)(({activeItem:{mac:e,_id:t},activeItem:a,setFormDirty:n,setFormInvalid:l,isDirty:r,isInvalid:c,intl:s})=>{const E=Object(o.useDispatch)(),m=Object(o.useSelector)(_i),d=Object(o.useSelector)(ui),_=Object(o.useSelector)(bi);return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(nI,{variant:"secondary",items:[{id:"general",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),renderContent:()=>i.a.createElement(aI,{activeItem:a,setFormDirty:n,setFormInvalid:l})},{id:"screen",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LED"}),renderContent:()=>i.a.createElement(jo,{activeItem:a,setFormDirty:n,disableLedBrightnessField:!0,disableLedOverrideColor:!0})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:a,setFormDirty:n,setFormInvalid:l})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:a,disableDebug:!0})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:r,isInvalid:c,onFormSubmit:()=>{const a=Object.entries(m).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{});E(Object(Ce.updateDeviceWithIdEndpoint)(a,t,e,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(d).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{Object.values(_).forEach(e=>{"function"==typeof e&&e()})}}))}),iI={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:({activeItem:e})=>{const t=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),t&&i.a.createElement(ZO,{variant:"secondary",items:[{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(KO,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0}))}},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:({activeItem:e})=>i.a.createElement(JO,{flexDirection:"column"},i.a.createElement(v.a,{weight:"bold",size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_STATS"})),i.a.createElement(QO,null),i.a.createElement(qO,{activeItem:e}))},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:lI}}};const rI=Object(r.c)(S.a)`
  position: relative;
  margin: -18px -30px 25px;
  padding-bottom: 12px;
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  svg {
    position: absolute;
    left: 24px;
  }
`,cI=Object(r.c)(v.a)`
  width: 100%;
  text-align: center;
  text-transform: uppercase;
`,oI=Object(r.c)(S.a)`
  padding: 30px;
`,sI=Object(r.c)(S.a)`
  margin-bottom: 24px;
`,EI=Object(r.c)(v.a)`
  display: flex;
`,mI=Object(r.c)(Be.a)`
  margin-top: 12px;
  justify-content: flex-end;
`,dI=Object(Me.f)({mapPropsToValues:({outletInfo:{name:e,port_mode:t}})=>({name:e||"",portModeAuto:t===Ce.RpsPortMode.AUTO}),validationSchema:en.a.object().shape({name:en.a.string().label("DEVICE_PROPERTIES_LABEL_NAME"),portModeAuto:en.a.boolean()}),handleSubmit:({portModeAuto:e,...t},{props:{outletInfo:a,updateDeviceWithIdEndpoint:n,history:l,activeItem:{rps_override:i,mac:r,_id:c}}})=>{var o;const s=[{port_idx:a.port_idx,port_mode:e?Ce.RpsPortMode.AUTO:Ce.RpsPortMode.DISABLED,...t},...null!==(o=null==i?void 0:i.rps_port_table.filter(e=>e.port_idx!==a.port_idx))&&void 0!==o?o:[]];n({rps_override:{...i,rps_port_table:s}},c,r,{successToast:{icon:Ea.a.success,message:"DEVICE_OUTLET_FORM_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_OUTLET_FORM_SAVE_ERROR"},mergeAndOverrideKeys:["rps_override"],extend:!0}).then(()=>{l.goBack()})}}),_I={updateDeviceWithIdEndpoint:Ce.updateDeviceWithIdEndpoint};var uI=Object(Qa.compose)(Object(o.connect)((e,{activeItem:t,params:{subPanelId:a}})=>({outletInfo:Object(Ce.getActiveRpsOutletInfo)(t,+a)}),_I),dI)(({activeItem:e,dirty:t,submitForm:a,outletInfo:n,resetForm:l,history:r,setFieldValue:c,values:s})=>{const E=Object(o.useDispatch)(),m=()=>{l(),r.goBack()};return i.a.createElement(i.a.Fragment,null,i.a.createElement(oI,{flexDirection:"column",width:"100%",height:"100%"},i.a.createElement(rI,{alignItems:"center"},i.a.createElement(f.f,{onClick:m,style:{cursor:"pointer"}}),i.a.createElement(cI,{weight:"bold"},n.name)),i.a.createElement(sI,{flexDirection:"column",justifyContent:"space-between"},i.a.createElement(cn.a,{full:!0,name:"name",label:"DEVICE_PROPERTIES_LABEL_NAME"})),i.a.createElement(sI,{alignItems:"flex-start",justifyContent:"space-between"},i.a.createElement(S.a,{flexDirection:"column",flex:"0 1 65%"},i.a.createElement(EI,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_RELAY_STATE_LABEL"})),i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET_RELAY_STATE_LABEL_DESCRIPTION"}))),i.a.createElement(cn.a,{type:"checkbox",name:"portModeAuto"})),i.a.createElement(sI,{flexDirection:"column"},i.a.createElement(v.a,{color:"primary",size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RPS_PORT_RECOVERY"})),i.a.createElement(v.a,{size:"body",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RPS_PORT_RECOVERY_DESCRIPTION"})),i.a.createElement(mI,{variant:"link",disabled:!n.port_error_disabled,onClick:()=>E(Object(Ce.rpsPortRecovery)(e,n)),Icon:i.a.createElement(f.Sb,null)},i.a.createElement(R.b,{id:"DEVICE_ACTIONS_PORT_RECOVERY"})))),i.a.createElement(Ci.a,{isDirty:t,onFormSubmit:a,onFormCancel:m,allowCancel:!0}))});function bI({activeItem:e}){const t=[{Comp:yp,key:"Temperature"},{Comp:Pp,key:"FanLevel"},{Comp:Qn,key:"Uptime"},{Comp:tl,key:"MemoryUsage"},{Comp:il,key:"LoadAverage"}];return i.a.createElement(S.a,{flexDirection:"column"},t.map(({Comp:t,key:a})=>i.a.createElement(t,{key:a,activeItem:e})))}const pI=Object(r.c)("div")`
  margin-bottom: 12px;
`,OI=["backup","delivering"];var II=({activeItem:e})=>{const t=Object(Ce.getRpsPortUtilization)(null==e?void 0:e.rps);return i.a.createElement(i.a.Fragment,null,t.map(e=>i.a.createElement(l.Fragment,{key:e.voltage},OI.map(t=>i.a.createElement(l.Fragment,{key:t},e[t].ports.map(a=>i.a.createElement(pI,{key:a.id},i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"body",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RPS_UTILIZATION_BAR_HEADING_"+t.toUpperCase(),values:{voltage:e.voltage,portId:a.id}})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_TOTAL_WATTS_VALUE",values:{sum:a.powerRequired,max:e[t].total}}))),i.a.createElement(gE.a,{items:[{variant:"primary",value:a.powerRequired/e[t].total*100}]}))))))))};const gI=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.spacing["spacing-xxxxl"]};
`;var CI=i.a.memo(({activeItem:e})=>{const t=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),t&&i.a.createElement(gI,{variant:"secondary",items:[{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(bI,{activeItem:e})},{id:"powerUtilization",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_POWER_UTILIZATION"}),renderContent:()=>i.a.createElement(II,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0}))});const hI=Object(r.c)(S.a)`
  padding: 0 32px;
`;var TI=Object(Qa.compose)(Ja(["general","outlets","screen","services","network","manage"]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:l,intl:r})=>{const c=Object(o.useSelector)(_i),s=Object(o.useSelector)(ui),E=Object(o.useSelector)(bi),{_id:m,mac:d}=(Object(Ce.isAdopted)(e),e),_=Object(o.useDispatch)(),u=Object(_o.l)(e),b=u?"lcmScreen":"screen";return i.a.createElement(i.a.Fragment,null,i.a.createElement(hI,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),openByDefault:!0,renderContent:()=>i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:b,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>u?i.a.createElement(Fu,{activeItem:e,setFormDirty:t,setFormInvalid:a}):i.a.createElement(jo,{activeItem:e,setFormDirty:t})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Ro,{activeItem:e,setFormDirty:t,setFormInvalid:a,hideFlowControl:!0})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:n,isInvalid:l,onFormSubmit:()=>{const e=Object.entries(c).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{}),{lcm:t,...a}=e;_(Object(Ce.updateDeviceWithIdEndpoint)(a,m,d,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(s).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{Object.values(E).forEach(e=>{"function"==typeof e&&e()})}}))});const vI=(e,t)=>Object.keys(t).filter(t=>parseInt(t,10)&e).map(e=>t[e]),fI={1:"RPS_PORT_12V_OUT_OF_BUDGET",2:"RPS_PORT_54V_OUT_OF_BUDGET",4:"RPS_PORT_12V_OVERLOAD",8:"RPS_PORT_54V_OVERLOAD",16:"RPS_PORT_POWER_DENIED_PSU_12V_OVERLOAD",32:"RPS_PORT_POWER_DENIED_PSU_54V_OVERLOAD",64:"RPS_PORT_BLOCKED"},RI={RPS_PORT_OUT_OF_BUDGET_SOLUTION:["RPS_PORT_12V_OUT_OF_BUDGET","RPS_PORT_54V_OUT_OF_BUDGET"],RPS_PORT_OVERLOAD_SOLUTION:["RPS_PORT_12V_OVERLOAD","RPS_PORT_54V_OVERLOAD"],RPS_PORT_POWER_DENIED_PSU_OVERLOAD_SOLUTION:["RPS_PORT_POWER_DENIED_PSU_12V_OVERLOAD","RPS_PORT_POWER_DENIED_PSU_54V_OVERLOAD"],RPS_PORT_BLOCKED_SOLUTION:["RPS_PORT_BLOCKED"]};var DI=a(2773);const SI=Object(r.c)(S.a)`
  padding: 10px 0;
`,yI=Object(r.c)("ul")`
  padding-left: 22px;
  margin-top: 6px;
  margin-bottom: 0;
  li {
    margin-bottom: ${({theme:e})=>e.spacing["spacing-xs"]};
    span {
      line-height: 16px;
    }
  }

  li:last-child {
    margin-bottom: 0;
  }
`,PI=Object(r.c)(f.r)`
  color: ${({theme:e})=>e.motifPalette.success};
  margin-right: 9px;
  width: 18px;
  height: 18px;
`,AI=Object(r.c)(f.a)`
  color: ${({theme:e})=>e.motifPalette.danger};
  margin-right: 9px;
  width: 18px;
  height: 18px;
`,NI=Object(r.c)("div")`
  margin: 20px 0;
`;var jI=Object(R.e)(({anomalies:e,intl:t})=>{const[a,n]=Object(l.useState)(!1),r=Object(l.useMemo)(()=>t.formatMessage({id:"COMMON_AND"}),[]),c=Object.keys(e).filter(t=>e[t].length),o=c.length;return i.a.createElement(i.a.Fragment,null,c.slice(0,a?o:2).map(t=>{const a=e[t];return i.a.createElement(S.a,{marginTop:4,flexDirection:"column"},i.a.createElement(SI,{flexDirection:"column"},i.a.createElement(S.a,{alignItems:"flex-start"},i.a.createElement(AI,null),i.a.createElement(v.a,null,i.a.createElement(DI.a,{weight:"bold",color:"danger"},i.a.createElement(R.b,{id:"RPS_ANOMALY_PROBLEM"})))),i.a.createElement(yI,null,a.map((e,t)=>{const a={ports:(n=e.values.ports,[n.slice(0,-1).join(", "),n.slice(-1)].filter(Boolean).join(` ${r} `)),count:e.values.ports.length};var n;return i.a.createElement("li",{key:`rps-problem-${e.problem}-${a.count}`},i.a.createElement(R.b,{id:e.problem+"_PROBLEM",values:a}))}))),i.a.createElement(SI,{flexDirection:"column"},i.a.createElement(S.a,{alignItems:"flex-start"},i.a.createElement(PI,null),i.a.createElement(v.a,null,i.a.createElement(DI.a,{weight:"bold",color:"success"},i.a.createElement(R.b,{id:"RPS_ANOMALY_SOLUTION"})))),i.a.createElement(yI,null,i.a.createElement("li",{key:"rps-solution-"+t},i.a.createElement(R.a,{id:t})))))}),i.a.createElement(NI,null,i.a.createElement(R.b,{id:"RPS_ANOMALY_FOOTER_RECORDS",values:{length:o>2&&!a?2:o,total:o}}),o>2?i.a.createElement(i.a.Fragment,null," ",i.a.createElement(oe.a,{type:"button",variant:"inline",size:"small",weight:"bold",onClick:()=>n(!a)},i.a.createElement(R.b,{id:"COMMON_SHOW"})," ",i.a.createElement(R.b,{id:a?"COMMON_LESS":"COMMON_ALL"}))):null))});const xI=Object(r.c)("div")`
  padding-top: 16px;
`;function LI({deviceData:e}){const t=((e,t,a)=>{var n,l;const i=Object.keys(a);return((null===(l=null===(n=null==e?void 0:e.rps)||void 0===n?void 0:n.anomalies_details)||void 0===l?void 0:l.map(e=>({problem:vI(e.anomaly,t)[0],values:{ports:e.ports}})))||[]).reduce((e,t)=>{const n=i.find(e=>a[e].includes(t.problem));return e[n]=e[n]||[],e[n].push(t),e},{})})(e,fI,RI);return Object.keys(t).length?i.a.createElement(xI,null,i.a.createElement(jI,{anomalies:t})):null}var VI=a(1657);const MI=Object(r.c)(rn.a,{shouldForwardProp:e=>"color"!==e&&"isTableItem"!==e})`
  width: ${({isTableItem:e})=>e?"20px":"90px"};
  height: 20px;
  align-items: center;
  background-color: ${({color:e,theme:t})=>t.motifPalette[e]};
  border-radius: 2px;
  color: #fff;
  justify-content: center;
  display: flex;
  position: relative;
  ${({isTableItem:e})=>e&&"margin-right: 8px;"}

  &:not(:first-child) {
    margin-left: 8px;
  }

  div:last-child {
    right: -15px;
  }
`,wI=r.a`
  margin-left: 15px;
`,FI=Object(r.c)("div")`
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  svg {
    max-width: 70%;
    max-height: 70%;
  }
`,UI=Object(r.c)(v.a)`
  max-width: 140px;
`;var kI=({cellData:e,isTableItem:t=!1,tooltipPosition:a="bottomRight"})=>{const l=Object(n.k)(),{path:r}=Object(n.n)(),{site:c,page:s,id:E,panel:m}=Object(n.m)(),d=Object(o.useSelector)(Ce.selectDevicesData),{peer:_}=e,u=d.find(e=>e.mac===(null==_?void 0:_.mac)),b=Object(L.c)(u),p=Object(L.a)(u)||(null==_?void 0:_.model),O=Object(Ce.getRspOutletIcons)(e),I=Object(Ce.getRspOutletColor)(e);return i.a.createElement(MI,{color:I,tooltipClassName:wI,onClick:t=>{var a,i;null===(a=null==t?void 0:t.preventDefault)||void 0===a||a.call(t),null===(i=null==t?void 0:t.stopPropagation)||void 0===i||i.call(t),l.push(Object(n.i)(r,{site:c,page:s,id:E,panel:m,subPanel:"rps_outlets",subPanelId:e.port_idx}))},width:u?240:200,isTableItem:t,message:i.a.createElement(S.a,{flexDirection:"column",justifyContent:"space-between",width:"100%"},i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_OUTLET"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},e.port_idx)),i.a.createElement(S.a,{justifyContent:"space-between",alignItems:"center"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_NAME"})),i.a.createElement(v.a,{size:"caption",color:"secondary",truncate:!0},null==e?void 0:e.name)),(null==e?void 0:e.port_mode)&&i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RPS_TOOLTIP_MODE"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},Object(kl.a)(e.port_mode))),(null==e?void 0:e.port_state)&&i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RPS_TOOLTIP_STATE"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RPS_TOOLTIP_VALUE_STATE_"+e.port_state.toUpperCase()}))),(null==e?void 0:e.up)&&Ce.RPS_VOLTAGES.map(t=>i.a.createElement("div",{key:t},i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary",weight:"bold"},i.a.createElement(R.b,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:t}}))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_CURRENT"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:e[`power_${t}v_current`]}}))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_VOLTAGE"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:e[`power_${t}v_voltage`]}}))),i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_POWER"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:e[`power_${t}v_power`]}}))))),(_||u)&&i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RPS_TOOLTIP_PEER"}))),(b||(null==_?void 0:_.hostname))&&i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_NAME"})),i.a.createElement(UI,{size:"caption",color:"secondary",truncate:!0},b||(null==_?void 0:_.hostname))),_.mac&&i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RPS_TOOLTIP_MAC"})),i.a.createElement(v.a,{size:"caption",color:"secondary"},_.mac)),p&&i.a.createElement(S.a,{justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_MODEL"})),i.a.createElement(UI,{size:"caption",color:"secondary",truncate:!0},p)),Ce.RPS_VOLTAGES.map(e=>i.a.createElement(S.a,{key:e,justifyContent:"space-between"},i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_RPS_TOOLTIP_PEER_POWER_REQUIRED",values:{voltage:e}})),i.a.createElement(v.a,{size:"caption",color:"secondary"},i.a.createElement(R.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:null==_?void 0:_[`power_required_${e}v`]}})))))),position:a,portal:!0},i.a.createElement(FI,null,e.port_mode!==Ce.RpsPortMode.DISABLED&&i.a.createElement(VI.a,{icons:O})))};const WI=Object(r.c)(f.g)`
  position: absolute;
  right: 8px;
  color: inherit;
`,BI=Object(r.c)("div")`
  table {
    tr {
      cursor: pointer;
    }
  }
`,zI=[{id:"name",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_NAME"})),renderCell:e=>i.a.createElement(v.a,{color:"inherit",size:"body"},e.name)},{id:"outletStatus",label:i.a.createElement(v.a,{size:"label",color:"inherit",weight:"bold"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_STATUS"})),renderCell:e=>{var t,a;const n="disabled"===e.port_mode?null===(t=null==e?void 0:e.port_mode)||void 0===t?void 0:t.toUpperCase():null===(a=null==e?void 0:e.port_state)||void 0===a?void 0:a.toUpperCase();return i.a.createElement(i.a.Fragment,null,i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(kI,{cellData:e,isTableItem:!0}),i.a.createElement(v.a,{color:"inherit",size:"body"},i.a.createElement(R.b,{id:n?"DEVICE_PROPERTIES_RPS_TOOLTIP_VALUE_STATE_"+n:"COMMON_WORD_INITIALIZING"}),!n&&i.a.createElement(v.a,{color:"inherit",size:"body"},"..."))),i.a.createElement(WI,{size:"small"}))}}];var HI=({deviceData:e,deviceData:{rps:t}})=>{const a=Object(n.k)(),{path:r}=Object(n.n)(),{site:c,page:o,id:s,panel:E}=Object(n.m)(),m=Object(l.useMemo)(()=>{var a;return null===(a=t.rps_port_table)||void 0===a?void 0:a.map(t=>{const a=Object(Ce.getActiveRpsOutletInfo)(e,t.port_idx);return{id:t.port_idx,...a}})},[t.rps_port_table,e]);return i.a.createElement(BI,null,i.a.createElement(Da.a,{columns:zI,rowHeight:35,items:m,disableColumnFilters:!0,hideCellOverflow:!1,onRowClick:e=>m.some(e=>e.port_state)&&a.push(Object(n.i)(r,{site:c,page:o,id:s,panel:E,subPanel:"rps_outlets",subPanelId:e.id}))}))};const GI=Object(r.c)(S.a)`
  font-size: ${({theme:e})=>e.fontSizes[0]}px;
`,$I=Object(r.c)(S.a)`
  &:not(:first-child) {
    margin-top: 8px;
  }
`,YI=Object(r.c)(f.cb)`
  margin-right: 12px;
`,XI=Object(r.c)("div")`
  width: 5px;
`;var KI=({deviceData:e})=>{const{rps:{diagram:t,primaryPortGroupCount:a}}=Object(Ce.getDeviceSpecs)(e),n=t.length?Object(Ce.determineRowLayoutsFromOutletDiagramConfig)(t,e):Object(Ce.determineRowLayoutsFromOutletConfig)(a,e);return n&&0!==n.length?i.a.createElement(i.a.Fragment,null,n.map((t,a)=>i.a.createElement($I,{justifyContent:"center",width:"100%",key:"RpsOutletLayoutRow-"+(a+1)},t.map((t,n)=>{if(!t)return i.a.createElement(XI,{key:`RpsOutletSpacer-${a+1}-${n+1}`});const l=`RpsOutlet-${a+1}-${n+1}`,r=Object(Ce.getActiveRpsOutletInfo)(e,t.outletNumber);return i.a.createElement(kI,{cellData:r,key:l})})))):i.a.createElement(GI,null,i.a.createElement(YI,{isActive:!0}),i.a.createElement(R.b,{id:"DEVICE_DIAGRAM_MISSING"}))};const ZI=Object(r.c)(S.a)`
  padding: 0 32px;
`,qI=Object(r.c)("div")`
  padding: 24px 32px;
  display: flex;
  flex: none;
  flex-direction: column;
`;var JI={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:CI},ports:{path:"/ports",title:"DEVICE_PROPERTY_HEADER_PORTS",icon:f.I,component:({activeItem:e})=>i.a.createElement(i.a.Fragment,null,i.a.createElement(qI,null,i.a.createElement(S.a,{flexDirection:"column",alignItems:"center"},i.a.createElement(KI,{deviceData:e})),i.a.createElement(Zp,{isForDiagram:!0,deviceData:e}),i.a.createElement(LI,{deviceData:e})),i.a.createElement(ZI,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(HI,{deviceData:e}))),subpanel:{path:"/:subPanel",component:uI}},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:TI,subpanel:{path:"/:subPanel/:subPanelId",component:uI}}}};function QI({activeItem:e}){const t=[{Comp:yp,key:"Temperature"},{Comp:Pp,key:"FanLevel"},{Comp:Qn,key:"Uptime"},{Comp:tl,key:"MemoryUsage"},{Comp:il,key:"LoadAverage"}];return i.a.createElement(S.a,{flexDirection:"column"},t.map(({Comp:t,key:a})=>i.a.createElement(t,{key:a,activeItem:e})))}const eg=Object(r.c)(Gt.a)`
  margin-right: 15px;
`;var tg=({activeItem:e})=>{const t=Object(Ce.getPsuExternalBattery)(e),a=Object(l.useMemo)(()=>(null==t?void 0:t.present)?(null==t?void 0:t.charge_status)?"DEVICE_BATTERY_STATE_"+t.charge_status.replace(" ","_").toUpperCase():"DEVICE_BATTERY_STATE_UNKNOWN":"DEVICE_BATTERY_STATE_NO_BATTERY",[null==t?void 0:t.charge_status,null==t?void 0:t.present]),n=Object(l.useMemo)(()=>{var e;return["charging","discharging"].includes(null===(e=null==t?void 0:t.charge_status)||void 0===e?void 0:e.toLowerCase().trim())},[null==t?void 0:t.charge_status]),r=Object(l.useMemo)(()=>{const e=null==t?void 0:t.charge_status;return e===Ce.PsuChargeStatus.FULL?"success":e===Ce.PsuChargeStatus.CHARGING||e===Ce.PsuChargeStatus.DISCHARGING?"warning":void 0},[null==t?void 0:t.charge_status]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_CHARGE_STATUS"})),i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(eg,{variant:r,pulsating:n}),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:a})))),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_VOLTAGE"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:Number(t.voltage).toFixed(1)}}))),i.a.createElement(la,null,i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_OVERVIEW_CURRENT"})),i.a.createElement(v.a,{size:"body"},i.a.createElement(R.b,{id:"COMMON_UNIT_AMPERES_SHORT",values:{value:Number(t.current).toFixed(1)}}))))};const ag=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.spacing["spacing-xxxxl"]};
`;var ng=i.a.memo(({activeItem:e})=>{const t=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),t&&i.a.createElement(ag,{variant:"secondary",items:[{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(QI,{activeItem:e})},{id:"powerUtilization",label:i.a.createElement(R.b,{id:"DEVICE_HEADER_POWER_UTILIZATION"}),renderContent:()=>i.a.createElement(II,{activeItem:e})},{id:"externalBattery",label:i.a.createElement(R.b,{id:"DEVICE_BATTERY_TYPE_EXTERNAL"}),renderContent:()=>i.a.createElement(tg,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0}))});const lg=Object(r.c)(S.a)`
  padding: 0 32px;
`,ig=Object(r.c)("div")`
  padding: 24px 32px;
  background: ${({theme:e})=>e.motifPalette.ui11};
  display: flex;
  flex: none;
  flex-direction: column;
`,rg=Object(r.c)(v.a)`
  align-items: center;
  justify-content: center;
  margin: 16px 0 8px;
`,cg=Object(r.c)("div")`
  margin-top: 1px;
  margin-left: 10px;
`;const og=Object(r.c)(S.a)`
  padding: 0 32px;
`;var sg=Object(Qa.compose)(Ja(["general","screen","services","network","manage"]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r,intl:c})=>{const s=Object(o.useSelector)(_i),E=Object(o.useSelector)(ui),m=Object(o.useSelector)(bi),{_id:d,mac:_}=e,u=Object(o.useDispatch)(),b=Object(_o.l)(e),p=b?"lcmScreen":"screen",O=Object(l.useCallback)(()=>{const e=Object.entries(s).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{}),{lcm:t,...a}=e;u(Object(Ce.updateDeviceWithIdEndpoint)(a,d,_,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(E).forEach(e=>{"function"==typeof e&&e()})})},[s]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(og,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),openByDefault:!0,renderContent:()=>i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:p,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>b?i.a.createElement(Fu,{activeItem:e,setFormDirty:t,setFormInvalid:a}):i.a.createElement(jo,{activeItem:e,setFormDirty:t})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Ro,{activeItem:e,setFormDirty:t,setFormInvalid:a,hideFlowControl:!0})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:n,isInvalid:r,onFormSubmit:O,onFormCancel:()=>{Object.values(m).forEach(e=>{"function"==typeof e&&e()})}}))}),Eg={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:ng},ports:{path:"/ports",title:"DEVICE_PROPERTY_HEADER_PORTS",icon:f.I,component:({activeItem:e})=>{const t=Object(n.k)(),a=Object(Ce.isAdopted)(e);return i.a.createElement(i.a.Fragment,null,a&&i.a.createElement(ig,null,i.a.createElement(S.a,{flexDirection:"row",alignItems:"flex-end",justifyContent:"space-evenly"},i.a.createElement(S.a,{flexDirection:"column",alignItems:"center"},i.a.createElement(KI,{deviceData:e})),i.a.createElement(S.a,{justifyContent:"center"},i.a.createElement("div",null,i.a.createElement(cO,{deviceData:e})),e.port_table&&i.a.createElement(cg,null,i.a.createElement(JE,{deviceData:e,portSizeOverride:"19px",history:t})))),i.a.createElement(Zp,{isForDiagram:!0,deviceData:e}),i.a.createElement(LI,{deviceData:e})),i.a.createElement(lg,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(HI,{deviceData:e}),i.a.createElement(rg,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_ETHERNET_PORT"})),i.a.createElement(HE,{activeItem:e}),i.a.createElement(rg,{weight:"bold",size:"body"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_OUTLETS"})),i.a.createElement(IO,{hidePorts:!0,activeItem:e})))},subpanel:{path:"/:subPanel/:subPanelId",component:({params:e,...t})=>{switch(e.subPanel){case"ports":return i.a.createElement(vd,Object.assign({params:e},t));case"outlets":return i.a.createElement(LO,Object.assign({params:e},t));default:return i.a.createElement(uI,Object.assign({params:e},t))}}}},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:sg}}},mg=({activeItem:e})=>{const t=Object(o.useSelector)(Ac),a=Object(Pc.getWifiNetworkNames)(t,!1),n=Object(l.useMemo)(()=>[{Comp:({activeItem:e,wan:t=!1,lan:a=!1})=>{const n=Object(l.useMemo)(()=>e.lan_ip||e.ip,[e]),r=Object(l.useMemo)(()=>{let e="COMMON_IP_ADDRESS";return t?e="DEVICE_PROPERTY_OVERVIEW_WAN_IP_ADDRESS":a&&(e="DEVICE_PROPERTY_OVERVIEW_LAN_IP_ADDRESS"),i.a.createElement(R.b,{id:e})},[t,a]);return n?i.a.createElement(la,null,i.a.createElement(v.a,{color:"secondary",size:"body"},r),i.a.createElement(v.a,{color:"secondary",size:"body"},n)):null},props:{wan:!0},key:"IpAddress"},{Comp:Qn,key:"Uptime"},{Comp:tl,key:"MemoryUsage"},{Comp:XO,props:{wifiNetworkNames:a},key:"WiFiNetwork"}],[a]);return i.a.createElement(S.a,{height:"100%",flexDirection:"column"},n.map(({Comp:t,props:a={},key:n})=>i.a.createElement(t,Object.assign({key:n,activeItem:e},a))))};const dg=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.spacing["spacing-xxxxl"]};
`;var _g=({activeItem:e})=>{const t=Object(o.useDispatch)();return Object(l.useEffect)(()=>{t(Object(zn.fetchDeviceUsageReport)(e.mac))},[e.mac,t]),i.a.createElement(si,{gwMac:e.mac,keys:["mem"],pickDatumsWithKey:"ap",heading:"DEVICE_GATEWAY_USAGE_STAT_CHART_HEADER"})};const ug=Object(r.c)(S.a)`
  padding: 16px 32px;
`,bg=Object(r.c)("div")`
  margin-bottom: 16px;
`;const pg=Object(r.c)(S.a)`
  padding: 0 32px;
`;var Og=Object(Qa.compose)(Ja(["general","led","network","manage"]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:l,intl:r})=>{const c=Object(o.useSelector)(_i),s=Object(o.useSelector)(ui),E=Object(o.useSelector)(bi),{_id:m,mac:d}=e,_=Object(o.useDispatch)();return i.a.createElement(i.a.Fragment,null,i.a.createElement(_O,{deviceData:e,hidePorts:!0}),i.a.createElement(pg,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),openByDefault:!0,renderContent:()=>i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"outlets",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_OUTLETS"}),renderContent:()=>i.a.createElement(IO,{hidePorts:!0,activeItem:e})},{id:"led",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_LED"}),renderContent:()=>i.a.createElement(yd,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],renderOnlyExpandedContent:!0,multiOpen:!0})),i.a.createElement(Ci.a,{isDirty:n,isInvalid:l,onFormSubmit:()=>{const e=Object.entries(c).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{});_(Object(Ce.updateDeviceWithIdEndpoint)(e,m,d,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(s).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{Object.values(E).forEach(e=>{"function"==typeof e&&e()})}}))}),Ig={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:({activeItem:e})=>{const t=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]);return i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),t&&i.a.createElement(dg,{variant:"secondary",items:[{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(mg,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0}))}},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:({activeItem:e})=>i.a.createElement(ug,{flexDirection:"column"},i.a.createElement(v.a,{weight:"bold",size:"body",color:"primary"},i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_STATS"})),i.a.createElement(bg,null),i.a.createElement(_g,{activeItem:e}))},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:Og,subpanel:{path:"/:subPanel/:subPanelId",component:LO}}}},gg=({activeItem:e})=>{const t=Object(o.useDispatch)();return Object(l.useEffect)(()=>{t(Object(zn.fetchDeviceUsageReport)(e.mac))},[e.mac,t]),i.a.createElement(si,{gwMac:e.mac,keys:["mem","cpu"],pickDatumsWithKey:"sw",heading:"DEVICE_GATEWAY_USAGE_STAT_CHART_HEADER"})};const Cg=Object(r.c)(Ia.a)`
  transition: none;
  padding: 0 ${({theme:e})=>e.space[5]+"px"};
`,hg=Object(r.c)(S.a)`
  padding: 0 32px;
`;var Tg=Object(Qa.compose)(Ja(["general","lcmScreen","screen","services","network"]))(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:l})=>{const r=Object(o.useSelector)(_i),c=Object(o.useSelector)(ui),s=Object(o.useSelector)(bi),{_id:E,mac:m}=e,d=Object(o.useDispatch)(),_=Object(_o.l)(e),u=_?"lcmScreen":"screen";return i.a.createElement(i.a.Fragment,null,i.a.createElement(hg,{flexDirection:"column",flex:"1 1 85%"},i.a.createElement(Ia.a,{variant:"secondary",items:[{id:"general",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),openByDefault:!0,renderContent:()=>i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:u,label:_?i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}):i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_LED"}),renderContent:()=>_?i.a.createElement(Fu,{activeItem:e,setFormDirty:t,setFormInvalid:a}):i.a.createElement(jo,{activeItem:e,setFormDirty:t})},{id:"network",label:i.a.createElement(R.b,{id:"COMMON_NETWORK"}),renderContent:()=>i.a.createElement(Vi,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Ro,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"manage",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e})}],multiOpen:!0,renderOnlyExpandedContent:!0})),i.a.createElement(Ci.a,{isDirty:n,isInvalid:l,onFormSubmit:()=>{const e=Object.entries(r).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{}),{lcm:t,...a}=e;d(Object(Ce.updateDeviceWithIdEndpoint)(a,E,m,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(c).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{Object.values(s).forEach(e=>{"function"==typeof e&&e()})}}))});const vg=Object(r.c)(f.I)`
  margin: 2px;
`;var fg={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:function({activeItem:e,...t}){const[a]=Object(l.useState)("SwitchAbout-"+Date.now()),n=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]),r=Object(o.useDispatch)(),c={style:BE.a.overflow,styleName:"overflow",dependant:a};return Object(l.useEffect)(()=>(r(Object(WE.c)(c)),()=>{r(Object(WE.b)(c))}),[]),i.a.createElement(i.a.Fragment,null,i.a.createElement(Kl,{device:e}),n&&i.a.createElement(i.a.Fragment,null,i.a.createElement(Dl,{activeItem:e}),i.a.createElement(Cg,{variant:"secondary",items:[{id:"clientsGuests",openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_CLIENTS_GUESTS"}),renderContent:()=>i.a.createElement(Rc,Object.assign({hideSignalTab:!0,activeItem:e},t))},{id:"overview",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_GENERAL"}),openByDefault:!0,renderContent:()=>i.a.createElement(Ap,{switchDeviceData:e})},{id:"uplink",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_UPLINK_WIRED"}),renderContent:()=>i.a.createElement(xp,Object.assign({switchDeviceData:e,showSimplifiedActivity:!0},t))},{id:"downlink",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_DOWNLINK"}),renderContent:()=>i.a.createElement(Tm,Object.assign({activeItem:e},t))},{id:"statistics",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_STATS"}),renderContent:()=>i.a.createElement(gg,Object.assign({activeItem:e},t))}],multiOpen:!0,renderOnlyExpandedContent:!0})))}},ports:{path:"/ports",title:"DEVICE_PROPERTY_HEADER_PORTS",icon:()=>i.a.createElement(vg,null),component:Y_,subpanel:{path:"/:subPanel/:subPanelId",component:({params:e,activeItem:t,...a})=>{switch(e.subPanel){case"ports":return e.subPanelId===jt.b.WAN?i.a.createElement(Xu.a,Object.assign({params:e,activeItem:t},a)):i.a.createElement(vd,Object.assign({params:e,activeItem:t},a));default:return i.a.createElement(i.a.Fragment,null)}}}},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:Tg}}};const Rg=Object(r.c)(Ia.a)`
  padding: 0 ${({theme:e})=>e.spacing["spacing-xxxxl"]};
  li:last-child {
    border-bottom: none;
  }
`,Dg=Object(r.c)("div")`
  margin-bottom: 16px;
`,Sg=Object(r.c)("div")`
  padding: 0 32px;
  margin-bottom: 32px;
`;var yg;!function(e){e.NAME="name",e.PORTS="ports",e.MANAGE="manage"}(yg||(yg={}));var Pg=Object(Qa.compose)(Ja([yg.NAME,"lcmScreen","services",yg.MANAGE]),R.e)(({activeItem:e,setFormDirty:t,setFormInvalid:a,isDirty:n,isInvalid:r,intl:c})=>{const s=Object(o.useSelector)(ui),E=Object(o.useSelector)(bi),m=Object(o.useSelector)(_i),d=Object(l.useMemo)(()=>Object(Ce.isAdopted)(e),[e]),_=Object(o.useDispatch)(),u=!Object(_o.a)(e,Ce.FIRMWARE_CAPS.UTERM),{_id:b,mac:p}=e;return i.a.createElement(i.a.Fragment,null,d&&i.a.createElement(om,{deviceData:e}),i.a.createElement(Rg,{variant:"secondary",items:[{id:yg.NAME,openByDefault:!0,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_NAME"}),renderContent:()=>i.a.createElement(gi,{activeItem:e,setFormDirty:t,setFormInvalid:a,formName:yg.NAME})},{id:yg.PORTS,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_PORTS"}),openByDefault:!1,renderContent:()=>i.a.createElement(ip,{activeItem:e})},{id:"outlets",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_OUTLETS"}),renderContent:()=>i.a.createElement(i.a.Fragment,null,i.a.createElement(Dg,null,i.a.createElement(_O,{hidePorts:!0,deviceData:e})),i.a.createElement(Sg,null,i.a.createElement(IO,{hidePorts:!0,activeItem:e})))},{id:"lcmScreen",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SCREEN"}),renderContent:()=>i.a.createElement(Fu,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:"services",label:i.a.createElement(R.b,{id:"DEVICE_PROPERTY_HEADER_SERVICES"}),renderContent:()=>i.a.createElement(Gu,{activeItem:e,setFormDirty:t,setFormInvalid:a})},{id:yg.MANAGE,label:i.a.createElement(R.b,{id:"DEVICE_PROPERTIES_LABEL_MANAGE"}),renderContent:()=>i.a.createElement(fr,{activeItem:e,disableDebug:u})}],multiOpen:!0,renderOnlyExpandedContent:!0}),i.a.createElement(Ci.a,{isDirty:n,isInvalid:r,onFormSubmit:()=>{const e=Object.entries(m).reduce((e,[t,a])=>{if("function"==typeof a){const t=a();if("object"==typeof t&&Object.keys(t).length)return{...e,...t}}return e},{});_(Object(Ce.updateDeviceWithIdEndpoint)(e,b,p,{successToast:{icon:Ea.a.success,message:"DEVICE_NOTICE_SAVE_SUCCESS"},failureToast:{icon:Ea.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR"},extend:!0})).then(()=>{Object.values(s).forEach(e=>{"function"==typeof e&&e()})})},onFormCancel:()=>{Object.values(E).forEach(e=>{"function"==typeof e&&e()})}}))}),Ag={default:jt.a.OVERVIEW,panels:{overview:{path:"/overview",title:"DEVICE_PROPERTY_HEADER_OVERVIEW",icon:f.Gb,component:Db},insights:{path:"/insights",title:"DEVICE_PROPERTY_HEADER_INSIGHTS",icon:f.nc,component:Ab},settings:{path:"/settings",title:"DEVICE_PROPERTY_HEADER_SETTINGS",icon:f.S,component:Pg,subpanel:{path:"/:subPanel/:subPanelId",component:({activeItem:e,params:t,...a})=>"ports"===t.subPanel?t.subPanelId===jt.b.ALL?i.a.createElement(Xu.a,Object.assign({activeItem:e,params:t},a)):i.a.createElement(bp,Object.assign({activeItem:e,params:t},a)):i.a.createElement(LO,Object.assign({params:t,activeItem:e},a))}}}},Ng=a(2626);const jg={width:25,height:25},xg=Object(r.c)(S.a)`
  margin-top: 10px;
  ${({bordered:e})=>e&&`box-shadow: 0px 24px 2px -24px ${Oa.a["white-8"]};`}
`,Lg=Object(r.c)("div")`
  display: block;
  position: absolute;
  border-bottom: ${({theme:e,wired:t})=>`2px ${t?"solid":"dotted"} ${e.motifPalette.uBlue06}`};
  width: 100%;
  top: 37px;
  left: -50%;
  z-index: 0;
  padding: 0 25px;
`,Vg=Object(r.c)("div")`
  position: relative;
  width: 100%;
  max-width: 70px;
`,Mg=Object(r.c)(S.a)`
  height: 100px;
  > * {
    &:not(:last-child) {
      margin-bottom: ${({theme:e})=>e.spacing["spacing-xs"]};
    }
  }
`,wg=Object(r.c)(S.a)`
  width: 35px;
  min-height: ${jg.height}px;
  height: ${jg.height}px;
  position: relative;
  z-index: 1;
`,Fg=Object(r.c)(v.a)`
  width: 70px;
`,Ug=Object(r.c)(f.v)`
  margin-right: ${({theme:e})=>e.spacing["spacing-xs"]};
`,kg=Object(r.c)(S.a)`
  > * {
    color: ${Oa.a["grey-2"]};
  }
`,Wg=Object(r.c)(S.a)`
  overflow: auto hidden;
  padding-bottom: ${({theme:e})=>e.spacing["spacing-s"]};
  padding: 20px 0 20px 20px;
`,Bg=Object(r.c)(oe.a)`
  border: 2px solid ${({theme:e})=>e.motifPalette.uBlue06};
  background: ${({theme:e})=>e.colors.navBackground};
  border-radius: 50%;
  color: ${({theme:e})=>e.motifPalette.uBlue06};
  font-weight: bold;
  width: 36px;
  z-index: 999;
  :hover {
    color: ${({theme:e})=>e.motifPalette.uBlue06};
    background-color: ${({theme:e})=>e.motifPalette.uBlue01};
  }
`,zg=e=>{const{isInternet:t,isClient:a,client_wifi_experience:n,number_of_clients:l,wireless_uplink:r=!1,expandButton:c,devicesCount:o,onClick:s}=e,E=!!t||!a&&!r;return i.a.createElement(Vg,null,!t&&i.a.createElement(Lg,{wired:E}),i.a.createElement(Mg,{flexDirection:"column",alignItems:"center",justifyContent:"center"},t||a||!l?i.a.createElement(S.a,{flex:"1"}):i.a.createElement(kg,{flex:"1",alignItems:"center",justifyContent:"space-between"},i.a.createElement(Ug,null),i.a.createElement(v.a,null,l)),!c&&i.a.createElement(wg,{flex:"1",alignItems:"center",justifyContent:"center"},(e=>{const{isInternet:t,isClient:a,model:n}=e;return t?i.a.createElement(f.H,{size:"large"}):a?i.a.createElement(j,Object.assign({data:e},jg)):i.a.createElement(Ng.a,{model:n,name:n})})(e)),c&&s&&o&&i.a.createElement(Bg,{iconSize:"logo",onClick:s},o),i.a.createElement(S.a,{flex:"1",alignItems:"center",justifyContent:"center"},i.a.createElement(Fg,{centered:!0,truncate:!0},(e=>{var t;const{isInternet:a,isClient:n,client_model:l,client_name:r,model:c}=e;return a?i.a.createElement(R.b,{id:"COMMON_WORD_INTERNET"}):n?l||r:(null===(t=_.deviceModels[c])||void 0===t?void 0:t.name)||c})(e))),i.a.createElement(S.a,{flex:"1",alignItems:"center",justifyContent:"center"},a&&i.a.createElement(v.a,{color:Object(wt.c)(n)},n,"%"))))};var Hg=({item:e,variant:t})=>{const[a,n]=Object(l.useState)(!1),{uplink_devices:r=[],report_timestamp:c,...o}=e,s=[...r].reverse(),E=s[0],m=s[(null==s?void 0:s.length)-1],d=s.slice(1,(null==s?void 0:s.length)-1),_=Object(l.useCallback)(()=>{n(!a)},[a]),u=a?s.map(e=>i.a.createElement(zg,Object.assign({key:e.mac},e))):i.a.createElement(i.a.Fragment,null,i.a.createElement(zg,Object.assign({key:E.mac},E)),d.length>1?i.a.createElement(zg,{expandButton:!0,onClick:_,devicesCount:(null==s?void 0:s.length)-2}):d.map(e=>i.a.createElement(zg,Object.assign({key:e.mac},e))),(null==s?void 0:s.length)>1&&i.a.createElement(zg,Object.assign({key:m.mac},m)));return i.a.createElement(xg,{flexDirection:"column",flex:"0 0 auto",bordered:"secondary"===t},i.a.createElement(Wg,null,i.a.createElement(zg,{isInternet:!0}),u,i.a.createElement(zg,Object.assign({isClient:!0},o))))},Gg=a(2616),$g=a(2617),Yg=a(2627),Xg=({item:e})=>{const{client_signal:t,client_wifi_experience:a,device_model:n,device_name:r,speed_tests:c,wlan_channel:o,wlan_channel_width:s,wlan_essid:E}=e,m=Object(l.useMemo)(()=>Object(wt.d)(a),[a]),d=Object(l.useMemo)(()=>c.reduce((e,t)=>{const{test_server_name:a}=t;return a&&!e.includes(a)&&e.push(a),e},[]),[c]),u=Object(l.useMemo)(()=>(null==d?void 0:d.length)?d.join(", "):"-",[null==d?void 0:d.length]),b=Object(l.useMemo)(()=>{var e;return(null===(e=_.deviceModels[n])||void 0===e?void 0:e.name)||n},[n]);return i.a.createElement(S.a,{flexDirection:"column",padding:"26px 32px 0"},m&&i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_WIFI_EXP"})),i.a.createElement(ta.a,{size:"body",type:"percent",input:a/100,style:{color:Oa.a["color-"+Object(wt.c)(a)]}})),i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"WIFI_MAN_OVERVIEW_AP_MODEL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(Vo.a,{width:20,height:20,device:{model:n,type:ye.g.AP,name:b}}))),i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"WIFI_MAN_OVERVIEW_AP_NAME"})),i.a.createElement(v.a,{color:"secondary",size:"body"},Object(ma.a)(r))),i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_SSID"})),i.a.createElement(v.a,{color:"secondary",size:"body"},E)),i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_SIGNAL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},t," ",i.a.createElement(R.b,{id:"COMMON_UNIT_DBM"}))),i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"COMMON_CHANNEL"})),i.a.createElement(v.a,{color:"secondary",size:"body"},""+o," ",s&&i.a.createElement(v.a,{size:"body",color:"inherit"},"(",""+s," ",i.a.createElement(R.b,{id:"COMMON_UNIT_MHZ"}),")"))),i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(S.a,{justifyContent:"flex-start",alignItems:"center"},i.a.createElement(R.b,{id:"WIFI_MAN_OVERVIEW_DOWN"}))),i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Gg.a,{item:e}))),i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(S.a,{justifyContent:"flex-start",alignItems:"center"},i.a.createElement(R.b,{id:"WIFI_MAN_OVERVIEW_UP"}))),i.a.createElement(S.a,{alignItems:"center"},i.a.createElement($g.a,{item:e}))),i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"WIFI_MAN_OVERVIEW_RATE"})),i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(Yg.a,{item:e}))),i.a.createElement(S.a,{width:"100%",marginBottom:8,justifyContent:"space-between"},i.a.createElement(v.a,{color:"secondary",size:"body"},i.a.createElement(R.b,{id:"WIFI_MAN_OVERVIEW_TEST_SERVER"})),i.a.createElement(v.a,{color:"secondary",size:"body"},u)))};const Kg=Object(r.c)(v.a)`
  margin-right: 4px;
`,Zg=Object(r.c)("div")`
  width: 18px;
  border: 1px solid ${({theme:e})=>e.motifPalette.uBlue06};
  margin: 0 8px;
`,qg=Object(r.c)("div")`
  width: 18px;
  margin: 0 8px;
  border: 1px dashed ${({theme:e})=>e.motifPalette.uBlue06};
`,Jg=Object(r.c)(S.a)`
  border-top: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  padding: 16px 8px;
`;var Qg=({timestamp:e})=>i.a.createElement(Jg,{alignItems:"center",justifyContent:"space-around"},i.a.createElement(S.a,{alignItems:"center",justifyContent:"space-around"},i.a.createElement(Kg,{weight:"bold"},i.a.createElement(R.b,{id:"WIFI_MAN_LATEST_SPEED_OVERVIEW_TEST"})),i.a.createElement(Hn.a,{date:new Date(1e3*e),spacer:" "})),i.a.createElement(S.a,{alignItems:"center"},i.a.createElement(Zg,null),i.a.createElement(R.b,{id:"WIFI_MAN_LATEST_SPEED_OVERVIEW_WIRED"}),i.a.createElement(qg,null),i.a.createElement(R.b,{id:"WIFI_MAN_LATEST_SPEED_OVERVIEW_WIRELESS"})));const eC=Object(r.c)("div")`
  width: 100%;
  background: ${({theme:e})=>e.colors.navBackground};
`;var tC=a(1016);const aC=Object(r.c)(S.a)`
  position: relative;
  width: 100%;
  margin: ${({theme:e})=>e.spacing["spacing-l"]} 0 ${({theme:e})=>e.spacing["spacing-xxl"]};

  button {
    padding: 0;
    position: absolute;
    left: ${({theme:e})=>e.spacing["spacing-xxxxl"]};
  }
`,nC=Object(r.c)(v.a)`
  width: 100%;
  letter-spacing: 0.55px;
  line-height: ${({theme:e})=>e.spacing["spacing-xl"]};
`;var lC=({timestamp:e,onBack:t})=>i.a.createElement(aC,null,i.a.createElement(ha.c,{name:"backButton",onClick:t},i.a.createElement(f.f,null)),i.a.createElement(nC,{size:"body",weight:"bold",centered:!0},i.a.createElement(Hn.a,{date:new Date(1e3*e)}))),iC={default:jt.a.TESTS,singlePanel:!0,panels:{tests:{path:"/tests",component:function({activeItem:e}){return i.a.createElement(i.a.Fragment,null,i.a.createElement(eC,null,i.a.createElement(Hg,{item:e,variant:"primary"}),i.a.createElement(Qg,{timestamp:e.report_timestamp})),i.a.createElement(Xg,{item:e}))},subpanel:{path:"/:subPanel",component:()=>{const e=Object(n.k)(),t=Object(n.n)(),a=Object(ol.a)(t,"params.subPanel"),l=Object(o.useSelector)(Object(tC.d)(a));return a&&l?i.a.createElement(i.a.Fragment,null,i.a.createElement(lC,{timestamp:l.report_timestamp,onBack:()=>e.push("../history")}),i.a.createElement(Hg,{item:l,variant:"secondary"}),i.a.createElement(Xg,{item:l})):null}}}}},rC={[u.c.ISP_DETAILS]:qn,[u.c.THREAT_EVENT]:wr,[u.c.TRAFFIC_STATS]:tc,[u.c.HONEYPOT_ALERT]:Nn,[u.c.WIFI_MAN]:iC,[u.c.UNIFI_DEVICE_CLIENT]:Dp,[u.a.CLIENT]:fn,[u.a.TELEPORT]:Sp,[u.b.UGW]:pp,[u.b.USW]:fg,[u.b.UAP]:Ad,[u.b.UAP6MP]:UE,[u.b.UDM]:rb,[u.b.UDW]:hb,[u.b.UDMPRO]:Zu,[u.b.UAP_USW]:Nd,[u.b.UBB]:G_,[u.b.UBBXG]:G_,[u.b.USPP]:iI,[u.b.USPS]:Ig,[u.b.USPPDUP]:GO,[u.b.USAGGPRO]:fg,[u.b.LTE]:yr,[u.b.UXG]:Ag,[u.b.UAP_IW]:fd,[u.b.USL8MP]:VO,[u.b.USPRPS]:JI,[u.b.USPRPSP]:Eg};const cC=r.a`
  & > div {
    overflow: hidden;
  }
`;t.a=Object(n.o)(({location:e,history:t,match:{path:a,params:{site:r,id:_}},panelType:b})=>{var p;const v=Object(o.useSelector)(d.i),[f,R]=Object(l.useState)(!1),D=Object(o.useSelector)(g.b),S=Object(o.useSelector)(g.d),y=Object(o.useDispatch)(),P=b||S,A=Object(l.useMemo)(()=>{if(_)switch(P){case u.c.DEVICE:return Object(g.f)(_);case u.c.UNIFI_DEVICE:return Object(g.h)(_);case u.c.CLIENT:return Object(g.e)(_);case u.c.UNIFI_DEVICE_CLIENT:return Object(g.g)(_);case u.c.WIFI_MAN:return Object(g.i)(_);case u.c.ISP_DETAILS:return Object(g.a)(_);case u.c.THREAT_EVENT:return Object(s.g)(_);case u.c.TRAFFIC_STATS:return Object(I.m)(_);case u.c.HONEYPOT_ALERT:return Object(s.c)(_);default:return null}return null},[_,P])||function(){return null},N=Object(o.useSelector)(A);let j=N||{},x=P;P===u.c.UNIFI_DEVICE&&N&&"activeItemPayload"in N&&"panel"in N&&({activeItemPayload:j,panel:x}=N);const L={type:x,data:D||f?j:{}},V=()=>{R(!0),t.push(e.pathname.split("/properties")[0]),y(Object(C.f)())};Object(m.a)(()=>D&&V(),[D]),Object(l.useEffect)(()=>{D&&!e.pathname.includes("/properties")&&y(Object(C.f)())},[e]),Object(l.useEffect)(()=>{D&&!L.type&&V()},[D,L]);const M=Object(l.useCallback)(()=>{R(!1)},[]);Object(l.useEffect)(()=>{var l,i;if(x&&(null===(l=null==e?void 0:e.pathname)||void 0===l?void 0:l.includes("properties/")))if(null===(i=Object.keys(j||{}))||void 0===i?void 0:i.length)y(Object(C.g)({type:P,mac:_,id:_}));else{let e=a;["/:site/ips/properties/:id","/:site/ips/:threatPage/properties/:id"].some(e=>a.includes(e))&&(e=e.replace("/properties/:id","")),t.push(Object(n.i)(e,{site:r}))}},[]);const w=L.type&&(null===(p=Object.keys((null==L?void 0:L.data)||{}))||void 0===p?void 0:p.length)?null==rC?void 0:rC[O(L.data,L.type)]:void 0;return Object(h.a)([Object(T.c)("devices")],w?i.a.createElement(c.a,{in:D,header:i.a.createElement(q,{activeItem:L}),onClose:V,onEntered:M,onExited:M,className:cC,style:{border:"none"}},(D||f)&&i.a.createElement(E.a,{path:v+"/:page/:subPage?/:subPageId?/:subSubPageId?/properties/:id/:panel?/:subPanel?/:subPanelId?"},e=>i.a.createElement(Nt,Object.assign({content:w,activeItem:L,dispatch:y},e)))):null)})},2605:function(e,t,a){"use strict";var n=a(2608);a.d(t,"b",function(){return n.b}),a.d(t,"c",function(){return n.c}),a.d(t,"d",function(){return n.d});var l=a(1193);a.d(t,"a",function(){return l.a}),a.d(t,"e",function(){return l.c})},2606:function(e,t,a){"use strict";a.d(t,"c",function(){return l}),a.d(t,"b",function(){return i}),a.d(t,"a",function(){return r});var n=a(8);const l=e=>`${e.ap_mac}-${e.bssid}`,i=(e=24,t={},a)=>Object(n.p)("wifiScanner","/api/s/{site}/stat/rogueap",{...t,queryParams:{...t.queryParams||{},within:e}},{idField:l,...a}),r=e=>i(e,void 0,{crudCacheStrategy:{type:n.a.COMBINED,interval:1e4}})},2608:function(e,t,a){"use strict";a.d(t,"d",function(){return s}),a.d(t,"b",function(){return E}),a.d(t,"a",function(){return m}),a.d(t,"c",function(){return d});var n=a(9),l=a(1016),i=a(751),r=a(1662),c=a(1193);const o=e=>({date:new Date(1e3*e.report_timestamp),...e}),s=Object(n.a)(l.e,e=>e.map(e=>o(e))),E=Object(n.a)(l.e,c.b,(e,t)=>e.map(e=>o(e)).filter(e=>Object(r.a)(e,t))),m=Object(n.a)(E,Object(i.a)("wifiman"),c.c,(e,t,a)=>e.filter(e=>t?Object(r.c)(e,t):Object(r.b)(e,a))),d=Object(n.a)(l.e,e=>e.map(e=>({id:e.id,wlan_essid:e.wlan_essid,client_model:e.client_model,client_name:e.client_name,device_model:e.device_model,device_name:e.device_name,isp_name:e.isp_name,public_ip:e.public_ip})))},2609:function(e,t,a){"use strict";a.d(t,"b",function(){return n}),a.d(t,"a",function(){return l});const n={success:{lo:80,hi:100,within:!0},warning:{lo:60,hi:80,within:!0},danger:{lo:0,hi:60,within:!0}},l=[{id:"1D",label:"1D",value:24,isDefault:!0},{id:"1W",label:"1W",value:168},{id:"1M",label:"1M",value:720}]},2610:function(e,t,a){"use strict";a.d(t,"a",function(){return c}),a.d(t,"b",function(){return o});var n=a(285),l=a(194),i=a(123),r=a(235);const c={[r.c.ELEMENTS]:Object.values(r.a),[r.c.STATUS]:Object.values(r.b)},o=Object(n.b)(l.a.DEVICES,i.a.DEVICE,c)},2611:function(e,t,a){"use strict";a.d(t,"a",function(){return i});var n=a(15),l=a(16);const i=e=>{const t=Object(l.selectIsIpsDisabled)(e),a=Object(n.selectWanNetworks)(e).every(({wan_smartq_enabled:e})=>!e);return t&&a}},2612:function(e,t,a){"use strict";a.d(t,"a",function(){return r});var n=a(165),l=a(8),i=a(1653);const r=e=>Object(n.a)(Object(l.v)(Object(i.b)(),e.models),"data",{})},2613:function(e,t){},2614:function(e,t){},2615:function(e,t){},2616:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(868);t.a=(({item:e,className:t,hideIcon:a=!1})=>{const{speed_tests:n}=e,r=n&&n.reduce((e,{download_speed_bytes:t=0})=>e+t,0);return l.a.createElement(i.a,{className:t,bytes:r,direction:"down",size:"body",pow:2,hideIcon:a})})},2617:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(868);t.a=(({item:e,className:t,hideIcon:a=!1})=>{const{speed_tests:n}=e,r=n&&n.reduce((e,{upload_speed_bytes:t=0})=>e+t,0);return l.a.createElement(i.a,{className:t,bytes:r,direction:"up",size:"body",pow:2,hideIcon:a})})},2618:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(29),r=a(2),c=a(1),o=a(3),s=a(99),E=Object(o.a)("text-align:right;");function m(e){var t=e.start,a=e.end,n=e.intl,r=e.timezone,c="",o="";return Object(s.h)(t,r)&&Object(s.h)(a,r)?c=n.formatMessage({id:"COMMON_DATES_TODAY"}):Object(i.differenceInMonths)(a,t)>1?(c=Object(s.e)(t,r,"MMM Do, YYYY"),o=Object(s.e)(a,r,"MMM Do, YYYY")):Object(i.differenceInDays)(a,t)<1?c=Object(s.e)(t,r,"MMM Do, YYYY"):(c=Object(s.e)(t,r,"MMM Do"),o=Object(s.e)(a,r,"MMM Do")),l.a.createElement("div",{className:E},"".concat(c," ").concat(o&&" - ".concat(o)))}m.propTypes={start:r.PropTypes.instanceOf(Date).isRequired,end:r.PropTypes.instanceOf(Date).isRequired,timezone:r.PropTypes.string.isRequired,intl:c.f.isRequired},t.a=Object(c.e)(m)},2619:function(e,t,a){"use strict";a.d(t,"a",function(){return h});var n=a(0),l=a.n(n),i=a(1),r=a(53),c=a(132),o=a(2788),s=a(9),E=a(1655),m=a(1194),d=a(495),_=a(1640),u=a(1651);const b=(e,t,a)=>(t&&t.constructor===Object&&Object.keys(t).forEach(n=>{void 0===e[n]||a&&a.includes(n)?e[n]=t[n]:Number.isFinite(e[n])?e[n]=(e[n]||0)+t[n]:Array.isArray(e[n])?e[n]=e[n].concat(t[n]):e[n]&&e[n].constructor===Object&&b(e[n],t[n])}),e),p=(e,t)=>Object(d.a)(e).reduce((e,a)=>e?b(e,a,t):a,void 0);var O=a(27),I=a(54),g=a(755);const C=Object(r.a)(e=>{if(0===e.length)return{data:[],total:{}};const t={bytesParsed:e=>Object(c.c)(e.bytes),pkts:e=>Object(o.a)(e.packets,{spacer:" "})};return new class{constructor(e){this.data=e}dedeuplicatedBy(e,t){return this.data=((e,t,a)=>Object(_.a)(Object(u.a)(e,t)).map(e=>p(e,a)))(this.data,e,t),this}sortedBy(e,t){return this.data.sort((a,n)=>{const l=a[e]-n[e];return t?-l:l}),this}withLimit(e,t){let a=e;return this.data.length>=a&&(a-=1,this.other=p(this.data.slice(a),t),this.other.generated=!0),this.data=this.data.splice(0,a),this}countTotal(e){const t=this.other?[...this.data,this.other]:this.data;return this.total=p(t,e)||{},this}withMap(e,t){return this.mapFunction=(a=>{const n=t?a:{};return Object.keys(e).forEach(t=>{n[t]=e[t](a)}),n}),this}withOtherDefaults(e){return this.other={...this.other,...e},this}getData(e=!1){let t;return{data:t=(t=this.other.generated?[...this.data,this.other].map(this.mapFunction):this.data.map(this.mapFunction)).map((t,a)=>({index:a,...e?{id:a.toString()}:[],...t})),total:this.total}}}(e.map(e=>({label:Object(m.a)(Object(m.b)(e.cat,e.app))||l.a.createElement(i.b,{id:"CLIENT_PROPERTY_DPI_UNKNOWN_LABEL"}),packets:e.rx_packets+e.tx_packets,bytes:e.rx_bytes+e.tx_bytes,...e}))).dedeuplicatedBy("label").sortedBy("bytes",!0).withLimit(g.a).countTotal().withMap(t,!0).withOtherDefaults({label:l.a.createElement(i.b,{id:"CLIENT_PROPERTY_DPI_OTHER"})}).getData(!0)}),h=(e,t)=>Object(I.b)()(Object(s.a)(((e,t)=>Object(I.b)()(Object(s.a)(Object(E.b)(e,t),e=>{var t;return(null===(t=Object(O.c)(e))||void 0===t?void 0:t.by_app)||[]}),e=>e))(e,t),e=>C(e)),e=>e)},2620:function(e,t,a){"use strict";a.d(t,"c",function(){return I}),a.d(t,"b",function(){return g}),a.d(t,"a",function(){return C});var n=a(9),l=a(127),i=a(304),r=a(6),c=a(46),o=a(1046),s=a(30),E=a(66),m=a(751),d=a(2610),_=a(665),u=a(84),b=a(235),p=a(183);const O=Object(m.a)("devices"),I=Object(n.a)(i.d,r.selectDevicesData,o.c,s.selectWifiNetworksData,l.selectAPGroupsData,d.b,O,(e,t,a,n,i,o,m)=>{const d=t.some(e=>{var t;return null===(t=e.radio_table)||void 0===t?void 0:t.some(e=>e.radio===E.b.RADIO_6E)});return t.reduce((E,u)=>{var b,p,O,I,g,C;if(Object(r.isUlte)(u)&&!u.lte_imei)return E;if(m&&!m.has(u.mac))return E;if(Object(_.c)(o,u))return E;const h=Object(r.getWarningsCount)(e,u),T=Object(r.getUplink)(t,u),v=Object(r.getDeviceSpecs)(u),f=u.uplink_table&&u.uplink_table.map(e=>{const{mac:a}=e,n=t.find(e=>e.mac===a);return{...e,model:(null==n?void 0:n.model)||""}}),R=Object(l.getDeviceWlanStats)(u,n,i,d),D=Object(r.getDeviceStatus)(u),S=Object(r.getDeviceState)(u)===r.DeviceState.PENDING||"success"===D;return E.push({...u,id:u._id||u.mac,name:Object(c.c)(u),modelName:Object(c.a)(u),activity:(e=>e["bytes-r"])(u),deviceState:Object(r.getDeviceState)(u),statusPulse:Object(r.getDeviceStatusPulse)(u),status:D,warningCount:h,hasWarning:h>0,specs:v,loadAvg:Object(r.getDeviceLoadAverage)(u),uplinkName:Object(r.getUplinkDisplayName)(u,T),connection:Object(r.getConnectionName)(u,T),uplinkDevice:T,uplinkId:T&&T.device_id,wlan2g:u.adopted?null===(p=null===(b=R.wlanNames)||void 0===b?void 0:b[s.WlanBand.NG])||void 0===p?void 0:p.join("\n"):"",wlan5g:u.adopted?null===(I=null===(O=R.wlanNames)||void 0===O?void 0:O[s.WlanBand.NA])||void 0===I?void 0:I.join("\n"):"",wlan6g:u.adopted?null===(C=null===(g=R.wlanNames)||void 0===g?void 0:g[s.WlanBand.AX])||void 0===C?void 0:C.join("\n"):"",satisfactionByRadio:Object(r.getSatisfactionByRadio)(u),problemPorts:Object(r.getProblemPorts)(u),portsUtilization:Object(r.getPortsUtilization)(u),pendingAdoption:Object(r.getPendingAdoption)(u),uplinkTable:f,bssid:Object(r.getDeviceBssid)(u),deviceUsageReport:Object(r.getDeviceUsageReport)(u,a),showRowPopover:S}),E},[])}),g=e=>Object(n.a)(r.selectDevicesData,t=>t.reduce((a,n)=>(Object(r.isUlte)(n)&&!n.lte_imei||a.push(((e,t,a)=>({mac:e.mac,search_type:((e,t)=>{switch(!0){case _.a[b.c.ELEMENTS][b.a.GATEWAY](e):return t.formatMessage({id:"DEVICE_FILTER_ELEMENT_GATEWAY"});case _.a[b.c.ELEMENTS][b.a.SWITCH](e):return t.formatMessage({id:"DEVICE_FILTER_ELEMENT_SWITCH"});case _.a[b.c.ELEMENTS][b.a.ACCESS_POINT](e):return t.formatMessage({id:"DEVICE_FILTER_ELEMENT_ACCESS_POINT"});case _.a[b.c.ELEMENTS][b.a.SMART_POWER](e):return t.formatMessage({id:"DEVICE_FILTER_ELEMENT_SMART_POWER"});case _.a[b.c.ELEMENTS][b.a.BUILDING_BRIDGE](e):return t.formatMessage({id:"DEVICE_FILTER_ELEMENT_BUILDING_BRIDGE"});case _.a[b.c.ELEMENTS][b.a.ULTE](e):return t.formatMessage({id:"DEVICE_FILTER_ELEMENT_ULTE"});default:return t.formatMessage({id:"DEVICE_FILTER_ELEMENT_NON_NETWORK_DEVICES"})}})(e,a),search_status:((e,t)=>{switch(!0){case _.a[b.c.STATUS][b.b.ONLINE](e):return t.formatMessage({id:"DEVICE_FILTER_STATUS_ONLINE"});case _.a[b.c.STATUS][b.b.OFFLINE](e):return t.formatMessage({id:"DEVICE_FILTER_STATUS_OFFLINE"});case _.a[b.c.STATUS][b.b.ISOLATED](e):return t.formatMessage({id:"DEVICE_FILTER_STATUS_ISOLATED"});case _.a[b.c.STATUS][b.b.PENDING_ADOPTION](e):return t.formatMessage({id:"DEVICE_FILTER_STATUS_PENDING_ADOPTION"});default:return t.formatMessage({id:"DEVICE_FILTER_STATUS_MANAGED_BY_ANOTHER_CONSOLE_SEARCH"})}})(e,a),search_name:Object(c.d)(e),search_model_name:Object(c.a)(e),search_ip:Object(r.getDeviceIp)(e),search_connection:((e,t,a)=>{const n=Object(r.getUplink)(t,e),l=Object(r.getConnectionName)(e,n);return"wired"===l?a.formatMessage({id:"COMMON_WORD_WIRED"}):"-"===l?"":l})(e,t,a),search_network:(e=>{var t,a,n;return"wire"===(null===(t=null==e?void 0:e.uplink)||void 0===t?void 0:t.type)?(null==e?void 0:e.connection_network_name)||"":"wireless"===(null===(a=null==e?void 0:e.uplink)||void 0===a?void 0:a.type)&&(null===(n=null==e?void 0:e.uplink)||void 0===n?void 0:n.essid)||""})(e),search_experience:(e=>{if(!u.deviceModels[e.model])return"";const{deviceCapabilities:t}=u.deviceModels[e.model];switch(!0){case t.includes(u.DeviceCapability.GATEWAY):case t.includes(u.DeviceCapability.SWITCH):{const{speed:t=0}=Object(r.getUplinkAttrs)(e)||{};return t>0?Object(p.b)(t):""}default:return""}})(e)}))(n,t,e)),a),[])),C=Object(n.a)(r.selectDevicesData,e=>e.map(({mac:e})=>e))},2621:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(4),r=a(126);t.a=(({type:e})=>l.a.createElement("img",{style:{width:"100%",height:"100%",padding:`0 ${"teleport"===e?4:2}px`},src:`${Object(i.useSelector)(r.a)}/${e}.svg`,alt:e}))},2622:function(e,t,a){"use strict";a.d(t,"a",function(){return p});var n=a(0),l=a.n(n),i=a(25),r=a(4),c=a(3),o=a(173),s=a(76),E=a(92),m=a(141),d=a(238),_=a(46);const u=Object(c.c)(o.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  font-weight: normal;
`,b=({mac:e,...t})=>{const a=Object(i.k)(),n=Object(r.useDispatch)(),c=Object(r.useSelector)(m.b),o=Object(r.useSelector)(d.selectDevicesBasicDataMemoized).find(t=>t.mac===e);return o?l.a.createElement(u,Object.assign({noWrap:!0,variant:"link",size:"small",onClick:t=>{t.preventDefault(),t.stopPropagation(),a.push(`/${c}/devices/properties/${e}/overview`),n(Object(s.g)({type:E.c.DEVICE,mac:e}))}},t),Object(_.c)(o)):null};t.b=b;const p=Object(c.c)(b)`
  font-size: ${({theme:e})=>e.fontSize["font-size-body"]};
`},2623:function(e,t,a){"use strict";a.d(t,"a",function(){return T});var n=a(0),l=a.n(n),i=a(3),r=a(1),c=a(10),o=a(481),s=a(47),E=a(474),m=a(6),d=a(183),_=a(1658),u=a(500);const b=Object(i.c)("div",{shouldForwardProp:e=>"portsTable"!==e})`
  display: grid;
  grid-template-columns: repeat(4, minmax(min-content, 1fr));
  grid-gap: 0 15px;
  ${({theme:e,portsTable:t})=>t?`\n  border-bottom: 1px solid ${e.motifPalette.ui04};\n  padding-bottom: 15px;\n  margin: 15px 0 20px;\n  `:`\n  margin-top: 20px;\n  padding-top: 16px;\n  border-top: 1px solid ${e.motifPalette.ui04};\n  `}
`,p=Object(i.c)("div",{shouldForwardProp:e=>"portsTable"!==e})`
  float: left;
  clear: both;

  & > span {
    float: left;
    margin-right: 14px;

    &.spacer {
      margin-right: 28px;
    }
  }
`,O=Object(i.c)(o.a)`
  white-space: normal;
`,I=Object(i.c)(s.a)`
  padding-bottom: 6px;
  padding-top: 6px;
  color: ${({theme:e})=>e.motifPalette.text02};
  display: flex;
  align-items: center;
  white-space: nowrap;

  > :not(:nth-child(1)) {
    margin-left: 4px;
  }

  svg {
    vertical-align: text-bottom;
  }
`,g=Object(i.c)(E.a,{shouldForwardProp:e=>!["background","color"].includes(e)})`
  background-color: ${e=>"transparent"!==e.background?e.theme.motifPalette[e.background]:e.background};
  border-radius: 2px;
  border: ${({color:e,theme:t})=>e&&"1px solid "+t.motifPalette[e]};
`,C={width:9,height:9};function h({stp_version:e}){switch(e){case"rstp":return l.a.createElement(I,{size:"label"},l.a.createElement(c.u,{style:C}),l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_RSTP_DISCARDING"}),l.a.createElement(O,{width:260,message:l.a.createElement(s.a,null,l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_RSTP_DISCARDING_TOOLTIP"}))},l.a.createElement(c.cb,{size:"small",isActive:!0})));case"stp":return l.a.createElement(I,{size:"label"},l.a.createElement(c.u,{style:C}),l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_STP_BLOCKING"}));case"disabled":return l.a.createElement(I,{size:"label"},l.a.createElement(c.u,{style:C}),l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_DISABLED"}));default:return""}}function T({deviceData:e,portsTable:t=!1,singleLine:a=!1,hideLabelStp:i=!1}){const{model:o,port_table:E,stp_version:T}=e;return Object(n.useMemo)(()=>{const n=Object(m.getPortSpeeds)(e),{isPoePlusPlusSupported:o,isPoePlusSupported:v,isPoeAutoSupported:f,isPoePassthroughSupported:R,isPoePassive24Supported:D}=Object(m.getDevicePoeAvailability)(e),S=Object(m.getIsInWallAp)(e),y=Object(m.getCanBePoweredByPoe)(e),P=Object(m.isUdmBase)(e)||Object(m.isUdr)(e),A=a?p:b,N=null==E?void 0:E.some(e=>{const t=Object(u.a)(e,m.switchAnomaliesMap);return e.sfp_txfault||e.sfp_rxfault||(null==t?void 0:t.length)});return l.a.createElement(A,{portsTable:t},n.sort((e,t)=>t-e).map(e=>l.a.createElement(I,{size:"label",key:e},l.a.createElement(g,{background:(e=>m.SWITCH_PORT_SPEED_COLORS[e]||"transparent")(e)}),l.a.createElement("span",null,Object(d.b)(e)))),l.a.createElement(I,{size:"label"},l.a.createElement(g,{background:m.SWITCH_PORT_SPEED_COLORS.DEFAULT}),l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_DISCONNECTED"})),l.a.createElement(I,{size:"label",className:a&&"spacer"},l.a.createElement(g,{background:"transparent",color:m.SWITCH_PORT_SPEED_COLORS.DEFAULT}),l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_DISABLED"})),(S||Object(m.isPoeSupported)(e)||y)&&l.a.createElement(l.a.Fragment,null,l.a.createElement(I,{size:"label"},l.a.createElement(c.Tb,{style:C,viewBox:"6 3 10 14"}),(f||R)&&l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_POE"}),D&&l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_POE_PASSIVE"})),(v||y)&&l.a.createElement(I,{size:"label"},l.a.createElement(c.Pb,{style:C,viewBox:"6 4 16 15"}),l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_POE_PLUS"})),o&&l.a.createElement(I,{size:"label"},l.a.createElement(c.Qb,{style:C,viewBox:"6 4 16 15"}),l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_POE_PLUS_PLUS"}))),Object(m.hasSwitch)(e)&&l.a.createElement(l.a.Fragment,null,l.a.createElement(I,{size:"label"},l.a.createElement(_.a,Object.assign({},C)),l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_AGGREGATE"})),l.a.createElement(I,{size:"label"},l.a.createElement(c.L,{style:C}),l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_MIRROR"}),l.a.createElement(O,{width:260,message:l.a.createElement(s.a,null,l.a.createElement(r.b,{id:"DEVICE_PORT_STATE_MIRROR_TOOLTIP"}))},l.a.createElement(c.cb,{size:"small",isActive:!0})))),!i&&!P&&l.a.createElement(h,{stp_version:T}),N&&l.a.createElement(I,null,l.a.createElement(c.a,{width:12,height:12}),l.a.createElement(s.a,{size:"label",color:"secondary"},l.a.createElement(r.b,{id:"DEVICE_OUTLET_STATE_WARNING"}))))},[E,o,T])}},2624:function(e,t,a){"use strict";a.d(t,"a",function(){return i});var n=a(89),l=a(46);const i=(e,t,a,i)=>{const r=e.find(e=>e.mac===a),c=Object(l.c)(r),o=Object(l.a)(r);if(c&&c!==a)return c;if(o)return o;const s=t.find(e=>"mac"in e&&e.mac===a),E=Object(n.getClientName)(s);return E&&E!==a?E:i.formatMessage({id:"DEVICE_UNKNOWN_HOSTNAME"})}},2625:function(e,t,a){"use strict";a.d(t,"a",function(){return n});const n={MAX:8}},2626:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(84),r=a(108),c=a(569);t.a=(({model:e,name:t,withName:a=!1,width:n=25,height:o=25,...s})=>{const E=i.deviceModels[e],m=a?c.a:r.c,d=a?t||(null==E?void 0:E.name):void 0;return l.a.createElement(m,Object.assign({device:{model:e,type:null==E?void 0:E.type,name:d},width:n,height:o},s))})},2627:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(132),r=a(578);t.a=(({item:e})=>{const{client_link_download_rate_kbps:t,client_link_upload_rate_kbps:a}=e,n=`${Object(i.c)(1e3*t/8,"bitrate")} / ${Object(i.c)(1e3*a/8,"bitrate")}`;return l.a.createElement(r.a,null,n)})},2628:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3),r=a(25),c=a(1),o=a(173),s=a(47),E=a(1670),m=a(10),d=a(4),_=a(5),u=a(15),b=a(6),p=a(94),O=a(131),I=a(22),g=a(107),C=a(481),h=a(1037),T=a(132),v=a(183),f=a(42),R=a(118);const D=({id:e})=>l.a.createElement(s.a,{size:"body",color:"inherit",weight:"bold"},l.a.createElement(c.b,{id:e})),S=({value:e,color:t})=>l.a.createElement(s.a,{size:"body",color:"inherit",style:{color:t},truncate:!0},e);var y=({intl:e,portConfig:t,txColor:a,rxColor:n})=>[{id:R.b.PORT_SYMBOL,minWidth:85,label:l.a.createElement(D,{id:R.c[R.b.PORT_SYMBOL]}),renderCell:({portSymbol:e})=>l.a.createElement(S,{value:e}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.port_idx)},{id:R.b.PORT_NAME,minWidth:140,label:l.a.createElement(D,{id:R.c[R.b.PORT_NAME]}),renderCell:({portName:e})=>l.a.createElement(S,{value:e}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.name)},{id:R.b.PORT_POE_MODE,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_POE_MODE]}),renderCell:e=>l.a.createElement(S,{value:Object(b.getPortPoeModeText)(e)})},{id:R.b.PORT_POE_DETECTION,minWidth:130,label:l.a.createElement(D,{id:R.c[R.b.PORT_POE_DETECTION]}),renderCell:e=>l.a.createElement(S,{value:Object(b.getPortPoeDetection)(e)})},{id:R.b.PORT_POE_CLASS,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_POE_CLASS]}),renderCell:({poe_class:e,...t})=>Object(b.isPowerDeviceDetected)(t)&&l.a.createElement(S,{value:e}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.poe_class)},{id:R.b.PORT_POE_POWER,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_POE_POWER]}),renderCell:({poe_power:e,...t})=>{const a=l.a.createElement(c.b,{id:"COMMON_UNIT_WATTS_SHORT",values:{value:e}});return Object(b.isPowerDeviceDetected)(t)&&l.a.createElement(S,{value:a})},sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.poe_power)},{id:R.b.PORT_POE_VOLTAGE,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_POE_VOLTAGE]}),renderCell:({poe_voltage:e,...t})=>{const a=l.a.createElement(c.b,{id:"COMMON_UNIT_VOLTAGE_SHORT",values:{value:e}});return(Object(b.isPowerDeviceDetected)(t)||Object(b.isPortPoeModePassive24)(t))&&l.a.createElement(S,{value:a})},sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.poe_voltage)},{id:R.b.PORT_POE_CURRENT,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_POE_CURRENT]}),renderCell:({poe_current:e,...t})=>{const a=l.a.createElement(c.b,{id:"DEVICE_PROPERTIES_SWITCH_TOOLTIP_VALUES_CURRENT",values:{current:e}});return Object(b.isPowerDeviceDetected)(t)&&l.a.createElement(S,{value:a})},sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.poe_current)},{id:R.b.PORT_OPERATION_MODE,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_OPERATION_MODE]}),renderCell:t=>l.a.createElement(S,{value:Object(b.getPortOperationMode)(t,e)})},{id:R.b.PORT_PROFILE,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_PROFILE]}),renderCell:a=>l.a.createElement(S,{value:Object(b.getPortProfile)(a,e,t)})},{id:R.b.SPEED,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.SPEED]}),renderCell:({speed:e})=>!!e&&l.a.createElement(S,{value:Object(v.b)(e)}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.speed)},{id:R.b.PORT_LINK_STATUS,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_LINK_STATUS]}),renderCell:t=>l.a.createElement(S,{value:Object(b.getPortStatus)(t,e)}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.speed)},{id:"portStp",minWidth:110,label:l.a.createElement(D,{id:"DEVICE_PROPERTIES_LABEL_STP"}),renderCell:e=>l.a.createElement(S,{value:Object(b.getPortStpStatus)(e)})},{id:R.b.PORT_ACTIVITY,minWidth:160,label:l.a.createElement(D,{id:R.c[R.b.PORT_ACTIVITY]}),renderCell:({up:e,...t})=>{const i=Object(b.getTxLinkUsage)({up:e,...t}),r=Object(b.getRxLinkUsage)({up:e,...t});return e&&l.a.createElement(_.a,{flexDirection:"column",flex:1,paddingRight:10},l.a.createElement(C.a,{width:100,message:l.a.createElement(_.a,{flexDirection:"column"},l.a.createElement(c.b,{id:"DEVICE_PROPERTIES_VALUE_ACTIVITY_TX",values:{value:Object(b.formatLinkUsage)(i)}}),l.a.createElement(c.b,{id:"DEVICE_PROPERTIES_VALUE_ACTIVITY_RX",values:{value:Object(b.formatLinkUsage)(r)}}))},l.a.createElement(h.a,{items:[{color:a,value:Object(b.thresholdLinkUsage)(i)}],height:4,style:{borderRadius:"2px"}}),l.a.createElement(h.a,{items:[{color:n,value:Object(b.thresholdLinkUsage)(r)}],height:4,style:{borderRadius:"2px"}})))}},{id:R.b.PORT_TX,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_TX]}),renderCell:({tx_bytes:e})=>l.a.createElement(S,{value:Object(T.c)(e,"bytes","JEDEC"),color:a}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.tx_bytes)},{id:R.b.PORT_RX,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_RX]}),renderCell:({rx_bytes:e})=>l.a.createElement(S,{value:Object(T.c)(e,"bytes","JEDEC"),color:n}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.rx_bytes)},{id:R.b.PORT_TX_BYTES,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_TX_BYTES]}),renderCell:({tx_bytes:e})=>l.a.createElement(S,{value:e,color:a}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.tx_bytes)},{id:R.b.PORT_RX_BYTES,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_RX_BYTES]}),renderCell:({rx_bytes:e})=>l.a.createElement(S,{value:e,color:n}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.rx_bytes)},{id:R.b.PORT_TX_PACKETS,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_TX_PACKETS]}),renderCell:({tx_packets:e})=>l.a.createElement(S,{value:e,color:a}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.tx_packets)},{id:R.b.PORT_RX_PACKETS,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_RX_PACKETS]}),renderCell:({rx_packets:e})=>l.a.createElement(S,{value:e,color:n}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.rx_packets)},{id:R.b.PORT_TX_MULTICAST,minWidth:120,label:l.a.createElement(D,{id:R.c[R.b.PORT_TX_MULTICAST]}),renderCell:({tx_multicast:e})=>l.a.createElement(S,{value:e,color:a}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.tx_multicast)},{id:R.b.PORT_RX_MULTICAST,minWidth:120,label:l.a.createElement(D,{id:R.c[R.b.PORT_RX_MULTICAST]}),renderCell:({rx_multicast:e})=>l.a.createElement(S,{value:e,color:n}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.rx_multicast)},{id:R.b.PORT_TX_BROADCAST,minWidth:120,label:l.a.createElement(D,{id:R.c[R.b.PORT_TX_BROADCAST]}),renderCell:({tx_broadcast:e})=>l.a.createElement(S,{value:e,color:a}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.tx_broadcast)},{id:R.b.PORT_RX_BROADCAST,minWidth:120,label:l.a.createElement(D,{id:R.c[R.b.PORT_RX_BROADCAST]}),renderCell:({rx_broadcast:e})=>l.a.createElement(S,{value:e,color:n}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.rx_broadcast)},{id:R.b.PORT_TX_ERRORS,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_TX_ERRORS]}),renderCell:({tx_errors:e})=>l.a.createElement(S,{value:e,color:a}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.tx_errors)},{id:R.b.PORT_RX_ERRORS,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_RX_ERRORS]}),renderCell:({rx_errors:e})=>l.a.createElement(S,{value:e,color:n}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e.rx_errors)},{id:R.b.PORT_TX_RATE,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_TX_RATE]}),renderCell:({"tx_bytes-r":e})=>l.a.createElement(S,{value:Object(T.c)(e,"bitrate"),color:a}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e["tx_bytes-r"])},{id:R.b.PORT_RX_RATE,minWidth:110,label:l.a.createElement(D,{id:R.c[R.b.PORT_RX_RATE]}),renderCell:({"rx_bytes-r":e})=>l.a.createElement(S,{value:Object(T.c)(e,"bitrate"),color:n}),sortable:!0,compare:Object(f.b)(e=>null==e?void 0:e["rx_bytes-r"])}];const P=Object(i.c)(m.g)`
  margin-right: 8px;
  color: inherit;
`;var A=e=>[{id:"portName",minWidth:100,label:l.a.createElement(s.a,{size:"label",color:"inherit",weight:"bold"},l.a.createElement(c.b,{id:"DEVICE_PROPERTIES_LABEL_NAME"})),renderCell:({portName:e})=>l.a.createElement(s.a,{size:"body",color:"inherit",truncate:!0},e)},{id:"portStatus",minWidth:100,label:l.a.createElement(s.a,{size:"label",color:"inherit",weight:"bold"},l.a.createElement(c.b,{id:"DEVICE_PROPERTIES_LABEL_STATUS"})),renderCell:({portStatus:t})=>l.a.createElement(_.a,{justifyContent:"space-between",width:"100%",alignItems:"center"},l.a.createElement(s.a,{color:"inherit",size:"body",truncate:!0},t),!e&&l.a.createElement(P,{size:"small"}))}],N=a(616);const j=Object(i.c)("div")`
  width: 100%;
  overflow-x: auto;
`,x=Object(i.c)(o.a)`
  font-size: ${({theme:e})=>e.fontSizes[2]}px;
  margin-top: 16px;
  justify-content: flex-end;
  svg {
    height: 14px;
    width: 13px;
  }
`,L=Object(i.c)("div")`
  margin-bottom: 32px;
`,V=Object(i.c)(_.a)`
  position: sticky;
  left: 0;
  align-items: center;
  margin-bottom: ${({fullData:e})=>e?16:0}px;
`,M=Object(i.c)(s.a)`
  margin-left: ${({theme:e})=>e.spacing["spacing-s"]};
`;t.a=Object(c.e)(function({deviceData:e,fullData:t=!1,columnOverride:a=[],onPortOpen:i,intl:o,...s}){const _=Object(r.k)(),C=Object(p.j)(e),h=Object(b.isUdm)(e),T=Object(d.useSelector)(u.selectNetworkGroups),v=Object(d.useSelector)(O.selectPortConf),{path:f}=Object(r.n)(),{site:R,page:D,id:S,panel:P}=Object(r.m)(),w=e=>Object(r.i)(f,{site:R,page:D,id:S,panel:P,subPanel:"ports",subPanelId:e}),F=Object(I.n)(),U={txColor:F.motifPalette.purple06,rxColor:F.motifPalette.green06},k=Object(n.useCallback)(({port_idx:e,masked:t})=>{i?i(e,!0):!t&&_.push(w(null==e?void 0:e.toString()))},[_]),W=Object(n.useCallback)(({port_idx:e})=>{i?i(e,!0):_.push(w(g.b.WAN))},[_]),B=Object(n.useMemo)(()=>t?y({intl:o,portConfig:v,...U}):A(),[]),z=Object(n.useMemo)(()=>Object(N.c)(e,T,s),[e,T,s]);if(h){const n=Object(N.a)(e,T,s),i=Object(N.e)(e,T,s),r=t?y({intl:o,portConfig:v,...U}):A(C);return l.a.createElement(j,null,!t&&l.a.createElement(L,null),l.a.createElement(V,{fullData:t},l.a.createElement(m.kb,{omitSvgMargin:!0}),l.a.createElement(M,{weight:"bold",color:"primary",size:"body"},l.a.createElement(c.b,{id:"DEVICE_PORTS_TABLE_LAN_PORTS"}))),l.a.createElement(E.a,{hideCellOverflow:!1,columns:B,columnOverride:a,rowHeight:t?49:35,disableColumnFilters:!0,items:n,onRowClick:k}),l.a.createElement(L,null),l.a.createElement(V,{fullData:t},l.a.createElement(m.Lc,{omitSvgMargin:!0}),l.a.createElement(M,{weight:"bold",color:"primary",size:"body"},l.a.createElement(c.b,{id:"DEVICE_PORTS_TABLE_WAN_PORTS"}))),l.a.createElement(E.a,{hideCellOverflow:!1,columns:r,columnOverride:a,rowHeight:t?49:35,disableColumnFilters:!0,disableTextPointer:C,disableSelection:C,items:i,onRowClick:!C||t?W:null}),C&&!t&&l.a.createElement(x,{variant:"link",onClick:W,Icon:l.a.createElement(m.Kb,{isActive:!0})},l.a.createElement(c.b,{id:"DEVICE_PORTS_TABLE_CONFIGURE_INTERFACES"})))}return l.a.createElement(j,null,l.a.createElement(E.a,{hideCellOverflow:!1,columns:B,columnOverride:a,rowHeight:t?49:35,disableColumnFilters:!0,items:z,onRowClick:k}))})},2629:function(e,t,a){"use strict";var n=a(10),l=a(173),i=a(47),r=a(623),c=a(1035),o=a(0),s=a.n(o),E=a(3),m=a(1),d=a(4),_=a(25),u=a(76),b=a(5),p=a(107),O=a(92),I=a(22);const g=Object(E.c)(l.a)`
  padding: 0;
  font-size: ${({theme:e})=>e.fontSize["font-size-m"]};
  border: 0;
  line-height: 1.6;
`,C=Object(E.c)(i.a)`
  max-width: 220px;
`;t.a=(({uplinkMac:e,uplinkName:t,uplinkPort:a,clientFixedApEnabled:E,clientMac:h})=>{const T=Object(_.k)(),v=Object(d.useDispatch)(),f=Object(I.a)("/devices/properties/:mac/"+p.a.OVERVIEW),R=Object(I.a)("/clients/properties/:mac/settings"),[D,S]=Object(o.useState)(!1),y=Object(o.useCallback)(t=>{t.preventDefault(),t.stopPropagation(),T.push(f.replace(":mac",e)),v(Object(u.g)({type:O.c.DEVICE,mac:e}))},[v,T,f,e]);return s.a.createElement(b.a,null,t?s.a.createElement(s.a.Fragment,null,s.a.createElement(g,{size:"small",variant:"link",onClick:y},s.a.createElement(C,{size:"body",color:"info",truncate:!0,weight:"bold"},t," ",a?"#"+a:"")),E?s.a.createElement(r.a,{openOnMouseEnter:!0,renderToggle:()=>s.a.createElement(b.a,{marginLeft:4},s.a.createElement(n.pb,{isActive:!0,size:"original"})),align:"topCenter",toggleOffset:-10,open:D,onChange:e=>S(e),renderCard:({open:e})=>e&&s.a.createElement(c.a,{isInteractive:!0,width:208,message:s.a.createElement(i.a,null,s.a.createElement(m.b,{id:"CLIENT_LOCK_AP_ICON_TOOLTIP",values:{here:s.a.createElement(l.a,{variant:"inline",onClick:e=>{var t,a;null===(t=null==e?void 0:e.stopPropagation)||void 0===t||t.call(e),null===(a=null==e?void 0:e.preventDefault)||void 0===a||a.call(e),T.push(R.replace(":mac",h)),v(Object(u.g)({type:O.c.CLIENT,mac:h})),S(!1)}},s.a.createElement("span",{style:{textTransform:"lowercase"}},s.a.createElement(m.b,{id:"COMMON_WORD_HERE"})))}}))})}):null):s.a.createElement(i.a,{size:"body",color:"secondary"},s.a.createElement(m.b,{id:"COMMON_HYPHEN"})))})},2630:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(1),r=a(47),c=a(104),o=a(5),s=a(89),E=a(183);t.a=(({activeItem:e})=>{const t="is_wired"in e?e.is_wired:void 0,{satisfaction:a,known:n}=Object(s.getClientExperienceFromPort)(void 0,e);if(!t&&a>0&&n)return l.a.createElement(o.a,{alignItems:"center",whiteSpace:"nowrap"},l.a.createElement(r.a,{color:Object(c.c)(a),size:"body"},a+"%"));const m="wired_rate_mbps"in e?e.wired_rate_mbps:void 0;return t&&m?l.a.createElement(o.a,{alignItems:"center",whiteSpace:"nowrap"},l.a.createElement(r.a,{color:"inherit",size:"body"},m>0?Object(E.b)(m):l.a.createElement(i.b,{id:"COMMON_HYPHEN"}))):l.a.createElement(r.a,{color:"inherit",size:"body"},l.a.createElement(i.b,{id:"COMMON_HYPHEN"}))})},2631:function(e,t,a){"use strict";a.d(t,"c",function(){return _}),a.d(t,"a",function(){return b}),a.d(t,"d",function(){return O}),a.d(t,"b",function(){return I}),a.d(t,"e",function(){return g});var n=a(2688),l=a(72),i=a(116),r=a(59),c=a(162),o=a(60);const s={[i.a.ACTIVE]:1,[i.a.OFFLINE]:2,[i.a.BLOCKED]:3,unknown:4},E=e=>Object(c.r)(e)?i.a.ACTIVE:e.type!==r.c.VPN&&e.type!==r.c.TELEPORT&&e.blocked||e.isUp?e.type!==r.c.VPN&&e.type!==r.c.TELEPORT&&e.blocked?i.a.BLOCKED:"unknown":i.a.OFFLINE,m=(e,t)=>Object(l.d)(s[E(e)],s[E(t)]),d=(e,t)=>{if(e.type!==r.c.VPN&&e.type!==r.c.TELEPORT){const{uplinkName:a}=e,n=e.type===r.c.WIRED?e.sw_port:null;return a?[a,n]:[Object(o.d)(t),null]}return[Object(o.c)(t),null]},_=(e,t,a,n,i)=>{const[r,c]=d(a,i),[o,s]=d(n,i);return Object(l.d)(r,o)||Object(l.d)(c,s)||m(a,n)},u=(e,t)=>{let a=null;switch(e.type){case r.c.WIRED:a="wired";break;case r.c.WIRELESS:a=Object(c.B)(e);break;case r.c.VPN:a="vpn";break;case r.c.TELEPORT:a="teleport"}return a||Object(o.c)(t)},b=(e,t,a,n,i)=>Object(l.d)(u(a,i),u(n,i))||m(a,n),p=(e,t)=>e.type===r.c.VPN||e.type===r.c.TELEPORT?Object(o.c)(t):e.vendor||Object(o.c)(t),O=(e,t,a,n,i)=>Object(l.d)(p(a,i),p(n,i))||b(e,t,a,n,i),I=e=>(t,a,n,i,r)=>Object(l.d)(e(n,t,r),e(i,a,r))||m(n,i),g=(e,t)=>{const a="is_wired"in e?e.is_wired:void 0,l="wired_rate_mbps"in e?e.wired_rate_mbps:void 0,{satisfaction:i,known:r}=Object(c.e)(void 0,e);switch(!0){case!a&&i>0&&r:return i*o.i;case a&&!!l:return l>0?Object(n.a)(l,1)*o.h:Object(o.a)(o.f,t);default:return Object(o.a)(o.f,t)}}},2632:function(e,t,a){"use strict";a.d(t,"a",function(){return c}),a.d(t,"b",function(){return o});var n=a(194),l=a(285),i=a(123),r=a(226);const c={[r.d.ALERT_TYPE]:Object.values(r.a)},o=Object(l.b)(n.a.ACTIVITY,i.a.ALERTS,c)},2633:function(e,t,a){"use strict";var n;a.d(t,"a",function(){return n}),(n||(n={})).RADIO="radio"},2639:function(e,t,a){e.exports=a.p+"../images/68474b3a657df0b79a1f16133608d618.png"},2640:function(e,t,a){e.exports=a.p+"../images/896960882c109433fd89c09486cfc0f1.png"},2641:function(e,t,a){e.exports=a.p+"../images/2c4f3fd05336814130381a3d418c09b1.png"},2642:function(e,t,a){e.exports=a.p+"../images/30b24022172c6e6e15a3cba5362dbf48.png"},2643:function(e,t,a){e.exports=a.p+"../images/a734bb2cc7227f8e672f96c5872fa130.png"},2644:function(e,t,a){e.exports=a.p+"../images/9de03fd81c53f0d6822343e944c92506.png"},2645:function(e,t,a){e.exports=a.p+"../images/8bfcf783c2c0196ebf98a4f9930a0442.png"},2646:function(e,t,a){e.exports=a.p+"../images/fadc4a0034a315cfb4dd7dfca8a96318.png"},2647:function(e,t,a){e.exports=a.p+"../images/e0332772cd670b1461694ff8679b12c2.png"},2648:function(e,t,a){e.exports=a.p+"../images/23aea509bb7becccdc6dc0f850b52664.png"},2649:function(e,t,a){e.exports=a.p+"../images/4da3dfc26db7d59e5992d3a6bac6e7e9.png"},2650:function(e,t,a){e.exports=a.p+"../images/972b5094e11b72a39eb452c4befe5f33.png"},2651:function(e,t,a){e.exports=a.p+"../images/7c8e7de4df9b6f9befbe12c06d96f235.png"},2652:function(e,t,a){e.exports=a.p+"../images/3037401c66da62835ac1f8426e2cf96e.png"},2653:function(e,t,a){e.exports=a.p+"../images/80a17fa93290d6b532a5deb22ce3ee4a.png"},2654:function(e,t,a){e.exports=a.p+"../images/fa9239e9a4c4beb976c56ebed7fecf41.png"},2655:function(e,t,a){e.exports=a.p+"../images/6810e72bb1f9e902d4953f82e4c08d75.png"},2656:function(e,t,a){e.exports=a.p+"../images/bc53f8af0c6fcc5d7d0ac12c037dd1d4.png"},2657:function(e,t,a){e.exports=a.p+"../images/dccf50fa26da2841db8b004b420002c7.png"},2658:function(e,t,a){e.exports=a.p+"../images/fd7b28d3b6aabfc3497989564a4bf2d8.png"},2659:function(e,t,a){e.exports=a.p+"../images/41e9817e5e150e15dbb1cbd21b8fd7f7.png"},2660:function(e,t){},2661:function(e,t,a){"use strict";a.d(t,"a",function(){return r});var n=a(0),l=a.n(n),i=a(269);const r=Object(i.a)(()=>Promise.all([a.e(0),a.e(19)]).then(a.bind(null,2775)));t.b=(()=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(r,null)))},2663:function(e,t,a){"use strict";a.d(t,"a",function(){return C}),a.d(t,"c",function(){return v}),a.d(t,"d",function(){return f}),a.d(t,"g",function(){return R}),a.d(t,"f",function(){return D}),a.d(t,"e",function(){return S}),a.d(t,"b",function(){return y});var n=a(9),l=a(27),i=a(1661),r=a(8),c=a(20),o=a(123),s=a(16),E=a(99),m=a(1687),d=a(2632),_=a(54),u=a(75),b=a(751),p=a(622),O=a(84);const I=Object.fromEntries(Object.values(O.deviceModels).map(e=>[null==e?void 0:e.name,null==e?void 0:e.type])),g=e=>{var t;return null!==(t=null==e?void 0:e.activity)&&void 0!==t?t:{}},C=(Object(n.a)(g,e=>{var t;return null!==(t=null==e?void 0:e.filters)&&void 0!==t?t:{}}),Object(n.a)(g,c.J,s.selectLocaleSettings,u.d,(e,t,a,n)=>{const l=Object(E.d)(t,a,n);return{start:(null==e?void 0:e.dateRangeStart)||Object(E.i)(new Date,l).toString(),end:(null==e?void 0:e.dateRangeEnd)||Object(E.b)(new Date,l).toString()}})),h=Object(n.a)(e=>{var t;return Object(r.z)(Object(i.a)({isAscending:null===(t=Object(c.B)(o.a.ALERTS)(e))||void 0===t?void 0:t.isAscending,timestampFrom:Date.parse(C(e).start),timestampTo:Date.parse(C(e).end)}))(e)},e=>e),T=Object(n.a)(h,l.c),v=Object(n.a)(h,l.b),f=Object(_.b)()(Object(n.a)(T,C,(e,{start:t,end:a})=>e.filter(e=>!(t&&a&&(+t>e.timestamp||+a<e.timestamp)))),e=>e),R=Object(_.b)()(Object(n.a)(f,e=>e.map(({id:e,category:t,severity:a,message:n,message_raw:l,parameters:i,target:r,timestamp:c,key:o})=>{var s,E,m,d,_,u,b;return{id:e,category:t,name:null===(s=i[r])||void 0===s?void 0:s.name,...(null===(E=null==i?void 0:i[p.e.DEVICE])||void 0===E?void 0:E.model)&&{model:i[p.e.DEVICE].model,type:null==I?void 0:I[i[p.e.DEVICE].model]},event:l,event_text:n,key:o,timestamp:c,severity:a,parameters:i,target:r,...(r===p.e.DEVICE||r===p.e.CLIENT)&&{mac:null===(m=i[r])||void 0===m?void 0:m.id,device_fingerprint_id:null===(d=i[r])||void 0===d?void 0:d.device_fingerprint_id,fingerprint_source:null===(_=i[r])||void 0===_?void 0:_.fingerprint_source},...r===p.e.CLIENT&&{unifi_device_fingerprint_icon_filename:null===(u=i[r])||void 0===u?void 0:u.unifi_device_fingerprint_icon_filename,unifi_device_fingerprint_icon_resolutions:null===(b=i[r])||void 0===b?void 0:b.unifi_device_fingerprint_icon_resolutions}}})),e=>e),D=Object(_.b)()(Object(n.a)(R,Object(b.a)("activity"),d.b,(e,t,a)=>e.reduce((e,n)=>(t&&!t.has(n.id)||Object(m.c)(a,n)||e.push(n),e),[])),e=>e),S=e=>Object(_.b)()(Object(n.a)(R,t=>t.map(t=>Object(m.a)(t,e))),e=>e),y=Object(n.a)(T,e=>{const t={};return e.reduce((e,a)=>{const{timestamp:n,type:l}=a,i=new Date(n);if(i&&l){const a=`${i.getDate()}-${i.getMonth()}/${i.getFullYear()}`;t[a]&&t[a][l]||(t[a]=t[a]||{},t[a][l]=1,e.push({type:"",date:i}))}return e},[])})},2664:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(4),r=a(1),c=a(3),o=a(25),s=a(2766),E=a(2715),m=a(2804),d=a(807),_=a(10),u=a(318),b=a(1660),p=a(5),O=a(86),I=a(228),g=a(34),C=a(22),h=a(82),T=a(524),v=a(1205);const f=()=>l.a.createElement(p.a,{flexDirection:"column"},l.a.createElement(O.a,{width:92,height:16,marginBottom:8}));var R=({isLoaded:e})=>e?l.a.createElement(h.b,{whiteSpace:"nowrap",styleNumber:16},l.a.createElement(r.b,{id:"DASHBOARD_MODULE_CLIENTS_HEADER"})):l.a.createElement(f,null),D=a(1185),S=a(746),y=a(1566);const P=Object(c.c)(m.a)`
  div[class*='rightContainer'] {
    div[class*='tabsContainer'] {
      display: none;
      @media ${g.a.VIEWPORT_XS_UP} {
        display: block;
      }
      button > span > span {
        @media ${g.a.VIEWPORT_XXXL} {
          font-size: ${({theme:e})=>e.fontSize["font-size-body"]} !important;
        }
        @media ${g.a.VIEWPORT_XXXXL} {
          font-size: ${({theme:e})=>e.fontSize["font-size-body"]} !important;
        }
      }
    }
  }
`,A=Object(c.c)(p.a)`
  @media ${g.a.VIEWPORT_S_UP} {
    flex-direction: row;
    align-items: flex-start;
  }
`,N=Object(c.c)(_.g)`
  cursor: pointer;
  color: ${({theme:e})=>e.motifPalette.neutral08};
  @media ${g.a.VIEWPORT_XXL_UP} {
    display: none;
  }
`,j=Object(c.c)(p.a)`
  margin-bottom: 32px;
  @media ${g.a.VIEWPORT_XS_UP} {
    display: none;
  }
`,x=Object(c.c)(h.a)`
  display: none;
  @media ${g.a.VIEWPORT_XXL_UP} {
    display: block;
    margin-left: 12px;
  }
`,L=({history:e,isLoaded:t})=>{var a;const[c,o]=Object(n.useState)(T.b[0].id),[m,_]=Object(n.useState)([]),O=Object(i.useDispatch)(),g=Object(i.useSelector)(u.j),h=Object(i.useSelector)(I.d),f=Object(C.a)("/statistics/traffic/topapplications"),D=Object(n.useCallback)(()=>e.push(f),[f]),L=Object(n.useCallback)(Object(b.a)(),[]),V=Object(n.useCallback)(e=>o(e&&e.id),[]),M=(null===(a=null==h?void 0:h.groups)||void 0===a?void 0:a[c])||[],w=Object(s.a)(M,"activity"),F=Object(n.useCallback)(({os_class:e,computed_engine:t=0})=>{const a=g.get(t);return a&&a.osClasses.get(e)||l.a.createElement(r.b,{id:"DASHBOARD_MODULE_CLIENTS_OS_UNKNOWN"})},[g]);Object(n.useEffect)(()=>{const e=Object(u.g)();M.length&&Object(E.a)(M.map(({computed_engine:t}={})=>t||e.id)).forEach(e=>{m.includes(e)||void 0!==e&&(O(Object(u.e)(e)),_([...m,e]))})},[O,m,M]);const U=Object(n.useMemo)(()=>{const e=M.sort((e,t)=>-1===e.os_class||1===e.os_class?1:-1===t.os_class||1===t.os_class?-1:e.total-t.total).map(e=>({...e,traffic:(e.rx_bytes||0)+(e.tx_bytes||0)})),t=e.findIndex(({os_class:e},t)=>5===t||e<=1),a=-1!==t?e.splice(5===t?t-1:t):[],n=a.reduce((e,{activity:t,total:a,satisfaction:n,rx_bytes:l,tx_bytes:i})=>({total:e.total+a,activity:e.activity+t,satisfaction:e.satisfaction+n,rx_bytes:e.rx_bytes+(l||0),tx_bytes:e.tx_bytes+(i||0),traffic:e.traffic+((l||0)+(i||0))}),{total:0,activity:0,satisfaction:0,rx_bytes:0,tx_bytes:0,traffic:0}),l={...n,satisfaction:a.length>0?n.satisfaction/a.length:0,os_class:1};return[...e,l].filter(({total:e})=>0!==e).map(({activity:e,os_class:t,computed_engine:a,satisfaction:n,total:l,rx_bytes:i,tx_bytes:r,traffic:c})=>({activity:e,activityPercent:Math.min(Math.round(e/w*100),100),color:L(t.toString()),experience:Math.max(Math.min(n,100),60),id:t,value:l,type:F({os_class:t,computed_engine:a}),rx_bytes:i||0,tx_bytes:r||0,traffic:c||0,os_class:t}))},[M,w,L,F]);return l.a.createElement(P,{height:"auto",title:l.a.createElement(R,{isLoaded:t}),action:l.a.createElement(p.a,{alignItems:"center"},l.a.createElement(x,{styleNumber:15,variant:"inline",onClick:D},l.a.createElement(r.b,{id:"DASHBOARD_MODULE_CLIENTS_VIEW_TRAFFIC_ACTION"})),l.a.createElement(N,{width:16,height:16,onClick:D})),options:T.b,onSelectOption:V},l.a.createElement(p.a,{alignItems:"center",flex:"1",justifyContent:"center"},l.a.createElement(A,{flex:"1",alignItems:"center",justifyContent:"center",flexDirection:"column"},l.a.createElement(j,null,l.a.createElement(d.a,{variant:"tertiary",tabs:T.b,onSelectTab:V})),l.a.createElement(y.b,{isLoaded:t,clients:U}),l.a.createElement(S.c,{justifyContent:"flex-start",flex:"1"},l.a.createElement(v.a,{tableItems:U})))))},V=({isLoaded:e,placeholder:t})=>{const a=e&&t;return l.a.createElement(P,{height:"auto",leftContent:l.a.createElement(R,{isLoaded:a}),action:a?l.a.createElement(x,{styleNumber:15,variant:"inline"},l.a.createElement(r.b,{id:"DASHBOARD_MODULE_CLIENTS_VIEW_TRAFFIC_ACTION"})):l.a.createElement(p.a,{flexDirection:"column",alignItems:"flex-end"},l.a.createElement(p.a,{marginBottom:8},l.a.createElement(O.a,{width:24,height:16,marginRight:8}),l.a.createElement(O.a,{width:24,height:16,marginRight:8}),l.a.createElement(O.a,{width:24,height:16,marginRight:8}),l.a.createElement(O.a,{width:24,height:16,marginRight:8}),l.a.createElement(O.a,{width:68,height:16}))),options:a&&T.b},l.a.createElement(p.a,{alignItems:"center",flex:"1",justifyContent:"center"},l.a.createElement(A,{flex:"1",alignItems:e?"flex-start":"center",justifyContent:"center"},l.a.createElement(y.b,{isLoaded:e,placeholderActiveClients:119,clients:a?D.a:[]}),l.a.createElement(S.c,{flexDirection:"column",flex:"1",justifyContent:"center"},a?l.a.createElement(v.a,{tableItems:D.a}):l.a.createElement(p.a,{marginLeft:8,flexDirection:"column"},l.a.createElement(p.a,{alignItems:"center",justifyContent:"flex-start",marginBottom:12},l.a.createElement(O.a,{width:12,height:12,marginRight:4}),l.a.createElement(O.a,{width:24,height:12,marginRight:38}),l.a.createElement(O.a,{width:100,height:4,marginRight:14}),l.a.createElement(O.a,{width:50,height:12,marginRight:14}),l.a.createElement(O.a,{width:24,height:12})),l.a.createElement(p.a,{alignItems:"center",justifyContent:"flex-start",marginBottom:12},l.a.createElement(O.a,{width:12,height:12,marginRight:4}),l.a.createElement(O.a,{width:44,height:12,marginRight:18}),l.a.createElement(O.a,{width:100,height:4,marginRight:14}),l.a.createElement(O.a,{width:50,height:12,marginRight:14}),l.a.createElement(O.a,{width:24,height:12})),l.a.createElement(p.a,{alignItems:"center",justifyContent:"flex-start",marginBottom:12},l.a.createElement(O.a,{width:12,height:12,marginRight:4}),l.a.createElement(O.a,{width:34,height:12,marginRight:28}),l.a.createElement(O.a,{width:100,height:4,marginRight:14}),l.a.createElement(O.a,{width:50,height:12,marginRight:14}),l.a.createElement(O.a,{width:24,height:12})),l.a.createElement(p.a,{alignItems:"center",justifyContent:"flex-start"},l.a.createElement(O.a,{width:12,height:12,marginRight:4}),l.a.createElement(O.a,{width:54,height:12,marginRight:8}),l.a.createElement(O.a,{width:100,height:4,marginRight:14}),l.a.createElement(O.a,{width:50,height:12,marginRight:14}),l.a.createElement(O.a,{width:24,height:12})))))))};t.a=Object(o.o)(e=>e.isLoaded&&!e.placeholder?l.a.createElement(L,Object.assign({},e)):l.a.createElement(V,{isLoaded:e.isLoaded,placeholder:e.placeholder}))},2666:function(e,t,a){"use strict";a.d(t,"a",function(){return l});var n=a(0);function l(e,t,a=[]){const l=a=>{e&&e.current&&a.target!==e.current&&!e.current.contains(a.target)&&t(a)};Object(n.useEffect)(()=>(document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}),a)}},2667:function(e,t,a){"use strict";a.d(t,"a",function(){return r});var n=a(0),l=a.n(n),i=a(269);const r=Object(i.a)(()=>Promise.all([a.e(0),a.e(16)]).then(a.bind(null,2779)));t.b=(()=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(r,null)))},2668:function(e,t,a){"use strict";a.d(t,"a",function(){return r});var n=a(0),l=a.n(n),i=a(269);const r=Object(i.a)(()=>Promise.all([a.e(0),a.e(20)]).then(a.bind(null,2780)));t.b=(({dispatch:e,onRestoreDefaults:t})=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(r,{dispatch:e,onRestoreDefaults:t})))},2674:function(e){e.exports=JSON.parse('{"v":"5.5.10","fr":60,"ip":0,"op":35,"w":110,"h":110,"nm":"Network Loading","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Oval 8 Copy 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[55,55,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[63,63],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"gs","o":{"a":0,"k":100,"ix":9},"w":{"a":0,"k":7,"ix":10},"g":{"p":3,"k":{"a":0,"k":[0,0,0.435,1,0.5,0.137,0.608,0.996,1,0.275,0.78,0.992],"ix":8}},"s":{"a":0,"k":[0,32.548],"ix":4},"e":{"a":0,"k":[0,-32.272],"ix":5},"t":1,"lc":1,"lj":1,"ml":4,"ml2":{"a":0,"k":4,"ix":13},"bm":0,"nm":"Gradient Stroke 1","mn":"ADBE Vector Graphic - G-Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[39.062,39.062],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Oval 8 Copy 3","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1554,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Oval 8 Copy","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[55,55,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[160,160],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"bm":0,"g":{"p":5,"k":{"a":0,"k":[0,0.761,0.769,0.808,0.198,0.8,0.81,0.847,0.397,0.839,0.851,0.886,0.698,0.92,0.925,0.943,1,1,1,1],"ix":9}},"s":{"a":0,"k":[-2.9,84],"ix":5},"e":{"a":0,"k":[0,-101.047],"ix":6},"t":1,"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[39.062,39.062],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Oval 8 Copy","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":1554,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":3,"nm":"NULL CONTROL","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[53.209,55.001,0],"ix":2},"a":{"a":0,"k":[60,60,0],"ix":1},"s":{"a":0,"k":[74,74,100],"ix":6}},"ao":0,"ip":0,"op":4506,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 6","parent":3,"sr":1,"ks":{"o":{"a":0,"k":32,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":35,"s":[360]}],"ix":10},"p":{"a":0,"k":[52.25,62.396,0],"ix":2},"a":{"a":0,"k":[-144.881,-0.249,0],"ix":1},"s":{"a":0,"k":[88,88,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-31.021,0],[0,-31.021],[31.021,0],[0,31.021]],"o":[[31.021,0],[0,31.021],[-31.021,0],[0,-31.021]],"v":[[0,-56.168],[56.168,0],[0,56.168],[-56.168,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"bm":0,"g":{"p":3,"k":{"a":0,"k":[0,0.449,0.882,0.983,0.5,0.246,0.783,0.992,1,0.043,0.685,1,0,1,0.485,0.5,0.97,0],"ix":9}},"s":{"a":0,"k":[0,0],"ix":5},"e":{"a":0,"k":[57.311,0],"ix":6},"t":2,"h":{"a":0,"k":0,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-142.707,-11.934],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":4506,"st":-348,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 5","parent":3,"sr":1,"ks":{"o":{"a":0,"k":76,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":35,"s":[360]}],"ix":10},"p":{"a":0,"k":[67.75,57.896,0],"ix":2},"a":{"a":0,"k":[-144.881,-0.249,0],"ix":1},"s":{"a":0,"k":[88,88,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-31.021,0],[0,-31.021],[31.021,0],[0,31.021]],"o":[[31.021,0],[0,31.021],[-31.021,0],[0,-31.021]],"v":[[0,-56.168],[56.168,0],[0,56.168],[-56.168,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"bm":0,"g":{"p":3,"k":{"a":0,"k":[0,0.449,0.882,0.983,0.5,0.246,0.783,0.992,1,0.043,0.685,1,0,1,0.485,0.5,0.97,0],"ix":9}},"s":{"a":0,"k":[0,0],"ix":5},"e":{"a":0,"k":[57.311,0],"ix":6},"t":2,"h":{"a":0,"k":0,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-142.707,-11.934],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":4506,"st":-348,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Shape Layer 4","parent":3,"sr":1,"ks":{"o":{"a":0,"k":52,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":35,"s":[-360]}],"ix":10},"p":{"a":0,"k":[62.265,59.969,0],"ix":2},"a":{"a":0,"k":[-157.416,-7.902,0],"ix":1},"s":{"a":0,"k":[77,96,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-31.021,0],[0,-31.021],[31.021,0],[0,31.021]],"o":[[31.021,0],[0,31.021],[-31.021,0],[0,-31.021]],"v":[[0,-56.168],[56.168,0],[0,56.168],[-56.168,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"bm":0,"g":{"p":3,"k":{"a":0,"k":[0,0.449,0.466,0.983,0.5,0.246,0.282,0.992,1,0.043,0.097,1,0,1,0.485,0.5,0.97,0],"ix":9}},"s":{"a":0,"k":[0,0],"ix":5},"e":{"a":0,"k":[57.311,0],"ix":6},"t":2,"h":{"a":0,"k":0,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-150.895,-6],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":4506,"st":-348,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Shape Layer 3","parent":3,"sr":1,"ks":{"o":{"a":0,"k":69,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":35,"s":[360]}],"ix":10},"p":{"a":0,"k":[61.693,59.624,0],"ix":2},"a":{"a":0,"k":[-149.145,-7,0],"ix":1},"s":{"a":0,"k":[106,96,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-31.021,0],[0,-31.021],[31.021,0],[0,31.021]],"o":[[31.021,0],[0,31.021],[-31.021,0],[0,-31.021]],"v":[[0,-56.168],[56.168,0],[0,56.168],[-56.168,0]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"gf","o":{"a":0,"k":100,"ix":10},"r":1,"bm":0,"g":{"p":3,"k":{"a":0,"k":[0,0.449,0.844,0.983,0.5,0.246,0.681,0.992,1,0.043,0.518,1,0.187,1,0.578,0.5,0.97,0],"ix":9}},"s":{"a":0,"k":[0,0],"ix":5},"e":{"a":0,"k":[57.311,0],"ix":6},"t":2,"h":{"a":0,"k":0,"ix":7},"a":{"a":0,"k":0,"ix":8},"nm":"Gradient Fill 1","mn":"ADBE Vector Graphic - G-Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-150.895,-6],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":4506,"st":-348,"bm":0}],"markers":[]}')},2677:function(e,t,a){"use strict";var n=a(2664);a.d(t,"ClientsModule",function(){return n.a}),a(1205),a(2660)},2679:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),i=a(3),r=a(25),c=a(4),o=a(55),s=a(2810),E=a(310),m=a(803),d=a(804),_=a(648),u=a(647),b=a(124),p=a(271),O=a(1131),I=a(256),g=a(227),C=a(5),h=a(867),T=a(8);const v="\nlinear-gradient(\n  90deg,\n  rgba(255, 255, 255, 0) 0%,\n  rgba(255, 255, 255, 0.7) 40%,\n  rgba(255, 255, 255, 0.7) 60%,\n  rgba(255, 255, 255, 0) 100%\n);",f="\nlinear-gradient(\n  90deg,\n  rgba(35, 35, 35, 0) 0%,\n  rgba(35, 35, 35, 0.8) 40%,\n  rgba(35, 35, 35, 0.8) 60%,\n  rgba(35, 35, 35, 0) 100%\n);";var R=Object(i.c)(C.a)`
  height: 100%;
  ${({isLoaded:e,motif:t})=>!e&&`\n    position: absolute;\n    display: flex;\n    width: 100%;\n    height: auto;\n    min-height: 100%;\n\n    &:before {\n      content: '';\n      position: absolute;\n      top: 1px;\n      left: 1px;\n      width: 100%;\n      height: 100%;\n      transform: translateX(-100%);\n      z-index: 2;\n      background: ${"dark"===t?f:v}\n        \n      animation-name: animation;\n      animation-duration: 3s;\n      animation-iteration-count: infinite;\n      animation-delay: 1.5s;\n      animation-timing-function: linear;\n    }\n    &:after {\n      content: '';\n      position: absolute;\n      top: 1px;\n      left: 1px;\n      width: 100%;\n      height: 100%;\n      transform: translateX(-100%);\n      background: ${"dark"===t?f:v}\n      animation-name: animation;\n      animation-duration: 3s;\n      animation-iteration-count: infinite;\n      animation-timing-function: linear;\n    }`};
  @keyframes animation {
    from {
      transform: translateX(-100%);
    }
    to {
      transform: translatex(100%);
    }
  }
`,D=a(2604),S=a(805),y=a(518),P=a(154),A=a(335),N=a(92),j=a(362),x=a(393),L=a(861),V=a(86),M=a(260),w=a(34);const F=Object(i.c)(C.a)`
  border-top: 1px solid ${({theme:e})=>e.motifPalette.neutral03};
  padding: 12px 16px;
  @media ${w.a.VIEWPORT_XS_UP} {
    padding: 24px;
  }
  @media ${w.a.VIEWPORT_M} {
    padding: 0;
    border-top: 0;
  }
`;var U=a(6),k=a(95),W=a(1),B=a(10),z=a(807),H=a(47),G=a(985),$=a(115),Y=a(31),X=a(76),K=a(491),Z=a(325),q=a(187),J=a(423),Q=a(107),ee=a(82),te=a(210),ae=a.n(te),ne=a(132),le=a(108),ie=a(1659),re=a(22);const ce=Object(i.c)(C.a)`
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.neutral03};
  @media ${w.a.VIEWPORT_M} {
    border-bottom: 0;
    padding-bottom: 0;
    margin-bottom: 12px;
  }
`,oe=Object(i.c)(C.a,{shouldForwardProp:e=>"color"!==e})`
  background: ${({color:e,theme:t})=>ae()(t.motifPalette[e]).alpha(.1).css()};
  border: 1px solid ${({color:e,theme:t})=>t.motifPalette[e]};
  border-radius: 100%;
  position: relative;
  height: 42px;
  width: 42px;
`,se=Object(i.c)(B.q,{shouldForwardProp:e=>"statusColor"!==e})`
  color: ${({statusColor:e,theme:t})=>t.motifPalette[e]};
  position: absolute;
  bottom: 0;
  right: 0;
`,Ee=Object(i.c)(B.pc,{shouldForwardProp:e=>"statusColor"!==e})`
  color: ${({statusColor:e,theme:t})=>t.motifPalette[e]};
  position: absolute;
  bottom: 0;
  right: 0;
`,me=Object(i.c)(B.uc,{shouldForwardProp:e=>"statusColor"!==e})`
  position: absolute;
  bottom: 0;
  right: 0;
  circle {
    fill: ${({statusColor:e,theme:t})=>t.motifPalette[e]};
  }
`,de=Object(i.c)("div")`
  margin-left: 8px;
`;var _e=()=>{const e=Object(re.n)(),t=Object(c.useSelector)(U.selectAvailableUlteDevice),a=Object(c.useSelector)(U.selectUlteSignalStrength),i=Object(n.useMemo)(()=>Object(U.calculateUsage)(t),[t]),r=$.o[i.state],o=Object(n.useMemo)(()=>{return e=t,Object(U.getDeviceState)(e)===U.DeviceState.DISCONNECTED?{state:"DISCONNECTED",color:"neutral06",icon:l.a.createElement(me,{height:"12",width:"12",statusColor:"neutral06"})}:Object(U.isUlteFailoverActive)(e)?{state:"ACTIVE",color:"success",icon:l.a.createElement(se,{height:"12",width:"12",statusColor:"success"})}:e.lte_state===U.LteState.Ready?{state:"READY",color:"success",icon:l.a.createElement(se,{height:"12",width:"12",statusColor:"success"})}:{state:"WARNING",color:"warning",icon:l.a.createElement(Ee,{height:"12",width:"14",statusColor:"warning"})};var e},[t]);return l.a.createElement(ce,{alignItems:"center",justifyContent:"space-between",width:"100%",paddingBottom:16,marginBottom:16},l.a.createElement(oe,{flex:"none",justifyContent:"center",alignItems:"center",color:o.color},l.a.createElement(le.c,{device:{model:t.model,type:t.type}}),o.icon),l.a.createElement(de,null,l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_LTE_INTERNET_LABEL"})," ",l.a.createElement(W.b,{id:"DASHBOARD_MODULE_LTE_STATE_"+o.state})),l.a.createElement(C.a,{justifyContent:"flex-end",alignItems:"baseline"},l.a.createElement(ie.a,{inactiveColor:e.motifPalette.icon02,width:16,height:16,color:e.motifPalette.success,strength:a}),"READY"===o.state||"ACTIVE"===o.state?l.a.createElement(l.a.Fragment,null,l.a.createElement(ee.b,{styleNumber:8,colorOverride:r,style:{margin:"-1px 2px 0 4px"}},Object(ne.c)(i.usedBytes,"bytes","JEDEC")),t.lte_soft_limit>0&&l.a.createElement(ee.b,{styleNumber:5},"/"+Object(ne.c)(i.softLimitBytes,"bytes","JEDEC"))):l.a.createElement(ee.b,{styleNumber:5,style:{margin:"-1px 2px 0 4px"}},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_LTE_NO_DATA"})))))},ue=a(200);const be=Object(i.c)(z.a)`
  justify-content: flex-start;
  margin-bottom: 16px;
  margin-left: -12px;
  flex-grow: 0;
  > div {
    margin: initial;
  }
`,pe=Object(i.c)(Y.f)`
  > div {
    overflow: hidden;
    display: block !important;
  }
`,Oe=Object(i.c)(Y.f)`
  border-left: 1px solid ${({theme:e})=>e.motifPalette.neutral03};
`,Ie=[{id:k.a.WAN,label:"WAN1"},{id:k.a.WAN2,label:"WAN2"}];var ge=({ispInfoItems:e,selectedTab:t,setSelectedTab:a,isp:i})=>{var o,s,E,m,d;const _=Object(c.useSelector)(U.selectHasAdoptedUlteDevice),u=Object(c.useSelector)(K.b),b=Object(c.useSelector)(K.d),p=Object(c.useSelector)(q.d),O=Object(c.useSelector)(q.g),I=Object(c.useDispatch)(),g=Object(r.k)(),{path:C}=Object(r.n)(),{pathname:h}=Object(r.l)(),{site:T}=Object(r.m)(),v=C+"/:section?/:id?/:panel?/:subPanel?",f=(null===(o=null==i?void 0:i.statistics)||void 0===o?void 0:o.uptime_percentage)&&-1!==i.statistics.uptime_percentage,R=(null==i?void 0:i.uptime)&&-1!==i.uptime,D=Object(n.useCallback)(e=>{const t=Object(r.i)(v,{id:e,panel:Q.a.OVERVIEW,section:"properties",site:T});t!==h&&g.push(t),I(Object(X.g)({type:N.c.ISP_DETAILS,id:e}))},[I,g,h,v,T]);return l.a.createElement(l.a.Fragment,null,_&&l.a.createElement(_e,null),e.length>1&&l.a.createElement(be,{tabs:Ie,selectedTab:t,onSelectTab:e=>{return t=e.id,a(t),void(u&&b===N.c.ISP_DETAILS&&D(t));var t},variant:"tertiary"}),(null===(E=null===(s=null==i?void 0:i.details)||void 0===s?void 0:s.service_provider)||void 0===E?void 0:E.name)&&l.a.createElement(ue.g,{justifyContent:"space-between"},l.a.createElement(Y.f,{marginRight:"20%"},l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_HEADER"}))),l.a.createElement(pe,{overflow:"hidden",alignItems:"center"},l.a.createElement(ee.a,{styleNumber:p?7:24,variant:"inline",onClick:()=>D(i.networkgroup),Icon:!p&&l.a.createElement(B.W,{color:$.o.danger}),truncate:!0},i.details.service_provider.name))),!p&&l.a.createElement(Y.f,{paddingBottom:"32px",paddingTop:"8px"},l.a.createElement(Z.a,{level:"warning"},l.a.createElement(H.a,{size:"caption"},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_NO_INTERNET_WARNING",values:{time:Object(J.c)((null===(d=null===(m=null==O?void 0:O.uptime_stats)||void 0===m?void 0:m[t])||void 0===d?void 0:d.downtime)||0,!0)}})))),f||R?l.a.createElement(ue.g,{justifyContent:"space-between"},l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"COMMON_WORD_UPTIME"})),l.a.createElement(Y.f,null,f?l.a.createElement(ee.b,{styleNumber:8,colorOverride:G.a.getGradientColor(Math.max(0,Math.round(i.statistics.uptime_percentage))/100)},Math.max(0,Math.round(i.statistics.uptime_percentage)),"%"):null,f&&R?l.a.createElement(Oe,{margin:"0 12px"}):null,R?l.a.createElement(ee.b,{styleNumber:5},l.a.createElement(Y.d,{uptime:i.uptime})):null)):null)},Ce=a(2808),he=a(1148),Te=a(851),ve=a(2794),fe=a(1209),Re=a(228),De=a(1186),Se=a(48);const ye=Object(i.c)(B.j)`
  position: relative;
  left: -50%;
  margin-top: 2px;
`,Pe=Object(i.c)(De.a)`
  transition: all 300ms ease;
  span {
    position: relative;
    left: -50%;
    font-size: 14px;
    line-height: 14px;
    @media ${w.a.VIEWPORT_XXL_DOWN} {
      font-size: 12px;
    }
  }
`;var Ae=l.a.memo(({usagePercentage:e})=>l.a.createElement(Pe,{style:{transform:`translate(${e}, 0)`},icon:l.a.createElement(ye,{color:Se.a["blue-3"],width:8,height:8}),iconSize:"small",text:e,textPlacement:"below"}));const Ne=Object(i.c)("div")`
  white-space: nowrap;
`,je=Object(i.c)(H.a)`
  line-height: 20px !important;
  margin-bottom: 8px;
`,xe=Object(i.c)(H.a)`
  margin-bottom: 16px;
`,Le=Object(i.c)(Ce.a,{shouldForwardProp:e=>"peakBitratePercentage"!==e})`
  margin: 18px 0 0 !important;
  box-sizing: content-box;
  height: 12px;
  position: relative;
  @media ${w.a.VIEWPORT_XXL_DOWN} {
    height: 8px;
    margin: 12px 0 0 !important;
  }
  @media ${w.a.VIEWPORT_XL_DOWN} {
    margin: 8px 0 0 !important;
  }
  &::before {
    content: '';
    position: absolute;
    display: ${({peakBitratePercentage:e})=>e?"block":"none"};
    height: 22px;
    border-left: 1px dotted ${({theme:e})=>e.colors.blue};
    top: 50%;
    transform: translateY(-50%);
    left: ${({peakBitratePercentage:e})=>e}%;
    @media ${w.a.VIEWPORT_XXL_DOWN} {
      height: 16px;
    }
  }
  canvas {
    height: 12px !important;
    border: 1px solid ${({theme:e})=>e.motifPalette.ui04} !important;
    background: ${({theme:e})=>e.motifPalette.ui01} !important;
    border-radius: 6px !important;
    @media ${w.a.VIEWPORT_XXL_DOWN} {
      height: 8px !important;
    }
  }
`,Ve=({networkGroup:e,bytesType:t,capacity:a,currentBitrate:i})=>{const r=Object(c.useSelector)(Re.h),o=Object(n.useMemo)(()=>new ne.a(a,"bitrate"),[a]),s=r[`${e}_peak_${"tx"===t?"transmitted":"received"}_bytes_rate`],E=Object(he.a)(Math.min(1,i.bytes/o.bytes)),m=Math.round(Math.min(100,s/o.bytes*100)),d=Object(n.useMemo)(()=>{const a=(null==r?void 0:r[`${e}_utilization_${"tx"===t?"up":"down"}`])||[];return a.map(e=>{var t;return{duration:e.seconds_spent,value:Object(fe.a)().domain([0,null===(t=Object(ve.a)(a,"seconds_spent"))||void 0===t?void 0:t.seconds_spent]).range([51,255]).clamp(!0)(e.seconds_spent)*(e.seconds_spent?1:0),usage:e.usage_percentage,width:1,rate:i.bytes}})},[e,r,t,i.bytes]);return l.a.createElement(l.a.Fragment,null,l.a.createElement(Le,{peakBitratePercentage:m,items:d,itemTooltip:e=>({message:l.a.createElement(Ne,null,l.a.createElement(xe,{weight:"bold"},l.a.createElement(W.b,{id:`DASHBOARD_MODULE_INTERNET_${t.toUpperCase()}_UTILIZATION`})),l.a.createElement(Y.f,{justifyContent:"space-between"},l.a.createElement(je,null,l.a.createElement(W.b,{id:"DASHBOARD_STATUS_LIST_DURATION"})),l.a.createElement(je,null,l.a.createElement(Y.d,{uptime:e.duration}))),l.a.createElement(Y.f,{justifyContent:"space-between"},l.a.createElement(je,null,l.a.createElement(W.b,{id:"DASHBOARD_STATUS_LIST_UTILIZATION"})),l.a.createElement(je,null,Object(he.a)(e.usage/100))),l.a.createElement(Y.f,{justifyContent:"space-between"},l.a.createElement(je,null,l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_CAPACITY"})),l.a.createElement(je,null,`${o.value} ${o.unit}`)),l.a.createElement(Y.f,{justifyContent:"space-between"},l.a.createElement(je,null,l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_REAL_TIME"})),l.a.createElement(Y.q,{bytes:i.bytes||0,direction:"tx"===t?"up":"down"})),l.a.createElement(Y.f,{justifyContent:"space-between"},l.a.createElement(je,null,l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_REAL_TIME"})),l.a.createElement(je,null,E)),l.a.createElement(Y.f,{justifyContent:"space-between"},l.a.createElement(je,null,l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_PEAK"})),l.a.createElement(Y.q,{bytes:s||0,direction:"tx"===t?"up":"down"})),l.a.createElement(Y.f,{justifyContent:"space-between"},l.a.createElement(je,null,l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_PEAK"})),l.a.createElement(je,null,m,"%"))),width:250})}),l.a.createElement(Ae,{usagePercentage:E}))};var Me=({isp:e})=>{var t,a;const i=null===(t=e.networkgroup)||void 0===t?void 0:t.toLowerCase(),{downloadCapacityBps:r,uploadCapacityBps:c}=Object(n.useMemo)(()=>{var t,a,n,l;return{downloadCapacityBps:1e3*((null===(a=null===(t=null==e?void 0:e.configuration)||void 0===t?void 0:t.wan_provider_capabilities)||void 0===a?void 0:a.download_kilobits_per_second)||0)/8,uploadCapacityBps:1e3*((null===(l=null===(n=null==e?void 0:e.configuration)||void 0===n?void 0:n.wan_provider_capabilities)||void 0===l?void 0:l.upload_kilobits_per_second)||0)/8}},[null===(a=null==e?void 0:e.configuration)||void 0===a?void 0:a.wan_provider_capabilities]),o=null==e?void 0:e["rx_bytes-r"],s=null==e?void 0:e["tx_bytes-r"],E=Object(n.useMemo)(()=>new ne.a(o||0,"bitrate"),[o]),m=Object(n.useMemo)(()=>new ne.a(s||0,"bitrate"),[s]);return l.a.createElement(l.a.Fragment,null,r>0&&l.a.createElement(Y.f,{flexDirection:"column",marginBottom:16},l.a.createElement(Y.f,{justifyContent:"space-between"},l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_RX_UTILIZATION"})),l.a.createElement(ee.b,{styleNumber:5},l.a.createElement(Te.a,{type:"bytes",input:E.bytes,options:"bitrate"}))),l.a.createElement(Ve,{networkGroup:i,bytesType:"rx",currentBitrate:E,capacity:r})),c>0&&l.a.createElement(l.a.Fragment,null,l.a.createElement(Y.f,{justifyContent:"space-between"},l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_TX_UTILIZATION"})),l.a.createElement(ee.b,{styleNumber:5},l.a.createElement(Te.a,{type:"bytes",input:m.bytes,options:"bitrate"}))),l.a.createElement(Ve,{networkGroup:i,bytesType:"tx",currentBitrate:m,capacity:c})))},we=a(1646),Fe=a(20),Ue=a(16),ke=a(75),We=a(99),Be=a(749),ze=a(2795),He=a(2798),Ge=a(173),$e=a(2551),Ye=a(242),Xe=a(46),Ke=a(9);const Ze=e=>e.shared.speedTest.state,qe=e=>{const t=e.map(e=>e.records.map(e=>e[1]))[0];return t.reduce((e,t)=>e+t,0)/t.length/100/8*1e6},Je=Object(Ke.a)(Ye.selectSpeedTestStatusData,e=>{const t={download:[],upload:[]};e.forEach(e=>{e["download-progress"]&&!e["upload-progress"]&&t.download.push(qe(e["download-progress"])),e["upload-progress"]&&t.upload.push(qe(e["upload-progress"]))});const a=Object(Be.a)(e);return{...t,...(null==a?void 0:a.server)&&{server:null==a?void 0:a.server},ping:Math.round((null==a?void 0:a.latency)||0)}});var Qe=a(437),et=a(386),tt=a(196);const at=Object(i.c)("div")`
  background-color: ${({theme:e})=>e.motifPalette.uiBase};
  width: 100%;
`,nt=Object(i.c)("div")`
  position: relative;
  text-align: left;
  padding: 14px 24px 26px;
`,lt=Object(i.c)(H.a)`
  text-transform: capitalize;
`,it=Object(i.c)(Qe.CloseIconThin)`
  position: absolute;
  top: 20px;
  right: 20px;
  color: ${({theme:e})=>e.motifPalette.neutral08};
  z-index: 1;
`,rt=Object(i.c)(ze.a)`
  padding: 0 24px;
`,ct=({speedTestState:e,isUpload:t,onClose:a})=>{let n="SPEED_TEST_IN_PROGRESS";switch(e){case Ye.SpeedTestState.TIMEOUT:n="SPEED_TEST_TIMEOUT";break;case Ye.SpeedTestState.FAILED:n="SPEED_TEST_FAILED";break;case Ye.SpeedTestState.FINISHED:n="SPEED_TEST_FINISHED"}return l.a.createElement(nt,null,l.a.createElement(lt,{size:"header-xs",color:"primary",weight:"bold"},l.a.createElement(W.b,{id:n,values:{type:t?"upload":"download"}})),l.a.createElement(it,{actionable:!0,onClick:a,width:16,height:16}))};var ot=Object(W.e)(({intl:e,isp:t,setIsSpeedTestPanelOpen:a})=>{var i;const o=Object(c.useSelector)(tt.a),s=Object(c.useSelector)(U.selectSiteGateway),E=Object(c.useSelector)(Ze),m=Object(r.k)(),d=Object(c.useDispatch)(),_=Object(c.useSelector)(Je),u=Object(re.a)("/settings/internet/:activeWanId"),{server:b,...p}=_,O=E===Ye.SpeedTestState.IN_PROGRESS,I=p.upload.length>0,g=Object(n.useMemo)(()=>Object(Xe.e)(s.model),[s.model]),C=Object(n.useMemo)(()=>{var e,t;return{download:O&&!I&&null!==(e=Object(Be.a)(p.download))&&void 0!==e?e:null,upload:O&&I&&null!==(t=Object(Be.a)(p.upload))&&void 0!==t?t:null,ping:p.ping}},[O,I,p]),{downloadCapacityBps:h,uploadCapacityBps:T}=Object(n.useMemo)(()=>{var e,a,n,l;return{downloadCapacityBps:1e3*((null===(a=null===(e=null==t?void 0:t.configuration)||void 0===e?void 0:e.wan_provider_capabilities)||void 0===a?void 0:a.download_kilobits_per_second)||0)/8,uploadCapacityBps:1e3*((null===(l=null===(n=null==t?void 0:t.configuration)||void 0===n?void 0:n.wan_provider_capabilities)||void 0===l?void 0:l.upload_kilobits_per_second)||0)/8}},[null===(i=null==t?void 0:t.configuration)||void 0===i?void 0:i.wan_provider_capabilities]),v=Object(n.useCallback)(()=>d(Object(et.j)(null==t?void 0:t.uplink_ifname)),[null==t?void 0:t.uplink_ifname,d]);return Object(n.useEffect)(()=>{E!==Ye.SpeedTestState.IN_PROGRESS&&v()},[]),l.a.createElement(at,null,l.a.createElement(ct,{speedTestState:E,isUpload:I,onClose:()=>a(!1)}),O?l.a.createElement(He.a,{speedTestData:C,ispIntroText:l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_SPEED_TEST_ISP_INTRO"}),isp:b&&l.a.createElement(W.b,{id:"DASHBOARD_SPEEDTEST_ISP_INFO",values:{provider:b.provider,location:b.country}}),xDuration:3500,animationBuffer:1e3,uploadText:l.a.createElement(W.b,{id:"COMMON_STATUS_UPLOAD"}),downloadText:l.a.createElement(W.b,{id:"COMMON_STATUS_DOWNLOAD"}),connectionInfo:{sourceText:l.a.createElement(W.b,{id:"COMMON_WORD_INTERNET"}),receiverText:g}}):l.a.createElement(rt,{speedTestData:{download:Object($e.a)(p.download),upload:Object($e.a)(p.upload),ping:p.ping,...(null==b?void 0:b.provider)&&(null==b?void 0:b.country)&&{isp:e.formatMessage({id:"DASHBOARD_SPEEDTEST_ISP_INFO"},{provider:b.provider,location:b.country})},downloadCapacityBps:h,uploadCapacityBps:T},onRestart:v,restartTestText:l.a.createElement(W.b,{id:"SPEED_TEST_TEST_AGAIN"}),pingText:l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_SPEED_TEST_PING"}),adjustSegmentHeading:l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_SPEED_TEST_ADJUST_HEADING"}),adjustSegmentText:l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_SPEED_TEST_ADJUST_TEXT"}),ispText:l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_SPEED_TEST_ISP"})},l.a.createElement(Ge.a,{variant:"link",onClick:()=>m.push(u.replace(":activeWanId",o._id))},l.a.createElement(W.b,{id:"DASHBOARD_SPEEDTEST_ISP_ADJUST"}))))});const st=Object(i.c)(C.a)`
  margin-top: 8px;
  @media ${w.a.VIEWPORT_XXL_UP} {
    margin-top: 4px;
  }
`,Et={entered:{transform:"translateY(0px)"}},mt=Object(i.c)(C.a)`
  transition: all ${300}ms ease;
  transform: translateY(100%);
`;var dt=({selectedTab:e,isp:t,isSpeedTestPanelOpen:a,setIsSpeedTestPanelOpen:i})=>{const r=Object(c.useSelector)(Fe.n),o=Object(c.useSelector)(U.selectIsUlteInFailover),s=Object(c.useSelector)(Re.e),E=Object(c.useSelector)(U.selectIsUbiOS),m=Object(c.useSelector)(q.h),d=Object(c.useSelector)(Fe.J),_=Object(c.useSelector)(Ue.selectLocaleSettings),u=Object(c.useSelector)(ke.d),b=Object(c.useSelector)(q.d),p=Object(n.useMemo)(()=>Object(We.d)(d,_,u),[d,_,u]),O=Object(n.useMemo)(()=>E||e===k.a.WAN,[E,e]),I=Object(n.useMemo)(()=>(null==m?void 0:m.speedtest_lastrun)?new Intl.DateTimeFormat("en-US",{timeZone:p,month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:r}).format(new Date(1e3*m.speedtest_lastrun)):void 0,[p,r,null==m?void 0:m.speedtest_lastrun]);return!s&&O?l.a.createElement(l.a.Fragment,null,l.a.createElement(st,{justifyContent:"space-between",alignItems:"center"},l.a.createElement(ee.a,{styleNumber:9,onClick:()=>{i(!0)},variant:"inline",noWrap:!0,disabled:o||!b},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_RUN_SPEED_TEST_ACTION"})),I?l.a.createElement(ee.b,{styleNumber:5,whiteSpacePreWrap:!0},I):null),l.a.createElement(we.a,{in:a,timeout:300,mountOnEnter:!0},e=>l.a.createElement(mt,{top:0,left:0,right:0,zIndex:1,position:"absolute",height:"100%",style:Et[e]},l.a.createElement(ot,{setIsSpeedTestPanelOpen:i,isp:t})))):null},_t=a(126),ut=a(481),bt=({isp:e})=>{const t=Object(c.useSelector)(U.selectSiteGatewayLatency),a=Object(c.useSelector)(Ue.selectUsgSettings);return Object(re.g)([Object(Ue.fetchSettings)({type:T.a.CACHE})],l.a.createElement(l.a.Fragment,null,(null==e?void 0:e.latency)||t?l.a.createElement(ue.g,{justifyContent:"space-between"},l.a.createElement(Y.m,{styleNumber:2},l.a.createElement(W.b,{id:"COMMON_LATENCY"})),l.a.createElement(ut.a,{position:"top",portal:!0,message:l.a.createElement(H.a,null,l.a.createElement(W.b,{id:"DASHBOARD_MODULE_INTERNET_LATENCY_TOOLTIP",values:{url:(null==a?void 0:a.echo_server)||"ping.ubnt.com"}}))},l.a.createElement(Y.m,{styleNumber:5},(null==e?void 0:e.latency)||t,l.a.createElement(W.b,{id:"COMMON_UNIT_MILLISECONDS_SHORT"})))):null))};const pt=Object(i.c)(C.a)`
  margin: 12px 10px 6px 10px;
  @media ${w.a.VIEWPORT_XXL_UP} {
    margin: 8px 0 20px 0;
  }
`,Ot=Object(i.c)(C.a)`
  border: 1px solid ${({theme:{motifPalette:e}})=>e.neutral03};
  width: 32px;
  height: 32px;
  padding: 4px;
  @media ${w.a.VIEWPORT_XXXL_UP} {
    width: 48px;
    height: 48px;
    padding: 6px;
  }

  img {
    width: 100%;
    height: auto;
  }
`,It=({serviceLatencies:e})=>{const t=Object(c.useSelector)(_t.a);return l.a.createElement(pt,{justifyContent:"space-between"},Object(n.useMemo)(()=>e.map(e=>l.a.createElement(C.a,{key:e.service_name,flexDirection:"column",alignItems:"center"},l.a.createElement(Ot,{borderRadius:8,boxSizing:"border-box",marginBottom:4},l.a.createElement("img",{src:`${t}/appLogos/${e.service_name}.png`,alt:e.service_name})),l.a.createElement(ee.b,{styleNumber:6},(null==e?void 0:e.latency)?l.a.createElement(l.a.Fragment,null,e.latency," ",l.a.createElement(W.b,{id:"COMMON_UNIT_MILLISECONDS_SHORT"})):l.a.createElement(W.b,{id:"COMMON_NA"})))),[e]))};var gt=({selectedTab:e,isp:t})=>{const a=Object(c.useSelector)(Re.f),i=Object(n.useMemo)(()=>null==a?void 0:a.find(t=>(null==t?void 0:t.wan_networkgroup)===e),[a,e]);return Object(n.useMemo)(()=>{var e;return null===(e=null==i?void 0:i.service_latencies)||void 0===e?void 0:e.some(e=>e.latency)},[i])?l.a.createElement(It,{serviceLatencies:i.service_latencies}):l.a.createElement(bt,{isp:t})};const Ct=Object(i.c)(C.a)`
  @media ${w.a.VIEWPORT_M} {
    &:not(:only-child) {
      &:first-child {
        padding-right: 14px;
      }
      &:last-child {
        padding-left: 14px;
      }
    }
    padding-top: 18px;
    padding-bottom: 12px;
    flex-direction: row;
    border-top: 1px solid ${({theme:e})=>e.motifPalette.neutral03};
  }
`,ht=Object(i.c)(C.a)`
  border-top: 1px solid ${({theme:e})=>e.motifPalette.neutral03};
  @media ${w.a.VIEWPORT_M} {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
    width: 45%;
  }
  @media ${w.a.VIEWPORT_XXL}, ${w.a.VIEWPORT_XL}, ${w.a.VIEWPORT_L} {
    margin-top: 16px;
    padding-top: 16px;
  }
`,Tt=Object(i.c)(F,{shouldForwardProp:e=>"isSpeedTestPanelOpen"!==e})`
  min-height: ${({isSpeedTestPanelOpen:e})=>e?"370px":"initial"};
  @media ${w.a.VIEWPORT_M} {
    min-height: ${({isSpeedTestPanelOpen:e})=>e?"290px":"initial"};
    flex-direction: row;
    justify-content: space-between;
  }
`,vt=Object(i.c)(C.a)`
  @media ${w.a.VIEWPORT_M} {
    width: 45%;
  }
`;var ft=()=>{const e=Object(c.useSelector)(U.selectSiteGatewayActiveWan),t=Object(c.useSelector)(M.selectIspInfoItems),[a,i]=Object(n.useState)(e||k.a.WAN),[r,o]=Object(n.useState)(!1),s=Object(n.useMemo)(()=>t.find(e=>e.networkgroup===a),[a,t]);return(null==t?void 0:t.length)?l.a.createElement(Ct,{flexDirection:"column",flex:"1"},l.a.createElement(Tt,{isSpeedTestPanelOpen:r,position:"relative",overflow:"hidden",flexDirection:"column",width:"100%"},l.a.createElement(vt,{flexDirection:"column"},l.a.createElement(ge,{selectedTab:a,setSelectedTab:i,isp:s,ispInfoItems:t}),l.a.createElement(gt,{selectedTab:a,isp:s}),l.a.createElement(dt,{selectedTab:a,isp:s,isSpeedTestPanelOpen:r,setIsSpeedTestPanelOpen:o})),s?l.a.createElement(ht,{zIndex:0,marginTop:24,paddingTop:24,flexDirection:"column"},l.a.createElement(Me,{isp:s})):null)):null};const Rt=Object(i.c)(C.a)`
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.neutral03};
`;var Dt=()=>{const e=Object(n.useRef)(null),t=Object(n.useRef)(null),a=Object(c.useSelector)(Fe.n),i=Object(c.useSelector)(Fe.J),r=Object(c.useSelector)(Ue.selectLocaleSettings),o=Object(c.useSelector)(ke.d),s=Object(n.useMemo)(()=>Object(We.d)(i,r,o),[i,r,o]),E=Object(n.useCallback)(()=>{e.current&&(e.current.innerText=new Intl.DateTimeFormat("en-US",{timeZone:s,timeZoneName:"short",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:a}).format(),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{E()},500))},[s,a]);return Object(n.useEffect)(()=>()=>{t.current&&clearTimeout(t.current)},[]),l.a.createElement(Rt,{minHeight:42,alignItems:"center",justifyContent:"center",boxSizing:"content-box"},Object(re.g)([Object(Ue.fetchSettings)({type:T.a.CACHE})],l.a.createElement(ee.b,{styleNumber:1},l.a.createElement("span",{ref:e})),{onRenderComponent:E}))},St=a(201),yt=a(1096);const Pt=Object(i.c)(C.a)`
  border-top: 1px solid ${({theme:e})=>e.motifPalette.neutral03};
  padding: 24px;

  @media ${w.a.VIEWPORT_M} {
    width: 50%;
    margin: 0 0 0 auto;
    padding: 16px 0;
  }

  @media ${w.a.VIEWPORT_L}, ${w.a.VIEWPORT_XL}, ${w.a.VIEWPORT_XXL} {
    padding: 12px 24px;
  }
`;var At=()=>{const{lastFetchTime:e,data:t}=Object(c.useSelector)(St.m),a=Object(n.useRef)(null),i=Object(n.useRef)(Date.now()),r=Object(n.useRef)(Math.round((Date.now()-e)/1e3)),[o,s]=Object(n.useState)(t.uptime),E=Object(n.useCallback)(()=>{s(t.uptime+(r.current+Math.round((Date.now()-i.current)/1e3))),a.current&&clearTimeout(a.current),a.current=setTimeout(E,500)},[t.uptime]);return Object(n.useEffect)(()=>(E(),()=>{a.current&&clearTimeout(a.current)}),[]),l.a.createElement(Pt,{alignItems:"center",justifyContent:"space-between"},l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"DASHBOARD_SYSTEM_UPTIME"})),l.a.createElement(ee.b,{styleNumber:5},l.a.createElement(yt.a,{uptime:o})))},Nt=a(101),jt=a(1663),xt=a(1664),Lt=a(2800),Vt=a(2801),Mt=(a(2639),a(2640),a(2641),a(2642),a(2643),a(2644),a(2645),a(2646),a(2647),a(2648),a(2649),({fill:e})=>l.a.createElement("svg",{width:"35",height:"21",viewBox:"0 0 35 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l.a.createElement("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.1501 4.93596C16.7567 5.53369 16.4494 6.16878 16.2281 6.84123C16.0068 7.51368 15.847 8.12386 15.7487 8.67178H13.9047C14.003 8.02424 14.1751 7.26462 14.421 6.39293C14.6669 5.52124 15.1094 4.662 15.7487 3.81521C16.4863 2.71937 17.5804 1.79787 19.031 1.0507C20.4816 0.303536 22.3379 -0.0451415 24.5999 0.00466984L24.2311 1.87258C22.2641 1.87258 20.7521 2.17145 19.6948 2.76918C18.6376 3.36691 17.7894 4.08917 17.1501 4.93596ZM16.2649 9.94199C17.1009 9.94199 17.7033 10.1537 18.0721 10.5771C18.4409 11.0005 18.5269 11.7352 18.3302 12.7812L16.6337 20.7012H14.5685L16.1174 13.5284C16.2158 12.831 16.1912 12.3454 16.0437 12.0714C15.8961 11.7975 15.5519 11.6605 15.011 11.6605C14.6176 11.6605 14.212 11.8224 13.794 12.1461C13.376 12.4699 13.0933 12.9805 12.9457 13.6778L11.4705 20.7012H9.40527L11.6181 10.2409H13.5358L13.3145 11.4363C13.6588 10.988 14.1013 10.6269 14.6422 10.3529C15.1831 10.079 15.724 9.94199 16.2649 9.94199ZM30.6483 12.5572H25.7801L26.5915 8.67197H31.4596L31.9022 6.80405H24.8212L21.8708 20.7013H24.0836L25.4113 14.3504H30.2795L30.6483 12.5572ZM20.3955 10.2406H22.4608L20.3218 20.7009H18.1827L20.3955 10.2406ZM20.7643 8.33574C20.7152 8.41046 20.666 8.52254 20.6168 8.67197H22.7559L23.1984 6.80405C22.6083 6.85387 22.1412 6.99085 21.797 7.215C21.4528 7.43915 21.1577 7.70065 20.9119 7.99952C20.8627 8.14895 20.8135 8.26103 20.7643 8.33574ZM30.5745 20.7009L32.7135 10.2406H34.8525L32.6397 20.7009H30.5745ZM10.733 6.80405H8.52021L6.38117 16.7413C6.18448 17.6379 5.87715 18.2855 5.45917 18.684C5.0412 19.0825 4.51259 19.2817 3.87334 19.2817C3.18491 19.2817 2.71777 19.0825 2.4719 18.684C2.22603 18.2855 2.20145 17.6379 2.39814 16.7413L4.46342 6.80405H2.25062L0.185345 16.5919C-0.158868 18.1859 -0.0236405 19.3191 0.591025 19.9915C1.20569 20.664 2.17686 21.0002 3.50454 21.0002C4.83222 21.0002 5.93861 20.664 6.82373 19.9915C7.70885 19.3191 8.32352 18.1859 8.66773 16.5919L10.733 6.80405ZM23.9361 3.2177L23.4935 5.08561C22.51 5.18523 21.7233 5.42184 21.1332 5.79542C20.5431 6.169 20.1005 6.57994 19.8055 7.02824C19.6088 7.27729 19.449 7.55125 19.3261 7.85012C19.2031 8.14899 19.0925 8.42295 18.9941 8.672H17.1501C17.2485 8.2237 17.3837 7.7754 17.5558 7.32711C17.7279 6.87881 17.9861 6.4056 18.3303 5.90749C18.822 5.21014 19.535 4.59995 20.4693 4.07694C21.4036 3.55392 22.5592 3.26751 23.9361 3.2177ZM34.2256 7.14028L33.4511 6.80405L33.0085 8.67197H35.0001C35.0001 7.87499 34.7419 7.36443 34.2256 7.14028Z",fill:e}))),wt=a(2650),Ft=a.n(wt);a(2651),a(2652),a(2653),a(2654),a(2655),a(2656),a(2657),a(2658),a(2659);var Ut=({portConfig:e,gateway:t,panelCallback:a})=>{const i=Object(c.useSelector)(_t.a),r=Object(c.useSelector)(U.selectIsUdmBase),o=Object(c.useSelector)(U.selectIsUdr),s=Object(c.useSelector)(ke.g),E=Object(c.useSelector)(ke.i),m=Object(c.useSelector)(ke.j),d=Object(c.useSelector)(ke.k),_=Object(c.useSelector)(U.selectIsUdw),u=Object(c.useSelector)(U.selectDeviceStackDevices),b=Object(n.useMemo)(()=>E?U.DeviceModel.UCK:m?U.DeviceModel.UCKG2:d?U.DeviceModel.UCKP:Ft.a,[E,m,d]),p=!r&&!o&&!_,O=s?[{model:b},...u]:u,I=!s||O.length>1;return l.a.createElement(ue.a,{flexDirection:"column",onClick:I?a:void 0},p?l.a.createElement(ue.l,{deviceData:O,isClickable:I}):l.a.createElement(ue.j,{width:"100%",justifyContent:"center"},r&&l.a.createElement(Lt.a,{configured:null==t?void 0:t.adopted,ports:e}),o&&l.a.createElement(Vt.a,{configured:null==t?void 0:t.adopted,ports:e}),_&&l.a.createElement("img",{alt:"udw",src:i+"/dashboard/statusPanel/udw.png"})))},kt=({portConfig:e,sysInfo:t})=>{const a=Object(c.useDispatch)(),i=Object(c.useSelector)(U.selectSiteGateway),o=Object(n.useMemo)(()=>Object(U.getGatewayActiveWanItems)(i),[i.port_table,i.ethernet_overrides,i.usg_caps,i.wan1,i.wan2]),s=Object(n.useMemo)(()=>Object(U.isUdm)(i),[i.type]),E=Object(r.k)(),{site:m}=Object(r.m)(),d=Object(n.useCallback)(()=>{E.push(Object(r.i)("/:site/dashboard/properties/:id?/:panel?/:subPanel?/:subPanelId?",{id:i.mac,panel:Q.a.OVERVIEW,site:m})),a(Object(X.g)({type:N.c.DEVICE,mac:i.mac}))},[a,i.mac,E,m]);return l.a.createElement(ue.d,{flexDirection:"column",justifyContent:"space-between"},l.a.createElement(Ut,{portConfig:e,gateway:i,panelCallback:d}),l.a.createElement(ue.b,{flex:"1",flexDirection:"column"},l.a.createElement(ue.c,{flexDirection:"column",marginBottom:8},l.a.createElement(ee.b,{styleNumber:2},Object(Xe.c)(i)),l.a.createElement(ee.b,{styleNumber:3},s&&l.a.createElement(l.a.Fragment,null,l.a.createElement(W.b,{id:"COMMON_UNIFI_OS"})," "),`${Object(Xe.b)(i)} ${(null==t?void 0:t.console_display_version)||(null==i?void 0:i.version)}`)),l.a.createElement(ue.c,null,l.a.createElement(jt.a,{useResponsiveStyling:!0,useLinkWrapper:!0}),l.a.createElement(xt.a,{useResponsiveStyling:!0,useLinkWrapper:!0})),((null==o?void 0:o.length)>0||(null==i?void 0:i.lan_ip))&&l.a.createElement(ue.f,{justifyContent:"space-between",flexDirection:"column"},o.map(({ip:e,index:t,port_idx:a})=>e&&l.a.createElement(ue.e,{justifyContent:"space-between",width:"100%",key:a},l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"COMMON_WAN_IP_PORT",values:{index:1===t?"":t,port:a}})),l.a.createElement(ee.b,{styleNumber:5},e))),(null==i?void 0:i.lan_ip)&&l.a.createElement(ue.c,{justifyContent:"space-between",width:"100%"},l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"COMMON_GATEWAY_IP"})),l.a.createElement(ee.b,{styleNumber:5},i.lan_ip)))))},Wt=({sysInfo:e})=>l.a.createElement(ue.d,{flexDirection:"column",justifyContent:"space-between"},l.a.createElement(Ut,null),l.a.createElement(ue.b,{flex:"1",flexDirection:"column"},l.a.createElement(ue.c,null,l.a.createElement(C.a,{flexDirection:"column",marginBottom:12},l.a.createElement(ee.b,{styleNumber:2},(null==e?void 0:e.name)||(null==e?void 0:e.hostname)),l.a.createElement(C.a,{alignItems:"baseline"},l.a.createElement(ee.b,{styleNumber:2,truncate:!0,style:{marginRight:"10px"}},e.hostname&&"example-domain.ui.com"!==e.hostname?e.hostname:e.ubnt_device_type),l.a.createElement(ee.b,{styleNumber:2},(null==e?void 0:e.console_display_version)||e.udm_version)))))),Bt=()=>{const e=Object(c.useSelector)(U.selectPortConfig),t=Object(c.useSelector)(ke.g),a=Object(c.useSelector)(ke.n);return e?l.a.createElement(kt,{sysInfo:a,portConfig:e}):t?l.a.createElement(Wt,{sysInfo:a}):l.a.createElement(ue.i,{alignItems:"center",flexDirection:"column",margin:"90px 0"},l.a.createElement(ue.k,{color:$.o.warning,size:"navigation"}),l.a.createElement("div",null,l.a.createElement(Y.o,{message:"DASHBOARD_ISP_CHART_NO_GATEWAY_INTRO"})," ",l.a.createElement(Ge.a,{variant:"inline",href:Nt.a.unifiSdn},l.a.createElement(Y.o,{message:"DASHBOARD_ISP_CHART_NO_GATEWAY_LINK"}))," ",l.a.createElement(Y.o,{message:"DASHBOARD_ISP_CHART_NO_GATEWAY_OUTRO"})))},zt=a(1013),Ht=()=>{const{motif:e}=Object(o.a)(),t=Object(c.useSelector)(ke.n),a=Object(c.useSelector)(_t.a),i=Object(n.useMemo)(()=>zt.a.isLinux?`dashboard/limited/linux-${e}.png`:zt.a.isMacOS?`dashboard/limited/macos-${e}.png`:`dashboard/limited/windows-${e}.png`,[e]);return l.a.createElement(ue.d,{flexDirection:"column",justifyContent:"space-between"},l.a.createElement(ue.a,{justifyContent:"center",padding:"22px 56px 24px 56px"},l.a.createElement(ue.m,{src:`${a}/${i}`,alt:"desktop-image"})),l.a.createElement(ue.b,{flex:"1",flexDirection:"column"},l.a.createElement(ue.c,null,l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"DASHBOARD_NON_UBNT_DEVICE_LABEL",values:{network_version:t.version,os:zt.a.os,os_version:zt.a.version}})))))},Gt=()=>l.a.createElement(ue.h,null,l.a.createElement(ee.a,{styleNumber:4,variant:"inline",href:Nt.a.adoptionInstructions,target:"_blank",rel:"noopener noreferrer"},l.a.createElement(W.b,{id:"SHARED_ADOPT_INSTR"}))),$t=({systemInfo:{cloud_console_fqdn:e,inform_port:t}})=>l.a.createElement(ue.h,null,l.a.createElement(ee.a,{styleNumber:4,variant:"inline",onClick:()=>{var a;return null===(a=null===navigator||void 0===navigator?void 0:navigator.clipboard)||void 0===a?void 0:a.writeText(`http://${e}:${t}/inform`)}},l.a.createElement(W.b,{id:"SHARED_COPY_INFORM"})));const Yt=Object(i.c)(C.a)`
  @media ${w.a.VIEWPORT_M} {
    flex: 1 1 0;
    padding: 0;
    left: -24px;
    img {
      width: 180px;
    }
  }
`;var Xt=({systemInfo:e})=>l.a.createElement(ue.d,{flexDirection:"column",justifyContent:"space-between"},l.a.createElement(Yt,{justifyContent:"center",padding:"0 56px 24px 56px",position:"relative"},l.a.createElement(ue.m,{src:`${Object(c.useSelector)(_t.a)}/dashboard/limited/cloudConsole-${Object(o.a)().motif}.png`,alt:"cloud-console"})),l.a.createElement(ue.b,{flex:"1",flexDirection:"column"},l.a.createElement(ue.c,{flexDirection:"column",alignItems:"flex-start"},l.a.createElement(ee.b,{styleNumber:2},e.name),l.a.createElement(ee.b,{styleNumber:1},l.a.createElement(W.b,{id:"DASH_CC"})," ",e.version)),l.a.createElement(ue.c,{marginTop:6},l.a.createElement(jt.a,{useResponsiveStyling:!0,useLinkWrapper:!0}),l.a.createElement(xt.a,{useResponsiveStyling:!0,useLinkWrapper:!0})),l.a.createElement(ue.c,null,l.a.createElement(Gt,null),l.a.createElement($t,{systemInfo:e})))),Kt=a(1037),Zt=a(109);const qt=Object(i.c)(C.a)`
  border-top: 1px solid ${({theme:{motifPalette:e}})=>e.neutral03};
`;var Jt=({cloud_console_device_limit:e})=>{const t=Object(c.useSelector)(Zt.w),a=t/e*100,n=a>=75;return l.a.createElement(qt,{flexDirection:"column",padding:"16px 24px"},l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:6},l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"DASH_CC_DEV_CAP"})),l.a.createElement(C.a,{alignItems:"center"},n?l.a.createElement(C.a,{margin:"0 8px 2px 0"},l.a.createElement(B.pc,null)):null,l.a.createElement(ee.b,{styleNumber:5},`${t}/${e}`))),l.a.createElement(C.a,{marginBottom:6},l.a.createElement(Kt.a,{style:{height:"6px",borderRadius:"12px"},items:[{value:a,color:n?"#F5A623":"#006FFF"}]})),l.a.createElement(ue.h,null,l.a.createElement(ee.a,{styleNumber:4,variant:"inline",target:"_blank",rel:"noopener noreferrer",href:Nt.a.cloudSubscriptions},l.a.createElement(W.b,{id:"DASH_CC_MANAGE_CLOUD_SUB"}))))};const Qt=Object(i.c)(ue.c)`
  border-top: 1px solid ${({theme:{motifPalette:e}})=>e.neutral03};
`;var ea=()=>l.a.createElement(Qt,{position:"relative",top:1}),ta=()=>{const e=Object(c.useSelector)(St.k);return l.a.createElement(l.a.Fragment,null,l.a.createElement(Xt,{systemInfo:e}),e.cloud_console_device_limit&&l.a.createElement(Jt,{cloud_console_device_limit:e.cloud_console_device_limit}),l.a.createElement(ea,null))};const aa=Object(i.c)("div")`
  height: 100%;
  padding-top: 12px;
  @media ${w.a.VIEWPORT_S_UP} {
    padding: 32px;
  }
  @media ${w.a.VIEWPORT_M} {
    padding: 24px 24px 0 24px;
  }
  @media ${w.a.VIEWPORT_M_UP} {
    padding: 24px 0 0 0;
  }
`,na=()=>{const e=Object(c.useSelector)(L.c),t=Object(c.useSelector)(M.selectHasHostDeviceType),a=Object(c.useSelector)(b.S),i=Object(c.useSelector)(b.T);return l.a.createElement(C.a,{height:"100%",flexDirection:"column"},l.a.createElement(Dt,null),l.a.createElement(aa,null,Object(n.useMemo)(()=>e?l.a.createElement(ta,null):t||a||i?l.a.createElement(l.a.Fragment,null,l.a.createElement(Bt,null),l.a.createElement(At,null),l.a.createElement(ft,null)):l.a.createElement(Ht,null),[e,t,a,i])))};var la=({isLoaded:e})=>e?l.a.createElement(na,null):l.a.createElement(l.a.Fragment,null,l.a.createElement(C.a,{padding:"15px",justifyContent:"center",alignItems:"center"},l.a.createElement(V.a,{width:"40%",height:12})),l.a.createElement(F,{flexDirection:"column",width:"100%"},l.a.createElement(V.a,{borderRadius:4,aspectRatio:"16:9"})),l.a.createElement(F,{flexDirection:"column"},l.a.createElement(V.a,{width:"25%",height:12,marginBottom:12}),l.a.createElement(V.a,{width:"75%",height:12,marginBottom:12}),l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(V.a,{width:"40%",height:12}),l.a.createElement(V.a,{width:"20%",height:12})),l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(V.a,{width:"40%",height:12}),l.a.createElement(V.a,{width:"20%",height:12}))),l.a.createElement(F,{height:"82px",alignItems:"center",justifyContent:"space-between"},l.a.createElement(V.a,{width:"10%",height:12}),l.a.createElement(V.a,{width:"100%",height:12})),l.a.createElement(F,{height:"68px",alignItems:"center",justifyContent:"space-between"},l.a.createElement(V.a,{width:"50%",height:12}),l.a.createElement(V.a,{width:"20%",height:12})),l.a.createElement(F,{flexDirection:"column"},l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:12},l.a.createElement(V.a,{width:"50%",height:12}),l.a.createElement(V.a,{width:"30%",height:12})),l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:12},l.a.createElement(V.a,{width:"50%",height:12}),l.a.createElement(V.a,{width:"30%",height:12})),l.a.createElement(C.a,{justifyContent:"space-between",marginTop:12,marginBottom:24},l.a.createElement(V.a,{width:32,height:32}),l.a.createElement(V.a,{width:32,height:32}),l.a.createElement(V.a,{width:32,height:32})),l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:24},l.a.createElement(V.a,{width:"50%",height:12}),l.a.createElement(V.a,{width:"10%",height:12})),l.a.createElement(C.a,{flexDirection:"column",justifyContent:"space-between",marginBottom:24},l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(V.a,{width:"40%",height:12}),l.a.createElement(V.a,{width:"20%",height:12})),l.a.createElement(V.a,{width:"100%",height:12})),l.a.createElement(C.a,{flexDirection:"column",justifyContent:"space-between",marginBottom:18},l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(V.a,{width:"40%",height:12}),l.a.createElement(V.a,{width:"20%",height:12})),l.a.createElement(V.a,{width:"100%",height:12})))),ia=a(29),ra=a(623),ca=a(2763),oa=a(2618),sa=a(185);const Ea=i.a`
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: flex-end;
  overflow-x: unset !important;

  > div {
    margin: initial;
  }
`,ma=Object(i.c)(sa.a)`
  text-transform: uppercase;
`,da=Object(i.c)("div")`
  display: flex;
  align-items: center;
  white-space: nowrap;
`,_a=i.a`
  overflow-y: auto;
  max-height: calc(90vh - 52px);
  padding: 0 !important;
  border: none;
`;var ua=({tabsVariant:e})=>{const t=Object(c.useDispatch)(),a=Object(c.useSelector)(M.selectDateRangePresets),i=Object(c.useSelector)(Ue.selectLocaleSettings),r=Object(c.useSelector)(Fe.J),o=Object(c.useSelector)(M.selectDateRange),s=Object(c.useSelector)(ke.d),E=Object(We.d)(r,i,s),[m,d]=Object(n.useState)(null===o.preset?"Custom":o.preset),[_,u]=Object(n.useState)(null===o.preset?{startDate:o.startDate,endDate:o.endDate}:null),b=Object(n.useCallback)(e=>{const n=a.find(t=>t.id===e);n?t(Object(x.d)({...n.getRange(new Date),preset:e})):_&&t(Object(x.d)({..._,preset:null})),d(e)},[a,_]),p=Object(n.useCallback)(()=>l.a.createElement(da,null,_?l.a.createElement(oa.a,{start:_.startDate,end:_.endDate,timezone:E}):l.a.createElement(B.o,null)),[_,E]);return l.a.createElement(z.a,{tabs:((e,t,a,n,i,r)=>[...e.map(e=>({id:e.id,label:l.a.createElement(ma,{size:"small",message:e.message,values:e.messageValues})})),{id:"Custom",label:l.a.createElement(ra.a,{classNameCard:_a,align:"bottomLeft",renderToggle:r},l.a.createElement(ca.a,{initialStartDate:Object(We.a)(t.startDate,a),initialEndDate:Object(We.a)(Object(ia.subSeconds)(t.endDate,1),a),numberOfMonths:2,disabledDays:{after:Object(We.a)(new Date,a)},onRangeSelected:({startDate:e,endDate:t})=>{n({startDate:Object(We.i)(e,a),endDate:Object(We.b)(t,a)}),i(Object(x.d)({startDate:Object(We.i)(e,a),endDate:Object(We.i)(Object(ia.addDays)(t,1),a),preset:null}))},showInputs:!0}))}])(a,o,E,u,t,p),selectedTab:m,onSelectTab:({id:e})=>b(e),className:Ea,variant:e})};const ba=()=>{const e=Object(c.useSelector)(M.selectShowDashboardModules),t=Object(c.useSelector)(M.selectShowWiFiClientWidgets);return e||t?l.a.createElement(l.a.Fragment,null,l.a.createElement(C.a,{flex:1}),l.a.createElement("span",null,l.a.createElement(ua,{tabsVariant:"tertiary"}))):null};var pa=({isLoaded:e})=>l.a.createElement(C.a,{alignItems:"center",flexWrap:"nowrap"},e?l.a.createElement(ba,null):l.a.createElement(C.a,{width:"100%",justifyContent:"flex-end"},l.a.createElement(C.a,null,l.a.createElement(V.a,{width:24,height:16,marginRight:8}),l.a.createElement(V.a,{width:24,height:16,marginRight:8}),l.a.createElement(V.a,{width:24,height:16,marginRight:8}),l.a.createElement(V.a,{width:24,height:16})))),Oa=a(2809),Ia=a(61),ga=a(2804),Ca=a(183);const ha=Object(i.c)(C.a,{shouldForwardProp:e=>!["leftMargin","topMargin","bottomMargin"].includes(e)})`
  margin: ${({leftMargin:e,topMargin:t,bottomMargin:a})=>`${null!=t?t:9}px 0px ${null!=a?a:9}px ${null!=e?e:18}px`};
  white-space: nowrap;
`,Ta=Object(i.c)(B.fb)`
  color: ${Se.a["blue-3"]};
`,va=Object(i.c)(B.gb)`
  color: ${Se.a["purple-1"]};
`;var fa=({up:e,down:t,topMargin:a,bottomMargin:n,leftMargin:i,...r})=>l.a.createElement(C.a,null,l.a.createElement(ha,{alignItems:"center",leftMargin:i,topMargin:a,bottomMargin:n},l.a.createElement(Ta,{size:"medium"}),l.a.createElement(ee.b,Object.assign({styleNumber:12,size:"caption",weight:"bold"},r),Object(Ca.a)(t))),l.a.createElement(ha,{alignItems:"center",leftMargin:i,topMargin:a,bottomMargin:n},l.a.createElement(va,{size:"medium"}),l.a.createElement(ee.b,Object.assign({styleNumber:13,size:"caption",weight:"bold"},r),Object(Ca.a)(e)))),Ra=({isLoaded:e})=>e?l.a.createElement(ee.b,{styleNumber:16},l.a.createElement(W.b,{id:"COMMON_TR_OW"})):l.a.createElement(C.a,{flexDirection:"column"},l.a.createElement(V.a,{width:92,height:16})),Da=a(2764),Sa=a(428),ya=a(802);const Pa=Object(i.c)(C.a,{shouldForwardProp:e=>"loadingBackgroundColor"!==e&&"customBorder"!==e})`
  border: ${({customBorder:e})=>e}px solid
    ${({theme:e,loadingBackgroundColor:t})=>t||e.motifPalette.neutral02};
  border-radius: 100%;

  @media ${w.a.VIEWPORT_XS_UP} {
    margin-top: 12px;
  }
  @media ${w.a.VIEWPORT_XXL_UP} {
    margin-right: 36px;
  }

  circle {
    stroke: ${({loadingBackgroundColor:e})=>e};
  }
  & * > text:first-of-type {
    font-size: 28px;

    @media ${w.a.VIEWPORT_XXL_DOWN} {
      font-size: 20px;
    }
    @media ${w.a.VIEWPORT_XL_DOWN} {
      font-size: 18px;
    }
    @media ${w.a.VIEWPORT_S_DOWN} {
      font-size: 20px;
    }
  }
  & * > text:last-of-type {
    font-size: 20px;

    @media ${w.a.VIEWPORT_XXL_DOWN} {
      font-size: 14px;
    }
    @media ${w.a.VIEWPORT_XL_DOWN} {
      font-size: 10px;
    }
  }
  .titleClassName {
    ${ee.c.style11};
    transform: translateY(18px);
    @media ${w.a.VIEWPORT_XXL_DOWN} {
      transform: translateY(12px);
    }
    @media ${w.a.VIEWPORT_XL_DOWN} {
      transform: translateY(10px);
    }
  }
  .descriptionClassName {
    ${ee.c.style17};
    transform: translateY(-38px);
    @media ${w.a.VIEWPORT_XXL_DOWN} {
      transform: translateY(-34px);
    }
    @media ${w.a.VIEWPORT_XL_DOWN} {
      transform: translateY(-31px);
    }
  }
`,Aa=Object(i.c)(C.a)`
  margin-bottom: 8px;
`,Na=Object(i.c)(H.a)`
  color: ${Se.a["purple-1"]};
`,ja=e=>0!==(null==e?void 0:e.id)&&1!==Object.keys(e).length?l.a.createElement(C.a,{flexDirection:"column"},l.a.createElement(C.a,{marginBottom:12,paddingBottom:12,width:"100%",alignItems:"center"},l.a.createElement(Sa.a,{name:e.name,iconFileName:e.iconFileName}),l.a.createElement(H.a,{size:"body",weight:"bold"},e.name||l.a.createElement(W.b,{id:"COMMON_UNKNOWN"}))),l.a.createElement(Aa,{justifyContent:"space-between"},l.a.createElement(H.a,null,l.a.createElement(W.b,{id:"COMMON_WORD_DOWN"})),l.a.createElement(H.a,{color:"info"},Object(Ca.a)(e.rx_bytes))),l.a.createElement(Aa,{justifyContent:"space-between"},l.a.createElement(H.a,null,l.a.createElement(W.b,{id:"COMMON_WORD_UP"})),l.a.createElement(Na,null,Object(Ca.a)(e.tx_bytes))),l.a.createElement(Aa,{justifyContent:"space-between"},l.a.createElement(H.a,null,l.a.createElement(W.b,{id:"COMMON_TRAFFIC"})),l.a.createElement(H.a,null,Object(Ca.a)(e.traffic)))):null;var xa=Object(W.e)(({formattedTrafficOverview:e,total_bytes:t=0,loadingBackgroundColor:a,isLoaded:i,intl:r})=>{const c=Object(ya.b)(ya.a.DASHBOARD),o=Object(n.useMemo)(()=>e.map(e=>Object.assign({},e,{value:e.traffic,id:e.compoundAppId})),[e]);return l.a.createElement(Pa,{justifyContent:"center",alignItems:"center",alignSelf:"center",loadingBackgroundColor:a,customBorder:c.border},l.a.createElement(Da.a,{items:o,renderTooltipMessage:ja,tooltipProps:{position:"right",width:252},title:i&&Object(Ca.a)(t),description:i&&r.formatMessage({id:"COMMON_IDENTIFIED_TRAFFIC"}),titleClassName:"titleClassName",descriptionClassName:"descriptionClassName",spacer:.4,thickness:3,size:c.diameter}))}),La=a(1670),Va=a(746);const Ma=Object(i.c)("div")`
  display: none;
  @media ${w.a.VIEWPORT_S_UP} {
    display: block;
  }
`,wa=[{id:"name",label:l.a.createElement(ee.b,{styleNumber:10},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_TRAFFIC_TABLE_TITLE"})),renderCell:({color:e,name:t,iconFileName:a})=>l.a.createElement(l.a.Fragment,null,l.a.createElement(Va.a,{customColor:e}),l.a.createElement(Ma,null,l.a.createElement(Sa.a,{name:t,iconFileName:a})),l.a.createElement(ee.b,{truncate:!0,styleNumber:18},t||l.a.createElement(W.b,{id:"COMMON_UNKNOWN"}))),minWidth:80,growthFactor:1},{id:"rx_bytes",label:l.a.createElement(ee.b,{styleNumber:10},l.a.createElement(W.b,{id:"COMMON_WORD_DOWN"})),renderCell:({rx_bytes:e})=>l.a.createElement(ee.b,{styleNumber:22},Object(Ca.a)(e)),minWidth:20,growthFactor:1},{id:"tx_bytes",label:l.a.createElement(ee.b,{styleNumber:10},l.a.createElement(W.b,{id:"COMMON_WORD_UP"})),renderCell:({tx_bytes:e})=>l.a.createElement(ee.b,{styleNumber:23},Object(Ca.a)(e)),minWidth:20,growthFactor:1},{id:"traffic",label:l.a.createElement(ee.b,{styleNumber:10},l.a.createElement(W.b,{id:"COMMON_TRAFFIC"})),renderCell:({traffic:e})=>l.a.createElement(ee.b,{styleNumber:18},Object(Ca.a)(e)),minWidth:20,growthFactor:1}];var Fa=({formattedTrafficOverview:e})=>l.a.createElement(Va.b,null,l.a.createElement(La.a,{idField:"compoundAppId",width:"100%",items:e.slice(0,5),columns:wa,renderPlaceholder:()=>l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_TRAFFIC_TABLE_TRAFFIC_EMPTY"})),disableColumnFilters:!0})),Ua=a(1185);const ka=Object(i.c)(C.a)`
  @media ${w.a.VIEWPORT_S_UP} {
    flex-direction: row;
    align-items: flex-start;
  }
`,Wa=Object(i.c)(B.E)`
  margin: 0 6px 0 14px;
`,Ba=Object(i.c)(B.g)`
  cursor: pointer;
  color: ${({theme:e})=>e.motifPalette.neutral08};
  @media ${w.a.VIEWPORT_XXL_UP} {
    display: none;
  }
`,za=Object(i.c)(C.a)`
  margin-right: 18px;
  display: none;
  @media ${w.a.VIEWPORT_XS_UP} {
    display: flex;
  }
  span {
    font-size: 14px;
    font-weight: 700;
    line-height: 24px;

    @media ${w.a.VIEWPORT_XL_DOWN} {
      font-size: 10px;
    }
  }
  div svg {
    height: 19px;
    width: 19px;

    @media ${w.a.VIEWPORT_XL_DOWN} {
      height: 16px;
      width: 16px;
    }
  }
`,Ha=Object(i.c)(ee.a)`
  display: none;
  @media ${w.a.VIEWPORT_XXL_UP} {
    display: block;
    margin-left: 6px;
  }
`,Ga=({history:e})=>{const t=Object(c.useSelector)(Re.d),a=Object(c.useSelector)(Re.k),i=Object(c.useSelector)(Re.j),{received_bytes:r,transmitted_bytes:o,total_bytes:s}=Object(n.useMemo)(()=>a.reduce((e,t)=>Object.assign({},e,{received_bytes:e.received_bytes+((null==t?void 0:t.bytes_received)||0),transmitted_bytes:e.transmitted_bytes+((null==t?void 0:t.bytes_transmitted)||0),total_bytes:e.total_bytes+(((null==t?void 0:t.bytes_received)||0)+((null==t?void 0:t.bytes_transmitted)||0))}),{received_bytes:0,transmitted_bytes:0,total_bytes:0}),[a]),E=Object(re.a)("/statistics/traffic/topapplications"),m=Object(n.useCallback)(()=>e.push(E),[E]);return l.a.createElement(ga.a,{height:"auto",title:l.a.createElement(Ra,{isLoaded:!0}),action:l.a.createElement(C.a,{alignItems:"center"},l.a.createElement(za,{alignItems:"center",justifyContent:"flex-end"},l.a.createElement(fa,{up:o,down:r,leftMargin:8,bottomMargin:0,topMargin:0}),l.a.createElement(Wa,{width:16,height:16}),l.a.createElement(ee.b,{styleNumber:14},(null==t?void 0:t.total)||0)),l.a.createElement(Ha,{styleNumber:15,variant:"inline",onClick:m},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_CLIENTS_VIEW_TRAFFIC_ACTION"})),l.a.createElement(Ba,{width:16,height:16,onClick:m}))},l.a.createElement(C.a,{alignItems:"center",flex:"1",justifyContent:"center"},l.a.createElement(ka,{flex:"1",alignItems:"center",justifyContent:"center",flexDirection:"column"},l.a.createElement(xa,{formattedTrafficOverview:i,total_bytes:s,isLoaded:!0}),l.a.createElement(Va.c,null,l.a.createElement(Fa,{formattedTrafficOverview:i})))))},$a=({isLoaded:e,placeholder:t,intl:a})=>{const{motif:n}=Object(o.a)(),i=e&&t,r=!e&&("dark"===n?V.b:V.c);return l.a.createElement(ga.a,{height:"auto",leftContent:l.a.createElement(Ra,{isLoaded:i}),action:i?l.a.createElement(C.a,{alignItems:"center"},l.a.createElement(za,{alignItems:"center",justifyContent:"flex-end"},l.a.createElement(fa,{up:147e6,down:2e8,leftMargin:8,bottomMargin:0,topMargin:0}),l.a.createElement(Wa,{width:16,height:16}),l.a.createElement(ee.b,{styleNumber:14,weight:"bold"},19)),l.a.createElement(Ha,{styleNumber:15,variant:"inline"},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_CLIENTS_VIEW_TRAFFIC_ACTION"}))):l.a.createElement(C.a,{flexDirection:"column",alignItems:"flex-end"},l.a.createElement(C.a,{marginBottom:8},l.a.createElement(V.a,{width:45,height:16,marginRight:8}),l.a.createElement(V.a,{width:45,height:16,marginRight:8}),l.a.createElement(V.a,{width:25,height:16,marginRight:8}),l.a.createElement(V.a,{width:80,height:16})))},l.a.createElement(C.a,{alignItems:"center",flex:"1",justifyContent:"center"},l.a.createElement(ka,{flex:"1",alignItems:e?"flex-start":"center",justifyContent:"center"},l.a.createElement(xa,{formattedTrafficOverview:i?Object(Ua.b)(a):[],loadingBackgroundColor:r,isLoaded:e}),l.a.createElement(Va.c,{flexDirection:"column",justifyContent:"center",flex:"1"},i?l.a.createElement(Fa,{formattedTrafficOverview:Object(Ua.b)(a)}):l.a.createElement(C.a,{marginLeft:8,flexDirection:"column"},l.a.createElement(C.a,{alignItems:"center",justifyContent:"flex-start",marginBottom:12},l.a.createElement(V.a,{width:12,height:12,marginRight:4}),l.a.createElement(V.a,{width:24,height:12,marginRight:38}),l.a.createElement(V.a,{width:100,height:0,marginRight:14}),l.a.createElement(V.a,{width:50,height:12,marginRight:14}),l.a.createElement(V.a,{width:24,height:12})),l.a.createElement(C.a,{alignItems:"center",justifyContent:"flex-start",marginBottom:12},l.a.createElement(V.a,{width:12,height:12,marginRight:4}),l.a.createElement(V.a,{width:44,height:12,marginRight:18}),l.a.createElement(V.a,{width:100,height:0,marginRight:14}),l.a.createElement(V.a,{width:50,height:12,marginRight:14}),l.a.createElement(V.a,{width:24,height:12})),l.a.createElement(C.a,{alignItems:"center",justifyContent:"flex-start",marginBottom:12},l.a.createElement(V.a,{width:12,height:12,marginRight:4}),l.a.createElement(V.a,{width:34,height:12,marginRight:28}),l.a.createElement(V.a,{width:100,height:0,marginRight:14}),l.a.createElement(V.a,{width:50,height:12,marginRight:14}),l.a.createElement(V.a,{width:24,height:12})),l.a.createElement(C.a,{alignItems:"center",justifyContent:"flex-start"},l.a.createElement(V.a,{width:12,height:12,marginRight:4}),l.a.createElement(V.a,{width:54,height:12,marginRight:8}),l.a.createElement(V.a,{width:100,height:0,marginRight:14}),l.a.createElement(V.a,{width:50,height:12,marginRight:14}),l.a.createElement(V.a,{width:24,height:12})))))))};var Ya=Object(Ia.compose)(r.o,W.e)(({isLoaded:e,placeholder:t,history:a,intl:n})=>e&&!t?l.a.createElement(Ga,{history:a}):l.a.createElement($a,{isLoaded:e,placeholder:t,intl:n})),Xa=a(2677),Ka=a(170),Za=a(217);const qa=Object(i.c)(C.a)`
  min-height: 300px;
  margin: 32px;

  @media ${w.a.VIEWPORT_XL_DOWN} {
    margin: 16px 20px;
  }
`,Ja=Object(i.c)(C.a)`
  ${({theme:e})=>e.themeName===Za.a.LIGHT?"\n    background-image: linear-gradient(107deg, #ffffff 0%, #f1f2f4 94%);\n  ":"\n    background-image: linear-gradient(107deg, #000000 33%, #191919 98%);\n  "}
  position: relative;
  overflow: hidden;
  border-radius: 8px;
`,Qa=Object(i.c)(B.Ec)`
  color: ${({theme:e})=>e.motifPalette.icon02};
  width: 36px;
  height: 22px;

  @media ${w.a.VIEWPORT_XL_DOWN} {
    width: 30px;
    height: 18px;
  }
`,en=Object(i.c)(H.a)`
  letter-spacing: 0;
  text-align: center;
  font-size: 26px;
  line-height: 30px;
  margin: 21px 0;

  @media ${w.a.VIEWPORT_XL_DOWN} {
    font-size: 20px;
    line-height: 22px;
    margin: 10px 0;
  }
`,tn=Object(i.c)("img")`
  width: auto;
  height: 100%;
  position: absolute;
  left: -20px;
  top: 0;
`,an=Object(i.c)("img")`
  max-width: 35%;
  min-width: 300px;
  height: auto;
  max-height: 80%;
  margin: auto 0;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;

  @media ${w.a.VIEWPORT_M_DOWN} {
    min-width: 200px;
  }
`,nn=Object(i.c)(C.a)`
  width: 100%;
  height: 100%;
  z-index: 10;
`,ln=Object(i.c)(Ge.a)`
  font-weight: bold;
  font-size: 16px;

  @media ${w.a.VIEWPORT_XL_DOWN} {
    font-size: 12px;
  }
`;var rn=()=>{const e=Object(c.useSelector)(_t.a);return l.a.createElement(qa,{flex:"1",className:"noApPlaceholder"},l.a.createElement(Ja,{flex:"1"},l.a.createElement(tn,{src:e+"/dashboard/apWave.png",alt:"AP Wave"}),l.a.createElement(nn,{flex:"1",alignItems:"center",justifyContent:"center",flexDirection:"column"},l.a.createElement(Qa,null),l.a.createElement(en,{weight:"bold",size:"header-s"},l.a.createElement(W.a,{id:"DASHBOARD_WIFI_MODULE_NO_AP_PLACEHOLDER_TEXT"})),l.a.createElement(ln,{variant:"link",href:Nt.a.wiFiLearnMore,target:"_blank",rel:"noopener noreferrer"},l.a.createElement(W.b,{id:"COMMON_LEARN_MORE"}))),l.a.createElement(an,{src:e+"/dashboard/apDevices.png",alt:"AP Devices"})))},cn=a(1153);const on=Object(i.c)(C.a)`
  min-height: 300px;
  margin: 32px;

  @media ${w.a.VIEWPORT_XL_DOWN} {
    margin: 16px 20px;
  }
`,sn=Object(i.c)("div")`
  display: flex;
  height: 100%;
  align-items: center;

  @media ${w.a.VIEWPORT_M} {
    flex-direction: column;
    justify-content: center;
  }
`,En=Object(i.c)(H.a)`
  font-size: 19px !important;
  line-height: 1 !important;

  @media ${w.a.VIEWPORT_XL_DOWN} {
    font-size: 14px !important;
  }
`,mn=Object(i.c)("img")`
  max-width: 20%;
  margin-left: -1.5%;

  @media ${w.a.VIEWPORT_L_DOWN} {
    max-width: 30%;
  }
  @media ${w.a.VIEWPORT_M} {
    max-width: 200px;
    margin-left: 0;
  }
`,dn=Object(i.c)("div")`
  display: flex;
  flex-direction: column;
  width: 300px;

  @media ${w.a.VIEWPORT_M} {
    text-align: center;
  }
`,_n=Object(i.c)(H.a)`
  font-size: 18px;
  margin-bottom: 3px;

  @media ${w.a.VIEWPORT_S_DOWN} {
    font-size: 16px;
  }
`,un=Object(i.c)(H.a)`
  font-size: 13px;
  margin-bottom: 10px;

  @media ${w.a.VIEWPORT_S_DOWN} {
    font-size: 11px;
  }
`,bn=Object(i.c)(cn.a)`
  padding: 5px 0;

  @media ${w.a.VIEWPORT_M} {
    justify-content: center;
  }
`;var pn=()=>{const{motif:e}=Object(o.a)(),t=Object(r.k)(),a=Object(re.j)("wifi/network/form"),i=Object(c.useSelector)(_t.a),s=Object(n.useCallback)(()=>t.push(a),[t,a]);return l.a.createElement(on,{flexFlow:"column nowrap"},l.a.createElement(En,{weight:"bold"},l.a.createElement(W.b,{id:"COMMON_WIFI_EXP"})),l.a.createElement(sn,null,l.a.createElement(mn,{src:`${i}/dashboard/noWiFi${e===Za.a.LIGHT?"Light":"Dark"}.png`,alt:"No Wifi"}),l.a.createElement(dn,null,l.a.createElement(_n,{size:"header-s",weight:"bold"},l.a.createElement(W.b,{id:"DASHBOARD_WIFI_MODULE_NO_WIFI_PLACEHOLDER_TITLE"})),l.a.createElement(un,{size:"body",color:"tertiary"},l.a.createElement(W.b,{id:"DASHBOARD_WIFI_MODULE_NO_WIFI_PLACEHOLDER_DESCRIPTION"})),l.a.createElement(bn,null,l.a.createElement(Ge.a,{variant:"inline",onClick:s},l.a.createElement(W.b,{id:"DASHBOARD_WIFI_MODULE_NO_WIFI_PLACEHOLDER_BUTTON"}))))))},On=a(1155),In=a(1688),gn=a(104),Cn=a(524),hn=a(2796);Object(i.c)(H.a)`
  font-size: 19px !important;
  line-height: 1 !important;

  @media ${w.a.VIEWPORT_XL_DOWN} {
    font-size: ${({theme:e})=>e.fontSize["font-size-l2"]} !important;
  }
  @media ${w.a.VIEWPORT_L_DOWN} {
    font-size: ${({theme:e})=>e.fontSize["font-size-caption"]} !important;
  }
`;const Tn=Object(i.c)("span",{shouldForwardProp:e=>"marginRight"!==e})`
  font-size: inherit !important;
  white-space: nowrap;
  margin-right: ${({marginRight:e})=>null!=e?e:5}px;
`;Object(i.c)(H.a)`
  line-height: 20px !important;
  white-space: pre;
  font-size: ${({theme:e})=>e.fontSize["font-size-caption"]} !important;

  @media ${w.a.VIEWPORT_L_UP} {
    font-size: ${({theme:e})=>e.fontSize["font-size-body"]} !important;
    line-height: 24px !important;
  }
  @media ${w.a.VIEWPORT_XXXL_UP} {
    font-size: ${({theme:e})=>e.fontSize["font-size-header-xs"]} !important;
  }
`,Object(i.c)(hn.a,{shouldForwardProp:e=>"color"!==e})`
  font-size: 21px !important;
  color: ${({color:e})=>e} !important;

  @media ${w.a.VIEWPORT_XL_DOWN} {
    font-size: 18px !important;
  }
  @media ${w.a.VIEWPORT_L_DOWN} {
    font-size: ${({theme:e})=>e.fontSize["font-size-caption"]} !important;
  }
`;var vn=({now:e,avg:t})=>l.a.createElement(l.a.Fragment,null,l.a.createElement(ee.b,{styleNumber:16},l.a.createElement(W.b,{id:"COMMON_WIFI_EXP"},e=>l.a.createElement(Tn,{marginRight:0},e))),l.a.createElement(C.a,null,-1===e?l.a.createElement(ee.b,{styleNumber:20},"- / -"):l.a.createElement(l.a.Fragment,null,l.a.createElement(ee.b,{styleNumber:21,colorOverride:Se.a["color-"+Object(gn.c)(e)]},e,"% ",l.a.createElement(W.b,{id:"DASHBOARD_MODULE_WIFI_NOW"})),-1!==t&&l.a.createElement(ee.b,{styleNumber:20},` / ${t}% `,l.a.createElement(W.b,{id:"DASHBOARD_MODULE_WIFI_AVERAGE"}))))),fn=a(1035),Rn=a(2601),Dn=a(2596),Sn=a(288),yn=a(626),Pn=a(2797),An=({barData:e,getCoordinates:t,chunkedItemSize:a,size:n,variant:i})=>l.a.createElement(Pn.a,{xAxisResolution:a,data:e,getCoordinates:t,color:"rgba(255, 255, 255, 0.5)",hideStroke:!0,disableHoverHighlight:!0,width:n.width,height:n.height,stackedBarSpacing:1,variant:i,barFullWidth:!0}),Nn=a(2598);const jn=Object(i.c)("div")`
  #y2-labels {
    text {
      text-anchor: start;
    }
  }
`,xn=Object(i.c)("div")`
  white-space: nowrap;
`,Ln=Object(i.c)(C.a)`
  margin-top: ${({theme:e})=>e.spacing["spacing-s"]};
`,Vn=Object(i.c)("div")`
  margin-right: ${({theme:e})=>e.spacing["spacing-l"]};
`,Mn=Object(i.c)(H.a)`
  line-height: 1 !important;
`,wn=Object(i.c)(fn.a)`
  div {
    transition-property: opacity, visibility;
  }
`;var Fn=l.a.memo(Object(W.e)(({intl:e,width:t,height:a,selectedMac:i,activeChannelFilter:o})=>{var s,E,m,d,_,u;Object(r.l)();const b=Object(n.useRef)(null),p=Object(re.n)(),{preferences:{dateFormat:O,timeFormat:I}}=Object(c.useSelector)(Fe.J),g=Object(c.useSelector)(Sn.c),h=Object(c.useSelector)(Fe.H),{startDate:T,endDate:v,isDefaultPreset:f,barChunkSize:R}=Object(c.useSelector)(M.selectRelevantRangeParams),{dashboardStatsGranularity:D}=Object(c.useSelector)(M.selectStatsDateRangeInfo),{device_stats:S,site_stats:y}=Object(c.useSelector)(Re.g),P=t-25-25,A=Object(n.useMemo)(()=>((e,t,a)=>{if("all"===a)return y;const n=e.find(e=>e.mac_address===a);return n?n.stats:[]})(S,0,i),[S,y,i]),N=Object(n.useMemo)(()=>((e,t)=>{var a,n;const l=[...A];if(f){const e=l.length,t=Object(ia.subMinutes)(Date.now(),5);(null===(n=Object(ia.startOfHour)(null===(a=null==l?void 0:l[e-1])||void 0===a?void 0:a.timestamp))||void 0===n?void 0:n.getTime())===Object(ia.startOfHour)(t).getTime()&&(l[l.length-1]={...l[l.length-1],timestamp:Object(ia.startOfHour)(Object(ia.addHours)(t,1)).getTime()})}return l})(),[A,f]),j=Object(n.useMemo)(()=>Object(yn.a)(I,h),[I,h]),x=Object(n.useMemo)(()=>Math.max(...N.map(e=>{var t,a;return null===(a=null===(t=e.wifi_connectivity)||void 0===t?void 0:t.clients)||void 0===a?void 0:a.total})),[N]),L=Object(n.useMemo)(()=>x>100?"grouped":"stacked",[x]),V=Object(n.useMemo)(()=>((e,t)=>e.length?e.map(({wifi_satisfaction:e,timestamp:a})=>{let n=Math.max(e.total,0);return t===Cn.a.NA&&(n=Math.max(e.na,0)),t===Cn.a.NG&&(n=Math.max(e.ng,0)),{x:a,y:Math.min(n,100)}}):[])(N,o.id),[N,o.id]),w=null===(E=null===(s=V.slice(-1))||void 0===s?void 0:s[0])||void 0===E?void 0:E.x,F=Object(n.useMemo)(()=>f?Object(yn.f)(e,v,g,h):Object(yn.d)(T,v,g,w,h),[f,v,g,h,T,w]),U=Object(n.useMemo)(()=>(e=>Object(yn.e)(e<40?50:100*Math.ceil((e+1)/100),11))(x),[x]),k=Object(n.useMemo)(()=>(e=>{const t=ae.a.scale([e.motifPalette.info,e.motifPalette.success]).domain([0,100]);return Object(yn.g)(0,90,11).map(e=>({...e,label:l.a.createElement("tspan",{fill:t(e.value).css()},String(e.value),"%")}))})(p),[p]),B=null!==(d=null===(m=null==F?void 0:F[0])||void 0===m?void 0:m.value)&&void 0!==d?d:T.getTime(),z=null!==(u=null===(_=null==F?void 0:F[F.length-1])||void 0===_?void 0:_.value)&&void 0!==u?u:v.getTime(),H=Object(n.useMemo)(()=>((e,t,a,n,l)=>{if(!e.length)return[];const i=e.map(({wifi_connectivity:e,timestamp:a})=>{var n,l,i;let r=(null===(n=null==e?void 0:e.clients)||void 0===n?void 0:n.total)||0;return t===Cn.a.NA&&(r=(null===(l=null==e?void 0:e.clients)||void 0===l?void 0:l.na)||0),t===Cn.a.NG&&(r=(null===(i=null==e?void 0:e.clients)||void 0===i?void 0:i.ng)||0),{time:a,connects:r}}),{chunkedData:r}=i.reduce(({chunkedData:e,currentInterval:t},a)=>{if(a.time<n||a.time>=l)return{chunkedData:e,currentInterval:t};if(!t||a.time-t>=36e5)return e.push(a),{chunkedData:e,currentInterval:t?a.time:n};const i=e[e.length-1];return e[e.length-1]={time:i.time,connects:Math.max(i.connects,a.connects)},{chunkedData:e,currentInterval:t}},{chunkedData:[],currentInterval:null});return r.reduce((e,{time:t,connects:n})=>{if("grouped"===a)return e.push({x:t,y:n,connects:n}),e;const l=Object(Nn.a)(n,()=>({x:t,y:1,connects:n}));return l.length&&e.push(l),e},[])})(A,o.id,L,B,z),[A,o.id,L,B,z]);return l.a.createElement(jn,null,l.a.createElement(Rn.a,{xAxis:F,yAxis:U,y2Axis:k,width:t-12,height:Math.max(a,200),margin:[20,25,30,25],xLabelsBetween:!f,yAxisLabelSpacing:15,renderChartElements:(e,t,a,n,i,r,c,o,s)=>{const E={...t,seriesX:t.seriesX-D.grain/2};return l.a.createElement("g",null,l.a.createElement("defs",null,l.a.createElement("clipPath",{id:"chartClipPath"},l.a.createElement("rect",{x:25,y:"0",width:P,height:"100%"}))),l.a.createElement("g",{clipPath:"url(#chartClipPath)"},l.a.createElement(Dn.a,{data:V,maxY:a,mouseData:E,getCoordinates:(e=>(t,a)=>e(t,a,!0))(e),lineColor:"transparent",variant:"gradientArea",customGradientId:"wifiExperienceGradient",forY2Axis:!0,y2AxisMax:o,y2AxisMin:s,renderCustomGradient:()=>l.a.createElement("defs",null,l.a.createElement("linearGradient",{id:"wifiExperienceGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%"},l.a.createElement("stop",{offset:"0%",stopColor:p.motifPalette.success,stopOpacity:.6}),l.a.createElement("stop",{offset:"100%",stopColor:p.motifPalette.info,stopOpacity:.6}))),tooltipPortal:b?b.current:void 0,renderTooltip:({hidden:e,left:t,top:a,x:n,y:i})=>{if(!n||!i)return null;const r="stacked"===L,c=H.find(e=>{const t=r?e[0]:e;return(null==t?void 0:t.x)===n||Math.abs(n-(null==t?void 0:t.x))<=R}),o=r?null==c?void 0:c[0]:c;return l.a.createElement(wn,{left:t,top:a,message:l.a.createElement(xn,null,l.a.createElement(C.a,{justifyContent:"space-between"},l.a.createElement(Vn,null,l.a.createElement(W.b,{id:"COMMON_WORD_DATE"})),l.a.createElement("div",null,Object(We.e)(n,g,O))),l.a.createElement(Ln,{justifyContent:"space-between"},l.a.createElement(Vn,null,l.a.createElement(W.b,{id:"COMMON_WORD_TIME"})),l.a.createElement("div",null,Object(We.e)(n,g,j))),l.a.createElement(Ln,{justifyContent:"space-between"},l.a.createElement(Vn,null,l.a.createElement(W.b,{id:"DASHBOARD_WIFI_CHART_TOOLTIP_EXP"})),l.a.createElement(Mn,{color:Object(gn.c)(Math.floor(i))},Math.floor(i),"%")),o&&l.a.createElement(Ln,{justifyContent:"space-between"},l.a.createElement(Vn,null,l.a.createElement(W.b,{id:"COMMON_CLIENTS"})),l.a.createElement("div",null,o.connects))),hidden:e,topMargin:4,tooltipProps:{position:"top"},width:"auto"})}}),H.length&&l.a.createElement(An,{barData:H,getCoordinates:e,chunkedItemSize:R,size:i,variant:L})))}}),l.a.createElement("div",{ref:b}))})),Un=()=>{const{motif:e}=Object(o.a)(),t="dark"===e?"#191919":"#EDEDF0",a="dark"===e?"#232323":"#DBDCE1",n="dark"===e?"#3F3F3F":"#FBFBFC";return l.a.createElement("svg",{height:"100%",preserveAspectRatio:"none",viewBox:"0 0 981 220",fill:"none"},l.a.createElement("rect",{y:"74",width:"981",height:"1",fill:t}),l.a.createElement("rect",{y:"110",width:"981",height:"1",fill:t}),l.a.createElement("rect",{y:"145",width:"981",height:"1",fill:t}),l.a.createElement("rect",{y:"181",width:"981",height:"1",fill:t}),l.a.createElement("path",{opacity:"0.8",fillRule:"evenodd",clipRule:"evenodd",d:"M0 220V39.5135C0 37.9577 1.69825 36.9976 3.03126 37.7998L8.68024 41.1994C9.55543 41.7261 10.6869 41.5086 11.3045 40.6951L20.4375 28.6643L29.5917 15.6368C30.1924 14.7818 31.35 14.5334 32.2486 15.0666L40.6058 20.025C40.7842 20.1309 40.945 20.2638 41.0825 20.4191L50.1298 30.6357C50.7045 31.2847 51.6319 31.4895 52.4266 31.143L61.1797 27.3256C61.2681 27.2871 61.3536 27.2421 61.4356 27.1912L69.8997 21.9332C70.8113 21.3669 72.0073 21.621 72.6099 22.5089L81.1549 35.0988C81.5271 35.6472 82.1469 35.9756 82.8097 35.9756H91.373C91.7617 35.9756 92.142 35.8623 92.4674 35.6496L102.188 29.2949L111.61 22.9819C112.113 22.6446 112.743 22.5537 113.321 22.735L122.625 25.6508L132.639 28.9429C132.775 28.9876 132.906 29.0467 133.029 29.1192L141.581 34.1511C142.433 34.6526 143.523 34.456 144.147 33.6887L152.714 23.1463C153.075 22.7024 153.608 22.4342 154.18 22.4095L162.689 22.0418C163.209 22.0194 163.717 22.2006 164.106 22.5471L172.782 30.2817C173.355 30.7924 174.169 30.9303 174.878 30.6366L183.938 26.8837L192.785 22.581C193.595 22.1872 194.568 22.3831 195.162 23.0596L203.8 32.8917C204.167 33.3091 204.691 33.5552 205.246 33.5709L214.322 33.8273C214.502 33.8324 214.683 33.8131 214.858 33.7699L224.116 31.4856C224.566 31.3745 224.964 31.1103 225.241 30.7383L234.374 18.4725C234.783 17.9228 235.445 17.6209 236.129 17.6726L245.25 18.3627L254.63 19.1856C255.167 19.2326 255.661 19.4937 256.002 19.91L265.353 31.3157C265.572 31.5835 265.718 31.9037 265.777 32.2449L274.718 84.273C275.059 86.2567 277.786 86.5511 278.542 84.6858L283.646 72.0975C283.87 71.5448 284.329 71.1209 284.898 70.9415L295.681 67.5424C296.11 67.4069 296.573 67.4205 296.994 67.5807L304.382 70.3942C305.528 70.8307 306.793 70.142 307.049 68.9424L316.536 24.4684C316.687 23.7585 317.212 23.1864 317.906 22.9735L326.641 20.2949C326.878 20.2221 327.1 20.1057 327.295 19.9517L336.81 12.4288C337.078 12.2168 337.396 12.077 337.734 12.0229L346.639 10.5953C347.151 10.5132 347.675 10.6332 348.1 10.9299L357.534 17.5127C357.615 17.5694 357.692 17.6321 357.764 17.7002L366.623 26.0831C367.343 26.7639 368.452 26.8155 369.232 26.2046L377.307 19.8761C377.802 19.4877 378.452 19.3553 379.06 19.5188L387.525 21.795C388.03 21.9308 388.568 21.8635 389.024 21.6075L397.515 16.8396C398.143 16.4868 398.912 16.4992 399.529 16.872L408.236 22.1375C408.571 22.3402 408.84 22.637 409.008 22.9909L417.173 40.1842C417.895 41.7029 420.054 41.708 420.782 40.1929L428.938 23.2294C429.101 22.8906 429.356 22.6046 429.674 22.4041L438.203 17.0276C438.923 16.5733 439.852 16.6253 440.518 17.1572L448.62 23.633C449.232 24.1222 450.074 24.2089 450.773 23.8547L458.738 19.8195C459.415 19.4762 460.229 19.5464 460.838 20.0006L468.513 25.7278C469.377 26.3725 470.597 26.2164 471.271 25.375L479.269 15.3861C479.859 14.6489 480.885 14.4251 481.728 14.8493L490.112 19.0639C490.368 19.1925 490.593 19.3747 490.772 19.598L498.989 29.8232C499.842 30.8842 501.482 30.802 502.225 29.661L509.999 17.7113C510.539 16.882 511.603 16.5718 512.504 16.9817L520.693 20.7086C520.997 20.8471 521.331 20.9071 521.664 20.8831L530.266 20.2645C530.956 20.2149 531.571 19.8126 531.893 19.2007L540.848 2.17465C541.284 1.34584 542.236 0.930488 543.14 1.17512L550.845 3.26023C551.454 3.425 551.949 3.8673 552.182 4.45362L562.031 29.2949L571.04 53.9232C571.573 55.3814 573.492 55.7022 574.471 54.4966L581.125 46.2984C581.853 45.4017 583.187 45.3061 584.035 46.0899L591.971 53.4219C592.423 53.8399 593.043 54.0261 593.651 53.9266L602.628 52.4573C602.813 52.4271 602.992 52.3713 603.161 52.2914L611.161 48.506C612.219 48.0057 613.478 48.5156 613.889 49.6106L623.235 74.4965C623.307 74.6877 623.408 74.8668 623.534 75.0275L631.611 85.3264C632.517 86.4821 634.319 86.2993 634.974 84.9851L642.725 69.4504C643.277 68.343 644.693 67.9981 645.693 68.7273L652.209 73.4787C653.167 74.1773 654.519 73.8937 655.116 72.869L663.366 58.6971C663.858 57.852 664.889 57.4866 665.803 57.8331L672.695 60.4452C673.677 60.8172 674.779 60.3672 675.22 59.4147L684.581 39.1745C684.631 39.0666 684.691 38.9634 684.759 38.866L694.355 25.1777C694.686 24.7064 695.203 24.4003 695.775 24.3377L704.519 23.3812C704.894 23.3401 705.274 23.4063 705.614 23.5721L714.235 27.7807C714.898 28.1044 715.686 28.0366 716.284 27.6042L725.265 21.1121C725.441 20.9847 725.637 20.8868 725.845 20.8225L734.754 18.0638C735.378 17.8706 736.057 17.9944 736.573 18.3954L745.412 25.2679C745.772 25.5481 746.218 25.6966 746.674 25.6887L755.875 25.5287C756.082 25.5251 756.287 25.4893 756.484 25.4225L765.439 22.3772C766.046 22.1706 766.716 22.2681 767.24 22.6393L775.628 28.5877C776.24 29.0218 777.044 29.0767 777.709 28.7299L786.476 24.1605C786.719 24.0342 786.984 23.9589 787.257 23.9392L797.062 23.2328L806.597 21.5223C807.04 21.4428 807.497 21.5151 807.894 21.7273L817.106 26.655C817.366 26.7936 817.652 26.8734 817.946 26.8887L827.529 27.3876C827.655 27.3941 827.782 27.3887 827.907 27.3714L837.385 26.0614C837.746 26.0114 838.115 26.0613 838.45 26.2057L847.364 30.0455C847.87 30.2634 848.263 30.6803 848.452 31.1979L856.496 53.2869C857.135 55.041 859.615 55.041 860.254 53.2869L868.298 31.1979C868.487 30.6803 868.881 30.2634 869.386 30.0455L878.021 26.3258C878.526 26.1083 879.099 26.1083 879.604 26.3258L888.759 30.2697C888.94 30.3474 889.108 30.4514 889.258 30.5781L897.489 37.5261C898.419 38.3107 899.828 38.0907 900.474 37.06L908.722 23.902C909.17 23.1874 910.018 22.8306 910.842 23.01L918.722 24.726C919.331 24.8586 919.966 24.7 920.441 24.2971L929.906 16.2688L938.66 10.2588C939.495 9.68494 940.628 9.82717 941.296 10.5898L948.904 19.2758C949.678 20.1592 951.042 20.189 951.854 19.3403L961.5 9.25264L969.697 1.08105C970.337 0.443097 971.325 0.313455 972.108 0.764752L979.999 5.31399C980.618 5.67109 981 6.33169 981 7.04668V220",fill:a}),l.a.createElement("path",{opacity:"0.5",d:"M8 98.5741C8 97.4695 8.89543 96.5741 10 96.5741C11.1046 96.5741 12 97.4695 12 98.5741V220H8V98.5741Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M40 98.5741C40 97.4695 40.8954 96.5741 42 96.5741C43.1046 96.5741 44 97.4695 44 98.5741V220H40V98.5741Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M32 98.5741C32 97.4695 32.8954 96.5741 34 96.5741C35.1046 96.5741 36 97.4695 36 98.5741V220H32V98.5741Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M16 172.197C16 171.092 16.8954 170.197 18 170.197C19.1046 170.197 20 171.092 20 172.197V220H16V172.197Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M48 172.197C48 171.092 48.8954 170.197 50 170.197C51.1046 170.197 52 171.092 52 172.197V220H48V172.197Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M24 128.889C24 127.785 24.8954 126.889 26 126.889C27.1046 126.889 28 127.785 28 128.889V220H24V128.889Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M57 128.889C57 127.785 57.8954 126.889 59 126.889C60.1046 126.889 61 127.785 61 128.889V220H57V128.889Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M65 71.507C65 70.4024 65.8954 69.507 67 69.507C68.1046 69.507 69 70.4024 69 71.507V220H65V71.507Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M73 46.6052C73 45.5007 73.8954 44.6052 75 44.6052C76.1046 44.6052 77 45.5007 77 46.6052V220H73V46.6052Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M81 144.047C81 142.942 81.8954 142.047 83 142.047C84.1046 142.047 85 142.942 85 144.047V220H81V144.047Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M89 79.0858C89 77.9812 89.8954 77.0858 91 77.0858C92.1046 77.0858 93 77.9812 93 79.0858V220H89V79.0858Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M97 173.279C97 172.175 97.8954 171.279 99 171.279C100.105 171.279 101 172.175 101 173.279V220H97V173.279Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M105 61.7628C105 60.6582 105.895 59.7628 107 59.7628C108.105 59.7628 109 60.6582 109 61.7628V220H105V61.7628Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M113 144.047C113 142.942 113.895 142.047 115 142.047C116.105 142.047 117 142.942 117 144.047V220H113V144.047Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M121 46.6052C121 45.5007 121.895 44.6052 123 44.6052C124.105 44.6052 125 45.5007 125 46.6052V220H121V46.6052Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M129 177.61C129 176.505 129.895 175.61 131 175.61C132.105 175.61 133 176.505 133 177.61V220H129V177.61Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M137 139.716C137 138.611 137.895 137.716 139 137.716C140.105 137.716 141 138.611 141 139.716V220H137V139.716Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M145 80.1684C145 79.0639 145.895 78.1684 147 78.1684C148.105 78.1684 149 79.0639 149 80.1684V220H145V80.1684Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M153.407 160.36C153.407 159.256 154.321 158.36 155.426 158.36C156.531 158.36 157.445 159.256 157.445 160.36V220H153.407V160.36Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M161.481 186.929C161.481 185.824 162.395 184.929 163.5 184.929C164.605 184.929 165.518 185.824 165.518 186.929V220H161.481V186.929Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M169.556 106.159C169.556 105.055 170.469 104.159 171.574 104.159C172.679 104.159 173.593 105.055 173.593 106.159V220H169.556V106.159Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M177.63 96.5947C177.63 95.4901 178.544 94.5947 179.648 94.5947C180.753 94.5947 181.667 95.4901 181.667 96.5947V220H177.63V96.5947Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M185.704 79.5905C185.704 78.486 186.618 77.5905 187.722 77.5905C188.827 77.5905 189.741 78.486 189.741 79.5905V220H185.704V79.5905Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M193.778 85.9671C193.778 84.8625 194.692 83.9671 195.796 83.9671C196.901 83.9671 197.815 84.8625 197.815 85.9671V220H193.778V85.9671Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M201.852 85.9671C201.852 84.8625 202.766 83.9671 203.87 83.9671C204.975 83.9671 205.889 84.8625 205.889 85.9671V220H201.852V85.9671Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M209.926 85.9671C209.926 84.8625 210.84 83.9671 211.944 83.9671C213.049 83.9671 213.963 84.8625 213.963 85.9671V220H209.926V85.9671Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M218 96.5947C218 95.4901 218.914 94.5947 220.019 94.5947C221.123 94.5947 222.037 95.4901 222.037 96.5947V220H218V96.5947Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M226.074 106.159C226.074 105.055 226.988 104.159 228.093 104.159C229.197 104.159 230.111 105.055 230.111 106.159V220H226.074V106.159Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M234.148 126.352C234.148 125.247 235.062 124.352 236.167 124.352C237.271 124.352 238.185 125.247 238.185 126.352V220H234.148V126.352Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M242.222 153.984C242.222 152.879 243.136 151.984 244.241 151.984C245.345 151.984 246.259 152.879 246.259 153.984V220H242.222V153.984Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M250.296 144.419C250.296 143.314 251.21 142.419 252.315 142.419C253.419 142.419 254.333 143.314 254.333 144.419V220H250.296V144.419Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M258.37 131.666C258.37 130.561 259.284 129.666 260.389 129.666C261.493 129.666 262.407 130.561 262.407 131.666V220H258.37V131.666Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M266.444 122.101C266.444 120.996 267.358 120.101 268.463 120.101C269.568 120.101 270.481 120.996 270.481 122.101V220H266.444V122.101Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M275 131.055C275 129.95 275.895 129.055 277 129.055C278.105 129.055 279 129.95 279 131.055V220H275V131.055Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M283 125.641C283 124.537 283.895 123.641 285 123.641C286.105 123.641 287 124.537 287 125.641V220H283V125.641Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M291 112.649C291 111.544 291.895 110.649 293 110.649C294.105 110.649 295 111.544 295 112.649V220H291V112.649Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M299 103.987C299 102.883 299.895 101.987 301 101.987C302.105 101.987 303 102.883 303 103.987V220H299V103.987Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M307 82.3338C307 81.2292 307.895 80.3338 309 80.3338C310.105 80.3338 311 81.2292 311 82.3338V220H307V82.3338Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M315 131.055C315 129.95 315.895 129.055 317 129.055C318.105 129.055 319 129.95 319 131.055V220H315V131.055Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M323 88.8299C323 87.7253 323.895 86.8299 325 86.8299C326.105 86.8299 327 87.7253 327 88.8299V220H323V88.8299Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M331 67.1762C331 66.0717 331.895 65.1762 333 65.1762C334.105 65.1762 335 66.0717 335 67.1762V220H331V67.1762Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M339 116.98C339 115.875 339.895 114.98 341 114.98C342.105 114.98 343 115.875 343 116.98V220H339V116.98Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M347 88.8299C347 87.7253 347.895 86.8299 349 86.8299C350.105 86.8299 351 87.7253 351 88.8299V220H347V88.8299Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M355 111.566C355 110.462 355.895 109.566 357 109.566C358.105 109.566 359 110.462 359 111.566V220H355V111.566Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M363 73.6723C363 72.5678 363.895 71.6723 365 71.6723C366.105 71.6723 367 72.5678 367 73.6723V220H363V73.6723Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M371 116.98C371 115.875 371.895 114.98 373 114.98C374.105 114.98 375 115.875 375 116.98V220H371V116.98Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M379 54.184C379 53.0795 379.895 52.184 381 52.184H382C383.105 52.184 384 53.0795 384 54.184V220H379V54.184Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M388 137.551C388 136.446 388.895 135.551 390 135.551C391.105 135.551 392 136.446 392 137.551V220H388V137.551Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M396 88.8299C396 87.7253 396.895 86.8299 398 86.8299C399.105 86.8299 400 87.7253 400 88.8299V220H396V88.8299Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M404 68.2589C404 67.1543 404.895 66.2589 406 66.2589C407.105 66.2589 408 67.1543 408 68.2589V220H404V68.2589Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M412 46.6052C412 45.5007 412.895 44.6052 414 44.6052C415.105 44.6052 416 45.5007 416 46.6052V220H412V46.6052Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M420 45.5226C420 44.418 420.895 43.5226 422 43.5226C423.105 43.5226 424 44.418 424 45.5226V220H420V45.5226Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M427.926 85.9671C427.926 84.8625 428.84 83.9671 429.944 83.9671C431.049 83.9671 431.963 84.8625 431.963 85.9671V220H427.926V85.9671Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M436 116.787C436 115.682 436.914 114.787 438.019 114.787C439.123 114.787 440.037 115.682 440.037 116.787V220H436V116.787Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M444.074 76.4023C444.074 75.2977 444.988 74.4023 446.093 74.4023C447.197 74.4023 448.111 75.2977 448.111 76.4023V220H444.074V76.4023Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M452.148 80.6533C452.148 79.5488 453.062 78.6533 454.167 78.6533C455.271 78.6533 456.185 79.5488 456.185 80.6533V220H452.148V80.6533Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M460.222 89.1554C460.222 88.0508 461.136 87.1554 462.241 87.1554C463.345 87.1554 464.259 88.0508 464.259 89.1554V220H460.222V89.1554Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M468.296 73.214C468.296 72.1094 469.21 71.214 470.315 71.214C471.419 71.214 472.333 72.1094 472.333 73.214V220H468.296V73.214Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M476.37 89.1554C476.37 88.0508 477.284 87.1554 478.389 87.1554C479.493 87.1554 480.407 88.0508 480.407 89.1554V220H476.37V89.1554Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M484.444 64.712C484.444 63.6074 485.358 62.712 486.463 62.712C487.567 62.712 488.481 63.6074 488.481 64.712V220H484.444V64.712Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M815.481 64.712C815.481 63.6074 816.395 62.712 817.5 62.712C818.605 62.712 819.518 63.6074 819.518 64.712V220H815.481V64.712Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M492.519 48.7706C492.519 47.666 493.433 46.7706 494.537 46.7706C495.642 46.7706 496.556 47.666 496.556 48.7706V220H492.519V48.7706Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M823.556 48.7706C823.556 47.666 824.47 46.7706 825.574 46.7706C826.679 46.7706 827.593 47.666 827.593 48.7706V220H823.556V48.7706Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M500.593 70.0257C500.593 68.9212 501.506 68.0257 502.611 68.0257C503.716 68.0257 504.63 68.9212 504.63 70.0257V220H500.593V70.0257Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M831.63 70.0257C831.63 68.9212 832.544 68.0257 833.648 68.0257C834.753 68.0257 835.667 68.9212 835.667 70.0257V220H831.63V70.0257Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M508.667 80.6533C508.667 79.5488 509.58 78.6533 510.685 78.6533C511.79 78.6533 512.704 79.5488 512.704 80.6533V220H508.667V80.6533Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M839.704 80.6533C839.704 79.5488 840.618 78.6533 841.722 78.6533C842.827 78.6533 843.741 79.5488 843.741 80.6533V220H839.704V80.6533Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M516.741 89.1554C516.741 88.0508 517.655 87.1554 518.759 87.1554C519.864 87.1554 520.778 88.0508 520.778 89.1554V220H516.741V89.1554Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M847.778 89.1554C847.778 88.0508 848.692 87.1554 849.796 87.1554C850.901 87.1554 851.815 88.0508 851.815 89.1554V220H847.778V89.1554Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M524.815 60.4609C524.815 59.3564 525.729 58.4609 526.833 58.4609C527.938 58.4609 528.852 59.3564 528.852 60.4609V220H524.815V60.4609Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M855.852 60.4609C855.852 59.3564 856.766 58.4609 857.87 58.4609C858.975 58.4609 859.889 59.3564 859.889 60.4609V220H855.852V60.4609Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M532.889 54.0844C532.889 52.9798 533.803 52.0844 534.907 52.0844C536.012 52.0844 536.926 52.9798 536.926 54.0844V220H532.889V54.0844Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M863.926 54.0844C863.926 52.9798 864.84 52.0844 865.944 52.0844C867.049 52.0844 867.963 52.9798 867.963 54.0844V220H863.926V54.0844Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M540.963 64.712C540.963 63.6074 541.877 62.712 542.981 62.712C544.086 62.712 545 63.6074 545 64.712V220H540.963V64.712Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M872 30.365C872 29.2604 872.895 28.365 874 28.365C875.105 28.365 876 29.2604 876 30.365V220H872V30.365Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M549.037 85.9671C549.037 84.8625 549.951 83.9671 551.056 83.9671C552.16 83.9671 553.074 84.8625 553.074 85.9671V220H549.037V85.9671Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M880 56.3494C880 55.2448 880.895 54.3494 882 54.3494C883.105 54.3494 884 55.2448 884 56.3494V220H880V56.3494Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M557.111 109.348C557.111 108.243 558.025 107.348 559.13 107.348C560.234 107.348 561.148 108.243 561.148 109.348V220H557.111V109.348Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M888 84.4992C888 83.3946 888.895 82.4992 890 82.4992C891.105 82.4992 892 83.3946 892 84.4992V220H888V84.4992Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M565.185 77.4651C565.185 76.3605 566.099 75.4651 567.204 75.4651C568.308 75.4651 569.222 76.3605 569.222 77.4651V220H565.185V77.4651Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M896 45.5226C896 44.418 896.895 43.5226 898 43.5226C899.105 43.5226 900 44.418 900 45.5226V220H896V45.5226Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M573.259 99.7829C573.259 98.6784 574.173 97.7829 575.278 97.7829C576.382 97.7829 577.296 98.6784 577.296 99.7829V220H573.259V99.7829Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M904 72.5897C904 71.4851 904.895 70.5897 906 70.5897C907.105 70.5897 908 71.4851 908 72.5897V220H904V72.5897Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M581.333 70.0257C581.333 68.9212 582.247 68.0257 583.352 68.0257C584.456 68.0257 585.37 68.9212 585.37 70.0257V220H581.333V70.0257Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M912 36.8611C912 35.7565 912.895 34.8611 914 34.8611C915.105 34.8611 916 35.7565 916 36.8611V220H912V36.8611Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M589.407 160.36C589.407 159.256 590.321 158.36 591.426 158.36C592.531 158.36 593.445 159.256 593.445 160.36V220H589.407V160.36Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M920 147.295C920 146.19 920.895 145.295 922 145.295C923.105 145.295 924 146.19 924 147.295V220H920V147.295Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M597.481 153.984C597.481 152.879 598.395 151.984 599.5 151.984C600.605 151.984 601.518 152.879 601.518 153.984V220H597.481V153.984Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M929 138.633C929 137.529 929.895 136.633 931 136.633C932.105 136.633 933 137.529 933 138.633V220H929V138.633Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M605.556 97.6574C605.556 96.5528 606.47 95.6574 607.574 95.6574C608.679 95.6574 609.593 96.5528 609.593 97.6574V220H605.556V97.6574Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M937 70.4243C937 69.3197 937.895 68.4243 939 68.4243C940.105 68.4243 941 69.3197 941 70.4243V220H937V70.4243Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M613.63 89.1554C613.63 88.0508 614.544 87.1554 615.648 87.1554C616.753 87.1554 617.667 88.0508 617.667 89.1554V220H613.63V89.1554Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M945 60.6801C945 59.5756 945.895 58.6801 947 58.6801C948.105 58.6801 949 59.5756 949 60.6801V220H945V60.6801Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M621.704 80.6533C621.704 79.5488 622.618 78.6533 623.722 78.6533C624.827 78.6533 625.741 79.5488 625.741 80.6533V220H621.704V80.6533Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M953 49.8533C953 48.7487 953.895 47.8533 955 47.8533C956.105 47.8533 957 48.7487 957 49.8533V220H953V49.8533Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M629.778 94.4692C629.778 93.3646 630.692 92.4692 631.796 92.4692C632.901 92.4692 633.815 93.3646 633.815 94.4692V220H629.778V94.4692Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M961 66.0936C961 64.989 961.895 64.0936 963 64.0936C964.105 64.0936 965 64.989 965 66.0936V220H961V66.0936Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M637.852 105.097C637.852 103.992 638.766 103.097 639.87 103.097C640.975 103.097 641.889 103.992 641.889 105.097V220H637.852V105.097Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M969 79.0858C969 77.9812 969.895 77.0858 971 77.0858C972.105 77.0858 973 77.9812 973 79.0858V220H969V79.0858Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M645.926 131.666C645.926 130.561 646.84 129.666 647.944 129.666C649.049 129.666 649.963 130.561 649.963 131.666V220H645.926V131.666Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M977 111.566C977 110.462 977.895 109.566 979 109.566C980.105 109.566 981 110.462 981 111.566V220H977V111.566Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M654 164.611C654 163.507 654.914 162.611 656.019 162.611C657.123 162.611 658.037 163.507 658.037 164.611V220H654V164.611Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M662.074 155.046C662.074 153.942 662.988 153.046 664.093 153.046C665.197 153.046 666.111 153.942 666.111 155.046V220H662.074V155.046Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M670.148 126.352C670.148 125.247 671.062 124.352 672.167 124.352C673.271 124.352 674.185 125.247 674.185 126.352V220H670.148V126.352Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M678.222 85.9671C678.222 84.8625 679.136 83.9671 680.241 83.9671C681.345 83.9671 682.259 84.8625 682.259 85.9671V220H678.222V85.9671Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M686.296 113.599C686.296 112.494 687.21 111.599 688.315 111.599C689.419 111.599 690.333 112.494 690.333 113.599V220H686.296V113.599Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M694.37 126.352C694.37 125.247 695.284 124.352 696.389 124.352C697.493 124.352 698.407 125.247 698.407 126.352V220H694.37V126.352Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M702.444 186.929C702.444 185.824 703.358 184.929 704.463 184.929C705.567 184.929 706.481 185.824 706.481 186.929V220H702.444V186.929Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M710.519 166.737C710.519 165.632 711.433 164.737 712.537 164.737C713.642 164.737 714.556 165.632 714.556 166.737V220H710.519V166.737Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M718.593 125.289C718.593 124.184 719.506 123.289 720.611 123.289C721.716 123.289 722.63 124.184 722.63 125.289V220H718.593V125.289Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M726.667 109.348C726.667 108.243 727.581 107.348 728.685 107.348C729.79 107.348 730.704 108.243 730.704 109.348V220H726.667V109.348Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M734.741 128.477C734.741 127.373 735.655 126.477 736.759 126.477C737.864 126.477 738.778 127.373 738.778 128.477V220H734.741V128.477Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M742.815 141.23C742.815 140.126 743.729 139.23 744.833 139.23C745.938 139.23 746.852 140.126 746.852 141.23V220H742.815V141.23Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M750.889 90.2182C750.889 89.1136 751.803 88.2182 752.907 88.2182C754.012 88.2182 754.926 89.1136 754.926 90.2182V220H750.889V90.2182Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M758.963 112.536C758.963 111.431 759.877 110.536 760.981 110.536C762.086 110.536 763 111.431 763 112.536V220H758.963V112.536Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M767.037 125.289C767.037 124.184 767.951 123.289 769.056 123.289C770.16 123.289 771.074 124.184 771.074 125.289V220H767.037V125.289Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M775.111 145.481C775.111 144.377 776.025 143.481 777.13 143.481C778.234 143.481 779.148 144.377 779.148 145.481V220H775.111V145.481Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M783.185 141.23C783.185 140.126 784.099 139.23 785.204 139.23C786.308 139.23 787.222 140.126 787.222 141.23V220H783.185V141.23Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M791.259 144.419C791.259 143.314 792.173 142.419 793.278 142.419C794.382 142.419 795.296 143.314 795.296 144.419V220H791.259V144.419Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M799.333 109.348C799.333 108.243 800.247 107.348 801.352 107.348C802.456 107.348 803.37 108.243 803.37 109.348V220H799.333V109.348Z",fill:n}),l.a.createElement("path",{opacity:"0.5",d:"M807.407 104.034C807.407 102.929 808.321 102.034 809.426 102.034C810.531 102.034 811.445 102.929 811.445 104.034V220H807.407V104.034Z",fill:n}))},kn=()=>{const{active:e,total:t}=Object(c.useSelector)(Re.d);return l.a.createElement(C.a,{flexDirection:"column"},l.a.createElement(ee.b,{styleNumber:16},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_ACTIVE_CLIENTS"})),l.a.createElement(C.a,null,l.a.createElement(ee.b,{styleNumber:21},e+" ",l.a.createElement(W.b,{id:"DASHBOARD_MODULE_ACTIVE_CLIENTS_NOW"})),l.a.createElement(ee.b,{styleNumber:20},` / ${t} `,l.a.createElement(W.b,{id:"COMMON_TOTAL"}))))};const Wn=Object(i.c)(ga.a)`
  div[class*='action'] {
    margin-left: auto;
  }
  > div {
    @media ${w.a.VIEWPORT_XXXL_UP} {
      margin-bottom: 16px;
    }
  }
`,Bn=Object(i.c)(C.a)`
  @media ${w.a.VIEWPORT_L_UP} {
    display: none;
  }
`,zn=Object(i.c)(C.a)`
  display: none;
  @media ${w.a.VIEWPORT_L_UP} {
    display: flex;
  }
`,Hn=Object(i.c)("div")`
  position: absolute;
  top: 0;
  left: 0;
`,Gn=Object(i.c)(z.a)`
  button {
    span {
      @media ${w.a.VIEWPORT_XXXL} {
        font-size: ${({theme:e})=>e.fontSize["font-size-body"]} !important;
      }
      @media ${w.a.VIEWPORT_XXXXL} {
        font-size: ${({theme:e})=>e.fontSize["font-size-body"]} !important;
      }
    }
  }
`,$n=Object(i.c)(le.a)`
  width: 38px;
  height: 38px;

  @media ${w.a.VIEWPORT_XL_DOWN} {
    width: 30px;
    height: 30px;
  }
`,Yn=Object(i.c)(H.a)`
  @media ${w.a.VIEWPORT_XL_UP} {
    font-size: 16px !important;
  }
`,Xn=Object(i.c)("div")`
  > div {
    > div:first-child {
      padding: 0 ${({theme:e})=>e.spacing["spacing-l"]};
      span:first-child {
        line-height: 1.6;
        span {
          ${ee.c.style16}
        }
      }
      span:last-child {
        line-height: 1.6;
        span {
          ${ee.c.style20}
        }
      }
      @media ${w.a.VIEWPORT_L_DOWN} {
        padding: 0;
      }
    }
    > div:last-child {
      > div {
        > div:nth-child(2) {
          > span:first-child {
            line-height: 1.6;
            ${ee.c.style16}
          }
          > span:last-child {
            line-height: 1.6;
            ${ee.c.style20}
          }
        }
        > span {
          font-size: ${({theme:e})=>e.fontSize["font-size-caption"]} !important;
          @media ${w.a.VIEWPORT_XXXL} {
            font-size: ${({theme:e})=>e.fontSize["font-size-body"]} !important;
          }
          @media ${w.a.VIEWPORT_XXXXL} {
            font-size: ${({theme:e})=>e.fontSize["font-size-header-xs"]} !important;
          }
        }
      }
    }
  }
`,Kn=({intl:e})=>{const t=Object(n.useRef)(null),a=Object(c.useSelector)(U.selectActiveApDevices),i=Object(c.useSelector)(On.b),{site_stats:r}=Object(c.useSelector)(Re.g),o=Object(Cn.c)(e.formatMessage({id:"COMMON_ALL"})),[s,E]=Object(n.useState)("all"),[m,d]=Object(n.useState)(o[0]),{width:_,height:u}=Object(re.l)(t),b=r.reduce((e,{wifi_satisfaction:t})=>(-1!==t.total&&(e.sum+=t.total,e.count+=1),e),{sum:0,count:0}),p=b.count>0?Math.round(b.sum/b.count):-1,O=a.reduce((e,{satisfaction:t})=>(t&&-1!==t&&(e.sum+=t,e.count+=1),e),{sum:0,count:0}),I=Object(n.useMemo)(()=>O.count>0?Math.round(O.sum/O.count):i||-1,[O.count,O.sum,i]),g=Object(n.useMemo)(()=>[{id:"all",image:l.a.createElement($n,{deviceModel:U.DeviceModel.U7HD,deviceType:U.DeviceType.AP}),title:l.a.createElement(W.b,{id:"COMMON_ALL_AP"}),subtitle:l.a.createElement(W.b,{id:"COMMON_NUMBER_OF_TOTAL",values:{total:a.length}}),info:Object(gn.d)(I)?l.a.createElement(Yn,{color:Object(gn.c)(I)},Object(he.a)(I/100)):l.a.createElement(ee.b,{styleNumber:16},l.a.createElement(W.b,{id:"COMMON_NA"}))},...a.map(e=>({id:e.mac,image:l.a.createElement($n,{deviceModel:e.model,deviceType:e.type}),title:l.a.createElement("span",null,Object(Xe.c)(e)),subtitle:l.a.createElement("span",null,Object(Xe.a)(e)),info:Object(gn.d)(e.satisfaction)?l.a.createElement(Yn,{color:Object(gn.c)(e.satisfaction)},Object(he.a)(e.satisfaction/100)):l.a.createElement(ee.b,{styleNumber:16},l.a.createElement(W.b,{id:"COMMON_NA"}))}))],[a,I]);return l.a.createElement(qn,{wifiExperienceAverageNow:I,wifiExperienceAverageForDateRange:p,apDevices:g,selectedAp:s,setSelectedAp:E,channelFilterTabs:o,setActiveChannelFilter:d,chartContainerRef:t,width:_,height:u,activeChannelFilter:m,isLoaded:!0})},Zn=({width:e,height:t,selectedAp:a,activeChannelFilter:n})=>e&&t?l.a.createElement(Fn,{width:e,height:t,selectedMac:a,activeChannelFilter:n}):null,qn=({wifiExperienceAverageNow:e,wifiExperienceAverageForDateRange:t,apDevices:a,selectedAp:n,setSelectedAp:i,channelFilterTabs:r,setActiveChannelFilter:c,chartContainerRef:s,width:E,height:m,isLoaded:d,activeChannelFilter:_})=>{const{motif:u}=Object(o.a)();return l.a.createElement(Wn,{height:"auto",title:l.a.createElement(C.a,{flex:"1"},d?l.a.createElement(kn,null):l.a.createElement(C.a,{width:"100%",flexDirection:"column"},l.a.createElement(V.a,{width:136,height:16,marginBottom:6}),l.a.createElement(V.a,{width:156,height:12}))),centerContent:l.a.createElement(zn,{alignItems:"center",justifyContent:"center"},l.a.createElement(C.a,{marginRight:40},d?l.a.createElement(Xn,null,l.a.createElement(In.a,{devices:a,selectedDevice:n,setSelectedDevice:i,displaySubtitleForSelected:!0})):l.a.createElement(C.a,{width:"100%",justifyContent:"space-between"},l.a.createElement(C.a,{width:"100%",flexDirection:"column"},l.a.createElement(V.a,{width:156,height:16,marginBottom:6}),l.a.createElement(V.a,{width:76,height:12})))),l.a.createElement(C.a,null,d?l.a.createElement(Gn,{disableScroll:!0,fullHeightTabs:!0,motif:u,tabs:r,onSelectTab:e=>c(e),variant:"tertiary"}):l.a.createElement(C.a,null,l.a.createElement(V.a,{width:28,height:16,marginRight:16}),l.a.createElement(V.a,{width:28,height:16,marginRight:16}),l.a.createElement(V.a,{width:28,height:16})))),action:l.a.createElement(C.a,{flex:"1",flexDirection:"column",alignItems:"flex-end"},d?l.a.createElement(vn,{now:e,avg:t}):l.a.createElement(C.a,{width:"100%",flexDirection:"column"},l.a.createElement(V.a,{width:146,height:16,marginBottom:6}),l.a.createElement(V.a,{width:106,height:12})))},l.a.createElement(Bn,{alignItems:"center",justifyContent:"space-between"},l.a.createElement(C.a,{marginRight:40},d?l.a.createElement(Xn,null,l.a.createElement(In.a,{devices:a,selectedDevice:n,setSelectedDevice:i,displaySubtitleForSelected:!0})):l.a.createElement(C.a,{width:"100%",justifyContent:"space-between"},l.a.createElement(C.a,{width:"100%",flexDirection:"column"},l.a.createElement(V.a,{width:156,height:16,marginBottom:6}),l.a.createElement(V.a,{width:76,height:12})))),l.a.createElement(C.a,null,d?l.a.createElement(Gn,{disableScroll:!0,fullHeightTabs:!0,motif:u,tabs:r,onSelectTab:e=>c(e),variant:"tertiary"}):l.a.createElement(C.a,null,l.a.createElement(V.a,{width:28,height:16,marginRight:16}),l.a.createElement(V.a,{width:28,height:16,marginRight:16}),l.a.createElement(V.a,{width:28,height:16})))),l.a.createElement(C.a,{height:"100%"},d?l.a.createElement(C.a,{flex:"1",minHeight:200,width:"100%",position:"relative",innerRef:s},l.a.createElement(Hn,null,l.a.createElement(Zn,{width:E,height:m,selectedAp:n,activeChannelFilter:_}))):l.a.createElement(C.a,{width:"100%",height:"100%"},l.a.createElement(Un,null))))};var Jn=Object(W.e)(e=>e.isLoaded?l.a.createElement(Kn,Object.assign({},e)):l.a.createElement(qn,{isLoaded:!1}));const Qn=({showWiFiClientWidgets:e})=>{const t=Object(c.useSelector)(Object(Ka.f)(Ka.a.WIFI_CONFIG_CREATED)),a=Object(n.useMemo)(()=>e?e&&!t?l.a.createElement(pn,null):l.a.createElement(Jn,{isLoaded:!0}):l.a.createElement(rn,null),[e,t]);return Object(re.g)([Object(Ka.d)(void 0,{crudCacheStrategy:{type:T.a.CACHE}})],a)};var el=({isLoaded:e,showWiFiClientWidgets:t})=>e?l.a.createElement(Qn,{showWiFiClientWidgets:t}):l.a.createElement(Jn,{isLoaded:!1});const tl=Object(i.c)("img")`
  position: relative;
  max-width: 100%;
  border-radius: ${({theme:e})=>e.spacing["spacing-s"]};
  object-fit: cover;
`,al=Object(i.c)(C.a)`
  margin: ${({theme:e})=>`${e.spacing["spacing-m"]} ${e.spacing["spacing-xl"]}`};
  @media ${w.a.VIEWPORT_L_UP} {
    margin: ${({theme:e})=>`${e.spacing["spacing-xl"]} ${e.spacing["spacing-xxxxxl"]}`};
  }
  > {
    &:not(:last-child) {
      margin-bottom: ${({theme:e})=>e.spacing["spacing-s"]};
    }
  }
`,nl=Object(i.c)("div")`
  position: relative;
  z-index: 1;
  opacity: 1;
  transition: all ${550}ms cubic-bezier(0.25, 0, 0.25, 1);
  padding: ${({theme:e})=>e.spacing["spacing-xl"]};
  @media ${w.a.VIEWPORT_XL_UP} {
    padding: ${({theme:e})=>e.spacing["spacing-xxxxl"]};
  }
`,ll=Object(i.c)(C.a,{shouldForwardProp:e=>"isDarkMode"!==e})`
  position: relative;
  background: ${({isDarkMode:e})=>e?"#161819":"#f3f4f5"};
  border-radius: ${({theme:e})=>e.spacing["spacing-l"]};
`,il=Object(i.c)(H.a,{shouldForwardProp:e=>"isDarkMode"!==e})`
  color: ${({isDarkMode:e})=>e?Se.a["white-0"]:Se.a["grey-1"]};
  font-size: 18px;
  @media ${w.a.VIEWPORT_L_UP} {
    font-size: ${({theme:e})=>e.fontSize["font-size-xl"]};
  }
`,rl=Object(i.c)(H.a,{shouldForwardProp:e=>"isDarkMode"!==e})`
  ${({isDarkMode:e})=>e&&"color: rgba(255, 255, 255, 0.85);"}
  font-size: ${({theme:e})=>e.fontSize["font-size-s"]};
  @media ${w.a.VIEWPORT_L_UP} {
    font-size: ${({theme:e})=>e.fontSize["font-size-l"]};
  }
`,cl=Object(i.c)(Ge.a)`
  width: 120px;
  ${({theme:e})=>`\n    margin-top: ${e.spacing["spacing-m"]};\n    border: 1px solid ${e.motifPalette.neutral03};\n    border-radius: ${e.spacing["spacing-s"]};\n  `}
`,ol=Object(i.c)(C.a)`
  white-space: nowrap;
`,sl=Object(i.c)("div")`
  transition: all ${550}ms cubic-bezier(0.25, 0, 0.25, 1);
  position: relative;
`,El=Object(i.c)(B.z)`
  position: absolute;
  top: 20px;
  right: 20px;
  color: ${({theme:e})=>e.motifPalette.neutral08};
  z-index: 1;
`,ml={exiting:{flex:"0 0 0",overflow:"hidden"},exited:{flex:"0 0 0",overflow:"hidden",borderTop:"none"}},dl={exiting:{opacity:0},exited:{display:"none"}},_l={exiting:{opacity:1},exited:{opacity:1,position:"initial"}},ul=({state:e,hideBanner:t,hasActiveAPs:a})=>{const i=Object(n.useRef)(),{motif:r}=Object(o.a)(),s="dark"===r,E=Object(c.useSelector)(_t.a);Object(n.useEffect)(()=>("exiting"===e&&a&&(i.current=setInterval(()=>{dispatchEvent(new Event("resize"))},20)),()=>{"exited"===e&&i.current&&clearInterval(i.current)}),[e,a]);const m=Object(n.useCallback)(()=>{window.open(Nt.a.uiStoreUdmPro,"_blank")},[]);return l.a.createElement(nl,{style:{...!a&&dl[e]}},l.a.createElement(ll,{height:"100%",justifyContent:"space-between",alignItems:"center",isDarkMode:s},l.a.createElement(El,{actionable:!0,onClick:()=>{t()}}),l.a.createElement(C.a,{height:"100%"},l.a.createElement(tl,{src:`${E}/${s?"dashboard/limited/applications-dark.png":"dashboard/limited/applications-light.png"}`})),l.a.createElement(al,{flex:"0 0 20%",flexDirection:"column",alignItems:"center",alignSelf:"center"},l.a.createElement(ol,{flexDirection:"row",alignItems:"baseline"},l.a.createElement(Mt,{fill:s?Se.a["white-0"]:Se.a["grey-1"]}),l.a.createElement(il,{isDarkMode:s,weight:"bold"}," ",l.a.createElement(W.b,{id:"DASHBOARD_DREAM_MACHINE_PRO_LABEL"}))),l.a.createElement(rl,{isDarkMode:s,color:"secondary",centered:!0,size:"body"},l.a.createElement(W.b,{id:"DASHBOARD_DREAM_MACHINE_PRO_DESCRIPTION"})),l.a.createElement(cl,{variant:s?"primary":"secondary",onClick:m},l.a.createElement(W.b,{id:"DASHBOARD_DREAM_MACHINE_PRO_BUTTON"}))),l.a.createElement(C.a,{height:"100%"},l.a.createElement(tl,{src:E+"/dashboard/limited/udmPro.png"}))))};var bl=({NoApsPlaceholder:e,isLoaded:t})=>{const a=Object(c.useSelector)(Fe.I),i=Object(c.useSelector)(Object(Ka.f)(Ka.a.WIFI_CONFIG_CREATED)),r=Object(c.useSelector)(U.selectActiveApDevices),o=Object(c.useSelector)(Re.e),[s,E]=Object(n.useState)(!a.bypassDashboardUdmProAd&&!o),m=Object(c.useDispatch)(),d=i&&(null==r?void 0:r.length)>0;return Object(re.g)([Object(Ka.d)(void 0,{crudCacheStrategy:{type:T.a.CACHE}})],l.a.createElement(we.a,{in:s,timeout:550,unmountOnExit:!1},n=>l.a.createElement(sl,{className:"udmProAd",style:{...d&&ml[n]}},l.a.createElement(ul,{state:n,hideBanner:()=>{m(Object(Fe.h)({...a,bypassDashboardUdmProAd:!0})),E(!1)},hasActiveAPs:d}),!d&&l.a.createElement(e,{isLoaded:t,placeholder:!s,style:{position:"absolute",top:0,left:0,right:0,bottom:0,transition:"all 550ms cubic-bezier(0.25, 0, 0.25, 1)",opacity:0,filter:"blur(4px) grayscale(1) opacity(0.35)",pointerEvents:"none",height:"100%",..._l[n]}}))))},pl=a(66),Ol=a(1038),Il=a(366),gl=a(213);const Cl=Object(i.c)(B.E)`
  margin: 0 6px 0 14px;
`,hl=Object(i.c)(B.g)`
  cursor: pointer;
  color: ${({theme:e})=>e.motifPalette.neutral08};
  @media ${w.a.VIEWPORT_XXL_UP} {
    display: none;
  }
`,Tl=Object(i.c)(ee.a)`
  display: none;
  @media ${w.a.VIEWPORT_XXL_UP} {
    display: block;
    margin-left: 6px;
  }
`,vl=Object(i.c)(C.a)`
  align-self: center;
  width: 1px;
  height: 48px;
  top: 15px;
  position: relative;
  margin: 0 30px 0 30px;
  background-color: ${({theme:e})=>e.motifPalette.neutral03};
  @media ${w.a.VIEWPORT_M}, ${w.a.VIEWPORT_L} {
    margin: 0 46px 0 46px;
  }
  @media ${w.a.VIEWPORT_XL} {
    margin: 0 40px 0 40px;
  }
  @media ${w.a.VIEWPORT_XXL} {
    margin: 0 46px 0 46px;
  }
  @media ${w.a.VIEWPORT_XXXL} {
    margin: 0 86px 0 86px;
  }
  @media ${w.a.VIEWPORT_XXXXL} {
    margin: 0 106px 0 106px;
    height: 68px;
    top: 20px;
  }
`,fl=Object(i.c)(C.a)`
  &:not(:last-child) {
    margin-right: 28px;
    @media ${w.a.VIEWPORT_M} {
      margin-right: 44px;
    }
    @media ${w.a.VIEWPORT_XL} {
      margin-right: 32px;
    }
    @media ${w.a.VIEWPORT_XXL} {
      margin-right: 44px;
    }
    @media ${w.a.VIEWPORT_XXXL} {
      margin-right: 54px;
    }
    @media ${w.a.VIEWPORT_XXXXL} {
      margin-right: 76px;
    }
  }
`;var Rl=a(474),Dl=a(179);const Sl=Object(i.c)(Y.f,{shouldForwardProp:e=>!["placeholder","mimo","motif","percentage","wifiMimoSupported"].includes(e)})`
  ${({theme:e,placeholder:t})=>!t&&"border: 1px solid "+e.motifPalette.neutral03};
  min-width: 32px;
  min-height: 32px;
  @media ${w.a.VIEWPORT_XXXL} {
    min-width: 38px;
    min-height: 38px;
  }
  @media ${w.a.VIEWPORT_XXXXL} {
    min-width: 54px;
    min-height: 54px;
  }

  background: ${({placeholder:e,percentage:t,motif:a})=>e?a===Za.a.LIGHT?"#EDEDF0":"#141415":`linear-gradient(to bottom, transparent 0% ${100-t}%, #39cc64 ${100-t}% 100%);`};

  &:hover {
    ${({wifiMimoSupported:e,mimo:{mimoPercentages:t,accelerationStep:a}})=>e&&`background: linear-gradient(\n      to bottom,\n     transparent 0% ${100-a}%,\n     ${Object.values(t).map(({color:e,from:t,to:a})=>`${e} ${t}% ${a}%`)}\n    )`}
  }
`;var yl=({placeholder:e,totalClientsPerWifiMimo:t,clientsPerWifiMimo:a,motif:i,clientWifiMimoColors:r,wifiClient:c,totalWifiClients:o,wifiMimoSupported:s})=>l.a.createElement(Sl,{borderRadius:4,placeholder:e,motif:i,mimo:Object(n.useMemo)(()=>{const e={};let n=0;return a.forEach(a=>{var l;e[a.mimo]={color:r[a.mimo],from:n,to:(l=Math.round(((null==a?void 0:a.count)||0)/t*100),(Number.isNaN(l)?0:l)+n)},n+=(e=>Number.isNaN(e)?0:e)(Math.round(((null==a?void 0:a.count)||0)/t*100))}),{mimoPercentages:e,accelerationStep:n}},[a,t]),percentage:Math.round(((null==c?void 0:c.count)||0)/o*100),wifiMimoSupported:s});const Pl=Object(i.c)(Rl.a,{shouldForwardProp:e=>"colorOverride"!==e})`
  background-color: ${({colorOverride:e})=>e};
`,Al={[Re.a.MIMO_1]:"#F5A623",[Re.a.MIMO_2]:"#FFDB1A",[Re.a.MIMO_3]:"#006FFF",[Re.a.MIMO_4]:"#46C7FD"};var Nl=({wifiClient:e,totalWifiClients:t,placeholder:a,motif:i,wifiMimoSupported:r})=>{var c;const o=Object(n.useMemo)(()=>{var t;return(null===(t=null==e?void 0:e.clients_per_wifi_mimo)||void 0===t?void 0:t.reverse())||[]},[null==e?void 0:e.clients_per_wifi_mimo]),s=o.reduce((e,t)=>e+(null==t?void 0:t.count)||0,0),E=Object(n.useMemo)(()=>o.map((e,t,a)=>l.a.createElement(C.a,{key:e.mimo,marginBottom:t+1<a.length?8:0,alignItems:"center"},l.a.createElement(C.a,{marginRight:8},l.a.createElement(Pl,{colorOverride:Al[e.mimo]})),l.a.createElement(C.a,{marginRight:18},l.a.createElement(H.a,null,`${e.mimo.slice(-1)}x${e.mimo.slice(-1)}`)),l.a.createElement(C.a,{width:"100%",marginRight:20},l.a.createElement(Kt.a,{style:{borderRadius:"2px"},height:4,items:[{color:Al[e.mimo],value:((null==e?void 0:e.count)||0)/s*100}]})),l.a.createElement(C.a,{marginRight:6},l.a.createElement(B.v,{size:"small"})),l.a.createElement(C.a,{minWidth:16},l.a.createElement(H.a,null,(null==e?void 0:e.count)||0)))),[o,s]);return l.a.createElement(fl,{flexDirection:"column",alignItems:"center","data-testid":`wifi-client-${e.radio_band}-${e.wifi_standard}`},l.a.createElement(ee.b,{styleNumber:26},(null==e?void 0:e.count)||0),l.a.createElement(C.a,{margin:"8px 0"},l.a.createElement(Dl.a,{condition:r&&!a,wrapper:e=>l.a.createElement(ut.a,{width:265,message:l.a.createElement(C.a,{flexDirection:"column"},l.a.createElement(C.a,{marginBottom:18},l.a.createElement(H.a,{size:"body"},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_CLIENTS_MIMO_CAP"}))),E)},e)},l.a.createElement(yl,{placeholder:a,totalClientsPerWifiMimo:s,clientsPerWifiMimo:o,motif:i,clientWifiMimoColors:Al,wifiClient:e,totalWifiClients:t,wifiMimoSupported:r}))),l.a.createElement(ee.b,{styleNumber:27},l.a.createElement(W.b,{id:"COMMON_WIFI"})," ",null===(c=null===Re.b||void 0===Re.b?void 0:Re.b[null==e?void 0:e.wifi_standard])||void 0===c?void 0:c.slice(-1)))};const jl=({wifiClients:e,title:t,placeholder:a=!1})=>{const{motif:i}=Object(o.a)(),r=Object(c.useSelector)(Object(gl.e)(Il.a.WIFI_MIMO)),s=e.reduce((e,t)=>e+(null==t?void 0:t.count)||0,0);return l.a.createElement(C.a,{flexDirection:"column",alignItems:"center"},l.a.createElement(C.a,{marginBottom:8},l.a.createElement(ee.b,{styleNumber:25},l.a.createElement(W.b,{id:t}))),l.a.createElement(C.a,null,Object(n.useMemo)(()=>e.map(e=>l.a.createElement(Nl,{key:e.wifi_standard,wifiClient:e,totalWifiClients:s,placeholder:a,motif:i,wifiMimoSupported:r})),[e,i,r,a])))},xl=({children:e,totalClients:t=0})=>{const a=Object(re.a)("/statistics/"+Ol.b.wifiStatistics),n=Object(r.k)(),i=()=>n.push(a);return l.a.createElement(ga.a,{height:"auto",title:l.a.createElement(ee.b,{whiteSpace:"nowrap",styleNumber:16},l.a.createElement(W.b,{id:"COMMON_WIFI"})," ",l.a.createElement(W.b,{id:"COMMON_CLIENTS"})),action:l.a.createElement(l.a.Fragment,null,l.a.createElement(C.a,{marginRight:18,alignItems:"center"},l.a.createElement(Cl,{width:16,height:16}),l.a.createElement(ee.b,{styleNumber:14},t)),l.a.createElement(C.a,{alignItems:"center"},l.a.createElement(Tl,{styleNumber:15,variant:"inline",onClick:i},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_VIEW_ALL_CLIENTS"})),l.a.createElement(hl,{width:16,height:16,onClick:i})))},e)},Ll=({totalClients:e,dashboardClientsPerWifiStandard:t})=>{const{ngClients:a,naClients:i}=Object(n.useMemo)(()=>({ngClients:(t||[]).filter(e=>(null==e?void 0:e.radio_band)===pl.b.RADIO_NG),naClients:(t||[]).filter(e=>(null==e?void 0:e.radio_band)===pl.b.RADIO_NA)}),[t]);return l.a.createElement(xl,{totalClients:e},l.a.createElement(C.a,{justifyContent:"center",padding:"0 22px"},l.a.createElement(jl,{title:"COMMON_RADIO_BAND_NG",wifiClients:a}),l.a.createElement(vl,null),l.a.createElement(jl,{title:"COMMON_RADIO_BAND_NA",wifiClients:i})))},Vl=()=>{const e=Object(c.useSelector)(Re.i),t=Object(n.useMemo)(()=>(e||[]).reduce((e,t)=>e+(null==t?void 0:t.count)||0,0),[e]);return t>0?l.a.createElement(Ll,{dashboardClientsPerWifiStandard:e,totalClients:t}):l.a.createElement(xl,null,l.a.createElement(C.a,{justifyContent:"center",padding:"0 22px"},l.a.createElement(jl,{title:"COMMON_RADIO_BAND_NG",wifiClients:[{count:0,radio_band:pl.b.RADIO_NG,wifi_standard:Re.b.WIFI_4,clients_per_wifi_mimo:[]},{count:0,radio_band:pl.b.RADIO_NG,wifi_standard:Re.b.WIFI_5,clients_per_wifi_mimo:[]},{count:0,radio_band:pl.b.RADIO_NG,wifi_standard:Re.b.WIFI_6,clients_per_wifi_mimo:[]}],placeholder:!0}),l.a.createElement(vl,null),l.a.createElement(jl,{title:"COMMON_RADIO_BAND_NA",wifiClients:[{count:0,radio_band:pl.b.RADIO_NA,wifi_standard:Re.b.WIFI_4,clients_per_wifi_mimo:[]},{count:0,radio_band:pl.b.RADIO_NA,wifi_standard:Re.b.WIFI_5,clients_per_wifi_mimo:[]},{count:0,radio_band:pl.b.RADIO_NA,wifi_standard:Re.b.WIFI_6,clients_per_wifi_mimo:[]}],placeholder:!0})))};var Ml=({isLoaded:e})=>e?l.a.createElement(Vl,null):l.a.createElement(ga.a,{height:"auto",title:l.a.createElement(V.a,{width:92,height:16,marginBottom:8}),action:l.a.createElement(l.a.Fragment,null,l.a.createElement(V.a,{width:16,height:16,marginRight:8}),l.a.createElement(V.a,{width:16,height:16}))},l.a.createElement(C.a,{justifyContent:"center",padding:"0 22px"},l.a.createElement(C.a,{flexDirection:"column",alignItems:"center"},l.a.createElement(C.a,{marginBottom:8},l.a.createElement(V.a,{width:36,height:12})),l.a.createElement(C.a,null,[0,1,2].map(e=>l.a.createElement(fl,{key:e,flexDirection:"column",alignItems:"center"},l.a.createElement(V.a,{width:12,height:12}),l.a.createElement(V.a,{width:32,height:32,margin:"8px 0"}),l.a.createElement(V.a,{width:32,height:8}))))),l.a.createElement(V.a,{margin:"30px 46px 0 46px",width:1,height:50}),l.a.createElement(C.a,{flexDirection:"column",alignItems:"center"},l.a.createElement(C.a,{marginBottom:8},l.a.createElement(V.a,{width:36,height:12})),l.a.createElement(C.a,null,[3,4,5].map(e=>l.a.createElement(fl,{key:e,flexDirection:"column",alignItems:"center"},l.a.createElement(V.a,{width:12,height:12}),l.a.createElement(V.a,{width:32,height:32,margin:"8px 0"}),l.a.createElement(V.a,{width:32,height:8})))))));const wl=Object(i.c)(B.g)`
  cursor: pointer;
  color: ${({theme:e})=>e.motifPalette.neutral08};
  @media ${w.a.VIEWPORT_XXL_UP} {
    display: none;
  }
`,Fl=Object(i.c)(ee.a)`
  display: none;
  @media ${w.a.VIEWPORT_XXL_UP} {
    display: block;
    margin-left: 6px;
  }
`,Ul=Object(i.c)(B.cb)`
  margin: 0 8px;
`,kl=Object(i.c)(Y.c,{shouldForwardProp:e=>"margin"!==e})`
  max-width: 80%;
  max-height: 80%;
  ${({margin:e})=>e?`margin: ${e} !important;`:""}
`,Wl=Object(i.c)(ee.b)`
  width: 150%;
  word-break: break-all;
  overflow: hidden;
  /** Custom solution because Text does not support multiline ellipsis. */
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
`,Bl=Object(i.c)(Te.a,{shouldForwardProp:e=>"direction"!==e})`
  color: ${({theme:e,direction:t})=>e.motifPalette["up"===t?"purple06":"uBlue06"]} !important;
`,zl=Object(i.c)(ut.a)`
  &:not(:last-child) {
    margin-right: 48px;
    @media ${w.a.VIEWPORT_M} {
      margin-right: 38px;
    }
    @media ${w.a.VIEWPORT_L} {
      margin-right: 48px;
    }
    @media ${w.a.VIEWPORT_XL} {
      margin-right: 30px;
    }
    @media ${w.a.VIEWPORT_XXL} {
      margin-right: 42px;
    }
    @media ${w.a.VIEWPORT_XXXL} {
      margin-right: 68px;
    }
    @media ${w.a.VIEWPORT_XXXXL} {
      margin-right: 92px;
    }
  }
`,Hl=Object(i.c)(Y.f)`
  width: 48px;
  height: 48px;
  @media ${w.a.VIEWPORT_XXXL} {
    width: 56px;
    height: 56px;
  }
  @media ${w.a.VIEWPORT_XXXXL} {
    width: 80px;
    height: 80px;
  }
`,Gl=Object(i.c)(Y.f)`
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.neutral03};
`,$l=Object(i.c)(ga.a)`
  min-height: 188px;
`,Yl=()=>{var e;const t=Object(c.useSelector)(L.a),a=Object(c.useSelector)(L.b),i=Object(n.useMemo)(()=>{var e,t;return null===(t=(null===(e=null==a?void 0:a.groups)||void 0===e?void 0:e.all)||[])||void 0===t?void 0:t.reduce((e,t)=>e+(((null==t?void 0:t.tx_bytes)||0)+(null==t?void 0:t.rx_bytes)||0),0)},[null===(e=null==a?void 0:a.groups)||void 0===e?void 0:e.all]),{motif:s}=Object(o.a)(),E=Object(re.a)("/clients"),m=Object(re.a)("/clients/properties/:mac/"+Q.a.OVERVIEW),d=Object(r.k)(),_=Object(n.useCallback)(()=>d.push(E),[E]);return l.a.createElement($l,{height:"auto",title:l.a.createElement(ee.b,{whiteSpace:"nowrap",styleNumber:16},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_MOST_ACTIVE_CLIENTS"})),action:l.a.createElement(l.a.Fragment,null,l.a.createElement(Fl,{styleNumber:15,variant:"inline",onClick:_},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_VIEW_ALL_CLIENTS"})),l.a.createElement(wl,{width:16,height:16,onClick:_}))},(null==t?void 0:t.length)?l.a.createElement(C.a,{width:"100%",marginTop:24,justifyContent:"center"},t.map(e=>{return l.a.createElement(zl,{key:e.mac,width:256,message:l.a.createElement(C.a,{flexDirection:"column"},l.a.createElement(Gl,{justifyContent:"flex-start",alignItems:"center",marginBottom:12,paddingBottom:12,paddingLeft:8},l.a.createElement(C.a,{justifyContent:"center",alignItems:"center",height:50,minWidth:50,maxWidth:50},l.a.createElement(kl,{client:e,margin:"0 12px 0 0",size:"2x"})),l.a.createElement(H.a,{color:"secondary",size:"body",truncate:!0},e.display_name||l.a.createElement(W.b,{id:"COMMON_NA"}))),l.a.createElement(C.a,{flexDirection:"column"},l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(H.a,{size:"caption",color:"secondary"},l.a.createElement(W.b,{id:"COMMON_WORD_DOWN"})),l.a.createElement(Bl,{type:"bytes",input:e.received_bytes||0,direction:"down"})),l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(H.a,{size:"caption",color:"secondary"},l.a.createElement(W.b,{id:"COMMON_WORD_UP"})),l.a.createElement(Bl,{type:"bytes",input:e.transmitted_bytes||0,direction:"up"})),l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(H.a,{size:"caption",color:"secondary"},l.a.createElement(W.b,{id:"COMMON_TRAFFIC"})),l.a.createElement(H.a,{size:"caption",color:"secondary"},Object(Ca.a)(e.total_bytes||0))),l.a.createElement(C.a,{justifyContent:"space-between",marginBottom:8},l.a.createElement(H.a,{size:"caption",color:"secondary"},l.a.createElement(W.b,{id:"COMMON_TOTAL_TRAFFIC"})),l.a.createElement(H.a,{size:"caption",color:"secondary"},(t=(e.total_bytes||0)/i*100,(Number.isNaN(t)?0:t).toFixed(1)),"%"))))},l.a.createElement(C.a,{flexDirection:"column",alignItems:"center",width:48,onClick:()=>{e.mac&&d.push(m.replace(":mac",e.mac))}},l.a.createElement(Hl,Object.assign({borderRadius:8},s===Za.a.LIGHT&&{border:"1px solid #DBDCE1"},{background:s===Za.a.LIGHT?"transparent":"#141415",justifyContent:"center",alignItems:"center",boxSizing:"border-box",marginBottom:8}),l.a.createElement(kl,{client:e,margin:"0 auto",size:"2x"})),l.a.createElement(Wl,{styleNumber:27,centered:!0},e.display_name||l.a.createElement(W.b,{id:"COMMON_NA"}))));var t})):l.a.createElement(C.a,{width:"100%",height:"100%",alignItems:"center",justifyContent:"center"},l.a.createElement(Hl,{borderRadius:8,background:s===Za.a.LIGHT?"#EDEDF0":"#141415",marginRight:42}),l.a.createElement(Hl,{borderRadius:8,background:`linear-gradient(to right, ${s===Za.a.LIGHT?"#EDEDF0":"#141415"} 10%, transparent);`,marginRight:42}),l.a.createElement(C.a,null,l.a.createElement(Ul,{isActive:!0,size:"large"}),l.a.createElement(ee.b,{styleNumber:2},l.a.createElement(W.b,{id:"DASHBOARD_MODULE_CLIENTS_EMPTY"})))))};var Xl=({isLoaded:e})=>e?l.a.createElement(Yl,null):l.a.createElement($l,{height:"auto",title:l.a.createElement(V.a,{width:92,height:16}),action:l.a.createElement(V.a,{width:16,height:16})},l.a.createElement(C.a,{width:"100%",marginTop:24,justifyContent:"center"},[0,1,2,3,4,5].map(e=>l.a.createElement(zl,{key:e,message:null},l.a.createElement(V.a,{width:42,height:42,marginBottom:8}),l.a.createElement(V.a,{width:42,height:8})))));const Kl=Object(i.c)(C.a)`
  transform: translate(-50%, -50%);
  span {
    line-height: 20px;
    &:last-child {
      margin-top: 7px;
    }
  }
`,Zl=Object(i.c)(Oa.a)`
  > * {
    min-width: 45%;
  }
`,ql=Object(i.c)(Oa.a)`
  height: 100%;
`,Jl=({isLoaded:e,placeholder:t,style:a})=>l.a.createElement(l.a.Fragment,null,l.a.createElement(Zl,{style:a},l.a.createElement(Ya,{isLoaded:e,placeholder:t}),l.a.createElement(Xa.ClientsModule,{isLoaded:e,placeholder:t})),t&&l.a.createElement(Kl,{position:"absolute",top:"50%",left:"50%",flexDirection:"column"},l.a.createElement(H.a,{size:"header-xs",color:"primary",weight:"bold"},l.a.createElement(W.a,{id:"DASHBOARD_WIFI_MODULE_NO_AP_PLACEHOLDER_BANNER_TITLE"})),l.a.createElement(H.a,{color:"tertiary"},l.a.createElement(W.a,{id:"DASHBOARD_WIFI_MODULE_NO_AP_PLACEHOLDER_BANNER_DESCRIPTION",values:{url:Nt.a.wiFi}})))),Ql=({isLoaded:e})=>l.a.createElement(Zl,null,l.a.createElement(Ml,{isLoaded:e}),l.a.createElement(Xl,{isLoaded:e}));var ei=({isLoaded:e})=>{const t=Object(c.useSelector)(M.selectShowDashboardModules),a=Object(c.useSelector)(M.selectShowWiFiClientWidgets),n=!e||t,i=n||a;return l.a.createElement(C.a,{flexDirection:"column",width:"100%",height:"100%",position:"relative"},n||i?l.a.createElement(l.a.Fragment,null,n?l.a.createElement(Jl,{isLoaded:e}):null,i?l.a.createElement(Ql,{isLoaded:e}):null):l.a.createElement(bl,{isLoaded:e,NoApsPlaceholder:Jl}),l.a.createElement(ql,null,l.a.createElement(el,{isLoaded:e,showWiFiClientWidgets:a})))},ti=a(1150);const ai=i.a`
  overflow: unset;
`,ni=Object(i.c)(C.a)`
  > div > div:last-child {
    overflow: visible;
    display: flex;
    flex: 1;
  }
`,li=({wanEnrConfFetched:e,panelId:t})=>{const a=Object(n.useMemo)(()=>(null==t?void 0:t.toLowerCase().includes("wan"))?N.c.ISP_DETAILS:N.c.DEVICE,[t]);return a!==N.c.ISP_DETAILS||e?l.a.createElement(D.a,{panelType:a}):null},ii=({isLoaded:e,wanEnrConfFetched:t=!1})=>{const[a,i]=Object(n.useState)(!1),{motif:E}=Object(o.a)(),{path:m}=Object(r.n)(),d=Object(c.useSelector)(b.x);return Object(n.useEffect)(()=>{e&&d&&i(!0)},[e,d]),l.a.createElement(h.a,{mainPanelClassName:ai,overflow:"auto"},l.a.createElement(C.a,{flexDirection:"column",height:"100%"},l.a.createElement(R,{isLoaded:a,motif:E},l.a.createElement(ni,{flex:"1"},l.a.createElement(s.a,{leftColumn:l.a.createElement(la,{isLoaded:a}),options:l.a.createElement(pa,{isLoaded:a})},l.a.createElement(ei,{isLoaded:a})))),l.a.createElement(r.g,null,l.a.createElement(j.a,{path:m+"/properties/:id?/:panel?/:subPanel?/:subPanelId",render:({match:{params:{id:e}}})=>a&&l.a.createElement(li,{panelId:e,wanEnrConfFetched:t})}))))},ri=Object(_.a)({crudCacheStrategy:{type:T.a.COMBINED,interval:9e3}}),ci=Object(d.a)(void 0,{crudCacheStrategy:{type:T.a.COMBINED,interval:9e3}}),oi=Object(E.b)(void 0,{crudCacheStrategy:{interval:9e3,type:T.a.COMBINED}}),si=e=>Object(y.e)(e,P.b.GW,{type:T.a.COMBINED,interval:A.a.MINUTES.grain,actionType:ti.a}),Ei=()=>{const[e,t]=Object(n.useState)(!1),a=Object(c.useSelector)(u.a),i=Object(c.useDispatch)();return Object(n.useEffect)(()=>(i(Object(I.c)("dashboard")),i(Object(m.a)("SETUP_COMPLETED",{},{crudCacheStrategy:{type:T.a.CACHE}})),i(ri),i(ci),i(oi).then(()=>t(!0)),i(Object(S.a)()),()=>{Object(T.c)(ri),Object(T.c)(ci),Object(T.c)(oi),i(Object(x.f)())}),[]),Object(n.useEffect)(()=>(i(si(a)),()=>{Object(T.c)(si(a))}),[a]),l.a.createElement(ii,{wanEnrConfFetched:e,isLoaded:!0})};t.default=(()=>Object(g.a)([Object(x.e)(),Object(p.q)(void 0,{crudCacheStrategy:{type:T.a.CACHE}}),(e,t)=>{return a=Object(M.selectDashboardQueryParams)(t()),e(Object(O.a)(a,void 0,{crudCacheStrategy:{type:T.a.CACHE}}));var a}],l.a.createElement(Ei,null),{placeholder:l.a.createElement(ii,{isLoaded:!1}),trackingName:"dashboard-page"}))},2685:function(e,t,a){"use strict";a.r(t);var n=a(0),l=a.n(n),i=a(195),r=a(4),c=a(3),o=a(31),s=a(2607),E=a(55),m=a(48),d=()=>{const{motif:e}=Object(E.a)();return l.a.createElement(s.a,null,l.a.createElement("link",{rel:"stylesheet",href:"https://api.tiles.mapbox.com/mapbox-gl-js/v0.46.0/mapbox-gl.css"}),l.a.createElement("style",{type:"text/css"},`\n        .mapboxgl-popup {\n          z-index: 1;\n         }\n\n        .mapboxgl-popup-tip {\n          border-top-color: ${m.a["dark"===e?"black-1":"white-0"]} !important;\n          border: 26px solid transparent;\n        }\n\n        .mapboxgl-popup-content {\n          width: 200px;\n          background: ${m.a["dark"===e?"black-1":"white-0"]};\n          padding: 10px 15px 5px 15px;\n          border-radius: 12px;\n        }\n\n        .mapboxgl-ctrl-top-right {\n          top: 20px;\n          right: 20px;\n          pointer-events: auto;\n        }\n\n        .mapboxgl-canvas {\n          background-color: ${"dark"===e?"rgb(23, 31, 59)":"rgb(183, 217, 241)"};\n        }\n\n        .ubnt-mod-comfy {\n          --toggle-width: 50px;\n        }\n      `))},_=a(461),u=a(820),b=a(863);function p(){var e=Object(r.useDispatch)(),t=Object(r.useSelector)(u.b);return Object(n.useEffect)(function(){return window.featureFlags={list:function(){return t},enable:function(t){return e(Object(b.d)(t))},disable:function(t){return e(Object(b.c)(t))}},function(){delete window.featureFlags}},[t]),null}var O=a(1),I=a(25),g=a(20),C=a(722),h=a(18),T=a(108),v=a(737),f=a(124),R=a(32),D=a(1042),S=a(156),y=a(625),P=a(142),A=a(99),N=a(745),j=a(17),x=a(101),L=a(22),V=a(62),M=a(126);const w=Object(c.c)(T.b)`
  width: auto !important;
  padding: 0 8px;
`,F=c.a`
  button {
    border-radius: 0;
    font-size: 12px;
  }
`,U="LTE_SUBSCRIPTION_CHECK",k=e=>"UNIFI_CARE_EXPIRATION_MAC_"+e,W="HAS_WLAN_OVERRIDES",B="HAS_NETWORKS_LIMIT_REACHED",z="HAS_MDNS_NETWORKS_LIMIT";var H=Object(O.e)(({intl:e})=>{const t=Object(r.useDispatch)(),a=Object(I.k)(),i=Object(r.useSelector)(g.p),c=Object(r.useSelector)(g.A),o=Object(r.useSelector)(g.I),s=Object(r.useSelector)(S.c),E=Object(r.useSelector)(M.a),m=Object(r.useSelector)(V.c),d=Object(r.useSelector)(f.kb),_=Object(r.useSelector)(f.ib),u=Object(r.useSelector)(C.selectLtePaymentExpired),b=Object(r.useSelector)(C.selectLteSubscriptionCancelled),p=Object(r.useSelector)(Object(C.selectLteSubscriptionCheckRequired)(c)),O=Object(r.useSelector)(C.selectUnifiCareEligibleDevices),T=Object(r.useSelector)(C.selectNetworksLimit),H=Object(r.useSelector)(C.selectHasWlanOverrides),G=Object(r.useSelector)(C.selectHasMdnsNetworksLimit),$=Object(P.b)(s),Y=Object(n.useRef)([]),X=Object(L.j)("wifi"),K=Object(L.j)("networks");Object(n.useEffect)(()=>{i&&u.length&&t(Object(h.a)({duration:0,type:j.a.warning,title:e.formatMessage({id:"ON_LOAD_WARNING_PAYMENT_EXPIRED_TITLE"}),message:"ON_LOAD_WARNING_PAYMENT_EXPIRED_BODY",icon:l.a.createElement(w,{deviceType:R.g.AP,deviceModel:R.e.ULTE,publicImagePath:E,filesMap:"SETUP"}),showStatusBall:!0,primaryButton:{label:e.formatMessage({id:"ON_LOAD_WARNING_PAYMENT_ACTION_UPDATE_PAYMENT"}),onClick:()=>window.open(`https://${$}/payments`,"_blank")},secondaryButton:{label:e.formatMessage({id:"ON_LOAD_WARNING_PAYMENT_ACTION_MANAGE_SUBSCRIPTIONS"}),onClick:()=>window.open(`https://${$}/subscriptions`,"_blank")},className:F},"LTE_PAYMENT_EXPIRED"))},[$,t,e,i,u.length,E]),Object(n.useEffect)(()=>{i&&b.length&&t(Object(h.a)({duration:0,type:j.a.danger,title:e.formatMessage({id:"ON_LOAD_WARNING_SUBSCRIPTION_CANCELLED_TITLE"}),message:"ON_LOAD_WARNING_SUBSCRIPTION_CANCELLED_BODY",icon:l.a.createElement(w,{deviceType:R.g.AP,deviceModel:R.e.ULTE,publicImagePath:E,filesMap:"SETUP"}),showStatusBall:!0,primaryButton:{label:e.formatMessage({id:"ON_LOAD_WARNING_PAYMENT_ACTION_UPDATE_PAYMENT"}),onClick:()=>window.open(`https://${$}/payments`,"_blank")},secondaryButton:{label:e.formatMessage({id:"ON_LOAD_WARNING_PAYMENT_ACTION_MANAGE_SUBSCRIPTIONS"}),onClick:()=>window.open(`https://${$}/subscriptions`,"_blank")},className:F},"LTE_SUBSCRIPTION_CANCELLED"))},[$,t,e,i,b.length,E]);const Z=Object(n.useCallback)(()=>{t(Object(h.b)(U)),t(Object(y.f)(p))},[t,p]);return Object(n.useEffect)(()=>{i&&p.length&&t(Object(h.a)({duration:0,type:j.a.warning,title:e.formatMessage({id:"ON_LOAD_WARNING_VERIFY_ACCOUNT_TITLE"}),message:"LTE_ACTIONS_SUBSCRIPTION_CHECK_TOOLTIP",icon:l.a.createElement(w,{deviceType:R.g.AP,deviceModel:R.e.ULTE,publicImagePath:E,filesMap:"SETUP"}),showStatusBall:!0,primaryButton:{label:e.formatMessage({id:"LTE_ACTIONS_SUBSCRIPTION_CHECK"}),onClick:Z},className:F},U))},[t,Z,e,i,p.length,E]),Object(n.useEffect)(()=>{i&&O.length&&O.forEach(a=>{const{mac:n,unifi_care:{activation_url:i}}=a;if(!Y.current.includes(n)){Y.current.push(n);const{days:r,hours:c,minutes:o}=Object(A.g)(Object(N.a)(a),new Date),s=c+24*r,E=s>0&&`${s} ${e.formatMessage({id:"COMMON_DATETIME_LABEL_HOURS"},{hours:c})}`||o>0&&`${o} ${e.formatMessage({id:"COMMON_DATETIME_LABEL_MINUTES"},{minutes:o})}`;t(Object(h.a)({duration:0,title:e.formatMessage({id:"ON_LOAD_UNIFI_CARE_AVAILABLE_TITLE"}),details:l.a.createElement(l.a.Fragment,null,e.formatMessage({id:E?"ON_LOAD_UNIFI_CARE_AVAILABLE_BODY":"ON_LOAD_UNIFI_CARE_AVAILABLE_BODY_IMPRECISE"},{timeRemaining:E})," ",l.a.createElement("a",{href:x.a.unifiCare,rel:"noopener noreferrer",target:"_blank"},e.formatMessage({id:"ON_LOAD_UNIFI_CARE_AVAILABLE_BODY_LEARN_MORE"}))),icon:l.a.createElement(v.a,{width:48,height:48}),primaryButton:{label:e.formatMessage({id:"ON_LOAD_UNIFI_CARE_AVAILABLE_ACTIONS_ADD"}),onClick:()=>{window.open(i,"_blank"),t(Object(h.b)(k(n)))}},secondaryButton:{label:e.formatMessage({id:"ON_LOAD_UNIFI_CARE_AVAILABLE_ACTIONS_REMIND_LATER"}),onClick:()=>{t(Object(D.dismissUnifiCareActivation)(n)),t(Object(h.b)(k(n)))}}},k(n)))}})},[$,t,e,i,O]),Object(n.useEffect)(()=>{i&&H&&!m&&!o.dismissWlanOverrides&&t(Object(h.a)({duration:0,type:j.a.warning,title:e.formatMessage({id:"ON_LOAD_WARNING_WLAN_OVERRIDES_TITLE"}),message:"ON_LOAD_WARNING_WLAN_OVERRIDES_DESCRIPTION",primaryButton:{label:e.formatMessage({id:"ON_LOAD_WARNING_WLAN_OVERRIDES_CTA"}),onClick:()=>{t(Object(h.b)(W)),t(Object(g.h)({dismissWlanOverrides:!0})).then(()=>a.push(X))}},onClose:()=>{t(Object(g.h)({dismissWlanOverrides:!0}))}},W))},[t,e,i,H,o,m]),Object(n.useEffect)(()=>{i&&(null==T?void 0:T.limit_reached)&&!m&&t(Object(h.a)({duration:0,type:j.a.warning,title:e.formatMessage({id:"ON_LOAD_WARNING_NETWORKS_LIMIT_REACHED_TITLE"}),message:"ON_LOAD_WARNING_NETWORKS_LIMIT_REACHED_DESCRIPTION",values:{networksLimit:T.network_limit,networksHighLimit:T.high_network_limit},primaryButton:{label:e.formatMessage({id:"ON_LOAD_WARNING_NETWORKS_LIMIT_REVIEW_NETWORKS"}),onClick:()=>{t(Object(h.b)(B)),a.push(K)}}},B))},[t,e,i,T,o,m]),Object(n.useEffect)(()=>{i&&(null==G?void 0:G.exceeded)&&!m&&t(Object(h.a)({duration:0,type:j.a.warning,title:e.formatMessage({id:"ON_LOAD_WARNING_NETWORKS_LIMIT_REACHED_TITLE"}),details:e.formatHTMLMessage({id:"ON_LOAD_WARNING_MDNS_NETWORKS_LIMIT"},{gatewayName:d||_,limit:null==G?void 0:G.limit}),primaryButton:{label:e.formatMessage({id:"ON_LOAD_WARNING_NETWORKS_LIMIT_REVIEW_NETWORKS"}),onClick:()=>{t(Object(h.b)(z)),a.push(K)}},onClose:()=>t(Object(h.b)(z))},z))},[i,G,d,m]),null}),G=a(624),$=a(35),Y=a(70);const X=c.a`
  button {
    border-radius: 0;
    font-size: 12px;
  }
`,K=e=>`${e.admin_id}_${e.site_id}_${e.show_at_millis}`;var Z=Object(O.e)(({intl:e})=>{const t=Object(r.useDispatch)(),a=Object(r.useSelector)(g.p),l=Object(r.useSelector)(G.d),[i,c]=Object(n.useState)([]);return Object(n.useEffect)(()=>{a&&l.length&&l.filter(e=>!i.includes(K(e))).forEach(a=>{if(a.action_required)switch(a.name){case G.b.DEVICE_AUTOUPGRADE:t(Object($.g)({modalType:Y.a.DEVICE_AUTOUPGRADE_REVIEW,modalProps:{notification:a}}))}else{let n,l,i,r;switch(a.name){case G.b.LTS:l="ON_LOAD_NOTIFICTION_LTS",n=j.a.info,r="ON_LOAD_NOTIFICTIONS_LTS_DEVICES",i={label:e.formatMessage({id:"COMMOM_LEARN_MORE"}),onClick:()=>window.open(G.a,"_blank")};break;case G.b.EOL:l="ON_LOAD_NOTIFICTION_EOL",n=j.a.info,r="ON_LOAD_NOTIFICTIONS_EOL_DEVICES",i={label:e.formatMessage({id:"COMMOM_LEARN_MORE"}),onClick:()=>window.open(G.a,"_blank")};break;case G.b.UNSUPPORTED:l="ON_LOAD_NOTIFICTION_UNSUPPORTED",n=j.a.warning,r="ON_LOAD_NOTIFICTIONS_UNSUPPORTED_DEVICES";break;default:return}t(Object(h.a)({duration:0,type:n,icon:n,message:r,showStatusBall:!1,primaryButton:i,secondaryButton:{label:e.formatMessage({id:"ON_LOAD_NOTIFICTIONS_DO_NOT_REMIND"}),onClick:()=>{t(Object(G.c)(a)),t(Object(h.b)(l))}},className:X},l))}c([K(a),...i])})},[t,e,a,l]),null}),q=a(494),J=a(2787),Q=a(2674);const ee=Object(c.c)("div")`
  display: flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  height: calc(100vh - 50px);
  width: 100vw;
  position: absolute;
  z-index: 100;
  > div {
    max-width: 120px;
  }
`;var te,ae=()=>l.a.createElement(ee,null,l.a.createElement(J.a,{animationData:Q})),ne=l.a.memo(({children:e})=>{const t=Object(r.useSelector)(V.d),[a,i]=Object(n.useState)(!t),c=Object(L.b)();return Object(n.useEffect)(()=>{t||i(!1)},[t]),Object(n.useEffect)(()=>{t&&Object(P.f)().then(()=>i(!1)).then(()=>{var e,t,a,n;const l=null!==(t=null===(e=null===window||void 0===window?void 0:window.webrtc)||void 0===e?void 0:e.webRtcEventBus)&&void 0!==t?t:null===(n=null===(a=null===window||void 0===window?void 0:window.webrtc)||void 0===a?void 0:a.unifiWebRtcConnector)||void 0===n?void 0:n.webRtcEventBus;null==l||l.on(q.WEBRTC_EVENTS.WEBRTC_RECONNECTING,()=>i(!0)),null==l||l.on(q.WEBRTC_EVENTS.WEBRTC_RECONNECTED,()=>i(!1))}).catch(e=>{i(!1),c(e)})},[t,c]),a?l.a.createElement(ae,null):l.a.createElement(l.a.Fragment,null,e)}),le=a(53),ie=a(175),re=a(127),ce=a(89),oe=a(6),se=a(238),Ee=a(85),me=a(114),de=a(472),_e=a(207),ue=a(336),be=a(93),pe=a(41),Oe=a(823),Ie=a(275),ge=a(15),Ce=a(131),he=a(166),Te=a(1083),ve=a(211),fe=a(178),Re=a(145),De=a(16),Se=a(242),ye=a(250),Pe=a(30);!function(e){e.ACCOUNT="account",e.APGROUPS="apgroups",e.DEVICE="device",e.UNIFI_DEVICE="unifi-device",e.DHCPOPTION="dhcpoption",e.DPIAPP="dpiapp",e.DPIGROUP="dpigroup",e.DYNAMICDNS="dynamicdns",e.FIREWALLRULE="firewallrule",e.FIREWALLGROUP="firewallgroup",e.GUEST="guest",e.HOTSPOT2CONF="hotstpo2conf",e.HOTSPOTPACKAGES="hotspotpackages",e.MAP="map",e.NETWORKCONF="networkconf",e.PORTCONF="portconf",e.PORTWORWARD="portforward",e.RADIUSPROFILE="radiusprofile",e.ROGUEKNOWN="rogueknown",e.ROUTING="routing",e.SETTING="setting",e.CLIENT="client",e.SPEED_TEST="speed-test",e.TAG="tag",e.USERGROUP="usergroup",e.VIRTUALDEVICE="virtualdevice",e.WALL="wall",e.WLANCONF="wlanconf"}(te||(te={}));var Ae={[te.ACCOUNT]:ie,[te.APGROUPS]:re,[te.DEVICE]:[oe,se],[te.UNIFI_DEVICE]:Ee,[te.DHCPOPTION]:me,[te.DPIAPP]:de,[te.DPIGROUP]:_e,[te.DYNAMICDNS]:ue,[te.FIREWALLRULE]:pe,[te.FIREWALLGROUP]:be,[te.GUEST]:null,[te.HOTSPOT2CONF]:Oe,[te.HOTSPOTPACKAGES]:Ie,[te.MAP]:null,[te.NETWORKCONF]:ge,[te.PORTCONF]:Ce,[te.PORTWORWARD]:he,[te.RADIUSPROFILE]:{...ve,...Te,...fe},[te.ROGUEKNOWN]:null,[te.ROUTING]:Re,[te.SETTING]:De,[te.CLIENT]:ce,[te.SPEED_TEST]:Se,[te.TAG]:null,[te.USERGROUP]:ye,[te.VIRTUALDEVICE]:null,[te.WALL]:null,[te.WLANCONF]:Pe},Ne=a(49),je=a(596),xe=a(230),Le=a(141),Ve=a(271),Me=a(59),we=a(96),Fe=a(158);const Ue=["user","client","guest"],ke=["EVT_LU_Disconnected","EVT_WU_Disconnected","EVT_LG_Disconnected","EVT_WG_Disconnected","EVT_LC_Blocked","EVT_WC_Blocked"],We=["ap","bb","gw","sw","ph","lte","xg"],Be=["EVT_AP_DiscoveredPending","EVT_AP_PossibleInterference","EVT_AP_ChannelChanged","EVT_BB_DiscoveredPending","EVT_BB_PossibleInterference","EVT_BB_ChannelChanged","EVT_BB_LinkRadioChanged","EVT_SW_DiscoveredPending","EVT_SW_DetectRogueDHCP","EVT_SW_LoopDetected","EVT_SW_Overheat","EVT_SW_PoeOverload","EVT_SW_PoeDisconnect","EVT_LTE_DiscoveredPending","EVT_USP_RpsPortPowerDelivering","EVT_USP_RpsOutOfBudget","EVT_USP_RpsPortOverload","EVT_USP_RpsPowerDeniedByPsuOverload","EVT_USP_RpsPortErrorBlocked","EVT_USP_OutletPowerCycle","EVT_XG_DiscoveredPending","EVT_XG_OutletPowerCycle","EVT_GW_DiscoveredPending"],ze=["blocked","channel","display_name","fingerprint","first_seen","fixed_ap_enabled","fixed_ap_mac","fixed_ip","hostname","id","is_allowed_in_visual_programming","is_guest","is_wired","last_seen","mac","name","network_id","note","noted","oui","site_id","type","unifi_device","uplink_mac","use_fixedip","user_id","usergroup_id"],He=(e,t)=>e[Object.keys(e).find(e=>t.indexOf(e)>=0)];var Ge=a(1034),$e=a(391),Ye=a(8);const Xe={EVT_AD_AutoBackupFailedCloudKeySDCardNotFound:{translation:"EVT_AD_AUTO_BACKUP_FAILED_CLOUD_KEY_SD_CARD_NOT_FOUND",level:"danger"},EVT_AD_BackupCreated:{translation:"EVT_AD_BACKUP_CREATED",level:"success"},EVT_AD_GuestAuthorizedFor:{translation:"EVT_AD_GUEST_AUTHORIZED_FOR",level:"success"},EVT_AD_GuestExtended:{translation:"EVT_AD_GUEST_EXTENDED",level:"success"},EVT_AD_GuestUnauthorized:{translation:"EVT_AD_GUEST_UNAUTHORIZED",level:"success"},EVT_AD_HDUsableSpace:{translation:"EVT_AD_HD_USABLE_SPACE",level:"warning"},EVT_AD_HotspotOpLogin:{translation:"EVT_AD_HOTSPOT_OP_LOGIN",level:"success"},EVT_AD_Login:{translation:"EVT_AD_LOGIN",level:"success"},EVT_AD_LoginFailed:{translation:"EVT_AD_LOGIN_FAILED",level:"danger"},EVT_AD_MicroSDUsableSpace:{translation:"EVT_AD_MICRO_SD_USABLE_SPACE",level:"warning"},EVT_AD_PaymentRefunded:{translation:"EVT_AD_PAYMENT_REFUNDED",level:"success"},EVT_AD_UpdateAvailable:{translation:"EVT_AD_UPDATE_AVAILABLE",level:"success"},EVT_AD_VoucherCreated:{translation:"EVT_AD_VOUCHER_CREATED",level:"success"},EVT_AD_VoucherDeleted:{translation:"EVT_AD_VOUCHER_DELETED",level:"success"},EVT_AD_VouchersDeleted:{translation:"EVT_AD_VOUCHERS_DELETED",level:"success"},EVT_AP_Adopted:{translation:"EVT_AP_ADOPTED",level:"success"},EVT_AP_AutoReadopted:{translation:"EVT_AP_AUTO_READOPTED",level:"success"},EVT_AP_ChannelChanged:{translation:"EVT_AP_CHANNEL_CHANGED",level:"success"},EVT_AP_Configured:{translation:"EVT_AP_CONFIGURED",level:"success"},EVT_AP_Connected:{translation:"EVT_AP_CONNECTED",level:"success"},EVT_AP_Deleted:{translation:"EVT_AP_DELETED",level:"danger"},EVT_AP_DetectRogueAP:{translation:"EVT_AP_DETECT_ROGUE_AP",level:"danger"},EVT_AP_DiscoveredPending:{translation:"EVT_AP_DISCOVERED_PENDING",level:"warning"},EVT_AP_EliteDeviceChanged:{translation:"EVT_AP_ELITE_DEVICE_CHANGED",level:"success"},EVT_AP_EliteDeviceRevoke:{translation:"EVT_AP_ELITE_DEVICE_REVOKE",level:"warning"},EVT_AP_EliteDeviceOffline:{translation:"EVT_AP_ELITE_DEVICE_OFFLINE",level:"danger"},EVT_AP_FirmwareCheckFailed:{translation:"EVT_AP_FIRMWARE_CHECK_FAILED",level:"danger"},EVT_AP_FirmwareDownloadFailed:{translation:"EVT_AP_FIRMWARE_DOWNLOAD_FAILED",level:"danger"},EVT_AP_HostKeyMismatch:{translation:"EVT_AP_HOST_KEY_MISMATCH",level:"danger"},EVT_AP_Isolated:{translation:"EVT_AP_ISOLATED",level:"danger"},EVT_AP_LicenseChanged:{translation:"EVT_AP_LICENSE_CHANGED",level:"warning"},EVT_AP_LicenseInvalid:{translation:"EVT_AP_LICENSE_INVALID",level:"danger"},EVT_AP_LicenseValid:{translation:"EVT_AP_LICENSE_VALID",level:"success"},EVT_AP_Lost_Contact:{translation:"EVT_AP_LOST_CONTACT",level:"danger"},EVT_AP_MulticastBlockNoDevice:{translation:"EVT_AP_MULTICAST_BLOCK_NO_DEVICE",level:"warning"},EVT_AP_MulticastBlockAutoEnabled:{translation:"EVT_AP_MULTICAST_BLOCK_AUTO_ENABLED",level:"success"},EVT_AP_No2GHzByOuiAutoEnabled:{translation:"EVT_AP_NO_2GHZ_BY_OUI_AUTO_ENABLED",level:"success"},EVT_AP_Notification:{translation:"EVT_AP_NOTIFICATION",level:"success"},EVT_AP_PossibleInterference:{translation:"EVT_AP_POSSIBLE_INTERFERENCE",level:"warning"},EVT_AP_RadarDetected:{translation:"EVT_AP_RADAR_DETECTED",level:"success"},EVT_AP_RediscoveredPending:{translation:"EVT_AP_REDISCOVERED_PENDING",level:"warning"},EVT_AP_Restarted:{translation:"EVT_AP_RESTARTED",level:"warning"},EVT_AP_RestartedUnknown:{translation:"EVT_AP_RESTARTED_UNKNOWN",level:"warning"},EVT_AP_RestartProc:{translation:"EVT_AP_RESTART_PROC",level:"warning"},EVT_AP_RollUpgrade:{translation:"EVT_AP_ROLL_UPGRADE",level:"success"},EVT_AP_Upgraded:{translation:"EVT_AP_UPGRADED",level:"success"},EVT_AP_UpgradeScheduled:{translation:"EVT_AP_UPGRADE_SCHEDULED",level:"success"},EVT_AP_WirelessEvent:{translation:"EVT_AP_WIRELESS_EVENT",level:"success"},EVT_AP_PlanFinished:{translation:"EVT_AP_PLAN_FINISHED",level:"success"},EVT_AP_WiFiUXIncreased:{translation:"EVT_AP_WIFI_UX_INCREASED",level:"success"},EVT_BB_DiscoveredPending:{translation:"EVT_BB_DISCOVERED_PENDING",level:"success"},EVT_BB_RediscoveredPending:{translation:"EVT_BB_REDISCOVERED_PENDING",level:"success"},EVT_BB_Adopted:{translation:"EVT_BB_ADOPTED",level:"success"},EVT_BB_HostKeyMismatch:{translation:"EVT_BB_HOST_KEY_MISMATCH",level:"danger"},EVT_BB_Deleted:{translation:"EVT_BB_DELETED",level:"danger"},EVT_BB_Restarted:{translation:"EVT_BB_RESTARTED",level:"warning"},EVT_BB_RestartedUnknown:{translation:"EVT_BB_RESTARTED_UNKNOWN",level:"warning"},EVT_BB_AutoReadopted:{translation:"EVT_BB_AUTO_READOPTED",level:"success"},EVT_BB_Configured:{translation:"EVT_BB_CONFIGURED",level:"success"},EVT_BB_Connected:{translation:"EVT_BB_CONNECTED",level:"success"},EVT_BB_ChannelChanged:{translation:"EVT_BB_CHANNEL_CHANGED",level:"success"},EVT_BB_PossibleInterference:{translation:"EVT_BB_POSSIBLE_INTERFERENCE",level:"success"},EVT_BB_RollUpgrade:{translation:"EVT_BB_ROLL_UPGRADE",level:"success"},EVT_BB_Upgraded:{translation:"EVT_BB_UPGRADED",level:"success"},EVT_BB_UpgradeScheduled:{translation:"EVT_BB_UPGRADE_SCHEDULED",level:"success"},EVT_BB_Lost_Contact:{translation:"EVT_BB_LOST_CONTACT",level:"danger"},EVT_BB_LicenseChanged:{translation:"EVT_BB_LICENSE_CHANGED",level:"success"},EVT_BB_Notification:{translation:"EVT_BB_NOTIFICATION",level:"success"},EVT_BB_FirmwareCheckFailed:{translation:"EVT_BB_FIRMWARE_CHECK_FAILED",level:"danger"},EVT_BB_FirmwareDownloadFailed:{translation:"EVT_BB_FIRMWARE_DOWNLOAD_FAILED",level:"danger"},EVT_BB_RestartProc:{translation:"EVT_BB_RESTART_PROC",level:"warning"},EVT_CF_VwireSet:{translation:"EVT_CF_VWIRE_SET",level:"success"},EVT_CF_VwireUnset:{translation:"EVT_CF_VWIRE_UNSET",level:"success"},EVT_DEV_Lost_Contact:{level:"danger"},EVT_DEV_DiscoveredPending:{level:"warning"},EVT_GW_Adopted:{translation:"EVT_GW_ADOPTED",level:"success"},EVT_GW_AutoReadopted:{translation:"EVT_GW_AUTO_READOPTED",level:"success"},EVT_GW_CommitError:{translation:"EVT_GW_COMMIT_ERROR",level:"success"},EVT_GW_Connected:{translation:"EVT_GW_CONNECTED",level:"danger"},EVT_GW_Deleted:{translation:"EVT_GW_DELETED",level:"danger"},EVT_GW_DiscoveredPending:{translation:"EVT_GW_DISCOVERED_PENDING",level:"warning"},EVT_GW_EliteDeviceChanged:{translation:"EVT_GW_ELITE_DEVICE_CHANGED",level:"success"},EVT_GW_EliteDeviceRevoke:{translation:"EVT_GW_ELITE_DEVICE_REVOKE",level:"warning"},EVT_GW_EliteDeviceOffline:{translation:"EVT_GW_ELITE_DEVICE_OFFLINE",level:"danger"},EVT_GW_FirmwareCheckFailed:{translation:"EVT_GW_FIRMWARE_CHECK_FAILED",level:"danger"},EVT_GW_FirmwareDownloadFailed:{translation:"EVT_GW_FIRMWARE_DOWNLOAD_FAILED",level:"danger"},EVT_GW_HostKeyMismatch:{translation:"EVT_GW_HOST_KEY_MISMATCH",level:"danger"},EVT_GW_LicenseChanged:{translation:"EVT_GW_LICENSE_CHANGED",level:"warning"},EVT_GW_LicenseInvalid:{translation:"EVT_GW_LICENSE_INVALID",level:"danger"},EVT_GW_LicenseValid:{translation:"EVT_GW_LICENSE_VALID",level:"success"},EVT_GW_Lost_Contact:{translation:"EVT_GW_LOST_CONTACT",level:"danger"},EVT_GW_Notification:{translation:"EVT_GW_NOTIFICATION",level:"success"},EVT_GW_Restarted:{translation:"EVT_GW_RESTARTED",level:"warning"},EVT_GW_RestartedUnknown:{translation:"EVT_GW_RESTARTED_UNKNOWN",level:"warning"},EVT_GW_RestartProc:{translation:"EVT_GW_RESTART_PROC",level:"warning"},EVT_GW_Upgraded:{translation:"EVT_GW_UPGRADED",level:"success"},EVT_GW_UpgradeScheduled:{translation:"EVT_GW_UPGRADE_SCHEDULED",level:"success"},EVT_GW_WANTransition:{translation:"EVT_GW_WANTRANSITION",level:"success"},EVT_GW_DhcpPoolExhausted:{translation:"EVT_GW_DHCP_POOL_EXHAUSTED",level:"danger"},EVT_GW_DhcpPoolNearExhausted:{translation:"EVT_GW_DHCP_POOL_NEAR_EXHAUSTED",level:"warning"},EVT_GW_NetworkAutoScaled:{translation:"EVT_GW_NETWORK_AUTO_SCALED",level:"success"},EVT_GW_NetworkAutoScaleFailed:{translation:"EVT_GW_NETWORK_AUTO_SCALE_FAILED",level:"danger"},EVT_HS_AuthedByNoAuth:{translation:"EVT_HS_AUTHED_BY_NO_AUTH",level:"success"},EVT_HS_AuthedByPassword:{translation:"EVT_HS_AUTHED_BY_PASSWORD",level:"success"},EVT_HS_PaymentProcessed:{translation:"EVT_HS_PAYMENT_PROCESSED",level:"success"},EVT_HS_VoucherUsed:{translation:"EVT_HS_VOUCHER_USED",level:"success"},EVT_IPS_IpsAlert:{translation:"EVT_IPS_IPS_ALERT",level:"success"},EVT_LAN_LoopDetected:{level:"danger"},EVT_LAN_NeighboringDHCPDetected:{level:"danger"},EVT_LC_Blocked:{translation:"EVT_LC_BLOCKED",level:"success"},EVT_LC_Unblocked:{translation:"EVT_LC_UNBLOCKED",level:"success"},EVT_LG_Connected:{translation:"EVT_LG_CONNECTED",level:"success"},EVT_LG_Disconnected:{translation:"EVT_LG_DISCONNECTED",level:"success"},EVT_LTE_ConnectedToLte:{translation:"EVT_ULTE_CONNECTED_TO_ULTE",level:"success"},EVT_LTE_NotConnectedToLte:{translation:"EVT_ULTE_NOT_CONNECTED_TO_ULTE",level:"warning"},EVT_LTE_NotConnectedToLte_Alert:{translation:"EVT_ULTE_NOT_CONNECTED_TO_ULTE",level:"warning"},EVT_LTE_RegisteredToLte:{translation:"EVT_ULTE_REGISTERED_TO_ULTE",level:"success"},EVT_LTE_NotRegisteredToLte:{translation:"EVT_ULTE_NOT_REGISTERED_TO_ULTE",level:"warning"},EVT_LTE_NotRegisteredToLte_Alert:{translation:"EVT_ULTE_NOT_REGISTERED_TO_ULTE",level:"warning"},EVT_LTE_Adopted:{translation:"EVT_ULTE_ADOPTED",level:"success"},EVT_LTE_AutoReadopted:{translation:"EVT_ULTE_AUTO_READOPTED",level:"success"},EVT_LTE_Connected:{translation:"EVT_ULTE_CONNECTED",level:"success"},EVT_LTE_Notification:{translation:"EVT_ULTE_NOTIFICATION",level:"success"},EVT_LTE_DiscoveredPending:{translation:"EVT_ULTE_DISCOVERED_PENDING",level:"warning"},EVT_LTE_Deleted:{translation:"EVT_ULTE_DELETED",level:"danger"},EVT_LTE_HardLimitUsed:{translation:"EVT_ULTE_HARD_LIMIT_USED",level:"warning"},EVT_LTE_HardLimitCutoff:{translation:"EVT_ULTE_HARD_LIMIT_CUTOFF",level:"danger"},EVT_LTE_Threshold:{translation:"EVT_ULTE_THRESHOLD",level:"success"},EVT_LU_Connected:{translation:"EVT_LU_CONNECTED",level:"success"},EVT_LU_Disconnected:{translation:"EVT_LU_DISCONNECTED",level:"success"},EVT_PA_IncorrectStreamConfiguration:{translation:"EVT_PA_INCORRECT_STREAM_CONFIGURATION",level:"danger"},EVT_PA_ScheduledStreamFailed:{translation:"EVT_PA_SCHEDULED_STREAM_FAILED",level:"danger"},EVT_PA_StreamSkippedDevices:{translation:"EVT_PA_STREAM_SKIPPED_DEVICES",level:"warning"},EVT_SW_Adopted:{translation:"EVT_SW_ADOPTED",level:"success"},EVT_SW_AutoReadopted:{translation:"EVT_SW_AUTO_READOPTED",level:"success"},EVT_SW_Connected:{translation:"EVT_SW_CONNECTED",level:"success"},EVT_SW_Deleted:{translation:"EVT_SW_DELETED",level:"danger"},EVT_SW_DetectNeighboringDHCP:{level:"danger"},EVT_SW_DetectRogueDHCP:{translation:"EVT_SW_DETECT_ROGUE_DHCP",level:"danger"},EVT_SW_DiscoveredPending:{translation:"EVT_SW_DISCOVERED_PENDING",level:"warning"},EVT_SW_EliteDeviceChanged:{translation:"EVT_SW_ELITE_DEVICE_CHANGED",level:"success"},EVT_SW_EliteDeviceRevoke:{translation:"EVT_SW_ELITE_DEVICE_REVOKE",level:"warning"},EVT_SW_EliteDeviceOffline:{translation:"EVT_SW_ELITE_DEVICE_OFFLINE",level:"danger"},EVT_SW_FirmwareCheckFailed:{translation:"EVT_SW_FIRMWARE_CHECK_FAILED",level:"danger"},EVT_SW_FirmwareDownloadFailed:{translation:"EVT_SW_FIRMWARE_DOWNLOAD_FAILED",level:"danger"},EVT_SW_HostKeyMismatch:{translation:"EVT_SW_HOST_KEY_MISMATCH",level:"danger"},EVT_SW_LicenseChanged:{translation:"EVT_SW_LICENSE_CHANGED",level:"warning"},EVT_SW_LicenseInvalid:{translation:"EVT_SW_LICENSE_INVALID",level:"danger"},EVT_SW_LicenseValid:{translation:"EVT_SW_LICENSE_VALID",level:"success"},EVT_SW_LoopDetected:{translation:"EVT_SW_LOOP_DETECTED",level:"danger"},EVT_SW_Lost_Contact:{translation:"EVT_SW_LOST_CONTACT",level:"danger"},EVT_SW_Notification:{translation:"EVT_SW_NOTIFICATION",level:"danger"},EVT_SW_Overheat:{translation:"EVT_SW_OVERHEAT",level:"danger"},EVT_SW_PoeOverload:{translation:"EVT_SW_POE_OVERLOAD",level:"danger"},EVT_SW_PoeDisconnect:{translation:"EVT_SW_POE_DISCONNECT",level:"danger"},EVT_SW_Restarted:{translation:"EVT_SW_RESTARTED",level:"warning"},EVT_SW_RestartedUnknown:{translation:"EVT_SW_RESTARTED_UNKNOWN",level:"warning"},EVT_SW_RestartProc:{translation:"EVT_SW_RESTART_PROC",level:"warning"},EVT_SW_StpPortBlocking:{translation:"EVT_SW_STP_PORT_BLOCKING",level:"danger"},EVT_SW_Upgraded:{translation:"EVT_SW_UPGRADED",level:"success"},EVT_SW_UpgradeScheduled:{translation:"EVT_SW_UPGRADE_SCHEDULED",level:"success"},EVT_XG_Adopted:{translation:"EVT_XG_ADOPTED",level:"success"},EVT_XG_AutoReadopted:{translation:"EVT_XG_AUTO_READOPTED",level:"success"},EVT_XG_CommitError:{translation:"EVT_XG_COMMIT_ERROR",level:"success"},EVT_XG_Connected:{translation:"EVT_XG_CONNECTED",level:"danger"},EVT_XG_Deleted:{translation:"EVT_XG_DELETED",level:"danger"},EVT_XG_DiscoveredPending:{translation:"EVT_XG_DISCOVERED_PENDING",level:"warning"},EVT_XG_Lost_Contact:{translation:"EVT_XG_LOST_CONTACT",level:"danger"},EVT_XG_OutletPowerCycle:{translation:"EVT_XG_OUTLET_POWER_CYCLE",level:"warning"},EVT_XG_Notification:{translation:"EVT_XG_NOTIFICATION",level:"success"},EVT_XG_RestartedUnknown:{translation:"EVT_XG_RESTARTED_UNKNOWN",level:"warning"},EVT_XG_UpgradeScheduled:{translation:"EVT_XG_UPGRADE_SCHEDULED",level:"success"},EVT_USP_RpsPortPowerDelivering:{translation:"EVT_USP_RPS_PORT_POWER_DELIVERING",level:"warning"},EVT_USP_RpsOutOfBudget:{translation:"EVT_USP_RPS_OUT_OF_BUDGET",level:"warning"},EVT_USP_RpsPortOverload:{translation:"EVT_USP_RPS_PORT_OVERLOAD",level:"warning"},EVT_USP_RpsPowerDeniedByPsuOverload:{translation:"EVT_USP_RPS_POWER_DENIED_BY_PSU_OVERLOAD",level:"warning"},EVT_USP_RpsPortErrorBlocked:{translation:"EVT_USP_RPS_PORT_ERROR_BLOCKED",level:"danger"},EVT_USP_OutletPowerCycle:{translation:"EVT_USP_OUTLET_POWER_CYCLE",level:"warning"},EVT_WC_Blocked:{translation:"EVT_WC_BLOCKED",level:"success"},EVT_WC_Unblocked:{translation:"EVT_WC_UNBLOCKED",level:"success"},EVT_WG_AuthorizationEnded:{translation:"EVT_WG_AUTHORIZATION_ENDED",level:"success"},EVT_WG_AuthorizationEndedByQuota:{translation:"EVT_WG_AUTHORIZATION_ENDED_BY_QUOTA",level:"success"},EVT_WG_Connected:{translation:"EVT_WG_CONNECTED",level:"success"},EVT_WG_Disconnected:{translation:"EVT_WG_DISCONNECTED",level:"success"},EVT_WG_Roam:{translation:"EVT_WG_ROAM",level:"success"},EVT_WG_RoamRadio:{translation:"EVT_WG_ROAM_RADIO",level:"success"},EVT_WU_Connected:{translation:"EVT_WU_CONNECTED",level:"success"},EVT_WU_Disconnected:{translation:"EVT_WU_DISCONNECTED",level:"success"},EVT_WU_Roam:{translation:"EVT_WU_ROAM",level:"success"},EVT_WU_RoamRadio:{translation:"EVT_WU_ROAM_RADIO",level:"success"},EVT_WWW_Disconnected:{level:"danger"},EVT_WWW_Reconnected:{level:"success"}},Ke=["EVT_AP","EVT_BB","EVT_SW","EVT_GW","EVT_XG","EVT_DM","EVT_USP","EVT_LTE"],Ze=["EVT_LC","EVT_WC","EVT_WG","EVT_LG","EVT_WU","EVT_LU"],qe=["EVT_AD_BackupCreated","EVT_AD_BackupFailed"],Je=Object.keys(Xe).filter(e=>Ke.some(t=>e.startsWith(t))),Qe=Object.keys(Xe).filter(e=>Ze.some(t=>e.startsWith(t))),et=Object.keys(Xe).filter(e=>qe.some(t=>e.startsWith(t)));var tt,at=function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)};tt=new WeakMap;var nt=new class{constructor(){tt.set(this,{[te.DEVICE]:{},[te.UNIFI_DEVICE]:{}})}get getStorage(){return at(this,tt)}setStorage(e,t){!function(e,t,a){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");t.set(e,a)}(this,tt,Object.assign({},at(this,tt),{[e]:Object.assign({},at(this,tt)[e],t)}))}},lt=a(593);const it={add:Ye.j.CREATE_SUCCESS,delete:Ye.j.DELETE_SUCCESS,sync:Ye.j.UPDATE_GROUP_SUCCESS,update:Ye.j.UPDATE_GROUP_SUCCESS},rt=(e,t,a,n)=>{const{FIELDS:l,ID_FIELD:i,MODEL:r,WS_ACTION_TYPE:c}=a,o=l?[].concat(e).map(e=>Object($e.a)(e,l)):[].concat(e);return{type:c||it[n],meta:{extend:["sync","update"].includes(n),mergeAndOverrideKeys:"device:update"===t.message?[]:null,fetchTime:Date.now(),id:Object(Ye.t)(e,i)||(null==t?void 0:t[i]),model:r,params:{},...i?{idField:i}:{}},payload:{data:o}}},ct=({event:e,messageType:t,meta:a})=>n=>{const[l,i]=t.split(":"),r=Ae[l];if(r instanceof Array)for(let t=0;t<r.length;t+=1)n(rt(e,a,r[t],i));else r&&n(rt(e,a,r,i))},ot=({data:e,meta:t,messageType:a,forSuperSite:n})=>l=>{a.startsWith("device")?l((({event:e,meta:t,messageType:a})=>n=>{n(ct({event:e,meta:t,messageType:a}));const[{mac:l,state:i}]=e||[{}];l&&i&&nt.setStorage(te.DEVICE,{[l]:i})})({event:e,meta:t,messageType:a})):e.forEach(e=>l((({event:e,meta:t,messageType:a,forSuperSite:n})=>l=>{"events"===a&&e&&!et.includes(e.key)?Je.includes(e.key)?l((({event:e,messageType:t})=>a=>{if(Be.includes(t)){const t=He(e,We);t&&a(Object(Ve.p)(t))}return null})({event:e,messageType:e.key})):Qe.includes(e.key)&&l((({event:e,messageType:t})=>(a,n)=>{var l,i,r,c,o;if(ke.includes(t)){const t=He(e,Ue);if(t){const e=null===(o=null===(c=null===(r=null===(i=null===(l=n())||void 0===l?void 0:l.models)||void 0===i?void 0:i[we.i])||void 0===r?void 0:r.byId)||void 0===c?void 0:c[t])||void 0===o?void 0:o.record;a(Object(Fe.j)(t,Me.a.ACTIVE)).then(()=>{var l,i;e&&a(Object(Fe.a)(t,Object.fromEntries(ze.map(t=>[t,null==e?void 0:e[t]])),Me.a.OFFLINE,{queryParams:{withinHours:null!==(i=null===(l=Object(Ne.C)(n()))||void 0===l?void 0:l.offlineClientTimeframe)&&void 0!==i?i:Me.d.DAY}}))})}}})({event:e,messageType:e.key})):a.startsWith("client")?l((({event:e,meta:t,messageType:a})=>(n,l)=>{var i,r,c,o;const[s,E]=a.split(":");(null===(o=null===(c=null===(r=null===(i=l())||void 0===i?void 0:i.models)||void 0===r?void 0:r[we.k])||void 0===c?void 0:c.byId)||void 0===o?void 0:o[null==e?void 0:e.id])?n(Object(Fe.j)(e.id,Me.a.OFFLINE)).then(()=>{n(rt(e,t,null==Ae?void 0:Ae[s],E))}):n(rt(e,t,null==Ae?void 0:Ae[s],E))})({event:e,meta:t,messageType:a})):a.startsWith("unifi-device")?l((({event:e,meta:t,messageType:a})=>n=>{const[l,i]=a.split(":"),r=null==Ae?void 0:Ae[l],c=null==r?void 0:r[(null==t?void 0:t.product_line)+"_MODEL"];c&&(n(rt(e,t,{ID_FIELD:r.ID_FIELD,MODEL:c},i)),e.mac&&e.state&&nt.setStorage(te.UNIFI_DEVICE,{[e.mac]:e.state}))})({event:e,meta:t,messageType:a})):"alert"===a?l(rt(e,t,{ID_FIELD:"timestamp",MODEL:"alerts"},"add")):"speed-test:update"===a||/:(add|delete)$/.test(a)?l(ct({event:e,meta:t,messageType:a})):Object.values(Object(lt.a)()).filter(t=>t.eventKeys.find(t=>t===e.key||t===a)&&t.forSuperSite===n).forEach(({action:t})=>{l(t(e))})})({event:e,meta:t,messageType:a,forSuperSite:n})))};var st,Et,mt=a(748);!function(e){e.EVENTS="events",e.RADIO_AI_PLAN="radio-ai:plan",e.SETUP_SYNC="setup:sync",e.ALERT="alert"}(st||(st={})),function(e){e.ADD="add",e.DELETE="delete",e.SYNC="sync",e.UPDATE="update"}(Et||(Et={}));const dt=[Et.ADD,Et.DELETE,Et.SYNC,Et.UPDATE],_t=[...Object.keys(Ae).reduce((e,t)=>e.concat(dt.map(e=>({messageType:`${t}:${e}`,forSuperSite:!1}))),[]),{messageType:st.EVENTS,forSuperSite:!1},{messageType:st.EVENTS,forSuperSite:!0},{messageType:st.RADIO_AI_PLAN,forSuperSite:!1},{messageType:st.SETUP_SYNC,forSuperSite:!1},{messageType:st.ALERT,forSuperSite:!1}],ut=Object(le.a)(Ge.b),bt=Object(le.a)(Ge.a);var pt=l.a.memo(()=>{const e=Object(r.useSelector)(xe.a),t=Object(r.useSelector)(V.d),a=Object(r.useSelector)(je.b),l=Object(r.useSelector)(V.c),i=Object(r.useSelector)(Le.b),c=Object(r.useSelector)(Ne.l),o=Object(r.useDispatch)(),s=ut(e,t,a,l),E=bt(e,t,a,l),m=!l&&!t,d=l?"1":"2",_=Object(n.useMemo)(()=>_t.map(({messageType:e,forSuperSite:t})=>({messageType:e,callback:({data:a,meta:n})=>{document.hidden&&!((e,t)=>{var a;if(!(null==t?void 0:t.length))return!1;if(e===st.EVENTS){for(let e=0;e<t.length;e+=1)if(ke.includes(null===(a=t[e])||void 0===a?void 0:a.key))return!0;return!1}const[n,l]=e.split(":");if([Et.SYNC,Et.UPDATE].some(e=>l===e)&&[te.DEVICE,te.UNIFI_DEVICE].includes(n)){for(let e=0;e<t.length;e+=1){const{mac:a,state:l}=null==t?void 0:t[e];if(a&&l){const e=nt.getStorage[n][a];if(void 0===e||e!==l)return nt.setStorage(n,{[a]:l}),!0}}return!1}return!0})(e,a)||"ok"===(null==n?void 0:n.rc)&&a&&o(ot({data:a,meta:n,messageType:e,forSuperSite:t}))},forSuperSite:t})),[]);return Object(n.useEffect)(()=>(m&&Object(r.batch)(()=>{o(Object(mt.d)({name:"messageWebSocket",path:`/wss/s/${i}/events?clients=v${d}`})),c&&o(Object(mt.d)({name:"superSiteMessageWebSocket",path:"/wss/s/super/events?clients=v"+d}))}),()=>{m&&Object(r.batch)(()=>{o(Object(mt.c)({name:"messageWebSocket"})),o(Object(mt.c)({name:"superSiteMessageWebSocket"}))})}),[c,m,i,d]),Object(n.useEffect)(()=>(_.forEach(({messageType:e,callback:t,forSuperSite:a})=>s(e,t,a)),()=>{_.forEach(({messageType:e,callback:t,forSuperSite:a})=>E(e,t,a))}),[_,s,E]),null}),Ot=a(246),It=()=>{const e=Object(r.useSelector)(V.f),t=Object(r.useSelector)(Ne.t),a=Object(r.useSelector)(Ne.a),l=Object(I.k)(),i=Object(Ot.a)("system/"+a);return Object(n.useEffect)(()=>{e&&t&&l.push(i)},[e,t,i]),null},gt=l.a.memo(()=>Object(r.useSelector)(g.p)?l.a.createElement(l.a.Fragment,null,l.a.createElement(pt,null),l.a.createElement(It,null)):null),Ct=a(280),ht=a(247),Tt=(a(7),a(2694),a(2696),a(747)),vt=a(2679),ft=a(269);const Rt=Object(ft.a)(()=>Promise.all([a.e(0),a.e(1)]).then(a.bind(null,3098)));var Dt=e=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(Rt,Object.assign({},e)));const St=Object(ft.a)(()=>Promise.all([a.e(0),a.e(12)]).then(a.bind(null,3103)));var yt=e=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(St,Object.assign({},e))),Pt=a(867),At=a(187),Nt=a(304),jt=a(256),xt=a(170),Lt=a(138),Vt=a.n(Lt),Mt=Object(O.e)(({intl:e})=>{const t=Object(I.k)(),a=Object(r.useDispatch)(),i=Object(r.useSelector)(g.p),c=Object(r.useSelector)(oe.selectDevicesData),{devicesToAdopt:o}=t.location.state||{devicesToAdopt:null},s=Object(r.useSelector)(Pe.selectHasUserWiFiNetworks),E=Object(L.j)("wifi/network/form"),m=Object(r.useSelector)(M.a);return Object(n.useEffect)(()=>{if(i&&o&&c.length)try{let n=!1;const i=JSON.parse(window.atob(o)).map(({mac:i})=>{const r=c.find(({mac:e,adopted:t})=>!t&&e.replace(/:/g,"").toUpperCase()===i.replace(/:/g,"").toUpperCase());if(r)return a(Object(oe.adoptDevice)(r,void 0,!0)),!Object(oe.isPureAp)(r)||s||n||(n=!0,a(((e,t,a,n,i,r)=>{const c=Vt()();return Object(h.a)({icon:l.a.createElement("div",null,l.a.createElement(T.b,{deviceType:null==e?void 0:e.type,deviceModel:null==e?void 0:e.model,publicImagePath:r,width:53,height:53})),title:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_TITLE",message:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_MESSAGE",primaryButton:{label:n.formatMessage({id:"DEVICE_ACTIONS_ADOPT_ACCESS_POINT_ACTION"}),onClick:()=>{t.push(i),a(Object(h.b)(c))}},translateTitle:!0},c)})(r,t,a,e,E,m))),r}).filter(e=>!!e);if(!i.length)throw new Error("ON_LOAD_BATCH_ADOPT_NO_DEVICES");a(Object(h.a)({icon:j.a.success,message:"ON_LOAD_BATCH_ADOPT",values:{count:i.length}}))}catch(e){a(Object(h.a)({icon:j.a.danger,message:"ON_LOAD_BATCH_ADOPT_NO_DEVICES"}))}finally{t.replace({pathname:t.location.pathname,state:Object.assign(t.location.state,{devicesToAdopt:null})})}},[i,o,t,c]),null});const wt=Object(ft.a)(()=>Promise.all([a.e(0),a.e(4)]).then(a.bind(null,3105))),Ft=Object(ft.a)(()=>Promise.all([a.e(0),a.e(18)]).then(a.bind(null,3099)));var Ut=()=>{const e=Object(r.useSelector)(Ee.selectIsUnifiDevicesPageSupportedController);return Object(L.g)([Object(re.fetchAPGroups)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),Object(At.a)({crudCacheStrategy:{type:Ye.a.CACHE}}),Object(Nt.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),Object(oe.fetchDevices)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),Object(ce.fetchClients)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),Object(jt.c)("devices"),Object(jt.c)("clients"),Object(Pe.fetchWifiNetworks)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),Object(ge.fetchNetworks)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),Object(Ce.fetchPortConf)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),Object(De.fetchSettings)({type:Ye.a.CACHE}),Object(g.e)({crudCacheStrategy:{type:Ye.a.CACHE}}),Object(xt.d)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}})],l.a.createElement(Pt.a,null,l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(Mt,null),e?l.a.createElement(Ft,null):l.a.createElement(wt,null))),{trackingName:"unifi-devices-page"})};const kt=Object(ft.a)(()=>Promise.all([a.e(0),a.e(3)]).then(a.bind(null,3097)));var Wt=e=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(kt,Object.assign({},e))),Bt=a(1134);const zt=Object(ft.a)(()=>Promise.all([a.e(0),a.e(15)]).then(a.bind(null,3101)));var Ht=e=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(zt,Object.assign({},e)));a(147);const Gt=Object(ft.a)(()=>Promise.all([a.e(0),a.e(14)]).then(a.bind(null,3100)));var $t=()=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(Gt,null));const Yt=Object(ft.a)(()=>Promise.all([a.e(0),a.e(11)]).then(a.bind(null,3096)));var Xt=e=>l.a.createElement(n.Suspense,{fallback:null},l.a.createElement(Yt,Object.assign({},e))),Kt=a(10),Zt=a(47),qt=a(2805),Jt=a(623),Qt=a(173),ea=a(492),ta=a(5);const aa=Object(c.c)(Zt.a)`
  color: ${({theme:e})=>e.motifPalette.neutral08} !important;
  cursor: default;
  user-select: none;
`,na=c.a`
  align-items: center;
  display: flex;
`,la=Object(c.c)(Kt.Hc)`
  margin-right: 20px;
  height: 28px;
  width: 28px;
`,ia=Object(c.c)(Kt.F)`
  margin-top: ${({theme:e})=>e.spacing["spacing-xs"]};
  margin-right: ${({theme:e})=>e.spacing["spacing-xs"]};
  height: 16px;
  width: 16px;
`;var ra=()=>{const e=Object(r.useDispatch)();return l.a.createElement(qt.a,{imageClassName:na,title:l.a.createElement(aa,{size:"header-s",weight:"normal"},"Network"),icon:l.a.createElement(Kt.Dc,{height:30,width:30})},l.a.createElement(ta.a,null,l.a.createElement(Jt.a,{renderToggle:()=>l.a.createElement(ta.a,{"data-testid":"header_usericon"},l.a.createElement(la,{actionable:!0})),size:"small",align:"bottomCenter",toggleOffset:7},l.a.createElement(ta.a,null,l.a.createElement(ia,{isActive:!0}),l.a.createElement(Qt.a,{variant:"inline",onClick:()=>{e(Object(ea.c)())},"data-testid":"header_signout_button"},l.a.createElement(O.b,{id:"COMMON_HEADER_USER_PROFILE_SIGN_OUT"}))))))},ca=a(2814),oa=a(2812),sa=a(2813);const Ea=Object(ft.a)(()=>Promise.resolve().then(a.bind(null,2679)));var ma=a(2667),da=a(2668),_a=a(1684),ua=a(2661),ba=Object(ft.a)(function(){return Promise.all([a.e(0),a.e(10)]).then(a.bind(null,3112))}),pa=a(1016),Oa=a(75),Ia=a(866),ga=a(457),Ca=a(2811);const ha=({children:e,href:t,...a})=>l.a.createElement(ga.Link,Object.assign({to:t},a),e);var Ta=({label:e,...t})=>l.a.createElement(Ca.a,Object.assign({component:t.href&&ha,label:l.a.createElement(O.b,{id:e})},t));function va({href:e,activityCount:t=0,active:a,...n}){const i=t>0?Kt.l:Kt.vb;return l.a.createElement(Ta,Object.assign({href:e,label:"COMMON_SIDE_NAV_NOTIFICATIONS",icon:l.a.createElement(i,{variant:"twoTone"}),active:a},n))}var fa=a(1135),Ra=a(2781),Da=a(215);const Sa=Object(c.c)("div")`
  width: 24px;
  height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  line-height: 22px;
  text-align: center;
  font-size: ${({letterCount:e})=>2===e?"10":"12"}px;
`,ya=Object(c.c)("ul")`
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
`,Pa=Object(c.c)("li")`
  height: 32px;
  line-height: 32px;
  padding: 0 6px;
  cursor: pointer;
  &:nth-child(n + 2) {
    border-top: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  }

  &:hover {
    background: ${({theme:e})=>e.motifPalette.hoverUi01};
  }
`,Aa=Object(c.c)(Qt.a)`
  margin: ${({theme:e})=>e.spacing["spacing-xs"]}px 0 12px 6px;
  font-weight: 700;
`,Na=({site:e})=>{const t=e.split(/[ _-]/).map(e=>e[0]).join("").toUpperCase().slice(0,2);return l.a.createElement(Sa,{letterCount:t.length},t)};var ja=()=>{var e,t;const[a,i]=Object(n.useState)(""),c=Object(r.useSelector)(Da.selectSites),o=Object(r.useSelector)(Le.b),s=Object(r.useSelector)(De.selectSuperManagementSettings).multiple_sites_enabled,E=Object(I.m)(),m=Object(I.k)(),{path:d}=Object(I.n)(),_=Object(r.useDispatch)(),u=null!==(t=null===(e=c.find(({name:e})=>e===o))||void 0===e?void 0:e.desc)&&void 0!==t?t:"",b=s||c.length>1,p=Object(n.useMemo)(()=>c.filter(({desc:e})=>{var t;return e.toLowerCase().includes(null===(t=null==a?void 0:a.toLowerCase)||void 0===t?void 0:t.call(a))}).sort(({desc:e},{desc:t})=>e.localeCompare(t)),[c,a]),g=Object(n.useCallback)((e,t)=>i(t),[i]),C=Object(n.useCallback)(()=>i(""),[i]),h=Object(n.useCallback)(e=>{e!==o&&m.push(Object(I.i)(d,{...E,site:e}))},[m,d,E,o]),T=Object(n.useCallback)(()=>_(Object($.g)({modalType:Y.a.ADD_NEW_SITE})),[_]),v=Object(n.useCallback)(()=>_(Object($.g)({modalType:Y.a.IMPORT_SITE})),[_]),f=Object(n.useMemo)(()=>"_"+Vt()().replace(/-/g,""),[]);return Object(L.m)(e=>`\n    .${f} {\n      transform: translate(54px, 38px) !important;\n    }\n    .${f} > div {\n      padding: 24px;\n      overflow: visible;\n    }\n    .${f} > div::before {\n      display: block;\n      content: '';\n      position: absolute;\n      width: 18px;\n      height: 18px;\n      background: ${e.motifPalette.ui02};\n      left: -9px;\n      top: 28px;\n      border-radius: 4px;\n      transform: rotate(45deg) skewX(-10deg) skewY(-10deg);\n      border: 1px solid rgba(21,23,37,.2);\n      border-right-width: 0;\n      border-top-width: 0;\n    }\n  `,!0),b?l.a.createElement(Jt.a,{key:"site-switcher-"+o,align:"rightCenter",toggleOffset:4,size:"auto",renderToggle:({open:e})=>l.a.createElement(oa.a,null,l.a.createElement(Ca.a,{label:l.a.createElement(O.b,{id:"COMMON_SIDE_NAV_SITE_SWITCHER"}),icon:l.a.createElement(Na,{site:u}),active:e}),l.a.createElement(sa.a,null)),classNameCardWrap:f},l.a.createElement(ta.a,{flexDirection:"column",width:"280px",justifyContent:"flex-start"},l.a.createElement(Ra.a,{value:a,onChange:g,onClear:C,expand:!0}),l.a.createElement(ya,null,p.map(({name:e,desc:t})=>l.a.createElement(Pa,{key:e,onClick:()=>h(e)},l.a.createElement(Zt.a,{size:"body",weight:o===e?"bold":"normal"},t)))),l.a.createElement(ta.a,{alignItems:"center",marginBottom:12},l.a.createElement(Aa,{name:"add-new-site",type:"button",variant:"inline",onClick:T,Icon:Kt.Mb,iconProps:{variant:"twoTone",isActive:!0,size:"medium"}},l.a.createElement(O.b,{id:"COMMON_SITE_SWITCHER_ADD_NEW_SITE"}))),l.a.createElement(ta.a,{alignItems:"center"},l.a.createElement(Aa,{name:"import-site",type:"button",variant:"inline",onClick:v,Icon:Kt.G,iconProps:{variant:"twoTone",isActive:!0,size:"medium"}},l.a.createElement(O.b,{id:"COMMON_SITE_SWITCHER_IMPORT_SITE"}))))):null};const xa=({label:e,icon:t,href:a,...n})=>{const i=t;return l.a.createElement(Ta,Object.assign({href:a,label:e,icon:l.a.createElement(i,{variant:"twoTone"})},n))};var La=({site:e})=>{const{url:t}=Object(I.n)(),a=Object(I.l)(),i=Object(r.useSelector)(pa.f),c=Object(r.useSelector)(At.c),o=Object(r.useSelector)(Oa.l),s=Object(n.useMemo)(()=>new RegExp(e+"/(\\w+)"),[e]),E=Object(n.useMemo)(()=>{const e=a.pathname.match(s);return e?e[1]:void 0},[a.pathname,s]),m=Object(n.useCallback)(e=>`${t}/${e}`,[t]),d=Object(r.useDispatch)(),_=Object(n.useRef)(new Set),u=Object(n.useCallback)(e=>{e.forEach(e=>{_.current.has(e)||(_.current.add(e),d(Object(jt.c)(e)))})},[d]),b=Object(r.useSelector)(g.r),p=Object(r.useSelector)(V.c),O=b||!p,C=!O&&"insights"===E&&a.pathname.includes("wifiman");return l.a.createElement(ca.a,{collapsible:!0},!o&&l.a.createElement(ja,null),l.a.createElement(oa.a,null,l.a.createElement(xa,{href:m("dashboard"),label:"COMMON_SIDE_NAV_DASHBOARD",icon:Kt.xb,active:"dashboard"===E,"data-testid":"navigation-dashboard",onMouseEnter:()=>{Ea.preload(),u(["dashboard"])}}),l.a.createElement(xa,{href:m("topology"),label:"COMMON_SIDE_NAV_TOPOLOGY",icon:Kt.Cb,active:"topology"===E||"floorplan"===E,"data-testid":"navigation-topology",onMouseEnter:()=>{zt.preload(),u(["topology","devices","clients"])}}),l.a.createElement(xa,{href:m("devices"),label:"COMMON_SIDE_NAV_DEVICES",icon:Kt.yb,active:"devices"===E,"data-testid":"navigation-devices",onMouseEnter:()=>{Ft.preload(),wt.preload(),u(["unifiDevices","devices","clients"])}}),l.a.createElement(xa,{href:m("clients"),label:"COMMON_SIDE_NAV_CLIENT_DEVICES",icon:Kt.wb,active:"clients"===E,"data-testid":"navigation-clients",onMouseEnter:()=>{kt.preload(),u(["clients","devices"])}}),l.a.createElement(xa,{href:m("statistics"),label:"COMMON_SIDE_NAV_STATS",icon:Kt.Bb,active:"statistics"===E,"data-testid":"navigation-statistics",onMouseEnter:()=>{St.preload(),ma.a.preload(),da.a.preload(),u(["statistics","trafficOverfiew","wifiStatistics"])}}),i&&!O&&l.a.createElement(xa,{href:m("insights/wifiman"),label:"COMMON_SIDE_NAV_WIFI_MAN",icon:Kt.Sc,active:C,"data-testid":"navigation-wifiman",onMouseEnter:()=>{_a.a.preload(),u(["wifiScanner"])}}),l.a.createElement(xa,{href:m("insights"),label:"COMMON_SIDE_NAV_INSIGHTS",icon:Kt.Ab,active:"insights"===E&&!C,"data-testid":"navigation-insights",onMouseEnter:()=>{Bt.a.preload(),ua.a.preload(),_a.a.preload(),u(["insights","wifiScanner","wifiMan"])}}),c&&l.a.createElement(xa,{href:m("ips"),label:"COMMON_SIDE_NAV_IPS",icon:Kt.Ac,active:"ips"===E,"data-testid":"navigation-ips",onMouseEnter:()=>{Gt.preload(),u(["threatManagement","countries"]),d(Object(Ia.a)()),d(Object(De.fetchSettings)({type:Ye.a.CACHE}))}}),l.a.createElement(sa.a,null)),l.a.createElement(oa.a,null,l.a.createElement(va,{href:m("activity"),active:"activity"===E,"data-testid":"navigation-activity",onMouseEnter:()=>{Rt.preload(),u(["activity","eventStrings"])}}),l.a.createElement(xa,{href:m(fa.a),label:"COMMON_SIDE_NAV_SETTINGS",icon:Kt.zb,active:"settings"===E,"data-testid":"navigation-settings",onMouseEnter:()=>{Yt.preload(),ba.preload(),u(["settings"])}})))},Va=a(1577),Ma=a(1588),wa=()=>{const e=Object(I.k)(),t=Object(r.useSelector)(g.p),a=Object(r.useSelector)(Le.b)||Ct.a,l=Object(Tt.a)("devicesToAdopt");return Object(n.useEffect)(()=>{t&&l&&e.push({pathname:`/${a}/devices${Object(Tt.b)(["devicesToAdopt"])}`,state:{devicesToAdopt:l}})},[t,l,e]),null},Fa=a(34),Ua=a(1589),ka=a(1017),Wa=a(14),Ba=a(61),za=a(23),Ha=a(11);const Ga=Object(c.c)(o.b)`
  margin-bottom: ${({theme:e})=>e.spacing["spacing-s"]};
`,$a=Object(c.c)(Ga)`
  margin-right: ${({theme:e})=>e.spacing["spacing-xxl"]};
  > span {
    display: flex;
    align-items: center;
  }
`,Ya=Object(c.c)("form")`
  max-width: 340px;
  width: 100%;
`,Xa=Object(c.c)("label")`
  font-size: 13px;
  height: 100%;
  padding: 4px 8px 4px 0;
  vertical-align: middle;
`,Ka=Object(c.c)(Xa)`
  padding: 4px 8px;
`,Za=Object(c.c)(o.f)`
  margin-bottom: ${e=>void 0!==e.marginBottom?e.marginBottom:8}px;
  width: 100%;
`;const qa={authLogin:ea.a};var Ja=Object(Ba.compose)(Object(r.connect)(e=>({error:Object(ea.f)(e).error,require2Fa:Object(ea.f)(e).require2Fa}),qa),Object(Wa.f)({handleSubmit:(e,{props:{authLogin:t}})=>{t(e)},mapPropsToValues:()=>({password:"",remember:!0,username:"",ubic_2fa_token:void 0}),validationSchema:za.a.object().shape({password:za.a.string().label("COMMON_LABEL_PASSWORD").required(),username:za.a.string().label("COMMON_LABEL_USERNAME").required()})}))(({handleSubmit:e,setFieldValue:t,isAuthenticated:a,isAuthenticating:i,error:c,redirectPath:s,require2Fa:E})=>{const m=Object(r.useSelector)(V.b),d=Object(r.useSelector)(V.f),u=Object(r.useDispatch)(),b=Object(n.useCallback)(()=>{t("ubic_2fa_token",void 0),u(Object(ea.b)(!1))},[u,t]);if(!d&&a){const e=`${m}${s}`.replace(/(\/){2,}/,"/");return window.location.href="/login?redirect="+e,null}return l.a.createElement(_.a,null,l.a.createElement(_.c,null,l.a.createElement(o.f,{height:"100%",alignItems:"center",flex:"1 1 100%",justifyContent:"center",padding:"32px"},l.a.createElement(Ya,{onSubmit:e},E?l.a.createElement(Za,{flexDirection:"column",marginBottom:20},l.a.createElement(Xa,{htmlFor:"ubic_2fa_token"},l.a.createElement(O.b,{id:"COMMON_LABEL_2FA_TOKEN"})),l.a.createElement(Ha.Field,{label:"COMMON_LABEL_2FA_TOKEN_PLACEHOLDER",name:"ubic_2fa_token",full:!0,noLocalState:!0})):l.a.createElement(l.a.Fragment,null,l.a.createElement(Za,{flexDirection:"column"},l.a.createElement(Ha.Field,{allowLastPass:!0,autoFocus:!0,full:!0,label:"COMMON_LABEL_USERNAME",name:"username",noLocalState:!0})),l.a.createElement(Za,{flexDirection:"column",marginBottom:20},l.a.createElement(Ha.Field,{allowLastPass:!0,full:!0,label:"COMMON_LABEL_PASSWORD",name:"password",type:"password",passwordToggle:!0,noLocalState:!0})),l.a.createElement(Za,{alignItems:"center",marginBottom:32},l.a.createElement(Ha.Field,{name:"remember",type:"checkbox"}),l.a.createElement(Ka,{htmlFor:"remember"},l.a.createElement(O.b,{id:"COMMON_LABEL_REMEMBER_ME"})))),l.a.createElement(Za,{flexDirection:"column",marginBottom:0},l.a.createElement(o.f,{width:"100%",flexDirection:"row-reverse"},l.a.createElement(Ga,{disabled:i,legacy:!1,name:"sign-in",type:"submit",variant:"primary",full:!0},l.a.createElement(O.b,{id:"COMMON_ACTION_SIGN_IN"})),E&&l.a.createElement($a,{onClick:b,disabled:i,legacy:!1,name:"back",variant:"link"},l.a.createElement(Kt.f,{width:12}),l.a.createElement(O.b,{id:"COMMON_ACTION_BACK"}))),l.a.createElement(Ha.ValidationMessage,{translation:c,visible:!!c}))))))}),Qa=a(362);const en="undefined"!=typeof window&&window.requestIdleCallback,tn=(e,t)=>en?window.requestIdleCallback(a=>a.timeRemaining()<=1&&!a.didTimeout?tn(e,t):e(),t):e();var an,nn,ln=tn,rn=a(462),cn=a(133),on=a(128),sn=a(310),En=a(249),mn=a(282),dn=a(662),_n=a(793),un=a(1112),bn=a(1105),pn=a(2606),On=a(1170),In=a(791),gn=a(655),Cn=a(1661),hn=a(473),Tn=a(787),vn=a(648),fn=a(650),Rn=a(333),Dn=a(795),Sn=a(463),yn=a(797),Pn=a(654),An=a(573),Nn=a(505),jn=a(506),xn=a(367),Ln=a(501),Vn=a(796),Mn=a(439),wn=a(788),Fn=a(800),Un=a(493),kn=a(801),Wn=a(790),Bn=a(799),zn=a(377),Hn=a(576),Gn=a(798),$n=a(2663),Yn=a(123),Xn=a(2603);!function(e){e.fetchAPGroups="fetchAPGroups",e.fetchAccounts="fetchAccounts",e.fetchAdmins="fetchAdmins",e.fetchAvailableFirmware="fetchAvailableFirmware",e.fetchBackups="fetchBackups",e.fetchBlockedClients="fetchBlockedClients",e.fetchCachedFirmware="fetchCachedFirmware",e.fetchClients="fetchClients",e.fetchControllerNotifications="fetchControllerNotifications",e.fetchControllerWarnings="fetchControllerWarnings",e.fetchCountryCodes="fetchCountryCodes",e.fetchDevices="fetchDevices",e.fetchDevicesBasic="fetchDevicesBasic",e.fetchDhcpOptions="fetchDhcpOptions",e.fetchDpi="fetchDpi",e.fetchDpiApps="fetchDpiApps",e.fetchDpiGroups="fetchDpiGroups",e.fetchDynamicDns="fetchDynamicDns",e.fetchEvents="fetchEvents",e.fetchFeatures="fetchFeatures",e.fetchFingerprintDeviceMapById="fetchFingerprintDeviceMapById",e.fetchFirewallGroups="fetchFirewallGroups",e.fetchFirewallRules="fetchFirewallRules",e.fetchHealth="fetchHealth",e.fetchHotspot2conf="fetchHotspot2conf",e.fetchHotspotPackages="fetchHotspotPackages",e.fetchIpsEventsRange="fetchIpsEventsRange",e.fetchLanEnrichedConfiguration="fetchLanEnrichedConfiguration",e.fetchNetworks="fetchNetworks",e.fetchOfflineClients="fetchOfflineClients",e.fetchPortConf="fetchPortConf",e.fetchPortForwardRules="fetchPortForwardRules",e.fetchRadiusProfiles="fetchRadiusProfiles",e.fetchRouting="fetchRouting",e.fetchScheduledUpgrades="fetchScheduledUpgrades",e.fetchSettings="fetchSettings",e.fetchSiteGateway="fetchSiteGateway",e.fetchSubnetSuggestions="fetchSubnetSuggestions",e.fetchTimezones="fetchTimezones",e.fetchTrafficRules="fetchTrafficRules",e.fetchUnifiDevices="fetchUnifiDevices",e.fetchUserGroups="fetchUserGroups",e.fetchWanEnrichedConfiguration="fetchWanEnrichedConfiguration",e.fetchWifiManList="fetchWifiManList",e.fetchWifiNetworks="fetchWifiNetworks",e.fetchWifiScannerListByTime="fetchWifiScannerListByTime",e.fetchWlanDefaults="fetchWlanDefaults",e.fetchWlanEnrichedConfiguration="fetchWlanEnrichedConfiguration"}(an||(an={})),function(e){e.dashboard="dashboard",e.topology="topology",e.devices="devices",e.clients="clients",e.statistics="statistics",e.insights="insights",e.ips="ips",e.activity="activity",e.settings="settings"}(nn||(nn={}));const Kn={[an.fetchDevices]:Object(Ve.q)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchUnifiDevices]:Object(bn.b)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchClients]:Object(Fe.g)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchOfflineClients]:(e,t)=>{var a,n;return e(Object(Fe.h)({queryParams:{withinHours:null!==(n=null===(a=Object(Ne.C)(t()))||void 0===a?void 0:a.offlineClientTimeframe)&&void 0!==n?n:Me.d.DAY}},{crudCacheStrategy:{type:Ye.a.CACHE}}))},[an.fetchBlockedClients]:Object(Fe.e)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchAPGroups]:Object(rn.b)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchAccounts]:Object(Hn.b)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchAdmins]:(e,t)=>Object(V.f)(t())?e(Object(zn.a)(Ye.a.CACHE)):Promise.resolve({}),[an.fetchAvailableFirmware]:Object(Un.b)({type:Ye.a.CACHE}),[an.fetchBackups]:Object(Wn.d)({type:Ye.a.CACHE}),[an.fetchCachedFirmware]:Object(Un.c)({type:Ye.a.CACHE}),[an.fetchControllerNotifications]:(e,t)=>Object(Ne.g)(t())?e(Object(Dn.b)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}})):Promise.resolve(),[an.fetchControllerWarnings]:(e,t)=>Object(Ne.g)(t())?e(Object(Ln.a)()):Promise.resolve(),[an.fetchCountryCodes]:Object(Bn.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchDevicesBasic]:Object(Tn.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchDhcpOptions]:Object(Sn.a)({crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchDpi]:Object(un.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchDpiApps]:Object(Nn.b)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchDpiGroups]:Object(jn.c)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchDynamicDns]:Object(yn.a)({crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchEvents]:(e,t)=>{return e(Object(Cn.a)((a=Object($n.a)(t()),{isAscending:null==(n=Object(Ne.v)(Yn.a.ALERTS)(t()))?void 0:n.isAscending,timestampFrom:Date.parse(a.start),timestampTo:Date.parse(a.end)}),void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}));var a,n},[an.fetchFeatures]:Object(In.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchFingerprintDeviceMapById]:Object(_n.b)(0),[an.fetchFirewallGroups]:Object(wn.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchFirewallRules]:Object(gn.d)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchHealth]:Object(vn.a)({crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchHotspot2conf]:Object(Vn.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchHotspotPackages]:Object(Gn.a)({type:Ye.a.CACHE}),[an.fetchIpsEventsRange]:Object(hn.f)(void 0,void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchLanEnrichedConfiguration]:Object(dn.b)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchNetworks]:Object(cn.d)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchPortConf]:Object(fn.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchPortForwardRules]:Object(Pn.b)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchRadiusProfiles]:Object(ve.fetchRadiusProfiles)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchRouting]:Object(An.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchScheduledUpgrades]:Object(kn.a)({type:Ye.a.CACHE}),[an.fetchSettings]:Object(on.f)({type:Ye.a.CACHE}),[an.fetchSiteGateway]:Object(Ve.s)({type:Ye.a.CACHE}),[an.fetchSubnetSuggestions]:(e,t)=>Object(Ne.k)(t())?Promise.resolve({}):e(Object(Mn.b)()),[an.fetchTimezones]:Object(Fn.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchTrafficRules]:Object(xn.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchUserGroups]:Object(Rn.c)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchWanEnrichedConfiguration]:Object(sn.b)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchWifiManList]:Object(On.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchWifiNetworks]:Object(En.c)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchWifiScannerListByTime]:(e,t)=>e(Object(pn.b)(Object(Xn.b)(t()),void 0,{crudCacheStrategy:{type:Ye.a.CACHE}})),[an.fetchWlanDefaults]:Object(mn.a)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}}),[an.fetchWlanEnrichedConfiguration]:Object(mn.b)(void 0,{crudCacheStrategy:{type:Ye.a.CACHE}})},Zn={[nn.dashboard]:void 0,[nn.topology]:void 0,[nn.devices]:void 0,[nn.clients]:void 0,[nn.statistics]:[an.fetchDevicesBasic,an.fetchClients,an.fetchOfflineClients,an.fetchBlockedClients,an.fetchUnifiDevices],[nn.insights]:[an.fetchWifiManList,an.fetchSettings],[nn.ips]:void 0,[nn.activity]:void 0,[nn.settings]:[an.fetchSettings,an.fetchFeatures,an.fetchHealth,an.fetchDevices,an.fetchNetworks,an.fetchWifiNetworks,an.fetchWlanEnrichedConfiguration,an.fetchRadiusProfiles,an.fetchUserGroups,an.fetchAPGroups,an.fetchWlanDefaults,an.fetchHotspot2conf,an.fetchLanEnrichedConfiguration,an.fetchSubnetSuggestions,an.fetchWanEnrichedConfiguration,an.fetchPortForwardRules,an.fetchSiteGateway,an.fetchDynamicDns,an.fetchAccounts,an.fetchDhcpOptions,an.fetchDpiApps,an.fetchDpiGroups,an.fetchTrafficRules,an.fetchRouting,an.fetchDevicesBasic,an.fetchFirewallRules,an.fetchFirewallGroups,an.fetchPortConf,an.fetchHotspotPackages,an.fetchCountryCodes,an.fetchTimezones,an.fetchAvailableFirmware,an.fetchCachedFirmware,an.fetchScheduledUpgrades,an.fetchBackups,an.fetchAdmins]};var qn=l.a.memo(Object(I.o)(({location:e,match:{params:{site:t=Ct.a}}})=>{const a=Object(r.useDispatch)(),l=Object(n.useRef)(void 0),i=Object(n.useRef)(void 0),c=Object(n.useMemo)(()=>{var a,n;return(null===(n=null===(a=null==e?void 0:e.pathname)||void 0===a?void 0:a.match(new RegExp(t+"/(\\w+)")))||void 0===n?void 0:n[1])||void 0},[null==e?void 0:e.pathname,t]),o=Object(n.useMemo)(()=>c&&c in nn&&(null==Zn?void 0:Zn[c])?Zn[c]:void 0,[c]),s=()=>{i.current&&clearTimeout(i.current),l.current&&clearTimeout(l.current)},E=Object(n.useCallback)(()=>{const e=function*(e=[]){for(var t;Object.keys(Kn||{}).length;){let a,n;e.length>0?n=(a=e.shift())?null==Kn?void 0:Kn[a]:void 0:[a,n]=(null===(t=Object.entries(Kn))||void 0===t?void 0:t[0])||[],a&&(delete Kn[a],yield n),yield}}(o).next();e.done?s():e.value&&a(e.value).catch(()=>null).finally(()=>{l.current=setTimeout(()=>{ln(E)},0)})},[o]);return Object(n.useEffect)(()=>(i.current=setTimeout(()=>ln(E),500),s),[]),null})),Jn=l.a.memo(()=>{const e=Object(r.useSelector)(g.r),t=Object(r.useSelector)(V.f),a=Object(r.useSelector)(V.e),l=Object(r.useSelector)(V.b);return Object(n.useEffect)(()=>{if(!e){let n=l;t&&!a&&(n=`${n.replace(/\/$/,"")}${window.location.search}`),Object(P.g)(e,t,a,l),window.location.href=n}},[e,l,a,t]),null});const Qn=Object(c.c)(ta.a)`
  @media ${Fa.a.VIEWPORT_S_DOWN} {
    flex-direction: column;
  }
`,el=({location:{key:e},match:{path:t,params:{site:a},url:i},swaiProps:{isStandalone:r}})=>(Object(n.useEffect)(()=>{const[e]=performance.getEntriesByName("ufsdn.app-loaded:start");e&&performance.measure("ufsdn.app-loaded",e.name)},[]),l.a.createElement(l.a.Fragment,null,r&&l.a.createElement(ra,null),l.a.createElement(_.a,null,l.a.createElement(Qn,{overflow:"hidden",position:"relative",flex:1},l.a.createElement(La,{site:a}),l.a.createElement(_.a,null,l.a.createElement(I.g,null,l.a.createElement(Qa.a,{path:t+"/dashboard",component:vt.default}),l.a.createElement(Qa.a,{path:t+"/statistics/:section?/:subSection?/:appId?",component:yt}),l.a.createElement(Qa.a,{path:t+"/devices",component:Ut}),l.a.createElement(Qa.a,{path:t+"/clients",component:Wt}),l.a.createElement(Qa.a,{path:t+"/insights/:insight?/:section?/:id?",component:Bt.b}),l.a.createElement(Qa.a,{path:[t+"/topology",t+"/floorplan"],component:Ht}),l.a.createElement(Qa.a,{path:t+"/ips",component:$t}),l.a.createElement(Qa.a,{path:t+"/activity",component:Dt}),l.a.createElement(Qa.a,{path:t+"/settings",component:Xt}),l.a.createElement(I.c,{from:t+"/redirect/device-upgrade/:id",to:t+"/devices/device-upgrade/:id"}),l.a.createElement(Qa.a,{path:t+"/",exact:!0},l.a.createElement(I.c,{to:Object(Tt.c)(i.replace(/\/+$/,"")+"/dashboard")})),l.a.createElement(Qa.a,{render:()=>l.a.createElement(Va.a,{path:"/"})})),l.a.createElement(Ua.a,{key:e}),l.a.createElement(Ma.a,null)))),l.a.createElement(qn,null),l.a.createElement(ka.b,null),l.a.createElement(wa,null),l.a.createElement(Jn,null))),tl=Object(ea.h)(Ja);var al=({swaiProps:e})=>{const t=e.isStandalone?Object(ea.g)(el):el;return l.a.createElement(I.g,null,l.a.createElement(Qa.a,{path:"/login",component:tl}),l.a.createElement(Qa.a,{path:"/:site",render:a=>l.a.createElement(t,Object.assign({swaiProps:e},a))}))},nl=a(113),ll=Object(nl.a)(({motif:e})=>{const t=Object(r.useSelector)(V.k);return Object(n.useEffect)(()=>{t(e)},[t,e]),null}),il=a(1136),rl=a(2806),cl=a(2815),ol=a(2802),sl=a(456);const El=(e,{button:t})=>t?{...t,label:e.formatHTMLMessage({id:t.message},t.values)}:void 0,ml=(e,{message:t,values:a,errorMessage:n,errorValues:l})=>{const i=n&&e.formatHTMLMessage({id:n},l);return`${e.formatHTMLMessage({id:t},a)}${i?". "+i:""}`};var dl=Object(O.e)(({intl:e})=>{const{createNotification:t,removeNotification:a}=Object(r.useSelector)(sl.a),l=Object(r.useSelector)(sl.b),i=Object(n.useRef)(new Set(Object.keys(l)));return Object(n.useEffect)(()=>{Object.keys(l).filter(e=>!i.current.has(e)).forEach(a=>{const{toastProps:n}=l[a],{details:r,errorMessage:c,errorValues:o,message:s="COMMON_UNKNOWN_ERROR",primaryButton:E,secondaryButton:m,values:d,title:_,translateTitle:u,notificationType:b,...p}=n,O=r||ml(e,{message:s,values:d,errorValues:o,errorMessage:c}),I=u?e.formatMessage({id:_}):_,g=E&&E.label?E:El(e,{button:E}),C=m&&m.label?m:El(e,{button:m});t({details:O,id:String(a),primaryButton:g,secondaryButton:C,title:I,notificationType:b,...p}),i.current.add(a)}),i.current.forEach(e=>{l[e]||(a(e),i.current.delete(e))})},[t,e,l,a]),null}),_l=a(427);const ul=()=>{const{createNotification:e,updateNotification:t,removeNotification:a}=Object(r.useSelector)(V.l),i=Object(r.useDispatch)(),c=Object(n.useRef)(new Map).current,o=Object(n.useCallback)((e,t)=>{Number.isInteger(e)&&0!==e&&(c.has(t)&&(clearTimeout(c.get(t)),c.delete(t)),c.set(t,setTimeout(()=>a(t),e)))},[a]),s=Object(n.useCallback)(t=>{const a=e(t),n=void 0!==(null==t?void 0:t.duration)||"DownloadsToast"===(null==t?void 0:t.notificationType)?null==t?void 0:t.duration:5e3;return o(n,a),a},[e,o]),E=Object(n.useCallback)(e=>{if(!e.id)return;t(e);const a=void 0!==(null==e?void 0:e.duration)||"DownloadsToast"===(null==e?void 0:e.notificationType)?null==e?void 0:e.duration:5e3;o(a,e.id)},[t,o]);return Object(n.useEffect)(()=>{i(Object(h.c)({createNotification:s,updateNotification:E,removeNotification:a}))},[i,s,E,a]),l.a.createElement(dl,null)},bl=Object(O.e)(({intl:e})=>{const t=Object(r.useDispatch)(),a=Object(n.useCallback)(t=>{const{props:a}=t;try{if(a.primaryButton||a.secondaryButton){const{details:t,message:n,values:l,primaryButton:i,secondaryButton:r}=a,c={message:t||ml(e,{message:n,values:l})};return i&&(c.primary=i.label?i:{...El(e,{button:i}),callback:i.onClick}),r&&(c.secondary=r.label?r:{...El(e,{button:r}),callback:r.onClick}),c}if(a.details){const t=a.icon||a.type;return{level:"info"!==t?t:"neutral",message:((e,{details:t,translated:a=!1})=>{if(a||"string"==typeof t)return t;const{props:{id:n,values:l}}=t;return e.formatMessage({id:n},l)})(e,a)}}if(a.message){return{level:void 0!==a.errorMessage?"danger":"success",message:ml(e,a)}}}catch(e){console.error("Cannot map toast",e)}return{}},[e]),i=Object(n.useCallback)(e=>{const{level:n,message:l,primary:i,secondary:r}=a(e);return i||r?t(Object(_l.f)(l,i,r)):n&&l&&t(Object(_l.g)(n,l)),""},[t,a]),c=Object(n.useCallback)(e=>{},[]);return Object(n.useEffect)(()=>{t(Object(h.c)({createNotification:i,updateNotification:i,removeNotification:c}))},[t,i,c]),l.a.createElement(dl,null)}),pl=c.a`
  > div:last-child {
    justify-content: center;

    > span {
      margin-top: 0 !important;
      margin-right: 20px;
    }
  }
`,Ol=Object(O.e)(({intl:e})=>{const{createNotification:t,updateNotification:a,removeNotification:i}=Object(n.useContext)(rl.a),o=Object(r.useDispatch)(),s=Object(n.useCallback)(a=>{const{id:n,details:r,errorMessage:o,errorValues:s,message:E="COMMON_UNKNOWN_ERROR",primaryButton:m,secondaryButton:d,values:_,title:u,translateTitle:b,className:p,onClose:O,notificationType:I,...g}=a,C=r||ml(e,{message:E,values:_,errorValues:s,errorMessage:o}),h=b?e.formatMessage({id:u}):u,T=m&&m.label?m:El(e,{button:m}),v=d&&d.label?d:El(e,{button:d}),f="DownloadsToast"===I?cl.a:ol.a;return t(l.a.createElement(f,Object.assign({details:C,id:void 0!==n?String(n):void 0},T?{primaryButton:T}:{},v?{secondaryButton:v}:{},{title:h,className:Object(c.b)(pl,p),onClose:(e,t)=>{i(t),null==O||O(e,t)}},I?{notificationType:I}:{},g))),n},[e,t,i]),E=Object(n.useCallback)((e,t)=>{let n=e,l=t;if("object"==typeof e){const{id:t,...a}=e;n=t,l=a}a(n,l)},[a]);return Object(n.useEffect)(()=>{o(Object(h.c)({createNotification:s,updateNotification:E,removeNotification:i}))},[o,s,E,i]),l.a.createElement(dl,null)});var Il=({children:e})=>{const t=!Object(r.useSelector)(V.f),a=Object(r.useSelector)(V.c);return t?l.a.createElement(l.a.Fragment,null,l.a.createElement(ul,null),e):a?l.a.createElement(l.a.Fragment,null,l.a.createElement(bl,null),e):l.a.createElement(rl.b,null,l.a.createElement(Ol,null),e)};const gl=["login","testbed","account","manage"];t.default=Object(n.memo)(({match:e,location:t,targetApp:a,swaiProps:s,dispatch:E})=>{var m;const u=Object(r.useSelector)(Ne.k),b=(null===(m=null==e?void 0:e.params)||void 0===m?void 0:m.site)||Ct.a,[O,I]=Object(n.useState)(b);return Object(n.useEffect)(()=>{s.isStandalone&&Object(c.d)(il.b),E(Object(Ye.e)())},[]),Object(n.useEffect)(()=>{b&&!gl.includes(b)&&b!==O&&(I(b),E(Object(ht.d)(b)))},[O,b]),l.a.createElement(l.a.Fragment,null,l.a.createElement(o.k.Provider,{value:u},l.a.createElement(ll,null),l.a.createElement(i.b,null,l.a.createElement(o.e,null,l.a.createElement(ne,null,l.a.createElement(gt,null),l.a.createElement(_.b,{vertical:!0,viewport:!0},l.a.createElement(Il,null,!s.isHybridApp&&l.a.createElement(al,{swaiProps:s}),l.a.createElement(H,null),l.a.createElement(Z,null),s.isHybridApp&&a&&l.a.createElement(a,{locationKey:t.key,isStandalone:s.isStandalone})),l.a.createElement(d,null)))))),l.a.createElement(p,null))},(e,t)=>e.match.params.site===t.match.params.site)},325:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(3),r=a(210),c=a.n(r),o=a(10),s=a(5),E=a(22);const m=Object(i.c)(s.a,{shouldForwardProp:e=>!["borderColor","backgroundColor","dividerColor","standalone"].includes(e)})`
  background-color: ${({backgroundColor:e})=>e};
  border-left: 2px solid ${({borderColor:e})=>e};
  padding: ${({standalone:e})=>e?"6px 18px 0 0":"16px 16px 16px 0"};

  & + & {
    border-top: 1px solid ${({dividerColor:e})=>e};
  }

  ${({standalone:e,dividerColor:t})=>e&&`\n    border: 1px solid ${t};\n    margin-bottom: 4px;\n  `}
`,d=Object(i.c)(s.a)`
  min-width: 36px;
  max-width: 36px;
`;t.a=(({level:e,children:t,standalone:a})=>{const n=Object(E.n)(),{icon:i,backgroundColor:r,borderColor:_,dividerColor:u}=((e,t)=>{switch(e){case"warning":return{icon:l.a.createElement(o.a,{size:"medium",color:t.motifPalette.warning,variant:"fill"}),backgroundColor:t.motifPalette.neutral01,borderColor:t.motifPalette.warning,dividerColor:c()(t.motifPalette.warning).alpha(.2).css()};case"danger":return{icon:l.a.createElement(o.w,{size:"medium",color:t.motifPalette.danger,variant:"fill"}),backgroundColor:t.motifPalette.neutral01,borderColor:t.motifPalette.danger,dividerColor:c()(t.motifPalette.danger).alpha(.2).css()};default:return{icon:l.a.createElement(o.cb,{isActive:!0,size:"original",variant:"fill"}),backgroundColor:t.motifPalette.neutral01,borderColor:t.motifPalette.info,dividerColor:c()(t.motifPalette.info).alpha(.2).css()}}})(e,n);return l.a.createElement(m,{flexDirection:"row",width:"100%",backgroundColor:r,borderColor:_,dividerColor:u,standalone:a},l.a.createElement(d,{justifyContent:"center"},i),l.a.createElement(s.a,{flexDirection:"column",justifyContent:"center"},t))})},362:function(e,t,a){"use strict";a.d(t,"b",function(){return _}),a.d(t,"a",function(){return u});var n=a(258),l=a(1636),i=a(2671),r=a(283),c=a(2662),o=a(2786),s=a(970),E=a(25);const m=e=>void 0===e?e:"[PII]";var d=a(1197);const _=(e,t,a)=>{n.d("app.name","network"),n.d("app.version","7.1.66"),n.d("app.environment","production");const E=new l.a({dsn:t,normalizeDepth:5,integrations:[new c.a.BrowserTracing({markBackgroundTransactions:!1,maxTransactionDuration:5,traceFetch:!1,traceXHR:!1,idleTimeout:15e3,routingInstrumentation:Object(d.a)(e,a)}),new i.a.Breadcrumbs({console:!1}),new o.a],beforeSend:(e,t)=>(e.request&&(e.request={...e.request,url:e.request.url&&m(e.request.url),query_string:e.request.query_string&&m(e.request.query_string),cookies:e.request.cookies&&Object(s.a)(e.request.cookies,m),data:e.request.data&&Object(s.a)(e.request.data,m)}),e),beforeBreadcrumb:e=>{var t,a,n,l,i,r,c;return e.data&&("xhr"!==e.category&&"fetch"!==e.category||(e.data.url=m(e.data.url)),"navigation"===e.category&&(e.data.from=m(e.data.from),e.data.to=m(e.data.to))),(null===(t=e.message)||void 0===t?void 0:t.startsWith("%c prev state"))||(null===(a=e.message)||void 0===a?void 0:a.startsWith("%c action"))||(null===(n=e.message)||void 0===n?void 0:n.startsWith("%c next state"))||(null===(l=e.message)||void 0===l?void 0:l.startsWith("[WDS]"))||(null===(i=e.message)||void 0===i?void 0:i.startsWith("[HMR]"))||(null===(r=e.message)||void 0===r?void 0:r.startsWith("[react-ga]"))||(null===(c=e.message)||void 0===c?void 0:c.startsWith("React-Hot-Loader:"))?null:e},tracesSampleRate:(()=>{var e;const t=null===(e=null===window||void 0===window?void 0:window.localStorage)||void 0===e?void 0:e.getItem("app.tracesSampleRate");return parseFloat(null!=t?t:"0.05")})()}),_=new r.a(E);return _.setTag("app.instrumentation","network-controller"),{hub:_,client:E}},u=Object(d.c)(E.d)},435:function(e,t,a){"use strict";a.d(t,"i",function(){return d}),a.d(t,"l",function(){return _}),a.d(t,"c",function(){return u}),a.d(t,"j",function(){return p}),a.d(t,"f",function(){return O}),a.d(t,"d",function(){return I}),a.d(t,"h",function(){return g}),a.d(t,"e",function(){return C}),a.d(t,"b",function(){return h}),a.d(t,"g",function(){return T}),a.d(t,"k",function(){return v}),a.d(t,"a",function(){return f});var n=a(10),l=a(1671),i=a(1037),r=a(48),c=a(173),o=a(3),s=a(5),E=a(11),m=a(208);const d=Object(o.c)(l.a)`
  position: relative;
  margin-left: 8px;
  max-width: 17px;
  border-radius: 8;
  height: 4px;
`,_=Object(o.c)(i.a)`
  margin-left: 8px;
  max-width: 17px;
  border-radius: 8px;
`,u=Object(o.c)("div")`
  width: 100%;
  margin-bottom: ${e=>e.marginBottom||0}px;

  > div {
    align-items: baseline;
  }

  > label {
    &:active {
      top: 30px;
    }
  }

  input {
    width: 100% !important;
  }
`,b=Object(o.c)(E.Field)`
  .labelClassName {
    margin-top: 10px;
  }
`,p=Object(o.c)(b)`
  padding-bottom: 8px;
  .validationMessageClassName {
    display: none;
  }
`,O=Object(o.c)(E.Field)`
  div > div > div {
    [for='usergroup_id'] {
      font-size: ${({theme:e})=>e.fontSize["font-size-caption"]};
    }
    > div {
      font-size: ${({theme:e})=>e.fontSize["font-size-body"]};
    }
  }
`,I=Object(o.c)(n.v)`
  color: ${r.a["neutral-8"]};
`,g=Object(o.c)(n.cb)`
  margin: 2px 8px 0 0;
`,C=Object(o.c)(g)`
  path {
    fill: ${({theme:e})=>e.motifPalette.danger};
  }
`,h=Object(o.c)(c.a)`
  font-size: ${({theme:e})=>e.fontSize["font-size-body"]};
  font-weight: 700;
`,T=Object(o.c)(m.a)`
  border-top: 0;
`,v=Object(o.c)(s.a)`
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};
  button {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
  }
`,f=Object(o.c)(n.f)`
  color: ${({theme:e})=>e.motifPalette.neutral08};
`},491:function(e,t,a){"use strict";a.d(t,"b",function(){return g}),a.d(t,"c",function(){return h}),a.d(t,"d",function(){return T}),a.d(t,"f",function(){return f}),a.d(t,"j",function(){return R}),a.d(t,"e",function(){return S}),a.d(t,"g",function(){return P}),a.d(t,"h",function(){return A}),a.d(t,"i",function(){return N}),a.d(t,"a",function(){return j});var n=a(9),l=a(425),i=a.n(l),r=a(852),c=a(81),o=a(124),s=a(96),E=a(260),m=a(54),d=a(853),_=a(59),u=a(162);const b=e=>{switch(e.type){case _.c.WIRED:case _.c.WIRELESS:return(e=>{if(!e.id)return null;const t={_id:e.id,id:e.id,name:e.name,type:e.type,connected:Object(u.r)(e),connection:Object(u.i)(e),mac:e.mac,display_name:e.display_name,hostname:e.hostname,fingerprint:e.fingerprint,rx_bytes:e.rx_bytes,tx_bytes:e.tx_bytes,rx_packets:e.rx_packets,tx_packets:e.tx_packets,"tx_bytes-r":e["tx_bytes-r"],"rx_bytes-r":e["rx_bytes-r"],ip:e.ip,uptime:e.uptime,oui:e.oui,blocked:e.blocked,is_wired:e.is_wired,tx_rate:e.tx_rate,rx_rate:e.rx_rate,authorized:e.authorized,gw_mac:e.gw_mac,is_guest:e.is_guest,fixed_ip:e.fixed_ip,network_id:e.network_id,network_name:e.network_name,usergroup_id:e.usergroup_id,note:e.note,use_fixedip:e.use_fixedip,user_id:e.user_id,uplink_mac:e.uplink_mac,unifi_device_info:e.unifi_device_info,assoc_time:e.assoc_time};switch(t.type){case _.c.WIRED:e.type===_.c.WIRED&&(t.sw_port=e.sw_port,t.wired_rate_mbps=e.wired_rate_mbps);break;case _.c.WIRELESS:e.type===_.c.WIRELESS&&(t.eagerly_discovered=e.eagerly_discovered,t.powersave_enabled=e.powersave_enabled,t.last_seen=e.last_seen,t.rssi=e.rssi,t.essid=e.essid,t.radio=e.radio,t.radio_proto=e.radio_proto,t.mimo=e.mimo,t.signal=e.signal,t.fixed_ap_enabled=e.fixed_ap_enabled,t.fixed_ap_mac=e.fixed_ap_mac,t.wifi_experience_score=e.wifi_experience_score,t.channel=e.channel)}return t})(e);case _.c.TELEPORT:return{_id:(t=e).id,id:t.id,ip:t.ip,type:t.type,display_name:t.display_name,assoc_time:t.assoc_time,connected:Object(u.r)(t)};default:return null}var t};var p=a(2605),O=a(89),I=a(92);const g=e=>{var t,a,n;return null!==(n=null===(a=null===(t=null==e?void 0:e.shared)||void 0===t?void 0:t.propertypanel)||void 0===a?void 0:a.showing)&&void 0!==n&&n},C=e=>{var t,a,n;return null!==(n=null===(a=null===(t=null==e?void 0:e.shared)||void 0===t?void 0:t.propertypanel)||void 0===a?void 0:a.activeItem)&&void 0!==n?n:{}},h=Object(n.a)(C,({mac:e})=>e),T=(Object(n.a)(C,({id:e})=>e),Object(n.a)(C,({type:e})=>e)),v=[],f=e=>Object(n.b)(n.c,(e,t)=>i()(Object(r.a)(e,v),Object(r.a)(t,v)))(Object(n.a)(t=>{var a,n,l,i;return(null===(i=null===(l=null===(n=null===(a=t.models)||void 0===a?void 0:a[c.B])||void 0===n?void 0:n.byId)||void 0===l?void 0:l[e])||void 0===i?void 0:i.record)||{}},e=>e),e=>e),R=Object(n.a)(o.u,h,(e,t)=>{const a=e.find(e=>e.mac===t);return e.reduce((e,t)=>{var n;return a&&(null===(n=a.uplink_table)||void 0===n?void 0:n.find(e=>e.mac===t.mac))&&e.push({value:t.mac,label:t.name||t.mac}),e},[])}),D=["uptime","rx_bytes","tx_bytes","rx_packets","tx_packets","rx_bytes-r","tx_bytes-r"],S=e=>Object(n.b)(n.c,(e,t)=>i()(Object(r.a)(e,D),Object(r.a)(t,D)))(Object(n.a)(t=>{var a,n,l,i,r,c,o;return(null===(o=(null===(n=null===(a=t.models[s.i])||void 0===a?void 0:a.byId)||void 0===n?void 0:n[e])||(null===(i=null===(l=t.models[s.j])||void 0===l?void 0:l.byId)||void 0===i?void 0:i[e])||(null===(c=null===(r=t.models[s.k])||void 0===r?void 0:r.byId)||void 0===c?void 0:c[e]))||void 0===o?void 0:o.record)||{}},b),e=>e),y=["uptime"],P=e=>Object(n.b)(n.c,(e,t)=>i()(Object(r.a)(e,y),Object(r.a)(t,y)))(Object(n.a)(t=>{var a,n,l;return(null===(l=null===(n=null===(a=t.models[s.i])||void 0===a?void 0:a.byId)||void 0===n?void 0:n[e])||void 0===l?void 0:l.record)||{}},Object(d.o)(e),(e,t)=>((e,t)=>{if(!e.id&&!t.id)return null;const a=Object.assign({},e,t),n={id:a.id,mac:a.mac,model:a.model,oui:a.oui,fingerprint:a.fingerprint,unifi_device_info:a.unifi_device_info,displayable_version:a.displayable_version,product_line:a.product_line,ip:a.ip,network_name:a.network_name,uplink_mac:a.uplink_mac,is_wired:a.is_wired,name:a.name,hostname:a.hostname,display_name:a.display_name,note:a.note,usergroup_id:a.usergroup_id,fixed_ip:a.fixed_ip,use_fixedip:a.use_fixedip,user_id:a.user_id,network_id:a.network_id,type:a.type,uptime:a.uptime,connected:Object(O.getIsClientConnected)(a),blocked:a.blocked,assoc_time:a.assoc_time};switch(n.type){case O.ClientType.WIRED:a.type===O.ClientType.WIRED&&(n.sw_port=a.sw_port);break;case O.ClientType.WIRELESS:a.type===O.ClientType.WIRELESS&&(n.wifi_experience_score=a.wifi_experience_score,n.signal=a.signal,n.radio=a.radio,n.essid=a.essid,n.fixed_ap_enabled=a.fixed_ap_enabled,n.fixed_ap_mac=a.fixed_ap_mac,n.radio=a.radio,n.radio_proto=a.radio_proto,n.channel=a.channel,n.mimo=a.mimo)}return n})(e,t)),e=>e),A=e=>Object(m.b)()(Object(n.a)(d.e,f(e),P(e),(e,t,a)=>{if(e){if(t&&"mac"in t)return{panel:I.c.DEVICE,activeItemPayload:t};if(a&&"mac"in a)return{panel:I.c.UNIFI_DEVICE_CLIENT,activeItemPayload:a}}return null}),e=>e),N=e=>Object(m.b)()(Object(n.a)(p.d,t=>t.find(t=>t.id===e)),e=>e),j=e=>Object(m.b)()(Object(n.a)(E.selectIspInfoItems,t=>t.find(({networkgroup:t})=>t===e)),e=>e)},571:function(e,t,a){"use strict";var n=a(0),l=a(4),i=a(59),r=a(490);t.a=(({client:e,props:t,children:a})=>{const{id:c}=e,o="uptime"in e&&e.uptime||"isUp"in e&&e.isUp;let s=i.a.ACTIVE;e.type===i.c.VPN?s=i.a.VPN:e.type===i.c.TELEPORT?s=i.a.TELEPORT:o||(s="blocked"in e&&e.blocked?i.a.BLOCKED:i.a.OFFLINE);const E=Object(n.useMemo)(()=>Object(r.i)(c,t,s),[c,s]);return a(Object(l.useSelector)(E))})},616:function(e,t,a){"use strict";a.d(t,"c",function(){return O}),a.d(t,"e",function(){return I}),a.d(t,"a",function(){return g}),a.d(t,"d",function(){return C}),a.d(t,"b",function(){return h}),a.d(t,"f",function(){return T});var n=a(0),l=a.n(n),i=a(865),r=a(3),c=a(1),o=a(47),s=a(132),E=a(500),m=a(234),d=a(6),_=a(5),u=a(90),b=a(1041);const p=Object(r.c)(o.a)`
  padding-left: 10px;
  color: inherit;
  font-size: inherit;
`,O=(e,t,a)=>{const{diagram:n}=Object(d.getDeviceSpecs)(e),r=[Object(d.isUdm)(e),Object(d.isUsAggPro)(e),Object(d.getIsInWallAp)(e)],o=n.length?Object(d.determineRowLayoutsFromDiagramConfig)(n,e):Object(d.determineRowLayoutsFromPortConfig)(e);return o?o.flat().reduce((n,o)=>{var u,O,I,g;if(!o)return n;const C=Object(d.getCurrentPortData)(o.portNumber,e);if(Object(i.a)(C))return n;const h=l.a.createElement(_.a,{alignItems:"center"},l.a.createElement(b.a,Object.assign({cellData:C,deviceData:e,style:{minWidth:20}},a)),l.a.createElement(p,{truncate:!0},C.port_idx)),T=l.a.createElement(_.a,{alignItems:"center"},l.a.createElement(b.a,Object.assign({cellData:C,deviceData:e,style:{minWidth:20}},a)),l.a.createElement(p,{truncate:!0},((e,t)=>{const a=Object(E.a)(t,d.switchAnomaliesMap),n=a.length;return n>1?l.a.createElement(c.b,{id:"COMMON_ERRORS",values:{errorCount:n}}):n?l.a.createElement(c.b,{id:a[0]+"_PROBLEM"}):t.poe_caps&&!Object(d.getIsUsl8Mp)(e)?Object(d.getPortPoeModeText)(t):t.up?Object(s.c)(1e3*(null==t?void 0:t.speed)*1e3/8,"bitrate")||l.a.createElement(c.b,{id:"DEVICE_PORT_STATE_CONNECTED"}):t.enable?l.a.createElement(c.b,{id:"DEVICE_PORT_STATE_DISCONNECTED"}):l.a.createElement(c.b,{id:"DEVICE_PORT_STATE_DISABLED"})})(e,C))),v=Object(m.g)(C.ifname,e,t),f={...C,id:(null===(u=C.port_idx)||void 0===u?void 0:u.toString())||C.ifname,isWanPort:!(null===(O=null==v?void 0:v.id)||void 0===O?void 0:O.startsWith("LAN")),isLanPort:null===(I=null==v?void 0:v.id)||void 0===I?void 0:I.startsWith("LAN"),defaultNetworkGroupLabel:Object(d.getPortGroupLabel)(e,C),networkGroup:null==v?void 0:v.id,portSymbol:h,portStatus:T,disabled:C.masked};return r.every(e=>!e)&&(f.macFilters=null===(g=C.port_security_mac_address)||void 0===g?void 0:g.length),n.push(f),n},[]).sort(({port_idx:e},{port_idx:t})=>e-t):[]},I=(e,t,a)=>O(e,t,a).filter(e=>e.isWanPort),g=(e,t,a)=>O(e,t,a).filter(e=>e.isLanPort),C=(e,t,a)=>{const n=e.findIndex(e=>e.port_idx===t.port_idx),l=-1!==n?e.slice(n+1,n+a):[],i=(null==t?void 0:t.speed_caps)&~d.SPEED_CAPS.PORTSPEED_AUTO_NEG;return l.filter(({speed_caps:e,op_mode:t})=>e&i&&"switch"===t)},h=(e,t)=>t.map(e=>e.port_idx).filter((t,a)=>e+a+1===t),T=e=>{const{isPoeOffSupported:t,isPoePassthroughSupported:a,isPoePassive24Supported:n,isPoeAutoSupported:l}=e,i=[];return t&&i.push(u.d.OFF),a&&i.push(u.d.PASSTHROUGH),!a&&n&&i.push(u.d.PASSIVE_24V),!a&&l&&i.push(u.d.AUTO),i}},622:function(e,t,a){"use strict";var n,l,i,r,c,o;a.d(t,"c",function(){return n}),a.d(t,"e",function(){return l}),a.d(t,"a",function(){return i}),a.d(t,"b",function(){return r}),a.d(t,"d",function(){return o}),function(e){e.DEVICE_UNREACHABLE="DEVICE_UNREACHABLE",e.DEVICE_RECONNECTED="DEVICE_RECONNECTED",e.DEVICE_DISCOVERED="DEVICE_DISCOVERED",e.NETWORK_FAILED_OVER_TO_BACKUP_WAN="NETWORK_FAILED_OVER_TO_BACKUP_WAN",e.NETWORK_RETURNED_FROM_BACKUP_WAN="NETWORK_RETURNED_FROM_BACKUP_WAN",e.NETWORK_FAILED_OVER_TO_LTE="NETWORK_FAILED_OVER_TO_LTE",e.CLIENT_CONNECTED="CLIENT_CONNECTED",e.CLIENT_DISCONNECTED="CLIENT_DISCONNECTED",e.BULK_FIRMWARE_UPDATE_AVAILABLE="BULK_FIRMWARE_UPDATE_AVAILABLE"}(n||(n={})),function(e){e.ACTION="ACTION",e.DEVICE="DEVICE",e.DEVICE_POWER="DEVICE_POWER",e.DEVICE_FROM="DEVICE_FROM",e.DEVICE_TO="DEVICE_TO",e.CLIENT="CLIENT",e.ADMIN="ADMIN",e.USER="USER",e.NETWORK="NETWORK",e.WLAN="WLAN",e.NETWORK_OR_LAN="NETWORK_OR_LAN",e.CHANNEL="CHANNEL"}(l||(l={})),function(e){e.ADOPT_DEVICE_NOW="ADOPT_DEVICE_NOW",e.VIEW_YOUR_DEVICES="VIEW_YOUR_DEVICES",e.VIEW_ALL_CLIENTS="VIEW_ALL_CLIENTS",e.ENABLE_DHCP_AUTO_SCALING="ENABLE_DHCP_AUTO_SCALING",e.INSTALL_FIRMWARE_NOW="INSTALL_FIRMWARE_NOW",e.LEARN_MORE_ABOUT_THREAT_BLOCKING="LEARN_MORE_ABOUT_THREAT_BLOCKING",e.REVIEW_HOTSPOT="REVIEW_HOTSPOT",e.VIEW_IMPROVEMENTS="VIEW_IMPROVEMENTS",e.VIEW_ULTE_USAGE_AND_LIMIT_INFO="VIEW_ULTE_USAGE_AND_LIMIT_INFO",e.VIEW_ULTE_USAGE_OR_INCREASE="VIEW_ULTE_USAGE_OR_INCREASE",e.VIEW_CONNECTED_USERS_AND_DEVICES="VIEW_CONNECTED_USERS_AND_DEVICES"}(i||(i={})),function(e){e.PERFORMANCE="PERFORMANCE",e.SOFTWARE_UPDATE="SOFTWARE_UPDATE",e.SYSTEM="SYSTEM",e.TOPOLOGY="TOPOLOGY"}(r||(r={})),function(e){e.NEW="NEW",e.READ="READ"}(c||(c={})),function(e){e.INFO="INFO",e.WARNING="WARNING"}(o||(o={}))},626:function(e,t,a){"use strict";a.d(t,"d",function(){return E}),a.d(t,"c",function(){return m}),a.d(t,"b",function(){return d}),a.d(t,"f",function(){return _}),a.d(t,"g",function(){return u}),a.d(t,"e",function(){return b}),a.d(t,"a",function(){return p});var n=a(29),l=a(2598),i=a(99);const r=(e,t)=>Object(i.i)(Object(n.startOfMonth)(Object(n.addMonths)(e,1)),t),c=(e,t)=>Object(n.differenceInMinutes)(e,t)/5,o=(e,t)=>Object(n.subMinutes)(e,5*t),s=(e,t)=>new Date(e-1e3*t*60*60*24);function E(e,t,a,l,E=!1){function m(t,n,l,r){const c=Math.ceil(n(t,e))||0,o=c>8,s=c>32?c/32:1;return Array(Math.min(32,c)+1).fill(t).map((e,t)=>{const n=l(e,t*s);return{value:n.getTime(),label:o&&t%2==1?null:Object(i.e)(n,a,r)}}).reverse()}if(Object(n.differenceInYears)(t,e)>1)return m(r(t,a),n.differenceInMonths,n.subMonths,"MMM YYYY");if(Object(n.differenceInMonths)(t,e)>2)return m(r(t,a),n.differenceInMonths,n.subMonths,"MMM");if(Object(n.differenceInDays)(t,e)>10){const e=Date.now(),a=t.getTime()>e,r=Object(i.i)(new Date,"UTC"),c=l>r.getTime()?new Date(l):r;return m(a?c:t,n.differenceInDays,s,"MMM D")}if(Object(n.differenceInDays)(t,e)>2){const e=m(t,n.differenceInDays,n.subDays,"ddd"),r=Date.now(),c=t.getTime()>r,o=Object(i.i)(new Date,a);return c&&l>o.getTime()&&(e[e.length-1]={value:l,label:null}),e}return Object(n.differenceInHours)(t,e)>1?m(t,n.differenceInHours,n.subHours,E?"H:mm":"hA"):m(t,c,o,"h:mma")}function m(e,t){function a(a,l,i,r,c=null){const o=a(t,e)||0,s=o>8;return Array(o+1).fill(e).map((t,a)=>{const o=i(l(e),a);return{value:o.getTime(),label:s&&a%2==1?null:Object(n.format)(o,r),tooltipLabel:Object(n.format)(o,c||r)}})}return Object(n.differenceInYears)(t,e)>1?a(n.differenceInMonths,n.startOfMonth,n.addMonths,"MMM YYYY"):Object(n.differenceInMonths)(t,e)>2?a(n.differenceInMonths,n.startOfMonth,n.addMonths,"MMM"):Object(n.differenceInDays)(t,e)>10?a(n.differenceInDays,n.startOfDay,n.addDays,"MMM D"):Object(n.differenceInDays)(t,e)>2?a(n.differenceInDays,n.startOfDay,n.addDays,"ddd","ddd ha"):Object(n.differenceInHours)(t,e)>1?a(n.differenceInHours,n.startOfHour,n.addHours,"ha","ddd ha"):a(n.differenceInMinutes,n.startOfMinute,n.addMinutes,"h:ma","ddd h:ma")}function d(e,t){return[{label:Object(n.format)(e,t),value:e},{label:Object(n.format)(Object(n.subHours)(e,4),t),value:Object(n.subHours)(e,4).getTime()},{label:Object(n.format)(Object(n.subHours)(e,8),t),value:Object(n.subHours)(e,8).getTime()},{label:Object(n.format)(Object(n.subHours)(e,12),t),value:Object(n.subHours)(e,12).getTime()},{label:Object(n.format)(Object(n.subHours)(e,16),t),value:Object(n.subHours)(e,16).getTime()},{label:Object(n.format)(Object(n.subHours)(e,20),t),value:Object(n.subHours)(e,20).getTime()},{label:Object(n.format)(Object(n.subHours)(e,24),t),value:Object(n.subHours)(e,24).getTime()}].reverse()}const _=(e,t,a,r=!1)=>{const c=r?"H:mm":"h:mm A",o=Object(n.startOfHour)(Object(n.addMinutes)(t,55));return Object(l.a)(25,t=>{const l=Object(n.subHours)(o,t).getTime(),r=0===t?e.formatMessage({id:"COMMON_GRANUALITY_0"}):Object(i.e)(l,a,c);return{label:t%6==0?r:null,value:l}}).reverse()};function u(e,t,a){const n=(10,l=t-e,Math.log(l)/Math.log(10)-1);var l;const i=n>0?Math.ceil(n):Math.floor(n),r=10**i,c=Math.ceil((t-e)/r)/(a-2)*r,o=Math.abs(i),s=[];let E=Math.round(e/r)*r;for(;E<t+2*c;E+=c)s.push({label:0===E?"0":E.toFixed(o),value:E});return s.reverse()}const b=(e,t)=>{const a=t-1;let n=Math.ceil(e);for(;n%a!=0;)n+=1;return Object(l.a)(t,e=>{const t=e?Math.ceil(e*(n/a)):0;return{value:t,label:String(t)}}).reverse()},p=(e,t)=>{let a=e;return t?a=a.replace(/a/i,""):(a=a.replace(/H/g,"h")).search(/a/i)<0&&(a+="A"),a}},665:function(e,t,a){"use strict";a.d(t,"a",function(){return r}),a.d(t,"b",function(){return c}),a.d(t,"c",function(){return o});var n=a(6),l=a(641),i=a(235);const r={[i.c.ELEMENTS]:{[i.a.GATEWAY]:e=>Object(n.isGateway)(e),[i.a.SWITCH]:e=>Object(n.isSwitch)(e)&&!Object(n.isSmartPower)(e),[i.a.ACCESS_POINT]:e=>Object(n.isAp)(e)&&!Object(n.isSmartPower)(e)&&!Object(n.isUlte)(e),[i.a.SMART_POWER]:e=>Object(n.isSmartPower)(e),[i.a.BUILDING_BRIDGE]:e=>Object(n.isUBB)(e),[i.a.ULTE]:e=>Object(n.isUlte)(e)},[i.c.STATUS]:{[i.b.ONLINE]:e=>{const t=Object(n.getDeviceState)(e);return[n.DeviceState.CONNECTED,n.DeviceState.UPGRADING,n.DeviceState.PROVISIONING,n.DeviceState.ADOPTING,n.DeviceState.DELETING,n.DeviceState.RESTARTING,n.DeviceState.RFSCANNING,n.DeviceState.HEARTBEAT_MISSED].some(e=>e===t)},[i.b.OFFLINE]:e=>{const t=Object(n.getDeviceState)(e);return[n.DeviceState.DISCONNECTED,n.DeviceState.INFORM_ERROR].some(e=>e===t)},[i.b.PENDING_ADOPTION]:e=>{const t=Object(n.getDeviceState)(e);return[n.DeviceState.PENDING,n.DeviceState.ADOPTION_REQUIRED,n.DeviceState.ADOPTION_FAILED,n.DeviceState.FIRMWARE_MISMATCH].some(e=>e===t)},[i.b.MANAGED_BY_ANOTHER_CONSOLE]:e=>Object(n.getDeviceState)(e)===n.DeviceState.MANAGED_BY_OTHER,[i.b.ISOLATED]:e=>Object(n.getDeviceState)(e)===n.DeviceState.ISOLATED}},c=(e,t)=>{const a={};return Object.entries(e).forEach(([e,n])=>{var l;a[e]=null===(l=null==n?void 0:n.some)||void 0===l?void 0:l.call(n,a=>{var n,l,i;return null!==(i=null===(l=null===(n=r[e])||void 0===n?void 0:n[a])||void 0===l?void 0:l.call(n,t))&&void 0!==i&&i})}),Object.values(a)},o=(e,t)=>{const a=Object(l.b)(e);return!Object.values(a).length||!c(a,t).every(Boolean)}},734:function(e,t,a){"use strict";var n=a(0),l=a.n(n),i=a(4),r=a(61),c=a(1),o=a(14),s=a(10),E=a(47),m=a(3),d=a(7),_=a(6),u=a(95),b=a(15),p=a(17),O=a(5),I=a(234),g=a(107),C=a(1644),h=a(1648),T=a(208),v=a(25),f=a(132),R=a(1201),D=a(94),S=a(11);const y=Object(m.c)(O.a,{shouldForwardProp:e=>"omitSpacing"!==e})`
  margin-bottom: 24px;
  ${({omitSpacing:e})=>!e&&"&:nth-of-type(3) {\n    padding-top: 24px;\n  }"}
`,P=Object(m.c)("div")`
  flex: 1;
  max-width: calc(50% - 8px);
`;var A=({activeItem:e,port:t,groupOptions:a,speedOptions:n,group:i,omitSpacing:r})=>{const c=!Object(_.isUsg)(e)&&!Object(_.isUxg)(e)&&!Object(D.j)(e),{ifname:o,portIdx:s}=t,{bindWith:E}=Object(I.c)(e,o),m=!!E&&E!==o,{ports:d}=Object(_.getDeviceSpecs)(e),u=Object(_.isUsg)(e)?d[o]:s;return l.a.createElement(y,{justifyContent:"space-between",omitSpacing:r},l.a.createElement(P,null,l.a.createElement(S.Field,{type:"dropdown",variant:"secondary",name:`ports[${s-1}].networkGroup`,label:Object(_.isUGW3)(e)||Object(_.isUGW4)(e)?"DEVICE_PROPERTIES_PORT_WITH_NUMBER_AND_NETWORK_GROUP_SHORT":"DEVICE_PROPERTIES_PORT_WITH_NUMBER_AND_NETWORK_GROUP",translateLabel:!0,translateLabelValues:{port:u,networkGroup:i},options:a,readOnly:c,validated:!0,full:!0})),n.length>0&&l.a.createElement(P,null,l.a.createElement(S.Field,{label:"DEVICE_PROPERTIES_GATEWAY_PORTS_SPEED_DUPLEX",name:`ports[${s-1}].speed`,type:"dropdown",variant:"secondary",full:!0,translateLabel:!0,translateOptions:!0,options:n,disabled:m})))};var N=Object(c.e)(({activeItem:e,ports:t,intl:a})=>{const{subPanelId:r}=Object(v.m)(),c=Object(i.useSelector)(b.selectNetworkGroups),o=Object(_.isUdmPro)(e)||Object(_.isUdmProSe)(e),s=Object(D.i)(e),E=Object(_.isUGW3)(e),m=Object(_.isUsg)(e),d=t=>{const{supportedValues:a=[]}=Object(I.c)(e,t.ifname);return a.filter(e=>!!R.a.linkNegotiationOptions[e]).map(e=>{const{speed:t=0,full_duplex:a=!1,autoneg:n}=R.a.linkNegotiationOptions[e],{value:l,unit:i}=Object(f.d)(1e6*t/8,"bitrate"),r=`${l}${i}`;return{label:n?"COMMON_DEVICE_AUTONEG_FULL":`COMMON_DEVICE_DUPLEX_${a?"FULL":"HALF"}_STRING`,value:JSON.stringify({speed:t,full_duplex:a}),values:!n&&{speed:r}}})},u=Object(n.useMemo)(()=>r!==g.b.WAN||s?c.filter(({id:e})=>e.startsWith("LAN")):[],[r,s,c]),p=e=>[...[...c.filter(({id:e})=>e.startsWith("WAN")&&e!==b.NetworkHiddenId.WAN_LTE_FAILOVER),...u].filter(({id:a})=>s&&!m&&!!a.startsWith("LAN")||((e,t,a)=>!t.some(({networkGroup:t})=>t===e)||e===a.networkGroup)(a,t,e)).map(({id:e})=>({value:e,label:e})),{value:_.DISABLED_PORT,label:a.formatMessage({id:"COMMON_DISABLED"})}],O=t.filter(({isWanPort:e,media:t})=>r!==g.b.WAN&&s?!_.SFP_MEDIA_TYPES.includes(t):e).sort((e,t)=>e.portIdx-t.portIdx),C=t.filter(({media:e})=>!(r===g.b.WAN&&!o||!s)&&_.SFP_MEDIA_TYPES.includes(e)),h=t.filter(e=>[8,9,10,11].includes(e.portIdx)),T=a.formatMessage({id:"COMMON_DISABLED"});return o&&s?l.a.createElement(l.a.Fragment,null,h.map(t=>l.a.createElement(A,{activeItem:e,port:t,groupOptions:p(t),speedOptions:d(t),group:t.media||t.defaultNetworkGroupLabel,key:t.portIdx,omitSpacing:!0}))):l.a.createElement(l.a.Fragment,null,O.map(t=>l.a.createElement(A,{activeItem:e,port:t,groupOptions:p(t),speedOptions:d(t),group:t.defaultNetworkGroupLabel||T,key:t.portIdx,omitSpacing:!E})),C.map(t=>l.a.createElement(A,{activeItem:e,port:t,groupOptions:p(t),speedOptions:d(t),group:t.media||t.defaultNetworkGroupLabel,key:t.portIdx,omitSpacing:!E})))});const j=Object(m.c)(O.a)`
  position: relative;
  margin: -18px -30px 40px;
  padding: 12px 0;
  border-bottom: 1px solid ${({theme:e})=>e.motifPalette.ui04};

  svg {
    position: absolute;
    left: 24px;
  }
`,x=Object(m.c)(T.a,{shouldForwardProp:e=>!["isFullPage"].includes(e)})`
  ${({isFullPage:e})=>e&&"\n    width: 100%;\n    justify-content: flex-end;  \n    gap:10px;\n  "};
`,L=Object(m.c)(C.a)`
  & > div > span {
    flex: 1;
  }
`,V=Object(m.c)(E.a)`
  width: 100%;
  text-align: center;
`,M=Object(m.c)(O.a)`
  width: 100%;
  padding: 16px 30px;
`,w=Object(m.c)(O.a)`
  margin-bottom: 24px;
`,F=Object(m.c)(s.b)`
  margin-right: 8px;
  color: ${({theme:e})=>e.motifPalette.warning};
`;var U=a(616);const k=Object(m.c)(O.a)`
  margin-bottom: 24px;
`,W=Object(m.c)(s.b)`
  margin-right: 8px;
  color: ${({theme:e})=>e.motifPalette.danger};
`,B=Object(o.f)({mapPropsToValues:e=>{const{networkGroups:t,activeItem:a}=e,n=Object(U.c)(a,t);return{ports:n.sort((e,t)=>e.portIdx-t.portIdx).map((e,t)=>{const{supportedValues:l=[],bindWith:i}=Object(I.c)(a,e.ifname),r=!e.autoneg&&e.speed&&e.full_duplex?{speed:e.speed,full_duplex:e.full_duplex}:{speed:0,full_duplex:!1};if(i){const e=n.find(e=>e.ifname===i);r.speed=e.speed,r.full_duplex=e.full_duplex}const c=JSON.stringify(r);return{...e,networkGroup:e.networkGroup||_.DISABLED_PORT,...l.length?{speed:c}:{},itemIndex:t}})}},validationSchema:({intl:e,activeItem:t,params:a})=>{const n=(null==a?void 0:a.subPanelId)===g.b.ALL;return d.a.object().shape({ports:d.a.array().of(d.a.object().shape({networkGroup:d.a.string().label(e.formatMessage({id:"COMMON_WORD_INTERFACE"})).oneOf([u.a.WAN,u.a.WAN2,_.DISABLED_PORT,...Object(I.a)(t)]).required()})).test("has-default-network-groups",l.a.createElement(k,null,l.a.createElement(W,{width:19,height:19}),l.a.createElement(E.a,null,l.a.createElement(c.b,{id:n?"DEVICE_PORTS_TABLE_CONFIGURE_INTERFACES_NO_WAN_OR_LAN_WARNING":"DEVICE_PORTS_TABLE_CONFIGURE_INTERFACES_NO_WAN_WARNING"}))),e=>e.some(e=>e.networkGroup===u.a.WAN)&&(!n||e.some(e=>e.networkGroup===b.NetworkHiddenId.LAN)))})},handleSubmit:({ports:e},{props:{networkGroups:t,updateDeviceWithIdEndpoint:a,activeItem:{_id:n,port_overrides:l=[],ethernet_table:i,mac:r},activeItem:c,history:o,intl:s}})=>{const E=Object(U.c)(c,t),m=s.formatMessage({id:"DEVICE_PROPERTY_HEADER_PORTS"}),d=[...e.map(e=>{const{speed:t,full_duplex:a}=JSON.parse(e.speed),{speed:n,full_duplex:i,...r}=(null==l?void 0:l.find(t=>t.port_idx===e.portIdx))||{};return{...r,...t?{speed:t,full_duplex:a}:{},port_idx:e.portIdx,autoneg:!t}}),...null==l?void 0:l.filter(t=>!e.some(e=>e.portIdx===t.port_idx))],u=[];E.forEach(t=>{const a=e.find(e=>e.ifname===t.ifname);if(a){if(a.networkGroup===_.DISABLED_PORT)return;u.push({ifname:a.ifname,networkgroup:a.networkGroup})}else u.push({ifname:t.ifname,networkgroup:t.networkGroup})}),a({port_overrides:d,ethernet_overrides:u},n,r,{successToast:{icon:p.a.success,message:"DEVICE_PORT_FORM_SAVE_SUCCESS"},failureToast:{icon:p.a.danger,message:"DEVICE_NOTICE_SAVE_ERROR",values:{section:m}},mergeAndOverrideKeys:["port_overrides","ethernet_overrides"],extend:!0}).then(()=>{o.goBack()})}}),z={updateDeviceWithIdEndpoint:_.updateDeviceWithIdEndpoint};t.a=Object(r.compose)(Object(i.connect)(e=>({networkGroups:Object(b.selectNetworkGroups)(e)}),z),c.e,B)(function({activeItem:e,history:t,submitForm:a,resetForm:r,values:o,dirty:m,setFieldValue:d,errors:u,isFullPage:p}){const O=Object(i.useSelector)(b.selectNetworkGroups),{networkGroups:I}=Object(_.getDeviceSpecs)(e),g=()=>{r(),t.goBack()},C=Object(n.useMemo)(()=>o.ports.some(e=>JSON.parse(e.speed||"{}").speed),[o.ports]);return l.a.createElement(l.a.Fragment,null,l.a.createElement(M,{flexDirection:"column",flex:"1 1 85%"},p?l.a.createElement(h.a,{padding:"none"},l.a.createElement(L,{title:l.a.createElement(c.b,{id:"DEVICE_PORTS_TABLE_CONFIGURE_INTERFACES"}),hideUnderline:!0})):l.a.createElement(j,{alignItems:"center"},l.a.createElement(s.f,{onClick:g,style:{cursor:"pointer"}}),l.a.createElement(V,{size:"body",weight:"bold"},l.a.createElement(c.b,{id:"DEVICE_PORTS_TABLE_CONFIGURE_INTERFACES"}))),l.a.createElement(N,{activeItem:e,ports:o.ports}),l.a.isValidElement(u.ports)&&u.ports,C&&l.a.createElement(w,null,l.a.createElement(F,{width:19,height:19}),l.a.createElement(E.a,{size:"body"},l.a.createElement(c.b,{id:"DEVICE_PORTS_TABLE_CONFIGURE_INTERFACES_SPEED_WARNING"})))),l.a.createElement(x,{isDirty:m,onFormSubmit:a,onFormCancel:g,onFormReset:()=>{d("ports",o.ports.map(e=>{const t=O.find(t=>t.id===I[e.ifname]);return{...e,networkGroup:(null==t?void 0:t.id)||_.DISABLED_PORT,autoneg:!0,speed:JSON.stringify({speed:0,full_duplex:!1})}}))},submitButtonText:p?null:"COMMON_ACTION_APPLY",allowCancel:!0,isFullPage:!!p}))})},736:function(e,t,a){"use strict";var n=a(1654);a.d(t,"fetchSession",function(){return n.a});var l=a(1172);a.d(t,"MODEL",function(){return l.b});var i=a(1169);a.d(t,"selectFormattedSessionData",function(){return i.a}),a(2614)},746:function(e,t,a){"use strict";a.d(t,"a",function(){return o}),a.d(t,"c",function(){return s}),a.d(t,"b",function(){return E});var n=a(3),l=a(474),i=a(47),r=a(34),c=a(5);const o=Object(n.c)(l.a,{shouldForwardProp:e=>"customColor"!==e})`
  background-color: ${({customColor:e})=>e};
  margin-right: 18px;
  margin-left: 8px;
`,s=(Object(n.c)(i.a)`
  max-width: calc(100% - 18px);
`,Object(n.c)(c.a)`
  width: 100%;
  max-width: 616px;
  margin-top: 32px;
  @media ${r.a.VIEWPORT_S_UP} {
    margin-top: 18px;
  }
  @media ${r.a.VIEWPORT_M_UP} {
    margin-top: 8px;
  }
  @media ${r.a.VIEWPORT_XXL_UP} {
  }
  @media ${r.a.VIEWPORT_XXXL_UP} {
  }
`),E=Object(n.c)("div")`
  height: 100%;
  width: 100%;
  thead {
    tr {
      height: 32px;
    }
  }
  th {
    border: 0 !important;
    span {
      font-weight: bold;
      font-size: 14px;
      line-height: 24px;

      @media ${r.a.VIEWPORT_XXL_DOWN} {
        font-size: 10px !important;
        line-height: 16px;
      }
    }
  }
  thead {
    tr {
      height: 48px !important;
      margin-bottom: 18px;
      border: 0 !important;

      @media ${r.a.VIEWPORT_XXL_DOWN} {
        background-color: transparent !important;
        height: 34px !important;
        margin-bottom: 4px;
      }
    }
  }
  tbody {
    tr {
      border: 0 !important;
      background-color: transparent !important;
    }
  }
  tr {
    @media ${r.a.VIEWPORT_L_DOWN} {
      min-height: 24px !important;
      height: 24px !important;
    }

    td {
      border-top-width: 0 !important;
      border-bottom-width: 0 !important;
    }
  }

  > div > div {
    svg {
      color: ${({theme:e})=>e.motifPalette.info};
    }
    span {
      font-size: 16px;
      @media ${r.a.VIEWPORT_XXL_DOWN} {
        font-size: 14px;
      }
    }
  }
`;Object(n.c)(i.a)`
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;

  @media ${r.a.VIEWPORT_XL_DOWN} {
    font-size: 10px;
  }
`},755:function(e,t,a){"use strict";a.d(t,"c",function(){return n}),a.d(t,"e",function(){return l}),a.d(t,"d",function(){return i}),a.d(t,"b",function(){return r}),a.d(t,"a",function(){return c}),a.d(t,"f",function(){return o});const n="stadpi",l="stadpi",i="/api/s/{site}/stat/stadpi",r="by_app",c=8,o=65535},854:function(e,t,a){"use strict";a.d(t,"c",function(){return n}),a.d(t,"d",function(){return l}),a.d(t,"e",function(){return i}),a.d(t,"b",function(){return r}),a.d(t,"a",function(){return c}),a.d(t,"f",function(){return o});const n="unifiCare",l="/v2/api/unifi-care/details",i="unifiCare",r="/v2/api/unifi-care/device/{mac}/dismiss-activation-notice",c="put",o={DISMISS_UNIFI_CARE_ACTIVATION_SUCCESS:"ace/DISMISS_UNIFI_CARE_ACTIVATION_SUCCESS",DISMISS_UNIFI_CARE_ACTIVATION_ERROR:"ace/DISMISS_UNIFI_CARE_ACTIVATION_ERROR"};var s;!function(e){e.ASSIGNED="ASSIGNED",e.AVAILABLE="AVAILABLE",e.NOT_AVAILABLE="NOT_AVAILABLE",e.RMA_IN_PROGRESS="RMA_IN_PROGRESS",e.REPLACING="REPLACING",e.REVOKED="REVOKED"}(s||(s={}))},86:function(e,t,a){"use strict";a.d(t,"a",function(){return E}),a.d(t,"c",function(){return c}),a.d(t,"b",function(){return o});var n=a(0),l=a.n(n),i=a(3),r=a(55);const c="#dbdce1",o="#232323",s=Object(i.c)("div")`
  ${({height:e})=>void 0!==e?`height: ${Number.isNaN(Number(e))?e:e+"px"};`:""}
  ${({borderRadius:e=2})=>`border-radius: ${e}px; `}
  ${({width:e})=>void 0!==e?`width: ${Number.isNaN(Number(e))?e:e+"px"};`:""}
    ${({margin:e})=>void 0!==e?"margin: "+e:""}
  ${({marginTop:e})=>void 0!==e?`margin-top: ${Number.isNaN(Number(e))?e:e+"px"};`:""}
  ${({marginRight:e})=>void 0!==e?`margin-right: ${Number.isNaN(Number(e))?e:e+"px"};`:""}
  ${({marginBottom:e})=>void 0!==e?`margin-bottom: ${Number.isNaN(Number(e))?e:e+"px"};`:""}
  ${({marginLeft:e})=>void 0!==e?`margin-left: ${Number.isNaN(Number(e))?e:e+"px"};`:""}
  ${({aspectRatio:e})=>e&&"padding-top: "+(e=>{switch(e){case"4:1":return"25%";case"3:1":return"33.33%";case"16:9":return"56.25%";case"3:2":return"66.66%";case"4:3":return"75%;";default:return"0"}})(e)};
  background: ${({motif:e})=>"dark"===e?o:c};
`;var E=({aspectRatio:e,width:t,height:a,borderRadius:n,margin:i,marginTop:c,marginRight:o,marginBottom:E,marginLeft:m})=>l.a.createElement(s,{motif:Object(r.a)().motif,aspectRatio:e,width:t,height:a,borderRadius:n,margin:i,marginTop:c,marginRight:o,marginBottom:E,marginLeft:m})},866:function(e,t,a){"use strict";a.d(t,"d",function(){return f}),a.d(t,"n",function(){return R}),a.d(t,"l",function(){return D}),a.d(t,"i",function(){return S}),a.d(t,"k",function(){return P}),a.d(t,"e",function(){return A}),a.d(t,"j",function(){return j}),a.d(t,"f",function(){return x}),a.d(t,"g",function(){return L}),a.d(t,"a",function(){return V}),a.d(t,"m",function(){return M}),a.d(t,"c",function(){return w}),a.d(t,"b",function(){return F}),a.d(t,"o",function(){return U}),a.d(t,"h",function(){return k});var n=a(29),l=a(9),i=a(1651),r=a(288),c=a(169),o=a(947),s=a(8),E=a(168),m=a(41),d=a(69),_=a(356),u=a(89),b=a(20),p=a(285),O=a(194),I=a(123),g=a(54),C=a(16),h=a(1675),T=a(1677),v=a(1672);const f=Object(l.a)(e=>e.threat,e=>({startDate:e.startDate,endDate:e.endDate,preset:e.preset})),R=Object(l.a)(r.b,e=>[e["24_HOURS"],e["1W"]]),D=(Object(l.a)(f,R,(e,t)=>{const{startDate:a,endDate:l}=e;return t.map(e=>{const t=e.getRange(new Date);return{...e,range:t,selected:Object(n.isEqual)(a,t.startDate)&&Object(n.isEqual)(l,t.endDate)}})}),Object(p.b)(O.a.THREAT_MANAGEMENT,I.a.THREAT_MANAGEMENT_EVENT_TIMELINE,v.d,!0)),S=e=>{var t;return(null===(t=null==e?void 0:e.threat)||void 0===t?void 0:t.eventTimelinePageNumber)||1},y=Object(l.a)(E.j,f,(e,t)=>{const a=new Date(t.startDate).getTime(),n=new Date(t.endDate).getTime();return e.filter(({time:e})=>!(e<a||e>n))}),P=Object(l.a)(y,D,C.selectIpsSettings,(e,t,a)=>a.ips_mode!==C.IpsMode.DISABLED&&t.threats?e.filter(({time:e,flow:a,dst_mac:n,src_mac:l,inner_alert_severity:i})=>{var r,c;if(!t.severity[i])return!1;const o=(null!==(r=null==a?void 0:a.bytes_toclient)&&void 0!==r?r:0)+(null!==(c=null==a?void 0:a.bytes_toserver)&&void 0!==c?c:0);return!(t.transferSizeEnabled&&t.transferSizeMin>v.d.transferSizeMin&&(t.transferSizeMin>o||t.transferSizeMax<o)||t.client&&![n,l].includes(t.client))}):[]),A=Object(l.a)(E.i,f,D,(e,t,a)=>{if(a.client||!a.threats)return[];const n=Math.round(new Date(t.startDate).getTime()/1e3),l=Math.round(new Date(t.endDate).getTime()/1e3);return e.filter(({timestamp:e})=>!(e<n||e>l))}),N=(Object(g.b)()(Object(l.a)(y,C.selectIpsSettings,(e,t)=>t.ips_mode===C.IpsMode.DISABLED?[]:e),e=>e),Object(n.subDays)(Object(n.startOfDay)(new Date),7).getTime()/1e3),j=Object(g.b)()(Object(l.a)(u.selectCombinedClientsData,e=>{const t={};return e.filter(e=>e.type!==u.ClientType.VPN&&e.type!==u.ClientType.TELEPORT&&!e.unifi_device&&e.last_seen>N).forEach(e=>{t[e.mac]={mac:e.mac,name:Object(u.getClientName)(e),fingerprint:null==e?void 0:e.fingerprint,ip:(null==e?void 0:e.ip)||(null==e?void 0:e.fixed_ip)||"-",oui:null==e?void 0:e.oui,type:null==e?void 0:e.type}}),Object.values(t)}),e=>e),x=Object(l.a)(D,j,(e,t)=>{var a;return(null==e?void 0:e.client)&&(null===(a=t.find(({mac:t})=>e.client===t))||void 0===a?void 0:a.type)===u.ClientType.WIRELESS||!1}),L=(Object(l.a)(y,e=>{const t=Object(h.a)(Object(i.a)(e,"src_mac")).sort((e,t)=>t.count-e.count),a=t.findIndex(e=>!e.mac);if(a>=0&&a<4){const[e]=t.splice(a,1);t.push(e)}const n=t.length>4?4:t.length-Number(a>=0);return{top:t.slice(0,n).map((e,t)=>Object.assign(e,{color:Object(_.getColorFromScheme)(Object(_.getIndexColorScheme)(t),5)})),others:t.slice(n).reduce((e,t)=>{var a,n;return{mac:"",count:e.count+(null!==(a=null==t?void 0:t.count)&&void 0!==a?a:0),activity:e.activity+(null!==(n=null==t?void 0:t.activity)&&void 0!==n?n:0),color:e.color}},{mac:"",count:0,activity:0,color:Object(_.getColorFromScheme)(Object(_.getIndexColorScheme)(0),9)}),total:e.length}}),Object(l.a)(y,e=>{const t=Object(h.b)(Object(i.a)(e,({http:e})=>null==e?void 0:e.hostname)).sort((e,t)=>t.count-e.count),a=t.findIndex(e=>"Unknown"===e.domain);if(a>=0&&a<4){const[e]=t.splice(a,1);t.push(e)}const n=t.length>4?4:t.length-Number(a>=0);return t.slice(0,n||4)}),Object(l.a)(b.q,e=>e?T.c.STYLE_URL_DARK:T.c.STYLE_URL)),V=()=>(e,t)=>{const a=t(),n=D(a),{preset:l}=f(a),i=l===c.a["24_HOURS"]?o.c.DAY:o.c.WEEK;return n.client?e(Object(o.d)({queryParams:{period:i,clientMac:n.client}},{crudCacheStrategy:{type:s.a.CACHE}})):e(Object(o.e)({queryParams:{period:i}},{crudCacheStrategy:{type:s.a.CACHE}}))},M=e=>Object(g.b)()(Object(l.a)(t=>{var a,l,i,r,c,s;const E=D(t),m=null==E?void 0:E.client,d=Number(e);if(m){const e=`${Object(n.subHours)(new Date,24).getTime()<d?o.c.DAY:o.c.WEEK}_${m}`,c=(null===(r=null===(i=null===(l=null===(a=t.models[o.a])||void 0===a?void 0:a.byId)||void 0===l?void 0:l[e])||void 0===i?void 0:i.record)||void 0===r?void 0:r.data)||{};return Object.values(c).find(e=>Number(null==e?void 0:e.start_timestamp)===d)}const _=(null===(c=t.models[o.b])||void 0===c?void 0:c.byId)||{};return null===(s=Object.values(_).find(e=>{var t;return Number(null===(t=null==e?void 0:e.record)||void 0===t?void 0:t.start_timestamp)===d}))||void 0===s?void 0:s.record},e=>e),e=>e),w=(Object(l.a)(E.k,f,E.j,(e,{startDate:t,endDate:a},l)=>{let i=Object(s.v)(Object(E.f)(t,a),e).data;return Object(n.isAfter)(a,Date.now())&&(i=i.concat(l)),i.map(e=>{const{catname:t,dstipCountry:a,dstipGeo:n,src_ip:l,inner_alert_severity:i}=e;return{...e,category:t,countryCode:a,countryName:n&&(null==n?void 0:n.country_name)||"Unknown",ip:l,severity:E.l[i]}}).sort((e,t)=>e.time-t.time)}),Object(l.a)(y,m.selectFirewallRulesData,(e,t)=>{const a=[];return e.forEach(e=>{const{src_ip:n,dest_ip:l}=e;Object(d.f)(n)&&Object(d.f)(l)?t.some(e=>{const{src_address:t,dst_address:a}=e;return t===n&&a===l||t===l&&a===n})&&a.push(e):t.some(e=>{const{src_address_ipv6:t,dst_address_ipv6:a}=e;return t===n&&a===l||t===l&&a===n})&&a.push(e)}),a})),F=Object(l.a)(y,m.selectFirewallRulesData,(e,t)=>{const a=[];return e.forEach(e=>{const{src_ip:n,dest_ip:l}=e;Object(d.f)(n)&&Object(d.f)(l)?t.some(e=>{const{src_address:t,dst_address:a}=e;return t===n&&!a||a===n&&!t})&&a.push(e):t.some(e=>{const{src_address_ipv6:t,dst_address_ipv6:a}=e;return t===n&&a===l||t===l&&a===n})&&a.push(e)}),a}),U=Object(l.a)(y,C.selectIpsSettings,(e,t)=>{const a=[],{suppression:{whitelist:n}}=t;return e.forEach(e=>{const{src_ip:t}=e;n.some(({value:e,mode:a})=>e===t&&"ip"===a)&&a.push(e)}),a}),k=Object(l.a)(y,C.selectIpsSettings,(e,t)=>{const a=[],{suppression:{alerts:n}}=t;return e.forEach(e=>{const{src_ip:t}=e;n.some(({tracking:e})=>e.some(({value:e,mode:a})=>e===t&&"ip"===a))&&a.push(e)}),a})},908:function(e,t,a){"use strict";a.d(t,"a",function(){return n});const n={large:{threshold:12,size:"20px",spacing:"8px",tooltipOffset:"15px"},medium:{threshold:15,size:"16px",spacing:"6px",tooltipOffset:"17px"},small:{threshold:20,size:"12px",spacing:"4px",tooltipOffset:"19px"},xsmall:{threshold:28,size:"10px",spacing:"2px",tooltipOffset:"20px"}}},947:function(e,t,a){"use strict";a.d(t,"e",function(){return o}),a.d(t,"d",function(){return s}),a.d(t,"b",function(){return i}),a.d(t,"a",function(){return r}),a.d(t,"h",function(){return _}),a.d(t,"i",function(){return b}),a.d(t,"g",function(){return p}),a.d(t,"f",function(){return O}),a.d(t,"c",function(){return c});var n=a(8);const l="trafficStats",i="trafficStatsDpi",r="clientTrafficStatsDpi";var c;!function(e){e.DAY="DAY",e.WEEK="WEEK"}(c||(c={}));const o=(e={queryParams:{period:c.DAY}},t)=>Object(n.q)([{model:l,payload:e=>e},{model:i,payload:e=>e.flatMap(({traffic_breakdown:e})=>e)}],"/v2/api/site/{site}/latest-traffic",e,{idField:({start_timestamp:e,end_timestamp:t,usage_by_app:a})=>a?e:`${e}_${t}`,...t}),s=(e,t)=>Object(n.q)([{model:"clientTrafficStats",payload:t=>[{data:t.reduce((e,t)=>(e[`${t.start_timestamp}_${t.end_timestamp}`]=t,e),{})||{},mac:e.queryParams.clientMac}]},{model:r,payload:t=>[{data:t.flatMap(({traffic_breakdown:e})=>e).reduce((e,t)=>(e[""+t.start_timestamp]=t,e),{}),mac:e.queryParams.clientMac}]}],"/v2/api/site/{site}/latest-client-traffic",e,{idField:({mac:t})=>`${e.queryParams.period}_${t}`,...t});var E=a(9),m=a(27),d=a(54);const _=(e=c.DAY)=>Object(E.a)(((e=c.DAY)=>Object(d.b)((e,t)=>(null==e?void 0:e.lastFetchTime)===(null==t?void 0:t.lastFetchTime))(({models:t})=>Object(n.w)(l,t,{queryParams:{period:e}}),e=>e))(e),m.c),u=({models:e})=>Object(n.w)(l,e,{queryParams:{period:c.WEEK}}),b=e=>Object(E.a)(u,t=>Object(m.c)(t).filter(t=>t.start_timestamp===e)),p=(e,t=c.DAY)=>Object(E.a)(((e,t=c.DAY)=>({models:a})=>Object(n.w)("clientTrafficStats",a,{queryParams:{period:t,clientMac:e}},{idField:({mac:e})=>`${t}_${e}`}))(e,t),e=>{var t,a,n;return Object.values(null!==(n=null===(a=null===(t=Object(m.c)(e))||void 0===t?void 0:t[0])||void 0===a?void 0:a.data)&&void 0!==n?n:[])}),O=(e,t)=>Object(E.a)((e=>({models:t})=>Object(n.w)("clientTrafficStats",t,{queryParams:{period:c.WEEK,clientMac:e}},{idField:({mac:e})=>`${c.WEEK}_${e}`}))(e),e=>{var a,n,l;return Object.values(null!==(l=null===(n=null===(a=Object(m.c)(e))||void 0===a?void 0:a[0])||void 0===n?void 0:n.data)&&void 0!==l?l:[]).filter(e=>e.start_timestamp===t)})}}]);