"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[63820,89965],{48925:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(296540),i=n(217439),r=n(71479),o=n(454195),l=n(566723),s=n(968906),c=n(199582),E=n(311785),d=n(766624),m=n(294303),p=n(689965),A=n(242366);const _=(0,r.A)(p.A,(0,E.A)("isOutlined"))`
  border: ${({theme:e,isOutlined:t})=>`1px solid ${t?e.motifPalette.uBlue06:"transparent"}`};
`,u=({children:e,title:t,tooltip:n,tooltipProps:r,[c.L]:E,titleAction:p,isOutlined:u})=>a.createElement(_,{marginBottom:"none",...s.A.addDataTestId(E),isOutlined:u},a.createElement(m.A,{flexDirection:"column",gap:l.Ln,width:"100%",minHeight:o.b},t?a.createElement(m.A,{alignItems:"center",gap:l.YC,justifyContent:"space-between",width:"100%"},a.createElement(m.A,{gap:l.YC,alignItems:"center"},a.createElement(i.A,{variant:"heading-medium"},t),n?a.createElement(d.A,{description:n,portal:!0,...r}):null),p?a.createElement(m.A,null,p):null):null,e?a.createElement(A.A,null,e):null))},71265:(e,t,n)=>{n.d(t,{R:()=>d,k:()=>m});var a=n(280258),i=n(190497),r=n(953048),o=n(175522),l=n(936621),s=n(305988);const c=[...new Set([a.H,o.Q.join(o.A),r.Zt,l.F,i.nc,s.Vr])],E={numeric:!0,sensitivity:"base"},d=(e,t)=>{const n=[];for(let a=e;a<=t;a+=1)n.push({value:a,label:String(a)});return n},m=e=>({value:t,label:n},{value:a,label:i})=>c.includes(t?.toString())||c.includes(a?.toString())?1/0:n?.toString().localeCompare(i?.toString(),e,E)??-1},83604:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(296540),i=n(795342);const r=e=>a.createElement(i.A,{...e})},143748:(e,t,n)=>{n.d(t,{A:()=>p});var a=n(296540),i=n(888170),r=n(509796),o=n(125832);const l=16.5,s=.5,c=32,E=32;const d=(0,n(722860).c)(o.A);function m({motif:e="light",parent:t,expanded:n,child:o,hideLines:m,lastChild:p,rowHeight:A=E,onClick:_,position:u}){const T={width:"32px",height:1},h=i.Ay.motifs[e].neutral04;if(t)return a.createElement(r.A,{className:d("hierarchyGlyphIcon"),value:n?"minus":"plus",motif:e,isExpanded:n,onClick:_});if(m)return null;if((p||o)&&"top"===u){const e=A/2;return a.createElement("svg",{...T,height:e+s},a.createElement("line",{stroke:h,strokeWidth:1,x1:l,y1:s,x2:l,y2:e}),a.createElement("line",{stroke:h,strokeWidth:1,x1:l,y1:e,x2:c,y2:e}))}return p||o?a.createElement("svg",{...T},a.createElement("line",{stroke:h,strokeWidth:1,x1:"15.5",y1:"0.5",x2:"32",y2:"0.5"})):null}function p(e){const{className:t="",motif:n="light",hideCellBorder:i,tag:r="td",lastChild:o,expanded:l,parent:s,position:c="center",hideLines:E,...p}=e;return a.createElement(r,{className:d.concat(t)(!i&&"borderedCell",!i&&`borderedCell-${n}`,"hierarchyGlyph",`hierarchyGlyph-${n}`,l&&!E&&"hierarchyGlyph-expanded",o&&"hierarchyGlyph-lastChild",s&&"hierarchyGlyph-parent","top"===c&&"top")},a.createElement(m,{motif:n,lastChild:o,expanded:l,parent:s,position:c,...p}))}p.defaultProps={child:!1,lastChild:!1,expanded:!1,parent:!1,hideLines:!1,hideCellBorder:!1,motif:"light"}},174321:(e,t,n)=>{n.r(t),n.d(t,{default:()=>V});var a,i=n(469733),r=n(296540),o=n(162420),l=n(566723),s=n(224948),c=n(48925),E=n(294303),d=n(845030),m=n(699784),p=n(318568),A=n(67097),_=n(720284),u=n(468307),T=n(948770),h=n(879546),O=n(329109),I=n(71479),N=n(132196),C=n(83604),R=n(396660),g=n(249304),S=n(115829),P=n(905410),L=n(6176);!function(e){e.DEVICE_NAME="deviceName",e.OPTIMIZATION_CHANNEL_CHANGE="optimizationChannelChange"}(a||(a={}));var f=n(926318);const v=[{value:25},{value:50},{value:100,default:!0}],b={[a.DEVICE_NAME]:150},w={[a.DEVICE_NAME]:"COMMON_ACCESS_POINT",[a.OPTIMIZATION_CHANNEL_CHANGE]:"CHANNEL_AI_OPTIMIZATION"},D={padding:"0",width:"auto"},y=N.AH`
  [class^='cellInner__'] {
    overflow: visible;
  }
