1import{r as e}from"./react-vendor-DJDEZQgo.js";import{a as r,k as t,s as o}from"./index-CpSz5HRc.js";import"./yandexMetrika-m_4Niw9W.js";import{u as n}from"./licenseContext-my7rfzFX.js";import"./lodash-LFlzvllK.js";import"./toastOptions-C9sKTk_P.js";import"./createLucideIcon-CsK1bMTG.js";import"./index-Dn-O8Fmn.js";import"./preload-helper-CKSfOHJ6.js";import"./api-CPiT7-aR.js";import"./users-IyG-ybWO.js";import"./index-BG-9wiPx.js";import"./companyHelpers-BHkC0xo-.js";import"./file-text-mJ7r21LW.js";function i(){const{currentUser:i,getToken:s,token:l}=e.useContext(r),{registerLicenseChange:u}=n(),a=e.useRef(null),c=e.useRef(null);return e.useEffect(()=>{a.current=(null==i?void 0:i.id)??null,c.current=(null==i?void 0:i.role)??null},[null==i?void 0:i.id,null==i?void 0:i.role]),e.useEffect(()=>{if(!(null==i?void 0:i.id)||!l)return;let e=!1;const r=async()=>{if(e||t())return;if(!((null==s?void 0:s())??localStorage.getItem("token")))return;const r=a.current;if(r)try{await o(r,c.current)}catch(n){}};r();const n=u(r);return()=>{e=!0,n()}},[null==i?void 0:i.id,null==i?void 0:i.role,u,s,l]),null}export{i as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.