"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[37491],{87730:(e,t,a)=>{a.d(t,{A:()=>i,J:()=>E});var r=a(296540),l=a(822336),n=a(998837),c=a(294303),m=a(401226),s=a(455643);const E=({isRemoving:e,duration:t=m.I9,...a})=>r.createElement(c.A,{width:48},r.createElement(s.A,{size:8,animate:!1,variant:"gradient",duration:t,color:l.Ay[`desktop-color-${e?"red":"ublue"}-06-${(0,n.u)().themeName}`],...a})),i=E},128736:(e,t,a)=>{a.d(t,{A:()=>c});var r=a(296540),l=a(823858),n=a(998837);const c=e=>{const{motifPalette:t}=(0,n.u)();return r.createElement(l.A,{size:"original",variant:"fill",color:t.warning,...e})}},175875:(e,t,a)=>{a.d(t,{A:()=>E});var r=a(469733),l=a(296540),n=a(718073),c=a(592563),m=a(602021),s=a(294303);const E=(0,l.forwardRef)(({allowReadOnly:e,disabledReason:t,...a},E)=>{const i=(0,r.useSelector)(m.EL)&&!e;return l.createElement(s.A,{alignItems:"center"},l.createElement(n.A,{description:t,placement:"left"},l.createElement(c.A,{fontSize:"medium",type:"button",...a,isDisabled:i||a.isDisabled||!!t,ref:E})))})},339577:(e,t,a)=>{a.d(t,{R:()=>_});var r=a(296540),l=a(613910),n=a(566723),c=a(115829),m=a(568777),s=a(294303),E=a(765562),i=a(746289);const o={width:"auto",maxWidth:"80px",height:"20px"},d=`${E.A.asnPath}65534${i.m1}`,_=({carrier:e,asn:t})=>e?r.createElement(s.A,{gap:n.YC,flex:"0 1 auto",overflow:"hidden"},r.createElement(s.A,{flex:"0 0 auto"},void 0!==t?r.createElement(m.A,{asn:t,style:o,useFallback:!0,customFallback:d}):r.createElement(l.A,{size:"original"})),r.createElement(c.A,{color:"text-2",size:"medium"},e)):null},438905:(e,t,a)=>{a.d(t,{J:()=>c,_:()=>n});var r=a(569299),l=a(702549);const n=(e=l.G_.ERROR,t=!1)=>(0,r.R6)(e)||Boolean(t),c=(e=l.G_.ERROR,t=!1)=>!t&&!(0,r.k3)(e)},535362:(e,t,a)=>{a.d(t,{A:()=>C});var r=a(469733),l=a(296540),n=a(314714),c=a(566723),m=a(699784),s=a(575593),E=a(949909),i=a(578819),o=a(780811),d=a(837612),_=a(602197),A=a(171073),I=a(175875),u=a(147606),N=a(294303);const p=({device:e,disabled:t,confirmTitle:a,confirmMessage:p,confirmButtonMessage:C,hidePoe:S,customName:T,unit_id:R})=>{const O=(0,r.useDispatch)(),g=(0,r.useSelector)((0,s.p)(E.S.API_DEVICE_RESTART)),[D,G]=(0,l.useState)(!1),M=T||e.name||e.mac,y=(0,o.Tbi)(e)&&(0,i.b0)(e.port_table),U=(0,d.S9)(e),v=U!==_.g.CONNECTED&&U!==_.g.RFSCANNING,V=y||(0,o.moU)(e),f=!e.bypassConfirmRestart,b=V||f,L=(0,l.useCallback)(()=>{O((0,A.CP)(e,D?"hard":"soft",R))},[O,e,D,R]);return g?l.createElement(u.A,{title:l.createElement(m.sA,{id:a||"DEVICE_ACTIONS_RESTART_CONFIRM_TITLE",values:{deviceName:M}}),message:l.createElement(l.Fragment,null,l.createElement(m.sA,{id:p||"DEVICE_ACTIONS_RESTART_CONFIRM_MESSAGE",values:{deviceName:M}}),y&&!S?l.createElement(N.A,{paddingTop:c.kc},l.createElement(n.A,{checked:D,id:"hardReboot",onChange:()=>{G(e=>!e)}},l.createElement(m.sA,{id:"DEVICE_ACTIONS_RESTART_CONFIRM_CYCLE_POE_POWER"}))):null),confirmButtonLabel:l.createElement(m.sA,{id:C||"DEVICE_ACTIONS_RESTART"}),confirmButtonVariant:"destructive",onConfirm:L,trigger:b?l.createElement(I.A,{isDisabled:v||t},l.createElement(m.sA,{id:"DEVICE_ACTIONS_RESTART"})):null}):null},C=(0,l.memo)(({device:e,disabled:t,confirmTitle:a,confirmMessage:r,confirmButtonMessage:n,hidePoe:c,customName:m,unit_id:s})=>l.createElement(p,{device:e,disabled:t,confirmTitle:a,confirmMessage:r,confirmButtonMessage:n,hidePoe:c,customName:m,unit_id:s}))},575593:(e,t,a)=>{a.d(t,{p:()=>s});var r=a(801081),l=a(215454),n=a(602021),c=a(198494),m=a(949909);const s=e=>(0,r.Mz)(n.ah,l.pw,n.dK,c.fR,(t,a,r,l)=>{switch(e){case m.S.API_DEVICE_ADOPT:case m.S.API_DEVICE_RESTART:return r||t.includes(e);case m.S.API_WIDGET_OS_STATS:return l||a.includes(e);default:return r}})},595053:(e,t,a)=>{a.d(t,{A:()=>E});var r=a(296540),l=a(489391),n=a(822336),c=a(998837),m=a(115829),s=a(532114);const E=({softLimit:e=0,threshold:t,used:a=0,dataFormat:E,inactive:i=!1})=>{const o=n.Ay[`desktop-color-${((e,t,a,r)=>{switch(!0){case r:return"text-4";case!e:return"text-3";case t>=e:return"red-06";case a&&t>=.01*a*e:return"orange-06";default:return"green-06"}})(e,a,t,i)}-${(0,c.u)().themeName}`];return r.createElement(m.A,{color:i?"text-4":"text-3",size:"medium"},r.createElement(s.A,{colorOverride:o},(0,l.Ay)(a,"bytes",E)),e>0?r.createElement("span",null," / ",(0,l.Ay)(e,"bytes",E)):null)}},902923:(e,t,a)=>{a.d(t,{A:()=>R,i:()=>T});var r=a(469733),l=a(296540),n=a(314714),c=a(71479),m=a(566723),s=a(137625),E=a(294303),i=a(699784),o=a(575593),d=a(949909),_=a(578819),A=a(780811),I=a(837612),u=a(602197),N=a(171073),p=a(535362),C=a(734707);const S=(0,c.A)(C.Ay)`
  padding: 0;