`,x=(0,I.A)(E.A)`
  flex-direction: column;
  width: 100%;
`,H={hierarchy:!1},k=N.AH`
  display: flex;
`,B=N.AH`
  max-width: unset;
`,M=({header:{id:e}})=>r.createElement(S.A,null,r.createElement(m.sA,{id:w[e]})),F=(0,r.memo)(({channel:e})=>0===e?r.createElement(m.sA,{id:"COMMON_AUTO"}):r.createElement(r.Fragment,null,e)),W=()=>{const e=(0,i.useSelector)(f.o),t=(0,r.useMemo)(()=>[{id:a.DEVICE_NAME,header:M,size:b[a.DEVICE_NAME],minSize:b[a.DEVICE_NAME],accessorFn:R.Fo,compare:(0,R.l0)(({device:e})=>e?.name),cell:({row:{original:{device:e}}})=>r.createElement(E.A,{width:"100%",flexDirection:"row",gap:l.kc,alignItems:"center"},r.createElement(L.A,{model:e?.model,width:20,className:(0,N.cx)([k,B])}),r.createElement(S.A,{variant:"body-primary"},e?.name))},{id:a.OPTIMIZATION_CHANNEL_CHANGE,header:M,accessorFn:R.Fo,compare:(0,R.l0)(({current_channel:e})=>e),cell:({row:{original:{previous_channel:e,current_channel:t}}})=>r.createElement(S.A,{variant:"body-primary"},r.createElement(F,{channel:e})," → ",r.createElement(F,{channel:t}))}],[]),[n,o]=(0,r.useState)(0),s=(0,r.useCallback)(({rowsPerPage:n,pageNumber:a})=>r.createElement(C.A,{columns:t,data:e,rowStyle:l.gc,initialExpanded:!0,columnVisibility:H,pageIndex:a,pageSize:n,rowClassName:y}),[e,t]);return r.createElement(x,{gap:l.Ln},r.createElement(E.A,{overflowX:"auto",height:"100%"},e.length?r.createElement(P.A,{wrapperFlexProps:D,itemCount:e.length,tableType:g.l.CHANNEL_AI_CHANGES_OVERVIEW,onRenderTable:s,onPageChanged:o,pageNumber:n,rowOptions:v}):null))},V=()=>{const e=(0,i.useDispatch)(),[t,n]=(0,r.useState)(!1),a=(0,i.useSelector)(A.QU),I=(0,i.useSelector)(A.mA),N=(0,i.useSelector)(A.b$),C=(0,i.useSelector)(A.kX),R=(0,r.useCallback)(()=>{e((0,T.Mo)(_.w[p.ez.CHANGES_OVERVIEW])),e((0,T.y2)(void 0)),e((0,T.CH)(void 0))},[e]),g=(0,r.useCallback)(()=>{e((0,d.K5)()),e((0,T.Vm)([...C]))},[e,C]);return(0,r.useEffect)(()=>()=>{R()},[R]),r.createElement(r.Fragment,null,r.createElement(E.A,{width:"100%",gap:l.Ln,flexDirection:"column"},r.createElement(s.A,{icon:r.createElement(o.A,{size:"original",variant:"fill",isActive:!0}),marginBottom:"0"},r.createElement(m.sA,{id:"CHANNEL_AI_OPTIMIZATION_SUMMARY_ALERT"})),r.createElement(c.A,null,r.createElement(W,null))),r.createElement(O.A,{onFormCancel:()=>{e((0,d.K5)())},onFormSubmit:()=>{n(!0),I===u.m.CACHED?e((0,h.Od)([N])).then(()=>{g()}):e((0,h.AP)(a)).then(()=>{g()})},isDirty:!0,hideCancelButton:!1,submitButtonText:"COMMON_ACTION_APPLY_CHANGES",form:"channel-ai-changes-overview",isSubmitting:t}))}},175522:(e,t,n)=>{n.d(t,{A:()=>i,Q:()=>r});var a=n(416348);const i="_",r=[a.ZM,a.Je]},199582:(e,t,n)=>{n.d(t,{L:()=>a});const a="data-testid"},200826:(e,t,n)=>{n.d(t,{A:()=>A});var a=n(469733),i=n(296540),r=n(429252),o=n.n(r),l=n(198494),s=n(415246),c=n(305988),E=n(789768),d=n(249304);const m=Object.keys(d.l).reduce((e,t)=>(e[t]=!1,e),{}),p=e=>{const t=(0,a.useDispatch)(),n=(0,a.useSelector)(l.Bm);return(0,i.useEffect)(()=>{if(!m[e]){m[e]=!0;const a=c.W2[s.xz.TABLES][e],i=n[e]||{},r=a?.initialColumnSnapshot;if(r){const n={...i?.initialColumnSnapshot},a=[...i.initialColumns||[]];if(Object.keys(n).length)Object.entries(r).forEach(([e,t])=>{e in n||(n[e]=t)}),Object.entries(n).forEach(([e,t])=>{!a.includes(e)&&t&&a.push(e)}),o()(a,i.initialColumns)||t((0,E.yT)(e,{initialColumns:Array.from(new Set([...a,...i.initialColumns])),initialColumnSnapshot:n}));else if(a.length){const n=a.reduce((e,t)=>(e[t]=!0,e),{});t((0,E.yT)(e,{initialColumnSnapshot:n,initialColumns:Object.keys(n)}))}}}},[t,e,n]),null},A=e=>{p(e);return(0,a.useSelector)((0,i.useMemo)(()=>(0,l.h)(e),[e]))}},224948:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(296540),i=n(217439),r=n(71479),o=n(566723),l=n(294303),s=n(689965);const c=(0,r.A)("div")`
  margin-right: ${o.kc};
