"use strict";(self.webpackChunkunifiNetworkUi=self.webpackChunkunifiNetworkUi||[]).push([[7341],{24446:(e,t,n)=>{n.r(t),n.d(t,{default:()=>ue});var i=n(296540),r=n(86571),a=n(689965),l=n(780811),o=n(328787),s=n(190492),c=n(932832),m=n(673283),_=n(566723),E=n(281884),d=n(392699),g=n(124092),u=n(470962),p=n(294303),f=n(602197),A=n(996734),v=n(188912),h=n(489391),C=n(822336),I=n(998837),x=n(115829),N=n(532114),P=n(699784),k=n(837612),w=n(902786),O=n(569299),T=n(282811),b=n(469733),S=n(758649),D=n(217439),U=n(823858),y=n(71479),R=n(574137),K=n(137298),L=n(778851),M=n(398300),z=n(855019),F=n(845030),H=n(271856),V=n(927099),B=n(811569);const $=(0,y.A)(H.A)`
  width: fit-content;
  & > div > button > span > div {
    display: flex;
    & > span {
      margin: 0 !important;
    }
  }
`,Q=(0,y.A)(S.A)`
  display: block;
  white-space: nowrap;
  height: 31px;
  padding: 0;
  color: ${({color:e})=>e};
  line-height: 14px;
`,X=(0,y.A)(U.A)`
  margin-right: ${_.kc};
  color: ${R.PA.warning};
`,G=(0,y.A)("div")`
  width: 170px;
  line-height: 18px;
`,W=({mac:e,isUnreachable:t,isUnavailable:n})=>{const r=(0,b.useDispatch)(),{formatMessage:a}=(0,P.tz)(),l=t||n,o=t?"LTE_ACTIONS_SUBSCRIPTION_CHECK_UNREACHABLE_TOOLTIP":n?"LTE_ACTIONS_SUBSCRIPTION_CHECK_UNAVAILABLE_TOOLTIP":"LTE_ACTIONS_SUBSCRIPTION_CHECK_TOOLTIP",s=l?"LTE_ACTIONS_SUBSCRIPTION_CHECK_UNAVAILABLE":"LTE_ACTIONS_SUBSCRIPTION_CHECK",c=(0,i.useCallback)(()=>{l||r((0,B.ZS)([e],a))},[l,r,e,a]);return i.createElement($,{position:"topRight",portal:!0,description:i.createElement(G,null,i.createElement(P.sA,{id:o}))},i.createElement(Q,{variant:"inline",onClick:c,disabled:l},i.createElement(X,{size:"original"}),i.createElement(V.A,{size:"caption",color:l?"secondary":"info"},i.createElement(P.sA,{id:s}))))};var Y=n(417378),Z=n(602021),j=n(198494),J=n(142394),q=n(252959),ee=n(103595),te=n(727270);const ne=(0,y.A)(p.A)`
  margin-top: ${_.kc};
  line-height: 1.5;
  text-align: left;
`,ie=(0,y.A)(U.A)`
  margin-right: ${_.kc};
  color: ${R.PA.warning};
`,re=(0,y.A)("div")`
  width: 16px;
  min-width: 16px;
  margin-right: ${_.kc};
`,ae=(0,y.A)("div")`
  display: inline-block;
`,le=({activeItem:e,activeItem:{lte_subscription_status:t,mac:n},deviceIsUlte:r,deviceIsUltePro:a})=>{const l=(0,b.useDispatch)(),o=(0,b.useSelector)(Y.S$),s=(0,b.useSelector)(q.H),c=(0,b.useSelector)(j.Pk),m=(0,b.useSelector)(Z.dK),_=(0,b.useSelector)(j.fR),E=(0,i.useMemo)(()=>(0,L.Qh)(o),[o]),d=(0,i.useMemo)(()=>`${te.DU}${E}/payments`,[E]),g=(0,i.useMemo)(()=>m||_,[m,_]),{subscriptionIsApplicable:u,subscriptionIsUnreachable:p,subscriptionIsUnavailable:f,hasUlteNotConnectedWarning:A,hasUlteNotRegisteredWarning:v,hasCountryLockedWarning:h,lteUsageData:C}=(0,i.useMemo)(()=>({subscriptionIsApplicable:(0,w.pW)(e),subscriptionIsUnreachable:(0,w.oe)(e),subscriptionIsUnavailable:r&&!!c&&!(0,w._D)(e,c),hasUlteNotConnectedWarning:(0,k.AO)(e),hasUlteNotRegisteredWarning:(0,k.Ql)(e),hasCountryLockedWarning:(0,k.t7)(s,e),lteUsageData:(0,w.cm)(e)}),[e,r,c,s]),{isApproachingLimit:I,isOverSoftLimit:x}=(0,i.useMemo)(()=>({statusColor:R.PA[C.state],isApproachingLimit:"warning"===C.state||"danger"===C.state&&!C.hasOverages,isOverSoftLimit:C.hasOverages&&!C.isSuspended}),[C]),N=(0,i.useMemo)(()=>g&&(u||p||f),[g,u,p,f]),{ltePaymentPastDue:O,isDeactivatedForNonPayment:T}=(0,i.useMemo)(()=>({ltePaymentPastDue:r&&t===J.Z.PAST_DUE,isDeactivatedForNonPayment:r&&t===J.Z.CANCELED}),[r,t]),U=(0,i.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),l((0,F.XP)({type:M.H.DEVICE,id:n,tab:z.BC.SETTINGS}))},[l,n]);return(0,i.useEffect)(()=>{l((0,ee.v)())},[l]),i.createElement(i.Fragment,null,I?i.createElement(ne,null,i.createElement(ie,{size:"original",variant:"fill"}),i.createElement(D.A,null,i.createElement(P.sA,{id:"DEVICE_DATA_USAGE_LTE_APPROACHING_LIMIT",values:{amount:`${C.width}%`}}))):null,x?i.createElement(ne,null,i.createElement(ie,{size:"original",variant:"fill"}),i.createElement("div",null,i.createElement(P.sA,{id:"DEVICE_DATA_USAGE_LTE_OVER_SOFT_LIMIT",values:{softLimit:(0,K.m0)(C.softLimitBytes),hardLimit:(0,K.m0)(C.hardLimitBytes)}}))):null,C.isSuspended?i.createElement(ne,null,i.createElement(ie,{size:"original",variant:"fill"}),i.createElement(P.sA,{id:"DEVICE_DATA_USAGE_LTE_OVER_HARD_LIMIT"})):null,"success"!==C.state?i.createElement(ne,null,i.createElement(re,null),i.createElement(ae,null,i.createElement(P.sA,{id:"DEVICE_DATA_USAGE_LTE_INCREASE_LIMIT"})," ",i.createElement(S.A,{variant:"inline",onClick:U},i.createElement(P.sA,{id:"DEVICE_DATA_USAGE_LTE_INCREASE_LIMIT_BUTTON"})))):null,O||T?i.createElement(ne,null,i.createElement(ie,{size:"original",variant:"fill"}),i.createElement(P.sA,{id:T?"DEVICE_DATA_USAGE_LTE_SERVICE_CANCELED":"DEVICE_DATA_USAGE_LTE_PAYMENT_OVERDUE",values:{link:i.createElement("a",{href:d,target:"_blank",rel:"noopener noreferrer"},i.createElement(P.sA,{id:"COMMON_ACTION_UPDATE_NOW"}))}})):null,h?i.createElement(ne,null,i.createElement(ie,{size:"original",variant:"fill"}),i.createElement(P.sA,{id:"DEVICE_PROPERTIES_NOTICE_COUNTRY_LOCKED_WARNING_BODY"})):null,A?i.createElement(ne,null,i.createElement(ie,{size:"original",variant:"fill"}),i.createElement(P.sA,{id:"DEVICE_PROPERTIES_NOTICE_ULTE_NOT_CONNECTED_WARNING_BODY"})):null,v?i.createElement(ne,null,i.createElement(ie,{size:"original",variant:"fill"}),i.createElement(P.sA,{id:"DEVICE_PROPERTIES_NOTICE_ULTE_NOT_REGISTERED_WARNING_BODY"})):null,N&&!a?i.createElement(W,{mac:n,isApplicable:u,isUnreachable:p,isUnavailable:f}):null)},oe=({softLimit:e=0,used:t=0,dataFormat:n,inactive:r=!1})=>{let a="green-06";r?a="text-4":e&&t>=e&&(a="orange-06");const l=C.Ay[`desktop-color-${a}-${(0,I.u)().themeName}`];return i.createElement(x.A,{color:"text-3",size:"medium"},i.createElement(N.A,{colorOverride:l},(0,h.Ay)(t,"bytes",n)),e>0?i.createElement("span",null," / ",(0,h.Ay)(e,"bytes",n)):null)},se=({activeItem:e,activeItem:{lte_soft_limit:t},deviceIsUlte:n,deviceIsUltePro:r})=>{const a=(0,w.cm)(e);return(0,k.YP)(e)?i.createElement(i.Fragment,null,i.createElement(T.Ay,{statusCode:a.state,status:(0,O.mR)(e.lte_rat)?i.createElement(T.lo,{signal:(0,l.KwR)(e)},e.lte_state===A.Gu.SEARCHING?i.createElement(P.sA,{id:"DEVICE_ULTE_PRO_SETUP_SEARCHING_INFO"}):e.lte_rat):null,message:i.createElement(oe,{softLimit:t,dataFormat:"IEC",used:a.usedBytes}),card_present:!!e.lte_iccid}),i.createElement(le,{activeItem:e,deviceIsUlte:n,deviceIsUltePro:r})):null};var ce=n(236037);const me=({activeItem:e,activeItem:{deviceState:t,uplink:n},deviceIsUlte:r,deviceIsUltePro:a})=>{const o=(0,i.useMemo)(()=>(0,E.H)(t||f.g.UNKNOWN,n?.type),[t,n?.type]),s=o===d.v.OFFLINE;return i.createElement(i.Fragment,null,i.createElement(g.A,{activeItem:e,isOffline:s,description:i.createElement(v.A,{activeItem:e,connectionStatus:o}),style:{flex:1}},i.createElement(p.A,{marginTop:_.kc,flexDirection:"column"},i.createElement(se,{activeItem:e,signalStrength:(0,l.KwR)(e),rat:e.lte_rat||A.MH.UNKNOWN,deviceIsUlte:r,deviceIsUltePro:a})),i.createElement(ce.A,{activeItem:e})),s?i.createElement(u.A,null):null)};var _e=n(170121),Ee=n(360113);const de=({isFailoverMode:e,...t})=>i.createElement(p.A,{gap:_.kc,flexDirection:"column"},i.createElement(_e.D,{size:"medium"},i.createElement(P.sA,{id:"COMMON_SIM"})),i.createElement("div",null,e?i.createElement(Ee.A,null,i.createElement(D.A,{color:"text-2"},i.createElement(P.sA,{id:"COMMON_MODE"})),i.createElement(D.A,{color:"text-3"},i.createElement(P.sA,{id:e?"COMMON_FAILOVER":"DEVICE_PRIMARY_INTERNET"}))):null,i.createElement(s.A,{...t})));var ge=n(772317);const ue=({activeItem:e,activeItem:{adopted:t,ip:n,mac:_,shortname:E,config_network:d,uplink:g,sys_stats:u,lte_imei:p,lte_failover:f,lte_failover_active:A,lte_networkoperator:v,lte_apn:h,lte_pdptype:C,lte_rat:I,lte_rx_chan:x,lte_tx_chan:N,lte_iccid:P,displayable_version:k,uptime:w}})=>{const O=(0,l.tNJ)(e),T=(0,l.mHb)(e);return i.createElement(i.Fragment,null,i.createElement(me,{activeItem:e,deviceIsUltePro:T,deviceIsUlte:O}),i.createElement(o.A,{ip:n,adopted:t,config_network:d}),i.createElement(m.A,{sys_stats:u,ip:n,mac:_,imei:p,displayable_version:k,uptime:w}),i.createElement(a.A,null,i.createElement(de,{isFailoverMode:Boolean(f),status:A?s.H.ACTIVE:s.H.STANDBY,networkoperator:v,apn:h,pdp_type:C,rat:I,rx_chan:+(x||0),tx_chan:+(N||0),iccid:P})),g?.mac?i.createElement(a.A,{type:a.I.ACCORDION,items:[{id:"uplink",openByDefault:!0,label:i.createElement(r.A,{id:"COMMON_PARENT_DEVICE"}),renderContent:()=>i.createElement(c.A,{activeItem:e,deviceIsUltePro:T})}]}):null,i.createElement(ge.A,{shortname:E}))}},261392:(e,t,n)=>{n.d(t,{H:()=>_});var i=n(296540);function r(e){if(e)return"number"==typeof e?`${e}px`:e}var a=n(349005),l={"listContainer-collapsed":"listContainer-collapsed__sFPQkEEX","listContainer-transition-enter":"listContainer-transition-enter__sFPQkEEX","listContainer-transition-enterActive":"listContainer-transition-enterActive__sFPQkEEX","listContainer-transition-enterDone":"listContainer-transition-enterDone__sFPQkEEX","listContainer-transition-exit":"listContainer-transition-exit__sFPQkEEX","listContainer-transition-exitActive":"listContainer-transition-exitActive__sFPQkEEX","listContainer-transition-exitDone":"listContainer-transition-exitDone__sFPQkEEX",list:"list__sFPQkEEX"};(0,a.A)(".listContainer-collapsed__sFPQkEEX,.listContainer-transition-enter__sFPQkEEX{max-height:0;overflow:hidden}.listContainer-transition-enterActive__sFPQkEEX{overflow:hidden;transition:max-height .2s cubic-bezier(.25,0,.25,1)}.listContainer-transition-enterDone__sFPQkEEX{max-height:none}.listContainer-transition-exit__sFPQkEEX{overflow:hidden}.listContainer-transition-exitActive__sFPQkEEX{max-height:0;overflow:hidden;transition:max-height .2s cubic-bezier(.25,0,.25,1)}.listContainer-transition-exitDone__sFPQkEEX{max-height:0;overflow:hidden}.list__sFPQkEEX{list-style:none;margin:0;padding:0}");var o=n(722860),s=n(325898),c=n(331859);const m=(0,o.c)(l),_=i.forwardRef(function(e,t){const{items:n,motif:a,isOpen:o,className:_,listClassName:E,style:d,renderItem:g,renderListItem:u,listItemClassName:p,transitionOffset:f={},children:A,...v}=e,{motif:h}=(0,s.A)(a),C=(0,i.useRef)(null),[I,x]=(0,i.useState)(0),N=()=>{const e=C.current;if(!e||!x)return;const{height:t}=e.getBoundingClientRect();x(t)};(0,i.useEffect)(N,[n]);const P=(0,i.useMemo)(()=>n.map(u||((e,t)=>i.createElement("li",{key:t,className:p},g(e)))),[n,u,p,g]);return i.createElement(c.A,{in:o,timeout:300,classNames:{enter:l["listContainer-transition-enter"],enterActive:l["listContainer-transition-enterActive"],enterDone:l["listContainer-transition-enterDone"],exit:l["listContainer-transition-exit"],exitActive:l["listContainer-transition-exitActive"],exitDone:l["listContainer-transition-exitDone"]},style:d,styles:{enterActive:{maxHeight:r(I+(f.enter||0))},exit:{maxHeight:r(I+(f.exit||0))}},onEntered:N,onExited:N},i.createElement("div",{ref:t,className:m.concat(_)("listContainer",`listContainer-${h}`,o||"listContainer-collapsed"),...v},i.createElement("ul",{ref:C,className:m.concat(E)("list",`list-${h}`)},P,A)))})},346078:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(296540),r=n(350312);(0,n(349005).A)(".arrowIcon__Szj9SxeU{transform:rotate(-90deg);transition:transform .2s cubic-bezier(.4,0,0,1.3)}.arrowIcon-expended__Szj9SxeU{transform:rotate(90deg)}");const a=(0,n(722860).c)({arrowIcon:"arrowIcon__Szj9SxeU","arrowIcon-expended":"arrowIcon-expended__Szj9SxeU"}),l=(0,i.forwardRef)(function(e,t){const{className:n,motif:l,isOpen:o,size:s="original",...c}=e;return i.createElement(r.A,{...c,ref:t,motif:l,size:s,className:a.concat(n)("arrowIcon",o&&"arrowIcon-expended")})})},895795:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(296540),r=n(629318);const a=(0,n(51946).w)(e=>(0,i.createElement)("svg",(0,r.d)({viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em"},e),(0,i.createElement)("rect",{x:3,y:5,width:12,height:12,rx:1,fill:"currentColor",className:e.twotonedclassname}),(0,i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 4H16v9.5a.5.5 0 0 0 1 0V4a1 1 0 0 0-1-1H6.5a.5.5 0 0 0 0 1ZM4 6h10v10H4V6ZM3 6a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V6Z",fill:"currentColor",className:e.baseclassname}),(0,i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.5 4H16v9.5a.5.5 0 0 0 1 0V4a1 1 0 0 0-1-1H6.5a.5.5 0 0 0 0 1ZM4 5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1H4Z",fill:"currentColor",className:e.fillclassname})))},962926:(e,t,n)=>{n.d(t,{A:()=>g});var i=n(296540),r={main:"main__35xProoK","main-light":"main-light__35xProoK","main-dark":"main-dark__35xProoK",trigger:"trigger__35xProoK","trigger-light":"trigger-light__35xProoK","trigger-dark":"trigger-dark__35xProoK",isCollapsible:"isCollapsible__35xProoK","trigger-filter":"trigger-filter__35xProoK",triggerContent:"triggerContent__35xProoK","triggerArrow-light":"triggerArrow-light__35xProoK","triggerArrow-dark":"triggerArrow-dark__35xProoK",collapsable:"collapsable__35xProoK",section:"section__35xProoK","section-light":"section-light__35xProoK","section-dark":"section-dark__35xProoK",actionButton:"actionButton__35xProoK",actionIcon:"actionIcon__35xProoK"};(0,n(349005).A)(".main__35xProoK{border-radius:8px}.main-light__35xProoK{background-color:#fff}.main-dark__35xProoK{background-color:#1c1e21}.trigger__35xProoK{align-items:center;background-color:transparent;border:none;display:flex;font-family:var(--desktop-font-family-default);font-size:var(--desktop-font-size-large);font-weight:var(--desktop-font-weight-semibold);justify-content:space-between;line-height:24px;padding:16px;width:100%}.trigger-light__35xProoK{color:#212327}.trigger-dark__35xProoK{color:#f9fafa}.trigger__35xProoK.isCollapsible__35xProoK{cursor:pointer}.trigger-filter__35xProoK{font-family:var(--desktop-font-family-default);font-size:var(--desktop-font-size-medium);font-weight:var(--desktop-font-weight-semibold);line-height:20px}.triggerContent__35xProoK{flex-grow:1;flex-shrink:1;font-family:var(--desktop-font-family-default);font-size:var(--desktop-font-size-medium);font-weight:var(--desktop-font-weight-semibold);line-height:20px;overflow:hidden;padding-right:8px;text-align:start;text-overflow:ellipsis;white-space:nowrap;width:0}.triggerArrow-light__35xProoK{color:#808893}.triggerArrow-dark__35xProoK{color:#b7bcc2}.collapsable__35xProoK:only-child{padding-top:16px}.section__35xProoK{font-family:var(--desktop-font-family-default);font-size:var(--desktop-font-size-medium);font-weight:var(--desktop-font-weight-regular);line-height:20px;padding:0 16px 16px}.section-light__35xProoK{color:#50565e}.section-dark__35xProoK{color:#dee0e3}.actionButton__35xProoK{background-color:transparent;border:none;color:#006fff;cursor:pointer;font-family:var(--desktop-font-family-default);font-size:var(--desktop-font-size-medium);font-weight:var(--desktop-font-weight-regular);line-height:20px;padding:0}.actionIcon__35xProoK{margin-right:8px;vertical-align:bottom}");var a=n(722860),l=n(325898);const o=(0,a.c)(r),s={size:"original"},c=i.forwardRef(function(e,t){const{motif:n,label:r,icon:c,className:m,children:_,...E}=e,{motif:d}=(0,l.A)(n);return i.createElement("button",{ref:t,className:o.concat(m)("actionButton",`actionButton-${d}`),...E},c&&function(e){const t=o("actionIcon");if(i.isValidElement(e))return i.cloneElement(e,{...s,...e.props,className:(0,a.x)(e.props.className,t)});if("function"==typeof e){const n=e;return i.createElement(n,{...s,className:t})}return i.createElement("i",null,e)}(c),r,_)});var m=n(346078),_=n(261392);const E=(0,a.c)(r);function d(e){return e}const g=i.forwardRef(function(e,t){const{motif:n,className:r,listClassName:a,header:o,sections:s=[],isOpen:g,defaultIsOpen:u,isCollapsible:p=!0,width:f,style:A,children:v,action:h,onHeaderClick:C,variant:I="sidepanel",...x}=e,{motif:N}=(0,l.A)(n),[P,k]=(0,i.useState)(u),w=!o,O=w||!p||(null!=g?g:P),T=E.concat(a)("section",`section-${N}`),b=p?"button":"div";return i.createElement("div",{ref:t,className:E.concat(r)("main",`main-${N}`),style:{...A,width:f},...x},!w&&i.createElement(b,{className:E("trigger",`trigger-${N}`,`trigger-${I}`,p&&"isCollapsible"),type:p?"button":void 0,onClick:p?e=>{null==C||C(e),k(e=>!e)}:void 0},i.createElement("div",{className:E("triggerContent")},o),p&&i.createElement(m.A,{"data-testid":"arrow",className:E("triggerArrow",`triggerArrow-${N}`),isOpen:O})),i.createElement(_.H,{className:E("collapsable"),"data-testid":"content",isOpen:O,items:s,renderItem:d,listItemClassName:T},!!v&&i.createElement("li",{className:T},v),!!h&&i.createElement("li",{className:T},i.isValidElement(h)?h:i.createElement(c,{...h}))))})}}]);