`,T=({device:e,isConfirmOpen:t,setIsConfirmOpen:a,disabled:c})=>{const p=(0,r.useDispatch)(),C=(0,r.useSelector)((0,o.p)(d.S.API_DEVICE_RESTART)),[T,R]=(0,l.useState)(!1),O=e.name||e.mac,g=(0,A.Tbi)(e)&&(0,_.b0)(e.port_table),D=(0,I.S9)(e),G=D!==u.g.CONNECTED&&D!==u.g.RFSCANNING,M=(0,l.useCallback)(()=>{p((0,N.CP)(e,T?"hard":"soft"))},[p,e,T]);return C?l.createElement(s.A,{isOpen:t,title:"DEVICE_ACTIONS_RESTART_CONFIRM_TITLE",titleValues:{deviceName:O},message:"DEVICE_ACTIONS_RESTART_CONFIRM_MESSAGE",messageValues:{deviceName:O},...g?{body:l.createElement(E.A,{paddingTop:m.kc},l.createElement(n.A,{checked:T,id:"hardReboot",onChange:()=>{R(e=>!e)}},l.createElement(i.sA,{id:"DEVICE_ACTIONS_RESTART_CONFIRM_CYCLE_POE_POWER"})))}:{},buttonMessage:"DEVICE_ACTIONS_RESTART",buttonVariant:"danger",handleConfirm:M,handleClose:()=>{a(!1)}},l.createElement(S,{variant:"link",onClick:t=>{t.preventDefault(),t.stopPropagation();const r=g||(0,A.moU)(e),l=!e.bypassConfirmRestart;r||l?a(!0):p((0,N.CP)(e))},disabled:G||c},l.createElement(i.sA,{id:"DEVICE_ACTIONS_RESTART"}))):null},R=(0,l.memo)(({device:e,disabled:t})=>l.createElement(p.A,{device:e,disabled:t}))},937491:(e,t,a)=>{a.d(t,{A:()=>qe});var r=a(296540),l=a(217439),n=a(718073),c=a(566723),m=a(53765),s=a(766624),E=a(294303),i=a(699784),o=a(812301),d=a(780811),_=a(569299),A=a(702549),I=a(602197),u=a(996734),N=a(282811),p=a(822336),C=a(998837),S=a(438905),T=a(546343),R=a(339577),O=a(469733),g=a(118818),D=a(259902),G=a(71479),M=(a(115829),a(332898)),y=a(128736);const U=()=>r.createElement(r.Fragment,null," · ");var v=a(532114),V=a(864635),f=a(902923),b=a(532419),L=a(592563),P=a(398300),F=a(855019),h=a(845030);const B=({mac:e,slot:t=A.td.SLOT_1,children:a,disabled:l})=>{const n=(0,O.useDispatch)();return r.createElement(L.A,{onPress:()=>{n((0,h.XP)({type:P.H.DEVICE,id:e,tab:F.BC.SETTINGS,subId:t.toString()}))},isDisabled:l},a)};var x=a(87730),Y=a(592510),k=a(834959),q=a(413357),W=a(582724),w=a(745667),z=a(837612);const H=({mac:e,disabled:t})=>{const a=(0,O.useSelector)((0,r.useMemo)(()=>(0,b.tG)(e),[e])),c=(0,z.S9)(a)===I.g.CONNECTED,m=(0,d.c_F)(a)&&Boolean(a.wan_networkgroup);return(0,W.A)([(0,q.Zi)(k.B.DEVICES),(0,w.hh)(void 0,{crudCacheStrategy:{type:Y.e.CACHE}})],r.createElement(n.A,{description:m?r.createElement(i.sA,{id:"DEVICE_ESIM_NOT_SUPPORTED_ON_WAN_ADOPTED_DEVICES"}):a.can_activate_esim?void 0:r.createElement(i.sA,{id:"DEVICE_ESIM_MUST_HAVE_INTERNET"})},r.createElement("span",null,r.createElement(B,{mac:e,slot:A.HY.ESIM,disabled:t||!c||!a.can_activate_esim},r.createElement(l.A,{size:"inherit",color:"inherit"},r.createElement(i.sA,{id:"DEVICE_ACTIVATE_ESIM"}))))))};var $;!function(e){e.DEFAULT="default",e.METERED="metered",e.WARNING="warning",e.LIMITED="limited"}($||($={}));const K=A.G_.OPERATIONAL,Q={[u.qU.SUCCESS]:"green-06",[u.qU.WARNING]:"orange-06",[u.qU.DANGER]:"red-06",[u.qU.MISSING]:"neutral-06"},Z=($.DEFAULT,$.METERED,$.WARNING,$.LIMITED,(0,G.A)("div")`
  position: absolute;
  top: 0;
  left: -${c.YC};
  right: -${c.YC};
  bottom: 0;
  pointer-events: auto;