`,E=(0,r.A)("div")`
  margin-left: ${o.kc};
`,d=({icon:e,closeIcon:t,nested:n,children:r,...o})=>a.createElement(s.A,{nested:n,...o},a.createElement(l.A,null,a.createElement(c,null,e),a.createElement(i.A,{size:"medium"},r),t?a.createElement(E,null,t):null))},242366:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(296540),i=n(566723),r=n(294303);const o=(0,a.forwardRef)((e,t)=>a.createElement(r.A,{ref:t,flexDirection:"column",gap:i.kc,width:"100%",...e}))},284428:(e,t,n)=>{n.d(t,{Im:()=>s,iL:()=>c,mQ:()=>o,pv:()=>r,q:()=>l});var a=n(296540),i=n(451449);function r(){return(0,a.useContext)(i.I)}function o(){return r().fields}function l(){return r().tooltipPopovers}function s(){return r().tooltipIcons}function c(){return r().labels}},329109:(e,t,n)=>{n.d(t,{A:()=>E});var a=n(296540),i=n(691441),r=n(71479),o=n(132196),l=n(373229);const s=(0,r.A)("div")`
  height: 66px;
`,c=o.AH`
  padding: 0px !important;
`,E=({isDirty:e,onFormSubmit:t,onFormCancel:n,isInvalid:r,...o})=>e?a.createElement(i.A,null,a.createElement(l.A,{isDirty:e,onFormCancel:n,onFormSubmit:t,isInvalid:r,className:c,...o})):a.createElement(s,null)},362412:(e,t,n)=>{n.d(t,{A:()=>d});var a=n(469733),i=n(296540),r=n(436331),o=n(805837),l=n(282556),s=n(71265);const c=e=>i.createElement(r.A,{renderOption:o.q,...e}),E=e=>i.createElement(c,{...e});E.Sorted=e=>{const t=(0,a.useSelector)(l.zi),n=(0,i.useMemo)(()=>(0,s.k)(t),[t]);return i.createElement(c,{...e,sortBy:n})};const d=E},373229:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(296540),i=n(758649),r=n(71479),o=n(566723),l=n(699784);const s=(0,r.A)("footer",{shouldForwardProp:e=>"hasFormResetButton"!==e})`
  display: flex;
  justify-content: ${({hasFormResetButton:e})=>e?"space-between":"flex-end"};
  padding: ${o.S2} ${o.fS};
  gap: ${o.kc};