`),J=(0,G.A)(E.A)`
  flex: 0 0 ${86}px;
  align-items: center;
  gap: ${c.YC};
`,j=((0,G.A)(E.A)`
  flex-direction: row;
  align-items: center;
`,(0,G.A)(E.A)`
  flex: 1;
`,(0,G.A)(E.A)`
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
`),X=(0,G.A)(E.A)`
  justify-content: end;
  flex: 1 0 auto;
  align-items: center;
  gap: ${c.YC};
`,ee=({code:e,tooltip:t})=>r.createElement(E.A,{justifyContent:"center",alignItems:"center",position:"relative",pointerEvents:"none",flex:0,marginRight:c.kc},r.createElement(g.A,{color:p.Ay[`desktop-color-${Q[e]}-${(0,C.u)().themeName}`]}),r.createElement(n.A,{description:t,placement:"top start"},r.createElement(Z,null))),te=()=>r.createElement(E.A,{padding:`0 ${c.YC}`,height:16,alignItems:"center",justifyContent:"center",borderRadius:p.Ay["desktop-radius-infinity"],background:p.Ay[`desktop-color-neutral-03-${(0,C.u)().themeName}`]},r.createElement(l.A,{color:"text-2",size:"xsmall"},r.createElement(i.sA,{id:"COMMON_PRIMARY"}))),ae=({slot:e=A.HY.SLOT_1,disabled:t=!1,primary:a})=>r.createElement(J,null,r.createElement(T.m$,{slot:(0,_.Ff)(e),esim:e===A.HY.ESIM,weight:"bold",color:t?"text-4":"text-1"}),a?r.createElement(te,null):null),re=({disabled:e=!1})=>r.createElement(X,null,r.createElement(l.A,{color:e?"text-4":"text-3",size:"medium"},r.createElement(i.sA,{id:"DEVICE_NO_SIM"}))),le=({signal_percent:e=0})=>r.createElement(M.A,{width:N.Rx,height:N.KN,signal_percent:e}),ne=({tooltip:e})=>r.createElement(X,{gap:c.YC},r.createElement(l.A,{color:"text-4",size:"medium"},r.createElement(i.sA,{id:"COMMON_DISABLED"})),e?r.createElement(s.A,{description:e}):null),ce=()=>r.createElement(l.A,{color:"text-2",size:"medium"},r.createElement(i.sA,{id:"DEVICE_MBB_FAILOVER_STANDBY"})),me=({mac:e,disabled:t=!1})=>r.createElement(X,{gap:c.YC},r.createElement(H,{mac:e,disabled:t}),r.createElement(s.A,{description:r.createElement(i.sA,{id:"DEVICE_ESIM_ACTIVATION_TOOLTIP"}),disabled:t})),se=({mac:e,slot:t=A.HY.SLOT_1})=>r.createElement(X,null,r.createElement(B,{mac:e,slot:t},r.createElement(i.sA,{id:"DEVICE_MBB_SETUP_REQUIRED"}))),Ee=({mac:e,slot:t=A.HY.SLOT_1,children:a})=>r.createElement(B,{mac:e,slot:t},a||r.createElement(i.sA,{id:"COMMON_SETTINGS"})),ie=({mac:e})=>{const t=(0,O.useSelector)((0,r.useMemo)(()=>(0,b.tG)(e),[e]));return r.createElement(f.A,{device:t})},oe=({radio:e})=>r.createElement(X,{gap:c.YC},r.createElement(l.A,{color:"text-3",size:"medium"},r.createElement(i.sA,{id:"COMMON_CONNECTING"})),r.createElement(le,{signal_percent:e?.signal_percent})),de=({sim:e,isRemoving:t,tooltip:a,messageId:c})=>r.createElement(X,null,c?r.createElement(l.A,{color:"text-3",size:"medium"},r.createElement(i.sA,{id:c})):null,r.createElement(n.A,{description:a},r.createElement("span",null,r.createElement(x.J,{initialTime:e.display_state_elapsed,duration:(0,_.gX)(e.display_state),isRemoving:t})))),_e=({messageId:e,children:t})=>r.createElement(X,{alignItems:"center",gap:c.YC},r.createElement(y.A,null),r.createElement(E.A,{alignItems:"baseline"},r.createElement(l.A,{color:"text-2",size:"medium"},r.createElement(i.sA,{id:e})),r.createElement(U,null),t)),Ae=({messageId:e,mac:t,slot:a,children:l})=>r.createElement(X,{alignItems:"center",gap:c.YC},r.createElement(y.A,null),r.createElement(E.A,{alignItems:"baseline",gap:c.YC},r.createElement(Ee,{mac:t,slot:a},r.createElement(i.sA,{id:e}))),l),Ie=({mac:e,slot:t=A.HY.SLOT_1})=>r.createElement(X,{alignItems:"center",gap:c.YC},r.createElement(B,{mac:e,slot:t},r.createElement(E.A,{gap:c.YC},r.createElement(y.A,null),r.createElement(i.sA,{id:"DEVICE_ESIM_ACTIVATION_FAILED"})))),ue=()=>r.createElement(X,{gap:c.YC},r.createElement(D.A,{size:"original",color:p.Ay[`desktop-color-red-06-${(0,C.u)().themeName}`]}),r.createElement(l.A,{color:"text-2",size:"medium"},r.createElement(i.sA,{id:"COMMON_BLOCKED"}))),Ne=({radio:e})=>r.createElement(N.A3,{signal_percent:e?.signal_percent,dBm:e?.rsrp??e?.rscp}),pe=({radio:e})=>r.createElement(X,{gap:c.YC},r.createElement(l.A,{color:"text-3",size:"medium"},r.createElement(i.sA,{id:"DEVICE_ULTE_PRO_SETUP_SEARCHING_INFO"})),r.createElement(le,{signal_percent:e?.signal_percent})),Ce=({messageId:e,sim:t})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:A.HY.ESIM}),r.createElement(de,{sim:t,messageId:e})),Se=({mac:e,carrier:t})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.DANGER}),r.createElement(ae,{slot:A.HY.ESIM}),r.createElement(j,null,r.createElement(R.R,{carrier:t}),r.createElement(Ie,{mac:e,slot:A.HY.ESIM}))),Te=({slot:e})=>r.createElement(n.A,{description:r.createElement("span",null,r.createElement(V.Gh,{slot:e}))},r.createElement("span",null,r.createElement(y.A,{size:"original",color:p.Ay[`desktop-color-red-06-${(0,C.u)().themeName}`]}))),Re=({slot:e,resetPolicy:t,usage:a=0,softLimit:l=0})=>r.createElement(n.A,{description:r.createElement("span",null,r.createElement(V.Tk,{slot:e,resetPolicy:t,usage:a,softLimit:l,dataFormat:"SI"}))},r.createElement("span",null,r.createElement(y.A,{size:"original",color:p.Ay[`desktop-color-orange-06-${(0,C.u)().themeName}`]}))),Oe={[A.G_.NO_SIM]:({slot:e})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.MISSING}),r.createElement(ae,{slot:e}),r.createElement(re,null)),[A.G_.ESIM_READY_TO_ACTIVATE]:({mac:e})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.MISSING}),r.createElement(ae,{slot:A.HY.ESIM}),r.createElement(me,{mac:e})),[A.G_.OPERATIONAL_METERED]:({radio:e,slot:t,primary:a,sim:{spn:l,asn:n}})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.SUCCESS}),r.createElement(ae,{slot:t,primary:a}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(l),asn:n}),r.createElement(X,null,r.createElement(Ne,{radio:e})))),[A.G_.OPERATIONAL_WARNING]:({radio:e,slot:t,sim:{spn:a,asn:l,txbytes:n,rxbytes:c},overrides:{reset_policy:m,data_soft_limit_bytes:s}})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:t}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(a),asn:l}),r.createElement(X,null,r.createElement(Re,{slot:t,resetPolicy:m,usage:(0,_.rB)({txbytes:n,rxbytes:c}),softLimit:s}),r.createElement(Ne,{radio:e})))),[A.G_.OPERATIONAL_LIMITED]:({radio:e,slot:t,primary:a,sim:{spn:l,asn:n}})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:t,primary:a}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(l),asn:n}),r.createElement(X,null,r.createElement(Te,{slot:t}),r.createElement(Ne,{radio:e})))),[A.G_.OPERATIONAL]:({sim:{spn:e,asn:t},radio:a,slot:l,primary:n})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.SUCCESS}),r.createElement(ae,{slot:l,primary:n}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(e),asn:t}),r.createElement(X,null,r.createElement(Ne,{radio:a})))),[A.G_.FAILOVER_READY_METERED]:({slot:e,sim:t,primary:a})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:e,primary:a}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(t.spn),asn:t.asn}),r.createElement(X,null,r.createElement(ce,null)))),[A.G_.FAILOVER_READY_WARNING]:({slot:e,sim:{spn:t,asn:a,txbytes:l,rxbytes:n},primary:c,overrides:{reset_policy:m,data_soft_limit_bytes:s}})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:e,primary:c}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(t),asn:a}),r.createElement(X,null,r.createElement(Re,{slot:e,resetPolicy:m,usage:(0,_.rB)({txbytes:l,rxbytes:n}),softLimit:s}),r.createElement(ce,null)))),[A.G_.FAILOVER_READY_LIMITED]:({slot:e,sim:{spn:t,asn:a},primary:l,radio:n})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:e,primary:l}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(t),asn:a}),r.createElement(X,null,r.createElement(Te,{slot:e}),r.createElement(ce,null)))),[A.G_.FAILOVER_READY]:({slot:e,sim:t,primary:a})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.SUCCESS}),r.createElement(ae,{slot:e,primary:a}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(t.spn),asn:t.asn}),r.createElement(X,null,r.createElement(ce,null)))),[A.G_.SEARCHING]:({slot:e,primary:t,radio:a,sim:l})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:e,primary:t}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(l.spn),asn:l.asn}),r.createElement(pe,{radio:a}))),[A.G_.SETUP_REQUIRED]:({mac:e,slot:t,sim:a})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:t}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(a.spn),asn:a.asn}),r.createElement(X,null,r.createElement(se,{mac:e,slot:t})))),[A.G_.ROAMING_FORBIDDEN]:({mac:e,sim:t,slot:a,radio:l,primary:n})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:a,primary:n}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(t.spn),asn:t.asn}),r.createElement(Ae,{messageId:"COMMON_ROAMING",mac:e,slot:a}))),[A.G_.CONNECTING]:({slot:e,radio:t,primary:a,sim:l})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:e,primary:a}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(l.spn),asn:l.asn}),r.createElement(oe,{radio:t}))),[A.G_.READING_SIM_DATA]:({slot:e,sim:t,primary:a})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:e,primary:a}),r.createElement(j,null,r.createElement(R.R,{carrier:(0,_.ap)(t.spn),asn:t.asn}),r.createElement(X,null,r.createElement(de,{sim:t,tooltip:r.createElement(E.A,{flexDirection:"column"},r.createElement("span",null,r.createElement(i.sA,{id:"COMMON_SETTING_UP"})," ",r.createElement(T.pF,{slot:e}),"."),r.createElement(i.sA,{id:"DEVICE_IN_PROGRESS_MESSAGE"}))})))),[A.G_.ESIM_INITIALIZING]:({sim:e})=>r.createElement(Ce,{messageId:"DEVICE_PREPARING_ESIM",sim:e}),[A.G_.ESIM_DOWNLOADING]:({sim:e})=>r.createElement(Ce,{messageId:"DEVICE_DOWNLOADING_PROFILE",sim:e}),[A.G_.ESIM_ACTIVATING]:({sim:e})=>r.createElement(Ce,{messageId:"DEVICE_ACTIVATING_ESIM",sim:e}),[A.G_.ESIM_FINALIZING]:({sim:e})=>r.createElement(Ce,{messageId:"DEVICE_FINALIZING_SETUP",sim:e}),[A.G_.ESIM_FINALIZING_DOWNLOAD_FAILED]:({sim:e})=>r.createElement(Ce,{messageId:"DEVICE_CLEANING_UP",sim:e}),[A.G_.ESIM_FINALIZING_ACTIVATION_FAILED]:({sim:e})=>r.createElement(Ce,{messageId:"DEVICE_CLEANING_UP",sim:e}),[A.G_.ESIM_DEACTIVATING]:({sim:e})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.WARNING}),r.createElement(ae,{slot:A.HY.ESIM}),r.createElement(de,{sim:e,isRemoving:!0,tooltip:r.createElement("span",null,r.createElement(i.sA,{id:"COMMON_REMOVING"})," ",r.createElement(T.pF,{slot:A.HY.ESIM}))})),[A.G_.PIN_INCORRECT]:({mac:e,slot:t,primary:a})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.DANGER}),r.createElement(ae,{slot:t,primary:a}),r.createElement(Ae,{messageId:"DEVICE_MBB_STATUS_INCORRECT_PIN_CODE",mac:e,slot:t})),[A.G_.PIN_REQUIRED]:({mac:e,slot:t,primary:a})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.DANGER}),r.createElement(ae,{slot:t,primary:a}),r.createElement(Ae,{messageId:"DEVICE_PIN_CODE_REQUIRED",mac:e,slot:t})),[A.G_.ERROR]:({mac:e,slot:t,primary:a})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.DANGER}),r.createElement(ae,{slot:t,primary:a}),r.createElement(_e,{messageId:"DEVICE_ERROR_OCCURRED"},r.createElement(ie,{mac:e}))),[A.G_.ESIM_INITIALIZATION_FAILED]:({mac:e,sim:t})=>r.createElement(Se,{mac:e,carrier:(0,_.ap)(t.spn)}),[A.G_.ESIM_ACTIVATION_FAILED]:({mac:e,sim:t})=>r.createElement(Se,{mac:e,carrier:(0,_.ap)(t.spn)}),[A.G_.ESIM_DOWNLOAD_FAILED]:({mac:e,sim:t})=>r.createElement(Se,{mac:e,carrier:(0,_.ap)(t.spn)}),[A.G_.BLOCKED]:({slot:e,primary:t})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.DANGER}),r.createElement(ae,{slot:e,primary:t}),r.createElement(ue,null)),[A.G_.PUK_REQUIRED]:({mac:e,slot:t,primary:a})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.DANGER}),r.createElement(ae,{slot:t,primary:a}),r.createElement(Ae,{messageId:"DEVICE_PUK_REQUIRED",mac:e,slot:t}))},ge=({slot:e})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.MISSING}),r.createElement(ae,{slot:A.HY.ESIM,disabled:!0}),r.createElement(ne,{tooltip:r.createElement(i.sA,{id:"DEVICE_MBB_ESIM_SLOT_DISABLED_TOOLTIP",values:{sim:r.createElement(T.pF,{slot:e})}})})),De=({slot:e})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.MISSING}),r.createElement(ae,{slot:e,disabled:!0}),r.createElement(ne,{tooltip:r.createElement(i.sA,{id:"DEVICE_MBB_SLOT_N_DISABLED_TOOLTIP",values:{sim:r.createElement(T.pF,{slot:e})}})})),Ge=({slot:e})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.MISSING}),r.createElement(ae,{slot:e}),r.createElement(re,null)),Me=({slot:e})=>r.createElement(r.Fragment,null,r.createElement(ee,{code:u.qU.MISSING}),r.createElement(ae,{slot:e,disabled:!0}),r.createElement(X,null)),ye=Oe,Ue=({mac:e,sim:t,overrides:a,displaySlot:l,displayState:n,primary:c,radio:m})=>r.createElement(r.Fragment,null,ye[n]?.({mac:e,overrides:a,sim:t,radio:m,slot:l,primary:c})),ve=({offline:e=!1,isCompact:t=!1,slotCount:a=0,...l})=>{const n=p.Ay[`desktop-border-divider-${(0,C.u)().themeName}`],m=(({displayState:e,displaySlot:t,slotCount:a,sim:l,offline:n})=>{const c=(0,_.Qi)(t,a);return t===A.HY.ESIM&&(0,S.J)(e,l.esim)?r.createElement(ge,{slot:(0,_.WW)(a)}):c&&(0,S._)(e,l.esim)?r.createElement(De,{slot:t}):n?r.createElement(Me,{slot:t}):c&&(0,_.k3)(e)||c&&(0,_.k3)(e)?r.createElement(Ge,{slot:t}):void 0})({displayState:l.displayState,displaySlot:l.displaySlot,slotCount:a,sim:l.sim,offline:e});return r.createElement(E.A,{borderBottom:t?void 0:n,padding:t?void 0:c.YC,height:t?27:32,alignItems:"center",justifyContent:"space-between"},m||r.createElement(Ue,{...l}))};var Ve=a(701548);const fe=({mac:e,slot:t,isInvalid:a})=>r.createElement(E.A,{gap:c.YC},r.createElement(Ve.A,{size:"original",variant:"fill",color:p.Ay[`desktop-color-orange-06-${(0,C.u)().themeName}`]}),r.createElement("span",null,r.createElement(l.A,{size:"medium",color:"text-1"},r.createElement(i.sA,{id:a?"DEVICE_PIN_CODE_INVALID":"DEVICE_PIN_CODE_REQUIRED"})," · "),r.createElement(B,{mac:e,slot:(0,_.CJ)(t)},r.createElement(i.sA,{id:"COMMON_SETTINGS"}))));var be=a(881295);const Le=({radio:{signal_percent:e,rsrp:t,rscp:a}={}})=>{const l=(0,be._i)(e,(0,C.u)().themeName),n=t??a;return r.createElement(m.Y,{id:"COMMON_SIGNAL"},r.createElement(v.A,{colorOverride:l,size:"inherit"},n?r.createElement(r.Fragment,null,n," ",r.createElement(i.sA,{id:"COMMON_UNIT_DBM"})):r.createElement(i.sA,{id:"COMMON_FALLBACK"})))};var Pe=a(595053);const Fe=(e,t={},a,r,l)=>{switch(!0){case!e.card_present:case(0,d.aK8)(l||I.g.UNKNOWN):return u.qU.MISSING;case(0,_.Gv)(e):return u.qU.DANGER;case r===u.Gu.MODEM_INIT&&e.active:case r===u.Gu.SIM_ACTIVATION&&e.active:case r===u.Gu.SEARCHING&&e.active:case r===u.Gu.CONNECTING&&e.active:case(0,_.Ao)(e):case(0,_.cN)(e,t):case(0,_.d)(e.current_apn,a):case e.data_limited:return u.qU.WARNING;case e.connection_info?.inet_state===A.uQ.DISCONNECTED:case a?.signal===u.OP.NO_SIGNAL:return u.qU.DANGER;case(0,_.nP)(e,r):return u.qU.SUCCESS;default:return u.qU.MISSING}},he=(e,t={},a={},l,n)=>{switch(!0){case!e.card_present:case(0,_.cN)(e,t):case(0,_.kV)(e):case(0,_.Ao)(e):return null;default:return r.createElement(Pe.A,{softLimit:a.data_limit_enabled?a.data_soft_limit_bytes:0,threshold:a.data_limit_enabled?a.data_warning_threshold:void 0,dataFormat:"SI",used:(0,_.rB)(e),inactive:(0,d.aK8)(n||I.g.UNKNOWN)})}},Be=(e,t,a,m,A={},p)=>{switch(!0){case(0,d.aK8)(t||I.g.UNKNOWN):return r.createElement(l.A,{color:"text-3",size:"medium"},r.createElement(i.sA,{id:"COMMON_OFFLINE"}));case(0,_.cN)(m,A):return r.createElement(x.A,{initialTime:m.display_state_elapsed,duration:(0,_.gX)(m.display_state)});case!m.card_present&&m.slot===o.Q:return r.createElement(E.A,{gap:c.YC},r.createElement(H,{mac:e}),r.createElement(s.A,{description:r.createElement(i.sA,{id:"DEVICE_ESIM_ACTIVATION_TOOLTIP"})}));case!m.card_present:return r.createElement(l.A,{color:"text-3",size:"medium"},r.createElement(i.sA,{id:"DEVICE_NO_SIM"}));case(0,_.kV)(m):return r.createElement(B,{mac:e,slot:(0,_.CJ)(m.slot)},r.createElement(i.sA,{id:"DEVICE_MBB_SETUP_REQUIRED"}));case(0,_.Ao)(m):return r.createElement(fe,{mac:e,slot:m.slot,isInvalid:(0,_.Gv)(m)});case a===u.Gu.READY&&(0,_.vc)(m)&&!m.active:return r.createElement(l.A,{color:"text-3",size:"medium"},r.createElement(i.sA,{id:"COMMON_READY"}));default:return r.createElement(r.Fragment,null,m.active?r.createElement(n.A,{description:a===u.Gu.READY?r.createElement(Le,{radio:p}):void 0,placement:"top start"},r.createElement("span",null,r.createElement(N.A3,{signal_percent:p?.signal_percent},a===u.Gu.SEARCHING?r.createElement(i.sA,{id:"DEVICE_ULTE_PRO_SETUP_SEARCHING_INFO"}):(0,_.mR)(p?.rat)?p?.rat:0===p?.signal_percent?r.createElement(i.sA,{id:"COMMON_NO_SIGNAL"}):null))):null,m.slot===o.Q&&!A&&m.card_present?r.createElement(s.A,{description:r.createElement(i.sA,{id:"DEVICE_ESIM_TOOLTIP"})}):null)}},xe=(e={},t={},a=void 0,l=void 0)=>{switch(!0){case!e.card_present:case(0,d.aK8)(l||I.g.UNKNOWN):return;case a===u.Gu.MODEM_INIT&&e.card_present:case a===u.Gu.SIM_ACTIVATION&&e.card_present:case a===u.Gu.CONNECTING&&e.active:case(0,_.cN)(e,t.esim):return r.createElement(i.sA,{id:"DEVICE_MBB_STATUS_SETTING_UP"});case a===u.Gu.SEARCHING&&e.active:return r.createElement(i.sA,{id:"DEVICE_MBB_STATUS_SEARCHING"});case(0,_.Gv)(e):return r.createElement(i.sA,{id:"DEVICE_MBB_STATUS_INCORRECT_PIN_CODE"});case(0,_.Ao)(e):return r.createElement(i.sA,{id:"DEVICE_PIN_CODE_REQUIRED"});case e.data_limited:return r.createElement(i.sA,{id:"DEVICE_MBB_STATUS_DATA_LIMIT_REACHED"});case(0,_.FT)(e):return r.createElement(i.sA,{id:"DEVICE_MBB_STATUS_INTERNET_UNREACHABLE"});case t?.radio?.signal===u.OP.NO_SIGNAL&&e.active:return r.createElement(i.sA,{id:"DEVICE_ULTE_PRO_SETUP_NO_SIGNAL"});case t?.radio&&(0,_.mr)(t.radio)&&e.active:return r.createElement(i.sA,{id:"DEVICE_MBB_STATUS_CANNOT_REGISTER"});case e.esim&&t.esim?.last_operation?.state===A.hM.FAILURE:return r.createElement(i.sA,{id:"DEVICE_MBB_STATUS_UNABLE_TO_ACTIVATE_ESIM"});case(0,_.d)(e.current_apn,t.radio):return r.createElement(i.sA,{id:"DEVICE_MBB_STATUS_ROAMING_UNAVAILABLE"});case(0,_.nP)(e,t.state)&&!!t.radio:return r.createElement(m.m,{minWidth:120},r.createElement(Le,{radio:t.radio}));default:return}},Ye=({mac:e,deviceState:t,mbb:a,mbb_overrides:l,isCompact:n})=>r.createElement(E.A,{flexDirection:"column",gap:n?void 0:c.kc,width:"100%"},(a?.sim||[]).map((c={})=>{const m=(l?.sim||[]).find(e=>e.slot===c.slot)||{};return r.createElement(N.Ay,{key:c.slot,slot:c.slot,esim:c.esim,card_present:c.card_present,statusCode:Fe(c,a.esim,a.radio,a.state,t),message:he(c,a.esim,m,a.state,t),status:Be(e,t,a.state,c,a.esim,a.radio),statusBallTooltip:xe(c,a,a.state,t),isCompact:n})})),ke=({mac:e,mbb:t,mbb_overrides:a,isCompact:l,deviceState:n})=>r.createElement(E.A,{flexDirection:"column",width:"100%"},(0,_.Vl)(t.sim||[]).map(c=>{const m=t.sim?.find(e=>e.slot===(0,_.Ff)(c,t.sim?.length))||{},s=(a?.sim||[]).find(e=>e.slot===m.slot)||{},E=a?.primary_slot===m.slot;return r.createElement(ve,{key:c,displaySlot:c,mac:e,sim:m,displayState:m.display_state||K,primary:E,overrides:s,radio:t.radio,isCompact:l,offline:(0,d.aK8)(n||I.g.UNKNOWN),slotCount:t.sim?.length})})),qe=e=>(0,r.useMemo)(()=>e.mbb.sim?.some(({display_state:e})=>Boolean(e)),[e.mbb.sim])?r.createElement(ke,{...e}):r.createElement(Ye,{...e})},949909:(e,t,a)=>{var r;a.d(t,{S:()=>r}),function(e){e.API_DEVICE_ADOPT="API_DEVICE_ADOPT",e.API_DEVICE_RESTART="API_DEVICE_RESTART",e.API_WIDGET_OS_STATS="API_WIDGET_OS_STATS"}(r||(r={}))}}]);