`,c=({allowCancel:e,isDirty:t,isInvalid:n,isSubmitting:r,onFormSubmit:o,onFormReset:c,onFormCancel:E,className:d,submitButtonText:m,customButton:p,applyButton:A,applyButtonFirst:_,hideCancelButton:u,form:T})=>{const h=(0,a.useMemo)(()=>A||a.createElement(i.A,{name:"submit",variant:"primary",type:"submit",onClick:o,disabled:!t||n||r,form:T},a.createElement(l.sA,{id:m||"COMMON_ACTION_APPLY_CHANGES"})),[A,T,t,n,r,o,m]);return a.createElement(s,{className:d,hasFormResetButton:!!c},_?h:p,u?null:a.createElement(i.A,{name:"cancel",variant:"default",type:"button",onClick:E,disabled:!e&&!t},a.createElement(l.sA,{id:"COMMON_ACTION_CANCEL"})),c?a.createElement(i.A,{name:"reset",variant:"default",type:"button",onClick:c,disabled:!t},a.createElement(l.sA,{id:"COMMON_ACTION_RESET_TO_DEFAULTS"})):null,_?p:h)}},383725:(e,t,n)=>{var a;n.d(t,{b:()=>a}),function(e){e.DASHBOARD_WAN_GRAPH="dashboard-wan-graph",e.DASHBOARD_WIFI_GRAPH="dashboard-wifi-graph",e.DASHBOARD_FLOWS_GRAPH="dashboard-flows-graph",e.DASHBOARD_PANEL_LIVE_ACTIVITY="dashboard-panel-live-activity",e.DASHBOARD_PANEL_SPEED_TEST_ACTIVITY="dashboard-panel-speed-test-activity",e.INTERNET_HEALTH="internet-health",e.ISP_UPTIME="isp-uptime",e.SYSTEM_UPTIME="system-uptime",e.NETWORK_DASHBOARD="network-dashboard",e.DASHBOARD_LOADER="dashboard-loader",e.DASHBOARD_UNIFI_OS_VERSION="dashboard-unifi-os-version",e.DASHBOARD_NETWORK_VERSION="dashboard-network-version",e.HOTSPOT_PORTAL_MINIMIZER="hotspot-portal-minimizer",e.HOTSPOT_PORTAL_SETTINGS_RESTORE_DEFAULT="hotspot-portal-settings-restore-default",e.HOTSPOT_PORTAL_PREVIEW_BACKGROUND="hotspot-portal-preview-background",e.HOTSPOT_PORTAL_PREVIEW_CONTAINER="hotspot-portal-preview-container",e.HOTSPOT_PORTAL_PREVIEW_LOGO="hotspot-portal-preview-logo",e.HOTSPOT_PORTAL_PREVIEW_LANGUAGE="hotspot-portal-preview-language",e.HOTSPOT_PORTAL_PREVIEW_TITLE="hotspot-portal-preview-title",e.HOTSPOT_PORTAL_PREVIEW_WELCOME_TEXT="hotspot-portal-preview-welcome-text",e.HOTSPOT_PORTAL_PREVIEW_AUTHENTICATION_TEXT="hotspot-portal-preview-authentication-text",e.HOTSPOT_PORTAL_PREVIEW_BUTTON_TEXT="hotspot-portal-preview-button-text",e.HOTSPOT_PORTAL_PREVIEW_HOTSPOT_PACKAGES="hotspot-portal-preview-hotspot-packages",e.HOTSPOT_PORTAL_PREVIEW_FACEBOOK="hotspot-portal-preview-facebook",e.HOTSPOT_PORTAL_PREVIEW_VOUCHER="hotspot-portal-preview-voucher",e.HOTSPOT_PORTAL_PREVIEW_PASSWORD="hotspot-portal-preview-password",e.HOTSPOT_PORTAL_PREVIEW_RADIUS="hotspot-portal-preview-radius",e.HOTSPOT_PORTAL_BRANDING_INFORMATION="hotspot-portal-branding-information",e.HOTSPOT_PORTAL_BRANDING_SUCCESS="hotspot-portal-branding-success",e.HOTSPOT_PORTAL_BRANDING_LOGO="hotspot-portal-branding-logo",e.WATCHLIST_TABLE="watchlist-table",e.PROBLEMATIC_CLIENTS_TABLE="problematic-clients-table",e.NETWORK_VERSION="network-version",e.PLAY_PAUSE_BUTTON="play-pause-button",e.CONTROL_PANEL_HEADER="control-panel-header",e.CONTROL_PANEL_HEADER_FILTER_BUTTON="control-panel-header-filter-button",e.HEADER_SIGNOUT_BUTTON="header-signout-button",e.HEADER_USERICON="header_usericon",e.RESTORE_COLUMNS_BUTTON="restore-columns-button",e.WIFI_SECURITY_PROTOCOLS="wifi-security-protocols",e.WIFI_BANDWIDTH_PROFILE="wifi-bandwidth-profile",e.WIFI_PMF_MODE="wifi-pmf-mode",e.WIFI_VLAN_BANDS="wifi-vlan-bands",e.NETWORKCONF_ID="networkconf-id",e.APS_TABLE="aps-table",e.AP_GROUPS_TABLE="ap-groups-table",e.IP_ADDRESS_DROPDOWN="ip-address-dropdown",e.TUNNEL_SUBNET="tunnel-subnet",e.COPY_WIREGUARD_PUBLIC_KEY="copy-wireguard-public-key",e.IPSEC_ESP_LIFETIME_CONTAINER="ipsec-esp-lifetime-container",e.IPSEC_ESP_DH_GROUP_CONTAINER="ipsec-esp-dh-group-container",e.IPSEC_ESP_HASH_CONTAINER="ipsec-esp-hash-container",e.IPSEC_ESP_ENCRYPTION_CONTAINER="ipsec-esp-encryption-container",e.IPSEC_IKE_LIFETIME_CONTAINER="ipsec-ike-lifetime-container",e.IPSEC_IKE_HASH_CONTAINER="ipsec-ike-hash-container",e.IPSEC_IKE_ENCRYPTION_CONTAINER="ipsec-ike-encryption-container",e.EXTRAS_CONTAINER="extras-container",e.TELEPORT_LINK_EXPIRY="teleport-link-expiry",e.TELEPORT_TOKEN_TABLE="teleport-token-table",e.NETWORK_SUBNET_DROPDOWN="network-subnet-dropdown",e.NETWORKS_TABLE="networks-table",e.WS_USERS_TABLE="ws-users-table",e.TOGGLE_DHCP_MANAGEMENT="toggle-dhcp-management",e.DHCP_MODE_DROPDOWN="dhcp-mode-dropdown",e.ADD_NEW_DHCP_OPTION="add-new-dhcp-option",e.TOPOLOGY_FILTER_CONTROL="topology-filter-control",e.TOPOLOGY_ROTATION="topology-rotation",e.SETTINGS_DEVICE_UPDATE_CACHE="settings-device-update-cache",e.SETTINGS_DEVICE_UPDATE_SCHEDULE="settings-device-update-schedule",e.SETTINGS_DEVICE_FIRMWARE="settings-device-firmware",e.SETTINGS_DEVICE_FIRMWARE_RELEASE_CHANNEL="settings-device-firmware-release-channel",e.SETTINGS_EARLY_ACCESS_RELEASE_CHANNELS="settings-early-access-release-channels",e.SETTINGS_NETWORKS_NEW_VIRTUAL_NETWORK="settings-networks-new-virtual-network",e.LOGS_CATEGORY_PICKER="logs-category-picker",e.LOGS_SUBCATEGORY_PICKER="logs-subcategory-picker",e.LOGS_EVENT_PICKER="logs-event-picker",e.LOGS_SETTINGS="logs-settings",e.LOGS_RELOAD="logs-reload",e.PUSH_NOTIFICATIONS_PICKER="push-notifications-picker",e.VIEWER_NETWORK="viewer-network",e.VIEWER_INTERNET="viewer-internet",e.VIEWER_VPN_SERVER="viewer-vpn-server",e.VIEWER_VPN_CLIENT="viewer-vpn-client",e.VIEWER_POLICY_BASED_ROUTING="viewer-policy-based-routing",e.VIEWER_FIREWALL_RULES="viewer-firewall-rules",e.VIEWER_NAT="viewer-nat",e.VIEWER_SITE_TO_SITE_VPN="viewer-site-to-site-vpn",e.VIEWER_WIFI="viewer-wifi",e.CREATE_FIREWALL_ZONE_BUTTON="create-firewall-zone-button",e.CREATE_FIREWALL_POLICY_BUTTON="create-firewall-policy-button",e.FIREWALL_POLICY_ORDER_BUTTON="firewall-policy-order-button",e.POLICY_BASED_ROUTES_DOMAIN="editable-grid-table-wrapper-domains",e.ACL_POLICY_FORM_TYPE="acl-policy-form-type",e.ACL_POLICY_FORM_SOURCE="acl-policy-form-source",e.ACL_POLICY_FORM_ACTION="acl-policy-form-action",e.ACL_POLICY_FORM_DESTINATION="acl-policy-form-destination",e.VIEWER_CONTENT_FILTER="viewer-content-filter",e.CLIENTS_FILTER_FOOTER="clients-filter-footer",e.CLIENTS_FILTER_CONTENT="clients-filter-content",e.VIEWER_ETHERNET_PORTS_PROFILE="viewer-ethernet-ports-profile",e.VIEWER_WAN_SLA="viewer-wan-sla",e.VIEWER_NETWORK_LISTS="viewer-network-lists",e.VIEWER_WIFI_SPEED_LIMIT_PROFILE="viewer-wifi-speed-limit-profile",e.VIEWER_RADIUS_PROFILE="viewer-radius-profile"}(a||(a={}))},451449:(e,t,n)=>{n.d(t,{I:()=>a});const a=(0,n(296540).createContext)({fields:!1,labels:!1,tooltipPopovers:!1,tooltipIcons:!1})},454195:(e,t,n)=>{n.d(t,{b:()=>a});const a=32},468307:(e,t,n)=>{var a,i;n.d(t,{G:()=>a,m:()=>i}),function(e){e.STAR="star",e.DEVICE_NAME="deviceName",e.CHANNELS="channels",e.CLIENTS="clients",e.ACTIVITY_24H="24hActivity",e.TX_RETRIES="txRetries",e.AVG_SIGNAL="avgSignal",e.OPTIMIZATION="optimization",e.AVERAGE_INTERFERENCE="averageInterference",e.AVERAGE_AIRTIME="averageAirtime"}(a||(a={})),function(e){e.CACHED="cached",e.TRIGGERED="triggered"}(i||(i={}))},470591:(e,t,n)=>{n.d(t,{A:()=>a});const a=(0,n(296540).createContext)({isStandalone:!0,header:[null,()=>{}],footer:[null,()=>{}]})},689965:(e,t,n)=>{n.d(t,{A:()=>p,I:()=>a});var a,i=n(296540),r=n(822336),o=n(427853),l=n(71479),s=n(825032),c=n(566723),E=n(294303);!function(e){e.ACCORDION="accordion",e.BUTTON_LIST="buttonList"}(a||(a={}));const d=(0,l.A)(E.A,{shouldForwardProp:e=>!["marginBottom","isButtonList","margin","flex","width","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  padding: ${({theme:e,isButtonList:t,padding:n})=>n||(t?`0 ${e.spacing["spacing-l"]}`:e.spacing["spacing-l"])};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  width: ${({width:e="100%"})=>e};
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  ${({isButtonList:e})=>e?`\n    > div {\n      display: flex;\n      height: 48px;\n      border-bottom: ${({theme:{themeName:e}})=>r.Ay[`desktop-border-divider-${e}`]};\n      &:last-child {\n        border-bottom: none;\n      }\n    }\n  `:""}
`,m=(0,l.A)(o.A,{shouldForwardProp:e=>!["marginBottom","margin","flex","padding","nested","background"].includes(e)})`
  background-color: ${({background:e,nested:t,theme:{themeName:n}})=>e||r.Ay[n===s.S.DARK?`desktop-color-neutral-${t?"00":"01"}-dark`:`desktop-color-neutral-${t?"01":"00"}-light`]};
  margin-bottom: ${({theme:e,marginBottom:t})=>t||e.spacing["spacing-l"]};
  ${({margin:e})=>e?`margin: ${e};`:""}
  ${({padding:e})=>e?`padding: ${e};`:""}
  border-radius: 8px;
  flex-direction: column;
  flex: ${({flex:e=0})=>e};
  > :last-child {
    margin-bottom: 0;
  }
  thead {
    tr {
      height: 32px !important;
    }
    th {
      text-transform: none;
    }
  }
  > li {
    > div:first-child {
      background: ${({background:e,theme:{themeName:t}})=>e||r.Ay[t===s.S.DARK?"desktop-color-neutral-01-dark":"desktop-color-neutral-00-light"]};
      height: 48px;
      padding: 0 ${c.Ln};
    }
    > div:nth-child(2) {
      margin-bottom: 0;
      padding: 0 ${c.Ln} ${c.Ln};
      > div {
        padding: 0;
      }
    }
  }
`,p=({type:e,marginBottom:t,margin:n,padding:r,flex:o,width:l,nested:s,...c})=>"items"in c?i.createElement(m,{marginBottom:t,margin:n,padding:r,flex:o,nested:s,...c}):i.createElement(d,{nested:s,width:l,marginBottom:t,margin:n,padding:r,flex:o,isButtonList:e===a.BUTTON_LIST,...c},c.children)},691441:(e,t,n)=>{n.d(t,{A:()=>r});var a=n(296540),i=n(470591);function r(e){const{children:t}=e,{isStandalone:n,footer:[,r]}=(0,a.useContext)(i.A);return(0,a.useLayoutEffect)(()=>{if(!n)return r(t),()=>r(null)},[n,t]),a.createElement(a.Fragment,null,n&&t)}},766624:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(296540),i=n(271856),r=n(709690),o=n(284428),l=n(566723);const s=({description:e,isInteractive:t,portal:n=!0,cursorType:s,title:c,position:E,width:d,iconProps:m,disabled:p=!1})=>{const A=(0,o.Im)()||p,_=(0,o.q)();return a.createElement(i.A,{description:e,portal:n,isInteractive:t,style:{display:"flex",alignItems:"center"},cursorType:s,title:c,position:E,width:d,disableHover:_},a.createElement(r.A,{isActive:!0,size:"original",opacity:A?l.xN:void 0,...m}))}},878237:(e,t,n)=>{n.d(t,{A:()=>m});var a,i=n(296540),r=n(758649),o=n(71479),l=n(825032);!function(e){e.DEFAULT="default",e.HOVER="hover",e.DISABLED="disabled",e.ACTIVE="active"}(a||(a={}));const s={[a.DEFAULT]:{[l.S.LIGHT]:"#d6d9e2",[l.S.DARK]:"#3f3f3f"},[a.HOVER]:{[l.S.LIGHT]:"#7e8190",[l.S.DARK]:"#9d9d9d"},[a.DISABLED]:{[l.S.LIGHT]:"#eeeff3",[l.S.DARK]:"#1e1e1e"},[a.ACTIVE]:{[l.S.LIGHT]:"#a4a7b5",[l.S.DARK]:"#2f2f2f"}},c=(e,t)=>s[t][e],E=(e,t)=>`1px 0px 0px 0px ${c(e,t)}`,d=(0,o.A)(r.A,{shouldForwardProp:e=>"rotate"!==e})`
  margin: 0;
  padding: 0;
  width: 26px;
  height: 24px;
  color: inherit;
  background-color: transparent;
  box-sizing: border-box;
  border-radius: 4px 0 0 4px;
  border-right: 0;
  border-color: transparent;
  border-color: ${({theme:{themeName:e}})=>`${c(e,a.DEFAULT)}`};
  box-shadow: ${({theme:{themeName:e}})=>`${E(e,a.DEFAULT)}`};
  ${({rotate:e=!1})=>e?"\n    transform: rotate(-180deg);\n  ":"\n  position: relative; \n  left: -1px;\n  margin-left: 1px;\n    "}
  > span {
    display: flex;
    align-items: center;
    justify-content: center;
    > div {
      display: flex;
    }
  }
  &:disabled {
    z-index: 0;
    box-shadow: ${({theme:{themeName:e}})=>`${E(e,a.DISABLED)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${c(e,a.DISABLED)} !important`};
  }
  &:hover {
    z-index: 1;
    box-shadow: ${({theme:{themeName:e}})=>`${E(e,a.HOVER)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${c(e,a.HOVER)} !important`};
    border-right: 0;
    background-color: transparent !important;
  }
  &:active {
    box-shadow: ${({theme:{themeName:e}})=>`${E(e,a.ACTIVE)} !important`};
    border-color: ${({theme:{themeName:e}})=>`${c(e,a.ACTIVE)} !important`};
  }
`,m=({disabled:e,onClick:t,rotate:n})=>i.createElement(d,{variant:"secondary",rotate:n,disabled:e,onClick:t,type:"button"},i.createElement("svg",{width:"4",height:"8",viewBox:"0 0 4 8",fill:"none"},i.createElement("path",{d:"M3.75026 0.999386C3.75026 1.11739 3.70826 1.23639 3.62426 1.33138L1.25026 3.99939L1.27026 4.02039L3.62326 6.66739C3.80726 6.87339 3.78826 7.18939 3.58226 7.37339C3.37626 7.55739 3.06026 7.53839 2.87626 7.33239L0.530256 4.69439C0.156256 4.30739 0.156256 3.69139 0.530256 3.30439L2.87526 0.667385C3.05826 0.461386 3.37526 0.442385 3.58126 0.626385C3.69326 0.724385 3.75026 0.861386 3.75026 0.999386Z",fill:"#A4A7B5"})))},879546:(e,t,n)=>{n.d(t,{Od:()=>E,AP:()=>c,QS:()=>s,Pz:()=>l});var a=n(516693),i=n(691189),r=n(887831);const o="device_mac",l=(e,t,n)=>o=>o((0,i.vB)(a.aC,null,null,r.A.POST,"/v2/api/site/{site}/radio-ai/optimize/preview",{},{calculation_id:e,radios:t,method:n},{})),s=(e,t={},n={})=>(0,i.Kd)("channelAi","/v2/api/site/{site}/radio-ai/optimize/preview-last",o,{data:{radios:e},...t},{idField:o,method:r.A.POST,fetchConfig:{getAllPostData:!0},...n}),c=e=>(0,i.vB)(a.aC,null,null,r.A.POST,`/v2/api/site/{site}/radio-ai/optimize/apply/${e}`,{},null,{}),E=e=>(0,i.vB)(a.aC,null,null,r.A.POST,"/v2/api/site/{site}/radio-ai/optimize/apply-last",{},{radios:e},{})},905410:(e,t,n)=>{n.d(t,{A:()=>u});var a=n(469733),i=n(296540),r=n(217439),o=n(362412),l=n(566723),s=n(294303),c=n(699784),E=n(200826),d=n(789768),m=n(878237),p=n(860765);const A=(0,n(71479).A)("div")`
  overflow: auto;
  width: 100%;
  height: 100%;
`,_=({onRenderTable:e,itemCount:t,section:n="COMMON_RECORDS",rowOptions:_,onRowsChanged:u,onPageChanged:T,onOffsetChanged:h,tableType:O,pageNumber:I,paginationFlexProps:N={},paginationDropdownProps:C={},unknownCount:R=!1,paginationTableContainerClassName:g})=>{const S=(0,a.useDispatch)(),P=(0,i.useMemo)(()=>_||p.o,[_]),L=(0,i.useMemo)(()=>P.map(({value:e})=>({label:String(e),value:e})),[P]),f=(0,E.A)(O),v=(0,i.useMemo)(()=>Number(f?.rowsPerPage&&L.some(({value:e})=>Number(e)===f.rowsPerPage)?f.rowsPerPage:P.find(e=>e?.default)?.value||P?.[0]?.value),[f,L,P]),b=(0,i.useMemo)(()=>Math.max(p.B,I||p.B),[I]),w=(0,i.useCallback)(e=>{T?.(e)},[T]),D=(0,i.useCallback)(()=>{w(b-1)},[b,w]),y=(0,i.useCallback)(()=>{w(b+1)},[b,w]),x=(0,i.useCallback)(({value:e})=>{const t=Number(e);S((0,d.yT)(O,{rowsPerPage:t})),u?.(t)},[S,u,O]),H=(0,i.useMemo)(()=>{let e=b*v;return e>t&&(e=t-v,w(Math.ceil(Math.ceil(e)/v))),e},[w,b,v,t]),k=(0,i.useMemo)(()=>{let e=H+v;return e>=t&&(e=t),e},[H,v,t]),B=(0,i.useMemo)(()=>{const e={pageNumber:I,from:H,rowsPerPage:v};return h?.(e),e},[I,H,v,h]),M=(0,i.useMemo)(()=>b===p.B,[b]),F=(0,i.useMemo)(()=>k>=t,[k,t]);return i.createElement(i.Fragment,null,i.createElement(A,{className:g},e(B)),i.createElement(s.A,{justifyContent:"space-between",...N},void 0!==H&&void 0!==k&&void 0!==t?i.createElement(s.A,{alignItems:"center"},i.createElement(s.A,null,i.createElement(m.A,{disabled:M,onClick:D}),i.createElement(m.A,{disabled:F,rotate:!0,onClick:y})),i.createElement(s.A,{marginLeft:l.kc,marginRight:l.S2},i.createElement(r.A,{size:"small",color:"text-2"},i.createElement(c.sA,{id:"PAGINATION_FROM_TO",values:{from:H+1,to:k,total:`${t}${R?"+":""}`,section:i.createElement(c.sA,{id:n})}}))),L.length>1?i.createElement(s.A,{alignItems:"center"},i.createElement(s.A,{marginRight:l.kc},i.createElement(r.A,{size:"small",color:"text-2"},i.createElement(c.sA,{id:"PAGINATION_ROWS_PER_PAGE"}))),i.createElement("div",{style:{width:"75px"}},i.createElement(o.A.Sorted,{value:v,options:L,onChange:x,variant:"secondary",direction:"top",width:"100%",portal:!0,...C}))):null):null))},u=({itemCount:e,rowOptions:t,onRenderTable:n,wrapperFlexProps:a,paginationTableContainerClassName:r,keepPaginationWhileLoading:o=!1,...c})=>{const E=(0,i.useMemo)(()=>e>Math.min(...(t||p.o).map(({value:e})=>e)),[e,t]);return i.createElement(s.A,{padding:l.Ln,gap:l.Ln,width:"100%",height:"100%",flexDirection:"column",overflow:"hidden",...a},o||E?i.createElement(_,{itemCount:e,rowOptions:t,onRenderTable:n,wrapperFlexProps:a,paginationTableContainerClassName:r,...c}):i.createElement(A,{className:r},n({pageNumber:0,from:0,rowsPerPage:e})))}},968906:(e,t,n)=>{n.d(t,{A:()=>o});var a=n(383725),i=n(199582);class r{static addDataTestId(e){return{[i.L]:e}}}r.TestId=a.b;const o=r}}]);